UNPKG

@verdaccio/how-to-npm

Version:
25 lines (18 loc) 1.05 kB
Every published package on npm has a `dist-tags` entry on it which maps strings like "latest" to version numbers like "1.2.48". By default, the "latest" version is what gets installed. When you publish, the version that you publish gets tagged as "latest". This is generally great, because most of the time you publish things when you're ready for users to use them. However, if you need to publish something, and *not* make it the default version of a package (for example, if it's a security release for a legacy version, or something), then you can manually manage these distribution tags with the `dist-tag` function. `npm dist-tag add <pkg>@<version> [<tag>]` will add a new tag. To find out the name of your current package/version type `npm ls`. The first line of the output will be the package and version; e.g. pkg@1.0.1. To add a tag type in the name of the tag. npm dist-tag add pkg@1.0.1 beta Run `npm help dist-tag` to learn more about it. Let's add a dist-tag on your package, and then `$ADVENTURE_COMMAND verify` to check it.