From 71d9da8b487791b894c959b9a44ef63f7e598360 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 01:07:03 +0000 Subject: [PATCH 1/2] Update typescript-eslint monorepo to v7 --- package-lock.json | 176 +++++++++--------- .../eslint-config-typescript/package.json | 4 +- .../package.json | 4 +- packages/eslint-plugin-nest/package.json | 6 +- 4 files changed, 95 insertions(+), 95 deletions(-) diff --git a/package-lock.json b/package-lock.json index fae7d20a..33450a6c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2345,32 +2345,32 @@ "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", - "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", - "dependencies": { - "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/type-utils": "6.21.0", - "@typescript-eslint/utils": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.8.0.tgz", + "integrity": "sha512-gFTT+ezJmkwutUPmB0skOj3GZJtlEGnlssems4AjkVweUPGj7jRwwqg0Hhg7++kPGJqKtTYx+R05Ftww372aIg==", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "7.8.0", + "@typescript-eslint/type-utils": "7.8.0", + "@typescript-eslint/utils": "7.8.0", + "@typescript-eslint/visitor-keys": "7.8.0", "debug": "^4.3.4", "graphemer": "^1.4.0", - "ignore": "^5.2.4", + "ignore": "^5.3.1", "natural-compare": "^1.4.0", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -2379,25 +2379,25 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", - "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", - "dependencies": { - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/typescript-estree": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.8.0.tgz", + "integrity": "sha512-KgKQly1pv0l4ltcftP59uQZCi4HUYswCLbTqVZEJu7uLX8CTLyswqMLqLN+2QFz4jCptqWVV4SB7vdxcH2+0kQ==", + "dependencies": { + "@typescript-eslint/scope-manager": "7.8.0", + "@typescript-eslint/types": "7.8.0", + "@typescript-eslint/typescript-estree": "7.8.0", + "@typescript-eslint/visitor-keys": "7.8.0", "debug": "^4.3.4" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -2406,19 +2406,19 @@ } }, "node_modules/@typescript-eslint/rule-tester": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/rule-tester/-/rule-tester-6.21.0.tgz", - "integrity": "sha512-twxQo4He8+AQ/YG70Xt7Fl/ImBLpi7qElxHN6/aK+U4z97JsITCG7DdIIUw5M+qKtDMCYkZCEE2If8dnHI7jWA==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/rule-tester/-/rule-tester-7.8.0.tgz", + "integrity": "sha512-f1wXWeZx8XJB/z9Oyjx0ZLmhvcFelSJ0CVvOurCkrISOZhre+imIj5FQQz1rBy/Ips0dCbVl5G4MWTuzlzj5QQ==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.21.0", - "@typescript-eslint/utils": "6.21.0", - "ajv": "^6.10.0", + "@typescript-eslint/typescript-estree": "7.8.0", + "@typescript-eslint/utils": "7.8.0", + "ajv": "^6.12.6", "lodash.merge": "4.6.2", - "semver": "^7.5.4" + "semver": "^7.6.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -2426,19 +2426,19 @@ }, "peerDependencies": { "@eslint/eslintrc": ">=2", - "eslint": ">=8" + "eslint": "^8.56.0" } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", - "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.8.0.tgz", + "integrity": "sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g==", "dependencies": { - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0" + "@typescript-eslint/types": "7.8.0", + "@typescript-eslint/visitor-keys": "7.8.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -2446,24 +2446,24 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", - "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.8.0.tgz", + "integrity": "sha512-H70R3AefQDQpz9mGv13Uhi121FNMh+WEaRqcXTX09YEDky21km4dV1ZXJIp8QjXc4ZaVkXVdohvWDzbnbHDS+A==", "dependencies": { - "@typescript-eslint/typescript-estree": "6.21.0", - "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/typescript-estree": "7.8.0", + "@typescript-eslint/utils": "7.8.0", "debug": "^4.3.4", - "ts-api-utils": "^1.0.1" + "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -2472,11 +2472,11 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", - "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.8.0.tgz", + "integrity": "sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw==", "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -2484,21 +2484,21 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", - "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.8.0.tgz", + "integrity": "sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg==", "dependencies": { - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", + "@typescript-eslint/types": "7.8.0", + "@typescript-eslint/visitor-keys": "7.8.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "minimatch": "9.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -2519,9 +2519,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -2533,39 +2533,39 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", - "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.8.0.tgz", + "integrity": "sha512-L0yFqOCflVqXxiZyXrDr80lnahQfSOfc9ELAAZ75sqicqp2i36kEZZGuUymHNFoYOqxRT05up760b4iGsl02nQ==", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/typescript-estree": "6.21.0", - "semver": "^7.5.4" + "@types/json-schema": "^7.0.15", + "@types/semver": "^7.5.8", + "@typescript-eslint/scope-manager": "7.8.0", + "@typescript-eslint/types": "7.8.0", + "@typescript-eslint/typescript-estree": "7.8.0", + "semver": "^7.6.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", - "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.8.0.tgz", + "integrity": "sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA==", "dependencies": { - "@typescript-eslint/types": "6.21.0", - "eslint-visitor-keys": "^3.4.1" + "@typescript-eslint/types": "7.8.0", + "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -10638,8 +10638,8 @@ "version": "2.0.0-27", "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "^6.7.4", - "@typescript-eslint/parser": "^6.7.4", + "@typescript-eslint/eslint-plugin": "^7.0.0", + "@typescript-eslint/parser": "^7.0.0", "eslint-plugin-import": "^2.29.1" }, "devDependencies": { @@ -10735,8 +10735,8 @@ "version": "2.0.0-27", "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "^6.7.4", - "@typescript-eslint/parser": "^6.7.4", + "@typescript-eslint/eslint-plugin": "^7.0.0", + "@typescript-eslint/parser": "^7.0.0", "eslint-plugin-import": "^2.28.1" }, "engines": { @@ -10748,8 +10748,8 @@ "version": "2.0.0-27", "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "^6.11.0", - "@typescript-eslint/utils": "^6.11.0" + "@typescript-eslint/typescript-estree": "^7.0.0", + "@typescript-eslint/utils": "^7.0.0" }, "devDependencies": { "@code-style/eslint-config": "^2.0.0-27", @@ -10759,7 +10759,7 @@ "@code-style/typescript-configs": "^2.0.0-27", "@types/eslint": "^8.44.2", "@types/node": "^20.6.3", - "@typescript-eslint/rule-tester": "^6.11.0", + "@typescript-eslint/rule-tester": "^7.0.0", "jest": "^29.7.0", "ts-jest": "^29.1.1", "tsm": "^2.3.0", diff --git a/packages/eslint-config-typescript/package.json b/packages/eslint-config-typescript/package.json index 892284a1..55f980e3 100644 --- a/packages/eslint-config-typescript/package.json +++ b/packages/eslint-config-typescript/package.json @@ -32,8 +32,8 @@ "test:debug": "NODE_OPTS='--inspect-brk' npm run test" }, "dependencies": { - "@typescript-eslint/eslint-plugin": "^6.7.4", - "@typescript-eslint/parser": "^6.7.4", + "@typescript-eslint/eslint-plugin": "^7.0.0", + "@typescript-eslint/parser": "^7.0.0", "eslint-plugin-import": "^2.29.1" }, "devDependencies": { diff --git a/packages/eslint-npm-hoist-packages-typescript/package.json b/packages/eslint-npm-hoist-packages-typescript/package.json index 6f7f8c02..404b4097 100644 --- a/packages/eslint-npm-hoist-packages-typescript/package.json +++ b/packages/eslint-npm-hoist-packages-typescript/package.json @@ -18,8 +18,8 @@ "test": "echo 'No tests'; exit 0" }, "dependencies": { - "@typescript-eslint/eslint-plugin": "^6.7.4", - "@typescript-eslint/parser": "^6.7.4", + "@typescript-eslint/eslint-plugin": "^7.0.0", + "@typescript-eslint/parser": "^7.0.0", "eslint-plugin-import": "^2.28.1" }, "engines": { diff --git a/packages/eslint-plugin-nest/package.json b/packages/eslint-plugin-nest/package.json index 57f6dc8e..609ab309 100644 --- a/packages/eslint-plugin-nest/package.json +++ b/packages/eslint-plugin-nest/package.json @@ -28,8 +28,8 @@ "test": "NODE_OPTIONS=--experimental-vm-modules npx jest" }, "dependencies": { - "@typescript-eslint/typescript-estree": "^6.11.0", - "@typescript-eslint/utils": "^6.11.0" + "@typescript-eslint/typescript-estree": "^7.0.0", + "@typescript-eslint/utils": "^7.0.0" }, "devDependencies": { "@code-style/eslint-config": "^2.0.0-27", @@ -39,7 +39,7 @@ "@code-style/typescript-configs": "^2.0.0-27", "@types/eslint": "^8.44.2", "@types/node": "^20.6.3", - "@typescript-eslint/rule-tester": "^6.11.0", + "@typescript-eslint/rule-tester": "^7.0.0", "jest": "^29.7.0", "ts-jest": "^29.1.1", "tsm": "^2.3.0", From 459c3c8e3ce897612e630bbdc38670be4f855877 Mon Sep 17 00:00:00 2001 From: Louis Orleans Date: Tue, 30 Apr 2024 20:10:09 -0700 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=9A=A8=20use=20unknown=20in=20`catch`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/create-configs/src/rc-file.ts | 2 +- scripts/concurrently-ws.ts | 28 ++++++++++++++++++-------- utils/testing/eslint/tests.ts | 2 +- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/packages/create-configs/src/rc-file.ts b/packages/create-configs/src/rc-file.ts index 3d2617d8..3255b123 100644 --- a/packages/create-configs/src/rc-file.ts +++ b/packages/create-configs/src/rc-file.ts @@ -22,7 +22,7 @@ export async function load_rc({ .then>( (str) => (parse(str) ?? {}) as Partial, ) - .catch((err) => { + .catch((err: unknown) => { if (throw_no_config) throw err; else return {}; }); diff --git a/scripts/concurrently-ws.ts b/scripts/concurrently-ws.ts index 5f1b6b43..7c17649c 100755 --- a/scripts/concurrently-ws.ts +++ b/scripts/concurrently-ws.ts @@ -29,15 +29,27 @@ const res = concurrently( { group: true, raw: true }, ); -await res.result.catch((err: CloseEvent[]) => { - console.error('The following commands failed:'); - console.error( - err - .filter((ev) => ev.exitCode !== 0) - .map((ev) => `"${ev.command.command}"`) - .join(', '), - ); +await res.result.catch((err: unknown) => { + if (is_close_event_array(err)) { + console.error('The following commands failed:'); + console.error( + err + .filter((ev) => ev.exitCode !== 0) + .map((ev) => `"${ev.command.command}"`) + .join(', '), + ); + } process.exit(1); }); +function is_close_event_array(arr: unknown): arr is CloseEvent[] { + return Array.isArray(arr) && is_close_event(arr[0]); +} + +function is_close_event(ev: unknown): ev is CloseEvent { + return ( + ev != null && typeof ev === 'object' && 'command' in ev && 'exitCode' in ev + ); +} + /* eslint-enable n/no-sync */ diff --git a/utils/testing/eslint/tests.ts b/utils/testing/eslint/tests.ts index f7cea771..f57227b9 100644 --- a/utils/testing/eslint/tests.ts +++ b/utils/testing/eslint/tests.ts @@ -145,7 +145,7 @@ export async function setup_tmp_dir( join(cwd(), '../..', 'node_modules'), join(tmp_dir, 'node_modules'), ), - ]).catch(console.error); + ]).catch((err: unknown) => console.error(err)); }); ctx.after(() => rm(tmp_dir, { force: true, recursive: true }));