Skip to content

fix!: default opts.access to null to preserve registry behavior#9419

Merged
owlstronaut merged 1 commit into
latestfrom
access-default
May 28, 2026
Merged

fix!: default opts.access to null to preserve registry behavior#9419
owlstronaut merged 1 commit into
latestfrom
access-default

Conversation

@owlstronaut
Copy link
Copy Markdown
Contributor

Closes #9414.

BREAKING CHANGE: opts.access now defaults to null instead of 'public'. With null, libnpmpublish no longer sets an explicit access level in the publish payload, so new scoped packages are created as restricted (registry default) and republishes preserve the existing access level. Callers that want to force public access must now pass access: 'public' explicitly.

Closes #9414.

BREAKING CHANGE: `opts.access` now defaults to `null` instead of `'public'`. With `null`, libnpmpublish no longer sets an explicit access level in the publish payload, so new scoped packages are created as `restricted` (registry default) and republishes preserve the existing access level. Callers that want to force public access must now pass `access: 'public'` explicitly.
@owlstronaut owlstronaut requested review from a team as code owners May 27, 2026 16:53
@wraithgar
Copy link
Copy Markdown
Contributor

Thank you for fixing a Gar-from-the-past oversight here.

@reggi
Copy link
Copy Markdown
Contributor

reggi commented May 28, 2026

Question: This change would mean that people who currently use staged publishing would get an error?

npm stage publish

They'd need to do:

npm stage publish --access=public

@owlstronaut
Copy link
Copy Markdown
Contributor Author

Question: This change would mean that people who currently use staged publishing would get an error?

npm stage publish

They'd need to do:

npm stage publish --access=public

follow up for later readers - this isn't making it required, it just defaults to null. No changes needed for staging

@owlstronaut owlstronaut merged commit 79b0c84 into latest May 28, 2026
16 checks passed
@owlstronaut owlstronaut deleted the access-default branch May 28, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

libpnmpublish public default is a footgun, and doesn't match usage

4 participants