Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure strict-dep-builds to fail on pnpm v10 ignored build scripts #490

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

karlhorky
Copy link
Member

@karlhorky karlhorky commented Feb 11, 2025

pnpm v10 blocks lifecycle scripts by default, which can lead to hard-to-debug problems:

$ pnpm install

...

╭ Warning ───────────────────────────────────────────────────────────────────────────────────╮
│                                                                                            │
│   Ignored build scripts: bcrypt.                                                           │
│   Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts.   │
│                                                                                            │
╰────────────────────────────────────────────────────────────────────────────────────────────╯

# Warning message above, student may ignore this (exit code 0)

$ pnpm build

...

Cannot find module '.../bcrypt_lib.node'

Configure the new pnpm v10.3.0 strict-dep-builds setting to fail with a non-zero exit code when any build scripts for dependencies have been ignored, in order to surface problems in CI before they occur:

$ pnpm install

...

 ERR_PNPM_IGNORED_BUILDS  Ignored build scripts: esbuild

Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts.

# Error message above is more visually prominent and fails on CI (non-zero exit code)

Verified

This commit was signed with the committer’s verified signature.
karlhorky Karl Horky

Verified

This commit was signed with the committer’s verified signature.
karlhorky Karl Horky
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@karlhorky karlhorky merged commit 2da1fe0 into main Feb 11, 2025
4 checks passed
@karlhorky karlhorky deleted the configure-strict-dep-builds-for-pnpm-v10 branch February 11, 2025 10:04
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.

None yet

1 participant