npmsemantic-versioning

How do I install the latest minor version of a package on npm?


For example:

How can I install the most recent package that does not have breaking changes?


Solution

  • Use npm install package-name@"<next-major.0.0"

    For example:

    npm install package-name@"<3.0.0" would install the latest right before 3.0.0 (e.g. 2.11.1)