Skip to content

test(install): update pm ls and prune snapshots to the new count wording - #40052

Closed
robobun wants to merge 1 commit into
mainfrom
farm/e5b9d0ea/fix-pm-ls-prune-snapshots
Closed

robobun wants to merge 1 commit into
mainfrom
farm/e5b9d0ea/fix-pm-ls-prune-snapshots

Conversation

@robobun

@robobun robobun commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Problem

Fix

Background

  • bun pm ls prints a header line <dir> node_modules (N installed) followed by a tree of the installed packages. N counts node_modules entries.
  • bun prune ends with N packages removed (checked M installed packages). M counts the installed entries it compared against the lockfile.
  • pm: polish dedupe, prune, pm ls and pm licenses output #38952 named the unit in each count so the numbers from dedupe (lockfile entries), prune (installed entries) and pm ls (tree positions) no longer look contradictory.
Notes

#38952 renamed the summary counts: `bun pm ls` prints
`node_modules (N installed)` and `bun prune` prints
`(checked N installed packages)`. Four inline snapshots that landed
in parallel (#39962, #39157) still expect the old text and fail on
every lane.
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Your included review limit has been reached.

You’re in a promotional period — use the checkbox below to run this review for free:

  • Run review for free

On-demand reviews are free for the next 29 days. After that, they cost $0.25 per reviewed file.

How can I continue?

Run this review now using the option above, or comment @coderabbitai review --use-credits.

You can also wait for the limit to reset (next review available in 2 minutes), then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6e2d2d56-e584-4b51-93ac-1635567f28d2

📥 Commits

Reviewing files that changed from the base of the PR and between 299bc9a and a15d445.

📒 Files selected for processing (2)
  • test/cli/install/bun-pm.test.ts
  • test/cli/install/bun-prune.test.ts

Comment @coderabbitai help to get the list of available commands.

@robobun

robobun commented Aug 22, 2026 •

Copy link
Copy Markdown
Collaborator Author
Updated 12:17 AM PT - Aug 22nd, 2026

❌ @robobun, your commit a15d445 has 1 failures in Build #103315 (All Failures):


🧪   To try this PR locally:

bunx bun-pr 40052

That installs a local version of the PR into your bun-40052 executable, so you can run:

bun-40052 --bun

@robobun

robobun commented Aug 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Status: closed, superseded by #40062.

#40062 merged at 08:10Z with the same four snapshot updates (test/cli/install/bun-pm.test.ts, test/cli/install/bun-prune.test.ts). The file contents on main match this branch byte for byte. Main build 103418 (0da5351) no longer fails either file.

Culprit merge: #38952 (new count wording). Stale snapshots came from #39962 and #39157.

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — mechanical snapshot updates to match the wording #38952 already ships.

What was reviewed:

  • Verified src/runtime/cli/package_manager_command.rs:639 emits node_modules ({} installed) and src/install/prune.rs:336,359 emit (checked {} installed package{}) — the four updated snapshots match the source exactly.
  • Confirmed every other bun-prune.test.ts snapshot already uses installed packages; these four were the only stale ones.
  • Checked the remaining (checked N) hits in bun-audit.test.ts come from audit_fix.rs, which #38952 did not touch — correctly left alone.
Extended reasoning...

Overview

This PR updates four toMatchInlineSnapshot literals across two test files (test/cli/install/bun-pm.test.ts lines 603/625/673 and test/cli/install/bun-prune.test.ts line 661) to reflect the count-wording change that landed in #38952. The change is purely additive text inside snapshot strings: (5) → (5 installed) and (checked 5) → (checked 5 installed packages). No source code, test logic, or assertion structure changes.

Security risks

None. Test-only snapshot text edits with no runtime, build, or dependency impact.

Level of scrutiny

Low. This is a merge-race snapshot fixup: #38952 changed the summary wording and updated the snapshots it knew about, but #39962 and #39157 landed concurrently with the old wording. I verified against the current source that package_manager_command.rs:639 prints node_modules ({} installed) and prune.rs:336/359 print (checked {} installed package{}), so the new snapshots are byte-accurate to what the binary emits. All neighboring snapshots in bun-prune.test.ts already use the new wording, and the PR's grep of remaining old-form matches (only bun-audit.test.ts, which belongs to audit_fix.rs — unchanged by #38952) checks out.

Other factors

The tests still assert full output line-by-line, so no coverage is weakened. The PR description documents bun bd test runs on both files plus the other files #38952 touched. The head commit is already on main per the recent-commits list, and no prior reviewer has left outstanding comments.

@robobun

robobun commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #40062 (merged as 0da5351). It carries the same four snapshot updates, so main is green for these files again. Closing.

@robobun robobun closed this Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant