Skip to content

Commit cc3ca48

Browse files
committed
ci: nodejs v20 => v22
1 parent 2405600 commit cc3ca48

File tree

7 files changed

+13
-15
lines changed

7 files changed

+13
-15
lines changed

.github/workflows/crowdin-sync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- name: Test using Node.js
1111
uses: actions/setup-node@v1
1212
with:
13-
node-version: "v20.11.0"
13+
node-version: "v22"
1414
- name: Install ts-node
1515
run: npm i -g ts-node
1616
- name: Install dependencies

.github/workflows/publish-chrome.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- name: Setup NodeJS
1111
uses: actions/setup-node@v4
1212
with:
13-
node-version: "v20.11.0"
13+
node-version: "v22"
1414
- name: Install dependencies
1515
run: npm install
1616
- name: Build

.github/workflows/publish-edge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- name: Setup NodeJS
1111
uses: actions/setup-node@v4
1212
with:
13-
node-version: "v20.11.0"
13+
node-version: "v22"
1414
- name: Install dependencies
1515
run: npm install
1616
- name: Build

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
- name: Test using Node.js
99
uses: actions/setup-node@v1
1010
with:
11-
node-version: "v20.11.0"
11+
node-version: "v22"
1212
- run: npm install
1313
- run: npm run test-c
1414
- name: Tests ✅

jest.config.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
import { readFileSync } from 'fs'
22
import type { Config } from "jest"
3-
import { dirname, join } from 'path'
4-
import { fileURLToPath } from 'url'
3+
import { join } from 'path'
54

6-
const __filename = fileURLToPath(import.meta.url)
7-
const __dirname = dirname(__filename)
8-
const tsconfig = JSON.parse(readFileSync(join(__dirname, 'tsconfig.json'), 'utf-8'))
9-
const { compilerOptions } = tsconfig
5+
const tsconfig = JSON.parse(readFileSync(join(process.cwd(), 'tsconfig.json'), 'utf-8'))
6+
const { compilerOptions } = tsconfig as { compilerOptions: { paths: { [key: string]: string[] } } }
107

118
const { paths } = compilerOptions
129

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"@swc/jest": "^0.2.39",
3939
"@types/chrome": "0.1.29",
4040
"@types/decompress": "^4.2.7",
41+
"@types/jest": "^30.0.0",
4142
"@types/node": "^24.10.1",
4243
"@types/punycode": "^2.1.4",
4344
"@vue/babel-plugin-jsx": "^2.0.1",
@@ -68,6 +69,6 @@
6869
"vue-router": "^4.6.3"
6970
},
7071
"engines": {
71-
"node": ">=20"
72+
"node": ">=22"
7273
}
73-
}
74+
}

script/setup-e2e.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ check_command() {
6464
check_node_version() {
6565
if ! check_command node; then
6666
log_error "Node.js is not installed"
67-
log_info "Please install Node.js >= 20 from https://nodejs.org/"
67+
log_info "Please install Node.js >= 22 from https://nodejs.org/"
6868
exit 1
6969
fi
7070

@@ -75,8 +75,8 @@ check_node_version() {
7575

7676
log_info "Current Node.js version: $node_version"
7777

78-
if [ "$major_version" -lt 20 ]; then
79-
log_error "Node.js version must be >= 20"
78+
if [ "$major_version" -lt 22 ]; then
79+
log_error "Node.js version must be >= 22"
8080
log_info "Current version: $node_version"
8181
log_info "Please upgrade Node.js from https://nodejs.org/"
8282
exit 1

0 commit comments

Comments
 (0)