main
@reggi/path-to-regexp
dependabot/npm_and_yarn/main/copy-to-clipboard-4.0.2
dependabot/npm_and_yarn/main/eslint-10.4.0
dependabot/npm_and_yarn/main/npmcli/eslint-config-7.0.0
dependabot/npm_and_yarn/main/proc-log-7.0.0
dependabot/npm_and_yarn/npm_and_yarn-826852524d
dependabot/npm_and_yarn/npm_and_yarn-ab9a7f4bc2
deprecate-totp-2fa
dhei/classic-tokens
gat-bypass-2fa-docs
jpg619/fix-accessibility-content-flow
jpg619/version-bump-tar-2
kartykp/gat-bypass-2fa-docs
kartykp/upgrade-path-to-regex
main
maitxn/version-bump-tar
patch-1
reggi/cache-based-on-version
reggi/dev-engines
reggi/fix-transform-prettier
reggi/overrides
update-search-sensitivity
| 1 | --- |
| 2 | title: About scopes |
| 3 | redirect_from: |
| 4 | - /getting-started/scoped-packages |
| 5 | --- |
| 6 | |
| 7 | <Note> |
| 8 | |
| 9 | **Note:** You must be using npm version 2 or greater to use scopes. To upgrade to the latest version of npm, on the command line, run `npm install npm@latest -g` |
| 10 | |
| 11 | </Note> |
| 12 | |
| 13 | When you sign up for an npm user account or create an organization, you are granted a scope that matches your user or organization name. You can use this scope as a namespace for related packages. |
| 14 | |
| 15 | A scope allows you to create a package with the same name as a package created by another user or organization without conflict. |
| 16 | |
| 17 | When listed as a dependent in a `package.json` file, scoped packages are preceded by their scope name. The scope name is everything between the `@` and the slash: |
| 18 | |
| 19 | - **"npm" scope:** |
| 20 | |
| 21 | ``` |
| 22 | @npm/package-name |
| 23 | ``` |
| 24 | |
| 25 | - **"npmcorp" scope:** |
| 26 | |
| 27 | ``` |
| 28 | @npmcorp/package-name |
| 29 | ``` |
| 30 | |
| 31 | To create and publish public scoped packages, see "[Creating and publishing scoped public packages][create-public-pkg]". |
| 32 | |
| 33 | To create and publish private scoped packages, see "[Creating and publishing private packages][create-private-pkg]". |
| 34 | |
| 35 | ## Scopes and package visibility |
| 36 | |
| 37 | - Unscoped packages are always public. |
| 38 | - [Private packages][about-priv-pkg] are always scoped. |
| 39 | - Scoped packages are private by default; you must pass a command-line flag when publishing to make them public. |
| 40 | |
| 41 | For more information on package scope and visibility, see "[Package scope, access level, and visibility][pkg-viz]". |
| 42 | |
| 43 | [create-public-pkg]: creating-and-publishing-scoped-public-packages |
| 44 | [create-private-pkg]: creating-and-publishing-private-packages |
| 45 | [about-priv-pkg]: about-private-packages |
| 46 | [pkg-viz]: package-scope-access-level-and-visibility |