Non-frozen re-resolve rewrites the pnpm lockfile without pnpm-compatible patch metadata for a still-declared patch #1029
SummaryWhen a non-frozen This is related to #1019 but distinct: there the lockfile records a patch the On 1.26.0 the rewritten lockfile keeps only an empty So in a repo shared between aube and native pnpm users (or with CI running How the state arisesThis is the normal "merge updates manifests but keeps the old lock" flow:
We hit this on a real Expo monorepo where a rebase brought in unrelated Steps to reproducegit clone https://github.com/mwolson/tmp-aube-issues
cd tmp-aube-issues/pnpm-patch-reresolve-drop
./repro.shThe script runs native pnpm first (expected to succeed, exit 2 if the Store labeling side effectBoth aube versions link the patched package from a store directory without a Expected behaviorA non-frozen re-resolve keeps the still-declared patch applied, writes the |
Replies: 2 comments
|
Thanks for the detailed report and repro. Confirmed: #1022 kept the declared patch applied during a fresh re-resolution, but the pnpm writer still replaced pnpm 11 hash metadata with the manifest path and omitted the The fix is ready for review in #1035. It now preserves existing pnpm patch hashes or derives pnpm-compatible SHA-256 hashes from current patch files (including CRLF normalization), then emits the hash consistently on direct, transitive, snapshot, and peer-context references. Validation includes the full Rust test suite, clippy, the focused patch BATS suite, and the supplied This comment was generated by Codex. |
|
Retested with aube
Fix shipped in aube 1.28.0 via #1035 (with groundwork from #1022). Marking the maintainer reply as the answer. |
Thanks for the detailed report and repro. Confirmed: #1022 kept the declared patch applied during a fresh re-resolution, but the pnpm writer still replaced pnpm 11 hash metadata with the manifest path and omitted the
(patch_hash=...)identities from importer and snapshot references.The fix is ready for review in #1035. It now preserves existing pnpm patch hashes or derives pnpm-compatible SHA-256 hashes from current patch files (including CRLF normalization), then emits the hash consistently on direct, transitive, snapshot, and peer-context references.
Validation includes the full Rust test suite, clippy, the focused patch BATS suite, and the supplied
pnpm-patch-reresolve-droprepro. The…