From ed3ed1f8a9283ee779e3c301a2d4caaa618cb9e0 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Sun, 18 Aug 2024 21:51:25 -0400 Subject: [PATCH 01/17] refactor: always patch --- test/prepare.mjs | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/test/prepare.mjs b/test/prepare.mjs index e4574919..b1846462 100755 --- a/test/prepare.mjs +++ b/test/prepare.mjs @@ -1,7 +1,7 @@ // @ts-check import { existsSync } from "node:fs"; import { symlink } from "node:fs/promises"; -import { dirname, join, resolve } from "node:path"; +import { dirname, resolve } from "node:path"; import { fileURLToPath } from "node:url"; import { patch } from "ts-patch"; import { patch as patch1 } from "tsp1"; @@ -20,27 +20,17 @@ async function symlinkTsNode() { } function patchTsModules() { - /* ****************************************************************************************************************** * - * Config - * ****************************************************************************************************************** */ const rootDir = __dirname; - const tsDirs = ["typescript-three", "typescript-four-seven", "typescript"]; - /* ****************************************************************************************************************** * - * Patch TS Modules - * ****************************************************************************************************************** */ - const baseDirs = new Map(); - - for (const tsDirName of tsDirs) { - const mainDir = resolve(rootDir, "node_modules", tsDirName); - if (!existsSync(join(mainDir, "lib-backup"))) baseDirs.set(tsDirName, mainDir); + /** @param {string} moduleName */ + function patchTypescript(moduleName, tspatch) { + const basedir = resolve(rootDir, "node_modules", moduleName); + tspatch(["tsc.js", "typescript.js"], { basedir, dir: basedir }); } - // Patch discovered modules - for (const [dirName, dir] of baseDirs) - if (dirName === "typescript-three") patch1(["tsc.js", "typescript.js"], { basedir: dir }); - else if (dirName === "typescript-four-seven") patch2(["tsc.js", "typescript.js"], { dir }); - else patch(["tsc.js", "typescript.js"], { dir }); + patchTypescript("typescript-three", patch1); + patchTypescript("typescript-four-seven", patch2); + patchTypescript("typescript", patch); } patchTsModules(); From 36643ffc9be467ebfcd48fcd5b597f7aa999aa75 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Sun, 18 Aug 2024 21:56:09 -0400 Subject: [PATCH 02/17] refactor: rename typescript-number to typescript-x --- test/config.ts | 22 +++++----------------- test/package.json | 4 ++-- test/prepare.mjs | 4 ++-- test/yarn.lock | 20 ++++++++++---------- 4 files changed, 19 insertions(+), 31 deletions(-) diff --git a/test/config.ts b/test/config.ts index 5b081415..884cd899 100755 --- a/test/config.ts +++ b/test/config.ts @@ -1,23 +1,13 @@ import ts from "typescript"; -import tsThree from "typescript-three"; -import tsFourSeven from "typescript-four-seven"; +import tsThree from "typescript-3"; +import tsFourSeven from "typescript-4.7"; import path from "path"; -/* ****************************************************************************************************************** */ -// region: TS Instances -/* ****************************************************************************************************************** */ - -export { ts, tsThree, tsFourSeven }; - -// endregion - -/* ****************************************************************************************************************** */ -// region: Config -/* ****************************************************************************************************************** */ +export { ts }; export const tsModules = [ - ["3.6.5", tsThree, "typescript-three"], - ["4.7.4", tsFourSeven, "typescript-four-seven"], + ["3.6.5", tsThree, "typescript-3"], + ["4.7.4", tsFourSeven, "typescript-4.7"], ["Latest", ts, "typescript"], ]; @@ -26,5 +16,3 @@ export const transformerPath = require.resolve("typescript-transform-paths"); export const builtTransformerPath = require.resolve("typescript-transform-paths"); Error.stackTraceLimit = 120; - -// endregion diff --git a/test/package.json b/test/package.json index dcb76542..86340d79 100755 --- a/test/package.json +++ b/test/package.json @@ -22,8 +22,8 @@ "tsp1": "npm:ts-patch@1.*.*", "tsp2": "npm:ts-patch@2.*.*", "typescript": "^5.5.4", - "typescript-four-seven": "npm:typescript@4.7.4", - "typescript-three": "npm:typescript@3.6.5", + "typescript-3": "npm:typescript@3.6.5", + "typescript-4.7": "npm:typescript@4.7.4", "typescript-transform-paths": "portal:../" }, "workspaces": [ diff --git a/test/prepare.mjs b/test/prepare.mjs index b1846462..9a08fa33 100755 --- a/test/prepare.mjs +++ b/test/prepare.mjs @@ -28,8 +28,8 @@ function patchTsModules() { tspatch(["tsc.js", "typescript.js"], { basedir, dir: basedir }); } - patchTypescript("typescript-three", patch1); - patchTypescript("typescript-four-seven", patch2); + patchTypescript("typescript-3", patch1); + patchTypescript("typescript-4.7", patch2); patchTypescript("typescript", patch); } diff --git a/test/yarn.lock b/test/yarn.lock index 552e3e6e..01ff5dbf 100644 --- a/test/yarn.lock +++ b/test/yarn.lock @@ -8099,8 +8099,8 @@ __metadata: tsp1: "npm:ts-patch@1.*.*" tsp2: "npm:ts-patch@2.*.*" typescript: "npm:^5.5.4" - typescript-four-seven: "npm:typescript@4.7.4" - typescript-three: "npm:typescript@3.6.5" + typescript-3: "npm:typescript@3.6.5" + typescript-4.7: "npm:typescript@4.7.4" typescript-transform-paths: "portal:../" languageName: unknown linkType: soft @@ -9239,23 +9239,23 @@ __metadata: languageName: node linkType: hard -"typescript-four-seven@npm:typescript@4.7.4": - version: 4.7.4 - resolution: "typescript@npm:4.7.4" +"typescript-3@npm:typescript@3.6.5": + version: 3.6.5 + resolution: "typescript@npm:3.6.5" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/8c1c4007b6ce5b24c49f0e89173ab9e82687cc6ae54418d1140bb63b82d6598d085ac0f993fe3d3d1fbf87a2c76f1f81d394dc76315bc72c7a9f8561c5d8d205 + checksum: 10c0/b6f0d5d2e2325b28460b8cf3a4a1237d79aec9951ad727014d4ca570327cc5947decec5d262044979cc0a9ab63746b58e6d8438d73d33ce8415e5369d0490dff languageName: node linkType: hard -"typescript-three@npm:typescript@3.6.5": - version: 3.6.5 - resolution: "typescript@npm:3.6.5" +"typescript-4.7@npm:typescript@4.7.4": + version: 4.7.4 + resolution: "typescript@npm:4.7.4" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/b6f0d5d2e2325b28460b8cf3a4a1237d79aec9951ad727014d4ca570327cc5947decec5d262044979cc0a9ab63746b58e6d8438d73d33ce8415e5369d0490dff + checksum: 10c0/8c1c4007b6ce5b24c49f0e89173ab9e82687cc6ae54418d1140bb63b82d6598d085ac0f993fe3d3d1fbf87a2c76f1f81d394dc76315bc72c7a9f8561c5d8d205 languageName: node linkType: hard From 3ee03d1607a3ecef8f3bc3e9eb5fe774e123ac48 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Sun, 18 Aug 2024 22:24:29 -0400 Subject: [PATCH 03/17] chore: rename nx test project to avoid conflict with package name --- test/projects/nx/nx.json | 2 +- test/projects/nx/package.json | 2 +- test/yarn.lock | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/projects/nx/nx.json b/test/projects/nx/nx.json index 35d8d9e6..340da909 100644 --- a/test/projects/nx/nx.json +++ b/test/projects/nx/nx.json @@ -1,6 +1,6 @@ { "extends": "@nrwl/workspace/presets/core.json", - "npmScope": "nx", + "npmScope": "project-nx", "affected": { "defaultBase": "main" }, diff --git a/test/projects/nx/package.json b/test/projects/nx/package.json index fcea0faf..2ed81c84 100644 --- a/test/projects/nx/package.json +++ b/test/projects/nx/package.json @@ -1,5 +1,5 @@ { - "name": "nx", + "name": "project-nx", "version": "0.0.0", "scripts": { "build": "nx build library1 --skip-nx-cache" diff --git a/test/yarn.lock b/test/yarn.lock index 01ff5dbf..db309c38 100644 --- a/test/yarn.lock +++ b/test/yarn.lock @@ -7009,12 +7009,6 @@ __metadata: languageName: node linkType: hard -"nx@workspace:projects/nx": - version: 0.0.0-use.local - resolution: "nx@workspace:projects/nx" - languageName: unknown - linkType: soft - "object-inspect@npm:^1.13.1": version: 1.13.2 resolution: "object-inspect@npm:1.13.2" @@ -7735,6 +7729,12 @@ __metadata: languageName: node linkType: hard +"project-nx@workspace:projects/nx": + version: 0.0.0-use.local + resolution: "project-nx@workspace:projects/nx" + languageName: unknown + linkType: soft + "promise-retry@npm:^2.0.1": version: 2.0.1 resolution: "promise-retry@npm:2.0.1" From a67e73949f0894035cc1d8f0f56155d0aa259fa2 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Sun, 18 Aug 2024 22:50:51 -0400 Subject: [PATCH 04/17] refactor: use strictest typescript configuration --- package.json | 1 + src/harmony/versions/four-seven.ts | 6 +++--- src/harmony/versions/three-eight.ts | 12 ++++++------ src/index.ts | 2 +- src/register.ts | 17 ++++++++++++----- src/transformer.ts | 14 ++------------ src/utils/elide-import-export.ts | 8 ++++---- src/utils/general-utils.ts | 2 +- src/utils/resolve-module-name.ts | 22 ++-------------------- src/utils/resolve-path-update-node.ts | 13 +++++-------- src/visitor.ts | 13 ++++--------- tsconfig.json | 6 ++++-- yarn.lock | 8 ++++++++ 13 files changed, 53 insertions(+), 71 deletions(-) diff --git a/package.json b/package.json index 5281a345..8a74ad72 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "devDependencies": { "@eslint/js": "^9.8.0", "@tsconfig/node18": "^18.2.4", + "@tsconfig/strictest": "^2.0.5", "@types/eslint": "^9", "@types/minimatch": "^5.1.2", "@types/node": "^22.2.0", diff --git a/src/harmony/versions/four-seven.ts b/src/harmony/versions/four-seven.ts index ae8faca5..4e50739c 100644 --- a/src/harmony/versions/four-seven.ts +++ b/src/harmony/versions/four-seven.ts @@ -49,7 +49,7 @@ export function handler(context: TsTransformPathsContext, prop: string | symbol) case "updateImportDeclaration": return function ( node: ImportDeclaration, - modifiers: readonly Modifier[] | undefined, + _modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined, @@ -73,7 +73,7 @@ export function handler(context: TsTransformPathsContext, prop: string | symbol) case "updateExportDeclaration": return function ( node: ExportDeclaration, - modifiers: readonly Modifier[] | undefined, + _modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, @@ -99,7 +99,7 @@ export function handler(context: TsTransformPathsContext, prop: string | symbol) case "updateModuleDeclaration": return function ( node: ModuleDeclaration, - modifiers: readonly Modifier[] | undefined, + _modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, ) { diff --git a/src/harmony/versions/three-eight.ts b/src/harmony/versions/three-eight.ts index 7097ab76..541994a5 100644 --- a/src/harmony/versions/three-eight.ts +++ b/src/harmony/versions/three-eight.ts @@ -70,7 +70,7 @@ export function handler(context: TsTransformPathsContext, prop: string | symbol) case "updateImportClause": return function ( node: ImportClause, - isTypeOnly: boolean, + _isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined, ) { @@ -80,7 +80,7 @@ export function handler(context: TsTransformPathsContext, prop: string | symbol) case "updateImportDeclaration": return function ( node: ImportDeclaration, - modifiers: readonly Modifier[] | undefined, + _modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, ) { @@ -97,8 +97,8 @@ export function handler(context: TsTransformPathsContext, prop: string | symbol) case "updateExportDeclaration": return function ( node: ExportDeclaration, - modifiers: readonly Modifier[] | undefined, - isTypeOnly: boolean, + _modifiers: readonly Modifier[] | undefined, + _isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, ) { @@ -115,7 +115,7 @@ export function handler(context: TsTransformPathsContext, prop: string | symbol) case "updateModuleDeclaration": return function ( node: ModuleDeclaration, - modifiers: readonly Modifier[] | undefined, + _modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, ) { @@ -127,7 +127,7 @@ export function handler(context: TsTransformPathsContext, prop: string | symbol) return function ( node: ImportTypeNode, argument: TypeNode, - assertions: ImportTypeAssertionContainer | undefined, + _assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean, diff --git a/src/index.ts b/src/index.ts index 76582630..f16c13aa 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,6 @@ import transformer from "./transformer"; export default transformer; -export { TsTransformPathsConfig } from "./types"; +export type { TsTransformPathsConfig } from "./types"; export { register } from "./register"; export { nxTransformerPlugin } from "./plugins"; diff --git a/src/register.ts b/src/register.ts index 1da39f14..43d0161f 100755 --- a/src/register.ts +++ b/src/register.ts @@ -1,4 +1,4 @@ -import type TSNode from "ts-node"; +import TSNode from "ts-node"; import type { REGISTER_INSTANCE } from "ts-node"; import ts from "typescript"; import transformer from "./transformer"; @@ -7,11 +7,18 @@ import transformer from "./transformer"; // region: Helpers /* ****************************************************************************************************************** */ +type PluginExtended = ts.PluginImport & { + transform?: string; + after?: boolean; + before?: boolean; + afterDeclarations?: boolean; +}; + function getProjectTransformerConfig(pcl: ts.ParsedCommandLine) { - const plugins = pcl.options.plugins as Record[] | undefined; + const plugins = pcl.options.plugins as PluginExtended[]; if (!plugins) return; - const res: { afterDeclarations?: Record; before?: Record } = {}; + const res: { afterDeclarations?: PluginExtended; before?: PluginExtended } = {}; for (const plugin of plugins) { if (plugin.transform === "typescript-transform-paths" && !plugin.after) res[plugin.afterDeclarations ? "afterDeclarations" : "before"] = plugin; @@ -22,8 +29,8 @@ function getProjectTransformerConfig(pcl: ts.ParsedCommandLine) { function getTransformers( program?: ts.Program, - beforeConfig?: Record, - afterDeclarationsConfig?: Record, + beforeConfig?: PluginExtended, + afterDeclarationsConfig?: PluginExtended, ): ts.CustomTransformers { return { ...(beforeConfig && { before: [transformer(program, beforeConfig)] }), diff --git a/src/transformer.ts b/src/transformer.ts index fee6078b..5fa7514e 100755 --- a/src/transformer.ts +++ b/src/transformer.ts @@ -7,10 +7,6 @@ import { Minimatch } from "minimatch"; import { createSyntheticEmitHost, getTsNodeRegistrationProperties } from "./utils/ts-helpers"; import { TransformerExtras } from "ts-patch"; -/* ****************************************************************************************************************** */ -// region: Helpers -/* ****************************************************************************************************************** */ - function getTsProperties(args: Parameters) { let fileNames: readonly string[] | undefined; let compilerOptions: CompilerOptions; @@ -69,12 +65,6 @@ function getTsProperties(args: Parameters) { return { tsInstance, compilerOptions, fileNames, runMode, tsNodeState }; } -// endregion - -/* ****************************************************************************************************************** */ -// region: Transformer -/* ****************************************************************************************************************** */ - export default function transformer( program?: ts.Program, pluginConfig?: TsTransformPathsConfig, @@ -114,6 +104,8 @@ export default function transformer( const { tryParsePatterns } = tsInstance; const [tsVersionMajor, tsVersionMinor] = tsInstance.versionMajorMinor.split(".").map((v) => +v); + if (!tsVersionMajor || !tsVersionMinor) throw new Error("Expected version to be parsed"); + const tsTransformPathsContext: TsTransformPathsContext = { compilerOptions, config, @@ -154,5 +146,3 @@ export default function transformer( }; }; } - -// endregion diff --git a/src/utils/elide-import-export.ts b/src/utils/elide-import-export.ts index c60a7392..441e2559 100755 --- a/src/utils/elide-import-export.ts +++ b/src/utils/elide-import-export.ts @@ -131,7 +131,7 @@ export function elideImportOrExportDeclaration( } const allowEmpty = - !!compilerOptions.verbatimModuleSyntax || + !!compilerOptions["verbatimModuleSyntax"] || (!!node.moduleSpecifier && (compilerOptions.importsNotUsedAsValues === ImportsNotUsedAsValues.Preserve || compilerOptions.importsNotUsedAsValues === ImportsNotUsedAsValues.Error)); @@ -187,7 +187,7 @@ export function elideImportOrExportDeclaration( } else { // Elide named imports if all of its import specifiers are elided. const allowEmpty = - compilerOptions.verbatimModuleSyntax || + compilerOptions["verbatimModuleSyntax"] || (compilerOptions.preserveValueImports && (compilerOptions.importsNotUsedAsValues === ImportsNotUsedAsValues.Preserve || compilerOptions.importsNotUsedAsValues === ImportsNotUsedAsValues.Error)); @@ -234,14 +234,14 @@ export function elideImportOrExportDeclaration( */ function visitExportSpecifier(node: ExportSpecifier): VisitResult { // Elide an export specifier if it does not reference a value. - return !node.isTypeOnly && (compilerOptions.verbatimModuleSyntax || resolver.isValueAliasDeclaration(node)) + return !node.isTypeOnly && (compilerOptions["verbatimModuleSyntax"] || resolver.isValueAliasDeclaration(node)) ? node : undefined; } function shouldEmitAliasDeclaration(node: Node): boolean { return ( - !!compilerOptions.verbatimModuleSyntax || + !!compilerOptions["verbatimModuleSyntax"] || isInJSFile(node) || (compilerOptions.preserveValueImports ? resolver.isValueAliasDeclaration(node) diff --git a/src/utils/general-utils.ts b/src/utils/general-utils.ts index 9c21c24b..5563071d 100755 --- a/src/utils/general-utils.ts +++ b/src/utils/general-utils.ts @@ -5,7 +5,7 @@ import path from "path"; * General Utilities & Helpers * ****************************************************************************************************************** */ -export const isURL = (s: string): boolean => !!s && (!!url.parse(s).host || !!url.parse(s).hostname); +export const isURL = (s: string | undefined): s is string => !!s && (!!url.parse(s).host || !!url.parse(s).hostname); export const isBaseDir = (baseDir: string, testDir: string): boolean => { const relative = path.relative(baseDir, testDir); diff --git a/src/utils/resolve-module-name.ts b/src/utils/resolve-module-name.ts index 676502d4..4f1def87 100755 --- a/src/utils/resolve-module-name.ts +++ b/src/utils/resolve-module-name.ts @@ -5,10 +5,6 @@ import { removeFileExtension, removeSuffix, ResolvedModuleFull, SourceFile } fro import { getOutputDirForSourceFile } from "./ts-helpers"; import { getRelativePath } from "./get-relative-path"; -/* ****************************************************************************************************************** */ -// region: Types -/* ****************************************************************************************************************** */ - export interface ResolvedModule { /** Absolute path to resolved module */ resolvedPath: string | undefined; @@ -25,12 +21,6 @@ enum IndexType { ImplicitPackage, } -// endregion - -/* ****************************************************************************************************************** */ -// region: Helpers -/* ****************************************************************************************************************** */ - function getPathDetail(moduleName: string, resolvedModule: ResolvedModuleFull) { const resolvedFileName = resolvedModule.originalPath ?? resolvedModule.resolvedFileName; const implicitPackageIndex = resolvedModule.packageId?.subModuleName; @@ -105,12 +95,6 @@ function getResolvedSourceFile(context: VisitorContext, fileName: string): Sourc return tsInstance.createSourceFile(fileName, ``, tsInstance.ScriptTarget.ESNext, /* setParentNodes */ false); } -// endregion - -/* ****************************************************************************************************************** */ -// region: Utils -/* ****************************************************************************************************************** */ - /** Resolve a module name */ export function resolveModuleName(context: VisitorContext, moduleName: string): ResolvedModule | undefined { const { tsInstance, compilerOptions, sourceFile, config, rootDirs } = context; @@ -126,10 +110,10 @@ export function resolveModuleName(context: VisitorContext, moduleName: string): // Handle non-resolvable module if (!resolvedModule) { const maybeURL = failedLookupLocations[0]; - if (!isURL(maybeURL)) return void 0; + if (!isURL(maybeURL)) return undefined; return { isURL: true, - resolvedPath: void 0, + resolvedPath: undefined, outputPath: maybeURL, }; } @@ -172,5 +156,3 @@ export function resolveModuleName(context: VisitorContext, moduleName: string): return { isURL: false, outputPath, resolvedPath: resolvedFileName }; } - -// endregion diff --git a/src/utils/resolve-path-update-node.ts b/src/utils/resolve-path-update-node.ts index a164dd7d..389935ac 100755 --- a/src/utils/resolve-path-update-node.ts +++ b/src/utils/resolve-path-update-node.ts @@ -4,10 +4,6 @@ import { isURL, maybeAddRelativeLocalPrefix } from "./general-utils"; import { isModulePathsMatch } from "./ts-helpers"; import { resolveModuleName } from "./resolve-module-name"; -/* ****************************************************************************************************************** */ -// region: Node Updater Utility -/* ****************************************************************************************************************** */ - /** Gets proper path and calls updaterFn to get the new node if it should be updated */ export function resolvePathAndUpdateNode( context: VisitorContext, @@ -69,7 +65,8 @@ export function resolvePathAndUpdateNode( const trivia = targetNode.getFullText(sourceFile).slice(0, targetNode.getLeadingTriviaWidth(sourceFile)); const regex = /^\s*\/\/\/?\s*@(transform-path|no-transform-path)(?:[^\S\r\n](.+?))?$/gim; - for (let match = regex.exec(trivia); match; match = regex.exec(trivia)) commentTags.set(match[1], match[2]); + for (let match = regex.exec(trivia); match; match = regex.exec(trivia)) + if (match[1]) commentTags.set(match[1], match[2]); } catch {} } @@ -83,7 +80,7 @@ export function resolvePathAndUpdateNode( function findTag(expected: string): boolean | string | undefined { if (commentTags.has(expected)) return commentTags.get(expected) || true; - if (!jsDocTags?.length) return void 0; + if (!jsDocTags?.length) return undefined; for (const tag of jsDocTags) { const tagName = tag.tagName.text.toLowerCase(); @@ -103,8 +100,8 @@ export function resolvePathAndUpdateNode( : void 0; } } + + return undefined; } } } - -// endregion diff --git a/src/visitor.ts b/src/visitor.ts index d46b849c..c9d5f81f 100755 --- a/src/visitor.ts +++ b/src/visitor.ts @@ -2,13 +2,10 @@ import ts from "typescript"; import { VisitorContext } from "./types"; import { elideImportOrExportDeclaration, resolvePathAndUpdateNode } from "./utils"; -/* ****************************************************************************************************************** * - * Helpers - * ****************************************************************************************************************** */ - const isAsyncImport = ({ tsInstance }: VisitorContext, node: ts.Node): node is ts.CallExpression => tsInstance.isCallExpression(node) && node.expression.kind === tsInstance.SyntaxKind.ImportKeyword && + !!node.arguments[0] && tsInstance.isStringLiteral(node.arguments[0]) && node.arguments.length === 1; @@ -16,13 +13,10 @@ const isRequire = ({ tsInstance }: VisitorContext, node: ts.Node): node is ts.Ca tsInstance.isCallExpression(node) && tsInstance.isIdentifier(node.expression) && node.expression.text === "require" && + !!node.arguments[0] && tsInstance.isStringLiteral(node.arguments[0]) && node.arguments.length === 1; -/* ****************************************************************************************************************** * - * Node Visitor - * ****************************************************************************************************************** */ - /** Visit and replace nodes with module specifiers */ export function nodeVisitor(this: VisitorContext, node: ts.Node): ts.Node | undefined { const { factory, tsInstance, transformationContext } = this; @@ -40,7 +34,8 @@ export function nodeVisitor(this: VisitorContext, node: ts.Node): ts.Node | unde /* Handle comments */ const textNode = node.arguments[0]; - const commentRanges = tsInstance.getLeadingCommentRanges(textNode.getFullText(), 0) || []; + if (!textNode) throw new Error("Expected textNode"); + const commentRanges = tsInstance.getLeadingCommentRanges(textNode.getFullText(), 0) ?? []; for (const range of commentRanges) { const { kind, pos, end, hasTrailingNewLine } = range; diff --git a/tsconfig.json b/tsconfig.json index f041ef40..e338950a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,11 +1,13 @@ { - "extends": "@tsconfig/node18", + "extends": ["@tsconfig/strictest", "@tsconfig/node18"], "include": ["src"], "exclude": ["src/declarations"], "compilerOptions": { "rootDir": "src", "outDir": "dist", "declaration": true, - "sourceMap": true + "sourceMap": true, + // less strict + "exactOptionalPropertyTypes": false } } diff --git a/yarn.lock b/yarn.lock index 6c62a9e9..9ca2bcc5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -217,6 +217,13 @@ __metadata: languageName: node linkType: hard +"@tsconfig/strictest@npm:^2.0.5": + version: 2.0.5 + resolution: "@tsconfig/strictest@npm:2.0.5" + checksum: 10c0/cfc86da2d57f7b4b0827701b132c37a4974284e5c40649656c0e474866dfd8a69f57c6718230d8a8139967e2a95438586b8224c13ab0ff9d3a43eda771c50cc4 + languageName: node + linkType: hard + "@types/debug@npm:^4.0.0": version: 4.1.12 resolution: "@types/debug@npm:4.1.12" @@ -3019,6 +3026,7 @@ __metadata: dependencies: "@eslint/js": "npm:^9.8.0" "@tsconfig/node18": "npm:^18.2.4" + "@tsconfig/strictest": "npm:^2.0.5" "@types/eslint": "npm:^9" "@types/minimatch": "npm:^5.1.2" "@types/node": "npm:^22.2.0" From 1cddaac602d330aac00c56fe5725b30385a59a84 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Sun, 18 Aug 2024 23:21:04 -0400 Subject: [PATCH 05/17] refactor: enable @typescript-eslint/no-explicit-any warning --- eslint.config.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 78a19a48..e1d75ac4 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -25,7 +25,7 @@ export default [ }, { rules: { - "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-explicit-any": "warn", }, }, ]; From 44ad2e02f9b5fccfe8ead0612504be1452f453f8 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Sun, 18 Aug 2024 23:39:12 -0400 Subject: [PATCH 06/17] refactor: add eslint-plugin-unicorn --- eslint.config.mjs | 17 + package.json | 1 + src/harmony/versions/four-seven.ts | 12 +- src/harmony/versions/three-eight.ts | 21 +- src/index.ts | 5 +- src/plugins/nx-transformer-plugin.ts | 2 +- src/transformer.ts | 4 +- src/utils/general-utils.ts | 4 +- src/utils/get-relative-path.ts | 8 +- src/utils/resolve-module-name.ts | 4 +- src/utils/resolve-path-update-node.ts | 8 +- src/utils/ts-helpers.ts | 6 +- test/config.ts | 6 +- test/jest.config.ts | 2 +- test/tests/extras.test.ts | 4 +- test/tests/project-ref.test.ts | 2 +- test/tests/register.test.ts | 19 +- test/tests/transformer/general.test.ts | 6 +- test/tests/transformer/specific.test.ts | 14 +- test/utils/helpers.ts | 2 +- yarn.lock | 497 +++++++++++++++++++++++- 21 files changed, 582 insertions(+), 62 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index e1d75ac4..81067104 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,6 +1,8 @@ +// @ts-check import globals from "globals"; import pluginJs from "@eslint/js"; import tseslint from "typescript-eslint"; +import eslintPluginUnicorn from "eslint-plugin-unicorn"; export default [ { files: ["**/*.{js,mjs,cjs,ts}"] }, @@ -8,6 +10,7 @@ export default [ { languageOptions: { globals: globals.node } }, pluginJs.configs.recommended, ...tseslint.configs.recommended, + eslintPluginUnicorn.configs["flat/recommended"], { rules: { "@typescript-eslint/no-empty-object-type": ["error", { allowInterfaces: "with-single-extends" }], @@ -25,7 +28,21 @@ export default [ }, { rules: { + // fix these warnings "@typescript-eslint/no-explicit-any": "warn", + "unicorn/consistent-function-scoping": "warn", + "unicorn/explicit-length-check": "warn", + "unicorn/import-style": "warn", + "unicorn/no-array-reduce": "warn", + "unicorn/no-nested-ternary": "warn", + "unicorn/prefer-regexp-test": "warn", + "unicorn/prefer-string-slice": "warn", + // disable strict rules/not applicable + "unicorn/empty-brace-spaces": "off", // conflict with prettier + "unicorn/no-array-callback-reference": "off", + "unicorn/prefer-module": "off", + "unicorn/prefer-ternary": "off", + "unicorn/prevent-abbreviations": "off", }, }, ]; diff --git a/package.json b/package.json index 8a74ad72..289189d9 100644 --- a/package.json +++ b/package.json @@ -72,6 +72,7 @@ "@types/typescript-4.7": "npm:typescript@4.7.x", "changelogen": "^0.5.5", "eslint": "9.x", + "eslint-plugin-unicorn": "^55.0.0", "globals": "^15.9.0", "prettier": "^3.3.3", "prettier-plugin-jsdoc": "^1.3.0", diff --git a/src/harmony/versions/four-seven.ts b/src/harmony/versions/four-seven.ts index 4e50739c..c0a7e38f 100644 --- a/src/harmony/versions/four-seven.ts +++ b/src/harmony/versions/four-seven.ts @@ -46,7 +46,7 @@ export function handler(context: TsTransformPathsContext, prop: string | symbol) const factory = context.tsFactory as unknown as TsFourSevenModule.NodeFactory; switch (prop) { - case "updateImportDeclaration": + case "updateImportDeclaration": { return function ( node: ImportDeclaration, _modifiers: readonly Modifier[] | undefined, @@ -70,7 +70,8 @@ export function handler(context: TsTransformPathsContext, prop: string | symbol) dsAssertClause, ); }; - case "updateExportDeclaration": + } + case "updateExportDeclaration": { return function ( node: ExportDeclaration, _modifiers: readonly Modifier[] | undefined, @@ -96,7 +97,8 @@ export function handler(context: TsTransformPathsContext, prop: string | symbol) dsAssertClause, ); }; - case "updateModuleDeclaration": + } + case "updateModuleDeclaration": { return function ( node: ModuleDeclaration, _modifiers: readonly Modifier[] | undefined, @@ -107,8 +109,10 @@ export function handler(context: TsTransformPathsContext, prop: string | symbol) return factory.updateModuleDeclaration(dsNode, dsNode.decorators, dsNode.modifiers, dsName, dsBody); }; - default: + } + default: { return (...args: any) => (factory)[prop](...args); + } } } diff --git a/src/harmony/versions/three-eight.ts b/src/harmony/versions/three-eight.ts index 541994a5..cff317b1 100644 --- a/src/harmony/versions/three-eight.ts +++ b/src/harmony/versions/three-eight.ts @@ -65,9 +65,10 @@ export function handler(context: TsTransformPathsContext, prop: string | symbol) const ts = context.tsInstance as unknown as typeof TsThreeEightModule; switch (prop) { - case "updateCallExpression": + case "updateCallExpression": { return (...args: any) => ts.updateCall.apply(void 0, args); - case "updateImportClause": + } + case "updateImportClause": { return function ( node: ImportClause, _isTypeOnly: boolean, @@ -77,7 +78,8 @@ export function handler(context: TsTransformPathsContext, prop: string | symbol) // @ts-expect-error TODO investigate type issue return ts.updateImportClause.apply(void 0, downSample(node, name, namedBindings)); }; - case "updateImportDeclaration": + } + case "updateImportDeclaration": { return function ( node: ImportDeclaration, _modifiers: readonly Modifier[] | undefined, @@ -94,7 +96,8 @@ export function handler(context: TsTransformPathsContext, prop: string | symbol) dsModuleSpecifier, ); }; - case "updateExportDeclaration": + } + case "updateExportDeclaration": { return function ( node: ExportDeclaration, _modifiers: readonly Modifier[] | undefined, @@ -112,7 +115,8 @@ export function handler(context: TsTransformPathsContext, prop: string | symbol) dsNode.isTypeOnly, ); }; - case "updateModuleDeclaration": + } + case "updateModuleDeclaration": { return function ( node: ModuleDeclaration, _modifiers: readonly Modifier[] | undefined, @@ -123,7 +127,8 @@ export function handler(context: TsTransformPathsContext, prop: string | symbol) return ts.updateModuleDeclaration(dsNode, dsNode.decorators, dsNode.modifiers, dsName, dsBody); }; - case "updateImportTypeNode": + } + case "updateImportTypeNode": { return function ( node: ImportTypeNode, argument: TypeNode, @@ -136,8 +141,10 @@ export function handler(context: TsTransformPathsContext, prop: string | symbol) return ts.updateImportTypeNode(dsNode, dsArgument, dsQualifier, dsTypeArguments, isTypeOf); }; - default: + } + default: { return (...args: any) => (ts)[prop](...args); + } } } diff --git a/src/index.ts b/src/index.ts index f16c13aa..7d4f27dc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,5 @@ -import transformer from "./transformer"; -export default transformer; - export type { TsTransformPathsConfig } from "./types"; export { register } from "./register"; export { nxTransformerPlugin } from "./plugins"; + +export { default } from "./transformer"; diff --git a/src/plugins/nx-transformer-plugin.ts b/src/plugins/nx-transformer-plugin.ts index a10309d3..90396ffa 100644 --- a/src/plugins/nx-transformer-plugin.ts +++ b/src/plugins/nx-transformer-plugin.ts @@ -33,4 +33,4 @@ export const before: NxTransformerFactory = (pluginConfig, program) => pluginConfig?.afterDeclarations ? voidTransformer : transformer(program, { ...pluginConfig }); export const afterDeclarations: NxTransformerFactory = (pluginConfig, program) => - !pluginConfig?.afterDeclarations ? voidTransformer : transformer(program, { ...pluginConfig }); + pluginConfig?.afterDeclarations ? transformer(program, { ...pluginConfig }) : voidTransformer; diff --git a/src/transformer.ts b/src/transformer.ts index 5fa7514e..e4990f8e 100755 --- a/src/transformer.ts +++ b/src/transformer.ts @@ -1,4 +1,4 @@ -import path from "path"; +import path from "node:path"; import ts, { CompilerOptions } from "typescript"; import { RunMode, TsNodeState, TsTransformPathsConfig, TsTransformPathsContext, VisitorContext } from "./types"; import { nodeVisitor } from "./visitor"; @@ -52,7 +52,7 @@ function getTsProperties(args: Parameters) { tsNodeState === TsNodeState.Full ? compilerOptions! : { - ...(program?.getCompilerOptions() ?? {}), + ...program?.getCompilerOptions(), ...tsNodeProps!.compilerOptions, }; } else { diff --git a/src/utils/general-utils.ts b/src/utils/general-utils.ts index 5563071d..57567716 100755 --- a/src/utils/general-utils.ts +++ b/src/utils/general-utils.ts @@ -1,5 +1,5 @@ -import url from "url"; -import path from "path"; +import url from "node:url"; +import path from "node:path"; /* ****************************************************************************************************************** * * General Utilities & Helpers diff --git a/src/utils/get-relative-path.ts b/src/utils/get-relative-path.ts index 2a2f1405..38d17584 100644 --- a/src/utils/get-relative-path.ts +++ b/src/utils/get-relative-path.ts @@ -1,6 +1,6 @@ -import fs from "fs"; -import * as os from "os"; -import path from "path"; +import fs from "node:fs"; +import * as os from "node:os"; +import path from "node:path"; /* ****************************************************************************************************************** */ // region: Locals @@ -21,7 +21,7 @@ function tryRmFile(fileName: string) { } function getIsFsCaseSensitive() { - if (isCaseSensitiveFilesystem != null) return isCaseSensitiveFilesystem; + if (isCaseSensitiveFilesystem != undefined) return isCaseSensitiveFilesystem; for (let i = 0; i < 1000; i++) { const tmpFileName = path.join(os.tmpdir(), `tstp~${i}.tmp`); diff --git a/src/utils/resolve-module-name.ts b/src/utils/resolve-module-name.ts index 4f1def87..09da886b 100755 --- a/src/utils/resolve-module-name.ts +++ b/src/utils/resolve-module-name.ts @@ -1,6 +1,6 @@ import { VisitorContext } from "../types"; import { isBaseDir, isURL, maybeAddRelativeLocalPrefix } from "./general-utils"; -import * as path from "path"; +import * as path from "node:path"; import { removeFileExtension, removeSuffix, ResolvedModuleFull, SourceFile } from "typescript"; import { getOutputDirForSourceFile } from "./ts-helpers"; import { getRelativePath } from "./get-relative-path"; @@ -32,7 +32,7 @@ function getPathDetail(moduleName: string, resolvedModule: ResolvedModuleFull) { const resolvedBaseNameNoExtension = resolvedBaseName && removeFileExtension(resolvedBaseName); const resolvedExtName = resolvedBaseName && path.extname(resolvedFileName); - let baseName = !implicitPackageIndex ? path.basename(moduleName) : void 0; + let baseName = implicitPackageIndex ? void 0 : path.basename(moduleName); let baseNameNoExtension = baseName && removeFileExtension(baseName); let extName = baseName && path.extname(moduleName); diff --git a/src/utils/resolve-path-update-node.ts b/src/utils/resolve-path-update-node.ts index 389935ac..c39d8604 100755 --- a/src/utils/resolve-path-update-node.ts +++ b/src/utils/resolve-path-update-node.ts @@ -22,9 +22,9 @@ export function resolvePathAndUpdateNode( // Accommodate direct override via @transform-path tag if (tags.overridePath) { - const transformedPath = !isURL(tags.overridePath) - ? maybeAddRelativeLocalPrefix(normalizePath(tags.overridePath)) - : tags.overridePath; + const transformedPath = isURL(tags.overridePath) + ? tags.overridePath + : maybeAddRelativeLocalPrefix(normalizePath(tags.overridePath)); return updaterFn(factory.createStringLiteral(transformedPath)); } @@ -63,7 +63,7 @@ export function resolvePathAndUpdateNode( if (targetNode.pos >= 0) { try { const trivia = targetNode.getFullText(sourceFile).slice(0, targetNode.getLeadingTriviaWidth(sourceFile)); - const regex = /^\s*\/\/\/?\s*@(transform-path|no-transform-path)(?:[^\S\r\n](.+?))?$/gim; + const regex = /^\s*\/{2,3}\s*@(transform-path|no-transform-path)(?:[^\S\n\r](.+?))?$/gim; for (let match = regex.exec(trivia); match; match = regex.exec(trivia)) if (match[1]) commentTags.set(match[1], match[2]); diff --git a/src/utils/ts-helpers.ts b/src/utils/ts-helpers.ts index 63962609..9dae038e 100755 --- a/src/utils/ts-helpers.ts +++ b/src/utils/ts-helpers.ts @@ -1,5 +1,5 @@ import ts, { GetCanonicalFileName, SourceFile } from "typescript"; -import path from "path"; +import path from "node:path"; import { VisitorContext } from "../types"; import type { REGISTER_INSTANCE } from "ts-node"; @@ -78,10 +78,10 @@ export function getTsNodeRegistrationProperties(tsInstance: typeof ts) { // eslint-disable-next-line @typescript-eslint/no-require-imports tsNodeSymbol = require("ts-node")?.["REGISTER_INSTANCE"]; } catch { - return undefined; + return; } - if (!global.process[tsNodeSymbol]) return undefined; + if (!global.process[tsNodeSymbol]) return; const { config, options } = global.process[tsNodeSymbol]!; diff --git a/test/config.ts b/test/config.ts index 884cd899..51bdc5ea 100755 --- a/test/config.ts +++ b/test/config.ts @@ -1,9 +1,7 @@ import ts from "typescript"; import tsThree from "typescript-3"; import tsFourSeven from "typescript-4.7"; -import path from "path"; - -export { ts }; +import path from "node:path"; export const tsModules = [ ["3.6.5", tsThree, "typescript-3"], @@ -16,3 +14,5 @@ export const transformerPath = require.resolve("typescript-transform-paths"); export const builtTransformerPath = require.resolve("typescript-transform-paths"); Error.stackTraceLimit = 120; + +export { default as ts } from "typescript"; diff --git a/test/jest.config.ts b/test/jest.config.ts index 2204dca4..8e08ee1a 100755 --- a/test/jest.config.ts +++ b/test/jest.config.ts @@ -3,7 +3,7 @@ import type { JestConfigWithTsJest } from "ts-jest"; const config: JestConfigWithTsJest = { testEnvironment: "node", preset: "ts-jest", - testRegex: ".*(test|spec)\\.tsx?$", + testRegex: String.raw`.*(test|spec)\.tsx?$`, moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"], }; diff --git a/test/tests/extras.test.ts b/test/tests/extras.test.ts index 26e26e6a..58ffb730 100755 --- a/test/tests/extras.test.ts +++ b/test/tests/extras.test.ts @@ -1,9 +1,9 @@ import { createTsProgram, getEmitResultFromProgram, ModuleNotFoundError } from "../utils"; import { projectsPaths } from "../config"; -import path from "path"; +import path from "node:path"; import ts from "typescript"; import * as config from "../config"; -import { execSync } from "child_process"; +import { execSync } from "node:child_process"; /* ****************************************************************************************************************** * * Tests diff --git a/test/tests/project-ref.test.ts b/test/tests/project-ref.test.ts index 656c7fa1..12161702 100755 --- a/test/tests/project-ref.test.ts +++ b/test/tests/project-ref.test.ts @@ -1,5 +1,5 @@ // noinspection ES6UnusedImports -import * as path from "path"; +import * as path from "node:path"; import { createTsSolutionBuilder, EmittedFiles } from "../utils"; import { projectsPaths, ts } from "../config"; diff --git a/test/tests/register.test.ts b/test/tests/register.test.ts index 15842804..5f616fe5 100755 --- a/test/tests/register.test.ts +++ b/test/tests/register.test.ts @@ -24,14 +24,14 @@ const configs = { const configMap = Object.entries(configs).map(([label, cfg]) => { let hasBefore: boolean = false; let hasAfterDeclarations: boolean = false; - const transformers = [cfg] - .flat() - .map((c) => { + const transformers = [ + ...[cfg].flat().map((c) => { if ((c).before || !(c).afterDeclarations) hasBefore = true; if ((c).afterDeclarations) hasAfterDeclarations = true; return { transform: "typescript-transform-paths", ...c, ...pluginOptions } as PluginConfig; - }) - .concat([otherTransformer]); + }), + otherTransformer, + ] as PluginConfig[]; return { label, transformers, hasBefore, hasAfterDeclarations }; }); @@ -140,14 +140,17 @@ describe(`Register script`, () => { let existingTransformers: CustomTransformers | ((p: Program) => CustomTransformers) | undefined; switch (configKind) { - case "Existing Transformer Config Factory": + case "Existing Transformer Config Factory": { existingTransformers = transformerFactoryFn; break; - case "Existing Transformer Config": + } + case "Existing Transformer Config": { existingTransformers = { ...fakeTransformerConfig }; break; - case "No Existing Transformers": + } + case "No Existing Transformers": { existingTransformers = void 0; + } } describe.each(configMap)(`$label`, ({ transformers, hasBefore, hasAfterDeclarations }) => { diff --git a/test/tests/transformer/general.test.ts b/test/tests/transformer/general.test.ts index 800820fd..4c1f67eb 100755 --- a/test/tests/transformer/general.test.ts +++ b/test/tests/transformer/general.test.ts @@ -1,5 +1,5 @@ // noinspection ES6UnusedImports -import * as path from "path"; +import * as path from "node:path"; import { createTsProgram, EmittedFiles, getEmitResultFromProgram } from "../../utils"; import { ts, tsModules, projectsPaths } from "../../config"; @@ -15,8 +15,8 @@ const makeRelative = (tsInstance: typeof ts, fileName: string, p: string, rootDi const getExpected = (tsInstance: typeof ts, fileName: string, original: string, rootDir: string): string => original - .replace(/"@(.*)"/g, (_, p) => makeRelative(tsInstance, fileName, p, rootDir)) - .replace(/"#utils\/(.*)"/g, (_, p) => + .replaceAll(/"@(.*)"/g, (_, p) => makeRelative(tsInstance, fileName, p, rootDir)) + .replaceAll(/"#utils\/(.*)"/g, (_, p) => makeRelative(tsInstance, fileName, path.join(p === "hello" ? "secondary" : "utils", p), rootDir), ) .replace('"path"', '"https://external.url/path.js"') diff --git a/test/tests/transformer/specific.test.ts b/test/tests/transformer/specific.test.ts index 47af8ce1..e787407c 100755 --- a/test/tests/transformer/specific.test.ts +++ b/test/tests/transformer/specific.test.ts @@ -1,5 +1,5 @@ // noinspection ES6UnusedImports -import * as path from "path"; +import * as path from "node:path"; import { createTsProgram, EmittedFiles, @@ -119,12 +119,12 @@ describe(`Specific Tests`, () => { for (const base of bases) { for (const kind of kinds) { const content = base[fileName][kind]; - const isValid = typeof expected === "string" ? content.indexOf(expected) >= 0 : expected.test(content); + const isValid = typeof expected === "string" ? content.includes(expected) : expected.test(content); if (!isValid) { failed = true; messages.push( `File: ${fileName}\nKind: ${kind}\nrootDirs: ${base === normalEmit}\n\n` + - `Expected: \`${expected}\`\nReceived:\n\t${content.replace(/(\r?\n)+/g, "$1\t")}`, + `Expected: \`${expected}\`\nReceived:\n\t${content.replaceAll(/(\r?\n)+/g, "$1\t")}`, ); } } @@ -204,11 +204,11 @@ describe(`Specific Tests`, () => { /* Unreferenced w/ type-only keyword on import specifier */ expect(typeElisionIndex).not.transformedMatches( - /import { ConstB as ____, type TypeAndConst as TypeAndConst3 } from "\.\/a";\s/, + /import { ConstB as _{4}, type TypeAndConst as TypeAndConst3 } from "\.\/a";\s/, { kind: ["dts"] }, ); - expect(typeElisionIndex).not.transformedMatches(/import { ConstB as ____ } from "\.\/a";\s/, { kind: ["js"] }); + expect(typeElisionIndex).not.transformedMatches(/import { ConstB as _{4} } from "\.\/a";\s/, { kind: ["js"] }); } }); @@ -255,7 +255,7 @@ describe(`Specific Tests`, () => { }; for (const exp of [a, b, c, sub]) { - expect(subPackagesFile).transformedMatches(mode !== "program" ? exp.full : exp.js, { kind: ["js"] }); + expect(subPackagesFile).transformedMatches(mode === "program" ? exp.js : exp.full, { kind: ["js"] }); if (!skipDts) expect(subPackagesFile).transformedMatches(exp.full, { kind: ["dts"] }); } @@ -278,7 +278,7 @@ describe(`Specific Tests`, () => { ); }); - (!skipDts ? test : test.skip)(`Resolves module augmentation`, () => { + (skipDts ? test.skip : test)(`Resolves module augmentation`, () => { expect(moduleAugmentFile).transformedMatches(`declare module "./general" {`, { kind: ["dts"] }); expect(moduleAugmentFile).transformedMatches(`declare module "./excluded-file" {`, { kind: ["dts"] }); }); diff --git a/test/utils/helpers.ts b/test/utils/helpers.ts index d6ef815a..d93db331 100755 --- a/test/utils/helpers.ts +++ b/test/utils/helpers.ts @@ -1,5 +1,5 @@ import { default as tstpTransform, TsTransformPathsConfig } from "typescript-transform-paths"; -import fs from "fs"; +import fs from "node:fs"; import ts from "typescript"; import * as tsNode from "ts-node"; import * as config from "../config"; diff --git a/yarn.lock b/yarn.lock index 9ca2bcc5..a0a3cc0d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,6 +5,35 @@ __metadata: version: 8 cacheKey: 10c0 +"@babel/code-frame@npm:^7.0.0": + version: 7.24.7 + resolution: "@babel/code-frame@npm:7.24.7" + dependencies: + "@babel/highlight": "npm:^7.24.7" + picocolors: "npm:^1.0.0" + checksum: 10c0/ab0af539473a9f5aeaac7047e377cb4f4edd255a81d84a76058595f8540784cc3fbe8acf73f1e073981104562490aabfb23008cd66dc677a456a4ed5390fdde6 + languageName: node + linkType: hard + +"@babel/helper-validator-identifier@npm:^7.24.5, @babel/helper-validator-identifier@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-validator-identifier@npm:7.24.7" + checksum: 10c0/87ad608694c9477814093ed5b5c080c2e06d44cb1924ae8320474a74415241223cc2a725eea2640dd783ff1e3390e5f95eede978bc540e870053152e58f1d651 + languageName: node + linkType: hard + +"@babel/highlight@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/highlight@npm:7.24.7" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.24.7" + chalk: "npm:^2.4.2" + js-tokens: "npm:^4.0.0" + picocolors: "npm:^1.0.0" + checksum: 10c0/674334c571d2bb9d1c89bdd87566383f59231e16bcdcf5bb7835babdf03c9ae585ca0887a7b25bdf78f303984af028df52831c7989fecebb5101cc132da9393a + languageName: node + linkType: hard + "@cspotcode/source-map-support@npm:^0.8.0": version: 0.8.1 resolution: "@cspotcode/source-map-support@npm:0.8.1" @@ -289,6 +318,13 @@ __metadata: languageName: node linkType: hard +"@types/normalize-package-data@npm:^2.4.0": + version: 2.4.4 + resolution: "@types/normalize-package-data@npm:2.4.4" + checksum: 10c0/aef7bb9b015883d6f4119c423dd28c4bdc17b0e8a0ccf112c78b4fe0e91fbc4af7c6204b04bba0e199a57d2f3fbbd5b4a14bf8739bf9d2a39b2a0aad545e0f86 + languageName: node + linkType: hard + "@types/ts-expose-internals@npm:ts-expose-internals@4.9.5": version: 4.9.5 resolution: "ts-expose-internals@npm:4.9.5" @@ -556,6 +592,15 @@ __metadata: languageName: node linkType: hard +"ansi-styles@npm:^3.2.1": + version: 3.2.1 + resolution: "ansi-styles@npm:3.2.1" + dependencies: + color-convert: "npm:^1.9.0" + checksum: 10c0/ece5a8ef069fcc5298f67e3f4771a663129abd174ea2dfa87923a2be2abf6cd367ef72ac87942da00ce85bd1d651d4cd8595aebdb1b385889b89b205860e977b + languageName: node + linkType: hard + "ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": version: 4.3.0 resolution: "ansi-styles@npm:4.3.0" @@ -668,6 +713,27 @@ __metadata: languageName: node linkType: hard +"browserslist@npm:^4.23.3": + version: 4.23.3 + resolution: "browserslist@npm:4.23.3" + dependencies: + caniuse-lite: "npm:^1.0.30001646" + electron-to-chromium: "npm:^1.5.4" + node-releases: "npm:^2.0.18" + update-browserslist-db: "npm:^1.1.0" + bin: + browserslist: cli.js + checksum: 10c0/3063bfdf812815346447f4796c8f04601bf5d62003374305fd323c2a463e42776475bcc5309264e39bcf9a8605851e53560695991a623be988138b3ff8c66642 + languageName: node + linkType: hard + +"builtin-modules@npm:^3.3.0": + version: 3.3.0 + resolution: "builtin-modules@npm:3.3.0" + checksum: 10c0/2cb3448b4f7306dc853632a4fcddc95e8d4e4b9868c139400027b71938fc6806d4ff44007deffb362ac85724bd40c2c6452fb6a0aa4531650eeddb98d8e5ee8a + languageName: node + linkType: hard + "bundle-name@npm:^3.0.0": version: 3.0.0 resolution: "bundle-name@npm:3.0.0" @@ -729,6 +795,24 @@ __metadata: languageName: node linkType: hard +"caniuse-lite@npm:^1.0.30001646": + version: 1.0.30001651 + resolution: "caniuse-lite@npm:1.0.30001651" + checksum: 10c0/7821278952a6dbd17358e5d08083d258f092e2a530f5bc1840657cb140fbbc5ec44293bc888258c44a18a9570cde149ed05819ac8320b9710cf22f699891e6ad + languageName: node + linkType: hard + +"chalk@npm:^2.4.2": + version: 2.4.2 + resolution: "chalk@npm:2.4.2" + dependencies: + ansi-styles: "npm:^3.2.1" + escape-string-regexp: "npm:^1.0.5" + supports-color: "npm:^5.3.0" + checksum: 10c0/e6543f02ec877732e3a2d1c3c3323ddb4d39fbab687c23f526e25bd4c6a9bf3b83a696e8c769d078e04e5754921648f7821b2a2acfd16c550435fd630026e073 + languageName: node + linkType: hard + "chalk@npm:^4.0.0, chalk@npm:^4.1.2": version: 4.1.2 resolution: "chalk@npm:4.1.2" @@ -797,6 +881,13 @@ __metadata: languageName: node linkType: hard +"ci-info@npm:^4.0.0": + version: 4.0.0 + resolution: "ci-info@npm:4.0.0" + checksum: 10c0/ecc003e5b60580bd081d83dd61d398ddb8607537f916313e40af4667f9c92a1243bd8e8a591a5aa78e418afec245dbe8e90a0e26e39ca0825129a99b978dd3f9 + languageName: node + linkType: hard + "citty@npm:^0.1.6": version: 0.1.6 resolution: "citty@npm:0.1.6" @@ -806,6 +897,15 @@ __metadata: languageName: node linkType: hard +"clean-regexp@npm:^1.0.0": + version: 1.0.0 + resolution: "clean-regexp@npm:1.0.0" + dependencies: + escape-string-regexp: "npm:^1.0.5" + checksum: 10c0/fd9c7446551b8fc536f95e8a286d431017cd4ba1ec2e53997ec9159385e9c317672f6dfc4d49fdb97449fdb53b0bacd0a8bab9343b8fdd2e46c7ddf6173d0db7 + languageName: node + linkType: hard + "clean-stack@npm:^2.0.0": version: 2.2.0 resolution: "clean-stack@npm:2.2.0" @@ -813,6 +913,15 @@ __metadata: languageName: node linkType: hard +"color-convert@npm:^1.9.0": + version: 1.9.3 + resolution: "color-convert@npm:1.9.3" + dependencies: + color-name: "npm:1.1.3" + checksum: 10c0/5ad3c534949a8c68fca8fbc6f09068f435f0ad290ab8b2f76841b9e6af7e0bb57b98cb05b0e19fe33f5d91e5a8611ad457e5f69e0a484caad1f7487fd0e8253c + languageName: node + linkType: hard + "color-convert@npm:^2.0.1": version: 2.0.1 resolution: "color-convert@npm:2.0.1" @@ -822,6 +931,13 @@ __metadata: languageName: node linkType: hard +"color-name@npm:1.1.3": + version: 1.1.3 + resolution: "color-name@npm:1.1.3" + checksum: 10c0/566a3d42cca25b9b3cd5528cd7754b8e89c0eb646b7f214e8e2eaddb69994ac5f0557d9c175eb5d8f0ad73531140d9c47525085ee752a91a2ab15ab459caf6d6 + languageName: node + linkType: hard + "color-name@npm:~1.1.4": version: 1.1.4 resolution: "color-name@npm:1.1.4" @@ -871,6 +987,15 @@ __metadata: languageName: node linkType: hard +"core-js-compat@npm:^3.37.0": + version: 3.38.0 + resolution: "core-js-compat@npm:3.38.0" + dependencies: + browserslist: "npm:^4.23.3" + checksum: 10c0/9d653a448b8a491034358d2f052e63dda86f75fb65646e2d313a938212470ba1c2f5a83bf31cc583d6c87a9e8d7b0d49458447cab2ff36c4caa097ae381de336 + languageName: node + linkType: hard + "create-require@npm:^1.1.0": version: 1.1.1 resolution: "create-require@npm:1.1.1" @@ -1006,6 +1131,13 @@ __metadata: languageName: node linkType: hard +"electron-to-chromium@npm:^1.5.4": + version: 1.5.11 + resolution: "electron-to-chromium@npm:1.5.11" + checksum: 10c0/87b4c0c959009d3fa1120c73eb277c3fced527e4348c798384daf044b15cfb30bbaa5004e772ef016c5b2a70ee06bb8f756fb85fe3986d66c12d9f702c1fc5bc + languageName: node + linkType: hard + "emoji-regex@npm:^8.0.0": version: 8.0.0 resolution: "emoji-regex@npm:8.0.0" @@ -1043,6 +1175,29 @@ __metadata: languageName: node linkType: hard +"error-ex@npm:^1.3.1": + version: 1.3.2 + resolution: "error-ex@npm:1.3.2" + dependencies: + is-arrayish: "npm:^0.2.1" + checksum: 10c0/ba827f89369b4c93382cfca5a264d059dfefdaa56ecc5e338ffa58a6471f5ed93b71a20add1d52290a4873d92381174382658c885ac1a2305f7baca363ce9cce + languageName: node + linkType: hard + +"escalade@npm:^3.1.2": + version: 3.1.2 + resolution: "escalade@npm:3.1.2" + checksum: 10c0/6b4adafecd0682f3aa1cd1106b8fff30e492c7015b178bc81b2d2f75106dabea6c6d6e8508fc491bd58e597c74abb0e8e2368f943ecb9393d4162e3c2f3cf287 + languageName: node + linkType: hard + +"escape-string-regexp@npm:^1.0.5": + version: 1.0.5 + resolution: "escape-string-regexp@npm:1.0.5" + checksum: 10c0/a968ad453dd0c2724e14a4f20e177aaf32bb384ab41b674a8454afe9a41c5e6fe8903323e0a1052f56289d04bd600f81278edf140b0fcc02f5cac98d0f5b5371 + languageName: node + linkType: hard + "escape-string-regexp@npm:^4.0.0": version: 4.0.0 resolution: "escape-string-regexp@npm:4.0.0" @@ -1050,6 +1205,32 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-unicorn@npm:^55.0.0": + version: 55.0.0 + resolution: "eslint-plugin-unicorn@npm:55.0.0" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.24.5" + "@eslint-community/eslint-utils": "npm:^4.4.0" + ci-info: "npm:^4.0.0" + clean-regexp: "npm:^1.0.0" + core-js-compat: "npm:^3.37.0" + esquery: "npm:^1.5.0" + globals: "npm:^15.7.0" + indent-string: "npm:^4.0.0" + is-builtin-module: "npm:^3.2.1" + jsesc: "npm:^3.0.2" + pluralize: "npm:^8.0.0" + read-pkg-up: "npm:^7.0.1" + regexp-tree: "npm:^0.1.27" + regjsparser: "npm:^0.10.0" + semver: "npm:^7.6.1" + strip-indent: "npm:^3.0.0" + peerDependencies: + eslint: ">=8.56.0" + checksum: 10c0/31620da5c823abc791a3f4c9a0ab19baf21820bd38f018eafbc862ea0bbc3e4baedbdaaaf48f2dc1b2a59dfc7b341e654f2126c394f5d62fb5216e632d8a2c03 + languageName: node + linkType: hard + "eslint-scope@npm:^8.0.2": version: 8.0.2 resolution: "eslint-scope@npm:8.0.2" @@ -1285,6 +1466,16 @@ __metadata: languageName: node linkType: hard +"find-up@npm:^4.1.0": + version: 4.1.0 + resolution: "find-up@npm:4.1.0" + dependencies: + locate-path: "npm:^5.0.0" + path-exists: "npm:^4.0.0" + checksum: 10c0/0406ee89ebeefa2d507feb07ec366bebd8a6167ae74aa4e34fb4c4abd06cf782a3ce26ae4194d70706f72182841733f00551c209fe575cb00bd92104056e78c1 + languageName: node + linkType: hard + "find-up@npm:^5.0.0": version: 5.0.0 resolution: "find-up@npm:5.0.0" @@ -1450,7 +1641,7 @@ __metadata: languageName: node linkType: hard -"globals@npm:^15.9.0": +"globals@npm:^15.7.0, globals@npm:^15.9.0": version: 15.9.0 resolution: "globals@npm:15.9.0" checksum: 10c0/de4b553e412e7e830998578d51b605c492256fb2a9273eaeec6ec9ee519f1c5aa50de57e3979911607fd7593a4066420e01d8c3d551e7a6a236e96c521aee36c @@ -1485,6 +1676,13 @@ __metadata: languageName: node linkType: hard +"has-flag@npm:^3.0.0": + version: 3.0.0 + resolution: "has-flag@npm:3.0.0" + checksum: 10c0/1c6c83b14b8b1b3c25b0727b8ba3e3b647f99e9e6e13eb7322107261de07a4c1be56fc0d45678fc376e09772a3a1642ccdaf8fc69bdf123b6c086598397ce473 + languageName: node + linkType: hard + "has-flag@npm:^4.0.0": version: 4.0.0 resolution: "has-flag@npm:4.0.0" @@ -1501,6 +1699,13 @@ __metadata: languageName: node linkType: hard +"hosted-git-info@npm:^2.1.4": + version: 2.8.9 + resolution: "hosted-git-info@npm:2.8.9" + checksum: 10c0/317cbc6b1bbbe23c2a40ae23f3dafe9fa349ce42a89a36f930e3f9c0530c179a3882d2ef1e4141a4c3674d6faaea862138ec55b43ad6f75e387fda2483a13c70 + languageName: node + linkType: hard + "http-cache-semantics@npm:^4.1.1": version: 4.1.1 resolution: "http-cache-semantics@npm:4.1.1" @@ -1606,6 +1811,13 @@ __metadata: languageName: node linkType: hard +"is-arrayish@npm:^0.2.1": + version: 0.2.1 + resolution: "is-arrayish@npm:0.2.1" + checksum: 10c0/e7fb686a739068bb70f860b39b67afc62acc62e36bb61c5f965768abce1873b379c563e61dd2adad96ebb7edf6651111b385e490cf508378959b0ed4cac4e729 + languageName: node + linkType: hard + "is-binary-path@npm:~2.1.0": version: 2.1.0 resolution: "is-binary-path@npm:2.1.0" @@ -1615,6 +1827,15 @@ __metadata: languageName: node linkType: hard +"is-builtin-module@npm:^3.2.1": + version: 3.2.1 + resolution: "is-builtin-module@npm:3.2.1" + dependencies: + builtin-modules: "npm:^3.3.0" + checksum: 10c0/5a66937a03f3b18803381518f0ef679752ac18cdb7dd53b5e23ee8df8d440558737bd8dcc04d2aae555909d2ecb4a81b5c0d334d119402584b61e6a003e31af1 + languageName: node + linkType: hard + "is-core-module@npm:^2.13.0": version: 2.15.0 resolution: "is-core-module@npm:2.15.0" @@ -1756,6 +1977,13 @@ __metadata: languageName: node linkType: hard +"js-tokens@npm:^4.0.0": + version: 4.0.0 + resolution: "js-tokens@npm:4.0.0" + checksum: 10c0/e248708d377aa058eacf2037b07ded847790e6de892bbad3dac0abba2e759cb9f121b00099a65195616badcb6eca8d14d975cb3e89eb1cfda644756402c8aeed + languageName: node + linkType: hard + "js-yaml@npm:^4.1.0": version: 4.1.0 resolution: "js-yaml@npm:4.1.0" @@ -1774,6 +2002,24 @@ __metadata: languageName: node linkType: hard +"jsesc@npm:^3.0.2": + version: 3.0.2 + resolution: "jsesc@npm:3.0.2" + bin: + jsesc: bin/jsesc + checksum: 10c0/ef22148f9e793180b14d8a145ee6f9f60f301abf443288117b4b6c53d0ecd58354898dc506ccbb553a5f7827965cd38bc5fb726575aae93c5e8915e2de8290e1 + languageName: node + linkType: hard + +"jsesc@npm:~0.5.0": + version: 0.5.0 + resolution: "jsesc@npm:0.5.0" + bin: + jsesc: bin/jsesc + checksum: 10c0/f93792440ae1d80f091b65f8ceddf8e55c4bb7f1a09dee5dcbdb0db5612c55c0f6045625aa6b7e8edb2e0a4feabd80ee48616dbe2d37055573a84db3d24f96d9 + languageName: node + linkType: hard + "json-buffer@npm:3.0.1": version: 3.0.1 resolution: "json-buffer@npm:3.0.1" @@ -1781,6 +2027,13 @@ __metadata: languageName: node linkType: hard +"json-parse-even-better-errors@npm:^2.3.0": + version: 2.3.1 + resolution: "json-parse-even-better-errors@npm:2.3.1" + checksum: 10c0/140932564c8f0b88455432e0f33c4cb4086b8868e37524e07e723f4eaedb9425bdc2bafd71bd1d9765bd15fd1e2d126972bc83990f55c467168c228c24d665f3 + languageName: node + linkType: hard + "json-schema-traverse@npm:^0.4.1": version: 0.4.1 resolution: "json-schema-traverse@npm:0.4.1" @@ -1821,6 +2074,22 @@ __metadata: languageName: node linkType: hard +"lines-and-columns@npm:^1.1.6": + version: 1.2.4 + resolution: "lines-and-columns@npm:1.2.4" + checksum: 10c0/3da6ee62d4cd9f03f5dc90b4df2540fb85b352081bee77fe4bbcd12c9000ead7f35e0a38b8d09a9bb99b13223446dd8689ff3c4959807620726d788701a83d2d + languageName: node + linkType: hard + +"locate-path@npm:^5.0.0": + version: 5.0.0 + resolution: "locate-path@npm:5.0.0" + dependencies: + p-locate: "npm:^4.1.0" + checksum: 10c0/33a1c5247e87e022f9713e6213a744557a3e9ec32c5d0b5efb10aa3a38177615bf90221a5592674857039c1a0fd2063b82f285702d37b792d973e9e72ace6c59 + languageName: node + linkType: hard + "locate-path@npm:^6.0.0": version: 6.0.0 resolution: "locate-path@npm:6.0.0" @@ -2174,6 +2443,13 @@ __metadata: languageName: node linkType: hard +"min-indent@npm:^1.0.0": + version: 1.0.1 + resolution: "min-indent@npm:1.0.1" + checksum: 10c0/7e207bd5c20401b292de291f02913230cb1163abca162044f7db1d951fa245b174dc00869d40dd9a9f32a885ad6a5f3e767ee104cf278f399cb4e92d3f582d5c + languageName: node + linkType: hard + "minimatch@npm:^10.0.1": version: 10.0.1 resolution: "minimatch@npm:10.0.1" @@ -2368,6 +2644,13 @@ __metadata: languageName: node linkType: hard +"node-releases@npm:^2.0.18": + version: 2.0.18 + resolution: "node-releases@npm:2.0.18" + checksum: 10c0/786ac9db9d7226339e1dc84bbb42007cb054a346bd9257e6aa154d294f01bc6a6cddb1348fa099f079be6580acbb470e3c048effd5f719325abd0179e566fd27 + languageName: node + linkType: hard + "nopt@npm:^7.0.0": version: 7.2.1 resolution: "nopt@npm:7.2.1" @@ -2379,6 +2662,18 @@ __metadata: languageName: node linkType: hard +"normalize-package-data@npm:^2.5.0": + version: 2.5.0 + resolution: "normalize-package-data@npm:2.5.0" + dependencies: + hosted-git-info: "npm:^2.1.4" + resolve: "npm:^1.10.0" + semver: "npm:2 || 3 || 4 || 5" + validate-npm-package-license: "npm:^3.0.1" + checksum: 10c0/357cb1646deb42f8eb4c7d42c4edf0eec312f3628c2ef98501963cc4bbe7277021b2b1d977f982b2edce78f5a1014613ce9cf38085c3df2d76730481357ca504 + languageName: node + linkType: hard + "normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": version: 3.0.0 resolution: "normalize-path@npm:3.0.0" @@ -2482,6 +2777,15 @@ __metadata: languageName: node linkType: hard +"p-limit@npm:^2.2.0": + version: 2.3.0 + resolution: "p-limit@npm:2.3.0" + dependencies: + p-try: "npm:^2.0.0" + checksum: 10c0/8da01ac53efe6a627080fafc127c873da40c18d87b3f5d5492d465bb85ec7207e153948df6b9cbaeb130be70152f874229b8242ee2be84c0794082510af97f12 + languageName: node + linkType: hard + "p-limit@npm:^3.0.2": version: 3.1.0 resolution: "p-limit@npm:3.1.0" @@ -2491,6 +2795,15 @@ __metadata: languageName: node linkType: hard +"p-locate@npm:^4.1.0": + version: 4.1.0 + resolution: "p-locate@npm:4.1.0" + dependencies: + p-limit: "npm:^2.2.0" + checksum: 10c0/1b476ad69ad7f6059744f343b26d51ce091508935c1dbb80c4e0a2f397ffce0ca3a1f9f5cd3c7ce19d7929a09719d5c65fe70d8ee289c3f267cd36f2881813e9 + languageName: node + linkType: hard + "p-locate@npm:^5.0.0": version: 5.0.0 resolution: "p-locate@npm:5.0.0" @@ -2509,6 +2822,13 @@ __metadata: languageName: node linkType: hard +"p-try@npm:^2.0.0": + version: 2.2.0 + resolution: "p-try@npm:2.2.0" + checksum: 10c0/c36c19907734c904b16994e6535b02c36c2224d433e01a2f1ab777237f4d86e6289fd5fd464850491e940379d4606ed850c03e0f9ab600b0ebddb511312e177f + languageName: node + linkType: hard + "package-json-from-dist@npm:^1.0.0": version: 1.0.0 resolution: "package-json-from-dist@npm:1.0.0" @@ -2525,6 +2845,18 @@ __metadata: languageName: node linkType: hard +"parse-json@npm:^5.0.0": + version: 5.2.0 + resolution: "parse-json@npm:5.2.0" + dependencies: + "@babel/code-frame": "npm:^7.0.0" + error-ex: "npm:^1.3.1" + json-parse-even-better-errors: "npm:^2.3.0" + lines-and-columns: "npm:^1.1.6" + checksum: 10c0/77947f2253005be7a12d858aedbafa09c9ae39eb4863adf330f7b416ca4f4a08132e453e08de2db46459256fb66afaac5ee758b44fe6541b7cdaf9d252e59585 + languageName: node + linkType: hard + "path-exists@npm:^4.0.0": version: 4.0.0 resolution: "path-exists@npm:4.0.0" @@ -2584,6 +2916,13 @@ __metadata: languageName: node linkType: hard +"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1": + version: 1.0.1 + resolution: "picocolors@npm:1.0.1" + checksum: 10c0/c63cdad2bf812ef0d66c8db29583802355d4ca67b9285d846f390cc15c2f6ccb94e8cb7eb6a6e97fc5990a6d3ad4ae42d86c84d3146e667c739a4234ed50d400 + languageName: node + linkType: hard + "picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" @@ -2602,6 +2941,13 @@ __metadata: languageName: node linkType: hard +"pluralize@npm:^8.0.0": + version: 8.0.0 + resolution: "pluralize@npm:8.0.0" + checksum: 10c0/2044cfc34b2e8c88b73379ea4a36fc577db04f651c2909041b054c981cd863dd5373ebd030123ab058d194ae615d3a97cfdac653991e499d10caf592e8b3dc33 + languageName: node + linkType: hard + "prelude-ls@npm:^1.2.1": version: 1.2.1 resolution: "prelude-ls@npm:1.2.1" @@ -2672,6 +3018,29 @@ __metadata: languageName: node linkType: hard +"read-pkg-up@npm:^7.0.1": + version: 7.0.1 + resolution: "read-pkg-up@npm:7.0.1" + dependencies: + find-up: "npm:^4.1.0" + read-pkg: "npm:^5.2.0" + type-fest: "npm:^0.8.1" + checksum: 10c0/82b3ac9fd7c6ca1bdc1d7253eb1091a98ff3d195ee0a45386582ce3e69f90266163c34121e6a0a02f1630073a6c0585f7880b3865efcae9c452fa667f02ca385 + languageName: node + linkType: hard + +"read-pkg@npm:^5.2.0": + version: 5.2.0 + resolution: "read-pkg@npm:5.2.0" + dependencies: + "@types/normalize-package-data": "npm:^2.4.0" + normalize-package-data: "npm:^2.5.0" + parse-json: "npm:^5.0.0" + type-fest: "npm:^0.6.0" + checksum: 10c0/b51a17d4b51418e777029e3a7694c9bd6c578a5ab99db544764a0b0f2c7c0f58f8a6bc101f86a6fceb8ba6d237d67c89acf6170f6b98695d0420ddc86cf109fb + languageName: node + linkType: hard + "readdirp@npm:~3.6.0": version: 3.6.0 resolution: "readdirp@npm:3.6.0" @@ -2681,6 +3050,26 @@ __metadata: languageName: node linkType: hard +"regexp-tree@npm:^0.1.27": + version: 0.1.27 + resolution: "regexp-tree@npm:0.1.27" + bin: + regexp-tree: bin/regexp-tree + checksum: 10c0/f636f44b4a0d93d7d6926585ecd81f63e4ce2ac895bc417b2ead0874cd36b337dcc3d0fedc63f69bf5aaeaa4340f36ca7e750c9687cceaf8087374e5284e843c + languageName: node + linkType: hard + +"regjsparser@npm:^0.10.0": + version: 0.10.0 + resolution: "regjsparser@npm:0.10.0" + dependencies: + jsesc: "npm:~0.5.0" + bin: + regjsparser: bin/parser + checksum: 10c0/0f0508c142eddbceae55dab9715e714305c19e1e130db53168e8fa5f9f7ff9a4901f674cf6f71e04a0973b2f883882ba05808c80778b2d52b053d925050010f4 + languageName: node + linkType: hard + "resolve-from@npm:^4.0.0": version: 4.0.0 resolution: "resolve-from@npm:4.0.0" @@ -2688,7 +3077,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.22.2": +"resolve@npm:^1.10.0, resolve@npm:^1.22.2": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -2701,7 +3090,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^1.22.2#optional!builtin": +"resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.2#optional!builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" dependencies: @@ -2760,7 +3149,16 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.3.5, semver@npm:^7.5.4, semver@npm:^7.6.0": +"semver@npm:2 || 3 || 4 || 5": + version: 5.7.2 + resolution: "semver@npm:5.7.2" + bin: + semver: bin/semver + checksum: 10c0/e4cf10f86f168db772ae95d86ba65b3fd6c5967c94d97c708ccb463b778c2ee53b914cd7167620950fc07faf5a564e6efe903836639e512a1aa15fbc9667fa25 + languageName: node + linkType: hard + +"semver@npm:^7.3.5, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.1": version: 7.6.3 resolution: "semver@npm:7.6.3" bin: @@ -2834,6 +3232,40 @@ __metadata: languageName: node linkType: hard +"spdx-correct@npm:^3.0.0": + version: 3.2.0 + resolution: "spdx-correct@npm:3.2.0" + dependencies: + spdx-expression-parse: "npm:^3.0.0" + spdx-license-ids: "npm:^3.0.0" + checksum: 10c0/49208f008618b9119208b0dadc9208a3a55053f4fd6a0ae8116861bd22696fc50f4142a35ebfdb389e05ccf2de8ad142573fefc9e26f670522d899f7b2fe7386 + languageName: node + linkType: hard + +"spdx-exceptions@npm:^2.1.0": + version: 2.5.0 + resolution: "spdx-exceptions@npm:2.5.0" + checksum: 10c0/37217b7762ee0ea0d8b7d0c29fd48b7e4dfb94096b109d6255b589c561f57da93bf4e328c0290046115961b9209a8051ad9f525e48d433082fc79f496a4ea940 + languageName: node + linkType: hard + +"spdx-expression-parse@npm:^3.0.0": + version: 3.0.1 + resolution: "spdx-expression-parse@npm:3.0.1" + dependencies: + spdx-exceptions: "npm:^2.1.0" + spdx-license-ids: "npm:^3.0.0" + checksum: 10c0/6f8a41c87759fa184a58713b86c6a8b028250f158159f1d03ed9d1b6ee4d9eefdc74181c8ddc581a341aa971c3e7b79e30b59c23b05d2436d5de1c30bdef7171 + languageName: node + linkType: hard + +"spdx-license-ids@npm:^3.0.0": + version: 3.0.18 + resolution: "spdx-license-ids@npm:3.0.18" + checksum: 10c0/c64ba03d4727191c8fdbd001f137d6ab51386c350d5516be8a4576c2e74044cb27bc8a758f6a04809da986cc0b14213f069b04de72caccecbc9f733753ccde32 + languageName: node + linkType: hard + "sprintf-js@npm:^1.1.3": version: 1.1.3 resolution: "sprintf-js@npm:1.1.3" @@ -2911,6 +3343,15 @@ __metadata: languageName: node linkType: hard +"strip-indent@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-indent@npm:3.0.0" + dependencies: + min-indent: "npm:^1.0.0" + checksum: 10c0/ae0deaf41c8d1001c5d4fbe16cb553865c1863da4fae036683b474fa926af9fc121e155cb3fc57a68262b2ae7d5b8420aa752c97a6428c315d00efe2a3875679 + languageName: node + linkType: hard + "strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" @@ -2918,6 +3359,15 @@ __metadata: languageName: node linkType: hard +"supports-color@npm:^5.3.0": + version: 5.5.0 + resolution: "supports-color@npm:5.5.0" + dependencies: + has-flag: "npm:^3.0.0" + checksum: 10c0/6ae5ff319bfbb021f8a86da8ea1f8db52fac8bd4d499492e30ec17095b58af11f0c55f8577390a749b1c4dde691b6a0315dab78f5f54c9b3d83f8fb5905c1c05 + languageName: node + linkType: hard + "supports-color@npm:^7.1.0": version: 7.2.0 resolution: "supports-color@npm:7.2.0" @@ -3006,6 +3456,20 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^0.6.0": + version: 0.6.0 + resolution: "type-fest@npm:0.6.0" + checksum: 10c0/0c585c26416fce9ecb5691873a1301b5aff54673c7999b6f925691ed01f5b9232db408cdbb0bd003d19f5ae284322523f44092d1f81ca0a48f11f7cf0be8cd38 + languageName: node + linkType: hard + +"type-fest@npm:^0.8.1": + version: 0.8.1 + resolution: "type-fest@npm:0.8.1" + checksum: 10c0/dffbb99329da2aa840f506d376c863bd55f5636f4741ad6e65e82f5ce47e6914108f44f340a0b74009b0cb5d09d6752ae83203e53e98b1192cf80ecee5651636 + languageName: node + linkType: hard + "typescript-eslint@npm:^8.0.1": version: 8.1.0 resolution: "typescript-eslint@npm:8.1.0" @@ -3036,6 +3500,7 @@ __metadata: "@types/typescript-4.7": "npm:typescript@4.7.x" changelogen: "npm:^0.5.5" eslint: "npm:9.x" + eslint-plugin-unicorn: "npm:^55.0.0" globals: "npm:^15.9.0" minimatch: "npm:^10.0.1" prettier: "npm:^3.3.3" @@ -3116,6 +3581,20 @@ __metadata: languageName: node linkType: hard +"update-browserslist-db@npm:^1.1.0": + version: 1.1.0 + resolution: "update-browserslist-db@npm:1.1.0" + dependencies: + escalade: "npm:^3.1.2" + picocolors: "npm:^1.0.1" + peerDependencies: + browserslist: ">= 4.21.0" + bin: + update-browserslist-db: cli.js + checksum: 10c0/a7452de47785842736fb71547651c5bbe5b4dc1e3722ccf48a704b7b34e4dcf633991eaa8e4a6a517ffb738b3252eede3773bef673ef9021baa26b056d63a5b9 + languageName: node + linkType: hard + "uri-js@npm:^4.2.2": version: 4.4.1 resolution: "uri-js@npm:4.4.1" @@ -3132,6 +3611,16 @@ __metadata: languageName: node linkType: hard +"validate-npm-package-license@npm:^3.0.1": + version: 3.0.4 + resolution: "validate-npm-package-license@npm:3.0.4" + dependencies: + spdx-correct: "npm:^3.0.0" + spdx-expression-parse: "npm:^3.0.0" + checksum: 10c0/7b91e455a8de9a0beaa9fe961e536b677da7f48c9a493edf4d4d4a87fd80a7a10267d438723364e432c2fcd00b5650b5378275cded362383ef570276e6312f4f + languageName: node + linkType: hard + "which@npm:^1.3.1": version: 1.3.1 resolution: "which@npm:1.3.1" From 2f8a19fb0fa917ad6942b296587327470057f0ef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 19:34:20 +0000 Subject: [PATCH 07/17] chore(deps-dev): bump typescript-eslint from 8.1.0 to 8.2.0 (#249) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.1.0 to 8.2.0.
Release notes

