Skip to content

Commit cdfb4c3

Browse files
authored
Merge pull request #830 from Expensify/nicolas-enforceNodeNpmEngines
Enforce npm 11.10.0 minimum via devEngines and engine-strict
2 parents c3c4004 + 1aae36e commit cdfb4c3

5 files changed

Lines changed: 17 additions & 6 deletions

File tree

‎.github/workflows/reassurePerfTests.yml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ jobs:
4343
run: |
4444
git fetch origin ${{ github.event.pull_request.head.sha }} --no-tags --depth=1
4545
git switch --force --detach ${{ github.event.pull_request.head.sha }}
46-
46+
47+
# v4 — re-run setup so Node/npm match the PR's .nvmrc, which may differ from the base branch
48+
- name: Setup Node for PR head
49+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e
50+
with:
51+
node-version-file: '.nvmrc'
52+
4753
- name: Reinstall dependencies
4854
run: npm ci
4955

‎.gitignore‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ node_modules/
66
npm-debug.log
77
dist/
88

9-
# NPM file created by GitHub actions
10-
.npmrc
11-
129
# IDEs
1310
.idea
1411

‎.npmrc‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

‎.nvmrc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
24.11.0
1+
24.19.0

‎package.json‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,5 +128,12 @@
128128
"node": ">=20.19.5",
129129
"npm": ">=10.8.2"
130130
},
131-
"sideEffects": false
131+
"sideEffects": false,
132+
"devEngines": {
133+
"packageManager": {
134+
"name": "npm",
135+
"version": ">=11.10.0",
136+
"onFail": "error"
137+
}
138+
}
132139
}

0 commit comments

Comments
 (0)