From 2c8440ebeebf54833ba0cfb0eb5df8e9939e667a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 9 Nov 2024 17:28:41 +0800 Subject: [PATCH] chore(deps): update typescript-eslint to v8.13.0 (#16825) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: fisker --- package.json | 6 +- .../traverse/visitor-keys.evaluate.js | 1 + src/language-js/utils/index.js | 19 +--- tests/unit/__snapshots__/visitor-keys.js.snap | 1 - yarn.lock | 90 +++++++++---------- 5 files changed, 50 insertions(+), 67 deletions(-) diff --git a/package.json b/package.json index 52b775b83..918464b58 100644 --- a/package.json +++ b/package.json @@ -37,8 +37,8 @@ "@glimmer/syntax": "0.92.3", "@prettier/is-es5-identifier-name": "0.2.0", "@prettier/parse-srcset": "3.1.0", - "@typescript-eslint/typescript-estree": "8.10.0", - "@typescript-eslint/visitor-keys": "8.10.0", + "@typescript-eslint/typescript-estree": "8.13.0", + "@typescript-eslint/visitor-keys": "8.13.0", "acorn": "8.14.0", "acorn-jsx": "5.3.2", "angular-estree-parser": "10.0.4", @@ -112,7 +112,7 @@ "@types/eslint__js": "8.42.3", "@types/estree": "1.0.6", "@types/file-entry-cache": "5.0.4", - "@typescript-eslint/eslint-plugin": "8.10.0", + "@typescript-eslint/eslint-plugin": "8.13.0", "benchmark": "2.1.4", "browserslist": "4.24.0", "browserslist-to-esbuild": "2.1.1", diff --git a/src/language-js/traverse/visitor-keys.evaluate.js b/src/language-js/traverse/visitor-keys.evaluate.js index fa892c55d..3de0e7c60 100644 --- a/src/language-js/traverse/visitor-keys.evaluate.js +++ b/src/language-js/traverse/visitor-keys.evaluate.js @@ -65,6 +65,7 @@ const excludeKeys = { ExportAllDeclaration: ["assertions"], ExportNamedDeclaration: ["assertions"], ImportDeclaration: ["assertions"], + ImportExpression: ["attributes"], // `key` and `constraint` added in `@typescript-eslint/typescript-estree` v8 // https://github.com/typescript-eslint/typescript-eslint/pull/7065 diff --git a/src/language-js/utils/index.js b/src/language-js/utils/index.js index 815b436b0..e403a722c 100644 --- a/src/language-js/utils/index.js +++ b/src/language-js/utils/index.js @@ -904,12 +904,6 @@ function getCallArguments(node) { if (node.type === "ImportExpression") { args = [node.source]; - // import attributes - if (node.attributes) { - args.push(node.attributes); - } - - // deprecated import assertions if (node.options) { args.push(node.options); } @@ -932,12 +926,6 @@ function iterateCallArgumentsPath(path, iteratee) { if (node.type === "ImportExpression") { path.call((sourcePath) => iteratee(sourcePath, 0), "source"); - // import attributes - if (node.attributes) { - path.call((sourcePath) => iteratee(sourcePath, 1), "attributes"); - } - - // deprecated import assertions if (node.options) { path.call((sourcePath) => iteratee(sourcePath, 1), "options"); } @@ -954,14 +942,9 @@ function getCallArgumentSelector(node, index) { } if (node.type === "ImportExpression") { - if (index === 0 || index === (node.attributes || node.options ? -2 : -1)) { + if (index === 0 || index === (node.options ? -2 : -1)) { return [...selectors, "source"]; } - // import attributes - if (node.attributes && (index === 1 || index === -1)) { - return [...selectors, "attributes"]; - } - // deprecated import assertions if (node.options && (index === 1 || index === -1)) { return [...selectors, "options"]; } diff --git a/tests/unit/__snapshots__/visitor-keys.js.snap b/tests/unit/__snapshots__/visitor-keys.js.snap index a02e97ce7..f0c91a150 100644 --- a/tests/unit/__snapshots__/visitor-keys.js.snap +++ b/tests/unit/__snapshots__/visitor-keys.js.snap @@ -424,7 +424,6 @@ exports[`visitor keys estree 1`] = ` "local", ], "ImportExpression": [ - "attributes", "options", "source", ], diff --git a/yarn.lock b/yarn.lock index e639a2e20..fe832510f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2007,15 +2007,15 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:8.10.0": - version: 8.10.0 - resolution: "@typescript-eslint/eslint-plugin@npm:8.10.0" +"@typescript-eslint/eslint-plugin@npm:8.13.0": + version: 8.13.0 + resolution: "@typescript-eslint/eslint-plugin@npm:8.13.0" dependencies: "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.10.0" - "@typescript-eslint/type-utils": "npm:8.10.0" - "@typescript-eslint/utils": "npm:8.10.0" - "@typescript-eslint/visitor-keys": "npm:8.10.0" + "@typescript-eslint/scope-manager": "npm:8.13.0" + "@typescript-eslint/type-utils": "npm:8.13.0" + "@typescript-eslint/utils": "npm:8.13.0" + "@typescript-eslint/visitor-keys": "npm:8.13.0" graphemer: "npm:^1.4.0" ignore: "npm:^5.3.1" natural-compare: "npm:^1.4.0" @@ -2026,48 +2026,48 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10/7a53a40b16188c95651b3d69facbfdeacba93da42850a3fb35dfc08318a5db063f42fea2b22bf8756c54bc26edeefcab8fabc39ce3d717d5f9bc765f4922b58a + checksum: 10/3f38f64dfdc5c33d377d0f4aff9c71cc363bc7d4cea5c3da9c5bb934758cb5129f48194f84d4886a4208a70a18395c597561926490027508045f778190686909 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:8.10.0": - version: 8.10.0 - resolution: "@typescript-eslint/scope-manager@npm:8.10.0" +"@typescript-eslint/scope-manager@npm:8.13.0": + version: 8.13.0 + resolution: "@typescript-eslint/scope-manager@npm:8.13.0" dependencies: - "@typescript-eslint/types": "npm:8.10.0" - "@typescript-eslint/visitor-keys": "npm:8.10.0" - checksum: 10/02cf2afc57bd048639d876030f6826e7b522bf36db40b7dd7b8e1b8c6f853e8c41b41044b7a32f118bac1b721aff4dfe660d5891e0a9ee103ef87c5ee1792b4c + "@typescript-eslint/types": "npm:8.13.0" + "@typescript-eslint/visitor-keys": "npm:8.13.0" + checksum: 10/e5738943b9af4a312e33d9db9362fcd0806f365655efb3df9db1ada5a3f0e974f73493b02727d31c3a06234c3bd8b7b7ddd5d492623c7c7547ec2085c1ac1e09 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:8.10.0": - version: 8.10.0 - resolution: "@typescript-eslint/type-utils@npm:8.10.0" +"@typescript-eslint/type-utils@npm:8.13.0": + version: 8.13.0 + resolution: "@typescript-eslint/type-utils@npm:8.13.0" dependencies: - "@typescript-eslint/typescript-estree": "npm:8.10.0" - "@typescript-eslint/utils": "npm:8.10.0" + "@typescript-eslint/typescript-estree": "npm:8.13.0" + "@typescript-eslint/utils": "npm:8.13.0" debug: "npm:^4.3.4" ts-api-utils: "npm:^1.3.0" peerDependenciesMeta: typescript: optional: true - checksum: 10/d173232b8bb1738eeb107a76d6e8b5afdfa97b62bff23db22f8a132db01c560b7d9c2c658e3c2bdccd2e7f5dfdf75ddb70d362a44d713a8c7bacdd56e29fd2ee + checksum: 10/9718cd2c37dcb0bc2b234121629c41e24ade137f5ed915c3f597e53c3ca883d7ee2356f516f027307c12481a6af7620477bf4d6870ac454eb5c4afffbd1eab9e languageName: node linkType: hard -"@typescript-eslint/types@npm:8.10.0": - version: 8.10.0 - resolution: "@typescript-eslint/types@npm:8.10.0" - checksum: 10/2701711c87181553b68cdeba9d8ea55e0ae8ac441b5fe9667ee8be1dbac20386698930239a0e210b73d14961110ab128559a162abaed6e890a851543b6617c97 +"@typescript-eslint/types@npm:8.13.0": + version: 8.13.0 + resolution: "@typescript-eslint/types@npm:8.13.0" + checksum: 10/0051c4a798b8f328451290581f0c8c95acfcb988192647edcb9179013793b8ccc7110b5fee74207394340aca8919d9ca039de2bbd36f41c7693a99d1345092c3 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:8.10.0": - version: 8.10.0 - resolution: "@typescript-eslint/typescript-estree@npm:8.10.0" +"@typescript-eslint/typescript-estree@npm:8.13.0": + version: 8.13.0 + resolution: "@typescript-eslint/typescript-estree@npm:8.13.0" dependencies: - "@typescript-eslint/types": "npm:8.10.0" - "@typescript-eslint/visitor-keys": "npm:8.10.0" + "@typescript-eslint/types": "npm:8.13.0" + "@typescript-eslint/visitor-keys": "npm:8.13.0" debug: "npm:^4.3.4" fast-glob: "npm:^3.3.2" is-glob: "npm:^4.0.3" @@ -2077,31 +2077,31 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10/7513fbc43a0d5f06f45e20d18b6855a3e52bd4124283a4b704bb53c6d2c7edfa783cd4fa2c35217bf8562a6bc80892067fa4780aec97d99580624cbd05cde471 + checksum: 10/2aef1bda245ec66b0d0b1b3ed4ab672725ba33c16abc0781f4e0314cf638ef7b3b1d9682e8e9ee18f3e5e51bc4b22cc428c778c2927fd4cf8495dbe736ae522f languageName: node linkType: hard -"@typescript-eslint/utils@npm:8.10.0, @typescript-eslint/utils@npm:^6.0.0 || ^7.0.0 || ^8.0.0": - version: 8.10.0 - resolution: "@typescript-eslint/utils@npm:8.10.0" +"@typescript-eslint/utils@npm:8.13.0, @typescript-eslint/utils@npm:^6.0.0 || ^7.0.0 || ^8.0.0": + version: 8.13.0 + resolution: "@typescript-eslint/utils@npm:8.13.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:8.10.0" - "@typescript-eslint/types": "npm:8.10.0" - "@typescript-eslint/typescript-estree": "npm:8.10.0" + "@typescript-eslint/scope-manager": "npm:8.13.0" + "@typescript-eslint/types": "npm:8.13.0" + "@typescript-eslint/typescript-estree": "npm:8.13.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 - checksum: 10/a28f9fbec67b92bfb9c58445f9cfeb3208d48ecfda4c3ce649e70291af1d23a05466ce76bae9f6aff1270f40a434c8b6a7a71267108b6c32b1c059758f879cc0 + checksum: 10/93ee0784f9865fee3e9cdc4796daaa7842a9e54b8436341b9b8367c69cbd90cac9da47669289967309f58ad63d8e68559d74972a34d531289637c8cac3415ed2 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:8.10.0": - version: 8.10.0 - resolution: "@typescript-eslint/visitor-keys@npm:8.10.0" +"@typescript-eslint/visitor-keys@npm:8.13.0": + version: 8.13.0 + resolution: "@typescript-eslint/visitor-keys@npm:8.13.0" dependencies: - "@typescript-eslint/types": "npm:8.10.0" + "@typescript-eslint/types": "npm:8.13.0" eslint-visitor-keys: "npm:^3.4.3" - checksum: 10/637d4f2a812e5dcf12b2342ebb296fda5e87e425430623c31660d60e09f87fc8dc9843cc0d9b81fe4963e25ce9a44a4418e8b7878b73773f4c1375fb68006b16 + checksum: 10/630718da32ffa7144b7a8300802136a5fb3084c8b3dc7c277981939408b19d57214e0f721b8011f64ae083bac5367a8a319366c74ef7bcb9fd90508f780fb2de languageName: node linkType: hard @@ -7255,9 +7255,9 @@ __metadata: "@types/eslint__js": "npm:8.42.3" "@types/estree": "npm:1.0.6" "@types/file-entry-cache": "npm:5.0.4" - "@typescript-eslint/eslint-plugin": "npm:8.10.0" - "@typescript-eslint/typescript-estree": "npm:8.10.0" - "@typescript-eslint/visitor-keys": "npm:8.10.0" + "@typescript-eslint/eslint-plugin": "npm:8.13.0" + "@typescript-eslint/typescript-estree": "npm:8.13.0" + "@typescript-eslint/visitor-keys": "npm:8.13.0" acorn: "npm:8.14.0" acorn-jsx: "npm:5.3.2" angular-estree-parser: "npm:10.0.4"