mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-24 07:46:39 +00:00
Update to node 14
This commit is contained in:
parent
578de7bcd4
commit
b11c7157d3
3
.github/actions/publish/action.yml
vendored
3
.github/actions/publish/action.yml
vendored
@ -15,8 +15,7 @@ inputs:
|
||||
default: "accounts+apple@balena.io"
|
||||
NODE_VERSION:
|
||||
type: string
|
||||
# FIXME: (please) https://github.com/balena-io/balena-cli/issues/2165
|
||||
default: "12.x"
|
||||
default: "14.x"
|
||||
VERBOSE:
|
||||
type: string
|
||||
default: "true"
|
||||
|
3
.github/actions/test/action.yml
vendored
3
.github/actions/test/action.yml
vendored
@ -12,8 +12,7 @@ inputs:
|
||||
# --- custom environment
|
||||
NODE_VERSION:
|
||||
type: string
|
||||
# FIXME: (please) https://github.com/balena-io/balena-cli/issues/2165
|
||||
default: "12.x"
|
||||
default: "14.x"
|
||||
VERBOSE:
|
||||
type: string
|
||||
default: "true"
|
||||
|
@ -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 12 (min 12.8.0).**
|
||||
> **Versions 13 and later are not yet fully supported.**
|
||||
> **The balena CLI currently requires Node.js version 14.**
|
||||
> **Versions 15 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 12
|
||||
$ nvm install 14
|
||||
```
|
||||
|
||||
The `curl` command line above uses
|
||||
@ -106,14 +106,14 @@ recommended.
|
||||
```sh
|
||||
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
|
||||
$ . ~/.bashrc
|
||||
$ nvm install 12
|
||||
$ nvm install 14
|
||||
```
|
||||
|
||||
#### **Windows** (not WSL)
|
||||
|
||||
Install:
|
||||
|
||||
* Node.js v12 from the [Nodejs.org releases page](https://nodejs.org/en/download/releases/).
|
||||
* Node.js v14 from the [Nodejs.org releases page](https://nodejs.org/en/download/releases/).
|
||||
* If you'd like the ability to switch between Node.js versions, install
|
||||
[nvm-windows](https://github.com/coreybutler/nvm-windows#node-version-manager-nvm-for-windows)
|
||||
instead.
|
||||
|
@ -151,11 +151,12 @@ export async function runRemoteCommand({
|
||||
let exitCode: number | undefined;
|
||||
let exitSignal: NodeJS.Signals | undefined;
|
||||
try {
|
||||
[exitCode, exitSignal] = await new Promise<[number, NodeJS.Signals]>(
|
||||
(resolve, reject) => {
|
||||
[exitCode, exitSignal] = await new Promise((resolve, reject) => {
|
||||
const ps = spawn(program, args, { stdio })
|
||||
.on('error', reject)
|
||||
.on('close', (code, signal) => resolve([code, signal]));
|
||||
.on('close', (code, signal) =>
|
||||
resolve([code ?? undefined, signal ?? undefined]),
|
||||
);
|
||||
|
||||
if (ps.stdin && stdin && typeof stdin !== 'string') {
|
||||
stdin.pipe(ps.stdin);
|
||||
|
14
npm-shrinkwrap.json
generated
14
npm-shrinkwrap.json
generated
@ -1421,6 +1421,14 @@
|
||||
"tslint-no-unused-expression-chai": "^0.1.4",
|
||||
"typescript": "^4.2.4",
|
||||
"yargs": "^16.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "12.20.55",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz",
|
||||
"integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@balena/node-beaglebone-usbboot": {
|
||||
@ -2888,9 +2896,9 @@
|
||||
}
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "12.20.42",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.42.tgz",
|
||||
"integrity": "sha512-aI3/oo5DzyiI5R/xAhxxRzfZlWlsbbqdgxfTPkqu/Zt+23GXiJvMCyPJT4+xKSXOnLqoL8jJYMLTwvK2M3a5hw=="
|
||||
"version": "14.18.36",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.36.tgz",
|
||||
"integrity": "sha512-FXKWbsJ6a1hIrRxv+FoukuHnGTgEzKYGi7kilfMae96AL9UNkPFNWJEEYWzdRI9ooIkbr4AKldyuSTLql06vLQ=="
|
||||
},
|
||||
"@types/node-cleanup": {
|
||||
"version": "2.1.2",
|
||||
|
@ -89,7 +89,7 @@
|
||||
"author": "Balena Inc. (https://balena.io/)",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=12 <16"
|
||||
"node": ">=14 <16"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
@ -145,7 +145,7 @@
|
||||
"@types/ndjson": "^2.0.1",
|
||||
"@types/net-keepalive": "^0.4.1",
|
||||
"@types/nock": "^11.1.0",
|
||||
"@types/node": "^12.20.42",
|
||||
"@types/node": "^14.18.36",
|
||||
"@types/node-cleanup": "^2.1.2",
|
||||
"@types/parse-link-header": "^1.0.1",
|
||||
"@types/prettyjson": "^0.0.30",
|
||||
|
@ -178,7 +178,7 @@ async function startMockSshServer(): Promise<[Server, number]> {
|
||||
});
|
||||
|
||||
return await new Promise<[Server, number]>((resolve, reject) => {
|
||||
// TODO: remove 'as any' below. According to @types/node v12.20.42, the
|
||||
// TODO: remove 'as any' below. According to @types/node v14.18.36, the
|
||||
// callback type is `() => void`, but our code assumes `(err: Error) => void`
|
||||
const listener = (server.listen as any)(0, '127.0.0.1', (err: Error) => {
|
||||
// this callback is called for the 'listening' event
|
||||
|
@ -113,7 +113,7 @@ async function createProxyServer(): Promise<[number, number]> {
|
||||
let proxyPort = 0; // TCP port number, 0 means automatic allocation
|
||||
|
||||
await new Promise<void>((resolve, reject) => {
|
||||
// TODO: remove 'as any' below. According to @types/node v12.20.42, the
|
||||
// TODO: remove 'as any' below. According to @types/node v14.18.36, the
|
||||
// callback type is `() => void`, but our code assumes `(err: Error) => void`
|
||||
const listener = (server.listen as any)(0, '127.0.0.1', (err: Error) => {
|
||||
if (err) {
|
||||
@ -197,7 +197,7 @@ async function createInterceptorServer(): Promise<number> {
|
||||
let interceptorPort = 0;
|
||||
|
||||
await new Promise<void>((resolve, reject) => {
|
||||
// TODO: remove 'as any' below. According to @types/node v12.20.42, the
|
||||
// TODO: remove 'as any' below. According to @types/node v14.18.36, the
|
||||
// callback type is `() => void`, but our code assumes `(err: Error) => void`
|
||||
const listener = (server.listen as any)(0, '127.0.0.1', (err: Error) => {
|
||||
if (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user