From 77f21c1ba1e9864ef7a7aea3c4e84b8f6428f5d7 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 17 May 2023 13:57:47 +0000 Subject: [PATCH] build: update @types/node to `16.11.7` Node.js 14 is no longer supported. --- goldens/public-api/angular_devkit/schematics/index.md | 2 -- .../public-api/angular_devkit/schematics/testing/index.md | 2 -- .../public-api/angular_devkit/schematics/tools/index.md | 2 -- package.json | 2 +- .../angular_devkit/benchmark/src/monitored-process.ts | 6 ++++-- .../schematics_cli/blank/project-files/package.json | 2 +- .../schematics_cli/schematic/files/package.json | 2 +- .../angular/utility/latest-versions/package.json | 2 +- tests/legacy-cli/e2e/utils/process.ts | 4 ++-- yarn.lock | 8 ++++---- 10 files changed, 14 insertions(+), 18 deletions(-) diff --git a/goldens/public-api/angular_devkit/schematics/index.md b/goldens/public-api/angular_devkit/schematics/index.md index 67d13a8788..3bcb4150f2 100644 --- a/goldens/public-api/angular_devkit/schematics/index.md +++ b/goldens/public-api/angular_devkit/schematics/index.md @@ -4,8 +4,6 @@ ```ts -/// - import { BaseException } from '@angular-devkit/core'; import { JsonValue } from '@angular-devkit/core'; import { logging } from '@angular-devkit/core'; diff --git a/goldens/public-api/angular_devkit/schematics/testing/index.md b/goldens/public-api/angular_devkit/schematics/testing/index.md index 52b1cdb763..e64e6ae107 100644 --- a/goldens/public-api/angular_devkit/schematics/testing/index.md +++ b/goldens/public-api/angular_devkit/schematics/testing/index.md @@ -4,8 +4,6 @@ ```ts -/// - import { JsonValue } from '@angular-devkit/core'; import { logging } from '@angular-devkit/core'; import { Observable } from 'rxjs'; diff --git a/goldens/public-api/angular_devkit/schematics/tools/index.md b/goldens/public-api/angular_devkit/schematics/tools/index.md index 5c0a603041..d53e3fe776 100644 --- a/goldens/public-api/angular_devkit/schematics/tools/index.md +++ b/goldens/public-api/angular_devkit/schematics/tools/index.md @@ -4,8 +4,6 @@ ```ts -/// - import { BaseException } from '@angular-devkit/core'; import { JsonObject } from '@angular-devkit/core'; import { JsonValue } from '@angular-devkit/core'; diff --git a/package.json b/package.json index d6d8da637e..9a2be44f2e 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "@types/karma": "^6.3.0", "@types/less": "^3.0.3", "@types/loader-utils": "^2.0.0", - "@types/node": "^14.15.0", + "@types/node": "^16.11.7", "@types/node-fetch": "^2.1.6", "@types/npm-package-arg": "^6.1.0", "@types/pacote": "^11.1.3", diff --git a/packages/angular_devkit/benchmark/src/monitored-process.ts b/packages/angular_devkit/benchmark/src/monitored-process.ts index 7a303b541e..6c19b9f1f6 100644 --- a/packages/angular_devkit/benchmark/src/monitored-process.ts +++ b/packages/angular_devkit/benchmark/src/monitored-process.ts @@ -59,11 +59,13 @@ export class LocalMonitoredProcess implements MonitoredProcess { map((statsByProcess) => { // Ignore the spawned shell in the total process number. const pids = Object.keys(statsByProcess).filter( - (pid) => pid != childProcess.pid.toString(), + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + (pid) => pid != childProcess.pid!.toString(), ); const processes = pids.length; // We want most stats from the parent process. - const { pid, ppid, ctime, elapsed, timestamp } = statsByProcess[childProcess.pid]; + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const { pid, ppid, ctime, elapsed, timestamp } = statsByProcess[childProcess.pid!]; // CPU and memory should be agreggated. let cpu = 0; diff --git a/packages/angular_devkit/schematics_cli/blank/project-files/package.json b/packages/angular_devkit/schematics_cli/blank/project-files/package.json index 503155e525..fcb1026b18 100644 --- a/packages/angular_devkit/schematics_cli/blank/project-files/package.json +++ b/packages/angular_devkit/schematics_cli/blank/project-files/package.json @@ -18,7 +18,7 @@ "typescript": "~5.0.2" }, "devDependencies": { - "@types/node": "^14.15.0", + "@types/node": "^16.11.7", "@types/jasmine": "~4.3.0", "jasmine": "^4.0.0" } diff --git a/packages/angular_devkit/schematics_cli/schematic/files/package.json b/packages/angular_devkit/schematics_cli/schematic/files/package.json index bd27e4d3d7..8e363425f4 100644 --- a/packages/angular_devkit/schematics_cli/schematic/files/package.json +++ b/packages/angular_devkit/schematics_cli/schematic/files/package.json @@ -18,7 +18,7 @@ "typescript": "~5.0.2" }, "devDependencies": { - "@types/node": "^14.15.0", + "@types/node": "^16.11.7", "@types/jasmine": "~4.3.0", "jasmine": "~4.6.0" } diff --git a/packages/schematics/angular/utility/latest-versions/package.json b/packages/schematics/angular/utility/latest-versions/package.json index e4751b4d3e..693e80aa12 100644 --- a/packages/schematics/angular/utility/latest-versions/package.json +++ b/packages/schematics/angular/utility/latest-versions/package.json @@ -4,7 +4,7 @@ "private": true, "dependencies": { "@types/jasmine": "~4.3.0", - "@types/node": "^14.15.0", + "@types/node": "^16.11.7", "jasmine-core": "~4.6.0", "jasmine-spec-reporter": "~7.0.0", "karma-chrome-launcher": "~3.2.0", diff --git a/tests/legacy-cli/e2e/utils/process.ts b/tests/legacy-cli/e2e/utils/process.ts index a76c6ed839..48dbeddbf0 100644 --- a/tests/legacy-cli/e2e/utils/process.ts +++ b/tests/legacy-cli/e2e/utils/process.ts @@ -236,13 +236,13 @@ export async function killAllProcesses(signal = 'SIGTERM'): Promise { while (_processes.length) { const childProc = _processes.pop(); - if (!childProc) { + if (!childProc || childProc.pid === undefined) { continue; } processesToKill.push( new Promise((resolve) => { - treeKill(childProc.pid, signal, () => { + treeKill(childProc.pid!, signal, () => { // Ignore all errors. // This is due to a race condition with the `waitForMatch` logic. // where promises are resolved on matches and not when the process terminates. diff --git a/yarn.lock b/yarn.lock index b0ffa752f2..76d9e7a064 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3289,10 +3289,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== -"@types/node@^14.15.0": - version "14.18.44" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.44.tgz#1d42ba325c5b434ee78437378ef0b7589f32c151" - integrity sha512-Sg79dXC3jrRlG0QOLrK5eq2hRzpU4pkD7xBiYNYJ6r9OitJMxkpTpWf6m3qa2AWzb76uMHx+6x5T1Y/WAiS3nw== +"@types/node@^16.11.7": + version "16.18.31" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.31.tgz#7de39c2b9363f0d95b129cc969fcbf98e870251c" + integrity sha512-KPXltf4z4g517OlVJO9XQ2357CYw7fvuJ3ZuBynjXC5Jos9i+K7LvFb7bUIwtJXSZj0vTp9Q6NJBSQpkwwO8Zw== "@types/npm-package-arg@*", "@types/npm-package-arg@^6.1.0": version "6.1.1"