Skip to content

Commit

Permalink
docs: update publish docs: dist-tag + publish case (#7560)
Browse files Browse the repository at this point in the history
<!-- 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
-->
  • Loading branch information
davidlj95 committed May 28, 2024
1 parent 7d89b55 commit fd6479f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions tap-snapshots/test/lib/docs.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -1612,12 +1612,15 @@ See also the \`ca\` config.
If you ask npm to install a package and don't tell it a specific version,
then it will install the specified tag.
Also the tag that is added to the package@version specified by the \`npm tag\`
command, if no explicit tag is given.
It is the tag added to the package@version specified in the \`npm dist-tag
add\` command, if no explicit tag is given.
When used by the \`npm diff\` command, this is the tag used to fetch the
tarball that will be compared with the local files by default.
If used in the \`npm publish\` command, this is the tag that will be added to
the package submitted to the registry.
#### \`tag-version-prefix\`
Expand Down
7 changes: 5 additions & 2 deletions workspaces/config/lib/definitions/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2012,11 +2012,14 @@ const definitions = {
If you ask npm to install a package and don't tell it a specific version,
then it will install the specified tag.
Also the tag that is added to the package@version specified by the \`npm
tag\` command, if no explicit tag is given.
It is the tag added to the package@version specified in the
\`npm dist-tag add\` command, if no explicit tag is given.
When used by the \`npm diff\` command, this is the tag used to fetch the
tarball that will be compared with the local files by default.
If used in the \`npm publish\` command, this is the tag that will be
added to the package submitted to the registry.
`,
flatten (key, obj, flatOptions) {
flatOptions.defaultTag = obj[key]
Expand Down

0 comments on commit fd6479f

Please sign in to comment.