Repository navigation
[pull] main from pnpm:main - #351
Merged
Merged
Conversation
…12605) The dlx cache path is <cacheDir>/dlx/<key>/<prepare>/node_modules/.pnpm/ <pkgId>/node_modules/<pkg>. The <key> (64-char sha256 hex) and <prepare> (<time>-<pid> in hex) segments are dlx overhead on top of pnpm's already- deep virtual-store layout. For a transitive dep with a long name this tips the package directory over Windows' MAX_PATH (260) — measured at 259 chars for @pnpm.e2e/pre-and-postinstall-scripts-example in the dlx e2e test. A lifecycle script then runs with that directory as its cwd, and CreateProcess fails to resolve an over-length cwd, which Node surfaces as the confusing "spawn C:\Windows\system32\cmd.exe ENOENT". Flaky rather than constant because the <prepare> and temp-dir segments vary in length, straddling 260. Shorten both dlx-specific segments: - cache key: createShortHash (32 hex, 128 bits) instead of createHexHash (64). pacquet already truncated to 32, so this also restores parity. - prepare dir: encode time and pid in base36 instead of hex.
…gle git-hosted version (#12518) The single git-hosted version branch of getPatchedDependency spread the options object instead of the parsed dependency, so the result lost `alias` (the package name) and carried unrelated option fields. Spread `dep`, matching the sibling branches. Co-authored-by: Claude <[email protected]>
…#12519) Lockfile verification fetches registry metadata to bind each entry's tarball URL (and to apply the minimumReleaseAge / trust-downgrade policies). On a fetch failure the abbreviated-metadata fetch collapsed every failure mode — 403, 401, network error, 5xx — into the same "missing" value as a version genuinely absent from the metadata, so a transport failure was reported as a tampering-style ERR_PNPM_TARBALL_URL_MISMATCH. Rather than mint a dedicated violation code/message for the transport case, the verifier now propagates the registry's own fetch error and the install aborts with it: - runTarballUrlCheck / runAgeCheck / runTrustCheck rethrow the underlying fetch error rather than folding it into a policy violation. The abbreviated-metadata age shortcut still swallows the error and falls back to per-version lookups. - The verification gate captures a thrown error per entry and rethrows the first after the fan-out settles, so concurrent siblings hitting the same dead registry do not raise unhandled rejections. A transport failure takes precedence over collected policy violations: the run never finished, so the batch is incomplete and the actionable failure is the transport error; a re-run surfaces any remaining violations once the registry is reachable. - Credential leak fixed at the source: `@pnpm/error`'s redactUrlCredentials strips user:pass@ userinfo from a URL in FetchError messages, and the npm resolver redacts the message, stack, and cause of META_FETCH_FAIL. It is a single forward scan, not a regex (the input is uncontrolled, so a backtracking pattern is a ReDoS vector), and it strips up to the last @ in the authority so a raw @ inside the password cannot leak its tail. pacquet parity: ResolutionVerification::FetchFailed is added (the runner aborts with it rather than collecting it as a violation); the gate aborts via VerifyError::RegistryMetaFetchFailed (ERR_PNPM_META_FETCH_FAIL), collect_resolution_policy_violations returns a Result, and the pnpr server maps the abort to a 502. The surfaced fetch error is credential-redacted. The TARBALL_URL_FETCH_FAILED code, its VerifyError variant and hint, and the pnpr-client interning are removed. Note: pacquet surfaces its existing fetch error under ERR_PNPM_META_FETCH_FAIL rather than pnpm's literal ERR_PNPM_FETCH_403 — pacquet's fetch errors do not use the per-status code scheme today, so aligning that globally is a separate effort. The behavior matches: abort with the registry's error, never a tampering label, no credential leak. Fixes #12489.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )