• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

npm / cli / #3603
97%
latest: 97%

Build:
Build:
LAST BUILD BRANCH: nlf/arborist-validation
DEFAULT BRANCH: latest
Ran 20 Jan 2022 06:53PM UTC
Jobs 1
Files 126
Run time 27s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
#3603

push

web-flow
fix: npm update --save (#4223)

Previously `npm update` was not respecting the `save` option, it
would be impossible for users to use `npm update` and automatically
update their `package.json` files.

This fixes it by adding extra steps on `Arborist.reify._saveIdealTree`
to read direct dependencies of any `package.json` and update them as
needed when reifying using the `update` and `save` options.

- Uses config.isDefault to set a different value for the `save` config
  for both the update and dedupe commands
- Tweaks arborist to make sure saveIdealTree preserves the behavior of
  skipping writing to package-lock.json on save=false for install while
  still writing the lockfile for `npm update` with its new default value
  of save=false.
- Updated and added some new tests on arborist to cover for these tweaks
- Added `npm update --save` smoke test on cli

Fixes: https://github.com/npm/cli/issues/708
Fixes: https://github.com/npm/cli/issues/2704
Relates to: https://github.com/npm/feedback/discussions/270

3297 of 3398 branches covered (97.03%)

Branch coverage included in aggregate %.

5821 of 5975 relevant lines covered (97.42%)

29.54 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #3603.1 20 Jan 2022 06:53PM UTC 0
97.28
Source Files on build #3603
Detailed source file information is not available for this build.
  • Back to Repo
  • cfd59b8c on github
  • Prev Build on release-next
  • Next Build on release-next
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc