Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: npm update --save #4223

Merged
merged 4 commits into from
Jan 20, 2022
Merged

Commits on Jan 12, 2022

  1. fix: npm update --save

    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.
    
    Fixes: npm#708
    Fixes: npm#2704
    Relates to: npm/feedback#270
    ruyadorno committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    f21ffba View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3cf432a View commit details
    Browse the repository at this point in the history
  3. fix: default save config value for update cmd

    - 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
    ruyadorno committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    3bb7bac View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2022

  1. fix: addressed code review

    - added more tests scenarios
    - fixed some typos
    ruyadorno committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    c0ad0f2 View commit details
    Browse the repository at this point in the history