Skip to content

Commit

Permalink
Merge pull request #2248 from balena-os/node-20
Browse files Browse the repository at this point in the history
Update Node to v20
  • Loading branch information
flowzone-app[bot] authored Mar 7, 2024
2 parents 7bb85d7 + 08727ed commit f4a42d4
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 93 deletions.
6 changes: 3 additions & 3 deletions Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG ARCH=%%BALENA_ARCH%%
ARG FATRW_VERSION=0.2.9
ARG NODE="nodejs~=18"
ARG NPM="npm~=9"
ARG ALPINE_VERSION="3.18"
ARG NODE="nodejs~=20"
ARG NPM="npm~=10"
ARG ALPINE_VERSION="3.19"

###################################################
# Build the supervisor dependencies
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Here's a few guidelines to make the process easier for everyone involved.

These are the system requirements for developing and testing the balenaSupervisor on a local machine

- [Node.js](https://nodejs.org/en) v18 or latest
- [Node.js](https://nodejs.org/en) v20 or latest
- [Rust](https://www.rust-lang.org/) v1.64 or latest for installing the [@balena/systemd](https://www.npmjs.com/package/@balena/systemd) NPM package.
- If developing on an architecture not supported by default by [node-sqlite3](https://github.com/TryGhost/node-sqlite3#prebuilt-binaries), a C++ compiler and linker are also required, plus the libsqlite development headers.

Expand Down Expand Up @@ -195,7 +195,7 @@ To run type checks, and unit tests, you can use:
npm run test
```

The supervisor runs on Node v12.16.2, so using that specific
The supervisor runs on Node v20, so using that specific
version will ensure tests run in the same environment as
production.

Expand Down
111 changes: 29 additions & 82 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,12 @@
"sqlite3": "^5.1.6"
},
"engines": {
"node": "^18.18.0",
"npm": "^9.8.1"
"node": ">=20 <21",
"npm": ">=10"
},
"devDependencies": {
"@balena/contrato": "^0.6.0",
"@balena/es-version": "^1.0.1",
"@balena/happy-eyeballs": "0.0.6",
"@balena/lint": "^7.3.0",
"@types/bluebird": "^3.5.37",
"@types/chai": "^4.3.3",
Expand All @@ -60,7 +59,7 @@
"@types/mocha": "^8.2.3",
"@types/mock-fs": "^4.13.1",
"@types/morgan": "^1.9.3",
"@types/node": "^18.11.7",
"@types/node": "^20.11.24",
"@types/request": "^2.48.8",
"@types/rewire": "^2.5.28",
"@types/rimraf": "^2.0.5",
Expand Down
1 change: 0 additions & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ async function mdnsLookup(
};
})();

import '@balena/happy-eyeballs/eye-patch';
import Supervisor from './supervisor';
import process from 'process';
import log from './lib/supervisor-console';
Expand Down
2 changes: 1 addition & 1 deletion src/logging/balena-backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class BalenaLogBackend extends LogBackend {
private gzip: zlib.Gzip | null = null;
private opts: Options;
private stream: stream.PassThrough;
private timeout: NodeJS.Timer;
private timeout: NodeJS.Timeout;

public initialised = false;

Expand Down

0 comments on commit f4a42d4

Please sign in to comment.