Skip to content

Commit dbff931

Browse files
authored
Use node 22 (PrismarineJS#3570)
Node 22 is now LTS, switch to that in CI and supported node version.
1 parent 6953949 commit dbff931

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

.github/workflows/ci.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v2
15-
- name: Use Node.js 18.x
15+
- name: Use Node.js 22.x
1616
uses: actions/[email protected]
1717
with:
18-
node-version: 18.x
18+
node-version: 22.x
1919
- run: npm i && npm run lint
2020

2121
PrepareSupportedVersions:
@@ -25,10 +25,10 @@ jobs:
2525

2626
steps:
2727
- uses: actions/checkout@v2
28-
- name: Use Node.js 18.x
28+
- name: Use Node.js 22.x
2929
uses: actions/[email protected]
3030
with:
31-
node-version: 18.x
31+
node-version: 22.x
3232
- id: set-matrix
3333
run: |
3434
node -e "
@@ -45,10 +45,10 @@ jobs:
4545

4646
steps:
4747
- uses: actions/checkout@v2
48-
- name: Use Node.js 18.x
48+
- name: Use Node.js 22.x
4949
uses: actions/[email protected]
5050
with:
51-
node-version: 18.x
51+
node-version: 22.x
5252
- name: Setup Java JDK
5353
uses: actions/[email protected]
5454
with:

.github/workflows/npm-publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Set up Node.js
1414
uses: actions/setup-node@master
1515
with:
16-
node-version: 18.0.0
16+
node-version: 22.0.0
1717
- id: publish
1818
uses: JS-DevTools/npm-publish@v1
1919
with:

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
if (typeof process !== 'undefined' && !process.browser && process.platform !== 'browser' && parseInt(process.versions.node.split('.')[0]) < 18) {
22
console.error('Your node version is currently', process.versions.node)
3-
console.error('Please update it to a version >= 18.x.x from https://nodejs.org/')
3+
console.error('Please update it to a version >= 22.x.x from https://nodejs.org/')
44
process.exit(1)
55
}
66

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"url": "git://github.com/PrismarineJS/mineflayer.git"
1818
},
1919
"engines": {
20-
"node": ">=18"
20+
"node": ">=22"
2121
},
2222
"license": "MIT",
2323
"dependencies": {

0 commit comments

Comments
 (0)