fix(lockfile): preserve pnpm registry tarball urls#378
Conversation
Greptile SummaryThis PR fixes a mis-classification in the pnpm lockfile parser: when Confidence Score: 5/5Safe to merge — the fix is minimal and correct, and the new test directly exercises the regression scenario via a full parse/write/reparse cycle. No P0 or P1 findings. The guard reuses an already-computed boolean, does not alter behavior for URL-keyed entries, and leaves all other No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "fix(lockfile): preserve pnpm registry ta..." | Re-trigger Greptile |
Summary
lockfileIncludeTarballUrlrecords a tarball URLRoot Cause
The pnpm parser classified any
resolution.tarballHTTP URL as a remote-tarball dependency. That is only correct for URL-keyed package entries; ordinaryname@versionregistry entries can also carry tarball URLs whenlockfileIncludeTarballUrl=true.Validation
cargo fmt --checkcargo test -p aube-lockfileNote
Medium Risk
Touches pnpm lockfile parsing/classification used by the installer; misclassification fixes are targeted but can change how dependencies are fetched/resolved for some lockfiles.
Overview
Preserves pnpm registry dependencies as registry-sourced even when
lockfileIncludeTarballUrladds an HTTPresolution.tarball, by only treatingRemoteTarballaslocal_sourcefor URL-keyed entries.Adds an adversarial pnpm v9 parse→write→reparse test that exercises multiple native lockfile features together (overrides, catalogs, patched deps, aliasing, skipped/ignored optionals, peer metadata, platform constraints) and asserts top-level section ordering and tarball URL retention.
Reviewed by Cursor Bugbot for commit e94a504. Bugbot is set up for automated code reviews on this repo. Configure here.