fix(publish): report publishConfig.tag in publish and stage notices #10136

Open
ljharb opened 6:30pm on October 15, 2026 wants to merge 32 Ξ” into npm/cli latest from
publish-config-tag-notice
Diff Delta:
32
About 1890 Diff Delta/hour
Classified as:  General

ljharb's Description of Work

A package's publishConfig can set tag, eg "publishConfig": { "tag": "next" }. npm publishes with it, since publishConfig is flattened into opts and the publish uses opts.defaultTag, but the "Publishing to … with tag …" notice, and the npm stage "has been staged with tag …" notice, printed defaultTag, which is read from the CLI config before publishConfig is applied. So npm publish said "with tag latest" while publishing to next.

Both notices now print opts.defaultTag, the tag actually used, with tests for npm publish and npm stage.

3 total changed files
Loading changes...
You've made it to the end of the scroll.
LGTM-land is officially in view