Repository navigation
[pull] main from pnpm:main - #461
Merged
Merged
Conversation
…10433) (#13112) A workspace dependency that deduped to `link:` on install could be rewritten to a peer-suffixed `file:` by any run that re-resolves it without deduping back to `link:` — e.g. `pnpm update <other-pkg>` (with or without --recursive), a root/catalog bump, or a plain install that hits a genuine peer-context divergence. When finalizing importer refs, keep the previous `link:` for a workspace dependency the run doesn't target: not new, specifier unchanged, and not matched by `pnpm update <name>`. `updateSpec` is intentionally excluded from the criterion because a plain install marks every manifest dependency with it. A workspace `link:` dependency has no version to update, so a run that doesn't target it must not flip it to `file:`; targeted dependencies still resolve freely. Adds regression tests for the update-recursive and plain-install paths (both fail without the fix) and ports the guard to the Rust package-manager crate. Completes the fix for #10433 — the first mechanism was fixed in #12800. --------- Co-authored-by: Zoltan Kochan <[email protected]>
…13497) The node/event budgets already scale with the document's byte length (#13485), but a ~100 MB lockfile still failed with "budget breached: ScalarBytes" at serde-saphyr's 64 MiB scalar-text default. Scale every size-proportional budget dimension (scalar bytes, comment bytes, reader input bytes) the same way: none of them can exceed the size of an input that is already in memory, so a valid lockfile can never trip them. The remaining defaults (aliases, anchors, depth, documents) bound YAML shapes the lockfile emitter never produces and stay as security caps. Add a regression test that parses a generated lockfile above the 64 MiB scalar budget.
When minimumReleaseAge filtered the current latest target, the fallback scanned mature releases across every major. A chronologically older but SemVer-greater release could therefore replace the registry's authoritative latest selection. Bound latest fallback candidates to versions at or below the original tag target in both resolver implementations. Leave the tag unset when no safe fallback exists, and keep pacquet's generic version-filter behavior unchanged for package-version guards. Closes #13034. --------- Co-authored-by: ychampion <[email protected]> Co-authored-by: Zoltan Kochan <[email protected]>
#13184) pnpm update wrote the new version of an `=`-pinned dependency back as the bare version, dropping the explicit operator (`=3.5.1` became `3.5.2`). The two spellings are the same semver range, but the `=` form marks the pin as deliberate, so the update should keep it. The save-style enum (formerly PinnedVersion) gains an `exact` variant and is renamed to RangeSpecStyle: it selects the operator a specifier is saved with, not a pin granularity. inferRangeSpecStyle (formerly whichVersionIsPinned) classifies a bare `=` before a full version as `exact` (partial `=1.0` / `=1` keep pinning like the plain version they prefix), and the specifier formatters emit `=` for it. A granularity projection (rangeSpecGranularity / RangeSpecStyle::granularity) collapses `exact` to `patch` for consumers that only care about range width, such as the save-workspace-protocol: rolling mapping, where an `=` pin maps to `workspace:*` like other exact pins. `@pnpm/types` keeps PinnedVersion as a deprecated alias and stays declaration-only; the shared helpers live in `@pnpm/pkg-manifest.utils`. save-prefix now accepts `=`, saving new dependencies as `=x.y.z`; --save-exact still wins and saves the bare version. Implemented in both the TypeScript CLI and the Rust port. Closes #13168 --------- Co-authored-by: Zoltan Kochan <[email protected]>
…#13498) Multiple contributors keep submitting parallel PRs for the same issue (e.g. #13114 was superseded by #13124 for issue #13108). GitHub already cross-links every PR that references an issue on the issue's timeline, so add a checklist item prompting authors to check those links before submitting.
…13499) Strengthen the duplicate-PR guidance to point at the issue's automatically linked PRs, add an AI-assisted contributions section (agents are welcome, but contributors own the output — check linked PRs, understand the change, run the tests, keep the diff focused, disclose agent authorship with the standard footer), and document that human review starts only after CodeRabbit approves and CI is green. CodeRabbit is the single required AI approval — Qodo ignores Dependabot/Renovate PRs, so a two-reviewer gate could never be satisfied for dependency updates; the PR template is aligned accordingly.
…13501) importer_direct_wanted_specs merged the manifest's dependency groups with devDependencies overriding dependencies, while the TypeScript CLI's filterDependenciesByType spreads {...dev, ...prod, ...optional}. For a name declared in both groups pacquet resolved the dev range but recorded the importer entry under dependencies with the prod specifier, producing a lockfile that fails its own up-to-date check (version doesn't satisfy range) and re-resolves on every install. Co-authored-by: Claude Fable 5 <[email protected]>
…13500) YAML caps a simple key at 1024 characters (the ':' must appear within that lookahead), and the parser enforces it — but the emitter wrote peer-suffixed snapshot keys of any length inline. A large workspace whose dep paths exceed the limit got a lockfile the engine could not re-read, so every subsequent install silently fell back to a full re-link. Port js-yaml's explicit-pair rule: keys whose rendered form exceeds 1024 characters are emitted as '? <key>' with the value on the following ': ' line, which round-trips and matches what the TypeScript CLI writes.
…importers (#13502) The peers-cache hit path replayed the cached walk's auto_install_resolved_peers, so a subtree first resolved under one importer handed the peer providers it bound to every importer sharing it. Combined with the owner-scope miss suppression, the sharing importer neither hoisted the peer from the workspace root nor bound it in its own context — it inherited the owner context's provider, even one the consumer's declared range rejects. pnpm's resolver gives a not-new package resolvedPeers: {} (resolveDependencies.ts), so only the walk that first resolves a subtree promotes its providers; match that by replaying no providers on a cache hit. In a bit.cloud workspace with 114 importers this halved peer-variant fanout: 25,534 -> 20,791 snapshots (TypeScript CLI: 20,219), with `@testing-library/[email protected]`-suffixed variants dropping from 535 to 43 (TypeScript: 41).
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 : )