Sourced from typescript-eslint's releases.

v8.2.0

8.2.0 (2024-08-19)

🚀 Features

  • eslint-plugin: add suggestion to require-await to remove async keyword (#9718)
  • typescript-estree: special-case error for parserOptions.project and project references (#9686)

🩹 Fixes

  • eslint-plugin: [use-unknown-in-catch-callback-variable] flag second argument of .then (#9059)
  • eslint-plugin: [no-unnecessary-type-assertion] conflict with TS for variables used before assignment (#9209)
  • eslint-plugin: delete [] in message if ReadOnly is detected (#9513)
  • eslint-plugin: [no-redundant-type-constituents] differentiate a types-error any from a true any (#9555)
  • eslint-plugin: [no-unnecessary-type-parameters] check mapped constraint types if necessary (#9740)
  • eslint-plugin: [no-unsafe-enum-comparison] add logic to see through intersections (#9777)
  • typescript-estree: pass in tsconfigRootDir as cwd to getParsedConfigFile (#9804)

❤️ Thank You

You can read about our versioning strategy and releases on our website.

Changelog

Sourced from typescript-eslint's changelog.

8.2.0 (2024-08-19)

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 and releases on our website.

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=typescript-eslint&package-manager=npm_and_yarn&previous-version=8.1.0&new-version=8.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 112 +++++++++++++++++++++++++++--------------------------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/yarn.lock b/yarn.lock index a0a3cc0d..cb96a2db 100644 --- a/yarn.lock +++ b/yarn.lock @@ -397,15 +397,15 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:8.1.0": - version: 8.1.0 - resolution: "@typescript-eslint/eslint-plugin@npm:8.1.0" +"@typescript-eslint/eslint-plugin@npm:8.2.0": + version: 8.2.0 + resolution: "@typescript-eslint/eslint-plugin@npm:8.2.0" dependencies: "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.1.0" - "@typescript-eslint/type-utils": "npm:8.1.0" - "@typescript-eslint/utils": "npm:8.1.0" - "@typescript-eslint/visitor-keys": "npm:8.1.0" + "@typescript-eslint/scope-manager": "npm:8.2.0" + "@typescript-eslint/type-utils": "npm:8.2.0" + "@typescript-eslint/utils": "npm:8.2.0" + "@typescript-eslint/visitor-keys": "npm:8.2.0" graphemer: "npm:^1.4.0" ignore: "npm:^5.3.1" natural-compare: "npm:^1.4.0" @@ -416,66 +416,66 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/7bbeae588f859b59c34d6a76cac06ef0fa605921b40c5d3b65b94829984280ea84c4dd3f5cb9ce2eb326f5563e9abb4c90ebff05c47f83f4def296c2ea1fa86c + checksum: 10c0/17243ee1b34d78723fe3e1a308c64490eee49bd83301e3abe8a6f05bce05434d70f56caf75756b8cffa051154dc89cdf485114ede6781fc087f0aaca37a026ec languageName: node linkType: hard -"@typescript-eslint/parser@npm:8.1.0": - version: 8.1.0 - resolution: "@typescript-eslint/parser@npm:8.1.0" +"@typescript-eslint/parser@npm:8.2.0": + version: 8.2.0 + resolution: "@typescript-eslint/parser@npm:8.2.0" dependencies: - "@typescript-eslint/scope-manager": "npm:8.1.0" - "@typescript-eslint/types": "npm:8.1.0" - "@typescript-eslint/typescript-estree": "npm:8.1.0" - "@typescript-eslint/visitor-keys": "npm:8.1.0" + "@typescript-eslint/scope-manager": "npm:8.2.0" + "@typescript-eslint/types": "npm:8.2.0" + "@typescript-eslint/typescript-estree": "npm:8.2.0" + "@typescript-eslint/visitor-keys": "npm:8.2.0" debug: "npm:^4.3.4" peerDependencies: eslint: ^8.57.0 || ^9.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/b94b2d3ab5ca505484d100701fad6a04a5dc8d595029bac1b9f5b8a4a91d80fd605b0f65d230b36a97ab7e5d55eeb0c28af2ab63929a3e4ab8fdefd2a548c36b + checksum: 10c0/bb4ebc0a40b5e68c5287de17af3acf3045e2ef7886ebee8d1c4a6fd07bd6d55e9fc12bc7b89d07d15a2a4182cbf6380b50ad148d4a37e93d2e54930aa386a3bf languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:8.1.0": - version: 8.1.0 - resolution: "@typescript-eslint/scope-manager@npm:8.1.0" +"@typescript-eslint/scope-manager@npm:8.2.0": + version: 8.2.0 + resolution: "@typescript-eslint/scope-manager@npm:8.2.0" dependencies: - "@typescript-eslint/types": "npm:8.1.0" - "@typescript-eslint/visitor-keys": "npm:8.1.0" - checksum: 10c0/2bcf8cd176a1819bddcae16c572e7da8fba821b995a91cd53d64d8d6b85a17f5a895522f281ba57e34929574bddd4d6684ee3e545ec4e8096be4c3198e253a9a + "@typescript-eslint/types": "npm:8.2.0" + "@typescript-eslint/visitor-keys": "npm:8.2.0" + checksum: 10c0/8026e11d9cfbb674c62eb38929d08d42c4a373f3463c2591ed6603c496d3d00321f553edce47f1d7504b55fcbe9664ea2bdcaa3131c8c834bde1b1f07497af5d languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:8.1.0": - version: 8.1.0 - resolution: "@typescript-eslint/type-utils@npm:8.1.0" +"@typescript-eslint/type-utils@npm:8.2.0": + version: 8.2.0 + resolution: "@typescript-eslint/type-utils@npm:8.2.0" dependencies: - "@typescript-eslint/typescript-estree": "npm:8.1.0" - "@typescript-eslint/utils": "npm:8.1.0" + "@typescript-eslint/typescript-estree": "npm:8.2.0" + "@typescript-eslint/utils": "npm:8.2.0" debug: "npm:^4.3.4" ts-api-utils: "npm:^1.3.0" peerDependenciesMeta: typescript: optional: true - checksum: 10c0/62753941c4136e8d2daa72fe0410dea48e5317a6f12ece6382ca85e29912bd1b3f739b61d1060fc0a1f8c488dfc905beab4c8b8497951a21c3138a659c7271ec + checksum: 10c0/5ff387d39fec3ba47af167ca3e48a200f87e4b97b010170245f495cd3d2e30fd0a5b2a9b27aae2ae929c99f92acabcd07315944dc6f9de963bad1c61ba9ea53c languageName: node linkType: hard -"@typescript-eslint/types@npm:8.1.0": - version: 8.1.0 - resolution: "@typescript-eslint/types@npm:8.1.0" - checksum: 10c0/ceade44455f45974e68956016c4d1c6626580732f7f9675e14ffa63db80b551752b0df596b20473dae9f0dc6ed966e17417dc2cf36e1a82b6ab0edc97c5eaa50 +"@typescript-eslint/types@npm:8.2.0": + version: 8.2.0 + resolution: "@typescript-eslint/types@npm:8.2.0" + checksum: 10c0/2ffba0d0183dfdd2f859fb414013d17d009f5e886664823f973aaa1145243fceb52cfe26aa7c50208af7833b3703b7788337f1aab136c9a4eb36d905493847d1 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:8.1.0": - version: 8.1.0 - resolution: "@typescript-eslint/typescript-estree@npm:8.1.0" +"@typescript-eslint/typescript-estree@npm:8.2.0": + version: 8.2.0 + resolution: "@typescript-eslint/typescript-estree@npm:8.2.0" dependencies: - "@typescript-eslint/types": "npm:8.1.0" - "@typescript-eslint/visitor-keys": "npm:8.1.0" + "@typescript-eslint/types": "npm:8.2.0" + "@typescript-eslint/visitor-keys": "npm:8.2.0" debug: "npm:^4.3.4" globby: "npm:^11.1.0" is-glob: "npm:^4.0.3" @@ -485,31 +485,31 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/a7bc8275df1c79c4cb14ef086c56674316dd4907efec53eddca35d0b5220428b69c82178ce2d95138da2e398269c8bd0764cae8020a36417e411e35c3c47bc4b + checksum: 10c0/f49aabc78e396908307394812fdebc4015ca407983efc361be106d3e2d58971dec4a1a725362fcfbd637f3d8150baa0735eb5929fd170172b7f2a65e06eeb3d2 languageName: node linkType: hard -"@typescript-eslint/utils@npm:8.1.0": - version: 8.1.0 - resolution: "@typescript-eslint/utils@npm:8.1.0" +"@typescript-eslint/utils@npm:8.2.0": + version: 8.2.0 + resolution: "@typescript-eslint/utils@npm:8.2.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:8.1.0" - "@typescript-eslint/types": "npm:8.1.0" - "@typescript-eslint/typescript-estree": "npm:8.1.0" + "@typescript-eslint/scope-manager": "npm:8.2.0" + "@typescript-eslint/types": "npm:8.2.0" + "@typescript-eslint/typescript-estree": "npm:8.2.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 - checksum: 10c0/c95503a6bdcd98b1ff04d1adbf46377b2036b1c510d90a4a056401f996f775f06c3108c95fb81cd6babc9c97b73b91b8e848f0337bc508de8a49c993582f0e75 + checksum: 10c0/0f3d5cf804c2863ea9432ef76bfdb1cadbb244cbf8a64ac77c0e559c012a1e98382c4535354e54696c564c0abd9c10dffc78d38972c97035e963798d360d1830 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:8.1.0": - version: 8.1.0 - resolution: "@typescript-eslint/visitor-keys@npm:8.1.0" +"@typescript-eslint/visitor-keys@npm:8.2.0": + version: 8.2.0 + resolution: "@typescript-eslint/visitor-keys@npm:8.2.0" dependencies: - "@typescript-eslint/types": "npm:8.1.0" + "@typescript-eslint/types": "npm:8.2.0" eslint-visitor-keys: "npm:^3.4.3" - checksum: 10c0/b7544dbb0eec1ddbfcd95c04b51b9a739c2e768c16d1c88508f976a2b0d1bc02fefb7491930e06e48073a5c07c6f488cd8403bba3a8b918888b93a88d5ac3869 + checksum: 10c0/788633bd2905c88ea2cf20d9e317a2bc992a70fcf725cb54bbe55a17c42138a6fe877c89fbda41a733e0e8ad6dce893163bada60509a1b856321f4329a316973 languageName: node linkType: hard @@ -3471,16 +3471,16 @@ __metadata: linkType: hard "typescript-eslint@npm:^8.0.1": - version: 8.1.0 - resolution: "typescript-eslint@npm:8.1.0" + version: 8.2.0 + resolution: "typescript-eslint@npm:8.2.0" dependencies: - "@typescript-eslint/eslint-plugin": "npm:8.1.0" - "@typescript-eslint/parser": "npm:8.1.0" - "@typescript-eslint/utils": "npm:8.1.0" + "@typescript-eslint/eslint-plugin": "npm:8.2.0" + "@typescript-eslint/parser": "npm:8.2.0" + "@typescript-eslint/utils": "npm:8.2.0" peerDependenciesMeta: typescript: optional: true - checksum: 10c0/9b5769b95aeca54ae9fa15cd2f0e5656747f643a7be220513555de143ff19d70c5945eb82259a3fb29ab4d37f4d158f7f088e7b2cf98e2e8253a7429ac19d072 + checksum: 10c0/545569026b3da15625ae827844ce6c529c033286807b8adeb1652bef83f1c8ce900253fc5c0813600145ae4f1ba9cc265e4731902bbb9227d1e7331db9d82637 languageName: node linkType: hard From a8f769fb342560fb12614583c73f9c32e527e2ad Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 19:34:39 +0000 Subject: [PATCH 08/17] chore(deps-dev): bump @types/node from 22.2.0 to 22.4.1 (#248) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.2.0 to 22.4.1.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/node&package-manager=npm_and_yarn&previous-version=22.2.0&new-version=22.4.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index cb96a2db..f8f4a090 100644 --- a/yarn.lock +++ b/yarn.lock @@ -310,11 +310,11 @@ __metadata: linkType: hard "@types/node@npm:^22.2.0": - version: 22.2.0 - resolution: "@types/node@npm:22.2.0" + version: 22.4.1 + resolution: "@types/node@npm:22.4.1" dependencies: - undici-types: "npm:~6.13.0" - checksum: 10c0/c17900b34faecfec204f72970bd658d0c217aaf739c1bf7690c969465b6b26b77a8be1cd9ba735aadbd1dd20b5c3e4f406ec33528bf7c6eec90744886c5d5608 + undici-types: "npm:~6.19.2" + checksum: 10c0/e42607438fcbd3a6aebd09084868fa0b22a4b0daf9eda79ed615df7ff8ae95e35ea56e090e1f3140ebae76b640abe42d4a6d5b60c0819eadf499adca737305b6 languageName: node linkType: hard @@ -3540,10 +3540,10 @@ __metadata: languageName: node linkType: hard -"undici-types@npm:~6.13.0": - version: 6.13.0 - resolution: "undici-types@npm:6.13.0" - checksum: 10c0/2de55181f569c77a4f08063f8bf2722fcbb6ea312a26a9e927bd1f5ea5cf3a281c5ddf23155061db083e0a25838f54813543ff13b0ac34d230d5c1205ead66c1 +"undici-types@npm:~6.19.2": + version: 6.19.8 + resolution: "undici-types@npm:6.19.8" + checksum: 10c0/078afa5990fba110f6824823ace86073b4638f1d5112ee26e790155f481f2a868cc3e0615505b6f4282bdf74a3d8caad715fd809e870c2bb0704e3ea6082f344 languageName: node linkType: hard From 9aa6941f253071b2170364e86680a407097061d0 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Wed, 28 Aug 2024 10:11:02 -0400 Subject: [PATCH 09/17] chore: add danielpza to funding.yml --- .github/FUNDING.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index dbc3758b..db2ab5f0 100755 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1 @@ -github: [nonara] +github: [nonara, danielpza] From 5ebf0b4505df9d28b56d1e191e21f54c5fe38d98 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Sep 2024 17:12:10 +0000 Subject: [PATCH 10/17] chore(deps-dev): bump typescript-eslint from 8.2.0 to 8.3.0 (#254) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.2.0 to 8.3.0.
Release notes

Sourced from typescript-eslint's releases.

v8.3.0

8.3.0 (2024-08-26)

🚀 Features

  • eslint-plugin: [no-deprecation] add rule (#9783)
  • typescript-estree: replace globby w/ fast-glob (#9518)
  • typescript-estree: reload project service once when file config isn't found (#9853)

🩹 Fixes

  • ast-spec: use Expression in argument of ThrowStatement (#9632)
  • eslint-plugin: [no-unnecessary-template-expression] add missing parentheses in autofix (#8673)
  • eslint-plugin: [no-unnecessary-type-parameters] check mapped alias type arguments (#9741)
  • utils: add missing TSSatisfiesExpression in RuleListenerBaseSelectors (#9832)
  • utils: add TSDeclareFunction to functionTypeTypes (#9788)

❤️ Thank You

You can read about our versioning strategy and releases on our website.

Changelog

Sourced from typescript-eslint's changelog.

8.3.0 (2024-08-26)

🚀 Features

  • eslint-plugin: [no-deprecation] add rule

❤️ Thank You

  • Abraham Guo
  • Daichi Kamiyama
  • Josh Goldberg ✨
  • Kim Sang Du
  • Sukka
  • Vida Xie

You can read about our versioning strategy and releases on our website.

Commits
  • ef2eab1 chore(release): publish 8.3.0
  • d4f6943 chore: enable eslint-plugin-perfectionist on typescript-eslint package (#9851)
  • 57e4120 feat(eslint-plugin): [no-deprecation] add rule (#9783)
  • See full diff in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=typescript-eslint&package-manager=npm_and_yarn&previous-version=8.2.0&new-version=8.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 162 ++++++++++++++++++++---------------------------------- 1 file changed, 59 insertions(+), 103 deletions(-) diff --git a/yarn.lock b/yarn.lock index f8f4a090..a8a749a3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -397,15 +397,15 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:8.2.0": - version: 8.2.0 - resolution: "@typescript-eslint/eslint-plugin@npm:8.2.0" +"@typescript-eslint/eslint-plugin@npm:8.3.0": + version: 8.3.0 + resolution: "@typescript-eslint/eslint-plugin@npm:8.3.0" dependencies: "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.2.0" - "@typescript-eslint/type-utils": "npm:8.2.0" - "@typescript-eslint/utils": "npm:8.2.0" - "@typescript-eslint/visitor-keys": "npm:8.2.0" + "@typescript-eslint/scope-manager": "npm:8.3.0" + "@typescript-eslint/type-utils": "npm:8.3.0" + "@typescript-eslint/utils": "npm:8.3.0" + "@typescript-eslint/visitor-keys": "npm:8.3.0" graphemer: "npm:^1.4.0" ignore: "npm:^5.3.1" natural-compare: "npm:^1.4.0" @@ -416,68 +416,68 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/17243ee1b34d78723fe3e1a308c64490eee49bd83301e3abe8a6f05bce05434d70f56caf75756b8cffa051154dc89cdf485114ede6781fc087f0aaca37a026ec + checksum: 10c0/d5242b16b8602ab5817cf04b35ac7208b6bee530730eeed6eab886667d1f2c5fac1537b3e33c453393090a1c6fcd50f727c07f5168985a00e7d23d1f99576988 languageName: node linkType: hard -"@typescript-eslint/parser@npm:8.2.0": - version: 8.2.0 - resolution: "@typescript-eslint/parser@npm:8.2.0" +"@typescript-eslint/parser@npm:8.3.0": + version: 8.3.0 + resolution: "@typescript-eslint/parser@npm:8.3.0" dependencies: - "@typescript-eslint/scope-manager": "npm:8.2.0" - "@typescript-eslint/types": "npm:8.2.0" - "@typescript-eslint/typescript-estree": "npm:8.2.0" - "@typescript-eslint/visitor-keys": "npm:8.2.0" + "@typescript-eslint/scope-manager": "npm:8.3.0" + "@typescript-eslint/types": "npm:8.3.0" + "@typescript-eslint/typescript-estree": "npm:8.3.0" + "@typescript-eslint/visitor-keys": "npm:8.3.0" debug: "npm:^4.3.4" peerDependencies: eslint: ^8.57.0 || ^9.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/bb4ebc0a40b5e68c5287de17af3acf3045e2ef7886ebee8d1c4a6fd07bd6d55e9fc12bc7b89d07d15a2a4182cbf6380b50ad148d4a37e93d2e54930aa386a3bf + checksum: 10c0/8185e7f1f570cded8719cfb1e8147fcbbc5b8796de628d68024d2929ce6fb02d1f6101b741161229e877be1c30c720701e1e1f7c4313dba33d4bb1190a85f705 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:8.2.0": - version: 8.2.0 - resolution: "@typescript-eslint/scope-manager@npm:8.2.0" +"@typescript-eslint/scope-manager@npm:8.3.0": + version: 8.3.0 + resolution: "@typescript-eslint/scope-manager@npm:8.3.0" dependencies: - "@typescript-eslint/types": "npm:8.2.0" - "@typescript-eslint/visitor-keys": "npm:8.2.0" - checksum: 10c0/8026e11d9cfbb674c62eb38929d08d42c4a373f3463c2591ed6603c496d3d00321f553edce47f1d7504b55fcbe9664ea2bdcaa3131c8c834bde1b1f07497af5d + "@typescript-eslint/types": "npm:8.3.0" + "@typescript-eslint/visitor-keys": "npm:8.3.0" + checksum: 10c0/24d093505d444a07db88f9ab44af04eb738ce523ac3f98b0a641cf3a3ee38d18aff9f72bbf2b2e2d9f45e57c973f31016f1e224cd8ab773f6e7c3477c5a09ad3 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:8.2.0": - version: 8.2.0 - resolution: "@typescript-eslint/type-utils@npm:8.2.0" +"@typescript-eslint/type-utils@npm:8.3.0": + version: 8.3.0 + resolution: "@typescript-eslint/type-utils@npm:8.3.0" dependencies: - "@typescript-eslint/typescript-estree": "npm:8.2.0" - "@typescript-eslint/utils": "npm:8.2.0" + "@typescript-eslint/typescript-estree": "npm:8.3.0" + "@typescript-eslint/utils": "npm:8.3.0" debug: "npm:^4.3.4" ts-api-utils: "npm:^1.3.0" peerDependenciesMeta: typescript: optional: true - checksum: 10c0/5ff387d39fec3ba47af167ca3e48a200f87e4b97b010170245f495cd3d2e30fd0a5b2a9b27aae2ae929c99f92acabcd07315944dc6f9de963bad1c61ba9ea53c + checksum: 10c0/0e4b42ff2bfcd1727893bb7fe5fcf1aa808b45b5f690c249c68ce7aff68ddfba3d8b1565de2f08972915df23fa7ab114c09f507668e9b0b63faf1e34a5091706 languageName: node linkType: hard -"@typescript-eslint/types@npm:8.2.0": - version: 8.2.0 - resolution: "@typescript-eslint/types@npm:8.2.0" - checksum: 10c0/2ffba0d0183dfdd2f859fb414013d17d009f5e886664823f973aaa1145243fceb52cfe26aa7c50208af7833b3703b7788337f1aab136c9a4eb36d905493847d1 +"@typescript-eslint/types@npm:8.3.0": + version: 8.3.0 + resolution: "@typescript-eslint/types@npm:8.3.0" + checksum: 10c0/5cd733af7ffa0cdaa5842f6c5e275b3a5c9b98dc49bf1bb9df1f0b51d346bef2a10a827d886f60492d502218a272e935cef50b4f7c69100217d5b10a2499c7b1 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:8.2.0": - version: 8.2.0 - resolution: "@typescript-eslint/typescript-estree@npm:8.2.0" +"@typescript-eslint/typescript-estree@npm:8.3.0": + version: 8.3.0 + resolution: "@typescript-eslint/typescript-estree@npm:8.3.0" dependencies: - "@typescript-eslint/types": "npm:8.2.0" - "@typescript-eslint/visitor-keys": "npm:8.2.0" + "@typescript-eslint/types": "npm:8.3.0" + "@typescript-eslint/visitor-keys": "npm:8.3.0" debug: "npm:^4.3.4" - globby: "npm:^11.1.0" + fast-glob: "npm:^3.3.2" is-glob: "npm:^4.0.3" minimatch: "npm:^9.0.4" semver: "npm:^7.6.0" @@ -485,31 +485,31 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/f49aabc78e396908307394812fdebc4015ca407983efc361be106d3e2d58971dec4a1a725362fcfbd637f3d8150baa0735eb5929fd170172b7f2a65e06eeb3d2 + checksum: 10c0/dd73aa1a9d7b5c7e6238e766e6ecdb6d87a9b28a24815258b7bbdc59c49fb525d3fe15d9b7c672e2220678f9d5fabdd9615e4cd5ee97a102fd46023ec0735d50 languageName: node linkType: hard -"@typescript-eslint/utils@npm:8.2.0": - version: 8.2.0 - resolution: "@typescript-eslint/utils@npm:8.2.0" +"@typescript-eslint/utils@npm:8.3.0": + version: 8.3.0 + resolution: "@typescript-eslint/utils@npm:8.3.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:8.2.0" - "@typescript-eslint/types": "npm:8.2.0" - "@typescript-eslint/typescript-estree": "npm:8.2.0" + "@typescript-eslint/scope-manager": "npm:8.3.0" + "@typescript-eslint/types": "npm:8.3.0" + "@typescript-eslint/typescript-estree": "npm:8.3.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 - checksum: 10c0/0f3d5cf804c2863ea9432ef76bfdb1cadbb244cbf8a64ac77c0e559c012a1e98382c4535354e54696c564c0abd9c10dffc78d38972c97035e963798d360d1830 + checksum: 10c0/e4e9e820cf4b4775bb66b2293a2a827897edaba88577b63df317b50752a01d542be521cc4842976fbbd93e08b9e273ce9d20e23768d06de68a83d68cc0f68a93 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:8.2.0": - version: 8.2.0 - resolution: "@typescript-eslint/visitor-keys@npm:8.2.0" +"@typescript-eslint/visitor-keys@npm:8.3.0": + version: 8.3.0 + resolution: "@typescript-eslint/visitor-keys@npm:8.3.0" dependencies: - "@typescript-eslint/types": "npm:8.2.0" + "@typescript-eslint/types": "npm:8.3.0" eslint-visitor-keys: "npm:^3.4.3" - checksum: 10c0/788633bd2905c88ea2cf20d9e317a2bc992a70fcf725cb54bbe55a17c42138a6fe877c89fbda41a733e0e8ad6dce893163bada60509a1b856321f4329a316973 + checksum: 10c0/4c19216636f2cc25026fe20d2832d857f05c262eba78bc4159121c696199e44cac68443565959f9336372f7686a14b452867300cf4deb3c0507b8dbde88ac0e6 languageName: node linkType: hard @@ -641,13 +641,6 @@ __metadata: languageName: node linkType: hard -"array-union@npm:^2.1.0": - version: 2.1.0 - resolution: "array-union@npm:2.1.0" - checksum: 10c0/429897e68110374f39b771ec47a7161fc6a8fc33e196857c0a396dc75df0b5f65e4d046674db764330b6bb66b39ef48dd7c53b6a2ee75cfb0681e0c1a7033962 - languageName: node - linkType: hard - "balanced-match@npm:^1.0.0": version: 1.0.2 resolution: "balanced-match@npm:1.0.2" @@ -1108,15 +1101,6 @@ __metadata: languageName: node linkType: hard -"dir-glob@npm:^3.0.1": - version: 3.0.1 - resolution: "dir-glob@npm:3.0.1" - dependencies: - path-type: "npm:^4.0.0" - checksum: 10c0/dcac00920a4d503e38bb64001acb19df4efc14536ada475725e12f52c16777afdee4db827f55f13a908ee7efc0cb282e2e3dbaeeb98c0993dd93d1802d3bf00c - languageName: node - linkType: hard - "dotenv@npm:^16.4.5": version: 16.4.5 resolution: "dotenv@npm:16.4.5" @@ -1412,7 +1396,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.2.9": +"fast-glob@npm:^3.3.2": version: 3.3.2 resolution: "fast-glob@npm:3.3.2" dependencies: @@ -1648,20 +1632,6 @@ __metadata: languageName: node linkType: hard -"globby@npm:^11.1.0": - version: 11.1.0 - resolution: "globby@npm:11.1.0" - dependencies: - array-union: "npm:^2.1.0" - dir-glob: "npm:^3.0.1" - fast-glob: "npm:^3.2.9" - ignore: "npm:^5.2.0" - merge2: "npm:^1.4.1" - slash: "npm:^3.0.0" - checksum: 10c0/b39511b4afe4bd8a7aead3a27c4ade2b9968649abab0a6c28b1a90141b96ca68ca5db1302f7c7bd29eab66bf51e13916b8e0a3d0ac08f75e1e84a39b35691189 - languageName: node - linkType: hard - "graceful-fs@npm:^4.2.6": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" @@ -2176,7 +2146,7 @@ __metadata: languageName: node linkType: hard -"merge2@npm:^1.3.0, merge2@npm:^1.4.1": +"merge2@npm:^1.3.0": version: 1.4.1 resolution: "merge2@npm:1.4.1" checksum: 10c0/254a8a4605b58f450308fc474c82ac9a094848081bf4c06778200207820e5193726dc563a0d2c16468810516a5c97d9d3ea0ca6585d23c58ccfff2403e8dbbeb @@ -2895,13 +2865,6 @@ __metadata: languageName: node linkType: hard -"path-type@npm:^4.0.0": - version: 4.0.0 - resolution: "path-type@npm:4.0.0" - checksum: 10c0/666f6973f332f27581371efaf303fd6c272cc43c2057b37aa99e3643158c7e4b2626549555d88626e99ea9e046f82f32e41bbde5f1508547e9a11b149b52387c - languageName: node - linkType: hard - "pathe@npm:^1.1.1, pathe@npm:^1.1.2": version: 1.1.2 resolution: "pathe@npm:1.1.2" @@ -3197,13 +3160,6 @@ __metadata: languageName: node linkType: hard -"slash@npm:^3.0.0": - version: 3.0.0 - resolution: "slash@npm:3.0.0" - checksum: 10c0/e18488c6a42bdfd4ac5be85b2ced3ccd0224773baae6ad42cfbb9ec74fc07f9fa8396bd35ee638084ead7a2a0818eb5e7151111544d4731ce843019dab4be47b - languageName: node - linkType: hard - "smart-buffer@npm:^4.2.0": version: 4.2.0 resolution: "smart-buffer@npm:4.2.0" @@ -3471,16 +3427,16 @@ __metadata: linkType: hard "typescript-eslint@npm:^8.0.1": - version: 8.2.0 - resolution: "typescript-eslint@npm:8.2.0" + version: 8.3.0 + resolution: "typescript-eslint@npm:8.3.0" dependencies: - "@typescript-eslint/eslint-plugin": "npm:8.2.0" - "@typescript-eslint/parser": "npm:8.2.0" - "@typescript-eslint/utils": "npm:8.2.0" + "@typescript-eslint/eslint-plugin": "npm:8.3.0" + "@typescript-eslint/parser": "npm:8.3.0" + "@typescript-eslint/utils": "npm:8.3.0" peerDependenciesMeta: typescript: optional: true - checksum: 10c0/545569026b3da15625ae827844ce6c529c033286807b8adeb1652bef83f1c8ce900253fc5c0813600145ae4f1ba9cc265e4731902bbb9227d1e7331db9d82637 + checksum: 10c0/90134b4b601d6fa582a95c9bee23c254f6ac2ca38aed07986d0a3bb75e1ddfdceeb9650c8647b34148696115d5fe0ce281413e4a8ec001e1e928356242a1756d languageName: node linkType: hard From b517b8a008d33eeef3d934b838ecea7aac42cf15 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Sep 2024 17:12:37 +0000 Subject: [PATCH 11/17] chore(deps-dev): bump @types/node from 22.4.1 to 22.5.0 (#253) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.4.1 to 22.5.0.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/node&package-manager=npm_and_yarn&previous-version=22.4.1&new-version=22.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index a8a749a3..cffe9a07 100644 --- a/yarn.lock +++ b/yarn.lock @@ -310,11 +310,11 @@ __metadata: linkType: hard "@types/node@npm:^22.2.0": - version: 22.4.1 - resolution: "@types/node@npm:22.4.1" + version: 22.5.0 + resolution: "@types/node@npm:22.5.0" dependencies: undici-types: "npm:~6.19.2" - checksum: 10c0/e42607438fcbd3a6aebd09084868fa0b22a4b0daf9eda79ed615df7ff8ae95e35ea56e090e1f3140ebae76b640abe42d4a6d5b60c0819eadf499adca737305b6 + checksum: 10c0/45aa75c5e71645fac42dced4eff7f197c3fdfff6e8a9fdacd0eb2e748ff21ee70ffb73982f068a58e8d73b2c088a63613142c125236cdcf3c072ea97eada1559 languageName: node linkType: hard From 164aeacf7155040c087208140c144ff326acdc05 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Sun, 1 Sep 2024 13:32:21 -0400 Subject: [PATCH 12/17] chore(deps-dev): update some dependencies --- package.json | 6 +++--- yarn.lock | 25 ++++++++++++++++--------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 289189d9..349cf3f1 100644 --- a/package.json +++ b/package.json @@ -60,12 +60,12 @@ "Ron S. (https://twitter.com/Ron)" ], "devDependencies": { - "@eslint/js": "^9.8.0", + "@eslint/js": "^9.9.1", "@tsconfig/node18": "^18.2.4", "@tsconfig/strictest": "^2.0.5", "@types/eslint": "^9", "@types/minimatch": "^5.1.2", - "@types/node": "^22.2.0", + "@types/node": "^22.5.2", "@types/ts-expose-internals": "npm:ts-expose-internals@4.9.5", "@types/ts-node": "npm:ts-node@^10.9.2", "@types/typescript-3": "npm:typescript@3.x", @@ -78,7 +78,7 @@ "prettier-plugin-jsdoc": "^1.3.0", "ts-patch": "^3.2.1", "typescript": "^5.5.4", - "typescript-eslint": "^8.0.1" + "typescript-eslint": "^8.3.0" }, "peerDependencies": { "typescript": ">=3.6.5" diff --git a/yarn.lock b/yarn.lock index cffe9a07..737ac16b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -89,13 +89,20 @@ __metadata: languageName: node linkType: hard -"@eslint/js@npm:9.9.0, @eslint/js@npm:^9.8.0": +"@eslint/js@npm:9.9.0": version: 9.9.0 resolution: "@eslint/js@npm:9.9.0" checksum: 10c0/6ec9f1f0d576132444d6a5c66a8a08b0be9444e3ebb563fa6a6bebcf5299df3da7e454dc04c0fa601bb811197f00764b3a04430d8458cdb8e3a4677993d23f30 languageName: node linkType: hard +"@eslint/js@npm:^9.9.1": + version: 9.9.1 + resolution: "@eslint/js@npm:9.9.1" + checksum: 10c0/a3a91de2ce78469f7c4eee78c1eba77360706e1d0fa0ace2e19102079bcf237b851217c85ea501dc92c4c3719d60d9df966977abc8554d4c38e3638c1f53dcb2 + languageName: node + linkType: hard + "@eslint/object-schema@npm:^2.1.4": version: 2.1.4 resolution: "@eslint/object-schema@npm:2.1.4" @@ -309,12 +316,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^22.2.0": - version: 22.5.0 - resolution: "@types/node@npm:22.5.0" +"@types/node@npm:^22.5.2": + version: 22.5.2 + resolution: "@types/node@npm:22.5.2" dependencies: undici-types: "npm:~6.19.2" - checksum: 10c0/45aa75c5e71645fac42dced4eff7f197c3fdfff6e8a9fdacd0eb2e748ff21ee70ffb73982f068a58e8d73b2c088a63613142c125236cdcf3c072ea97eada1559 + checksum: 10c0/624a7fd76229eacc6c158eb3b9afd55b811d7f01976c5f92c630d5b9d47047cc218928c343988484a165ac400e5eb6fe70ea300fc7242deeb0e920c7724290f6 languageName: node linkType: hard @@ -3426,7 +3433,7 @@ __metadata: languageName: node linkType: hard -"typescript-eslint@npm:^8.0.1": +"typescript-eslint@npm:^8.3.0": version: 8.3.0 resolution: "typescript-eslint@npm:8.3.0" dependencies: @@ -3444,12 +3451,12 @@ __metadata: version: 0.0.0-use.local resolution: "typescript-transform-paths@workspace:." dependencies: - "@eslint/js": "npm:^9.8.0" + "@eslint/js": "npm:^9.9.1" "@tsconfig/node18": "npm:^18.2.4" "@tsconfig/strictest": "npm:^2.0.5" "@types/eslint": "npm:^9" "@types/minimatch": "npm:^5.1.2" - "@types/node": "npm:^22.2.0" + "@types/node": "npm:^22.5.2" "@types/ts-expose-internals": "npm:ts-expose-internals@4.9.5" "@types/ts-node": "npm:ts-node@^10.9.2" "@types/typescript-3": "npm:typescript@3.x" @@ -3463,7 +3470,7 @@ __metadata: prettier-plugin-jsdoc: "npm:^1.3.0" ts-patch: "npm:^3.2.1" typescript: "npm:^5.5.4" - typescript-eslint: "npm:^8.0.1" + typescript-eslint: "npm:^8.3.0" peerDependencies: typescript: ">=3.6.5" languageName: unknown From 8c6ccf4cf00868365e0510f4fb0e88a3dcb26be6 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Mon, 2 Sep 2024 13:14:11 -0400 Subject: [PATCH 13/17] chore: remove eslint-plugin-unicorn --- eslint.config.mjs | 15 -- package.json | 1 - yarn.lock | 497 +--------------------------------------------- 3 files changed, 4 insertions(+), 509 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 81067104..c3a61961 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -2,7 +2,6 @@ import globals from "globals"; import pluginJs from "@eslint/js"; import tseslint from "typescript-eslint"; -import eslintPluginUnicorn from "eslint-plugin-unicorn"; export default [ { files: ["**/*.{js,mjs,cjs,ts}"] }, @@ -10,7 +9,6 @@ export default [ { languageOptions: { globals: globals.node } }, pluginJs.configs.recommended, ...tseslint.configs.recommended, - eslintPluginUnicorn.configs["flat/recommended"], { rules: { "@typescript-eslint/no-empty-object-type": ["error", { allowInterfaces: "with-single-extends" }], @@ -30,19 +28,6 @@ export default [ rules: { // fix these warnings "@typescript-eslint/no-explicit-any": "warn", - "unicorn/consistent-function-scoping": "warn", - "unicorn/explicit-length-check": "warn", - "unicorn/import-style": "warn", - "unicorn/no-array-reduce": "warn", - "unicorn/no-nested-ternary": "warn", - "unicorn/prefer-regexp-test": "warn", - "unicorn/prefer-string-slice": "warn", - // disable strict rules/not applicable - "unicorn/empty-brace-spaces": "off", // conflict with prettier - "unicorn/no-array-callback-reference": "off", - "unicorn/prefer-module": "off", - "unicorn/prefer-ternary": "off", - "unicorn/prevent-abbreviations": "off", }, }, ]; diff --git a/package.json b/package.json index 349cf3f1..e0281d14 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,6 @@ "@types/typescript-4.7": "npm:typescript@4.7.x", "changelogen": "^0.5.5", "eslint": "9.x", - "eslint-plugin-unicorn": "^55.0.0", "globals": "^15.9.0", "prettier": "^3.3.3", "prettier-plugin-jsdoc": "^1.3.0", diff --git a/yarn.lock b/yarn.lock index 737ac16b..5906e919 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,35 +5,6 @@ __metadata: version: 8 cacheKey: 10c0 -"@babel/code-frame@npm:^7.0.0": - version: 7.24.7 - resolution: "@babel/code-frame@npm:7.24.7" - dependencies: - "@babel/highlight": "npm:^7.24.7" - picocolors: "npm:^1.0.0" - checksum: 10c0/ab0af539473a9f5aeaac7047e377cb4f4edd255a81d84a76058595f8540784cc3fbe8acf73f1e073981104562490aabfb23008cd66dc677a456a4ed5390fdde6 - languageName: node - linkType: hard - -"@babel/helper-validator-identifier@npm:^7.24.5, @babel/helper-validator-identifier@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-validator-identifier@npm:7.24.7" - checksum: 10c0/87ad608694c9477814093ed5b5c080c2e06d44cb1924ae8320474a74415241223cc2a725eea2640dd783ff1e3390e5f95eede978bc540e870053152e58f1d651 - languageName: node - linkType: hard - -"@babel/highlight@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/highlight@npm:7.24.7" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.24.7" - chalk: "npm:^2.4.2" - js-tokens: "npm:^4.0.0" - picocolors: "npm:^1.0.0" - checksum: 10c0/674334c571d2bb9d1c89bdd87566383f59231e16bcdcf5bb7835babdf03c9ae585ca0887a7b25bdf78f303984af028df52831c7989fecebb5101cc132da9393a - languageName: node - linkType: hard - "@cspotcode/source-map-support@npm:^0.8.0": version: 0.8.1 resolution: "@cspotcode/source-map-support@npm:0.8.1" @@ -325,13 +296,6 @@ __metadata: languageName: node linkType: hard -"@types/normalize-package-data@npm:^2.4.0": - version: 2.4.4 - resolution: "@types/normalize-package-data@npm:2.4.4" - checksum: 10c0/aef7bb9b015883d6f4119c423dd28c4bdc17b0e8a0ccf112c78b4fe0e91fbc4af7c6204b04bba0e199a57d2f3fbbd5b4a14bf8739bf9d2a39b2a0aad545e0f86 - languageName: node - linkType: hard - "@types/ts-expose-internals@npm:ts-expose-internals@4.9.5": version: 4.9.5 resolution: "ts-expose-internals@npm:4.9.5" @@ -599,15 +563,6 @@ __metadata: languageName: node linkType: hard -"ansi-styles@npm:^3.2.1": - version: 3.2.1 - resolution: "ansi-styles@npm:3.2.1" - dependencies: - color-convert: "npm:^1.9.0" - checksum: 10c0/ece5a8ef069fcc5298f67e3f4771a663129abd174ea2dfa87923a2be2abf6cd367ef72ac87942da00ce85bd1d651d4cd8595aebdb1b385889b89b205860e977b - languageName: node - linkType: hard - "ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": version: 4.3.0 resolution: "ansi-styles@npm:4.3.0" @@ -713,27 +668,6 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.23.3": - version: 4.23.3 - resolution: "browserslist@npm:4.23.3" - dependencies: - caniuse-lite: "npm:^1.0.30001646" - electron-to-chromium: "npm:^1.5.4" - node-releases: "npm:^2.0.18" - update-browserslist-db: "npm:^1.1.0" - bin: - browserslist: cli.js - checksum: 10c0/3063bfdf812815346447f4796c8f04601bf5d62003374305fd323c2a463e42776475bcc5309264e39bcf9a8605851e53560695991a623be988138b3ff8c66642 - languageName: node - linkType: hard - -"builtin-modules@npm:^3.3.0": - version: 3.3.0 - resolution: "builtin-modules@npm:3.3.0" - checksum: 10c0/2cb3448b4f7306dc853632a4fcddc95e8d4e4b9868c139400027b71938fc6806d4ff44007deffb362ac85724bd40c2c6452fb6a0aa4531650eeddb98d8e5ee8a - languageName: node - linkType: hard - "bundle-name@npm:^3.0.0": version: 3.0.0 resolution: "bundle-name@npm:3.0.0" @@ -795,24 +729,6 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.30001646": - version: 1.0.30001651 - resolution: "caniuse-lite@npm:1.0.30001651" - checksum: 10c0/7821278952a6dbd17358e5d08083d258f092e2a530f5bc1840657cb140fbbc5ec44293bc888258c44a18a9570cde149ed05819ac8320b9710cf22f699891e6ad - languageName: node - linkType: hard - -"chalk@npm:^2.4.2": - version: 2.4.2 - resolution: "chalk@npm:2.4.2" - dependencies: - ansi-styles: "npm:^3.2.1" - escape-string-regexp: "npm:^1.0.5" - supports-color: "npm:^5.3.0" - checksum: 10c0/e6543f02ec877732e3a2d1c3c3323ddb4d39fbab687c23f526e25bd4c6a9bf3b83a696e8c769d078e04e5754921648f7821b2a2acfd16c550435fd630026e073 - languageName: node - linkType: hard - "chalk@npm:^4.0.0, chalk@npm:^4.1.2": version: 4.1.2 resolution: "chalk@npm:4.1.2" @@ -881,13 +797,6 @@ __metadata: languageName: node linkType: hard -"ci-info@npm:^4.0.0": - version: 4.0.0 - resolution: "ci-info@npm:4.0.0" - checksum: 10c0/ecc003e5b60580bd081d83dd61d398ddb8607537f916313e40af4667f9c92a1243bd8e8a591a5aa78e418afec245dbe8e90a0e26e39ca0825129a99b978dd3f9 - languageName: node - linkType: hard - "citty@npm:^0.1.6": version: 0.1.6 resolution: "citty@npm:0.1.6" @@ -897,15 +806,6 @@ __metadata: languageName: node linkType: hard -"clean-regexp@npm:^1.0.0": - version: 1.0.0 - resolution: "clean-regexp@npm:1.0.0" - dependencies: - escape-string-regexp: "npm:^1.0.5" - checksum: 10c0/fd9c7446551b8fc536f95e8a286d431017cd4ba1ec2e53997ec9159385e9c317672f6dfc4d49fdb97449fdb53b0bacd0a8bab9343b8fdd2e46c7ddf6173d0db7 - languageName: node - linkType: hard - "clean-stack@npm:^2.0.0": version: 2.2.0 resolution: "clean-stack@npm:2.2.0" @@ -913,15 +813,6 @@ __metadata: languageName: node linkType: hard -"color-convert@npm:^1.9.0": - version: 1.9.3 - resolution: "color-convert@npm:1.9.3" - dependencies: - color-name: "npm:1.1.3" - checksum: 10c0/5ad3c534949a8c68fca8fbc6f09068f435f0ad290ab8b2f76841b9e6af7e0bb57b98cb05b0e19fe33f5d91e5a8611ad457e5f69e0a484caad1f7487fd0e8253c - languageName: node - linkType: hard - "color-convert@npm:^2.0.1": version: 2.0.1 resolution: "color-convert@npm:2.0.1" @@ -931,13 +822,6 @@ __metadata: languageName: node linkType: hard -"color-name@npm:1.1.3": - version: 1.1.3 - resolution: "color-name@npm:1.1.3" - checksum: 10c0/566a3d42cca25b9b3cd5528cd7754b8e89c0eb646b7f214e8e2eaddb69994ac5f0557d9c175eb5d8f0ad73531140d9c47525085ee752a91a2ab15ab459caf6d6 - languageName: node - linkType: hard - "color-name@npm:~1.1.4": version: 1.1.4 resolution: "color-name@npm:1.1.4" @@ -987,15 +871,6 @@ __metadata: languageName: node linkType: hard -"core-js-compat@npm:^3.37.0": - version: 3.38.0 - resolution: "core-js-compat@npm:3.38.0" - dependencies: - browserslist: "npm:^4.23.3" - checksum: 10c0/9d653a448b8a491034358d2f052e63dda86f75fb65646e2d313a938212470ba1c2f5a83bf31cc583d6c87a9e8d7b0d49458447cab2ff36c4caa097ae381de336 - languageName: node - linkType: hard - "create-require@npm:^1.1.0": version: 1.1.1 resolution: "create-require@npm:1.1.1" @@ -1122,13 +997,6 @@ __metadata: languageName: node linkType: hard -"electron-to-chromium@npm:^1.5.4": - version: 1.5.11 - resolution: "electron-to-chromium@npm:1.5.11" - checksum: 10c0/87b4c0c959009d3fa1120c73eb277c3fced527e4348c798384daf044b15cfb30bbaa5004e772ef016c5b2a70ee06bb8f756fb85fe3986d66c12d9f702c1fc5bc - languageName: node - linkType: hard - "emoji-regex@npm:^8.0.0": version: 8.0.0 resolution: "emoji-regex@npm:8.0.0" @@ -1166,29 +1034,6 @@ __metadata: languageName: node linkType: hard -"error-ex@npm:^1.3.1": - version: 1.3.2 - resolution: "error-ex@npm:1.3.2" - dependencies: - is-arrayish: "npm:^0.2.1" - checksum: 10c0/ba827f89369b4c93382cfca5a264d059dfefdaa56ecc5e338ffa58a6471f5ed93b71a20add1d52290a4873d92381174382658c885ac1a2305f7baca363ce9cce - languageName: node - linkType: hard - -"escalade@npm:^3.1.2": - version: 3.1.2 - resolution: "escalade@npm:3.1.2" - checksum: 10c0/6b4adafecd0682f3aa1cd1106b8fff30e492c7015b178bc81b2d2f75106dabea6c6d6e8508fc491bd58e597c74abb0e8e2368f943ecb9393d4162e3c2f3cf287 - languageName: node - linkType: hard - -"escape-string-regexp@npm:^1.0.5": - version: 1.0.5 - resolution: "escape-string-regexp@npm:1.0.5" - checksum: 10c0/a968ad453dd0c2724e14a4f20e177aaf32bb384ab41b674a8454afe9a41c5e6fe8903323e0a1052f56289d04bd600f81278edf140b0fcc02f5cac98d0f5b5371 - languageName: node - linkType: hard - "escape-string-regexp@npm:^4.0.0": version: 4.0.0 resolution: "escape-string-regexp@npm:4.0.0" @@ -1196,32 +1041,6 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-unicorn@npm:^55.0.0": - version: 55.0.0 - resolution: "eslint-plugin-unicorn@npm:55.0.0" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.24.5" - "@eslint-community/eslint-utils": "npm:^4.4.0" - ci-info: "npm:^4.0.0" - clean-regexp: "npm:^1.0.0" - core-js-compat: "npm:^3.37.0" - esquery: "npm:^1.5.0" - globals: "npm:^15.7.0" - indent-string: "npm:^4.0.0" - is-builtin-module: "npm:^3.2.1" - jsesc: "npm:^3.0.2" - pluralize: "npm:^8.0.0" - read-pkg-up: "npm:^7.0.1" - regexp-tree: "npm:^0.1.27" - regjsparser: "npm:^0.10.0" - semver: "npm:^7.6.1" - strip-indent: "npm:^3.0.0" - peerDependencies: - eslint: ">=8.56.0" - checksum: 10c0/31620da5c823abc791a3f4c9a0ab19baf21820bd38f018eafbc862ea0bbc3e4baedbdaaaf48f2dc1b2a59dfc7b341e654f2126c394f5d62fb5216e632d8a2c03 - languageName: node - linkType: hard - "eslint-scope@npm:^8.0.2": version: 8.0.2 resolution: "eslint-scope@npm:8.0.2" @@ -1457,16 +1276,6 @@ __metadata: languageName: node linkType: hard -"find-up@npm:^4.1.0": - version: 4.1.0 - resolution: "find-up@npm:4.1.0" - dependencies: - locate-path: "npm:^5.0.0" - path-exists: "npm:^4.0.0" - checksum: 10c0/0406ee89ebeefa2d507feb07ec366bebd8a6167ae74aa4e34fb4c4abd06cf782a3ce26ae4194d70706f72182841733f00551c209fe575cb00bd92104056e78c1 - languageName: node - linkType: hard - "find-up@npm:^5.0.0": version: 5.0.0 resolution: "find-up@npm:5.0.0" @@ -1632,7 +1441,7 @@ __metadata: languageName: node linkType: hard -"globals@npm:^15.7.0, globals@npm:^15.9.0": +"globals@npm:^15.9.0": version: 15.9.0 resolution: "globals@npm:15.9.0" checksum: 10c0/de4b553e412e7e830998578d51b605c492256fb2a9273eaeec6ec9ee519f1c5aa50de57e3979911607fd7593a4066420e01d8c3d551e7a6a236e96c521aee36c @@ -1653,13 +1462,6 @@ __metadata: languageName: node linkType: hard -"has-flag@npm:^3.0.0": - version: 3.0.0 - resolution: "has-flag@npm:3.0.0" - checksum: 10c0/1c6c83b14b8b1b3c25b0727b8ba3e3b647f99e9e6e13eb7322107261de07a4c1be56fc0d45678fc376e09772a3a1642ccdaf8fc69bdf123b6c086598397ce473 - languageName: node - linkType: hard - "has-flag@npm:^4.0.0": version: 4.0.0 resolution: "has-flag@npm:4.0.0" @@ -1676,13 +1478,6 @@ __metadata: languageName: node linkType: hard -"hosted-git-info@npm:^2.1.4": - version: 2.8.9 - resolution: "hosted-git-info@npm:2.8.9" - checksum: 10c0/317cbc6b1bbbe23c2a40ae23f3dafe9fa349ce42a89a36f930e3f9c0530c179a3882d2ef1e4141a4c3674d6faaea862138ec55b43ad6f75e387fda2483a13c70 - languageName: node - linkType: hard - "http-cache-semantics@npm:^4.1.1": version: 4.1.1 resolution: "http-cache-semantics@npm:4.1.1" @@ -1788,13 +1583,6 @@ __metadata: languageName: node linkType: hard -"is-arrayish@npm:^0.2.1": - version: 0.2.1 - resolution: "is-arrayish@npm:0.2.1" - checksum: 10c0/e7fb686a739068bb70f860b39b67afc62acc62e36bb61c5f965768abce1873b379c563e61dd2adad96ebb7edf6651111b385e490cf508378959b0ed4cac4e729 - languageName: node - linkType: hard - "is-binary-path@npm:~2.1.0": version: 2.1.0 resolution: "is-binary-path@npm:2.1.0" @@ -1804,15 +1592,6 @@ __metadata: languageName: node linkType: hard -"is-builtin-module@npm:^3.2.1": - version: 3.2.1 - resolution: "is-builtin-module@npm:3.2.1" - dependencies: - builtin-modules: "npm:^3.3.0" - checksum: 10c0/5a66937a03f3b18803381518f0ef679752ac18cdb7dd53b5e23ee8df8d440558737bd8dcc04d2aae555909d2ecb4a81b5c0d334d119402584b61e6a003e31af1 - languageName: node - linkType: hard - "is-core-module@npm:^2.13.0": version: 2.15.0 resolution: "is-core-module@npm:2.15.0" @@ -1954,13 +1733,6 @@ __metadata: languageName: node linkType: hard -"js-tokens@npm:^4.0.0": - version: 4.0.0 - resolution: "js-tokens@npm:4.0.0" - checksum: 10c0/e248708d377aa058eacf2037b07ded847790e6de892bbad3dac0abba2e759cb9f121b00099a65195616badcb6eca8d14d975cb3e89eb1cfda644756402c8aeed - languageName: node - linkType: hard - "js-yaml@npm:^4.1.0": version: 4.1.0 resolution: "js-yaml@npm:4.1.0" @@ -1979,24 +1751,6 @@ __metadata: languageName: node linkType: hard -"jsesc@npm:^3.0.2": - version: 3.0.2 - resolution: "jsesc@npm:3.0.2" - bin: - jsesc: bin/jsesc - checksum: 10c0/ef22148f9e793180b14d8a145ee6f9f60f301abf443288117b4b6c53d0ecd58354898dc506ccbb553a5f7827965cd38bc5fb726575aae93c5e8915e2de8290e1 - languageName: node - linkType: hard - -"jsesc@npm:~0.5.0": - version: 0.5.0 - resolution: "jsesc@npm:0.5.0" - bin: - jsesc: bin/jsesc - checksum: 10c0/f93792440ae1d80f091b65f8ceddf8e55c4bb7f1a09dee5dcbdb0db5612c55c0f6045625aa6b7e8edb2e0a4feabd80ee48616dbe2d37055573a84db3d24f96d9 - languageName: node - linkType: hard - "json-buffer@npm:3.0.1": version: 3.0.1 resolution: "json-buffer@npm:3.0.1" @@ -2004,13 +1758,6 @@ __metadata: languageName: node linkType: hard -"json-parse-even-better-errors@npm:^2.3.0": - version: 2.3.1 - resolution: "json-parse-even-better-errors@npm:2.3.1" - checksum: 10c0/140932564c8f0b88455432e0f33c4cb4086b8868e37524e07e723f4eaedb9425bdc2bafd71bd1d9765bd15fd1e2d126972bc83990f55c467168c228c24d665f3 - languageName: node - linkType: hard - "json-schema-traverse@npm:^0.4.1": version: 0.4.1 resolution: "json-schema-traverse@npm:0.4.1" @@ -2051,22 +1798,6 @@ __metadata: languageName: node linkType: hard -"lines-and-columns@npm:^1.1.6": - version: 1.2.4 - resolution: "lines-and-columns@npm:1.2.4" - checksum: 10c0/3da6ee62d4cd9f03f5dc90b4df2540fb85b352081bee77fe4bbcd12c9000ead7f35e0a38b8d09a9bb99b13223446dd8689ff3c4959807620726d788701a83d2d - languageName: node - linkType: hard - -"locate-path@npm:^5.0.0": - version: 5.0.0 - resolution: "locate-path@npm:5.0.0" - dependencies: - p-locate: "npm:^4.1.0" - checksum: 10c0/33a1c5247e87e022f9713e6213a744557a3e9ec32c5d0b5efb10aa3a38177615bf90221a5592674857039c1a0fd2063b82f285702d37b792d973e9e72ace6c59 - languageName: node - linkType: hard - "locate-path@npm:^6.0.0": version: 6.0.0 resolution: "locate-path@npm:6.0.0" @@ -2420,13 +2151,6 @@ __metadata: languageName: node linkType: hard -"min-indent@npm:^1.0.0": - version: 1.0.1 - resolution: "min-indent@npm:1.0.1" - checksum: 10c0/7e207bd5c20401b292de291f02913230cb1163abca162044f7db1d951fa245b174dc00869d40dd9a9f32a885ad6a5f3e767ee104cf278f399cb4e92d3f582d5c - languageName: node - linkType: hard - "minimatch@npm:^10.0.1": version: 10.0.1 resolution: "minimatch@npm:10.0.1" @@ -2621,13 +2345,6 @@ __metadata: languageName: node linkType: hard -"node-releases@npm:^2.0.18": - version: 2.0.18 - resolution: "node-releases@npm:2.0.18" - checksum: 10c0/786ac9db9d7226339e1dc84bbb42007cb054a346bd9257e6aa154d294f01bc6a6cddb1348fa099f079be6580acbb470e3c048effd5f719325abd0179e566fd27 - languageName: node - linkType: hard - "nopt@npm:^7.0.0": version: 7.2.1 resolution: "nopt@npm:7.2.1" @@ -2639,18 +2356,6 @@ __metadata: languageName: node linkType: hard -"normalize-package-data@npm:^2.5.0": - version: 2.5.0 - resolution: "normalize-package-data@npm:2.5.0" - dependencies: - hosted-git-info: "npm:^2.1.4" - resolve: "npm:^1.10.0" - semver: "npm:2 || 3 || 4 || 5" - validate-npm-package-license: "npm:^3.0.1" - checksum: 10c0/357cb1646deb42f8eb4c7d42c4edf0eec312f3628c2ef98501963cc4bbe7277021b2b1d977f982b2edce78f5a1014613ce9cf38085c3df2d76730481357ca504 - languageName: node - linkType: hard - "normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": version: 3.0.0 resolution: "normalize-path@npm:3.0.0" @@ -2754,15 +2459,6 @@ __metadata: languageName: node linkType: hard -"p-limit@npm:^2.2.0": - version: 2.3.0 - resolution: "p-limit@npm:2.3.0" - dependencies: - p-try: "npm:^2.0.0" - checksum: 10c0/8da01ac53efe6a627080fafc127c873da40c18d87b3f5d5492d465bb85ec7207e153948df6b9cbaeb130be70152f874229b8242ee2be84c0794082510af97f12 - languageName: node - linkType: hard - "p-limit@npm:^3.0.2": version: 3.1.0 resolution: "p-limit@npm:3.1.0" @@ -2772,15 +2468,6 @@ __metadata: languageName: node linkType: hard -"p-locate@npm:^4.1.0": - version: 4.1.0 - resolution: "p-locate@npm:4.1.0" - dependencies: - p-limit: "npm:^2.2.0" - checksum: 10c0/1b476ad69ad7f6059744f343b26d51ce091508935c1dbb80c4e0a2f397ffce0ca3a1f9f5cd3c7ce19d7929a09719d5c65fe70d8ee289c3f267cd36f2881813e9 - languageName: node - linkType: hard - "p-locate@npm:^5.0.0": version: 5.0.0 resolution: "p-locate@npm:5.0.0" @@ -2799,13 +2486,6 @@ __metadata: languageName: node linkType: hard -"p-try@npm:^2.0.0": - version: 2.2.0 - resolution: "p-try@npm:2.2.0" - checksum: 10c0/c36c19907734c904b16994e6535b02c36c2224d433e01a2f1ab777237f4d86e6289fd5fd464850491e940379d4606ed850c03e0f9ab600b0ebddb511312e177f - languageName: node - linkType: hard - "package-json-from-dist@npm:^1.0.0": version: 1.0.0 resolution: "package-json-from-dist@npm:1.0.0" @@ -2822,18 +2502,6 @@ __metadata: languageName: node linkType: hard -"parse-json@npm:^5.0.0": - version: 5.2.0 - resolution: "parse-json@npm:5.2.0" - dependencies: - "@babel/code-frame": "npm:^7.0.0" - error-ex: "npm:^1.3.1" - json-parse-even-better-errors: "npm:^2.3.0" - lines-and-columns: "npm:^1.1.6" - checksum: 10c0/77947f2253005be7a12d858aedbafa09c9ae39eb4863adf330f7b416ca4f4a08132e453e08de2db46459256fb66afaac5ee758b44fe6541b7cdaf9d252e59585 - languageName: node - linkType: hard - "path-exists@npm:^4.0.0": version: 4.0.0 resolution: "path-exists@npm:4.0.0" @@ -2886,13 +2554,6 @@ __metadata: languageName: node linkType: hard -"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1": - version: 1.0.1 - resolution: "picocolors@npm:1.0.1" - checksum: 10c0/c63cdad2bf812ef0d66c8db29583802355d4ca67b9285d846f390cc15c2f6ccb94e8cb7eb6a6e97fc5990a6d3ad4ae42d86c84d3146e667c739a4234ed50d400 - languageName: node - linkType: hard - "picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" @@ -2911,13 +2572,6 @@ __metadata: languageName: node linkType: hard -"pluralize@npm:^8.0.0": - version: 8.0.0 - resolution: "pluralize@npm:8.0.0" - checksum: 10c0/2044cfc34b2e8c88b73379ea4a36fc577db04f651c2909041b054c981cd863dd5373ebd030123ab058d194ae615d3a97cfdac653991e499d10caf592e8b3dc33 - languageName: node - linkType: hard - "prelude-ls@npm:^1.2.1": version: 1.2.1 resolution: "prelude-ls@npm:1.2.1" @@ -2988,29 +2642,6 @@ __metadata: languageName: node linkType: hard -"read-pkg-up@npm:^7.0.1": - version: 7.0.1 - resolution: "read-pkg-up@npm:7.0.1" - dependencies: - find-up: "npm:^4.1.0" - read-pkg: "npm:^5.2.0" - type-fest: "npm:^0.8.1" - checksum: 10c0/82b3ac9fd7c6ca1bdc1d7253eb1091a98ff3d195ee0a45386582ce3e69f90266163c34121e6a0a02f1630073a6c0585f7880b3865efcae9c452fa667f02ca385 - languageName: node - linkType: hard - -"read-pkg@npm:^5.2.0": - version: 5.2.0 - resolution: "read-pkg@npm:5.2.0" - dependencies: - "@types/normalize-package-data": "npm:^2.4.0" - normalize-package-data: "npm:^2.5.0" - parse-json: "npm:^5.0.0" - type-fest: "npm:^0.6.0" - checksum: 10c0/b51a17d4b51418e777029e3a7694c9bd6c578a5ab99db544764a0b0f2c7c0f58f8a6bc101f86a6fceb8ba6d237d67c89acf6170f6b98695d0420ddc86cf109fb - languageName: node - linkType: hard - "readdirp@npm:~3.6.0": version: 3.6.0 resolution: "readdirp@npm:3.6.0" @@ -3020,26 +2651,6 @@ __metadata: languageName: node linkType: hard -"regexp-tree@npm:^0.1.27": - version: 0.1.27 - resolution: "regexp-tree@npm:0.1.27" - bin: - regexp-tree: bin/regexp-tree - checksum: 10c0/f636f44b4a0d93d7d6926585ecd81f63e4ce2ac895bc417b2ead0874cd36b337dcc3d0fedc63f69bf5aaeaa4340f36ca7e750c9687cceaf8087374e5284e843c - languageName: node - linkType: hard - -"regjsparser@npm:^0.10.0": - version: 0.10.0 - resolution: "regjsparser@npm:0.10.0" - dependencies: - jsesc: "npm:~0.5.0" - bin: - regjsparser: bin/parser - checksum: 10c0/0f0508c142eddbceae55dab9715e714305c19e1e130db53168e8fa5f9f7ff9a4901f674cf6f71e04a0973b2f883882ba05808c80778b2d52b053d925050010f4 - languageName: node - linkType: hard - "resolve-from@npm:^4.0.0": version: 4.0.0 resolution: "resolve-from@npm:4.0.0" @@ -3047,7 +2658,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.10.0, resolve@npm:^1.22.2": +"resolve@npm:^1.22.2": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -3060,7 +2671,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.2#optional!builtin": +"resolve@patch:resolve@npm%3A^1.22.2#optional!builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" dependencies: @@ -3119,16 +2730,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:2 || 3 || 4 || 5": - version: 5.7.2 - resolution: "semver@npm:5.7.2" - bin: - semver: bin/semver - checksum: 10c0/e4cf10f86f168db772ae95d86ba65b3fd6c5967c94d97c708ccb463b778c2ee53b914cd7167620950fc07faf5a564e6efe903836639e512a1aa15fbc9667fa25 - languageName: node - linkType: hard - -"semver@npm:^7.3.5, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.1": +"semver@npm:^7.3.5, semver@npm:^7.5.4, semver@npm:^7.6.0": version: 7.6.3 resolution: "semver@npm:7.6.3" bin: @@ -3195,40 +2797,6 @@ __metadata: languageName: node linkType: hard -"spdx-correct@npm:^3.0.0": - version: 3.2.0 - resolution: "spdx-correct@npm:3.2.0" - dependencies: - spdx-expression-parse: "npm:^3.0.0" - spdx-license-ids: "npm:^3.0.0" - checksum: 10c0/49208f008618b9119208b0dadc9208a3a55053f4fd6a0ae8116861bd22696fc50f4142a35ebfdb389e05ccf2de8ad142573fefc9e26f670522d899f7b2fe7386 - languageName: node - linkType: hard - -"spdx-exceptions@npm:^2.1.0": - version: 2.5.0 - resolution: "spdx-exceptions@npm:2.5.0" - checksum: 10c0/37217b7762ee0ea0d8b7d0c29fd48b7e4dfb94096b109d6255b589c561f57da93bf4e328c0290046115961b9209a8051ad9f525e48d433082fc79f496a4ea940 - languageName: node - linkType: hard - -"spdx-expression-parse@npm:^3.0.0": - version: 3.0.1 - resolution: "spdx-expression-parse@npm:3.0.1" - dependencies: - spdx-exceptions: "npm:^2.1.0" - spdx-license-ids: "npm:^3.0.0" - checksum: 10c0/6f8a41c87759fa184a58713b86c6a8b028250f158159f1d03ed9d1b6ee4d9eefdc74181c8ddc581a341aa971c3e7b79e30b59c23b05d2436d5de1c30bdef7171 - languageName: node - linkType: hard - -"spdx-license-ids@npm:^3.0.0": - version: 3.0.18 - resolution: "spdx-license-ids@npm:3.0.18" - checksum: 10c0/c64ba03d4727191c8fdbd001f137d6ab51386c350d5516be8a4576c2e74044cb27bc8a758f6a04809da986cc0b14213f069b04de72caccecbc9f733753ccde32 - languageName: node - linkType: hard - "sprintf-js@npm:^1.1.3": version: 1.1.3 resolution: "sprintf-js@npm:1.1.3" @@ -3306,15 +2874,6 @@ __metadata: languageName: node linkType: hard -"strip-indent@npm:^3.0.0": - version: 3.0.0 - resolution: "strip-indent@npm:3.0.0" - dependencies: - min-indent: "npm:^1.0.0" - checksum: 10c0/ae0deaf41c8d1001c5d4fbe16cb553865c1863da4fae036683b474fa926af9fc121e155cb3fc57a68262b2ae7d5b8420aa752c97a6428c315d00efe2a3875679 - languageName: node - linkType: hard - "strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" @@ -3322,15 +2881,6 @@ __metadata: languageName: node linkType: hard -"supports-color@npm:^5.3.0": - version: 5.5.0 - resolution: "supports-color@npm:5.5.0" - dependencies: - has-flag: "npm:^3.0.0" - checksum: 10c0/6ae5ff319bfbb021f8a86da8ea1f8db52fac8bd4d499492e30ec17095b58af11f0c55f8577390a749b1c4dde691b6a0315dab78f5f54c9b3d83f8fb5905c1c05 - languageName: node - linkType: hard - "supports-color@npm:^7.1.0": version: 7.2.0 resolution: "supports-color@npm:7.2.0" @@ -3419,20 +2969,6 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^0.6.0": - version: 0.6.0 - resolution: "type-fest@npm:0.6.0" - checksum: 10c0/0c585c26416fce9ecb5691873a1301b5aff54673c7999b6f925691ed01f5b9232db408cdbb0bd003d19f5ae284322523f44092d1f81ca0a48f11f7cf0be8cd38 - languageName: node - linkType: hard - -"type-fest@npm:^0.8.1": - version: 0.8.1 - resolution: "type-fest@npm:0.8.1" - checksum: 10c0/dffbb99329da2aa840f506d376c863bd55f5636f4741ad6e65e82f5ce47e6914108f44f340a0b74009b0cb5d09d6752ae83203e53e98b1192cf80ecee5651636 - languageName: node - linkType: hard - "typescript-eslint@npm:^8.3.0": version: 8.3.0 resolution: "typescript-eslint@npm:8.3.0" @@ -3463,7 +2999,6 @@ __metadata: "@types/typescript-4.7": "npm:typescript@4.7.x" changelogen: "npm:^0.5.5" eslint: "npm:9.x" - eslint-plugin-unicorn: "npm:^55.0.0" globals: "npm:^15.9.0" minimatch: "npm:^10.0.1" prettier: "npm:^3.3.3" @@ -3544,20 +3079,6 @@ __metadata: languageName: node linkType: hard -"update-browserslist-db@npm:^1.1.0": - version: 1.1.0 - resolution: "update-browserslist-db@npm:1.1.0" - dependencies: - escalade: "npm:^3.1.2" - picocolors: "npm:^1.0.1" - peerDependencies: - browserslist: ">= 4.21.0" - bin: - update-browserslist-db: cli.js - checksum: 10c0/a7452de47785842736fb71547651c5bbe5b4dc1e3722ccf48a704b7b34e4dcf633991eaa8e4a6a517ffb738b3252eede3773bef673ef9021baa26b056d63a5b9 - languageName: node - linkType: hard - "uri-js@npm:^4.2.2": version: 4.4.1 resolution: "uri-js@npm:4.4.1" @@ -3574,16 +3095,6 @@ __metadata: languageName: node linkType: hard -"validate-npm-package-license@npm:^3.0.1": - version: 3.0.4 - resolution: "validate-npm-package-license@npm:3.0.4" - dependencies: - spdx-correct: "npm:^3.0.0" - spdx-expression-parse: "npm:^3.0.0" - checksum: 10c0/7b91e455a8de9a0beaa9fe961e536b677da7f48c9a493edf4d4d4a87fd80a7a10267d438723364e432c2fcd00b5650b5378275cded362383ef570276e6312f4f - languageName: node - linkType: hard - "which@npm:^1.3.1": version: 1.3.1 resolution: "which@npm:1.3.1" From 07e5c27d535fd078b383e8becd162d5de3245c7d Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Mon, 2 Sep 2024 13:27:47 -0400 Subject: [PATCH 14/17] refactor: remove anys --- eslint.config.mjs | 6 ---- src/harmony/harmony-factory.ts | 3 +- src/harmony/utils.ts | 8 ++--- src/harmony/versions/four-seven.ts | 6 ++-- src/harmony/versions/three-eight.ts | 9 +++-- src/utils/elide-import-export.ts | 6 ++-- src/utils/ts-helpers.ts | 7 ++-- test/tests/nx.test.ts | 11 +++--- test/tests/register.test.ts | 22 ++++++++---- test/tests/transformer/general.test.ts | 6 ++-- test/tests/transformer/specific.test.ts | 13 +++++-- test/utils/helpers.ts | 48 ++++++++++++++++--------- 12 files changed, 91 insertions(+), 54 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index c3a61961..b0b69497 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -24,10 +24,4 @@ export default [ "@typescript-eslint/no-require-imports": "off", }, }, - { - rules: { - // fix these warnings - "@typescript-eslint/no-explicit-any": "warn", - }, - }, ]; diff --git a/src/harmony/harmony-factory.ts b/src/harmony/harmony-factory.ts index 6fa4b8a3..1b002762 100644 --- a/src/harmony/harmony-factory.ts +++ b/src/harmony/harmony-factory.ts @@ -23,7 +23,8 @@ export function createHarmonyFactory(context: TsTransformPathsContext): HarmonyF } else if (TsFourSeven.predicate(context)) { return TsFourSeven.handler(context, prop); } else { - return (target)[prop]; + // @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expression of type 'string | symbol' can't be used to index type 'typeof import("typescript") | NodeFactory'. + return target[prop]; } }, }) as HarmonyFactory; diff --git a/src/harmony/utils.ts b/src/harmony/utils.ts index 48c15a4a..2f0cb8e3 100644 --- a/src/harmony/utils.ts +++ b/src/harmony/utils.ts @@ -4,8 +4,8 @@ // @formatter:off // @prettier-ignore -export type DownSampleTsTypes = { - [i in keyof Tuple]: Tuple[i] extends any[] +export type DownSampleTsTypes = { + [i in keyof Tuple]: Tuple[i] extends unknown[] ? DownSampleTsTypes : DownSampleTsType; } & { @@ -13,8 +13,8 @@ export type DownSampleTsTypes = - T extends Exclude ? Extract[1] : T; +type DownSampleTsType = + T extends Exclude ? Extract[1] : T; // @formatter:on // endregion diff --git a/src/harmony/versions/four-seven.ts b/src/harmony/versions/four-seven.ts index c0a7e38f..b09638da 100644 --- a/src/harmony/versions/four-seven.ts +++ b/src/harmony/versions/four-seven.ts @@ -111,13 +111,15 @@ export function handler(context: TsTransformPathsContext, prop: string | symbol) }; } default: { - return (...args: any) => (factory)[prop](...args); + // @ts-expect-error TS(7019) FIXME: Rest parameter 'args' implicitly has an 'any[]' type. + return (...args) => factory[prop](...args); } } } export function downSample(...args: T): DownSampleTsTypes { - return args; + // @ts-expect-error TS(2322) FIXME: Type 'T' is not assignable to type 'DownSampleTsTypes'. + return args; } // endregion diff --git a/src/harmony/versions/three-eight.ts b/src/harmony/versions/three-eight.ts index cff317b1..e9e615eb 100644 --- a/src/harmony/versions/three-eight.ts +++ b/src/harmony/versions/three-eight.ts @@ -66,7 +66,8 @@ export function handler(context: TsTransformPathsContext, prop: string | symbol) switch (prop) { case "updateCallExpression": { - return (...args: any) => ts.updateCall.apply(void 0, args); + // @ts-expect-error TS(7019) FIXME: Rest parameter 'args' implicitly has an 'any[]' type. + return (...args) => ts.updateCall.apply(void 0, args); } case "updateImportClause": { return function ( @@ -143,13 +144,15 @@ export function handler(context: TsTransformPathsContext, prop: string | symbol) }; } default: { - return (...args: any) => (ts)[prop](...args); + // @ts-expect-error TS(7019) FIXME: Rest parameter 'args' implicitly has an 'any[]' type. + return (...args) => ts[prop](...args); } } } export function downSample(...args: T): DownSampleTsTypes { - return args; + // @ts-expect-error TS(2322) FIXME: Type 'T' is not assignable to type 'DownSampleTsTypes'. + return args; } // endregion diff --git a/src/utils/elide-import-export.ts b/src/utils/elide-import-export.ts index 441e2559..57a0a505 100755 --- a/src/utils/elide-import-export.ts +++ b/src/utils/elide-import-export.ts @@ -117,7 +117,8 @@ export function elideImportOrExportDeclaration( importClause, newModuleSpecifier, // This will be changed in the next release of TypeScript, but by that point we can drop elision entirely - (node as any).attributes || node.assertClause, + // @ts-expect-error TS(2339) FIXME: Property 'attributes' does not exist on type 'ImportDeclaration'. + node.attributes || node.assertClause, ); else return undefined; } else { @@ -150,7 +151,8 @@ export function elideImportOrExportDeclaration( exportClause, newModuleSpecifier, // This will be changed in the next release of TypeScript, but by that point we can drop elision entirely - (node as any).attributes || node.assertClause, + // @ts-expect-error TS(2339) FIXME: Property 'attributes' does not exist on type 'ExportDeclaration'. + node.attributes || node.assertClause, ) : undefined; } diff --git a/src/utils/ts-helpers.ts b/src/utils/ts-helpers.ts index 9dae038e..a11a66da 100755 --- a/src/utils/ts-helpers.ts +++ b/src/utils/ts-helpers.ts @@ -68,7 +68,7 @@ export function createSyntheticEmitHost( !tsInstance.sys.useCaseSensitiveFileNames, ), getCanonicalFileName, - } as unknown as ts.EmitHost; + } as ts.EmitHost; } /** Get ts-node register info */ @@ -86,9 +86,8 @@ export function getTsNodeRegistrationProperties(tsInstance: typeof ts) { const { config, options } = global.process[tsNodeSymbol]!; const { configFilePath } = config.options; - const pcl = configFilePath - ? tsInstance.getParsedCommandLineOfConfigFile(configFilePath, {}, tsInstance.sys) - : void 0; + // @ts-expect-error TS(2345) FIXME: Argument of type 'System' is not assignable to parameter of type 'ParseConfigFileHost'. + const pcl = configFilePath ? tsInstance.getParsedCommandLineOfConfigFile(configFilePath, {}, tsInstance.sys) : void 0; const fileNames = pcl?.fileNames || config.fileNames; const compilerOptions = Object.assign({}, config.options, options.compilerOptions, { outDir: pcl?.options.outDir }); diff --git a/test/tests/nx.test.ts b/test/tests/nx.test.ts index cdfaba1e..a027faea 100644 --- a/test/tests/nx.test.ts +++ b/test/tests/nx.test.ts @@ -17,10 +17,11 @@ describe(`NX Transformer`, () => { describe("Plugin", () => { let mockedTransformer: jest.SpyInstance; - const program: any = { x: 1 }; + const program = { x: 1 }; beforeAll(async () => { - mockedTransformer = jest.spyOn(transformerModule, "default").mockReturnValue((() => {})); + // @ts-expect-error TS(2345) FIXME: Argument of type '() => void' is not assignable to parameter of type '(transformationContext: TransformationContext) => (sourceFile: SourceFile) => SourceFile'. + mockedTransformer = jest.spyOn(transformerModule, "default").mockReturnValue(() => {}); }); afterAll(() => { mockedTransformer.mockClear(); @@ -30,8 +31,9 @@ describe(`NX Transformer`, () => { }); test(`Before properly routes transform`, () => { - const config: any = { a: 2 }; + const config = { a: 2 }; + // @ts-expect-error TS(2559) FIXME: Type '{ a: number; }' has no properties in common with type 'Omit'. nxTransformerPlugin.before(config, program); expect(mockedTransformer).toHaveBeenCalledTimes(1); @@ -43,8 +45,9 @@ describe(`NX Transformer`, () => { }); test(`After properly routes transform`, () => { - const config: any = { a: 2, afterDeclarations: true }; + const config = { a: 2, afterDeclarations: true }; + // @ts-expect-error TS(2345) FIXME: Argument of type '{ x: number; }' is not assignable to parameter of type 'Program'. nxTransformerPlugin.afterDeclarations(config, program); expect(mockedTransformer).toHaveBeenCalledTimes(1); diff --git a/test/tests/register.test.ts b/test/tests/register.test.ts index 5f616fe5..356f4f43 100755 --- a/test/tests/register.test.ts +++ b/test/tests/register.test.ts @@ -26,8 +26,10 @@ const configMap = Object.entries(configs).map(([label, cfg]) => { let hasAfterDeclarations: boolean = false; const transformers = [ ...[cfg].flat().map((c) => { - if ((c).before || !(c).afterDeclarations) hasBefore = true; - if ((c).afterDeclarations) hasAfterDeclarations = true; + // @ts-expect-error TS(2339) FIXME: Property 'before' does not exist on type '{} | { readonly before: true; } | { readonly afterDeclarations: true; } | {} | { readonly afterDeclarations: true; } | { readonly before: true; } | { readonly afterDeclarations: true; }'. + if (c.before || !c.afterDeclarations) hasBefore = true; + // @ts-expect-error TS(2339) FIXME: Property 'afterDeclarations' does not exist on type '{} | { readonly before: true; } | { readonly afterDeclarations: true; } | {} | { readonly afterDeclarations: true; } | { readonly before: true; } | { readonly afterDeclarations: true; }'. + if (c.afterDeclarations) hasAfterDeclarations = true; return { transform: "typescript-transform-paths", ...c, ...pluginOptions } as PluginConfig; }), otherTransformer, @@ -63,9 +65,10 @@ describe(`Register script`, () => { } }); test(`Uses existing ts-node if found`, () => { - const fakeInstance: any = {}; + const fakeInstance: unknown = {}; const originalTsNodeInstance = global.process[instanceSymbol]; + // @ts-expect-error TS(2322) FIXME: Type 'unknown' is not assignable to type 'Service | undefined'. global.process[instanceSymbol] = fakeInstance; let registerSpy: jest.SpyInstance | undefined; try { @@ -128,15 +131,17 @@ describe(`Register script`, () => { "Existing Transformer Config Factory", "No Existing Transformers", ] as const)(`%s`, (configKind) => { - const fakeExistingTransformer = function fakeExistingTransformer(): any {}; - const fakeTransformer = function fakeTransformer(): any {}; + // @ts-expect-error TS(2355) FIXME: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. + const fakeExistingTransformer = function fakeExistingTransformer(): unknown {}; + // @ts-expect-error TS(2355) FIXME: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. + const fakeTransformer = function fakeTransformer(): unknown {}; const fakeTransformerConfig = { before: [fakeExistingTransformer], after: [fakeExistingTransformer], afterDeclarations: [fakeExistingTransformer], }; const transformerFactoryFn = jest.fn().mockReturnValue(fakeTransformerConfig); - const fakeProgram: any = {}; + const fakeProgram: unknown = {}; let existingTransformers: CustomTransformers | ((p: Program) => CustomTransformers) | undefined; switch (configKind) { @@ -145,6 +150,7 @@ describe(`Register script`, () => { break; } case "Existing Transformer Config": { + // @ts-expect-error TS(2322) FIXME: Type '{ before: (() => unknown)[]; after: (() => unknown)[]; afterDeclarations: (() => unknown)[]; }' is not assignable to type 'CustomTransformers | ((p: Program) => CustomTransformers) | undefined'. existingTransformers = { ...fakeTransformerConfig }; break; } @@ -161,6 +167,7 @@ describe(`Register script`, () => { let mergedTransformers: CustomTransformers; beforeAll(() => { + // @ts-expect-error TS(2345) FIXME: Argument of type '() => unknown' is not assignable to parameter of type '(transformationContext: TransformationContext) => (sourceFile: SourceFile) => SourceFile'. mockTransformer = jest.spyOn(transformerModule, "default").mockReturnValue(fakeTransformer); global.process[instanceSymbol] = void 0; @@ -183,7 +190,8 @@ describe(`Register script`, () => { mergedTransformers = typeof registerResult.transformers === "function" - ? registerResult.transformers(fakeProgram) + ? // @ts-expect-error TS(2345) FIXME: Argument of type 'unknown' is not assignable to parameter of type 'Program'. + registerResult.transformers(fakeProgram) : registerResult.transformers!; }); afterAll(() => { diff --git a/test/tests/transformer/general.test.ts b/test/tests/transformer/general.test.ts index 4c1f67eb..3f987961 100755 --- a/test/tests/transformer/general.test.ts +++ b/test/tests/transformer/general.test.ts @@ -50,8 +50,10 @@ describe(`Transformer -> General Tests`, () => { beforeAll(() => { transformed = transformedFiles[file]; expected = { - js: getExpected(tsInstance, file, originalFiles[file].js, projectRoot), - dts: getExpected(tsInstance, file, originalFiles[file].dts, projectRoot), + // @ts-expect-error TS(2345) FIXME: Argument of type 'typeof ts | typeof ts | typeof import("typescript")' is not assignable to parameter of type 'typeof import("typescript")'. + js: getExpected(tsInstance, file, originalFiles[file].js, projectRoot), + // @ts-expect-error TS(2345) FIXME: Argument of type 'typeof ts | typeof ts | typeof import("typescript")' is not assignable to parameter of type 'typeof import("typescript")'. + dts: getExpected(tsInstance, file, originalFiles[file].dts, projectRoot), }; }); diff --git a/test/tests/transformer/specific.test.ts b/test/tests/transformer/specific.test.ts index e787407c..91a3565b 100755 --- a/test/tests/transformer/specific.test.ts +++ b/test/tests/transformer/specific.test.ts @@ -19,7 +19,7 @@ const baseConfig: TsTransformPathsConfig = { exclude: ["**/excluded/**", "exclud /* Test Mapping */ const modes = ["program", "manual", "ts-node"] as const; -const testConfigs: { label: string; tsInstance: any; mode: (typeof modes)[number]; tsSpecifier: string }[] = []; +const testConfigs: { label: string; tsInstance: unknown; mode: (typeof modes)[number]; tsSpecifier: string }[] = []; for (const cfg of tsModules) testConfigs.push(...modes.map((mode) => ({ label: cfg[0], tsInstance: cfg[1], mode, tsSpecifier: cfg[2] }))); @@ -53,6 +53,7 @@ declare global { describe(`Specific Tests`, () => { describe.each(testConfigs)(`TypeScript $label - Mode: $mode`, ({ tsInstance, mode, tsSpecifier }) => { + // @ts-expect-error TS(18046) FIXME: 'tsInstance' is of type 'unknown'. const tsVersion = +tsInstance.versionMajorMinor.split(".").slice(0, 2).join(""); let normalEmit: EmittedFiles; let rootDirsEmit: EmittedFiles; @@ -62,6 +63,7 @@ describe(`Specific Tests`, () => { switch (mode) { case "program": { const program = createTsProgram({ + // @ts-expect-error TS(2322) FIXME: Type 'unknown' is not assignable to type 'typeof import("typescript")'. tsInstance, tsConfigFile, pluginOptions: { @@ -72,6 +74,7 @@ describe(`Specific Tests`, () => { normalEmit = getEmitResultFromProgram(program); const rootDirsProgram = createTsProgram({ + // @ts-expect-error TS(2322) FIXME: Type 'unknown' is not assignable to type 'typeof import("typescript")'. tsInstance, tsConfigFile, pluginOptions: { @@ -84,20 +87,24 @@ describe(`Specific Tests`, () => { } case "manual": { skipDts = true; + // @ts-expect-error TS(18046) FIXME: 'tsInstance' is of type 'unknown'. const pcl = tsInstance.getParsedCommandLineOfConfigFile( tsConfigFile, {}, - tsInstance.sys, + // @ts-expect-error TS(18046) FIXME: 'tsInstance' is of type 'unknown'. + tsInstance.sys, )! as TS.ParsedCommandLine; normalEmit = getManualEmitResult({ ...baseConfig, useRootDirs: false }, tsInstance, pcl); rootDirsEmit = getManualEmitResult({ ...baseConfig, useRootDirs: true }, tsInstance, pcl); break; } case "ts-node": { + // @ts-expect-error TS(18046) FIXME: 'tsInstance' is of type 'unknown'. const pcl = tsInstance.getParsedCommandLineOfConfigFile( tsConfigFile, {}, - tsInstance.sys, + // @ts-expect-error TS(18046) FIXME: 'tsInstance' is of type 'unknown'. + tsInstance.sys, )! as TS.ParsedCommandLine; skipDts = true; normalEmit = getTsNodeEmitResult({ ...baseConfig, useRootDirs: false }, pcl, tsSpecifier); diff --git a/test/utils/helpers.ts b/test/utils/helpers.ts index d93db331..8f57e392 100755 --- a/test/utils/helpers.ts +++ b/test/utils/helpers.ts @@ -36,7 +36,7 @@ function createWriteFile(outputFiles: EmittedFiles) { if (!ext) return; rootName = `${rootName}.ts`; const key = ext.replace(".", "") as keyof EmittedFiles[string]; - if (!outputFiles[rootName]) outputFiles[rootName] = {}; + outputFiles[rootName] ??= {} as EmittedFiles[string]; outputFiles[rootName][key] = data; }; } @@ -94,27 +94,28 @@ export function createTsProgram( let host: ts.CompilerHost | undefined; if (opt.tsConfigFile) { - const pcl = tsInstance.getParsedCommandLineOfConfigFile(opt.tsConfigFile, extendOptions, tsInstance.sys)!; + // @ts-expect-error TS(2345) FIXME: Argument of type 'System' is not assignable to parameter of type 'ParseConfigFileHost'. + const pcl = tsInstance.getParsedCommandLineOfConfigFile(opt.tsConfigFile, extendOptions, tsInstance.sys)!; compilerOptions = pcl.options; fileNames = pcl.fileNames; } else { - const files = Object.entries(compilerOptions.files!).reduce( - (p, [fileName, data]) => { - p[tsInstance.normalizePath(fileName)] = data; - return p; - }, - {}, - ); + const files = Object.entries(compilerOptions.files!).reduce((p, [fileName, data]) => { + // @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'. + p[tsInstance.normalizePath(fileName)] = data; + return p; + }, {}); fileNames = Object.keys(files); host = tsInstance.createCompilerHost(compilerOptions); compilerOptions = extendOptions; /* Patch host to feed mock files */ - const originalGetSourceFile: any = host.getSourceFile; + const originalGetSourceFile: unknown = host.getSourceFile; host.getSourceFile = function (fileName: string, scriptTarget: ts.ScriptTarget, ...rest) { if (Object.keys(files).includes(fileName)) + // @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'. return tsInstance.createSourceFile(fileName, files[fileName], scriptTarget); + // @ts-expect-error TS(18046) FIXME: 'originalGetSourceFile' is of type 'unknown'. else originalGetSourceFile(fileName, scriptTarget, ...rest); }; } @@ -153,22 +154,34 @@ export function getEmitResultFromProgram(program: ts.Program): EmittedFiles { return outputFiles; } -export function getManualEmitResult(pluginConfig: TsTransformPathsConfig, tsInstance: any, pcl: ts.ParsedCommandLine) { +export function getManualEmitResult( + pluginConfig: TsTransformPathsConfig, + tsInstance: unknown, + pcl: ts.ParsedCommandLine, +) { const { options: compilerOptions, fileNames } = pcl; - const transformer = tstpTransform(void 0, pluginConfig, { ts: tsInstance } as any, { compilerOptions, fileNames }); + // @ts-expect-error TS(2345) FIXME: Argument of type 'unknown' is not assignable to parameter of type 'TransformerExtras | undefined'. + const transformer = tstpTransform(void 0, pluginConfig, { ts: tsInstance } as unknown, { + compilerOptions, + fileNames, + }); + // @ts-expect-error TS(18046) FIXME: 'tsInstance' is of type 'unknown'. const { transformed } = tsInstance.transform( fileNames.map((f) => + // @ts-expect-error TS(18046) FIXME: 'tsInstance' is of type 'unknown'. tsInstance.createSourceFile(f, fs.readFileSync(f, "utf8"), tsInstance.ScriptTarget.ESNext, true), ), [transformer], compilerOptions, ); + // @ts-expect-error TS(18046) FIXME: 'tsInstance' is of type 'unknown'. const printer = tsInstance.createPrinter(); const res: EmittedFiles = {}; - for (const sourceFile of transformed) res[sourceFile.fileName] = { js: printer.printFile(sourceFile) }; + // @ts-expect-error TS(2322) FIXME: Type 'unknown' is not assignable to type '{ js: string; dts: string; }'. + for (const sourceFile of transformed) res[sourceFile.fileName] = { js: printer.printFile(sourceFile) }; return res; } @@ -181,8 +194,9 @@ export function getTsNodeEmitResult( const compiler = tsNode.create({ transpileOnly: true, transformers: { + // @ts-expect-error TS(2345) FIXME: Argument of type 'unknown' is not assignable to parameter of type 'TransformerExtras | undefined'. // eslint-disable-next-line @typescript-eslint/no-require-imports - before: [tstpTransform(void 0, pluginConfig, { ts: require(tsSpecifier) })], + before: [tstpTransform(void 0, pluginConfig, { ts: require(tsSpecifier) })], }, project: pcl.options.configFilePath, compiler: tsSpecifier, @@ -194,8 +208,10 @@ export function getTsNodeEmitResult( global.process[tsNode.REGISTER_INSTANCE] = compiler; try { const res: EmittedFiles = {}; - for (const fileName of pcl.fileNames.filter((f) => !/\.d\.ts$/.test(f))) - res[fileName] = { js: compiler.compile(fs.readFileSync(fileName, "utf8"), fileName) }; + for (const fileName of pcl.fileNames.filter((f) => !/\.d\.ts$/.test(f))) { + // @ts-expect-error TS(2322) FIXME: Type 'unknown' is not assignable to type '{ js: string; dts: string; }'. + res[fileName] = { js: compiler.compile(fs.readFileSync(fileName, "utf8"), fileName) }; + } return res; } finally { From 60c625885f180e007f188d1cbdc8a9dc6b8568f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 02:16:03 +0000 Subject: [PATCH 15/17] chore(deps): bump webpack from 5.93.0 to 5.94.0 in /test in the npm_and_yarn group across 1 directory (#260) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the npm_and_yarn group with 1 update in the /test directory: [webpack](https://github.com/webpack/webpack). Updates `webpack` from 5.93.0 to 5.94.0
Release notes

Sourced from webpack's releases.

v5.94.0

Bug Fixes

  • Added runtime condition for harmony reexport checked
  • Handle properly data/http/https protocols in source maps
  • Make bigint optimistic when browserslist not found
  • Move @​types/eslint-scope to dev deps
  • Related in asset stats is now always an array when no related found
  • Handle ASI for export declarations
  • Mangle destruction incorrect with export named default properly
  • Fixed unexpected asi generation with sequence expression
  • Fixed a lot of types

New Features

  • Added new external type "module-import"
  • Support webpackIgnore for new URL() construction
  • [CSS] @import pathinfo support

Security

  • Fixed DOM clobbering in auto public path
Commits
  • eabf85d chore(release): 5.94.0
  • 955e057 security: fix DOM clobbering in auto public path
  • 9822387 test: fix
  • cbb86ed test: fix
  • 5ac3d7f fix: unexpected asi generation with sequence expression
  • 2411661 security: fix DOM clobbering in auto public path
  • b8c03d4 fix: unexpected asi generation with sequence expression
  • f46a03c revert: do not use heuristic fallback for "module-import"
  • 60f1898 fix: do not use heuristic fallback for "module-import"
  • 66306aa Revert "fix: module-import get fallback from externalsPresets"
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=webpack&package-manager=npm_and_yarn&previous-version=5.93.0&new-version=5.94.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/LeDDGroup/typescript-transform-paths/network/alerts).
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- test/yarn.lock | 35 +++++++---------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/test/yarn.lock b/test/yarn.lock index db309c38..253a5df5 100644 --- a/test/yarn.lock +++ b/test/yarn.lock @@ -2296,27 +2296,7 @@ __metadata: languageName: node linkType: hard -"@types/eslint-scope@npm:^3.7.3": - version: 3.7.7 - resolution: "@types/eslint-scope@npm:3.7.7" - dependencies: - "@types/eslint": "npm:*" - "@types/estree": "npm:*" - checksum: 10c0/a0ecbdf2f03912679440550817ff77ef39a30fa8bfdacaf6372b88b1f931828aec392f52283240f0d648cf3055c5ddc564544a626bcf245f3d09fcb099ebe3cc - languageName: node - linkType: hard - -"@types/eslint@npm:*": - version: 9.6.0 - resolution: "@types/eslint@npm:9.6.0" - dependencies: - "@types/estree": "npm:*" - "@types/json-schema": "npm:*" - checksum: 10c0/69301356bc73b85e381ae00931291de2e96d1cc49a112c592c74ee32b2f85412203dea6a333b4315fd9839bb14f364f265cbfe7743fc5a78492ee0326dd6a2c1 - languageName: node - linkType: hard - -"@types/estree@npm:*, @types/estree@npm:^1.0.5": +"@types/estree@npm:^1.0.5": version: 1.0.5 resolution: "@types/estree@npm:1.0.5" checksum: 10c0/b3b0e334288ddb407c7b3357ca67dbee75ee22db242ca7c56fe27db4e1a31989cb8af48a84dd401deb787fe10cc6b2ab1ee82dc4783be87ededbe3d53c79c70d @@ -2407,7 +2387,7 @@ __metadata: languageName: node linkType: hard -"@types/json-schema@npm:*, @types/json-schema@npm:^7.0.8, @types/json-schema@npm:^7.0.9": +"@types/json-schema@npm:^7.0.8, @types/json-schema@npm:^7.0.9": version: 7.0.15 resolution: "@types/json-schema@npm:7.0.15" checksum: 10c0/a996a745e6c5d60292f36731dd41341339d4eeed8180bb09226e5c8d23759067692b1d88e5d91d72ee83dfc00d3aca8e7bd43ea120516c17922cbcb7c3e252db @@ -4309,7 +4289,7 @@ __metadata: languageName: node linkType: hard -"enhanced-resolve@npm:^5.0.0, enhanced-resolve@npm:^5.17.0, enhanced-resolve@npm:^5.7.0": +"enhanced-resolve@npm:^5.0.0, enhanced-resolve@npm:^5.17.1, enhanced-resolve@npm:^5.7.0": version: 5.17.1 resolution: "enhanced-resolve@npm:5.17.1" dependencies: @@ -9557,10 +9537,9 @@ __metadata: linkType: hard "webpack@npm:^5.75.0": - version: 5.93.0 - resolution: "webpack@npm:5.93.0" + version: 5.94.0 + resolution: "webpack@npm:5.94.0" dependencies: - "@types/eslint-scope": "npm:^3.7.3" "@types/estree": "npm:^1.0.5" "@webassemblyjs/ast": "npm:^1.12.1" "@webassemblyjs/wasm-edit": "npm:^1.12.1" @@ -9569,7 +9548,7 @@ __metadata: acorn-import-attributes: "npm:^1.9.5" browserslist: "npm:^4.21.10" chrome-trace-event: "npm:^1.0.2" - enhanced-resolve: "npm:^5.17.0" + enhanced-resolve: "npm:^5.17.1" es-module-lexer: "npm:^1.2.1" eslint-scope: "npm:5.1.1" events: "npm:^3.2.0" @@ -9589,7 +9568,7 @@ __metadata: optional: true bin: webpack: bin/webpack.js - checksum: 10c0/f0c72f1325ff57a4cc461bb978e6e1296f2a7d45c9765965271aa686ccdd448512956f4d7fdcf8c164d073af046c5a0aba17ce85ea98e33e5e2bfbfe13aa5808 + checksum: 10c0/b4d1b751f634079bd177a89eef84d80fa5bb8d6fc15d72ab40fc2b9ca5167a79b56585e1a849e9e27e259803ee5c4365cb719e54af70a43c06358ec268ff4ebf languageName: node linkType: hard From ad90907f1c6710b6f29cd96bbd85d703fc69891b Mon Sep 17 00:00:00 2001 From: spdaley Date: Wed, 11 Sep 2024 15:16:05 -0400 Subject: [PATCH 16/17] fix: downgrade minimatch from 10.0.1 to 9.0.5 (#272) https://github.com/LeDDGroup/typescript-transform-paths/issues/271 downgrade the minimatch dependency from 10.0.1 to 9.0.5 to remove a node 20 dependency. --- package.json | 2 +- test/yarn.lock | 13 ++----------- yarn.lock | 13 ++----------- 3 files changed, 5 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index e0281d14..87278e86 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "typescript": ">=3.6.5" }, "dependencies": { - "minimatch": "^10.0.1" + "minimatch": "^9.0.5" }, "prettier": { "plugins": [ diff --git a/test/yarn.lock b/test/yarn.lock index 253a5df5..392ca813 100644 --- a/test/yarn.lock +++ b/test/yarn.lock @@ -6579,15 +6579,6 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^10.0.1": - version: 10.0.1 - resolution: "minimatch@npm:10.0.1" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10c0/e6c29a81fe83e1877ad51348306be2e8aeca18c88fdee7a99df44322314279e15799e41d7cb274e4e8bb0b451a3bc622d6182e157dfa1717d6cda75e9cd8cd5d - languageName: node - linkType: hard - "minimatch@npm:^3.0.4, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -6606,7 +6597,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.4": +"minimatch@npm:^9.0.4, minimatch@npm:^9.0.5": version: 9.0.5 resolution: "minimatch@npm:9.0.5" dependencies: @@ -9243,7 +9234,7 @@ __metadata: version: 0.0.0-use.local resolution: "typescript-transform-paths@portal:../::locator=root-workspace-0b6124%40workspace%3A." dependencies: - minimatch: "npm:^10.0.1" + minimatch: "npm:^9.0.5" peerDependencies: typescript: ">=3.6.5" languageName: node diff --git a/yarn.lock b/yarn.lock index 5906e919..c20b8d3e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2151,15 +2151,6 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^10.0.1": - version: 10.0.1 - resolution: "minimatch@npm:10.0.1" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10c0/e6c29a81fe83e1877ad51348306be2e8aeca18c88fdee7a99df44322314279e15799e41d7cb274e4e8bb0b451a3bc622d6182e157dfa1717d6cda75e9cd8cd5d - languageName: node - linkType: hard - "minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -2169,7 +2160,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.4": +"minimatch@npm:^9.0.4, minimatch@npm:^9.0.5": version: 9.0.5 resolution: "minimatch@npm:9.0.5" dependencies: @@ -3000,7 +2991,7 @@ __metadata: changelogen: "npm:^0.5.5" eslint: "npm:9.x" globals: "npm:^15.9.0" - minimatch: "npm:^10.0.1" + minimatch: "npm:^9.0.5" prettier: "npm:^3.3.3" prettier-plugin-jsdoc: "npm:^1.3.0" ts-patch: "npm:^3.2.1" From 2c96be2ec8dcce5732184743dfbb4f5bb3e7956e Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Wed, 11 Sep 2024 15:22:37 -0400 Subject: [PATCH 17/17] chore(release): v3.5.1 --- CHANGELOG.md | 33 +++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 278c9d13..acfe2cff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,39 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## v3.5.1 + +[compare changes](https://github.com/LeDDGroup/typescript-transform-paths/compare/v3.5.0...v3.5.1) + +### 🩹 Fixes + +- Downgrade minimatch from 10.0.1 to 9.0.5 ([#272](https://github.com/LeDDGroup/typescript-transform-paths/pull/272)) + +### 💅 Refactors + +- Always patch ([ed3ed1f](https://github.com/LeDDGroup/typescript-transform-paths/commit/ed3ed1f)) +- Rename typescript-number to typescript-x ([36643ff](https://github.com/LeDDGroup/typescript-transform-paths/commit/36643ff)) +- Use strictest typescript configuration ([a67e739](https://github.com/LeDDGroup/typescript-transform-paths/commit/a67e739)) +- Enable @typescript-eslint/no-explicit-any warning ([1cddaac](https://github.com/LeDDGroup/typescript-transform-paths/commit/1cddaac)) +- Add eslint-plugin-unicorn ([44ad2e0](https://github.com/LeDDGroup/typescript-transform-paths/commit/44ad2e0)) +- Remove anys ([07e5c27](https://github.com/LeDDGroup/typescript-transform-paths/commit/07e5c27)) + +### 🏡 Chore + +- Rename nx test project to avoid conflict with package name ([3ee03d1](https://github.com/LeDDGroup/typescript-transform-paths/commit/3ee03d1)) +- **deps-dev:** Bump typescript-eslint from 8.1.0 to 8.2.0 ([#249](https://github.com/LeDDGroup/typescript-transform-paths/pull/249)) +- **deps-dev:** Bump @types/node from 22.2.0 to 22.4.1 ([#248](https://github.com/LeDDGroup/typescript-transform-paths/pull/248)) +- Add danielpza to funding.yml ([9aa6941](https://github.com/LeDDGroup/typescript-transform-paths/commit/9aa6941)) +- **deps-dev:** Bump typescript-eslint from 8.2.0 to 8.3.0 ([#254](https://github.com/LeDDGroup/typescript-transform-paths/pull/254)) +- **deps-dev:** Bump @types/node from 22.4.1 to 22.5.0 ([#253](https://github.com/LeDDGroup/typescript-transform-paths/pull/253)) +- **deps-dev:** Update some dependencies ([164aeac](https://github.com/LeDDGroup/typescript-transform-paths/commit/164aeac)) +- Remove eslint-plugin-unicorn ([8c6ccf4](https://github.com/LeDDGroup/typescript-transform-paths/commit/8c6ccf4)) + +### ❤️ Contributors + +- Spdaley +- Daniel Perez Alvarez + ## v3.5.0 [compare changes](https://github.com/LeDDGroup/typescript-transform-paths/compare/v3.4.11...v3.5.0) diff --git a/package.json b/package.json index 87278e86..76a20db9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "typescript-transform-paths", - "version": "3.5.0", + "version": "3.5.1", "description": "Transforms module resolution paths using TypeScript path mapping and/or custom paths", "type": "commonjs", "main": "./dist/index.js",