Conversation
Translates the single test in `pnpm/test/install/preferOffline.ts` — `--prefer-offline` reuses cached packument metadata even when the registry has published a newer dist-tag since the cache was populated. Substitution note: pnpm's overloaded `pnpm install <pkg>` becomes a manifest-declared `"@pnpm.e2e/foo": "latest"` + bare `aube install`, so the second install's resolution is sourced from the cached packument's `dist-tags.latest` — same regression guard. The TODO previously called this out as "3 dist-tag uses"; in fact the file holds 1 test with 2 `addDistTag` calls. Updated the entry. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Greptile SummaryPorts the single Confidence Score: 5/5Safe to merge — clean test port with no production code changes and correct teardown hygiene. Both changed files are test/documentation only. The new BATS file faithfully matches the serial+teardown pattern used by existing tests, the fixture file exists, and the tracking doc correction is accurate. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "test: port pnpm preferOffline.ts (1/1)" | Re-trigger Greptile |
Benchmark changesPublic ratios: warm installs vs Bun 5x -> 9x; warm installs vs pnpm 6x -> 13x.
dce0e65 vs 0a3a22e | aube/bun/pnpm | 3 scenarios | 3 runs | 500mbit/50ms | generated by Codex. |
Summary
pnpm/test/install/preferOffline.tsto test/pnpm_install_preferOffline.bats —--prefer-offlinereuses cached packument metadata even when the registry has published a newer dist-tag since the cache was populated.addDistTagcalls — updated.Translation notes
pnpm install <pkg>becomes a manifest-declared"@pnpm.e2e/foo": "latest"+ bareaube install, so the second install's resolution is sourced from the cached packument'sdist-tags.latest. Same regression guard pnpm tests.# bats file_tags=serial+BATS_NO_PARALLELIZE_WITHIN_FILE=1because it mutatesdist-tagson the committed Verdaccio storage; teardown restores viagit checkout— same pattern as test/pnpm_update.bats and test/deprecate.bats.@pnpm.e2e/foo100.0.0 + 100.1.0) was already mirrored from earlier Tier 1 work, no new fixtures needed.Test plan
cargo build(debug) succeedsAUBE_TEST_REGISTRY=http://localhost:4873 ./test/bats/bin/bats test/pnpm_install_preferOffline.bats→1..1 / ok 1git statusclean post-test)🤖 Generated with Claude Code
Note
Low Risk
Low risk: adds a new serial Bats test and updates test-tracking docs, with no production code or behavior changes.
Overview
Adds a new Bats port of pnpm’s
install/preferOfflinetest to verifyaube install --prefer-offlineuses cached packument metadata even if the registry’slatestdist-tag changes between installs (usingadd_dist_tag, and restoring Verdaccio fixture state in teardown).Updates
test/PNPM_TEST_IMPORT.mdto mark thepreferOffline.tsport as complete and corrects the noted test/dist-tag counts.Reviewed by Cursor Bugbot for commit dce0e65. Bugbot is set up for automated code reviews on this repo. Configure here.