Skip to content

feat(approve-builds): add --all flag to skip interactive prompts#10619

Merged
zkochan merged 1 commit intopnpm:mainfrom
thilllon:feat/approve-builds-all-flag
Feb 25, 2026
Merged

feat(approve-builds): add --all flag to skip interactive prompts#10619
zkochan merged 1 commit intopnpm:mainfrom
thilllon:feat/approve-builds-all-flag

Conversation

@thilllon
Copy link
Copy Markdown
Contributor

Summary

  • Added --all flag to pnpm approve-builds that approves all pending build dependencies at once without interactive selection
  • Useful for CI/CD pipelines and project bootstrapping scenarios (e.g., npm create nuxt@latest) where interactive prompts are not feasible

Closes #10136

Test plan

  • Added unit test: approve all builds with --all flag
  • Verified enquirer.prompt is not called when --all is passed
  • Verified all packages are written to pnpm-workspace.yaml with allowBuilds: true
  • Verified build artifacts are generated for all approved packages
  • All existing tests still pass

Note

🤖 This PR was generated with the assistance of an AI coding agent (Claude Code by Anthropic). All code changes have been reviewed and tested by the author.

🤖 Generated with Claude Code

@thilllon thilllon requested a review from zkochan as a code owner February 14, 2026 15:03
Copilot AI review requested due to automatic review settings February 14, 2026 15:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a --all flag to the pnpm approve-builds command to enable non-interactive approval of all pending build dependencies. This addresses issue #10136, which describes scenarios where interactive prompts are not feasible, such as CI/CD pipelines and project bootstrapping workflows (e.g., npm create nuxt@latest).

Changes:

  • Added --all boolean flag that bypasses both the package selection prompt and confirmation prompt
  • All pending build dependencies are automatically approved and set to allowBuilds: true when the flag is used
  • Comprehensive unit test verifying the flag's behavior and non-interactive operation

Reviewed changes

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

File Description
exec/build-commands/src/approveBuilds.ts Added --all flag support including CLI option registration, help text, type definition, and conditional logic to skip prompts when flag is present
exec/build-commands/test/approveBuilds.test.ts Added comprehensive test case verifying --all flag approves all packages without prompting and generates build artifacts
.changeset/approve-builds-all-flag.md Added changeset documenting the new minor feature

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

@thilllon thilllon force-pushed the feat/approve-builds-all-flag branch 2 times, most recently from 364bb72 to f36c4e0 Compare February 14, 2026 18:08
Allow approving all pending build dependencies at once without
interactive selection, useful for CI/CD pipelines and project
bootstrapping scenarios where interactive prompts are not feasible.

Closes pnpm#10136

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@thilllon thilllon force-pushed the feat/approve-builds-all-flag branch from f36c4e0 to 9afda39 Compare February 14, 2026 18:15
@zkochan zkochan merged commit 2e8816e into pnpm:main Feb 25, 2026
10 checks passed
@welcome
Copy link
Copy Markdown

welcome bot commented Feb 25, 2026

Congrats on merging your first pull request! 🎉🎉🎉

@tats-u
Copy link
Copy Markdown

tats-u commented Mar 8, 2026

Can we backport this to 10.x?

zkochan pushed a commit that referenced this pull request Mar 8, 2026
)

Allow approving all pending build dependencies at once without
interactive selection, useful for CI/CD pipelines and project
bootstrapping scenarios where interactive prompts are not feasible.

close #10136
@zkochan
Copy link
Copy Markdown
Member

zkochan commented Mar 8, 2026

ok 39aa198

@tats-u
Copy link
Copy Markdown

tats-u commented Mar 8, 2026

That was quick. Thank you.

@thilllon thilllon deleted the feat/approve-builds-all-flag branch March 15, 2026 05:35
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.

--allow-all-builds flag

4 participants