File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed
Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change 2020 fail-fast : false
2121 matrix :
2222 os : [ubuntu-latest, macos-latest, windows-latest]
23+ node-version : [20, 24]
2324 permissions :
2425 contents : read
2526 security-events : write # needed to upload ESLint results
3637 - name : Set up Node.js
3738 uses : actions/setup-node@v5
3839 with :
39- node-version : 24
40+ node-version : ${{ matrix.node-version }}
4041 cache : ' npm'
4142
4243 - name : Set up Python
5152 npm config set script-shell bash
5253 npm ci
5354
55+ - name : Downgrade @types/node dependency to v20
56+ if : matrix.node-version == 20
57+ run : |
58+ contents=$(jq '.devDependencies."@types/node" = "^20.0.0"' package.json)
59+ echo "${contents}" > package.json
60+ # Usually we run `npm install` on macOS to ensure that we pick up macOS-only dependencies.
61+ # However we're not checking in the updated lockfile here, so it's fine to run
62+ # `npm install` on Linux.
63+ npm install
64+
65+ if [ ! -z "$(git status --porcelain)" ]; then
66+ git config --global user.email "[email protected] " 67+ git config --global user.name "github-actions[bot]"
68+ # The period in `git add --all .` ensures that we stage deleted files too.
69+ git add --all .
70+ git commit -m "Use @types/node=v20"
71+ fi
72+
5473 - name : Verify compiled JS up to date
5574 run : .github/workflows/script/check-js.sh
5675
7089
7190 - name : Upload sarif
7291 uses : github/codeql-action/upload-sarif@v3
73- if : matrix.os == 'ubuntu-latest'
92+ if : matrix.os == 'ubuntu-latest' && matrix.node-version == 24
7493 with :
7594 sarif_file : eslint.sarif
7695 category : eslint
You can’t perform that action at this time.
0 commit comments