Skip to content

Commit fd6479f

Browse files
authored
docs: update publish docs: dist-tag + publish case (#7560)
<!-- What / Why --> <!-- Describe the request in detail. What it does and why it's being changed. --> Updates `publish` command docs: - Refers to `npm tag` which is now `npm dist-tag` - Add docs specific for `npm publish --tag` ## References <!-- Examples: Related to #0 Depends on #0 Blocked by #0 Fixes #0 Closes #0 -->
1 parent 7d89b55 commit fd6479f

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

tap-snapshots/test/lib/docs.js.test.cjs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1612,12 +1612,15 @@ See also the \`ca\` config.
16121612
If you ask npm to install a package and don't tell it a specific version,
16131613
then it will install the specified tag.
16141614
1615-
Also the tag that is added to the package@version specified by the \`npm tag\`
1616-
command, if no explicit tag is given.
1615+
It is the tag added to the package@version specified in the \`npm dist-tag
1616+
add\` command, if no explicit tag is given.
16171617
16181618
When used by the \`npm diff\` command, this is the tag used to fetch the
16191619
tarball that will be compared with the local files by default.
16201620
1621+
If used in the \`npm publish\` command, this is the tag that will be added to
1622+
the package submitted to the registry.
1623+
16211624
16221625
16231626
#### \`tag-version-prefix\`

workspaces/config/lib/definitions/definitions.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -2012,11 +2012,14 @@ const definitions = {
20122012
If you ask npm to install a package and don't tell it a specific version,
20132013
then it will install the specified tag.
20142014
2015-
Also the tag that is added to the package@version specified by the \`npm
2016-
tag\` command, if no explicit tag is given.
2015+
It is the tag added to the package@version specified in the
2016+
\`npm dist-tag add\` command, if no explicit tag is given.
20172017
20182018
When used by the \`npm diff\` command, this is the tag used to fetch the
20192019
tarball that will be compared with the local files by default.
2020+
2021+
If used in the \`npm publish\` command, this is the tag that will be
2022+
added to the package submitted to the registry.
20202023
`,
20212024
flatten (key, obj, flatOptions) {
20222025
flatOptions.defaultTag = obj[key]

0 commit comments

Comments
 (0)