Steps to publish a npm package to beta that won't be available via latest and won't auto install on ncu updates etc
- Ensure any compile is run
npm run dist
etc - Modify version in package.json to the following format (match with existing verion numbers etc)
"version": "0.1.120-beta.1"
where beta.x is the number of those betas - Publish to npm
npm publish --tag beta
There are two options for install:
- Always install beta with
npm install packagename@beta
- Install specific version with
npm install [email protected]
How to fix latest if you publish a beta without --tag beta (if will default to latest)
run: npm dist-tags add @COMPANY/[email protected] latest --otp=123456
where 1.0.3 is the version that should be latest --otp= is required
I would assume that you republish the package after removing the
-beta
suffix in thepackage.json