Skip to content

Commit ff6626a

Browse files
austinchoisaacs
authored andcommitted
fix(docs): update npm-publish access flag info
PR-URL: #3630 Credit: @austincho Close: #3630 Reviewed-by: @wraithgar EDIT(@isaacs): rebased and edited to put config documentation in the correct location.
1 parent b6f40b5 commit ff6626a

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

docs/content/commands/npm-publish.md

+6
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,12 @@ If you want your scoped package to be publicly viewable (and installable)
136136
set `--access=public`. The only valid values for `access` are `public` and
137137
`restricted`. Unscoped packages _always_ have an access level of `public`.
138138
139+
Note: Using the `--access` flag on the `npm publish` command will only set
140+
the package access level on the initial publish of the package. Any
141+
subsequent `npm publish` commands using the `--access` flag will not have an
142+
effect to the access level. To make changes to the access level after the
143+
initial publish use `npm access`.
144+
139145
<!-- automatically generated, do not edit manually -->
140146
<!-- see lib/utils/config/definitions.js -->
141147

docs/content/using-npm/config.md

+6
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@ If you want your scoped package to be publicly viewable (and installable)
156156
set `--access=public`. The only valid values for `access` are `public` and
157157
`restricted`. Unscoped packages _always_ have an access level of `public`.
158158

159+
Note: Using the `--access` flag on the `npm publish` command will only set
160+
the package access level on the initial publish of the package. Any
161+
subsequent `npm publish` commands using the `--access` flag will not have an
162+
effect to the access level. To make changes to the access level after the
163+
initial publish use `npm access`.
164+
159165
<!-- automatically generated, do not edit manually -->
160166
<!-- see lib/utils/config/definitions.js -->
161167

lib/utils/config/definitions.js

+6
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ define('access', {
160160
(and installable) set \`--access=public\`. The only valid values for
161161
\`access\` are \`public\` and \`restricted\`. Unscoped packages _always_
162162
have an access level of \`public\`.
163+
164+
Note: Using the \`--access\` flag on the \`npm publish\` command will only
165+
set the package access level on the initial publish of the package. Any
166+
subsequent \`npm publish\` commands using the \`--access\` flag will not
167+
have an effect to the access level. To make changes to the access level
168+
after the initial publish use \`npm access\`.
163169
`,
164170
flatten,
165171
})

0 commit comments

Comments
 (0)