Repository navigation
feat(stats-generator): count transitive first-party dependencies - #1003
Conversation
| z.number().int().nonnegative(), | ||
| ), | ||
| // Optional because older results were recorded before it existed. | ||
| firstPartyTransitive: createValueWithUnit( |
There was a problem hiding this comment.
These don't need to be optional; you can backfill in this PR by running the benchmark.
We keep snapshots of the deps in each result version.
|
@maksimgm Could we have one function in pnpm-lockfile.ts that counts transitive deps? Starter could pass just the lockfile, and core and first-party could pass a second argument to pick which packages to start from. That keeps the counting logic and its tests in one place. |
118b40e to
21a8923
Compare
|
done, it's one the fields are required and backfilled in each pr. the result versions keep the starter package.json but not the lockfile, so for older versions i regenerated one with #1004 and #1005 are rebuilt on top of this and the new core-dependencies layout |
ab54090 to
ec22bcd
Compare
ec22bcd to
87caf22
Compare
part of #997, the first-party one. core (#1004) and starter (#1005) are their own prs on top of this
adds
countTransitiveDependencies(lockfile, roots?)inutils/pnpm-lockfile.ts: walks the starter lockfile from the given direct deps (all of them by default) and counts every package version they pull in, not counting the roots. first-party passes its manifest's deps and stores it asfirstPartyTransitivethe field is required, and every saved result is backfilled. versions that match the current starter use the committed lockfile; older ones use a lockfile regenerated from the saved starter package.json with
pnpm install --lockfile-only