Repository navigation
feat(core): add ignoreLockfileSettingsChecks option - #11259
Merged
Merged
Conversation
Allow skipping the lockfile settings validation during frozen and preferFrozenLockfile installs. When enabled, pnpm proceeds as if the lockfile settings are up to date.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
pkg-manager/core/src/install/index.ts:433
ignoreLockfileSettingsChecksdisablesgetOutdatedLockfileSetting()entirely, which also affects thepreferFrozenLockfilefast-path by keepingneedsFullResolutionfalse. There’s a new test forfrozenLockfile, but no coverage thatpreferFrozenLockfileinstalls with mismatched lockfile settings still proceed (and/or skip resolution) when this flag is enabled. Consider adding a test that exercises thepreferFrozenLockfilebranch with a settings mismatch andignoreLockfileSettingsChecks: trueto prevent regressions.
if (!opts.ignorePackageManifest && !opts.ignoreLockfileSettingsChecks) {
const outdatedLockfileSettingName = getOutdatedLockfileSetting(ctx.wantedLockfile, {
autoInstallPeers: opts.autoInstallPeers,
catalogs: opts.catalogs,
dedupePeers: opts.dedupePeers || undefined,
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Apr 14, 2026
zkochan
added a commit
that referenced
this pull request
Nov 19, 2026
Port the ignoreLockfileSettingsChecks install option from pnpm v10 (#11259). When enabled, the settings recorded in the lockfile are not compared with the current configuration, so a mismatch neither fails a frozen install nor forces a re-resolution. Co-Authored-By: Claude Opus 5.5 <[email protected]>
zkochan
added a commit
that referenced
this pull request
Nov 20, 2026
## Summary Adds the `ignoreLockfileSettingsChecks` install option, which pnpm v10 has (#11259), to the programmatic APIs of both stacks. When it is enabled, the `settings` recorded in `pnpm-lock.yaml` are not compared with the current configuration. A mismatch no longer fails a frozen install with `ERR_PNPM_LOCKFILE_CONFIG_MISMATCH` and no longer makes the install resolve again. It is not a CLI setting. As in pnpm v10, the current `overrides` still apply to the project manifests, so a changed override still makes the lockfile outdated. **pnpm v11** (`@pnpm/installing.deps-installer`) - `detectOutdatedLockfileSettings` skips the comparison when the option is set. - A frozen install through a pnpr server also honors the option. That path checks the pnpmfile checksum separately. **pnpm v12** (`@pnpm/napi`) - New `ignoreLockfileSettingsChecks` install option, mapped to a new `InstallLockfilePolicy::ignore_settings_check`. - The freshness gate (`check_settings`) and the frozen pre-hook validation (`check_pre_hook_settings_drift`) skip the comparison when it is set. The other ~100 `InstallLockfilePolicy` / `FreshnessScope` literals only gain `ignore_settings_check: false`. ## Test plan - [x] v11: a frozen install succeeds with a mismatched `autoInstallPeers`, and a prefer-frozen install skips resolution and keeps the lockfile settings - [x] v11: a frozen pnpr install accepts a changed pnpmfile checksum with the option and rejects it without the option - [x] v12 napi: a frozen install rejects a mismatched `autoInstallPeers`, accepts it with the option, and a non-frozen install with the option leaves the lockfile unchanged - [x] v12 package-manager: a frozen `run` and `validate_frozen` accept a drifted pnpmfile checksum with `ignore_settings_check` - [x] Each new test fails when its gate is disabled - [x] `pnpm-package-manager` + `pnpm-napi` (1429 tests), the smoke profile, clippy, and the v11 `frozenLockfile.ts` / `pnprWorkspaceMetadata.ts` suites pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Added the `ignoreLockfileSettingsChecks` option for programmatic installs. It is disabled by default; when enabled, lockfile setting and pnpmfile checksum mismatches do not fail frozen installs or trigger dependency resolution. * **Bug Fixes** * Frozen and preferred-frozen installs can proceed while retaining the settings recorded in the lockfile. Current overrides still apply to project manifests and may make them outdated. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ignoreLockfileSettingsChecksoption to@pnpm/coreinstall optionsLOCKFILE_CONFIG_MISMATCHerrors when settings inpnpm-lock.yamldon't match current configurationTest plan
autoInstallPeerswhenignoreLockfileSettingsChecks: true