# HG changeset patch # User Oleksandr Gavenko # Date 1675888697 -7200 # Node ID 03ce3e35cd5b62629e10b59226b03780ab5ee8ae # Parent 70383fa8bf12d798e4b2846aedfbc3559785ef7a NPM package versions & tags diff -r 70383fa8bf12 -r 03ce3e35cd5b npm.rst --- a/npm.rst Tue Feb 07 00:53:39 2023 +0200 +++ b/npm.rst Wed Feb 08 22:38:17 2023 +0200 @@ -5,6 +5,30 @@ .. contents:: :local: +NPM package versions & tags +=========================== + +To list available tags use command ``npm view $PGK``:: + + npm view npm + npm v npm + npm show npm + +It is a common practice for modules to provide following two tags:: + + latest + next + +To get all available versions:: + + npm show lodash@* version + npm show lodash versions + npm view npm --json + +To get the currently used version in the ``package.json``-kind of project:: + + npm list lodash + Prune unused packages =====================