Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorChris Rebert <github@chrisrebert.com>2015-12-11 14:33:17 +0300
committerRebecca Turner <me@re-becca.org>2016-01-07 04:17:21 +0300
commit7f77a80d561ee4b2b8c0aba1226fe89dfe339bcd (patch)
tree9d7793f34a15cc9203fe1188f9367f3c0b24c9a0 /doc
parent6db58dd0d7719c4675a239d43164edc066842b14 (diff)
doc: npm-dist-tag: Explain how `latest` is special
* Explain why one would care about the `latest` tag, by explaining its special significance to `npm install`. Currently, only its default status with respect to `npm publish` is mentioned. * Also, avoid using npm as a meta-example, as this causes confusion between npm-the-tool and npm-the-project. The old docs made it sound like the `next` tag might've has special significance to npm-the-tool, when it was instead talking about npm-the-project (AFAIK). * Mention common practice regarding tagging unstable releases, as this is not universally known. * Include the term "prerelease" for SEO's sake PR-URL: https://github.com/npm/npm/pull/10787 Credit: @cvrebert
Diffstat (limited to 'doc')
-rw-r--r--doc/cli/npm-dist-tag.md23
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