Skip to content

Commit 864afa8

Browse files
Make compatible with node >=22 (#2273)
Breaking change: uplifts the minimum version of node required to v20
1 parent e0ba5d2 commit 864afa8

16 files changed

Lines changed: 21 additions & 18 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name": "CyberChef",
55
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-18-bookworm",
6+
"image": "mcr.microsoft.com/devcontainers/javascript-node:22-trixie",
77

88
// Features to add to the dev container. More info: https://containers.dev/features.
99
"features": {

.github/workflows/master.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Set node version
2222
uses: actions/setup-node@v6
2323
with:
24-
node-version: 18
24+
node-version: '20.x'
2525
registry-url: "https://registry.npmjs.org"
2626

2727
- name: Install

.github/workflows/pull_requests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set node version
1818
uses: actions/setup-node@v6
1919
with:
20-
node-version: 18
20+
node-version: '20.x'
2121
registry-url: "https://registry.npmjs.org"
2222

2323
- name: Install

.github/workflows/releases.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Set node version
2828
uses: actions/setup-node@v6
2929
with:
30-
node-version: 18
30+
node-version: '20.x'
3131
registry-url: "https://registry.npmjs.org"
3232

3333
- name: Install

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18
1+
22

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Modifier --platform=$BUILDPLATFORM limits the platform to "BUILDPLATFORM" during buildx multi-platform builds
55
# This is because npm "chromedriver" package is not compatiable with all platforms
66
# For more info see: https://docs.docker.com/build/building/multi-platform/#cross-compilation
7-
FROM --platform=$BUILDPLATFORM node:18-alpine AS builder
7+
FROM --platform=$BUILDPLATFORM node:22-alpine AS builder
88

99
WORKDIR /app
1010

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ CyberChef is built to support
120120

121121
## Node.js support
122122

123-
CyberChef is built to fully support Node.js `v16`. For more information, see the ["Node API" wiki page](https://github.com/gchq/CyberChef/wiki/Node-API)
123+
CyberChef is built to fully support Node.js `v22`. For more information, see the ["Node API" wiki page](https://github.com/gchq/CyberChef/wiki/Node-API)
124124

125125

126126
## Contributing

babel.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ module.exports = function(api) {
1616
"regenerator": true
1717
}
1818
]
19-
]
19+
],
20+
"generatorOpts": {
21+
"importAttributesKeyword": "with"
22+
}
2023
};
2124
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"browserslist": [
3737
"Chrome >= 50",
3838
"Firefox >= 38",
39-
"node >= 16"
39+
"node >= 22"
4040
],
4141
"devDependencies": {
4242
"@babel/eslint-parser": "^7.28.6",

src/core/ChefWorker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
import Chef from "./Chef.mjs";
10-
import OperationConfig from "./config/OperationConfig.json" assert {type: "json"};
10+
import OperationConfig from "./config/OperationConfig.json" with { type: "json" };
1111
import OpModules from "./config/modules/OpModules.mjs";
1212
import loglevelMessagePrefix from "loglevel-message-prefix";
1313

0 commit comments

Comments
 (0)