From 03a3ef38e1f9feface22dbaed0c4db0051517f57 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Thu, 13 Dec 2018 22:02:27 +0100 Subject: [PATCH] Fix deploy action on node 6 Downgrade @types/node to version 6 as we support node6 Change-type: patch --- lib/utils/device/deploy.ts | 2 +- lib/utils/patterns.ts | 4 +++- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/utils/device/deploy.ts b/lib/utils/device/deploy.ts index 6efe0682..e830c360 100644 --- a/lib/utils/device/deploy.ts +++ b/lib/utils/device/deploy.ts @@ -196,7 +196,7 @@ function assignOutputHandlers(buildTasks: BuildTask[], logger: Logger) { } else { task.streamHook = stream => { stream.on('data', (buf: Buffer) => { - const str = buf.toString().trimRight(); + const str = _.trimEnd(buf.toString()); if (str !== '') { displayBuildLog( { serviceName: task.serviceName, message: str }, diff --git a/lib/utils/patterns.ts b/lib/utils/patterns.ts index 03496148..6cdc50bc 100644 --- a/lib/utils/patterns.ts +++ b/lib/utils/patterns.ts @@ -283,5 +283,7 @@ export function exitWithExpectedError(message: string | Error): never { } printErrorMessage(message); - return process.exit(1); + process.exit(1); + // The following throw is to make tsc happy about the `never` return type. + throw new Error('exit'); } diff --git a/package.json b/package.json index 842f66c4..d394323c 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "@types/is-root": "1.0.0", "@types/lodash": "4.14.103", "@types/mkdirp": "0.5.2", - "@types/node": "10.5.2", + "@types/node": "6.14.2", "@types/prettyjson": "0.0.28", "@types/raven": "2.5.1", "catch-uncommitted": "^1.0.0",