NPM audit fix for "tmp" package #174594
-
Select Topic AreaQuestion BodyGiven the following package.json: Why does NPM not install v0.2.5 of "tmp" which has a low severity vulnerability fix when running "Previously Undocumented Breaking Changes" https://www.npmjs.com/package/tmp/v/0.2.5?activeTab=versions If I update the package,json to Thanks, |
Beta Was this translation helpful? Give feedback.
The behavior you’re seeing isn’t a bug with
npm audit fixitself but rather how thetmppackage versions have been published.A few key points:
Your declared range (
^0.0.33)With semver, anything before
1.0.0is special:^0.0.xonly allows patch updates (it won’t jump to 0.1.0).^0.x.yallows updates within that minor version, but not across minors.So
^0.0.33means: “≥0.0.33 and <0.1.0.” That range can never reach0.2.x.Why
npm audit fixdoesn’t install 0.2.5npm audit fixwon’t go outside your declared version range unless you explicitly pass--force.package.jsonpins^0.0.33, it will stick to the 0.0.x line.Why
^0.2.0stops at 0.2.4