Skip to content

[BUG] Publishing with --access restricted should prevent packages with no namespace being pushed #2588

@strongoose

Description

@strongoose

Current Behavior:

If a non-namespaced package is published with
npm publish --access restricted

npm ignored the user directive that access should be restricted and publishes the package.

Expected Behavior:

Attempting to publish a package which isn't namespaced with npm publish --access restricted should

  1. warn the user that packages without namespaces cannot be given restricted access
  2. exit with an error

Steps To Reproduce:

  1. Create a non-namespaces NPM package
  2. Publish is using npm publish --access restricted

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next stepsRelease 7.xwork is associated with a specific npm 7 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions