Skip to content

Commit 774d578

Browse files
authored
Update to node 22 (#453)
* node 22 * Update ci.yml * Update ci.yml * Update ci.yml * Update package.json * Update ci.yml * Update package.json * Update viewer.test.js * Update package.json * Update jest.config.js * Update jest.config.js * Update jest-puppeteer.config.js * Update package.json * Update viewer.test.js
1 parent 532e531 commit 774d578

File tree

4 files changed

+17
-13
lines changed

4 files changed

+17
-13
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v2
14-
- name: Use Node.js 18.x
14+
- name: Use Node.js 22.x
1515
uses: actions/setup-node@v1.4.4
1616
with:
17-
node-version: 18.x
17+
node-version: 22.x
1818
- run: npm i && npm run lint
1919
build:
2020

@@ -27,17 +27,17 @@ jobs:
2727

2828
steps:
2929
- uses: actions/checkout@v2
30-
- name: Use Node.js 18.x
30+
- name: Use Node.js 22.x
3131
uses: actions/setup-node@v1
3232
with:
33-
node-version: 18.x
33+
node-version: 22.x
3434
- name: Setup Java JDK
3535
uses: actions/setup-java@v1
3636
with:
3737
java-version: 21
3838
java-package: jre
3939
- name: Install xi
40-
run: sudo apt-get install -y libxi-dev libglu1-mesa-dev
40+
run: sudo apt-get install -y libxi-dev libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev build-essential libglu1-mesa-dev libglew-dev
4141
- run: npm install
4242
- run: npm run jestTest -- -t ${{ matrix.mcVersion }}
4343
- uses: actions/upload-artifact@v4

jest-puppeteer.config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module.exports = {
22
launch: {
3-
args: ['--no-sandbox', '--disable-setuid-sandbox']
4-
}
3+
args: ['--no-sandbox', '--disable-setuid-sandbox'],
4+
headless: true
5+
},
6+
browserContext: 'default'
57
}

jest.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
module.exports = {
22
preset: 'jest-puppeteer',
3-
testRegex: './*\\.test\\.js$'
3+
testRegex: './*\\.test\\.js$',
4+
testEnvironmentOptions: require('./jest-puppeteer.config.js'),
5+
testEnvironment: 'jest-environment-puppeteer'
46
}

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
"devDependencies": {
3939
"assert": "^2.0.0",
4040
"buffer": "^6.0.3",
41-
"canvas": "^2.6.1",
41+
"canvas": "^3.1.0",
4242
"fs-extra": "^11.0.0",
43-
"jest": "^27.0.4",
44-
"jest-puppeteer": "^6.0.0",
43+
"jest": "^29.7.0",
44+
"jest-puppeteer": "^11.0.0",
4545
"minecraft-assets": "^1.9.0",
4646
"minecraft-wrap": "^1.3.0",
4747
"minecrafthawkeye": "^1.2.5",
@@ -51,9 +51,9 @@
5151
"prismarine-schematic": "^1.2.0",
5252
"prismarine-viewer": "file:./",
5353
"process": "^0.11.10",
54-
"puppeteer": "^16.0.0",
54+
"puppeteer": "^22.8.2",
5555
"standard": "^17.1.0",
5656
"webpack": "^5.10.2",
57-
"webpack-cli": "^5.1.1"
57+
"webpack-cli": "^6.0.1"
5858
}
5959
}

0 commit comments

Comments
 (0)