From 33a4a5e642e55e6ed9a0f28f8f0a9e967696d26e Mon Sep 17 00:00:00 2001 From: Elias Kassell Date: Tue, 26 Mar 2024 11:39:43 +0000 Subject: [PATCH] Bump TS node types to match current node version, to fix annoying node warning --- cli/api/commands/compile.ts | 2 +- cli/api/commands/run.ts | 2 +- cli/api/utils/cancellable_promise.ts | 4 ++-- cli/console.ts | 2 +- package.json | 2 +- yarn.lock | 8 ++++---- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cli/api/commands/compile.ts b/cli/api/commands/compile.ts index 315c9799b..f57f9e982 100644 --- a/cli/api/commands/compile.ts +++ b/cli/api/commands/compile.ts @@ -65,7 +65,7 @@ export async function compile( compiledGraph = dataform.CompiledGraph.create(decodedResult.compile.compiledGraph); if (workflowSettingsDataformCoreVersion) { - fs.rmdirSync(temporaryProjectPath, { recursive: true }); + fs.rmSync(temporaryProjectPath, { recursive: true }); } return compiledGraph; diff --git a/cli/api/commands/run.ts b/cli/api/commands/run.ts index a57d9954f..b01dfbb51 100644 --- a/cli/api/commands/run.ts +++ b/cli/api/commands/run.ts @@ -131,7 +131,7 @@ export class Runner { public cancel() { this.cancelled = true; - this.eEmitter.emit(CANCEL_EVENT); + this.eEmitter.emit(CANCEL_EVENT, undefined, undefined); } public async result(): Promise { diff --git a/cli/api/utils/cancellable_promise.ts b/cli/api/utils/cancellable_promise.ts index c821652a3..6e69f8dab 100644 --- a/cli/api/utils/cancellable_promise.ts +++ b/cli/api/utils/cancellable_promise.ts @@ -32,7 +32,7 @@ export class CancellablePromise implements PromiseLike { ): Promise { // TODO: Seems like local and remote bazel builds behave // differently and I can't get this to type correctly for both. - return (this.promise.then(onfulfilled, onrejected) as any); + return this.promise.then(onfulfilled, onrejected) as any; } public catch(onRejected?: (reason: any) => PromiseLike): Promise { @@ -41,6 +41,6 @@ export class CancellablePromise implements PromiseLike { public cancel(): void { this.cancelled = true; - this.emitter.emit(CancellablePromise.CANCEL_EVENT); + this.emitter.emit(CancellablePromise.CANCEL_EVENT, undefined, undefined); } } diff --git a/cli/console.ts b/cli/console.ts index 7e65d8487..a304173ae 100644 --- a/cli/console.ts +++ b/cli/console.ts @@ -232,7 +232,7 @@ export function printExecutedAction( switch (executionAction.type) { case "table": { writeStdOut( - `${successOutput("Dataset created: ")} ${datasetString( + `${successOutput("Table created: ")} ${datasetString( executionAction.target, executionAction.tableType, executionAction.tasks.length === 0 diff --git a/package.json b/package.json index a93a961ef..29d1d5714 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "@types/json-stable-stringify": "^1.0.32", "@types/long": "^4.0.0", "@types/moo": "^0.5.0", - "@types/node": "^12.12.6", + "@types/node": "^16.16.0", "@types/readline-sync": "^1.4.3", "@types/request": "^2.48.3", "@types/rimraf": "^2.0.2", diff --git a/yarn.lock b/yarn.lock index 4c720de1b..7f47c2f7d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -401,10 +401,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.38.tgz#f8bb07c371ccb1903f3752872c89f44006132947" integrity "sha1-+LsHw3HMsZA/N1KHLIn0QAYTKUc= sha512-5jY9RhV7c0Z4Jy09G+NIDTsCZ5G0L5n+Z+p+Y7t5VJHM30bgwzSjVtlcBxqAj+6L/swIlvtOSzr8rBk/aNyV2g==" -"@types/node@^12.12.6": - version "12.12.42" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.42.tgz#d0d1149336bd07540dd1ea576692829d575dec34" - integrity "sha1-0NEUkza9B1QN0epXZpKCnVdd7DQ= sha512-R/9QdYFLL9dE9l5cWWzWIZByVGFd7lk7JVOJ7KD+E1SJ4gni7XJRLz9QTjyYQiHIqEAgku9VgxdLjMlhhUaAFg==" +"@types/node@^16.16.0": + version "16.18.91" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.91.tgz#3e7b3b3d28f740e3e2d4ceb7ad9d16e6b9277c91" + integrity sha512-h8Q4klc8xzc9kJKr7UYNtJde5TU2qEePVyH3WyzJaUC+3ptyc5kPQbWOIUcn8ZsG5+KSkq+P0py0kC0VqxgAXw== "@types/readline-sync@^1.4.3": version "1.4.3"