From 04f549f2157dc2e79260f61c9b13a8ac459f433f Mon Sep 17 00:00:00 2001 From: Tierney Cyren Date: Mon, 18 Apr 2022 13:39:46 -0400 Subject: [PATCH 1/3] doc: include org instructions in scoped publish --- docs/content/using-npm/scope.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/content/using-npm/scope.md b/docs/content/using-npm/scope.md index 911d7ea5177c9..182aa37701bd6 100644 --- a/docs/content/using-npm/scope.md +++ b/docs/content/using-npm/scope.md @@ -79,9 +79,14 @@ If you wish, you may associate a scope with a registry; see below. #### Publishing public scoped packages to the primary npm registry -To publish a public scoped package, you must specify `--access public` with -the initial publication. This will publish the package and set access -to `public` as if you had run `npm access public` after publishing. +To publish a public scoped package, you must first create an +organization with the name of the scope that you'd like to publish to. +For example, if you'd like to publish to `@myscope`, you'd need to +create the `myscope` organization on npmjs.com prior to trying to +publish. Once you've created, the organization, you will need to +specify `--access public` with the initial `npm publish` command. +This will publish the package and set access to `public` as if +you had run `npm access public` after publishing. #### Publishing private scoped packages to the npm registry From dd2e515d54384d47787ee14b483ef2f0d0b6f1ae Mon Sep 17 00:00:00 2001 From: Tierney Cyren Date: Mon, 18 Apr 2022 17:03:28 -0400 Subject: [PATCH 2/3] doc: update scope context to add user scopes --- docs/content/using-npm/scope.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/content/using-npm/scope.md b/docs/content/using-npm/scope.md index 182aa37701bd6..d4fa77277f188 100644 --- a/docs/content/using-npm/scope.md +++ b/docs/content/using-npm/scope.md @@ -79,11 +79,19 @@ If you wish, you may associate a scope with a registry; see below. #### Publishing public scoped packages to the primary npm registry -To publish a public scoped package, you must first create an -organization with the name of the scope that you'd like to publish to. -For example, if you'd like to publish to `@myscope`, you'd need to -create the `myscope` organization on npmjs.com prior to trying to -publish. Once you've created, the organization, you will need to +Publishing to a scope, you have two options: + +- Publishing to your user scope (example: `@username/module`) +- Publishing to an organization scope (example: `@org/module`) + +If publishing a public module to an organization scope, you must +first either create an organization with the name of the scope +that you'd like to publish to or be added to an existing organization +with the appropriate permisssions. For example, if you'd like to +publish to `@org`, you would need to create the `org` organization +on npmjs.com prior to trying to publish. + +Once you will need to specify `--access public` with the initial `npm publish` command. This will publish the package and set access to `public` as if you had run `npm access public` after publishing. From 750a97e7e91113e37c303c74f1c5f0fb6d60b5fe Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Thu, 21 Apr 2022 09:05:05 -0700 Subject: [PATCH 3/3] Update docs/content/using-npm/scope.md Co-authored-by: Gar --- docs/content/using-npm/scope.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/content/using-npm/scope.md b/docs/content/using-npm/scope.md index d4fa77277f188..1abbe9081ead8 100644 --- a/docs/content/using-npm/scope.md +++ b/docs/content/using-npm/scope.md @@ -91,10 +91,11 @@ with the appropriate permisssions. For example, if you'd like to publish to `@org`, you would need to create the `org` organization on npmjs.com prior to trying to publish. -Once you will need to -specify `--access public` with the initial `npm publish` command. -This will publish the package and set access to `public` as if -you had run `npm access public` after publishing. +Scoped packages are not public by default. You will need to specify +`--access public` with the initial `npm publish` command. This will publish +the package and set access to `public` as if you had run `npm access public` +after publishing. You do not need to do this when publishing new versions of +an existing scoped package. #### Publishing private scoped packages to the npm registry