Skip to content

Commit ac8e822

Browse files
authored
Merge pull request #1250 from nbogie/nb-enforce-node-version-main
enforce node version (>=22) - for main
2 parents ddefb72 + 19e9b6d commit ac8e822

File tree

6 files changed

+27
-1
lines changed

6 files changed

+27
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
env:
2525
NODE_OPTIONS: "--max_old_space_size=4096"
2626
uses: withastro/action@v2
27+
with:
28+
node-version: 22
2729

2830
deploy:
2931
needs: build

.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
@@ -40,6 +52,10 @@ jobs:
4052
steps:
4153
- name: Checkout your repository using git
4254
uses: actions/checkout@v4
55+
- name: Setup Node.js
56+
uses: actions/setup-node@v4
57+
with:
58+
node-version: '22'
4359
- name: Install dependencies
4460
run: npm ci
4561
- 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: 3 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
@@ -20,6 +20,9 @@
2020
"custom:cleanup": "tsx ./src/scripts/resetBranchTest.ts",
2121
"test:a11y": "playwright test test/a11y"
2222
},
23+
"engines": {
24+
"node": ">=22.0.0"
25+
},
2326
"dependencies": {
2427
"@astrojs/check": "^0.9.6",
2528
"@astrojs/mdx": "^4.3.13",

0 commit comments

Comments
 (0)