Update to Node 18

Change-type: major
This commit is contained in:
Otávio Jacobi 2023-08-24 21:19:09 -03:00
parent d9af28bca7
commit 817ce5dc96
9 changed files with 78 additions and 68 deletions

View File

@ -18,7 +18,7 @@ inputs:
default: 'accounts+apple@balena.io'
NODE_VERSION:
type: string
default: '16.x'
default: '18.x'
VERBOSE:
type: string
default: 'true'

View File

@ -15,7 +15,7 @@ inputs:
# --- custom environment
NODE_VERSION:
type: string
default: '16.x'
default: '18.x'
VERBOSE:
type: string
default: "true"

View File

@ -78,8 +78,8 @@ If you are a Node.js developer, you may wish to install the balena CLI via [npm]
The npm installation involves building native (platform-specific) binary modules, which require
some development tools to be installed first, as follows.
> **The balena CLI currently requires Node.js version 16.**
> **Versions 17 and later are not yet fully supported.**
> **The balena CLI currently requires Node.js version 18.**
> **Versions 19 and later are not yet fully supported.**
### Install development tools
@ -89,7 +89,7 @@ some development tools to be installed first, as follows.
$ sudo apt-get update && sudo apt-get -y install curl python3 git make g++
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
$ . ~/.bashrc
$ nvm install 16
$ nvm install 18
```
The `curl` command line above uses
@ -106,7 +106,7 @@ recommended.
```sh
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
$ . ~/.bashrc
$ nvm install 16
$ nvm install 18
```
#### **Windows** (not WSL)
@ -114,7 +114,7 @@ $ nvm install 16
Install:
* If you'd like the ability to switch between Node.js versions, install
- Node.js v16 from the [Nodejs.org releases page](https://nodejs.org/en/download/releases/).
- Node.js v18 from the [Nodejs.org releases page](https://nodejs.org/en/download/releases/).
[nvm-windows](https://github.com/coreybutler/nvm-windows#node-version-manager-nvm-for-windows)
instead.
* The [MSYS2 shell](https://www.msys2.org/), which provides `git`, `make`, `g++` and more:

View File

@ -167,7 +167,7 @@ async function handleHeadlessBuildStream(
// been started
let message: HeadlessBuilderMessage;
try {
const response = await streamToPromise(stream as NodeJS.ReadWriteStream);
const response = await streamToPromise(stream as NodeJS.ReadStream);
message = JSON.parse(response.toString());
} catch (e) {
if (e.code === 'SIGINT') {
@ -419,7 +419,7 @@ async function getRemoteBuildStream(
if (build.opts.headless) {
stream = buildRequest;
} else {
stream = buildRequest.pipe(JSONStream.parse('*'));
stream = buildRequest.pipe(JSONStream.parse('*')) as NodeJS.ReadStream;
}
stream = stream
.once('error', () => uploadSpinner.stop())

98
npm-shrinkwrap.json generated
View File

@ -135,7 +135,7 @@
"@types/ndjson": "^2.0.1",
"@types/net-keepalive": "^0.4.1",
"@types/nock": "^11.1.0",
"@types/node": "^16.18.25",
"@types/node": "^18.17.6",
"@types/node-cleanup": "^2.1.2",
"@types/parse-link-header": "^1.0.1",
"@types/prettyjson": "^0.0.30",
@ -181,7 +181,7 @@
"typescript": "^5.1.3"
},
"engines": {
"node": ">=16 <18"
"node": ">=18 <20"
},
"optionalDependencies": {
"windosu": "^0.3.0"
@ -1118,9 +1118,9 @@
}
},
"node_modules/@babel/generator/node_modules/@babel/types": {
"version": "7.22.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz",
"integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==",
"version": "7.22.11",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz",
"integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==",
"dev": true,
"dependencies": {
"@babel/helper-string-parser": "^7.22.5",
@ -1154,9 +1154,9 @@
}
},
"node_modules/@babel/helper-function-name/node_modules/@babel/types": {
"version": "7.22.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz",
"integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==",
"version": "7.22.11",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz",
"integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==",
"dev": true,
"dependencies": {
"@babel/helper-string-parser": "^7.22.5",
@ -1296,9 +1296,9 @@
}
},
"node_modules/@babel/template/node_modules/@babel/parser": {
"version": "7.22.10",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz",
"integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==",
"version": "7.22.13",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.13.tgz",
"integrity": "sha512-3l6+4YOvc9wx7VlCSw4yQfcBo01ECA8TicQfbnCPuCEpRQrf+gTUyGdxNw+pyTUyywp6JRD1w0YQs9TpBXYlkw==",
"dev": true,
"bin": {
"parser": "bin/babel-parser.js"
@ -1308,9 +1308,9 @@
}
},
"node_modules/@babel/template/node_modules/@babel/types": {
"version": "7.22.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz",
"integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==",
"version": "7.22.11",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz",
"integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==",
"dev": true,
"dependencies": {
"@babel/helper-string-parser": "^7.22.5",
@ -1343,9 +1343,9 @@
}
},
"node_modules/@babel/traverse/node_modules/@babel/parser": {
"version": "7.22.10",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz",
"integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==",
"version": "7.22.13",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.13.tgz",
"integrity": "sha512-3l6+4YOvc9wx7VlCSw4yQfcBo01ECA8TicQfbnCPuCEpRQrf+gTUyGdxNw+pyTUyywp6JRD1w0YQs9TpBXYlkw==",
"dev": true,
"bin": {
"parser": "bin/babel-parser.js"
@ -1355,9 +1355,9 @@
}
},
"node_modules/@babel/traverse/node_modules/@babel/types": {
"version": "7.22.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz",
"integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==",
"version": "7.22.11",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz",
"integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==",
"dev": true,
"dependencies": {
"@babel/helper-string-parser": "^7.22.5",
@ -3082,9 +3082,9 @@
}
},
"node_modules/@types/node": {
"version": "16.18.43",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.43.tgz",
"integrity": "sha512-YFpgPKPRcwYbeNOimfu70B+TVJe6tr88WiW/TzEldkwGxQXrmabpU+lDjrFlNqdqIi3ON0o69EQBW62VH4MIxw=="
"version": "18.17.12",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.12.tgz",
"integrity": "sha512-d6xjC9fJ/nSnfDeU0AMDsaJyb1iHsqCSOdi84w4u+SlN/UgQdY5tRhpMzaFYsI4mnpvgTivEaQd0yOUhAtOnEQ=="
},
"node_modules/@types/node-cleanup": {
"version": "2.1.2",
@ -4217,6 +4217,11 @@
"node": ">=16.0"
}
},
"node_modules/balena-sdk/node_modules/@types/node": {
"version": "16.18.46",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.46.tgz",
"integrity": "sha512-Mnq3O9Xz52exs3mlxMcQuA7/9VFe/dXcrgAyfjLkABIqxXKOgBRjyazTxUbjsxDa4BP7hhPliyjVTP9RDP14xg=="
},
"node_modules/balena-sdk/node_modules/date-fns": {
"version": "2.30.0",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz",
@ -23103,9 +23108,9 @@
},
"dependencies": {
"@babel/types": {
"version": "7.22.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz",
"integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==",
"version": "7.22.11",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz",
"integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==",
"dev": true,
"requires": {
"@babel/helper-string-parser": "^7.22.5",
@ -23132,9 +23137,9 @@
},
"dependencies": {
"@babel/types": {
"version": "7.22.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz",
"integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==",
"version": "7.22.11",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz",
"integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==",
"dev": true,
"requires": {
"@babel/helper-string-parser": "^7.22.5",
@ -23242,15 +23247,15 @@
},
"dependencies": {
"@babel/parser": {
"version": "7.22.10",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz",
"integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==",
"version": "7.22.13",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.13.tgz",
"integrity": "sha512-3l6+4YOvc9wx7VlCSw4yQfcBo01ECA8TicQfbnCPuCEpRQrf+gTUyGdxNw+pyTUyywp6JRD1w0YQs9TpBXYlkw==",
"dev": true
},
"@babel/types": {
"version": "7.22.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz",
"integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==",
"version": "7.22.11",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz",
"integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==",
"dev": true,
"requires": {
"@babel/helper-string-parser": "^7.22.5",
@ -23279,15 +23284,15 @@
},
"dependencies": {
"@babel/parser": {
"version": "7.22.10",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz",
"integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==",
"version": "7.22.13",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.13.tgz",
"integrity": "sha512-3l6+4YOvc9wx7VlCSw4yQfcBo01ECA8TicQfbnCPuCEpRQrf+gTUyGdxNw+pyTUyywp6JRD1w0YQs9TpBXYlkw==",
"dev": true
},
"@babel/types": {
"version": "7.22.10",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz",
"integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==",
"version": "7.22.11",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz",
"integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==",
"dev": true,
"requires": {
"@babel/helper-string-parser": "^7.22.5",
@ -24782,9 +24787,9 @@
}
},
"@types/node": {
"version": "16.18.43",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.43.tgz",
"integrity": "sha512-YFpgPKPRcwYbeNOimfu70B+TVJe6tr88WiW/TzEldkwGxQXrmabpU+lDjrFlNqdqIi3ON0o69EQBW62VH4MIxw=="
"version": "18.17.12",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.12.tgz",
"integrity": "sha512-d6xjC9fJ/nSnfDeU0AMDsaJyb1iHsqCSOdi84w4u+SlN/UgQdY5tRhpMzaFYsI4mnpvgTivEaQd0yOUhAtOnEQ=="
},
"@types/node-cleanup": {
"version": "2.1.2",
@ -25738,6 +25743,11 @@
"tslib": "^2.1.0"
},
"dependencies": {
"@types/node": {
"version": "16.18.46",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.46.tgz",
"integrity": "sha512-Mnq3O9Xz52exs3mlxMcQuA7/9VFe/dXcrgAyfjLkABIqxXKOgBRjyazTxUbjsxDa4BP7hhPliyjVTP9RDP14xg=="
},
"date-fns": {
"version": "2.30.0",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz",

View File

@ -89,7 +89,7 @@
"author": "Balena Inc. (https://balena.io/)",
"license": "Apache-2.0",
"engines": {
"node": ">=16 <18"
"node": ">=18 <20"
},
"husky": {
"hooks": {
@ -147,7 +147,7 @@
"@types/ndjson": "^2.0.1",
"@types/net-keepalive": "^0.4.1",
"@types/nock": "^11.1.0",
"@types/node": "^16.18.25",
"@types/node": "^18.17.6",
"@types/node-cleanup": "^2.1.2",
"@types/parse-link-header": "^1.0.1",
"@types/prettyjson": "^0.0.30",

View File

@ -84,8 +84,8 @@
The file must be distributed with executable as %2.
%1: node_modules/opn/xdg-open
%2: path-to-executable/xdg-open
prebuild-install warn install No prebuilt binaries found (target=v16.16.0 runtime=node arch=x64 libc= platform=darwin)
prebuild-install warn install No prebuilt binaries found (target=v16.16.0 runtime=node arch=x64 libc= platform=darwin)
prebuild-install warn install No prebuilt binaries found (target=v16.16.0 runtime=node arch=x64 libc= platform=darwin)
prebuild-install warn install No prebuilt binaries found (target=v16.16.0 runtime=node arch=x64 libc= platform=darwin)
prebuild-install warn install No prebuilt binaries found (target=v16.16.0 runtime=node arch=x64 libc= platform=darwin)
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=x64 libc= platform=darwin)
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=x64 libc= platform=darwin)
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=x64 libc= platform=darwin)
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=x64 libc= platform=darwin)
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=x64 libc= platform=darwin)

View File

@ -84,7 +84,7 @@
The file must be distributed with executable as %2.
%1: node_modules/opn/xdg-open
%2: path-to-executable/xdg-open
prebuild-install warn install No prebuilt binaries found (target=v16.16.0 runtime=node arch=arm64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v16.16.0 runtime=node arch=arm64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v16.16.0 runtime=node arch=arm64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v16.16.0 runtime=node arch=arm64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=arm64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=arm64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=arm64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=arm64 libc= platform=linux)

View File

@ -84,7 +84,7 @@
The file must be distributed with executable as %2.
%1: node_modules/opn/xdg-open
%2: path-to-executable/xdg-open
prebuild-install warn install No prebuilt binaries found (target=v16.16.0 runtime=node arch=x64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v16.16.0 runtime=node arch=x64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v16.16.0 runtime=node arch=x64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v16.16.0 runtime=node arch=x64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=x64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=x64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=x64 libc= platform=linux)
prebuild-install warn install No prebuilt binaries found (target=v18.5.0 runtime=node arch=x64 libc= platform=linux)