Comments (4)
This is the documented behaviour. Try adding --save
.
https://docs.npmjs.com/cli/v10/commands/npm-update
Note that by default npm update will not update the semver values of direct dependencies in your project package.json. If you want to also update values in
package.json
you can run:npm update --save
(or add thesave=true
option to a configuration file to make that the default behavior).
from cli.
Hey @shadowspawn thanks for the info, npm update --save
also isn't updating package.json
The bug appears to be affecting dependabot's behavior too: dependabot/dependabot-core#9071
Sometimes dependabot updates both files:
Bump @adamlui/scss-to-css from 1.1.1 to 1.2.0
Bump @adamlui/minify.js from 1.0.1 to 1.0.2
...and sometimes it doesn't:
Bump @adamlui/scss-to-css from 1.0.1 to 1.2.0
Bump sass from 1.70.0 to 1.71.0 in /scss-to-css
from cli.
Wait nvm those were sub-dependencies and my main ones were already up-to-date, I tested down-bumping then --save
worked to edit both files. But do you know if Dependabot's glitched behavior is due to a npm cli bug?
from cli.
Also if a user is using --save
and sub-dependencies are being bumped, shouldn't it be expected they want the sub-dependency's package.json' to save this new tree?
from cli.
Related Issues (20)
- [BUG] npm does not preserve hoisted packages in the root node modules when upgrading HOT 1
- [BUG] NPM not properly installed using hombrew HOT 4
- [BUG] Attestations incorrectly reported as invalid for npm < 10.5.0 HOT 15
- [BUG] After npm upgrade, on Windows getting error that npm.ps1 is not digitally signed
- [BUG] npm install <localFolder> removes bundledDependency HOT 2
- [BUG] < Stuck |######. . . . . . . | idealTree: timing idealTree Completed in 862ms> HOT 1
- [BUG] No way to override on single level i.e, only direct-dependencies
- [BUG] I encountered the following problem when running npx create-next-app HOT 2
- view command could return deprecated versions explicitly HOT 3
- [BUG] `npm ci` hanging on macOS workflows
- [BUG] npm install hangs with installing puppeteer package HOT 4
- Proposal: print a warning when a user adds "dev" package HOT 1
- [BUG] npm update fails with workspace dependencies HOT 2
- [BUG] npm pkg cli command outputs `{}` for missing entries from package.json HOT 2
- [BUG] ssl3_get_record:decryption HOT 1
- [npmjs.com] Add syntaxs support for [!TIP] blockquotes in markdown files
- [BUG] npx is too slow for already cached package with specific version requested HOT 1
- [BUG] Production prune removes peerDeps that are also devDeps HOT 1
- npm ERR! code E429 Too Many Requests : Publishing npm package HOT 1
- [DOCS] package.json#repository should clarify normalization steps and future plans. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.