Skip to content

Commit

Permalink
[IMP] config: tag npm publications
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rrahir committed Mar 1, 2023
1 parent a9f48d7 commit 30e406f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,8 @@
},
"lint-staged": {
"*": "prettier --write"
},
"publishConfig": {
"tag": "latest"
}
}

0 comments on commit 30e406f

Please sign in to comment.