test(registry): mirror @pnpm.e2e/* tier-1 fixtures#424
Conversation
Mirror 24 @pnpm.e2e/* fixture packages (40 tarballs) into the committed Verdaccio storage so Tier 1 bats tests run fully offline. Sourced from pnpm/registry-mock — these are not published to npmjs.org, so the in-tree procedure (proxy: npmjs uplink) does not apply. Booted a Verdaccio against pnpm/registry-mock's prepublish config, npm-published only the fixtures we need, then copied the resulting storage dirs over. with-same-file-in-different-cases: rebuilt the tarball in-memory by streaming both Foo.js + foo.js straight from git blobs (a plain checkout collapses the pair on macOS APFS), then patched the packument shasum/integrity to the new hashes. Verified offline: every packument 200s, every tarball serves byte-identical to disk, and (shasum, integrity) match across all 40 (package, version) pairs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR adds 24 All SHA-1 checksums in Confidence Score: 5/5Safe to merge — pure test fixture addition with all checksums verified correct All 40 tarballs have SHA-1 checksums that match the values recorded in their respective packument JSON files. The patched with-same-file-in-different-cases tarball correctly contains both Foo.js and foo.js, and its SHA-512 integrity value matches. No production code was changed. The Verdaccio config is unchanged and consistent with the existing offline-storage pattern. No files require special attention Important Files Changed
Reviews (1): Last reviewed commit: "test(registry): mirror @pnpm.e2e/* tier-..." | Re-trigger Greptile |
Now that the @pnpm.e2e/* fixtures landed in test/registry/storage/ (via #424), three previously-skipped misc.ts ports become viable: - bin-on-PATH-in-root-postinstall (line 36) - run-script-invokes-dep-bin (line 219) - case-only-filename-collision-installs-cleanly (line 163) The case-collision port deliberately skips pnpm's StoreIndex-internal assertions (those probe pnpm-specific CAS internals) and instead asserts the user-visible parity guarantee: install succeeds and the package materializes under node_modules. Brings the misc.ts port to 8/37. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Now that the @pnpm.e2e/* fixtures landed in test/registry/storage/ (via #424), three previously-skipped misc.ts ports become viable: - bin-on-PATH-in-root-postinstall (line 36) - run-script-invokes-dep-bin (line 219) - case-only-filename-collision-installs-cleanly (line 163) The case-collision port deliberately skips pnpm's StoreIndex-internal assertions (those probe pnpm-specific CAS internals) and instead asserts the user-visible parity guarantee: install succeeds and the package materializes under node_modules. Brings the misc.ts port to 8/37. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Benchmark changesVersions:
Public ratios: warm installs vs Bun 3x -> 3x; warm installs vs pnpm 9x -> 7x.
6718563 vs 6a7c44a | aube/bun/pnpm | 3 scenarios | 3 runs | 500mbit/50ms | generated by Codex. |
## Summary - Check off Phase 0 — `@pnpm.e2e/*` fixtures ([#424](#424)) and `add_dist_tag` helper ([#422](#422)) both landed. - Record `lifecycleScripts.ts` 8/21 ported via [#421](#421) with a done/remaining split. - Relabel Phase 2 as unblocked (was "depends on add_dist_tag helper"). - Refresh the conventions note now that the `@pnpm.e2e/*` fixtures are in-tree. ## Test plan - [ ] doc-only — render check on GitHub 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Documentation-only updates to the pnpm test-import tracking doc; no runtime or test behavior changes. > > **Overview** > Updates `test/PNPM_TEST_IMPORT.md` to mark Phase 0 infrastructure work as complete (mirrored `@pnpm.e2e/*` fixtures and the `add_dist_tag` helper), and records current Tier 1 progress for `lifecycleScripts.ts` (8/21 ported with done/remaining notes). > > Renames Phase 2 as *unblocked* now that `add_dist_tag` exists, and refreshes the translation conventions to prefer using the in-tree `@pnpm.e2e/*` fixtures when specific package shapes are required. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 270cfc9. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Mirrors 24
@pnpm.e2e/*fixture packages (40 tarballs) into the committed Verdaccio storage attest/registry/storage/@pnpm.e2e/so Tier 1 bats tests run fully offline.Why the in-tree procedure didn't apply
test/registry/config.yaml documents an
proxy: npmjsuplink as the way to add new fixtures. That doesn't work for these — only 3@pnpm.e2e/*packages are published to npmjs.org (has-postinstall,testing-provenance2,xxx.has-bundled); none of the 24 we need are reachable. The fixtures live in pnpm/registry-mock as sources that getnpm publish-ed into Verdaccio at build time.How
pnpm/registry-mock.prepublish-config.yamlVerdaccio (storage: ./registry/storage-cache).npm publish-ed each via a token-bearingNPM_CONFIG_USERCONFIGnpmrc.@pnpm.e2e/*directories intotest/registry/storage/@pnpm.e2e/.Special case:
with-same-file-in-different-casesThis fixture ships both
Foo.jsandfoo.js. macOS APFS collapses the pair on git checkout, so the published tarball was missingFoo.js. Rebuilt the tarball in-memory by streaming both blobs straight from git via Python'starfile, then patched the packument'sdist.shasum/dist.integrity/_attachments[…].shasumto the new hashes. Verified the served tarball listspackage/Foo.js,package/foo.js,package/package.json.Verification
With
verdaccio --config test/registry/config.yaml --listen 4873(no uplink, fully offline):Notes for reviewer
config.yamlis unchangedconfig.yamlare still correct for any future fixture that is on npmjs.org; this PR doesn't update them, since the@pnpm.e2ecase is a one-offabc*,peer-{a,b,c},pkg-with-1-dep, install-script / pre/post-install variants,support-different-architectures, the case-conflict edge case, etc.Test plan
mise run test:batsTier 1 suite passes with this storage and no networktar -tzf test/registry/storage/@pnpm.e2e/with-same-file-in-different-cases/with-same-file-in-different-cases-1.0.0.tgzlists bothFoo.jsandfoo.js🤖 Generated with Claude Code
Note
Low Risk
Low risk: adds committed test fixtures only (Verdaccio packuments/tarball metadata) without changing production code, but increases repo/test-registry data and could break offline tests if any hashes/attachments are incorrect.
Overview
Mirrors a set of
@pnpm.e2e/*tier-1 fixture packages into the committed Verdaccio storage undertest/registry/storage/@pnpm.e2e/so integration tests can run fully offline.Adds the corresponding packuments (version metadata, dist tags, and tarball hash references) for fixtures covering peer-deps, optional deps, lifecycle scripts, plugin/bin packages, architecture-specific optionals, and the case-sensitive filename edge case (
with-same-file-in-different-cases).Reviewed by Cursor Bugbot for commit 6718563. Bugbot is set up for automated code reviews on this repo. Configure here.