diff options
Diffstat (limited to 'doc/cli/npm-dist-tag.md')
-rw-r--r-- | doc/cli/npm-dist-tag.md | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/doc/cli/npm-dist-tag.md b/doc/cli/npm-dist-tag.md index 921381651..cf6c2913a 100644 --- a/doc/cli/npm-dist-tag.md +++ b/doc/cli/npm-dist-tag.md @@ -36,14 +36,27 @@ This also applies to `npm dedupe`. Publishing a package sets the "latest" tag to the published version unless the `--tag` option is used. For example, `npm publish --tag=beta`. +By default, `npm install <pkg>` (without any `@<version>` or `@<tag>` +specifier) installs the `latest` tag. + ## PURPOSE -Tags can be used to provide an alias instead of version numbers. For -example, `npm` currently uses the tag "next" to identify the upcoming -version, and the tag "latest" to identify the current version. +Tags can be used to provide an alias instead of version numbers. + +For example, a project might choose to have multiple streams of development +and use a different tag for each stream, +e.g., `stable`, `beta`, `dev`, `canary`. + +By default, the `latest` tag is used by npm to identify the current version of +a package, and `npm install <pkg>` (without any `@<version>` or `@<tag>` +specifier) installs the `latest` tag. Typically, projects only use the `latest` +tag for stable release versions, and use other tags for unstable versions such +as prereleases. + +The `next` tag is used by some projects to identify the upcoming version. -A project might choose to have multiple streams of development, e.g., -"stable", "canary". +By default, other than `latest`, no tag has any special significance to npm +itself. ## CAVEATS |