Skip to content

ci: allow pnpm builds through env instead of a per-install flag - #305

Merged
Kikobeats merged 1 commit into
masterfrom
Kikobeats/pnpm-build-env
Oct 28, 2026
Merged

Kikobeats merged 1 commit into
masterfrom
Kikobeats/pnpm-build-env

Conversation

@Kikobeats

@Kikobeats Kikobeats commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Why

Each workflow allowed dependency build scripts by passing --dangerously-allow-all-builds to every pnpm install. That flag was repeated on each install line, and pnpm/action-setup's run_install can't pass it at all. That's how whoops' release broke when pnpm latest moved to v12.15.0 (ERR_PNPM_IGNORED_BUILDS).

What changed

  • Every pnpm install --dangerously-allow-all-builds is now a plain pnpm install.

  • Each workflow that installed with pnpm sets these once in its top-level env::

    env:
      pnpm_config_dangerously_allow_all_builds: true
      SKIP_INSTALL_SIMPLE_GIT_HOOKS: true

    An existing top-level env: keeps its keys, and only the missing ones are added.

How it was tested

  • I installed whoops on my machine with both pnpm 12.15.0 and 11.28.9. A plain pnpm install fails on both. With pnpm_config_dangerously_allow_all_builds=true in the environment it exits 0, and spawn-sync's build script runs.
  • One codemod made the edit in every file. It errors if any flag remains. On splashy's benchmark.yml its output matches the benchmark workflow generator exactly.
  • actionlint reports the same findings before and after for each changed file, so this change adds none.

🤖 Generated with Claude Code


Note

Low Risk
CI-only configuration change with equivalent install behavior; no application or runtime code is touched.

Overview
CI workflows no longer pass --dangerously-allow-all-builds on each pnpm install. Instead, benchmark.yml, main.yml, and pull_request.yml set pnpm_config_dangerously_allow_all_builds: true once in top-level env: (benchmark also adds SKIP_INSTALL_SIMPLE_GIT_HOOKS there). Install steps are plain pnpm install, matching pnpm 12.15+ behavior when build scripts would otherwise be skipped (ERR_PNPM_IGNORED_BUILDS).

Reviewed by Cursor Bugbot for commit c572f21. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Chores
    • Updated automated benchmark, release, and pull request workflows to configure package installation consistently.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9d9f71d6-7989-4181-a56e-ef3794d9e7c6
Commits

Reviewing files that changed from the base of the PR and between 669d6ba and c572f21.

Files selected for processing: 3
  • .github/workflows/benchmark.yml
  • .github/workflows/main.yml
  • .github/workflows/pull_request.yml

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

Walkthrough

The benchmark, main, and pull-request workflows now set pnpm_config_dangerously_allow_all_builds: true in the environment and remove --dangerously-allow-all-builds from install commands. The benchmark workflow also configures skipping simple Git hook installation.

Changes: CI pnpm configuration

Layer / File(s) Summary
Workflow install configuration
.github/workflows/benchmark.yml, .github/workflows/main.yml, .github/workflows/pull_request.yml
The workflows set pnpm’s build allowance through environment variables. Their install commands no longer pass the build allowance flag. The benchmark workflow also sets an environment variable to skip simple Git hook installation.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Refactor

Possibly related PRs

Merge Risk: Minimal · up to c572f

The workflows preserve pnpm’s build allowance without a merge-blocking behavior identified.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: configuring pnpm build permissions through an environment variable instead of an install flag.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (3 skipped: 3 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

html-get

Details
Benchmark suite Current: c572f21 Previous: 669d6ba Ratio
html rewriteUrls off 182.6 ms (176.6-185) 175.8 ms (174.4-180.7) 1.04
html rewriteUrls on 266.1 ms (251.3-277.9) 267.1 ms (250.3-269.2) 1.00
pdf extract 160 ms (153-162.2) 157.9 ms (154.4-158.9) 1.01
cold require 350.2 ms (348-355.3) 351.6 ms (340.2-358.9) 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@Kikobeats
Kikobeats merged commit 567a853 into master Oct 28, 2026
4 of 5 checks passed
@Kikobeats
Kikobeats deleted the Kikobeats/pnpm-build-env branch October 28, 2026 11:28
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.

1 participant