Skip to content

[BUG] publish with workspaces doesn't respect access controls #3268

@niemyjski

Description

@niemyjski

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I'm running the following command:

publish --workspaces --access public

And I'm getting errors because it's trying to publish workspace packages that are marked as both private and restricted (I have an examples folder that is part of my workspace).

npm ERR! code EPRIVATE
npm ERR! This package has been marked as private
npm ERR! Remove the 'private' field from the package.json to publish it.

I believe this references #3231 @ruyadorno @wraithgar

Expected Behavior

It should respect the access controls.

Steps To Reproduce

  1. In this environment create two workspace packages and mark one as public and one as restricted (as well as include a "private": true
  2. run publish --workspaces --access public
  3. See error published above

For a real life example see this: https://github.com/exceptionless/Exceptionless.JavaScript/tree/f492ef2daf5c5930542e9b4ecc76dbcfd937488d

Environment

  • OS: Ubuntu
  • Node: latest (16.x)
  • npm: latest (7.13)

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingPriority 1high priority issueRelease 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