-
Notifications
You must be signed in to change notification settings - Fork 2
chore: harden pnpm installs #32
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
7 commits
Select commit
Hold shift + click to select a range
dba3d63
chore: harden pnpm installs
0xJem 70a34e3
chore: pin pnpm version in workflows
0xJem 4c48daf
chore: fix pnpm audit findings
0xJem c7cbbb4
chore: fix pnpm audit findings
0xJem a076bb4
chore: fix pnpm audit findings
0xJem 14223f0
chore: harden pnpm configuration
0xJem a50599c
chore: move pnpm config to workspace
0xJem 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,4 +64,6 @@ typings/ | |
| build | ||
|
|
||
| # Test build files | ||
| tests/.bin/ | ||
| tests/.bin/ | ||
|
|
||
| .pnpm-store/ | ||
This file was deleted.
Oops, something went wrong.
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 |
|---|---|---|
|
|
@@ -33,64 +33,11 @@ | |
| "prettier": "^2.6.2", | ||
| "typescript": "^4.6.4" | ||
| }, | ||
| "packageManager": "[email protected]", | ||
| "engines": { | ||
| "node": ">=24", | ||
| "pnpm": "10.33.0", | ||
| "pnpm": ">=10.33.0", | ||
| "npm": "use-pnpm", | ||
| "yarn": "use-pnpm" | ||
| }, | ||
| "pnpm": { | ||
| "overrides": { | ||
| "ajv": "6.14.0", | ||
| "axios": ">=1.15.0", | ||
| "brace-expansion": ">=1.1.13", | ||
| "braces": ">=3.0.3", | ||
| "cross-spawn": ">=7.0.5", | ||
| "ejs": ">=3.1.10", | ||
| "flatted": ">=3.4.2", | ||
| "follow-redirects": ">=1.15.6", | ||
| "glob": ">=11.1.0", | ||
| "immutable": ">=5.1.5", | ||
| "js-yaml": ">=4.1.1", | ||
| "lodash.trim": "4.18.0", | ||
| "lodash.trimend": "4.18.0", | ||
| "micromatch": ">=4.0.8", | ||
| "minimatch": ">=3.1.4", | ||
| "picomatch": ">=2.3.2", | ||
| "semver": ">=7.5.2", | ||
| "undici": ">=7.24.0", | ||
| "word-wrap": ">=1.2.4", | ||
| "yaml": ">=2.8.3", | ||
| "ajv@<6.14.0": "6.14.0", | ||
| "axios@<0.30.0": ">=0.30.0", | ||
| "axios@<=0.30.2": ">=0.30.3", | ||
| "axios@>=0.8.1 <0.28.0": ">=0.28.0", | ||
| "brace-expansion@<1.1.13": ">=1.1.13", | ||
| "brace-expansion@>=1.0.0 <=1.1.11": ">=1.1.12", | ||
| "braces@<3.0.3": ">=3.0.3", | ||
| "cross-spawn@>=7.0.0 <7.0.5": ">=7.0.5", | ||
| "ejs@<3.1.10": ">=3.1.10", | ||
| "flatted@<3.4.0": ">=3.4.0", | ||
| "flatted@<=3.4.1": ">=3.4.2", | ||
| "follow-redirects@<1.15.4": ">=1.15.4", | ||
| "follow-redirects@<=1.15.5": ">=1.15.6", | ||
| "glob@>=11.0.0 <11.1.0": ">=11.1.0", | ||
| "immutable@>=5.0.0 <5.1.5": ">=5.1.5", | ||
| "js-yaml@>=4.0.0 <4.1.1": ">=4.1.1", | ||
| "micromatch@<4.0.8": ">=4.0.8", | ||
| "minimatch@<3.1.3": ">=3.1.3", | ||
| "minimatch@<3.1.4": ">=3.1.4", | ||
| "picomatch@<2.3.2": ">=2.3.2", | ||
| "semver@>=7.0.0 <7.5.2": ">=7.5.2", | ||
| "tmp@<=0.2.3": ">=0.2.4", | ||
| "undici@>=7.0.0 <7.18.2": ">=7.18.2", | ||
| "undici@>=7.0.0 <7.24.0": ">=7.24.0", | ||
| "word-wrap@<1.2.4": ">=1.2.4", | ||
| "yaml@>=1.0.0 <1.10.3": ">=1.10.3", | ||
| "yaml@>=2.0.0 <2.8.3": ">=2.8.3", | ||
| "axios@<1.15.0": ">=1.15.0", | ||
| "apisauce>axios": ">=1.15.0" | ||
| } | ||
| } | ||
| "packageManager": "[email protected]" | ||
| } | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: OlympusDAO/bonds-subgraph
Length of output: 285
🌐 Web query:
Node.js Corepack packageManager field behavior exact version pin enforcement💡 Result:
The Node.js Corepack
packageManagerfield in package.json specifies the exact package manager (yarn, pnpm, or npm) and version to use for the project, in the format "name@version[+hash]", e.g., "[email protected]" or with an optional SHA hash for security like "[email protected]+sha224.953c8233f7a92884eee2de69a1b92d1f2ec1655e66d08071ba9a02fa" [1][2][3]. Corepack proxies (enabled viacorepack enable) read the nearest package.json, download and run the pinned exact version if needed, ensuring reproducible installs across environments [4][5][1]. Version pinning is enforced strictly by default: Corepack aborts with an error (e.g., "UsageError: This project is configured to use npm because./package.json has a 'packageManager' field") if a mismatched package manager binary is invoked [6][7][8]. It runs the exact specified version (patch-level), not a range, downloading from the registry if absent from cache [4][9][10]. This strict enforcement is controlled byCOREPACK_ENABLE_STRICT=1(default). Set to0for "transparent" mode: matching PM uses the pinned version; mismatch falls back to system/global version without error [1][8][11][12]. Auto-pinning (Corepack adding/updating the field) is off by default (COREPACK_ENABLE_AUTO_PIN=0) but can be enabled [7][13][1]. Projects can override via.corepack.env[14][15]. npm support is partial (no shims by default, uses global npm) [4][5]. Usecorepack use name@versionto set/update the field [1][16]. As of 2026, behavior unchanged in recent Node docs [5][16].Citations:
COREPACK_ENABLE_STRICTenv variable nodejs/corepack#167COREPACK_ENABLE_AUTO_PINshould default to0nodejs/corepack#485.corepack.envnodejs/corepack#642🌐 Web query:
pnpm 11 devEngines.packageManager support💡 Result:
pnpm 11 fully supports
devEngines.packageManagerin package.json for specifying the required pnpm version, introduced in v11.0.0 [1][2]. This field allows semver ranges (unlike the legacypackageManagerfield), with the resolved version stored inpnpm-lock.yamlunderpackageManagerDependenciesfor reuse if it satisfies the range [3][1]. Example usage:json { "devEngines": { "packageManager": { "name": "pnpm", "version": ">=11.0.0", "onFail": "download" } } }onFailoptions:download(auto-download),error(default),warn,ignore[3][1]. It takes precedence overpackageManager(with warning if both present) [3][4].pnpm initnow uses this field by default wheninit-package-manageris enabled [2]. OverrideonFailviapmOnFailsetting [1]. LegacypackageManagerderivesonFailfrom configs likemanagePackageManagerVersions[3][2].Citations:
devEngines.packageManagerfor pnpm version management pnpm/pnpm#10932packageManagerpin negates the widened pnpm range."pnpm": ">=10.33.0"permits pnpm 11+, but"packageManager": "[email protected]"instructs Corepack to use exactly version 10.33.0 for this project. Corepack enforces this at patch-level precision by default, preventing pnpm 11 from being used even when the engines field allows it. This directly contradicts the PR objective to unpin pnpm from 10.33.0.The compatible solutions are:
packageManagerfield entirely to let theengines.pnpmrange take effect.devEngines.packageManagerwith a range instead of the legacypackageManagerfield.Suggested change (Option 1)
"engines": { "node": ">=24", "pnpm": ">=10.33.0", "npm": "use-pnpm", "yarn": "use-pnpm" - }, - "packageManager": "[email protected]" + }📝 Committable suggestion
🤖 Prompt for AI Agents