You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] npm update does not retain specified dependency ranges in package.json #7889
; "user" config from /Users/r.troha/.npmrc
<redacted>
package-lock = true
save-exact = true
save-prefix = ""; "env" config from environmentpython = "/opt/homebrew/python/bin/python3.8"; node bin location = /Users/r.troha/.volta/tools/image/node/20.11.1/bin/node; node version = v20.11.1; npm local prefix = /Users/r.troha/Projects/npmbug; npm version = 10.9.0; cwd = /Users/r.troha/Projects/npmbug; HOME = /Users/r.troha; Run `npm config ls -l` to show all defaults.
@rosstroha I checked with npm update and it does not remove the version range. npm update intended to update the package to the latest version allowed by the version range in the package.json.
Note: save-exact = true config in your .npmrc you can try removing that from npmrc or you can use inline config while running command like this npm update emoji-poop --no-save-exact
checkout this config documentation. https://docs.npmjs.com/cli/v8/using-npm/config#save-exact
Activity
v-kchindam-infy commentedon Nov 1, 2024
@rosstroha I checked with npm update and it does not remove the version range. npm update intended to update the package to the latest version allowed by the version range in the package.json.
Note:
save-exact = trueconfig in your.npmrcyou can try removing that from npmrc or you can use inline config while running command like thisnpm update emoji-poop --no-save-exactcheckout this config documentation. https://docs.npmjs.com/cli/v8/using-npm/config#save-exact
rosstroha commentedon Nov 5, 2024
Same issue

v-kchindam-infy commentedon Nov 6, 2024
Not an issue, it is working as intended.
rosstroha commentedon Nov 6, 2024
I must be missing something.
--no-save-exactshould retain the dependency range, correct?rosstroha commentedon Nov 6, 2024
Additionally I've removed
save-exact=truefrom my .npmrc file, just to ensure it's not being consideredHere's my full config
rosstroha commentedon Nov 8, 2024
@kchindam-infy
ljharb commentedon Nov 8, 2024
I think this is related to npm/rfcs#547.