Skip to content

Commit 8f7fbc4

Browse files
authored
Update pnpm to 11.1.1, security settings and fix CI (#10831)
* Set minimumReleaseAge: 1440 * Use standalone mode to update to pnpm@11.1.1 * Correct case for pnpm * Fix overrides when matching graphql version, revert new package
1 parent 115a636 commit 8f7fbc4

10 files changed

Lines changed: 135 additions & 65 deletions

File tree

.github/workflows/main.yml

Lines changed: 72 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,23 @@ jobs:
3030
name: 🧹 Prettier Check
3131
runs-on: ubuntu-latest
3232
steps:
33-
- name: Checkout Master
33+
- name: Checkout
3434
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
35-
- name: Setup env
36-
uses: the-guild-org/shared-config/setup@f4eea983237a44bb0ca19c3348dacbfdfcdbec23 # main
35+
- name: Install pnpm
36+
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
37+
with:
38+
standalone: true
39+
cache: true
40+
- name: Install Node
41+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
3742
with:
38-
packageManager: pnpm
43+
node-version: 24
44+
- name: Install packages
45+
run: pnpm install
46+
3947
- name: Prettier Check
4048
run: pnpm prettier:check
49+
4150
dev-tests-old:
4251
name: Validating dev-tests
4352
runs-on: ubuntu-latest
@@ -49,10 +58,18 @@ jobs:
4958
steps:
5059
- name: Checkout
5160
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
52-
- name: Setup env
53-
uses: the-guild-org/shared-config/setup@f4eea983237a44bb0ca19c3348dacbfdfcdbec23 # main
61+
- name: Install pnpm
62+
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
5463
with:
55-
packageManager: pnpm
64+
standalone: true
65+
cache: true
66+
- name: Install Node
67+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
68+
with:
69+
node-version: 24
70+
- name: Install packages
71+
run: pnpm install
72+
5673
- name: Build
5774
run: pnpm build
5875
env:
@@ -61,22 +78,28 @@ jobs:
6178
run: |
6279
pnpm run generate:examples:${{matrix.method}}
6380
git diff --exit-code -- dev-test/
81+
6482
dev-tests:
6583
name: Examples - Normal
6684
runs-on: ubuntu-latest
6785
steps:
6886
- name: Checkout
6987
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
70-
- name: Setup env
71-
uses: the-guild-org/shared-config/setup@f4eea983237a44bb0ca19c3348dacbfdfcdbec23 # main
88+
- name: Install pnpm
89+
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
90+
with:
91+
standalone: true
92+
cache: true
93+
- name: Install Node
94+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
7295
with:
73-
packageManager: pnpm
74-
- name: Prepare Cypress
96+
node-version: 24
97+
- name: Install packages
98+
# `side-effects-cache false` is set to avoid using pnpm cache for binary cache like Cypress'
7599
run: |
76-
pnpm store prune
77100
pnpm config set side-effects-cache false --location project
78-
pnpm rm -rf node_modules
79101
pnpm i
102+
80103
- name: Build
81104
run: pnpm build
82105
env:
@@ -131,16 +154,25 @@ jobs:
131154
steps:
132155
- name: Checkout
133156
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
134-
- name: Setup env
135-
uses: the-guild-org/shared-config/setup@f4eea983237a44bb0ca19c3348dacbfdfcdbec23 # main
157+
- name: Install pnpm
158+
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
159+
with:
160+
standalone: true
161+
cache: true
162+
- name: Install Node
163+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
136164
with:
137-
packageManager: pnpm
165+
node-version: 24
166+
- name: Install packages
167+
run: pnpm i
168+
138169
- name: Build
139170
run: pnpm build
140171
env:
141172
CI: true
142173
- name: Test ESM & CJS integrity
143174
run: pnpm bob check
175+
144176
test:
145177
name:
146178
Unit Test on Node ${{matrix.node_version}} (${{matrix.os}}) and GraphQL
@@ -162,15 +194,22 @@ jobs:
162194
steps:
163195
- name: Checkout
164196
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
165-
- name: Setup env
166-
uses: the-guild-org/shared-config/setup@f4eea983237a44bb0ca19c3348dacbfdfcdbec23 # main
197+
- name: Install pnpm
198+
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
167199
with:
168-
nodeVersion: ${{matrix.node_version}}
169-
packageManager: pnpm
200+
standalone: true
201+
cache: true
202+
- name: Install Node
203+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
204+
with:
205+
node-version: ${{matrix.node_version}}
206+
- name: Install Dependencies to match graphql version
207+
run: pnpm i
170208
- name: Use GraphQL v${{matrix.graphql_version}}
171209
run: node ./scripts/match-graphql.js ${{matrix.graphql_version}}
172210
- name: Install Dependencies
173-
run: pnpm i --no-frozen-lockfile
211+
run: pnpm i --no-frozen-lockfile # no frozen-lockfile because `graphql` version is changed
212+
174213
- name: Build
175214
run: pnpm build
176215
- name: Test
@@ -200,15 +239,22 @@ jobs:
200239
steps:
201240
- name: Checkout
202241
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
203-
- name: Setup env
204-
uses: the-guild-org/shared-config/setup@f4eea983237a44bb0ca19c3348dacbfdfcdbec23 # main
242+
- name: Install pnpm
243+
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
205244
with:
206-
nodeVersion: ${{matrix.node_version}}
207-
packageManager: pnpm
245+
standalone: true
246+
cache: true
247+
- name: Install Node
248+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
249+
with:
250+
node-version: ${{matrix.node_version}}
251+
- name: Install Dependencies to match graphql version
252+
run: pnpm i
208253
- name: Use GraphQL v${{matrix.graphql_version}}
209254
run: node ./scripts/match-graphql.js ${{matrix.graphql_version}}
210255
- name: Install Dependencies
211-
run: pnpm i --no-frozen-lockfile
256+
run: pnpm i --no-frozen-lockfile # no frozen-lockfile because `graphql` version is changed
257+
212258
- name: Build
213259
run: pnpm build
214260
- name: Test

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@f4eea983237a44bb0ca19c3348dacbfdfcdbec23 # main
1414
with:
1515
releaseScript: release
16+
packageManager: pnpm
1617
secrets:
1718
githubToken: ${{ secrets.GITHUB_TOKEN }}
1819
npmToken: ${{ secrets.NPM_TOKEN }}

.github/workflows/website-integrity.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,17 @@ jobs:
1818
- name: Fetch
1919
run: git fetch origin master
2020

21-
- name: Setup env
22-
uses: the-guild-org/shared-config/setup@f4eea983237a44bb0ca19c3348dacbfdfcdbec23 # main
21+
- name: Install pnpm
22+
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
2323
with:
24-
packageManager: pnpm
24+
standalone: true
25+
cache: true
26+
- name: Install Node
27+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
28+
with:
29+
node-version: 24
30+
- name: Install packages
31+
run: pnpm install
2532

2633
- name: Build Packages
2734
run: pnpm build

.github/workflows/website.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,21 @@ jobs:
1919
github.event.pull_request.head.repo.full_name == github.repository || github.event_name ==
2020
'push'
2121
steps:
22-
- name: checkout
22+
- name: Checkout
2323
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2424
with:
2525
fetch-depth: 0
26-
27-
- uses: the-guild-org/shared-config/setup@f4eea983237a44bb0ca19c3348dacbfdfcdbec23 # main
28-
name: setup env
26+
- name: Install pnpm
27+
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
28+
with:
29+
standalone: true
30+
cache: true
31+
- name: Install Node
32+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
2933
with:
30-
packageManager: pnpm
34+
node-version: 24
35+
- name: Install packages
36+
run: pnpm install
3137

3238
- uses: the-guild-org/shared-config/website-cf@f4eea983237a44bb0ca19c3348dacbfdfcdbec23 # main
3339
name: build and deploy website

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "graphql-code-generator",
33
"version": "0.0.0",
44
"private": true,
5-
"packageManager": "pnpm@10.33.4",
5+
"packageManager": "pnpm@11.1.1+sha512.d1fdf5f73c617b64fa1a56a81c3c8dfe0e966e33a6010aa256b517ae77be21d93e05affc0de1a83b0e4f29d569f68b446ae8f068cd7247c0bb3df0fb4d7bdf9a",
66
"engines": {
77
"node": ">= 16.0.0"
88
},
@@ -67,7 +67,8 @@
6767
"graphql": "16.14.0",
6868
"husky": "9.1.7",
6969
"jest-diff": "30.4.1",
70-
"lint-staged": "17.0.5",
70+
"js-yaml": "4.1.1",
71+
"lint-staged": "17.0.4",
7172
"memfs": "4.57.2",
7273
"patch-package": "8.0.1",
7374
"prettier": "3.8.3",

pnpm-lock.yaml

Lines changed: 22 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
minimumReleaseAge: 1440 # in minutes. 1440 minutes === 1 day
2+
13
packages:
24
- packages/*
35
- packages/plugins/typescript/*

0 commit comments

Comments
 (0)