Skip to content

Commit d20d00a

Browse files
committed
chore: require pnpm 10
Bump engines.pnpm to ^10 (pnpm 9 reached EOL) and align CI plumbing with the new constraint: - Add root .npmrc with `public-hoist-pattern[]=*eslint*` and `*prettier*` so transitive plugins of @theguild/{prettier,eslint}-config remain resolvable from the workspace root after pnpm 10's hoist defaults changed (otherwise `prettier -c .` errors with "Cannot find package 'prettier-plugin-sh'"). - Rewrite the pnpm-version step in setup-node/action.yml so it honors the `packageManagerVersion` input first, falls back to a sane default, and fixes the broken `if [ ! -z {{inputs.packageManager}} ]` shell (missing `$`, was always truthy). - Pin pnpm to 10.17.1 explicitly via packageManagerVersion at every setup-node call site in ci.yml and publish.yml. No root `packageManager` field is added: yarn 1 (still the system yarn on GitHub runners) refuses to coexist with a non-yarn value, which trips the CLI init tests' `yarn link @graphprotocol/graph-cli` step.
1 parent 7fe67ac commit d20d00a

5 files changed

Lines changed: 16 additions & 14 deletions

File tree

.github/actions/setup-node/action.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ runs:
3030
if: inputs.packageManager == 'pnpm'
3131
working-directory: ${{ inputs.workingDirectory }}
3232
run: |
33-
PNPM_VERSION=${PNPM_VERSION:-9.0.6}
34-
PKG_JSON=$(cat package.json | jq -r '.packageManager' | awk -F@ '{print $2}')
35-
if [ ! -z $PKG_JSON ]; then
36-
PNPM_VERSION=$PKG_JSON
37-
fi
38-
if [ ! -z {{inputs.packageManager}} ]; then
39-
PNPM_VERSION=${{ inputs.packageManagerVersion }}
33+
PNPM_VERSION='${{ inputs.packageManagerVersion }}'
34+
if [ -z "$PNPM_VERSION" ]; then
35+
PKG_JSON=$(jq -r '.packageManager // ""' package.json | awk -F@ '{print $2}')
36+
if [ -n "$PKG_JSON" ]; then
37+
PNPM_VERSION="$PKG_JSON"
38+
fi
4039
fi
40+
PNPM_VERSION="${PNPM_VERSION:-10.17.1}"
4141
echo "Using PNPM version $PNPM_VERSION"
4242
echo "version=$PNPM_VERSION" >> $GITHUB_OUTPUT
4343

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
nodeVersion: 22
2828
packageManager: pnpm
29-
packageManagerVersion: 9
29+
packageManagerVersion: '10.17.1'
3030

3131
- name: Lint
3232
run: pnpm lint
@@ -50,7 +50,7 @@ jobs:
5050
with:
5151
nodeVersion: ${{ matrix.node-version }}
5252
packageManager: pnpm
53-
packageManagerVersion: 9
53+
packageManagerVersion: '10.17.1'
5454

5555
- name: Setup git user information
5656
run: |
@@ -82,7 +82,7 @@ jobs:
8282
with:
8383
nodeVersion: 22
8484
packageManager: pnpm
85-
packageManagerVersion: 9
85+
packageManagerVersion: '10.17.1'
8686

8787
- name: Build Packages
8888
run: pnpm build
@@ -112,7 +112,7 @@ jobs:
112112
with:
113113
nodeVersion: 22
114114
packageManager: pnpm
115-
packageManagerVersion: 9
115+
packageManagerVersion: '10.17.1'
116116

117117
- name: Build Packages
118118
run: pnpm build # will also check types

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
with:
3737
nodeVersion: 24
3838
packageManager: pnpm
39-
packageManagerVersion: 9
39+
packageManagerVersion: '10.17.1'
4040

4141
- name: Build
4242
if: ${{ startsWith(github.event.head_commit.message, env.RELEASE_COMMIT_MSG) }}
@@ -95,7 +95,7 @@ jobs:
9595
with:
9696
nodeVersion: 24
9797
packageManager: pnpm
98-
packageManagerVersion: 9
98+
packageManagerVersion: '10.17.1'
9999

100100
- name: Determine snapshot tag
101101
id: tag

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
public-hoist-pattern[]=*eslint*
2+
public-hoist-pattern[]=*prettier*

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"private": true,
1414
"engines": {
1515
"node": ">=22.0.0",
16-
"pnpm": "9"
16+
"pnpm": "^10"
1717
},
1818
"scripts": {
1919
"build": "pnpm --filter=@graphprotocol/graph-* build",

0 commit comments

Comments
 (0)