From bda3444b718d230682d4ec273ecb203de9df611e Mon Sep 17 00:00:00 2001 From: Dave Date: Tue, 29 Oct 2024 08:01:35 +1000 Subject: [PATCH 1/2] fix(rule-tester): use cwd option to set base path for tests with file name (#10201) * Use cwd to set the base path for absolute and relative file names. * Fixed lint errors * Improved code coverage. * Used relative import to fix code coverage. * Used test filename when verifying suggestion, and increased code coverage. --- packages/rule-tester/src/RuleTester.ts | 96 ++++++++++++-------- packages/rule-tester/tests/filename.test.ts | 97 +++++++++++++++++++-- 2 files changed, 150 insertions(+), 43 deletions(-) diff --git a/packages/rule-tester/src/RuleTester.ts b/packages/rule-tester/src/RuleTester.ts index 1cbd5e2cd226..725e2a9460bc 100644 --- a/packages/rule-tester/src/RuleTester.ts +++ b/packages/rule-tester/src/RuleTester.ts @@ -166,7 +166,7 @@ function getUnsubstitutedMessagePlaceholders( } export class RuleTester extends TestFramework { - readonly #linter: Linter; + readonly #lintersByBasePath: Map; readonly #rules: Record = {}; readonly #testerConfig: TesterConfigWithDefaults; @@ -184,31 +184,7 @@ export class RuleTester extends TestFramework { rules: { [`${RULE_TESTER_PLUGIN_PREFIX}validate-ast`]: 'error' }, }); - this.#linter = (() => { - const linter = new Linter({ - configType: 'flat', - cwd: this.#testerConfig.languageOptions.parserOptions?.tsconfigRootDir, - }); - - // This nonsense is a workaround for https://github.com/jestjs/jest/issues/14840 - // see also https://github.com/typescript-eslint/typescript-eslint/issues/8942 - // - // For some reason rethrowing exceptions skirts around the circular JSON error. - const oldVerify = linter.verify.bind(linter); - linter.verify = ( - ...args: Parameters - ): ReturnType => { - try { - return oldVerify(...args); - } catch (error) { - throw new Error('Caught an error while linting', { - cause: error, - }); - } - }; - - return linter; - })(); + this.#lintersByBasePath = new Map(); // make sure that the parser doesn't hold onto file handles between tests // on linux (i.e. our CI env), there can be very a limited number of watch handles available @@ -222,6 +198,57 @@ export class RuleTester extends TestFramework { }); } + #getLinterForFilename(filename: string | undefined): Linter { + let basePath: string | undefined = + this.#testerConfig.languageOptions.parserOptions?.tsconfigRootDir; + // For an absolute path (`/foo.ts`), or a path that steps + // up (`../foo.ts`), resolve the path relative to the base + // path (using the current working directory if the parser + // options did not specify a base path) and use the file's + // root as the base path so that the file is under the base + // path. For any other path, which would just be a plain + // file name (`foo.ts`), don't change the base path. + if ( + filename !== undefined && + (filename.startsWith('/') || filename.startsWith('..')) + ) { + basePath = path.parse( + path.resolve(basePath ?? process.cwd(), filename), + ).root; + } + + let linterForBasePath = this.#lintersByBasePath.get(basePath); + if (!linterForBasePath) { + linterForBasePath = (() => { + const linter = new Linter({ + configType: 'flat', + cwd: basePath, + }); + + // This nonsense is a workaround for https://github.com/jestjs/jest/issues/14840 + // see also https://github.com/typescript-eslint/typescript-eslint/issues/8942 + // + // For some reason rethrowing exceptions skirts around the circular JSON error. + const oldVerify = linter.verify.bind(linter); + linter.verify = ( + ...args: Parameters + ): ReturnType => { + try { + return oldVerify(...args); + } catch (error) { + throw new Error('Caught an error while linting', { + cause: error, + }); + } + }; + + return linter; + })(); + this.#lintersByBasePath.set(basePath, linterForBasePath); + } + return linterForBasePath; + } + /** * Set the configuration to use for all future tests */ @@ -738,6 +765,7 @@ export class RuleTester extends TestFramework { let passNumber = 0; const outputs: string[] = []; const configWithoutCustomKeys = omitCustomConfigProperties(config); + const linter = this.#getLinterForFilename(filename); do { passNumber++; @@ -767,15 +795,7 @@ export class RuleTester extends TestFramework { ...configWithoutCustomKeys.linterOptions, }, }); - messages = this.#linter.verify( - code, - // ESLint uses an internal FlatConfigArray that extends @humanwhocodes/config-array. - Object.assign([], { - basePath: filename ? path.parse(filename).root : '', - getConfig: () => actualConfig, - }), - filename, - ); + messages = linter.verify(code, actualConfig, filename); } finally { SourceCode.prototype.applyInlineConfig = applyInlineConfig; SourceCode.prototype.applyLanguageOptions = applyLanguageOptions; @@ -802,7 +822,7 @@ export class RuleTester extends TestFramework { outputs.push(code); // Verify if autofix makes a syntax error or not. - const errorMessageInFix = this.#linter + const errorMessageInFix = linter .verify(fixedResult.output, configWithoutCustomKeys, filename) .find(m => m.fatal); @@ -1255,7 +1275,9 @@ export class RuleTester extends TestFramework { ]).output; // Verify if suggestion fix makes a syntax error or not. - const errorMessageInSuggestion = this.#linter + const errorMessageInSuggestion = this.#getLinterForFilename( + item.filename, + ) .verify( codeWithAppliedSuggestion, omitCustomConfigProperties(result.config), diff --git a/packages/rule-tester/tests/filename.test.ts b/packages/rule-tester/tests/filename.test.ts index 1c68f4ba196d..7068aa7fd3b5 100644 --- a/packages/rule-tester/tests/filename.test.ts +++ b/packages/rule-tester/tests/filename.test.ts @@ -1,8 +1,9 @@ /* eslint-disable perfectionist/sort-objects */ -import { RuleTester } from '@typescript-eslint/rule-tester'; -import { ESLintUtils } from '@typescript-eslint/utils'; +import type { TSESLint } from '@typescript-eslint/utils'; -const ruleTester = new RuleTester(); +import { AST_NODE_TYPES, ESLintUtils } from '@typescript-eslint/utils'; + +import { RuleTester } from '../src/RuleTester'; const rule = ESLintUtils.RuleCreator.withoutDocs({ meta: { @@ -11,33 +12,68 @@ const rule = ESLintUtils.RuleCreator.withoutDocs({ }, messages: { foo: 'It works', + createError: 'Create error', }, schema: [], type: 'problem', + hasSuggestions: true, }, defaultOptions: [], create: context => ({ Program(node): void { - context.report({ node, messageId: 'foo' }); + context.report({ + node, + messageId: 'foo', + suggest: + node.body.length === 1 && + node.body[0].type === AST_NODE_TYPES.EmptyStatement + ? [ + { + messageId: 'createError', + fix(fixer): TSESLint.RuleFix { + return fixer.replaceText(node, '//'); + }, + }, + ] + : [], + }); }, }), }); describe('rule tester filename', () => { - ruleTester.run('absolute path', rule, { + new RuleTester().run('without tsconfigRootDir', rule, { invalid: [ { + name: 'absolute path', code: '_', errors: [{ messageId: 'foo' }], filename: '/an-absolute-path/foo.js', }, + { + name: 'relative path above project', + code: '_', + errors: [{ messageId: 'foo' }], + filename: '../foo.js', + }, ], valid: [], }); - ruleTester.run('relative path', rule, { + new RuleTester({ + languageOptions: { + parserOptions: { tsconfigRootDir: '/some/path/that/totally/exists/' }, + }, + }).run('with tsconfigRootDir', rule, { invalid: [ { + name: 'absolute path', + code: '_', + errors: [{ messageId: 'foo' }], + filename: '/an-absolute-path/foo.js', + }, + { + name: 'relative path above project', code: '_', errors: [{ messageId: 'foo' }], filename: '../foo.js', @@ -46,3 +82,52 @@ describe('rule tester filename', () => { valid: [], }); }); + +describe('rule tester suggestion syntax error checks', () => { + new RuleTester().run('verifies suggestion with absolute path', rule, { + invalid: [ + { + code: ';', + errors: [ + { + messageId: 'foo', + suggestions: [{ messageId: 'createError', output: '//' }], + }, + ], + filename: '/an-absolute-path/foo.js', + }, + ], + valid: [], + }); + + new RuleTester().run('verifies suggestion with relative path', rule, { + invalid: [ + { + code: ';', + errors: [ + { + messageId: 'foo', + suggestions: [{ messageId: 'createError', output: '//' }], + }, + ], + filename: '../foo.js', + }, + ], + valid: [], + }); + + new RuleTester().run('verifies suggestion with no path', rule, { + invalid: [ + { + code: ';', + errors: [ + { + messageId: 'foo', + suggestions: [{ messageId: 'createError', output: '//' }], + }, + ], + }, + ], + valid: [], + }); +}); From 1edec1d56ccad98fa65f57ac54fe8abbb1d3a922 Mon Sep 17 00:00:00 2001 From: "typescript-eslint[bot]" Date: Mon, 28 Oct 2024 22:56:02 +0000 Subject: [PATCH 2/2] chore(release): publish 8.12.1 --- CHANGELOG.md | 12 +++ packages/ast-spec/CHANGELOG.md | 6 ++ packages/ast-spec/package.json | 2 +- packages/eslint-plugin/CHANGELOG.md | 6 ++ packages/eslint-plugin/package.json | 14 ++-- packages/parser/CHANGELOG.md | 6 ++ packages/parser/package.json | 10 +-- .../CHANGELOG.md | 6 ++ .../package.json | 6 +- packages/rule-tester/CHANGELOG.md | 12 +++ packages/rule-tester/package.json | 8 +- packages/scope-manager/CHANGELOG.md | 6 ++ packages/scope-manager/package.json | 8 +- packages/type-utils/CHANGELOG.md | 6 ++ packages/type-utils/package.json | 8 +- packages/types/CHANGELOG.md | 6 ++ packages/types/package.json | 2 +- packages/typescript-eslint/CHANGELOG.md | 6 ++ packages/typescript-eslint/package.json | 8 +- packages/typescript-estree/CHANGELOG.md | 6 ++ packages/typescript-estree/package.json | 6 +- packages/utils/CHANGELOG.md | 6 ++ packages/utils/package.json | 8 +- packages/visitor-keys/CHANGELOG.md | 6 ++ packages/visitor-keys/package.json | 4 +- yarn.lock | 80 +++++++++---------- 26 files changed, 172 insertions(+), 82 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fb9af189eab..d05906ca8dc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +## 8.12.1 (2024-10-28) + +### 🩹 Fixes + +- **rule-tester:** use cwd option to set base path for tests with file name ([#10201](https://github.com/typescript-eslint/typescript-eslint/pull/10201)) + +### ❤️ Thank You + +- Dave @reduckted + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 8.12.0 (2024-10-28) ### 🚀 Features diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 4d432bdffe13..307d903ed62d 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/CHANGELOG.md @@ -1,3 +1,9 @@ +## 8.12.1 (2024-10-28) + +This was a version bump only for ast-spec to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 8.12.0 (2024-10-28) This was a version bump only for ast-spec to align it with other projects, there were no code changes. diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 887fbf30c398..120503d35a2e 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "8.12.0", + "version": "8.12.1", "description": "Complete specification for the TypeScript-ESTree AST", "private": true, "keywords": [ diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 4980ef45c13e..e115c88ca413 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -1,3 +1,9 @@ +## 8.12.1 (2024-10-28) + +This was a version bump only for eslint-plugin to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 8.12.0 (2024-10-28) ### 🚀 Features diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 8a7cef203dee..cab314f23ac7 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "8.12.0", + "version": "8.12.1", "description": "TypeScript plugin for ESLint", "files": [ "dist", @@ -61,10 +61,10 @@ }, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.12.0", - "@typescript-eslint/type-utils": "8.12.0", - "@typescript-eslint/utils": "8.12.0", - "@typescript-eslint/visitor-keys": "8.12.0", + "@typescript-eslint/scope-manager": "8.12.1", + "@typescript-eslint/type-utils": "8.12.1", + "@typescript-eslint/utils": "8.12.1", + "@typescript-eslint/visitor-keys": "8.12.1", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -75,8 +75,8 @@ "@types/marked": "^5.0.2", "@types/mdast": "^4.0.3", "@types/natural-compare": "*", - "@typescript-eslint/rule-schema-to-typescript-types": "8.12.0", - "@typescript-eslint/rule-tester": "8.12.0", + "@typescript-eslint/rule-schema-to-typescript-types": "8.12.1", + "@typescript-eslint/rule-tester": "8.12.1", "ajv": "^6.12.6", "cross-env": "^7.0.3", "cross-fetch": "*", diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index fd1599d19197..8a765b6b33e6 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -1,3 +1,9 @@ +## 8.12.1 (2024-10-28) + +This was a version bump only for parser to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 8.12.0 (2024-10-28) This was a version bump only for parser to align it with other projects, there were no code changes. diff --git a/packages/parser/package.json b/packages/parser/package.json index 522f4ab57c5d..9dd119c43391 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "8.12.0", + "version": "8.12.1", "description": "An ESLint custom parser which leverages TypeScript ESTree", "files": [ "dist", @@ -52,10 +52,10 @@ "eslint": "^8.57.0 || ^9.0.0" }, "dependencies": { - "@typescript-eslint/scope-manager": "8.12.0", - "@typescript-eslint/types": "8.12.0", - "@typescript-eslint/typescript-estree": "8.12.0", - "@typescript-eslint/visitor-keys": "8.12.0", + "@typescript-eslint/scope-manager": "8.12.1", + "@typescript-eslint/types": "8.12.1", + "@typescript-eslint/typescript-estree": "8.12.1", + "@typescript-eslint/visitor-keys": "8.12.1", "debug": "^4.3.4" }, "devDependencies": { diff --git a/packages/rule-schema-to-typescript-types/CHANGELOG.md b/packages/rule-schema-to-typescript-types/CHANGELOG.md index 667ec1480423..21eb8e017576 100644 --- a/packages/rule-schema-to-typescript-types/CHANGELOG.md +++ b/packages/rule-schema-to-typescript-types/CHANGELOG.md @@ -1,3 +1,9 @@ +## 8.12.1 (2024-10-28) + +This was a version bump only for rule-schema-to-typescript-types to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 8.12.0 (2024-10-28) This was a version bump only for rule-schema-to-typescript-types to align it with other projects, there were no code changes. diff --git a/packages/rule-schema-to-typescript-types/package.json b/packages/rule-schema-to-typescript-types/package.json index ea165ebd0f5c..4233b553130a 100644 --- a/packages/rule-schema-to-typescript-types/package.json +++ b/packages/rule-schema-to-typescript-types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/rule-schema-to-typescript-types", - "version": "8.12.0", + "version": "8.12.1", "private": true, "type": "commonjs", "exports": { @@ -34,8 +34,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@typescript-eslint/type-utils": "8.12.0", - "@typescript-eslint/utils": "8.12.0", + "@typescript-eslint/type-utils": "8.12.1", + "@typescript-eslint/utils": "8.12.1", "natural-compare": "^1.4.0", "prettier": "^3.2.5" }, diff --git a/packages/rule-tester/CHANGELOG.md b/packages/rule-tester/CHANGELOG.md index 62124540701e..129e9cec49b7 100644 --- a/packages/rule-tester/CHANGELOG.md +++ b/packages/rule-tester/CHANGELOG.md @@ -1,3 +1,15 @@ +## 8.12.1 (2024-10-28) + +### 🩹 Fixes + +- **rule-tester:** use cwd option to set base path for tests with file name ([#10201](https://github.com/typescript-eslint/typescript-eslint/pull/10201)) + +### ❤️ Thank You + +- Dave @reduckted + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 8.12.0 (2024-10-28) ### 🚀 Features diff --git a/packages/rule-tester/package.json b/packages/rule-tester/package.json index 08dcbb8cc649..452606386d36 100644 --- a/packages/rule-tester/package.json +++ b/packages/rule-tester/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/rule-tester", - "version": "8.12.0", + "version": "8.12.1", "description": "Tooling to test ESLint rules", "files": [ "dist", @@ -48,8 +48,8 @@ }, "//": "NOTE - AJV is out-of-date, but it's intentionally synced with ESLint - https://github.com/eslint/eslint/blob/ad9dd6a933fd098a0d99c6a9aa059850535c23ee/package.json#L70", "dependencies": { - "@typescript-eslint/typescript-estree": "8.12.0", - "@typescript-eslint/utils": "8.12.0", + "@typescript-eslint/typescript-estree": "8.12.1", + "@typescript-eslint/utils": "8.12.1", "ajv": "^6.12.6", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "4.6.2", @@ -62,7 +62,7 @@ "@jest/types": "29.6.3", "@types/json-stable-stringify-without-jsonify": "^1.0.2", "@types/lodash.merge": "4.6.9", - "@typescript-eslint/parser": "8.12.0", + "@typescript-eslint/parser": "8.12.1", "chai": "^4.4.1", "eslint-visitor-keys": "^4.0.0", "espree": "^10.0.1", diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 5b6ce9a29a68..0841c7490b98 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/CHANGELOG.md @@ -1,3 +1,9 @@ +## 8.12.1 (2024-10-28) + +This was a version bump only for scope-manager to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 8.12.0 (2024-10-28) ### 🚀 Features diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index c364997aefa9..70d9810f05a8 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "8.12.0", + "version": "8.12.1", "description": "TypeScript scope analyser for ESLint", "files": [ "dist", @@ -46,13 +46,13 @@ "typecheck": "npx nx typecheck" }, "dependencies": { - "@typescript-eslint/types": "8.12.0", - "@typescript-eslint/visitor-keys": "8.12.0" + "@typescript-eslint/types": "8.12.1", + "@typescript-eslint/visitor-keys": "8.12.1" }, "devDependencies": { "@jest/types": "29.6.3", "@types/glob": "*", - "@typescript-eslint/typescript-estree": "8.12.0", + "@typescript-eslint/typescript-estree": "8.12.1", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/type-utils/CHANGELOG.md b/packages/type-utils/CHANGELOG.md index 18b87cc575b0..2c8650d4f181 100644 --- a/packages/type-utils/CHANGELOG.md +++ b/packages/type-utils/CHANGELOG.md @@ -1,3 +1,9 @@ +## 8.12.1 (2024-10-28) + +This was a version bump only for type-utils to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 8.12.0 (2024-10-28) ### 🚀 Features diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index 5b570ba860fc..0302035684be 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/type-utils", - "version": "8.12.0", + "version": "8.12.1", "description": "Type utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -46,14 +46,14 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@typescript-eslint/typescript-estree": "8.12.0", - "@typescript-eslint/utils": "8.12.0", + "@typescript-eslint/typescript-estree": "8.12.1", + "@typescript-eslint/utils": "8.12.1", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, "devDependencies": { "@jest/types": "29.6.3", - "@typescript-eslint/parser": "8.12.0", + "@typescript-eslint/parser": "8.12.1", "ajv": "^6.12.6", "downlevel-dts": "*", "jest": "29.7.0", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index acf6e09f29e8..7642d3086e9b 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,3 +1,9 @@ +## 8.12.1 (2024-10-28) + +This was a version bump only for types to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 8.12.0 (2024-10-28) This was a version bump only for types to align it with other projects, there were no code changes. diff --git a/packages/types/package.json b/packages/types/package.json index 1bc012bc2045..2491bb9e5e8f 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "8.12.0", + "version": "8.12.1", "description": "Types for the TypeScript-ESTree AST spec", "files": [ "dist", diff --git a/packages/typescript-eslint/CHANGELOG.md b/packages/typescript-eslint/CHANGELOG.md index ace5371f7dfe..8b6a96f01e78 100644 --- a/packages/typescript-eslint/CHANGELOG.md +++ b/packages/typescript-eslint/CHANGELOG.md @@ -1,3 +1,9 @@ +## 8.12.1 (2024-10-28) + +This was a version bump only for typescript-eslint to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 8.12.0 (2024-10-28) ### 🚀 Features diff --git a/packages/typescript-eslint/package.json b/packages/typescript-eslint/package.json index 5088a94a3324..6d1258d74933 100644 --- a/packages/typescript-eslint/package.json +++ b/packages/typescript-eslint/package.json @@ -1,6 +1,6 @@ { "name": "typescript-eslint", - "version": "8.12.0", + "version": "8.12.1", "description": "Tooling which enables you to use TypeScript with ESLint", "files": [ "dist", @@ -52,9 +52,9 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@typescript-eslint/eslint-plugin": "8.12.0", - "@typescript-eslint/parser": "8.12.0", - "@typescript-eslint/utils": "8.12.0" + "@typescript-eslint/eslint-plugin": "8.12.1", + "@typescript-eslint/parser": "8.12.1", + "@typescript-eslint/utils": "8.12.1" }, "devDependencies": { "@jest/types": "29.6.3", diff --git a/packages/typescript-estree/CHANGELOG.md b/packages/typescript-estree/CHANGELOG.md index b2debfa0f592..08b40038b412 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -1,3 +1,9 @@ +## 8.12.1 (2024-10-28) + +This was a version bump only for typescript-estree to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 8.12.0 (2024-10-28) This was a version bump only for typescript-estree to align it with other projects, there were no code changes. diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 363919745f01..6b1f07353069 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "8.12.0", + "version": "8.12.1", "description": "A parser that converts TypeScript source code into an ESTree compatible form", "files": [ "dist", @@ -54,8 +54,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@typescript-eslint/types": "8.12.0", - "@typescript-eslint/visitor-keys": "8.12.0", + "@typescript-eslint/types": "8.12.1", + "@typescript-eslint/visitor-keys": "8.12.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 78c74c512fe0..522393bfa974 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,3 +1,9 @@ +## 8.12.1 (2024-10-28) + +This was a version bump only for utils to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 8.12.0 (2024-10-28) This was a version bump only for utils to align it with other projects, there were no code changes. diff --git a/packages/utils/package.json b/packages/utils/package.json index 2f5b3281d8f9..75d3c45fea66 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/utils", - "version": "8.12.0", + "version": "8.12.1", "description": "Utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -64,9 +64,9 @@ }, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.12.0", - "@typescript-eslint/types": "8.12.0", - "@typescript-eslint/typescript-estree": "8.12.0" + "@typescript-eslint/scope-manager": "8.12.1", + "@typescript-eslint/types": "8.12.1", + "@typescript-eslint/typescript-estree": "8.12.1" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0" diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 863b0204eed2..c88087d9c7a4 100644 --- a/packages/visitor-keys/CHANGELOG.md +++ b/packages/visitor-keys/CHANGELOG.md @@ -1,3 +1,9 @@ +## 8.12.1 (2024-10-28) + +This was a version bump only for visitor-keys to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 8.12.0 (2024-10-28) This was a version bump only for visitor-keys to align it with other projects, there were no code changes. diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index a3f67299e556..927f8379133f 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "8.12.0", + "version": "8.12.1", "description": "Visitor keys used to help traverse the TypeScript-ESTree AST", "files": [ "dist", @@ -47,7 +47,7 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@typescript-eslint/types": "8.12.0", + "@typescript-eslint/types": "8.12.1", "eslint-visitor-keys": "^3.4.3" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 7e3991f7f083..620e22944288 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5608,7 +5608,7 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/eslint-plugin@8.12.0, @typescript-eslint/eslint-plugin@workspace:*, @typescript-eslint/eslint-plugin@workspace:^, @typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin": +"@typescript-eslint/eslint-plugin@8.12.1, @typescript-eslint/eslint-plugin@workspace:*, @typescript-eslint/eslint-plugin@workspace:^, @typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin": version: 0.0.0-use.local resolution: "@typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin" dependencies: @@ -5617,12 +5617,12 @@ __metadata: "@types/marked": ^5.0.2 "@types/mdast": ^4.0.3 "@types/natural-compare": "*" - "@typescript-eslint/rule-schema-to-typescript-types": 8.12.0 - "@typescript-eslint/rule-tester": 8.12.0 - "@typescript-eslint/scope-manager": 8.12.0 - "@typescript-eslint/type-utils": 8.12.0 - "@typescript-eslint/utils": 8.12.0 - "@typescript-eslint/visitor-keys": 8.12.0 + "@typescript-eslint/rule-schema-to-typescript-types": 8.12.1 + "@typescript-eslint/rule-tester": 8.12.1 + "@typescript-eslint/scope-manager": 8.12.1 + "@typescript-eslint/type-utils": 8.12.1 + "@typescript-eslint/utils": 8.12.1 + "@typescript-eslint/visitor-keys": 8.12.1 ajv: ^6.12.6 cross-env: ^7.0.3 cross-fetch: "*" @@ -5666,16 +5666,16 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/parser@8.12.0, @typescript-eslint/parser@workspace:*, @typescript-eslint/parser@workspace:packages/parser": +"@typescript-eslint/parser@8.12.1, @typescript-eslint/parser@workspace:*, @typescript-eslint/parser@workspace:packages/parser": version: 0.0.0-use.local resolution: "@typescript-eslint/parser@workspace:packages/parser" dependencies: "@jest/types": 29.6.3 "@types/glob": "*" - "@typescript-eslint/scope-manager": 8.12.0 - "@typescript-eslint/types": 8.12.0 - "@typescript-eslint/typescript-estree": 8.12.0 - "@typescript-eslint/visitor-keys": 8.12.0 + "@typescript-eslint/scope-manager": 8.12.1 + "@typescript-eslint/types": 8.12.1 + "@typescript-eslint/typescript-estree": 8.12.1 + "@typescript-eslint/visitor-keys": 8.12.1 debug: ^4.3.4 downlevel-dts: "*" glob: "*" @@ -5691,28 +5691,28 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/rule-schema-to-typescript-types@8.12.0, @typescript-eslint/rule-schema-to-typescript-types@workspace:*, @typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types": +"@typescript-eslint/rule-schema-to-typescript-types@8.12.1, @typescript-eslint/rule-schema-to-typescript-types@workspace:*, @typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types": version: 0.0.0-use.local resolution: "@typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types" dependencies: "@jest/types": 29.6.3 - "@typescript-eslint/type-utils": 8.12.0 - "@typescript-eslint/utils": 8.12.0 + "@typescript-eslint/type-utils": 8.12.1 + "@typescript-eslint/utils": 8.12.1 natural-compare: ^1.4.0 prettier: ^3.2.5 languageName: unknown linkType: soft -"@typescript-eslint/rule-tester@8.12.0, @typescript-eslint/rule-tester@workspace:*, @typescript-eslint/rule-tester@workspace:packages/rule-tester": +"@typescript-eslint/rule-tester@8.12.1, @typescript-eslint/rule-tester@workspace:*, @typescript-eslint/rule-tester@workspace:packages/rule-tester": version: 0.0.0-use.local resolution: "@typescript-eslint/rule-tester@workspace:packages/rule-tester" dependencies: "@jest/types": 29.6.3 "@types/json-stable-stringify-without-jsonify": ^1.0.2 "@types/lodash.merge": 4.6.9 - "@typescript-eslint/parser": 8.12.0 - "@typescript-eslint/typescript-estree": 8.12.0 - "@typescript-eslint/utils": 8.12.0 + "@typescript-eslint/parser": 8.12.1 + "@typescript-eslint/typescript-estree": 8.12.1 + "@typescript-eslint/utils": 8.12.1 ajv: ^6.12.6 chai: ^4.4.1 eslint-visitor-keys: ^4.0.0 @@ -5730,15 +5730,15 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/scope-manager@8.12.0, @typescript-eslint/scope-manager@workspace:*, @typescript-eslint/scope-manager@workspace:^, @typescript-eslint/scope-manager@workspace:packages/scope-manager": +"@typescript-eslint/scope-manager@8.12.1, @typescript-eslint/scope-manager@workspace:*, @typescript-eslint/scope-manager@workspace:^, @typescript-eslint/scope-manager@workspace:packages/scope-manager": version: 0.0.0-use.local resolution: "@typescript-eslint/scope-manager@workspace:packages/scope-manager" dependencies: "@jest/types": 29.6.3 "@types/glob": "*" - "@typescript-eslint/types": 8.12.0 - "@typescript-eslint/typescript-estree": 8.12.0 - "@typescript-eslint/visitor-keys": 8.12.0 + "@typescript-eslint/types": 8.12.1 + "@typescript-eslint/typescript-estree": 8.12.1 + "@typescript-eslint/visitor-keys": 8.12.1 glob: "*" jest-specific-snapshot: "*" make-dir: "*" @@ -5758,14 +5758,14 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/type-utils@8.12.0, @typescript-eslint/type-utils@workspace:*, @typescript-eslint/type-utils@workspace:packages/type-utils": +"@typescript-eslint/type-utils@8.12.1, @typescript-eslint/type-utils@workspace:*, @typescript-eslint/type-utils@workspace:packages/type-utils": version: 0.0.0-use.local resolution: "@typescript-eslint/type-utils@workspace:packages/type-utils" dependencies: "@jest/types": 29.6.3 - "@typescript-eslint/parser": 8.12.0 - "@typescript-eslint/typescript-estree": 8.12.0 - "@typescript-eslint/utils": 8.12.0 + "@typescript-eslint/parser": 8.12.1 + "@typescript-eslint/typescript-estree": 8.12.1 + "@typescript-eslint/utils": 8.12.1 ajv: ^6.12.6 debug: ^4.3.4 downlevel-dts: "*" @@ -5780,7 +5780,7 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/types@8.12.0, @typescript-eslint/types@^8.8.0, @typescript-eslint/types@workspace:*, @typescript-eslint/types@workspace:^, @typescript-eslint/types@workspace:packages/types": +"@typescript-eslint/types@8.12.1, @typescript-eslint/types@^8.8.0, @typescript-eslint/types@workspace:*, @typescript-eslint/types@workspace:^, @typescript-eslint/types@workspace:packages/types": version: 0.0.0-use.local resolution: "@typescript-eslint/types@workspace:packages/types" dependencies: @@ -5881,13 +5881,13 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/typescript-estree@8.12.0, @typescript-eslint/typescript-estree@workspace:*, @typescript-eslint/typescript-estree@workspace:^, @typescript-eslint/typescript-estree@workspace:packages/typescript-estree": +"@typescript-eslint/typescript-estree@8.12.1, @typescript-eslint/typescript-estree@workspace:*, @typescript-eslint/typescript-estree@workspace:^, @typescript-eslint/typescript-estree@workspace:packages/typescript-estree": version: 0.0.0-use.local resolution: "@typescript-eslint/typescript-estree@workspace:packages/typescript-estree" dependencies: "@jest/types": 29.6.3 - "@typescript-eslint/types": 8.12.0 - "@typescript-eslint/visitor-keys": 8.12.0 + "@typescript-eslint/types": 8.12.1 + "@typescript-eslint/visitor-keys": 8.12.1 debug: ^4.3.4 fast-glob: ^3.3.2 glob: "*" @@ -5924,14 +5924,14 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@8.12.0, @typescript-eslint/utils@^8.8.0, @typescript-eslint/utils@workspace:*, @typescript-eslint/utils@workspace:^, @typescript-eslint/utils@workspace:packages/utils": +"@typescript-eslint/utils@8.12.1, @typescript-eslint/utils@^8.8.0, @typescript-eslint/utils@workspace:*, @typescript-eslint/utils@workspace:^, @typescript-eslint/utils@workspace:packages/utils": version: 0.0.0-use.local resolution: "@typescript-eslint/utils@workspace:packages/utils" dependencies: "@eslint-community/eslint-utils": ^4.4.0 - "@typescript-eslint/scope-manager": 8.12.0 - "@typescript-eslint/types": 8.12.0 - "@typescript-eslint/typescript-estree": 8.12.0 + "@typescript-eslint/scope-manager": 8.12.1 + "@typescript-eslint/types": 8.12.1 + "@typescript-eslint/typescript-estree": 8.12.1 downlevel-dts: "*" jest: 29.7.0 prettier: ^3.2.5 @@ -5960,13 +5960,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@8.12.0, @typescript-eslint/visitor-keys@workspace:*, @typescript-eslint/visitor-keys@workspace:packages/visitor-keys": +"@typescript-eslint/visitor-keys@8.12.1, @typescript-eslint/visitor-keys@workspace:*, @typescript-eslint/visitor-keys@workspace:packages/visitor-keys": version: 0.0.0-use.local resolution: "@typescript-eslint/visitor-keys@workspace:packages/visitor-keys" dependencies: "@jest/types": 29.6.3 "@types/eslint-visitor-keys": "*" - "@typescript-eslint/types": 8.12.0 + "@typescript-eslint/types": 8.12.1 downlevel-dts: "*" eslint-visitor-keys: ^3.4.3 jest: 29.7.0 @@ -19580,9 +19580,9 @@ __metadata: resolution: "typescript-eslint@workspace:packages/typescript-eslint" dependencies: "@jest/types": 29.6.3 - "@typescript-eslint/eslint-plugin": 8.12.0 - "@typescript-eslint/parser": 8.12.0 - "@typescript-eslint/utils": 8.12.0 + "@typescript-eslint/eslint-plugin": 8.12.1 + "@typescript-eslint/parser": 8.12.1 + "@typescript-eslint/utils": 8.12.1 downlevel-dts: "*" jest: 29.7.0 prettier: ^3.2.5