Skip to content

feat(rush): preserve existing autoinstaller lockfiles on request - #6137

Draft
Bharat Middha (bmiddha) wants to merge 2 commits into
mainfrom
bmiddha/pnpm12-autoinstaller-reconcile
Draft

Bharat Middha (bmiddha) wants to merge 2 commits into
mainfrom
bmiddha/pnpm12-autoinstaller-reconcile

Conversation

@bmiddha

Copy link
Copy Markdown
Member

Summary

Add rush update-autoinstaller --name <name> --preserve-lockfile for PNPM.

  • Keep the existing wanted and internal lockfiles and reconcile the manifest with a non-frozen install.
  • Preserve the existing full-update behavior when the option is omitted.
  • Reject unsupported package managers and a missing existing lockfile; propagate installation errors.
  • Keep the normal configuration, authentication, hooks, and lifecycle-script behavior.

This option preserves the lockfile as an input, not a guarantee that every resolution remains unchanged. The documentation explicitly requires reviewing the resulting dependency diff.

Validation

The rebased source passed the normal dependency build, TypeScript, ESLint, API Extractor, Webpack, and all 10 mocked CLI/default/error-handling tests. Its four implementation/test files are byte-identical to the previously verified source that passed all 11 cases with actual pnpm 8.14.0 and native pnpm 12.11.2, including lock-retaining reconciliation, compatible dependency retention, and a fresh frozen installation.

The real-manager fixture uses a loopback registry and an isolated child environment. PNPM_TEST_EXECUTABLE can select a different executable without changing the repository's package-manager pin.

This PR is independent of the native-support stack and does not change the repository's package-manager version or approve any downstream lockfile delta.

Add an opt-in PNPM reconciliation mode that keeps the existing wanted and internal lockfiles and uses a non-frozen install. Preserve the default full-update behavior and reject unsupported managers or missing locks. Cover CLI forwarding, failure propagation, and actual-manager retention and fresh-install behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: bedb50cb-fcd4-4dc4-83b9-dba6064e5498
Regenerate the help text and CLI specification snapshots for the new opt-in flag. Preserve the command behavior and all real-manager fixture assertions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: bedb50cb-fcd4-4dc4-83b9-dba6064e5498

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs triage

Development

Successfully merging this pull request may close these issues.

1 participant