Skip to content

Commit 3f0332f

Browse files
ci: node@22 (#1218)
1 parent 0458ad5 commit 3f0332f

18 files changed

+1247830
-3705
lines changed

.github/workflows/nodejs.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ jobs:
6161
strategy:
6262
matrix:
6363
os: [ubuntu-latest, windows-latest, macos-latest]
64-
# TODO add 21.x after node-sass gets support
65-
node-version: [18.x, 20.x]
64+
node-version: [18.x, 20.x, 22.x]
6665
webpack-version: [latest]
6766

6867
runs-on: ${{ matrix.os }}
@@ -89,6 +88,10 @@ jobs:
8988
node-version: ${{ matrix.node-version }}
9089
cache: "npm"
9190

91+
- name: Install webpack ${{ matrix.webpack-version }}
92+
if: matrix.node-version == '22.x'
93+
run: npm uninstall node-sass
94+
9295
- name: Install dependencies
9396
run: npm ci
9497

jest.config.js

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
const isNodeSassSupported = require("./test/helpers/is-node-sass-supported");
2+
13
module.exports = {
24
testEnvironment: "jest-environment-node-single-context",
5+
// eslint-disable-next-line no-undefined
6+
snapshotResolver:
7+
"<rootDir>/test/helpers/skip-node-sass-snapshot-resolver.js",
8+
moduleNameMapper: isNodeSassSupported()
9+
? {}
10+
: {
11+
// For Node.js@22, because `node-sass` doesn't support it
12+
"^node-sass$": "sass",
13+
},
314
};

package-lock.json

+2,522-2,408
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@
7272
"@babel/cli": "^7.23.4",
7373
"@babel/core": "^7.24.0",
7474
"@babel/preset-env": "^7.24.0",
75-
"@commitlint/cli": "^18.4.4",
76-
"@commitlint/config-conventional": "^18.4.4",
75+
"@commitlint/cli": "^19.3.0",
76+
"@commitlint/config-conventional": "^19.2.2",
7777
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
7878
"babel-jest": "^29.6.2",
7979
"bootstrap-sass": "^3.4.1",

0 commit comments

Comments
 (0)