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 pnpm 7/8 vendored specifier YAML quoting (#754) by mikolalysenko · Pull Request #755 · SocketDev/socket-patch Conversation
|
| Issue | Test | Without fix | With fix |
|---|---|---|---|
#754 (5.4 + 6.0, # and : ) |
pnpm_lock_legacy::tests::absolute_specifier_is_yaml_quoted_under_indicator_paths |
FAIL (specifier written unquoted) | pass |
| #754 (heal a lock broken by an older release) | pnpm_lock_legacy::tests::unquoted_absolute_specifier_from_an_older_release_is_healed |
FAIL (broken lock treated as in sync) | pass |
| #754 (real pnpm 7.33.5) | e2e_vendor_pnpm_build::pnpm7_real_lifecycle_under_yaml_indicator_paths |
FAIL ERR_PNPM_OUTDATED_LOCKFILE |
pass |
| #754 (real pnpm 8.15.9) | e2e_vendor_pnpm_build::pnpm8_real_lifecycle_under_yaml_indicator_paths |
FAIL ERR_PNPM_OUTDATED_LOCKFILE |
pass |
| encoder | formats::pnpm::lines::tests::yaml_value_* (plain-safe cells from the issue's matrix stay plain) |
n/a | pass |
The e2e legs run the existing legacy capstone (vendor, same-path
--frozen-lockfile --offline install of the patched bytes, moved
checkout, idempotent re-vendor, byte-exact revert) in hash #x and
colon: x project dirs (colon: x on unix only: Windows forbids : in a
path component). The red runs used this branch's tests with
origin/main's writer.
Commands run locally (Linux):
cargo fmt --all -- --check: cleancargo clippy --workspace --all-features -- -D warnings: cleancargo test -p socket-patch-core --lib -- pnpm_lock_legacy formats::pnpm: 80 passedcargo test -p socket-patch-cli --test e2e_vendor_pnpm_build -- real_lifecycle: 4 passedcargo test --workspace --all-features --no-fail-fast: the only failures areNo wrapper changes: this is Rust-only lock surgery, and the npm, pypi
and gem wrappers only dispatch to the binary.
vex never reads importer specifiers (vex/discover/npm.rs), and onvendor --check checks only the committed artifact for npm-familyvendor --check to re-verify npm-family wiring is thevendor --check says "committed artifact and wiring verified" (exit 0) after pipenv lock drops the vendored reference, so a fresh pipenv install --deploy installs the unpatched wheel while vex says vendor_unwired #725 / Fix vendor --check passing unwired vendored entries (#725) #730.🤖 Generated with Claude Code
https://claude.ai/code/session_01WrJKfSVrc5xqCq2bHEQsUA
Note
Medium Risk
Changes how pnpm 7/8 lockfiles are rewritten and reconciled; mistakes could corrupt locks or mis-detect drift, but scope is limited to legacy vendoring and is heavily tested.
Overview
Fixes #754: vendoring on pnpm 7/8 (lockfile 5.4 / 6.0) used to splice the machine-absolute file: root specifier into pnpm-lock.yaml as a plain scalar. Paths containing YAML trouble spots ( #, : ) then broke the lock (ERR_PNPM_OUTDATED_LOCKFILE / broken lockfile) even though vendor reported success.
Adds yaml_value in formats/pnpm/lines.rs to spell mapping values like pnpm’s js-yaml writer (plain when safe, single-quoted for indicators, double-quoted for non-printables). The legacy lock writer uses it for 5.4 specifiers and 6.0 root specifier: lines, compares in-sync state against the encoded form, and teaches revert/drift to treat quoted spellings as ours. Re-vendor heals locks an older release left unquoted (not “in sync”) without recording our stale value as the user’s original.
Tests: unit tests for the encoder; pnpm_lock_legacy fixtures under hash #x / colon: x dirs; e2e legacy capstone runs with a configurable project dir name (unix-only for : paths on Windows).
Reviewed by Cursor Bugbot for commit ca37b7e. Configure here.
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
Vendoring on a pnpm 7/8 lock writes the project's absolute path into pnpm-lock.yaml. When that path contained " #" or ": " (for example "My Project #2"), it was written unquoted, so YAML cut it short or rejected the line and every frozen install failed while vendor reported success. The specifier is now spelled the way pnpm itself writes it: plain when safe, single-quoted otherwise. Re-running vendor heals a lock an older release left broken, and revert still restores the original bytes. Fixes #754 Assisted-by: Claude Code:claude-opus-5-5
Adds end-to-end legs that vendor with real pnpm 7.33.5 and 8.15.9 in project directories named "hash #x" and "colon: x", then require the same-path frozen offline install to land the patched bytes. Without the quoting fix both fail with ERR_PNPM_OUTDATED_LOCKFILE. Refs #754 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.
|
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.
There was an error while loading. Please reload this page.
Windows does not allow ":" in a directory name, so the #754 tests that create a "colon: x" project dir would fail there before testing anything. Those cases now run on Linux and macOS only; the " #" case still runs everywhere. 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 quoting commit reformatted 130 files outside the fix, which buries the real change and conflicts with every other open PR touching those files. Restore them to main; the fix itself (pnpm_lock_legacy.rs, formats/pnpm/lines.rs, e2e_vendor_pnpm_build.rs) is unchanged. Co-Authored-By: Claude <[email protected]>
|
bugbot run 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 ca37b7e. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[agent] Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
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 7/8 writes the absolutefile: specifier unquoted, so a project path containing # or : breaks every frozen install while vendor, vendor --check and vex report success
There was an error while loading. Please reload this page.