Skip to content

chore: compile pnpm CLI bundle before tests that use it#11059

Merged
zkochan merged 1 commit into
mainfrom
compile-cli-before-tests
Mar 22, 2026
Merged

chore: compile pnpm CLI bundle before tests that use it#11059
zkochan merged 1 commit into
mainfrom
compile-cli-before-tests

Conversation

@zkochan

@zkochan zkochan commented Mar 22, 2026

Copy link
Copy Markdown
Member

Summary

  • Packages whose tests spawn the local pnpm CLI (pnpm/bin/pnpm.mjs) need the bundle (pnpm/dist/pnpm.mjs) to exist. This adds pnpm --filter pnpm run compile to their test scripts so the bundle is built before tests run.
  • Updated meta-updater to maintain this for the 8 public packages, and directly edited @pnpm/test-ipc-server (private/util, skipped by meta-updater).

Affected packages:
@pnpm/building.commands, @pnpm/cache.commands, @pnpm/deps.inspection.commands, @pnpm/exec.commands, @pnpm/lockfile.make-dedicated-lockfile, @pnpm/releasing.commands, @pnpm/releasing.exportable-manifest, @pnpm/store.commands, @pnpm/test-ipc-server

Test plan

  • Run pnpm run meta-updater --test — confirms meta-updater produces the expected output
  • Run pnpm --filter @pnpm/cache.commands test (or any affected package) — verifies the CLI bundle is compiled before tests

🤖 Generated with Claude Code

Packages whose tests spawn the local pnpm CLI (pnpm/bin/pnpm.mjs) need
the bundle (pnpm/dist/pnpm.mjs) to exist. Add `pnpm --filter pnpm run
compile` to their test scripts so the bundle is built before tests run.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 22, 2026 01:20

Copilot AI 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.

Pull request overview

Ensures packages whose tests invoke the workspace pnpm CLI (pnpm/bin/pnpm.mjs) build the bundled CLI output (pnpm/dist/pnpm.mjs) before running tests, so package-level pnpm test works in isolation.

Changes:

  • Updated affected packages’ test scripts to compile the pnpm CLI bundle before running .test/jest.
  • Taught .meta-updater to keep those test scripts in sync for the 8 public packages.
  • Updated @pnpm/test-ipc-server (private util) manually to do the same.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
store/commands/package.json Prepends pnpm CLI compile to test script before running .test.
releasing/exportable-manifest/package.json Prepends pnpm CLI compile to test script before running .test.
releasing/commands/package.json Prepends pnpm CLI compile to test script before running .test.
lockfile/make-dedicated-lockfile/package.json Prepends pnpm CLI compile to test script before running .test.
exec/commands/package.json Prepends pnpm CLI compile to test script before running .test.
deps/inspection/commands/package.json Prepends pnpm CLI compile to test script before running .test.
cache/commands/package.json Prepends pnpm CLI compile to test script before running .test.
building/commands/package.json Prepends pnpm CLI compile to test script before running .test.
utils/test-ipc-server/package.json Prepends pnpm CLI compile to test script before running jest.
.meta-updater/src/index.ts Adds a maintained package set that gets the augmented test script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zkochan zkochan merged commit 421ceac into main Mar 22, 2026
16 checks passed
@zkochan zkochan deleted the compile-cli-before-tests branch March 22, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants