Skip to content

Commit

Permalink
Use node 22 (#3570)
Browse files Browse the repository at this point in the history
Node 22 is now LTS, switch to that in CI and supported node version.
  • Loading branch information
rom1504 authored Jan 26, 2025
1 parent 6953949 commit dbff931
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Use Node.js 18.x
- name: Use Node.js 22.x
uses: actions/[email protected]
with:
node-version: 18.x
node-version: 22.x
- run: npm i && npm run lint

PrepareSupportedVersions:
Expand All @@ -25,10 +25,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Use Node.js 18.x
- name: Use Node.js 22.x
uses: actions/[email protected]
with:
node-version: 18.x
node-version: 22.x
- id: set-matrix
run: |
node -e "
Expand All @@ -45,10 +45,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Use Node.js 18.x
- name: Use Node.js 22.x
uses: actions/[email protected]
with:
node-version: 18.x
node-version: 22.x
- name: Setup Java JDK
uses: actions/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@master
with:
node-version: 18.0.0
node-version: 22.0.0
- id: publish
uses: JS-DevTools/npm-publish@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
if (typeof process !== 'undefined' && !process.browser && process.platform !== 'browser' && parseInt(process.versions.node.split('.')[0]) < 18) {
console.error('Your node version is currently', process.versions.node)
console.error('Please update it to a version >= 18.x.x from https://nodejs.org/')
console.error('Please update it to a version >= 22.x.x from https://nodejs.org/')
process.exit(1)
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"url": "git://github.com/PrismarineJS/mineflayer.git"
},
"engines": {
"node": ">=18"
"node": ">=22"
},
"license": "MIT",
"dependencies": {
Expand Down

0 comments on commit dbff931

Please sign in to comment.