You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Node.js 24 is now available as an LTS version and can be used for ioBroker adapters. This guide shows how to manually update existing adapters to support Node.js 24.
4
+
5
+
## Update minimum Node.js version
6
+
7
+
If you want to set Node.js 24 as the minimum required version, update the `engines` field in `package.json`:
8
+
9
+
```diff
10
+
"engines": {
11
+
- "node": ">= 20"
12
+
+ "node": ">= 24"
13
+
},
14
+
```
15
+
16
+
## Update testing configuration
17
+
18
+
To test your adapter against Node.js 24, update `.github/workflows/test-and-release.yml`:
19
+
20
+
```diff
21
+
runs-on: ${{ matrix.os }}
22
+
strategy:
23
+
matrix:
24
+
- node-version: [18.x, 20.x, 22.x]
25
+
+ node-version: [18.x, 20.x, 22.x, 24.x]
26
+
os: [ubuntu-latest, windows-latest, macos-latest]
27
+
```
28
+
29
+
If you also want to update the check and deploy steps to use Node.js 24:
30
+
31
+
```diff
32
+
steps:
33
+
- uses: ioBroker/testing-action-check@v1
34
+
with:
35
+
- node-version: '20.x'
36
+
+ node-version: '24.x'
37
+
# Uncomment the following line if your adapter cannot be installed using 'npm ci'
38
+
# install-command: 'npm install'
39
+
lint: true
40
+
```
41
+
42
+
```diff
43
+
# steps:
44
+
# - uses: ioBroker/testing-action-deploy@v1
45
+
# with:
46
+
-# node-version: '20.x'
47
+
+# node-version: '24.x'
48
+
# # Uncomment the following line if your adapter cannot be installed using 'npm ci'
When using TypeScript or when type-checking is enabled, the type definitions and `tsconfig.json` need to be updated.
56
+
57
+
To update the Node.js type definitions for Node.js 24:
58
+
59
+
```bash
60
+
npm i -D @types/node@24
61
+
```
62
+
63
+
If you are upgrading from an older Node.js version, uninstall the old tsconfig base:
64
+
65
+
```bash
66
+
npm uninstall -D @tsconfig/node20
67
+
# or @tsconfig/node22 if upgrading from Node.js 22
68
+
```
69
+
70
+
Then install the Node.js 24 tsconfig base:
71
+
72
+
```bash
73
+
npm i -D @tsconfig/node24
74
+
```
75
+
76
+
Finally, update your `tsconfig.json` to reference the new base:
77
+
78
+
```diff
79
+
{
80
+
- "extends": "@tsconfig/node20/tsconfig.json",
81
+
+ "extends": "@tsconfig/node24/tsconfig.json",
82
+
// ...
83
+
}
84
+
```
85
+
86
+
## Note
87
+
88
+
Remember that using Node.js 24 as the minimum version means users will need to have Node.js 24 or higher installed to run your adapter. Consider your target audience when deciding on the minimum version.
Copy file name to clipboardExpand all lines: test/baselines/adapter_JS_JsonUI_ESLint_TypeChecking_Spaces_SingleQuotes_Apache-2.0/.github/workflows/test-and-release.yml
0 commit comments