Skip to content

fix: skip hidden lockfile save on dry run#9417

Merged
owlstronaut merged 1 commit into
release/v11from
backport/v11/9395
May 27, 2026
Merged

fix: skip hidden lockfile save on dry run#9417
owlstronaut merged 1 commit into
release/v11from
backport/v11/9395

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Backport of #9395 to release/v11.

## Summary

- stop Arborist from saving `node_modules/.package-lock.json` during
dry-run reification
- add a regression that keeps both `package-lock.json` and the hidden
lockfile unchanged after `update: true, dryRun: true`

This addresses the dry-run lockfile mutation part of #9187. The JSON
output behavior is separate and already has #8567 open.

## Testing

- `../../node_modules/.bin/tap --no-coverage --no-check-coverage
test/arborist/reify.js -g 'dry-run update does not save lockfiles'`
- `../../node_modules/.bin/tap --no-coverage --no-check-coverage
test/arborist/reify.js -g 'dry run, do not get anything wet|save
complete lockfile on update-all'`
- `../../node_modules/.bin/eslint lib/arborist/reify.js
test/arborist/reify.js`
- `git diff --check`

Co-authored-by: Puneet Dixit <236133619+puneetdixit200@users.noreply.github.com>
(cherry picked from commit b77850e)
@owlstronaut owlstronaut reopened this May 27, 2026
@owlstronaut owlstronaut merged commit 4d141a0 into release/v11 May 27, 2026
35 checks passed
@owlstronaut owlstronaut deleted the backport/v11/9395 branch May 27, 2026 16:40
@github-actions github-actions Bot mentioned this pull request May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants