-
Notifications
You must be signed in to change notification settings - Fork 3
Fix remaining pnpm 11 audit handling #102
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ac1ab08
Fix pnpm 11 audit commands
miguelcalderon d238eca
Address pnpm 11 review feedback
miguelcalderon 9768272
Finish the pnpm 11 migration and stop implicit installs
miguelcalderon c38b23d
Address pnpm workflow review feedback
miguelcalderon 58d7ca5
Apply release age policy to pnpm examples
miguelcalderon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| npm run lint-staged | ||
| npm run check-biome-version | ||
| pnpm run lint-staged | ||
| pnpm run check-biome-version | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| minimumReleaseAge: 0 | ||
|
|
||
| allowBuilds: | ||
| esbuild: true | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| minimumReleaseAge: 0 | ||
|
|
||
| allowBuilds: | ||
| esbuild: true | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| packages: | ||
| - "." | ||
|
miguelcalderon marked this conversation as resolved.
|
||
|
|
||
| # pnpm 11 defaults verify-deps-before-run to "install", which would run a | ||
| # networked install from `pnpm run` (the pre-commit hook included) whenever | ||
| # node_modules is out of date. Warn instead so scripts never mutate the tree. | ||
| verifyDepsBeforeRun: warn | ||
|
|
||
| allowBuilds: | ||
| "@biomejs/biome": true | ||
|
miguelcalderon marked this conversation as resolved.
|
||
|
|
||
| onlyBuiltDependencies: | ||
| - "@biomejs/biome" | ||
|
miguelcalderon marked this conversation as resolved.
|
||
|
|
||
| overrides: | ||
| "ajv": "^8.18.0" | ||
| "http-proxy-middleware": "^2.0.10" | ||
| "on-headers": "^1.1.0" | ||
| "node-forge": "^1.4.0" | ||
| "qs": "^6.15.1" | ||
| "shell-quote": "^1.9.0" | ||
| "fast-uri": "^3.1.4" | ||
| "picomatch": "^2.3.2" | ||
| "path-to-regexp": "^0.1.13" | ||
| "ws": "^8.21.0" | ||
| "websocket-driver": "^0.7.5" | ||
| "uuid": "^11.1.1" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| #!/bin/bash | ||
|
|
||
| # These helpers back scripts that run npm inside the npm-based examples below | ||
| # the root pnpm pin. Corepack applies that pin to every directory under the | ||
| # root and, with its strict npm shim enabled, would reject those npm calls. | ||
| export COREPACK_ENABLE_STRICT=0 | ||
|
|
||
| # pnpm 11 applies its minimum release age to every lockfile entry during | ||
| # install, not only while resolving new versions. All scripts must use the same | ||
| # policy so a lockfile written by the audit or update script remains installable | ||
| # in CI. The opt-out also avoids tracked minimumReleaseAgeExclude entries. | ||
| export pnpm_config_minimum_release_age=0 | ||
|
|
||
| require_local_pnpm_workspace() { | ||
| local example="${1:-The current directory}" | ||
|
|
||
| if [ ! -f "pnpm-workspace.yaml" ]; then | ||
| echo "${example} has a pnpm-lock.yaml but no sibling pnpm-workspace.yaml; refusing to use an ancestor workspace." >&2 | ||
| return 1 | ||
| fi | ||
| } | ||
|
|
||
| run_pnpm_command_quietly() { | ||
| local output | ||
| local status=0 | ||
|
|
||
| output=$(pnpm "$@" 2>&1) || status=$? | ||
| if (( status != 0 )); then | ||
| printf '%s\n' "$output" >&2 | ||
| return "$status" | ||
| fi | ||
| if [ -n "$output" ]; then | ||
| printf '%s\n' "$output" | ||
| fi | ||
| } | ||
|
miguelcalderon marked this conversation as resolved.
|
||
|
|
||
| run_pnpm_audit_fix() { | ||
| # A successful fix exits zero even when the initial audit found advisories. | ||
| # Preserve every real pnpm failure instead of hiding bad flags, registry | ||
| # failures, or an unwritable workspace file. | ||
| run_pnpm_command_quietly audit --fix=override --ignore-registry-errors | ||
| } | ||
|
|
||
| run_pnpm_install_quietly() { | ||
| # pnpm 11 fails when it encounters an unapproved dependency build. Keep the | ||
| # successful output quiet, but print the complete failure before propagating it. | ||
| run_pnpm_command_quietly install "$@" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.