Skip to content

Commit

Permalink
ci: node@22 (#1218)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait authored Jul 23, 2024
1 parent 0458ad5 commit 3f0332f
Show file tree
Hide file tree
Showing 18 changed files with 1,247,830 additions and 3,705 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
# TODO add 21.x after node-sass gets support
node-version: [18.x, 20.x]
node-version: [18.x, 20.x, 22.x]
webpack-version: [latest]

runs-on: ${{ matrix.os }}
Expand All @@ -89,6 +88,10 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: "npm"

- name: Install webpack ${{ matrix.webpack-version }}
if: matrix.node-version == '22.x'
run: npm uninstall node-sass

- name: Install dependencies
run: npm ci

Expand Down
11 changes: 11 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
const isNodeSassSupported = require("./test/helpers/is-node-sass-supported");

module.exports = {
testEnvironment: "jest-environment-node-single-context",
// eslint-disable-next-line no-undefined
snapshotResolver:
"<rootDir>/test/helpers/skip-node-sass-snapshot-resolver.js",
moduleNameMapper: isNodeSassSupported()
? {}
: {
// For Node.js@22, because `node-sass` doesn't support it
"^node-sass$": "sass",
},
};
4,930 changes: 2,522 additions & 2,408 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
"@babel/cli": "^7.23.4",
"@babel/core": "^7.24.0",
"@babel/preset-env": "^7.24.0",
"@commitlint/cli": "^18.4.4",
"@commitlint/config-conventional": "^18.4.4",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
"babel-jest": "^29.6.2",
"bootstrap-sass": "^3.4.1",
Expand Down
Loading

0 comments on commit 3f0332f

Please sign in to comment.