Skip to content

Commit 7f06c7e

Browse files
authored
Merge pull request #1234 from nbogie/nb-enforce-node-version
Enforce node version >= 22 for npm install
2 parents 35a287c + cd7e8b9 commit 7f06c7e

File tree

5 files changed

+55
-1
lines changed

5 files changed

+55
-1
lines changed

.github/workflows/test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ jobs:
1212
steps:
1313
- name: Checkout your repository using git
1414
uses: actions/checkout@v4
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '22'
1519
- name: Install dependencies
1620
run: npm ci
1721
- name: Test
@@ -21,6 +25,10 @@ jobs:
2125
steps:
2226
- name: Checkout your repository using git
2327
uses: actions/checkout@v4
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: '22'
2432
- name: Install dependencies
2533
run: npm ci
2634
- name: Lint
@@ -30,6 +38,10 @@ jobs:
3038
steps:
3139
- name: Checkout your repository using git
3240
uses: actions/checkout@v4
41+
- name: Setup Node.js
42+
uses: actions/setup-node@v4
43+
with:
44+
node-version: '22'
3345
- name: Install dependencies
3446
run: npm ci
3547
- name: Typecheck
@@ -39,6 +51,10 @@ jobs:
3951
steps:
4052
- name: Checkout your repository using git
4153
uses: actions/checkout@v4
54+
- name: Setup Node.js
55+
uses: actions/setup-node@v4
56+
with:
57+
node-version: '22'
4258
- name: Install dependencies
4359
run: npm ci
4460
- name: Build

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Force npm to fail (not just warn) if the node.js version in "engines" isn't met
2+
engine-strict=true

docs/technical_overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### Setup
66

7-
1. Make sure you have [node and npm installed on your machine](https://nodejs.org/en/learn/getting-started/how-to-install-nodejs).
7+
1. Make sure you have [node (at least version 22) and npm installed on your machine](https://nodejs.org/en/learn/getting-started/how-to-install-nodejs).
88
2. Clone this repo by typing git clone https://github.com/processing/p5.js-website/ in your terminal. (You can also use [GitHub Desktop](https://desktop.github.com/)).
99
3. Then install the project's dependencies with:
1010

package-lock.json

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

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
"custom:dev": "tsx ./src/scripts/branchTest.ts",
2020
"custom:cleanup": "tsx ./src/scripts/resetBranchTest.ts"
2121
},
22+
"engines": {
23+
"node": ">=22.0.0"
24+
},
2225
"dependencies": {
2326
"@astrojs/check": "^0.9.6",
2427
"@astrojs/mdx": "^4.3.13",

0 commit comments

Comments
 (0)