Skip to content

Commit 30e406f

Browse files
committed
[IMP] config: tag npm publications
We currently do not specify any tag when publishing on NPM, which defaults to `latest`. Since we don't want old versions to be tagged as such, we add a tag in `package.json` to control which version has the flag `latest`. Note that according to the NPM documentation[1], the tag cannot match a semVer range [2][3] which is why we use a special tag that only indentifies the major version of the package. [1] https://docs.npmjs.com/cli/v9/commands/npm-dist-tag#caveats [2] https://semver.org/ [3] https://www.telerik.com/blogs/the-mystical-magical-semver-ranges-used-by-npm-bower Part-of: #2141
1 parent a9f48d7 commit 30e406f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,5 +130,8 @@
130130
},
131131
"lint-staged": {
132132
"*": "prettier --write"
133+
},
134+
"publishConfig": {
135+
"tag": "latest"
133136
}
134137
}

0 commit comments

Comments
 (0)