Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
1 task done
Covers the peer/child decision requested in pnpm/tasks#221 and lists its additive alternative.
Covers the specifiers field that pnpm/pnpm#17477 adds to lockfile 9.0 as an optional field.
5 tasks done
Replaces the suffix keys of the first draft. A reference names a version, and the parent's context determines the variant. The earlier designs stay as alternatives.
A prototype of the format reads and writes 170 of 173 real lockfiles exactly. It showed that the referrer's scope does not always select a variant, that transitive peers bound from anywhere in the graph are not part of a package's identity, and that rebuilding nested peer suffixes needs the scope above a snapshot. The RFC now describes references that keep peer groups, the missingPeerDependencies list, how providers are found, the current lockfile, and the measured results. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 tasks done
Member
Author
|
The prototype described under "Prototype results" is open as a draft: pnpm/pnpm#17886. It is opt-in, behind Written by an agent (Claude Code, claude-opus-5-5). |
One entry per package holds the metadata, the resolved dependencies, and the peer bindings, named peers, transitivePeers, and missingPeers. A package with several variants writes what they share once. The prototype results are updated: the 5,623-snapshot lockfile is 61% of today's bytes, and both formats parse in parallel chunks. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Such an entry can only come from a hand-written or broken lockfile. The one the prototype seemed to find was an artifact of an earlier version of its merge code. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… implementation for pnpm v13 `variants` is the name of the list inside a `type: variations` resolution, where it means the platform builds of a package. Each item of the renamed list is one snapshot of the package, which is what today's `snapshots` section records for one set of peers. The results section now shows where the prototype's time goes, split into the stages the format needs and the stages only the conversion needs, and says that the native numbers are a sum of those stages, not a measurement. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A peer's entry is its range, or a map of `specifier` and `optional` when `package.json` marks the peer optional. The only thing `peerDependenciesMeta` ever held was that flag. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…apshot Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…n follows from it Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The patch hash lives in `patchedDependencies` alone, and a reference the referrer's scope does not select names its snapshot by its peer bindings. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Proposes the next lockfile format.
packageshas one entry per package, keyed byname@version, holding its metadata, its resolved dependencies, and its peer bindings as properties:peersfor the package's own,transitivePeersfor those bound below it. There is nosnapshotssection, and no key or reference carries a peer or patch group: the patch hash lives inpatchedDependencies, and a reference the referrer's scope does not select names its snapshot by its peer bindings.peerDependenciesMetais folded intopeerDependencies: an optional peer is{specifier: '*', optional: true}on one line. An importer's dependency is its specifier alone when the version follows from it, and{specifier, version}on one line otherwise. A package installed with several sets of peers has one snapshot per set. The entry writes what the snapshots share once and lists what differs undersnapshots. A reference names a version, and the referrer's bindings select the snapshot; where they can't, the reference keeps its peer groups.The RFC also requires every directory package's entry to record
specifiers, the field pnpm/pnpm#17477 adds to lockfile 9.0 as optional.It fixes these problems:
optionalDependencies, as if the package declared an optional dependency.dependencieswhether a parent provided it or the package's own dependency was installed (Decide peer recording from one function, and test reuse against fresh resolution through the real lockfile writer tasks#221).transitivePeerDependencieslists resolved and missing peers together.A prototype in pnpm v12 (pnpm/pnpm#17886), behind a
lockfile.format: nextsetting, reads and writes 170 of 173 real lockfiles exactly. A 5,623-snapshot lockfile goes from 4.40 MB to 2.20 MB and from 99,955 lines to 58,186, and areactbump changes 58 lines instead of 142. On a 237-project workspace, installs are within noise of today's format except regenerating a deletedpnpm-lock.yaml, which pays the prototype's write cost (+6 to +12 ms). The "Prototype results" section has the numbers and what the design had to change: references keep their peer groups where the referrer's scope doesn't predict the snapshot, and peers bound from anywhere in the graph go inmissingPeers. The section also splits the prototype's time into the stages the format needs and the stages only its conversion needs, as an estimate for the native implementation planned for pnpm v13.The earlier drafts, which kept the suffix keys, and the designs considered on the way (ordinal ids, grouping by suffix, keys by peer names) are listed as alternatives with the reasons they fall short. The
lockfileVersionnumber is left open, given the decision recorded in #68.Written by an agent (Claude Code, claude-fable-5-1).
🤖 Generated with Claude Code