GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||
GeezerVison is showing github.com — Fix vendored pnpm shadowing workspace overrides (#360) by mikolalysenko · Pull Request #785 · SocketDev/socket-patch Conversation
|
| Issue | Test | Before fix | After fix |
|---|---|---|---|
| #360 | unit vendor::pnpm_lock::tests::workspace_read_overrides_skip_the_package_json_copy |
FAILED: package.json gained pnpm.overrides |
ok |
| #360 | e2e e2e_vendor_pnpm_build::pnpm_vendor_keeps_user_workspace_overrides_authoritative (real pnpm 10.34.6) |
FAILED: package.json gained pnpm.overrides |
ok |
What the e2e test does:
overrides: {is-number: 7.0.0} and vendors left-pad.package.json is byte-identical after vendoring.pnpm install --frozen-lockfile with an empty store. It asserts the install succeeds, installs the patched left-pad bytes, and still resolves is-odd's is-number to 7.0.0, so the user's override holds.vendor --revert and asserts package.json, pnpm-workspace.yaml and pnpm-lock.yaml are restored byte for byte.These control tests pass, showing the existing behavior is kept:
workspace_overrides_unrecorded_in_lock_keep_the_package_json_copy: pnpm 9 / 10.0–10.4 locks still get the copy.existing_package_json_overrides_keep_the_package_json_copyCommands run locally:
cargo clippy --workspace --all-features -- -D warnings: clean.cargo fmt: the changed hunks are rustfmt-formatted. cargo fmt --all -- --check is not clean on main itself (about 130 files), and CI runs no fmt check.cargo test --workspace --all-features --no-fail-fast: 9728 passed, 12 failed. All 12 are pre-existing permission-based write/remove-failure tests (e.g. vendor_state_write_failure_reports_failed_event uses chmod 0o555). They can't fail as intended in this sandbox because it runs as root, and none touch pnpm. CI runs as non-root and is green.cargo test -p socket-patch-cli --all-features --test e2e_vendor_pnpm_build: 17 passed (1 ignored), re-run on eb4ddc6.cargo test -p socket-patch-core --lib -- vendor::pnpm: 201 passed, re-run on eb4ddc6.pnpm_pinned_matrix_vendored_lifecycle_and_manifestless_vex with SOCKET_PATCH_PNPM_E2E_VERSION=10.28.0: ok.npm/, pypi/ or gem/ changes are needed).CI on eb4ddc6: all 8 Actions workflows that run for these paths passed (CI, pnpm, npm, Bun, vlt, Composer, Benchmarks, Audit GHA Workflows), and Bugbot found no issues.
Generated by Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Assisted-by: Claude Code:claude-opus-5-5
On pnpm 10.5+ a project can keep its overrides in pnpm-workspace.yaml. Vendoring still wrote a package.json pnpm.overrides copy, which pnpm 10 uses in place of the workspace overrides. Frozen installs then failed with ERR_PNPM_LOCKFILE_CONFIG_MISMATCH, and a re-lock silently dropped the user's overrides. When the lock already records a user override from the workspace file and package.json has none of its own, vendoring now wires only the workspace file and the lock. pnpm 9 and 10.0-10.4 never record workspace overrides, so they keep the package.json copy as before. Fixes #360 Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The previous commit ran rustfmt over the whole workspace, which reformatted 130 files the fix never touched. Restore them to main so the PR only carries the pnpm override change and its tests. Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit eb4ddc6. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[burn-down agent] Ready for review at
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Vendored pnpm 10.5+ withoverrides: in pnpm-workspace.yaml: the new package.json pnpm.overrides shadows the user's overrides, so frozen installs fail and a re-lock drops them
There was an error while loading. Please reload this page.