From d22b7418210ab65caa5dc02aea46e7d0e1243307 Mon Sep 17 00:00:00 2001 From: Greg Pabian <35925521+grzpab@users.noreply.github.com> Date: Wed, 17 Jan 2024 10:54:46 +0100 Subject: [PATCH 1/2] chore: updated the @intuita-inc/filemod to v. 2.0.0. --- .../package.json | 2 +- .../test/test.ts | 27 +- .../package.json | 2 +- .../test/test.ts | 27 +- .../generate-url-patterns/package.json | 2 +- .../generate-url-patterns/test/test.ts | 27 +- codemods/i18n/package.json | 2 +- codemods/i18n/test/test.ts | 22 +- .../migrate-codemod-registry/package.json | 2 +- .../vitest/migrate-configuration/package.json | 2 +- .../vitest/migrate-configuration/test/test.ts | 30 +- codemods/next-i18next/copy-keys/package.json | 2 +- codemods/next-i18next/copy-keys/test/test.ts | 27 +- codemods/next/13/ab-test/package.json | 2 +- codemods/next/13/ab-test/test/test.ts | 28 +- .../13/app-directory-boilerplate/package.json | 2 +- .../13/app-directory-boilerplate/test/test.ts | 26 +- .../13/remove-get-static-props/package.json | 2 +- .../13/remove-get-static-props/test/test.ts | 47 +-- .../next/13/remove-next-export/package.json | 2 +- .../next/13/remove-next-export/test/test.ts | 26 +- .../next/13/replace-api-routes/package.json | 2 +- .../next/13/replace-api-routes/test/test.ts | 21 +- .../next/13/replace-next-head/package.json | 2 +- .../next/13/replace-next-head/test/test.ts | 22 +- .../13/replace-use-search-params/package.json | 2 +- .../13/replace-use-search-params/test/test.ts | 29 +- .../package.json | 2 +- .../test/test.ts | 26 +- pnpm-lock.yaml | 360 ++++++++++++------ utilities/index.ts | 102 +++++ utilities/package.json | 7 +- 32 files changed, 493 insertions(+), 391 deletions(-) diff --git a/codemods/cal.com/app-directory-boilerplate-calcom/package.json b/codemods/cal.com/app-directory-boilerplate-calcom/package.json index 5cd3e5c1..70e412a6 100644 --- a/codemods/cal.com/app-directory-boilerplate-calcom/package.json +++ b/codemods/cal.com/app-directory-boilerplate-calcom/package.json @@ -14,7 +14,7 @@ "typescript": "^5.2.2", "esbuild": "0.19.5", "ts-node": "^10.9.1", - "@intuita-inc/filemod": "1.1.0", + "@intuita-inc/filemod": "2.0.0", "memfs": "^4.6.0", "ts-morph": "^19.0.0", "jscodeshift": "^0.15.1", diff --git a/codemods/cal.com/app-directory-boilerplate-calcom/test/test.ts b/codemods/cal.com/app-directory-boilerplate-calcom/test/test.ts index f0728067..b49c36cf 100644 --- a/codemods/cal.com/app-directory-boilerplate-calcom/test/test.ts +++ b/codemods/cal.com/app-directory-boilerplate-calcom/test/test.ts @@ -1,29 +1,20 @@ import { deepStrictEqual, ok } from 'node:assert'; import { describe, it } from 'vitest'; import { DirectoryJSON, Volume, createFsFromVolume } from 'memfs'; -import { - FileSystemManager, - UnifiedFileSystem, - buildApi, - executeFilemod, -} from '@intuita-inc/filemod'; +import { buildApi, executeFilemod } from '@intuita-inc/filemod'; import { repomod } from '../src/index.js'; import tsmorph from 'ts-morph'; +import { + buildUnifiedFileSystem, + buildPathAPI, +} from '@codemod-registry/utilities'; const transform = async (json: DirectoryJSON) => { const volume = Volume.fromJSON(json); + const fs = createFsFromVolume(volume); - const fileSystemManager = new FileSystemManager( - // @ts-expect-error type convergence - volume.promises.readdir, - volume.promises.readFile, - volume.promises.stat, - ); - const unifiedFileSystem = new UnifiedFileSystem( - // @ts-expect-error type convergence - createFsFromVolume(volume), - fileSystemManager, - ); + const unifiedFileSystem = buildUnifiedFileSystem(fs); + const pathApi = buildPathAPI('/'); const api = buildApi<{ tsmorph: typeof tsmorph; @@ -32,7 +23,7 @@ const transform = async (json: DirectoryJSON) => { () => ({ tsmorph, }), - '/', + pathApi, ); return executeFilemod(api, repomod, '/', {}, {}); diff --git a/codemods/cal.com/generate-metadata-tests-calcom/package.json b/codemods/cal.com/generate-metadata-tests-calcom/package.json index 5df6d094..f6f10284 100644 --- a/codemods/cal.com/generate-metadata-tests-calcom/package.json +++ b/codemods/cal.com/generate-metadata-tests-calcom/package.json @@ -8,7 +8,7 @@ "typescript": "^5.2.2", "esbuild": "0.19.5", "ts-node": "^10.9.1", - "@intuita-inc/filemod": "1.1.0", + "@intuita-inc/filemod": "2.0.0", "memfs": "^4.6.0", "ts-morph": "^19.0.0", "jscodeshift": "^0.15.1", diff --git a/codemods/cal.com/generate-metadata-tests-calcom/test/test.ts b/codemods/cal.com/generate-metadata-tests-calcom/test/test.ts index fa83d3b3..528fd34e 100644 --- a/codemods/cal.com/generate-metadata-tests-calcom/test/test.ts +++ b/codemods/cal.com/generate-metadata-tests-calcom/test/test.ts @@ -1,33 +1,24 @@ import { deepStrictEqual } from 'node:assert'; import { describe, it } from 'vitest'; import { DirectoryJSON, Volume, createFsFromVolume } from 'memfs'; -import { - FileSystemManager, - UnifiedFileSystem, - buildApi, - executeFilemod, -} from '@intuita-inc/filemod'; +import { buildApi, executeFilemod } from '@intuita-inc/filemod'; import { buildData, repomod } from '../src/index.js'; +import { + buildUnifiedFileSystem, + buildPathAPI, +} from '@codemod-registry/utilities'; const transform = async (json: DirectoryJSON) => { const volume = Volume.fromJSON(json); + const fs = createFsFromVolume(volume); - const fileSystemManager = new FileSystemManager( - // @ts-expect-error type convergence - volume.promises.readdir, - volume.promises.readFile, - volume.promises.stat, - ); - const unifiedFileSystem = new UnifiedFileSystem( - // @ts-expect-error type convergence - createFsFromVolume(volume), - fileSystemManager, - ); + const unifiedFileSystem = buildUnifiedFileSystem(fs); + const pathApi = buildPathAPI('/'); const api = buildApi>( unifiedFileSystem, () => ({}), - '/', + pathApi, ); return executeFilemod(api, repomod, '/', { testPath: '/opt/tests' }, {}); diff --git a/codemods/cal.com/generate-url-patterns/package.json b/codemods/cal.com/generate-url-patterns/package.json index 2ae522cd..939ce7a2 100644 --- a/codemods/cal.com/generate-url-patterns/package.json +++ b/codemods/cal.com/generate-url-patterns/package.json @@ -8,7 +8,7 @@ "typescript": "^5.2.2", "esbuild": "0.19.5", "ts-node": "^10.9.1", - "@intuita-inc/filemod": "1.1.0", + "@intuita-inc/filemod": "2.0.0", "memfs": "^4.6.0", "ts-morph": "^19.0.0", "jscodeshift": "^0.15.1", diff --git a/codemods/cal.com/generate-url-patterns/test/test.ts b/codemods/cal.com/generate-url-patterns/test/test.ts index 072eb5de..41f03654 100644 --- a/codemods/cal.com/generate-url-patterns/test/test.ts +++ b/codemods/cal.com/generate-url-patterns/test/test.ts @@ -1,14 +1,13 @@ import { deepStrictEqual } from 'node:assert'; import { describe, it } from 'vitest'; import { DirectoryJSON, Volume, createFsFromVolume } from 'memfs'; -import { - FileSystemManager, - UnifiedFileSystem, - buildApi, - executeFilemod, -} from '@intuita-inc/filemod'; +import { buildApi, executeFilemod } from '@intuita-inc/filemod'; import { repomod } from '../src/index.js'; import jscodeshift from 'jscodeshift'; +import { + buildUnifiedFileSystem, + buildPathAPI, +} from '@codemod-registry/utilities'; const transform = async ( json: DirectoryJSON, @@ -21,25 +20,17 @@ const transform = async ( ) => { const volume = Volume.fromJSON(json); - const fileSystemManager = new FileSystemManager( - // @ts-expect-error type convergence - volume.promises.readdir, - volume.promises.readFile, - volume.promises.stat, - ); + const fs = createFsFromVolume(volume); - const unifiedFileSystem = new UnifiedFileSystem( - // @ts-expect-error type convergence - createFsFromVolume(volume), - fileSystemManager, - ); + const unifiedFileSystem = buildUnifiedFileSystem(fs); + const pathApi = buildPathAPI('/'); const api = buildApi<{ jscodeshift: typeof jscodeshift }>( unifiedFileSystem, () => ({ jscodeshift, }), - '/', + pathApi, ); return executeFilemod(api, repomod, '/', options, {}); diff --git a/codemods/i18n/package.json b/codemods/i18n/package.json index a929be0b..02abbea2 100644 --- a/codemods/i18n/package.json +++ b/codemods/i18n/package.json @@ -8,7 +8,7 @@ "typescript": "^5.2.2", "esbuild": "0.19.5", "ts-node": "^10.9.1", - "@intuita-inc/filemod": "1.1.0", + "@intuita-inc/filemod": "2.0.0", "memfs": "^4.6.0", "ts-morph": "^19.0.0", "jscodeshift": "^0.15.1", diff --git a/codemods/i18n/test/test.ts b/codemods/i18n/test/test.ts index feb156d9..6de808f5 100644 --- a/codemods/i18n/test/test.ts +++ b/codemods/i18n/test/test.ts @@ -1,7 +1,6 @@ import { DirectoryJSON, Volume, createFsFromVolume } from 'memfs'; import { describe, it } from 'vitest'; import { - FileSystemManager, UnifiedFileSystem, buildApi, executeFilemod, @@ -9,22 +8,17 @@ import { import { repomod } from '../src/index.js'; import tsmorph from 'ts-morph'; import { deepStrictEqual } from 'node:assert'; +import { + buildUnifiedFileSystem, + buildPathAPI, +} from '@codemod-registry/utilities'; const transform = async (json: DirectoryJSON) => { const volume = Volume.fromJSON(json); + const fs = createFsFromVolume(volume); - const fileSystemManager = new FileSystemManager( - volume.promises.readdir as any, - volume.promises.readFile as any, - volume.promises.stat as any, - ); - - const fileSystem = createFsFromVolume(volume) as any; - - const unifiedFileSystem = new UnifiedFileSystem( - fileSystem, - fileSystemManager, - ); + const unifiedFileSystem = buildUnifiedFileSystem(fs); + const pathApi = buildPathAPI('/'); const api = buildApi<{ tsmorph: typeof tsmorph; @@ -35,7 +29,7 @@ const transform = async (json: DirectoryJSON) => { tsmorph, unifiedFileSystem, }), - '/', + pathApi, ); return executeFilemod(api, repomod, '/', {}, {}); diff --git a/codemods/intuita/migrate-codemod-registry/package.json b/codemods/intuita/migrate-codemod-registry/package.json index ccee4a54..eaee0c16 100644 --- a/codemods/intuita/migrate-codemod-registry/package.json +++ b/codemods/intuita/migrate-codemod-registry/package.json @@ -8,7 +8,7 @@ "typescript": "^5.2.2", "esbuild": "0.19.5", "ts-node": "^10.9.1", - "@intuita-inc/filemod": "1.1.0", + "@intuita-inc/filemod": "2.0.0", "memfs": "^4.6.0", "ts-morph": "^19.0.0", "jscodeshift": "^0.15.1", diff --git a/codemods/mocha/vitest/migrate-configuration/package.json b/codemods/mocha/vitest/migrate-configuration/package.json index 487d64c9..2bdde89d 100644 --- a/codemods/mocha/vitest/migrate-configuration/package.json +++ b/codemods/mocha/vitest/migrate-configuration/package.json @@ -7,7 +7,7 @@ "@codemod-registry/cjs-builder": "workspace:*", "@codemod-registry/tsconfig": "workspace:*", "@codemod-registry/utilities": "workspace:*", - "@intuita-inc/filemod": "1.1.0", + "@intuita-inc/filemod": "2.0.0", "@types/jscodeshift": "^0.11.10", "esbuild": "0.19.5", "jscodeshift": "^0.15.1", diff --git a/codemods/mocha/vitest/migrate-configuration/test/test.ts b/codemods/mocha/vitest/migrate-configuration/test/test.ts index d8e7f220..e4026f46 100644 --- a/codemods/mocha/vitest/migrate-configuration/test/test.ts +++ b/codemods/mocha/vitest/migrate-configuration/test/test.ts @@ -1,30 +1,22 @@ -import { - FileSystemManager, - UnifiedFileSystem, - buildApi, - executeFilemod, -} from '@intuita-inc/filemod'; +import { buildApi, executeFilemod } from '@intuita-inc/filemod'; import { describe, it } from 'vitest'; import { DirectoryJSON, Volume, createFsFromVolume } from 'memfs'; import { deepEqual, equal, ok } from 'node:assert'; import { repomod } from '../src/index.js'; +import { + buildUnifiedFileSystem, + buildPathAPI, +} from '@codemod-registry/utilities'; const transform = async (json: DirectoryJSON) => { const volume = Volume.fromJSON(json); - const fileSystemManager = new FileSystemManager( - // @ts-expect-error type convergence - volume.promises.readdir, - volume.promises.readFile, - volume.promises.stat, - ); - const unifiedFileSystem = new UnifiedFileSystem( - // @ts-expect-error type convergence - createFsFromVolume(volume), - fileSystemManager, - ); - - const api = buildApi(unifiedFileSystem, () => ({}), '/'); + const fs = createFsFromVolume(volume); + + const unifiedFileSystem = buildUnifiedFileSystem(fs); + const pathApi = buildPathAPI('/'); + + const api = buildApi(unifiedFileSystem, () => ({}), pathApi); return executeFilemod(api, repomod, '/', {}, {}); }; diff --git a/codemods/next-i18next/copy-keys/package.json b/codemods/next-i18next/copy-keys/package.json index f1484022..27be52ec 100644 --- a/codemods/next-i18next/copy-keys/package.json +++ b/codemods/next-i18next/copy-keys/package.json @@ -8,7 +8,7 @@ "typescript": "^5.2.2", "esbuild": "0.19.5", "ts-node": "^10.9.1", - "@intuita-inc/filemod": "1.1.0", + "@intuita-inc/filemod": "2.0.0", "memfs": "^4.6.0", "ts-morph": "^19.0.0", "jscodeshift": "^0.15.1", diff --git a/codemods/next-i18next/copy-keys/test/test.ts b/codemods/next-i18next/copy-keys/test/test.ts index 813e67ce..f6563c35 100644 --- a/codemods/next-i18next/copy-keys/test/test.ts +++ b/codemods/next-i18next/copy-keys/test/test.ts @@ -1,36 +1,27 @@ import { DirectoryJSON, Volume, createFsFromVolume } from 'memfs'; import { describe, it } from 'vitest'; -import { - FileSystemManager, - UnifiedFileSystem, - buildApi, - executeFilemod, -} from '@intuita-inc/filemod'; +import { buildApi, executeFilemod } from '@intuita-inc/filemod'; import { repomod } from '../src/index.js'; import { deepStrictEqual } from 'node:assert'; +import { + buildUnifiedFileSystem, + buildPathAPI, +} from '@codemod-registry/utilities'; type Options = Readonly>; const transform = async (json: DirectoryJSON, options: Options) => { const volume = Volume.fromJSON(json); - const fileSystemManager = new FileSystemManager( - volume.promises.readdir as any, - volume.promises.readFile as any, - volume.promises.stat as any, - ); + const fs = createFsFromVolume(volume); - const fileSystem = createFsFromVolume(volume) as any; - - const unifiedFileSystem = new UnifiedFileSystem( - fileSystem, - fileSystemManager, - ); + const unifiedFileSystem = buildUnifiedFileSystem(fs); + const pathApi = buildPathAPI('/'); const api = buildApi>( unifiedFileSystem, () => ({}), - '/', + pathApi, ); return executeFilemod(api, repomod, '/', options, {}); diff --git a/codemods/next/13/ab-test/package.json b/codemods/next/13/ab-test/package.json index dac85874..f177544c 100644 --- a/codemods/next/13/ab-test/package.json +++ b/codemods/next/13/ab-test/package.json @@ -8,7 +8,7 @@ "typescript": "^5.2.2", "esbuild": "0.19.5", "ts-node": "^10.9.1", - "@intuita-inc/filemod": "1.1.0", + "@intuita-inc/filemod": "2.0.0", "memfs": "^4.6.0", "ts-morph": "^19.0.0", "jscodeshift": "^0.15.1", diff --git a/codemods/next/13/ab-test/test/test.ts b/codemods/next/13/ab-test/test/test.ts index 67e7158e..f9686938 100644 --- a/codemods/next/13/ab-test/test/test.ts +++ b/codemods/next/13/ab-test/test/test.ts @@ -1,37 +1,27 @@ import { deepStrictEqual } from 'node:assert'; import { describe, it } from 'vitest'; import { DirectoryJSON, Volume, createFsFromVolume } from 'memfs'; -import { - FileSystemManager, - UnifiedFileSystem, - buildApi, - executeFilemod, -} from '@intuita-inc/filemod'; +import { buildApi, executeFilemod } from '@intuita-inc/filemod'; import { repomod } from '../src/index.js'; import jscodeshift from 'jscodeshift'; +import { + buildUnifiedFileSystem, + buildPathAPI, +} from '@codemod-registry/utilities'; const transform = async (json: DirectoryJSON) => { const volume = Volume.fromJSON(json); + const fs = createFsFromVolume(volume); - const fileSystemManager = new FileSystemManager( - // @ts-expect-error type convergence - volume.promises.readdir, - volume.promises.readFile, - volume.promises.stat, - ); - - const unifiedFileSystem = new UnifiedFileSystem( - // @ts-expect-error type convergence - createFsFromVolume(volume), - fileSystemManager, - ); + const unifiedFileSystem = buildUnifiedFileSystem(fs); + const pathApi = buildPathAPI('/'); const api = buildApi<{ jscodeshift: typeof jscodeshift }>( unifiedFileSystem, () => ({ jscodeshift, }), - '/', + pathApi, ); return executeFilemod(api, repomod, '/', {}, {}); diff --git a/codemods/next/13/app-directory-boilerplate/package.json b/codemods/next/13/app-directory-boilerplate/package.json index c9d7efd4..38fe9fab 100644 --- a/codemods/next/13/app-directory-boilerplate/package.json +++ b/codemods/next/13/app-directory-boilerplate/package.json @@ -14,7 +14,7 @@ "typescript": "^5.2.2", "esbuild": "0.19.5", "ts-node": "^10.9.1", - "@intuita-inc/filemod": "1.1.0", + "@intuita-inc/filemod": "2.0.0", "memfs": "^4.6.0", "ts-morph": "^19.0.0", "jscodeshift": "^0.15.1", diff --git a/codemods/next/13/app-directory-boilerplate/test/test.ts b/codemods/next/13/app-directory-boilerplate/test/test.ts index ea0d0392..ca08e926 100644 --- a/codemods/next/13/app-directory-boilerplate/test/test.ts +++ b/codemods/next/13/app-directory-boilerplate/test/test.ts @@ -1,12 +1,7 @@ import { deepStrictEqual, ok } from 'node:assert'; import { describe, it } from 'vitest'; import { DirectoryJSON, Volume, createFsFromVolume } from 'memfs'; -import { - FileSystemManager, - UnifiedFileSystem, - buildApi, - executeFilemod, -} from '@intuita-inc/filemod'; +import { buildApi, executeFilemod } from '@intuita-inc/filemod'; import { repomod } from '../src/index.js'; import tsmorph from 'ts-morph'; import { fromMarkdown } from 'mdast-util-from-markdown'; @@ -14,6 +9,10 @@ import { toMarkdown } from 'mdast-util-to-markdown'; import { mdxjs } from 'micromark-extension-mdxjs'; import { mdxFromMarkdown, mdxToMarkdown } from 'mdast-util-mdx'; import { visit } from 'unist-util-visit'; +import { + buildUnifiedFileSystem, + buildPathAPI, +} from '@codemod-registry/utilities'; const INDEX_CONTENT = ` import A from './testQWE'; @@ -48,15 +47,10 @@ export const getServerSideProps = () => { const transform = async (json: DirectoryJSON) => { const volume = Volume.fromJSON(json); - const fileSystemManager = new FileSystemManager( - volume.promises.readdir as any, - volume.promises.readFile as any, - volume.promises.stat as any, - ); - const unifiedFileSystem = new UnifiedFileSystem( - createFsFromVolume(volume) as any, - fileSystemManager, - ); + const fs = createFsFromVolume(volume); + + const unifiedFileSystem = buildUnifiedFileSystem(fs); + const pathApi = buildPathAPI('/'); const parseMdx = (data: string) => fromMarkdown(data, { @@ -82,7 +76,7 @@ const transform = async (json: DirectoryJSON) => { stringifyMdx, visitMdxAst: visit, }), - '/', + pathApi, ); return executeFilemod(api, repomod, '/', {}, {}); diff --git a/codemods/next/13/remove-get-static-props/package.json b/codemods/next/13/remove-get-static-props/package.json index 5f21c82b..4b98db89 100644 --- a/codemods/next/13/remove-get-static-props/package.json +++ b/codemods/next/13/remove-get-static-props/package.json @@ -8,7 +8,7 @@ "typescript": "^5.2.2", "esbuild": "0.19.5", "ts-node": "^10.9.1", - "@intuita-inc/filemod": "1.1.0", + "@intuita-inc/filemod": "2.0.0", "memfs": "^4.6.0", "ts-morph": "^19.0.0", "jscodeshift": "0.14.0", diff --git a/codemods/next/13/remove-get-static-props/test/test.ts b/codemods/next/13/remove-get-static-props/test/test.ts index dd1c3445..1e7ddfe6 100644 --- a/codemods/next/13/remove-get-static-props/test/test.ts +++ b/codemods/next/13/remove-get-static-props/test/test.ts @@ -1,15 +1,14 @@ -import { - FileSystemManager, - UnifiedFileSystem, - buildApi, - executeFilemod, -} from '@intuita-inc/filemod'; +import { buildApi, executeFilemod } from '@intuita-inc/filemod'; import { describe, it } from 'vitest'; import jscodeshift from 'jscodeshift'; import { DirectoryJSON, Volume, createFsFromVolume } from 'memfs'; import { repomod } from '../src/index.js'; import assert, { deepStrictEqual } from 'node:assert'; import { transform as jscodeshiftTransform } from '../src/index.js'; +import { + buildUnifiedFileSystem, + buildPathAPI, +} from '@codemod-registry/utilities'; const globalOptions = { buildLegacyCtxUtilAbsolutePath: '/opt/project/hooks/buildLegacyCtx.tsx', @@ -18,25 +17,20 @@ const globalOptions = { const transform = async (json: DirectoryJSON) => { const volume = Volume.fromJSON(json); - const fileSystemManager = new FileSystemManager( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - volume.promises.readdir as any, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - volume.promises.readFile as any, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - volume.promises.stat as any, - ); - const unifiedFileSystem = new UnifiedFileSystem( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - createFsFromVolume(volume) as any, - fileSystemManager, - ); + const fs = createFsFromVolume(volume); + + const unifiedFileSystem = buildUnifiedFileSystem(fs); + const pathApi = buildPathAPI('/'); const api = buildApi<{ jscodeshift: typeof jscodeshift; - }>(unifiedFileSystem, () => ({ - jscodeshift, - })); + }>( + unifiedFileSystem, + () => ({ + jscodeshift, + }), + pathApi, + ); return executeFilemod(api, repomod, '/', globalOptions, {}); }; @@ -55,12 +49,9 @@ describe('next 13 remove-get-static-props', function () { `; const [upsertBuildLegacyCtxUtilCommand, upsertFileCommand] = - await transform( - { - '/opt/project/pages/a.tsx': A_CONTENT, - }, - {}, - ); + await transform({ + '/opt/project/pages/a.tsx': A_CONTENT, + }); const expectedResult = ` import { buildLegacyCtx } from "/opt/project/hooks/buildLegacyCtx.tsx"; diff --git a/codemods/next/13/remove-next-export/package.json b/codemods/next/13/remove-next-export/package.json index 6e1ddf7a..d67189ec 100644 --- a/codemods/next/13/remove-next-export/package.json +++ b/codemods/next/13/remove-next-export/package.json @@ -8,7 +8,7 @@ "typescript": "^5.2.2", "esbuild": "0.19.5", "ts-node": "^10.9.1", - "@intuita-inc/filemod": "1.1.0", + "@intuita-inc/filemod": "2.0.0", "memfs": "^4.6.0", "ts-morph": "^19.0.0", "jscodeshift": "^0.15.1", diff --git a/codemods/next/13/remove-next-export/test/test.ts b/codemods/next/13/remove-next-export/test/test.ts index 4c4b3c97..d41da835 100644 --- a/codemods/next/13/remove-next-export/test/test.ts +++ b/codemods/next/13/remove-next-export/test/test.ts @@ -1,14 +1,13 @@ -import { - FileSystemManager, - UnifiedFileSystem, - buildApi, - executeFilemod, -} from '@intuita-inc/filemod'; +import { buildApi, executeFilemod } from '@intuita-inc/filemod'; import { describe, it } from 'vitest'; import { Volume, createFsFromVolume } from 'memfs'; import tsmorph from 'ts-morph'; import { repomod } from '../src/index.js'; import { deepStrictEqual } from 'node:assert'; +import { + buildUnifiedFileSystem, + buildPathAPI, +} from '@codemod-registry/utilities'; const PACKAGE_JSON = JSON.stringify({ scripts: { @@ -52,15 +51,10 @@ const transform = async () => { '/opt/project/pages/next.config.js': NEXT_CONFIG_JSON, }); - const fileSystemManager = new FileSystemManager( - volume.promises.readdir as any, - volume.promises.readFile as any, - volume.promises.stat as any, - ); - const unifiedFileSystem = new UnifiedFileSystem( - createFsFromVolume(volume) as any, - fileSystemManager, - ); + const fs = createFsFromVolume(volume); + + const unifiedFileSystem = buildUnifiedFileSystem(fs); + const pathApi = buildPathAPI('/'); const api = buildApi<{ tsmorph: typeof tsmorph; @@ -69,7 +63,7 @@ const transform = async () => { () => ({ tsmorph, }), - '/', + pathApi, ); return executeFilemod(api, repomod, '/', {}, {}); diff --git a/codemods/next/13/replace-api-routes/package.json b/codemods/next/13/replace-api-routes/package.json index 1246c53d..0ced2a52 100644 --- a/codemods/next/13/replace-api-routes/package.json +++ b/codemods/next/13/replace-api-routes/package.json @@ -8,7 +8,7 @@ "typescript": "^5.2.2", "esbuild": "0.19.5", "ts-node": "^10.9.1", - "@intuita-inc/filemod": "1.1.0", + "@intuita-inc/filemod": "2.0.0", "memfs": "^4.6.0", "ts-morph": "^19.0.0", "jscodeshift": "^0.15.1", diff --git a/codemods/next/13/replace-api-routes/test/test.ts b/codemods/next/13/replace-api-routes/test/test.ts index 541793b5..6dc265b5 100644 --- a/codemods/next/13/replace-api-routes/test/test.ts +++ b/codemods/next/13/replace-api-routes/test/test.ts @@ -1,7 +1,6 @@ import { DirectoryJSON, Volume, createFsFromVolume } from 'memfs'; import { describe, it } from 'vitest'; import { - FileSystemManager, UnifiedFileSystem, buildApi, executeFilemod, @@ -9,22 +8,18 @@ import { import { repomod } from '../src/index.js'; import tsmorph from 'ts-morph'; import { deepStrictEqual } from 'node:assert'; +import { + buildUnifiedFileSystem, + buildPathAPI, +} from '@codemod-registry/utilities'; const transform = async (json: DirectoryJSON) => { const volume = Volume.fromJSON(json); - const fileSystemManager = new FileSystemManager( - volume.promises.readdir as any, - volume.promises.readFile as any, - volume.promises.stat as any, - ); - - const fileSystem = createFsFromVolume(volume) as any; + const fs = createFsFromVolume(volume); - const unifiedFileSystem = new UnifiedFileSystem( - fileSystem, - fileSystemManager, - ); + const unifiedFileSystem = buildUnifiedFileSystem(fs); + const pathApi = buildPathAPI('/'); const api = buildApi<{ tsmorph: typeof tsmorph; @@ -35,7 +30,7 @@ const transform = async (json: DirectoryJSON) => { tsmorph, unifiedFileSystem, }), - '/', + pathApi, ); return executeFilemod(api, repomod, '/', {}, {}); diff --git a/codemods/next/13/replace-next-head/package.json b/codemods/next/13/replace-next-head/package.json index 099b61dc..16827670 100644 --- a/codemods/next/13/replace-next-head/package.json +++ b/codemods/next/13/replace-next-head/package.json @@ -15,7 +15,7 @@ "typescript": "^5.2.2", "esbuild": "0.19.5", "ts-node": "^10.9.1", - "@intuita-inc/filemod": "1.1.0", + "@intuita-inc/filemod": "2.0.0", "memfs": "^4.6.0", "ts-morph": "^19.0.0", "jscodeshift": "^0.15.1", diff --git a/codemods/next/13/replace-next-head/test/test.ts b/codemods/next/13/replace-next-head/test/test.ts index a82e2189..5fc9c609 100644 --- a/codemods/next/13/replace-next-head/test/test.ts +++ b/codemods/next/13/replace-next-head/test/test.ts @@ -1,7 +1,6 @@ import { DirectoryJSON, Volume, createFsFromVolume } from 'memfs'; import { beforeEach, describe, it } from 'vitest'; import { - FileSystemManager, UnifiedFileSystem, buildApi, executeFilemod, @@ -19,22 +18,17 @@ import { mdxFromMarkdown, mdxToMarkdown } from 'mdast-util-mdx'; import { visit } from 'unist-util-visit'; import { filter } from 'unist-util-filter'; import { deepStrictEqual } from 'node:assert'; +import { + buildUnifiedFileSystem, + buildPathAPI, +} from '@codemod-registry/utilities'; const transform = async (json: DirectoryJSON) => { const volume = Volume.fromJSON(json); + const fs = createFsFromVolume(volume); - const fileSystemManager = new FileSystemManager( - volume.promises.readdir as any, - volume.promises.readFile as any, - volume.promises.stat as any, - ); - - const fileSystem = createFsFromVolume(volume) as any; - - const unifiedFileSystem = new UnifiedFileSystem( - fileSystem, - fileSystemManager, - ); + const unifiedFileSystem = buildUnifiedFileSystem(fs); + const pathApi = buildPathAPI('/'); const parseMdx = (data: string) => fromMarkdown(data, { @@ -64,7 +58,7 @@ const transform = async (json: DirectoryJSON) => { filterMdxAst: filter, unifiedFileSystem, }), - '/', + pathApi, ); return executeFilemod(api, repomod, '/', {}, {}); diff --git a/codemods/next/13/replace-use-search-params/package.json b/codemods/next/13/replace-use-search-params/package.json index 608c96ca..52ffff25 100644 --- a/codemods/next/13/replace-use-search-params/package.json +++ b/codemods/next/13/replace-use-search-params/package.json @@ -8,7 +8,7 @@ "typescript": "^5.2.2", "esbuild": "0.19.5", "ts-node": "^10.9.1", - "@intuita-inc/filemod": "1.1.0", + "@intuita-inc/filemod": "2.0.0", "memfs": "^4.6.0", "ts-morph": "^19.0.0", "jscodeshift": "^0.15.1", diff --git a/codemods/next/13/replace-use-search-params/test/test.ts b/codemods/next/13/replace-use-search-params/test/test.ts index ff34807e..83f095e6 100644 --- a/codemods/next/13/replace-use-search-params/test/test.ts +++ b/codemods/next/13/replace-use-search-params/test/test.ts @@ -1,14 +1,13 @@ -import { - FileSystemManager, - UnifiedFileSystem, - buildApi, - executeFilemod, -} from '@intuita-inc/filemod'; +import { buildApi, executeFilemod } from '@intuita-inc/filemod'; import { describe, it } from 'vitest'; import jscodeshift from 'jscodeshift'; import { DirectoryJSON, Volume, createFsFromVolume } from 'memfs'; import { repomod } from '../src/index.js'; import { deepStrictEqual } from 'node:assert'; +import { + buildPathAPI, + buildUnifiedFileSystem, +} from '@codemod-registry/utilities'; type Options = Readonly<{ hookModuleCreation?: boolean; @@ -16,20 +15,10 @@ type Options = Readonly<{ const transform = async (json: DirectoryJSON, options: Options) => { const volume = Volume.fromJSON(json); + const fs = createFsFromVolume(volume); - const fileSystemManager = new FileSystemManager( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - volume.promises.readdir as any, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - volume.promises.readFile as any, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - volume.promises.stat as any, - ); - const unifiedFileSystem = new UnifiedFileSystem( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - createFsFromVolume(volume) as any, - fileSystemManager, - ); + const unifiedFileSystem = buildUnifiedFileSystem(fs); + const pathApi = buildPathAPI('/opt/project'); const api = buildApi<{ jscodeshift: typeof jscodeshift; @@ -38,7 +27,7 @@ const transform = async (json: DirectoryJSON, options: Options) => { () => ({ jscodeshift, }), - '/opt/project', + pathApi, ); return executeFilemod( diff --git a/codemods/remove-unused-feature-flags-2/package.json b/codemods/remove-unused-feature-flags-2/package.json index bcb98780..aed3e8f0 100644 --- a/codemods/remove-unused-feature-flags-2/package.json +++ b/codemods/remove-unused-feature-flags-2/package.json @@ -8,7 +8,7 @@ "typescript": "^5.2.2", "esbuild": "0.19.5", "ts-node": "^10.9.1", - "@intuita-inc/filemod": "1.1.0", + "@intuita-inc/filemod": "2.0.0", "memfs": "^4.6.0", "ts-morph": "^19.0.0", "jscodeshift": "^0.15.1", diff --git a/codemods/remove-unused-feature-flags-2/test/test.ts b/codemods/remove-unused-feature-flags-2/test/test.ts index 06c49cfa..0020233e 100644 --- a/codemods/remove-unused-feature-flags-2/test/test.ts +++ b/codemods/remove-unused-feature-flags-2/test/test.ts @@ -1,27 +1,21 @@ -import { - FileSystemManager, - UnifiedFileSystem, - buildApi, - executeFilemod, -} from '@intuita-inc/filemod'; +import { buildApi, executeFilemod } from '@intuita-inc/filemod'; import { describe, it } from 'vitest'; import jscodeshift from 'jscodeshift'; import { DirectoryJSON, Volume, createFsFromVolume } from 'memfs'; import { repomod } from '../src/index.js'; import { deepStrictEqual } from 'node:assert'; +import { + buildUnifiedFileSystem, + buildPathAPI, +} from '@codemod-registry/utilities'; const transform = async (json: DirectoryJSON) => { const volume = Volume.fromJSON(json); - const fileSystemManager = new FileSystemManager( - volume.promises.readdir as any, - volume.promises.readFile as any, - volume.promises.stat as any, - ); - const unifiedFileSystem = new UnifiedFileSystem( - createFsFromVolume(volume) as any, - fileSystemManager, - ); + const fs = createFsFromVolume(volume); + + const unifiedFileSystem = buildUnifiedFileSystem(fs); + const pathApi = buildPathAPI('/'); const api = buildApi<{ jscodeshift: typeof jscodeshift; @@ -30,7 +24,7 @@ const transform = async (json: DirectoryJSON) => { () => ({ jscodeshift, }), - '/', + pathApi, ); return executeFilemod( diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0590d44b..92c0fa67 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -58,7 +58,7 @@ importers: dependencies: '@effect/schema': specifier: ^0.48.4 - version: 0.48.4(effect@2.0.0-next.55)(fast-check@3.14.0) + version: 0.48.4(effect@2.0.0-next.55)(fast-check@3.15.0) glob: specifier: ^10.3.10 version: 10.3.10 @@ -309,8 +309,8 @@ importers: specifier: workspace:* version: link:../../../utilities '@intuita-inc/filemod': - specifier: 1.1.0 - version: 1.1.0 + specifier: 2.0.0 + version: 2.0.0 '@types/jscodeshift': specifier: ^0.11.10 version: 0.11.10 @@ -325,7 +325,7 @@ importers: version: 0.15.1 memfs: specifier: ^4.6.0 - version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0) + version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.2) ts-morph: specifier: ^19.0.0 version: 19.0.0 @@ -351,8 +351,8 @@ importers: specifier: workspace:* version: link:../../../utilities '@intuita-inc/filemod': - specifier: 1.1.0 - version: 1.1.0 + specifier: 2.0.0 + version: 2.0.0 '@types/jscodeshift': specifier: ^0.11.10 version: 0.11.10 @@ -367,7 +367,7 @@ importers: version: 0.15.1 memfs: specifier: ^4.6.0 - version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0) + version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.2) ts-morph: specifier: ^19.0.0 version: 19.0.0 @@ -393,8 +393,8 @@ importers: specifier: workspace:* version: link:../../../utilities '@intuita-inc/filemod': - specifier: 1.1.0 - version: 1.1.0 + specifier: 2.0.0 + version: 2.0.0 '@types/jscodeshift': specifier: ^0.11.10 version: 0.11.10 @@ -409,7 +409,7 @@ importers: version: 0.15.1 memfs: specifier: ^4.6.0 - version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0) + version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.2) ts-morph: specifier: ^19.0.0 version: 19.0.0 @@ -996,8 +996,8 @@ importers: specifier: workspace:* version: link:../../utilities '@intuita-inc/filemod': - specifier: 1.1.0 - version: 1.1.0 + specifier: 2.0.0 + version: 2.0.0 '@types/jscodeshift': specifier: ^0.11.10 version: 0.11.10 @@ -1012,7 +1012,7 @@ importers: version: 0.15.1 memfs: specifier: ^4.6.0 - version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0) + version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.2) ts-morph: specifier: ^19.0.0 version: 19.0.0 @@ -1467,8 +1467,8 @@ importers: specifier: workspace:* version: link:../../../utilities '@intuita-inc/filemod': - specifier: 1.1.0 - version: 1.1.0 + specifier: 2.0.0 + version: 2.0.0 '@types/jscodeshift': specifier: ^0.11.10 version: 0.11.10 @@ -1483,7 +1483,7 @@ importers: version: 0.15.1 memfs: specifier: ^4.6.0 - version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0) + version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.2) ts-morph: specifier: ^19.0.0 version: 19.0.0 @@ -1546,8 +1546,8 @@ importers: specifier: workspace:* version: link:../../../../utilities '@intuita-inc/filemod': - specifier: 1.1.0 - version: 1.1.0 + specifier: 2.0.0 + version: 2.0.0 '@types/jscodeshift': specifier: ^0.11.10 version: 0.11.10 @@ -1562,7 +1562,7 @@ importers: version: 0.15.1 memfs: specifier: ^4.6.0 - version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0) + version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.2) ts-node: specifier: ^10.9.1 version: 10.9.1(@types/node@20.10.4)(typescript@5.2.2) @@ -2389,8 +2389,8 @@ importers: specifier: workspace:* version: link:../../../utilities '@intuita-inc/filemod': - specifier: 1.1.0 - version: 1.1.0 + specifier: 2.0.0 + version: 2.0.0 '@types/jscodeshift': specifier: ^0.11.10 version: 0.11.10 @@ -2405,7 +2405,7 @@ importers: version: 0.15.1 memfs: specifier: ^4.6.0 - version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0) + version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.2) ts-morph: specifier: ^19.0.0 version: 19.0.0 @@ -2431,8 +2431,8 @@ importers: specifier: workspace:* version: link:../../../../utilities '@intuita-inc/filemod': - specifier: 1.1.0 - version: 1.1.0 + specifier: 2.0.0 + version: 2.0.0 '@types/jscodeshift': specifier: ^0.11.10 version: 0.11.10 @@ -2447,7 +2447,7 @@ importers: version: 0.15.1 memfs: specifier: ^4.6.0 - version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0) + version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.2) ts-morph: specifier: ^19.0.0 version: 19.0.0 @@ -2489,8 +2489,8 @@ importers: specifier: workspace:* version: link:../../../../utilities '@intuita-inc/filemod': - specifier: 1.1.0 - version: 1.1.0 + specifier: 2.0.0 + version: 2.0.0 '@types/jscodeshift': specifier: ^0.11.10 version: 0.11.10 @@ -2505,7 +2505,7 @@ importers: version: 0.15.1 memfs: specifier: ^4.6.0 - version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0) + version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.2) ts-morph: specifier: ^19.0.0 version: 19.0.0 @@ -2735,8 +2735,8 @@ importers: specifier: workspace:* version: link:../../../../utilities '@intuita-inc/filemod': - specifier: 1.1.0 - version: 1.1.0 + specifier: 2.0.0 + version: 2.0.0 '@types/jscodeshift': specifier: ^0.11.10 version: 0.11.10 @@ -2748,10 +2748,10 @@ importers: version: 0.19.5 jscodeshift: specifier: 0.14.0 - version: 0.14.0(@babel/preset-env@7.23.3) + version: 0.14.0(@babel/preset-env@7.23.8) memfs: specifier: ^4.6.0 - version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0) + version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.2) ts-morph: specifier: ^19.0.0 version: 19.0.0 @@ -2777,8 +2777,8 @@ importers: specifier: workspace:* version: link:../../../../utilities '@intuita-inc/filemod': - specifier: 1.1.0 - version: 1.1.0 + specifier: 2.0.0 + version: 2.0.0 '@types/jscodeshift': specifier: ^0.11.10 version: 0.11.10 @@ -2793,7 +2793,7 @@ importers: version: 0.15.1 memfs: specifier: ^4.6.0 - version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0) + version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.2) ts-morph: specifier: ^19.0.0 version: 19.0.0 @@ -2819,8 +2819,8 @@ importers: specifier: workspace:* version: link:../../../../utilities '@intuita-inc/filemod': - specifier: 1.1.0 - version: 1.1.0 + specifier: 2.0.0 + version: 2.0.0 '@types/jscodeshift': specifier: ^0.11.10 version: 0.11.10 @@ -2835,7 +2835,7 @@ importers: version: 0.15.1 memfs: specifier: ^4.6.0 - version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0) + version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.2) ts-morph: specifier: ^19.0.0 version: 19.0.0 @@ -2880,8 +2880,8 @@ importers: specifier: workspace:* version: link:../../../../utilities '@intuita-inc/filemod': - specifier: 1.1.0 - version: 1.1.0 + specifier: 2.0.0 + version: 2.0.0 '@types/jscodeshift': specifier: ^0.11.10 version: 0.11.10 @@ -2896,7 +2896,7 @@ importers: version: 0.15.1 memfs: specifier: ^4.6.0 - version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0) + version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.2) ts-morph: specifier: ^19.0.0 version: 19.0.0 @@ -2952,8 +2952,8 @@ importers: specifier: workspace:* version: link:../../../../utilities '@intuita-inc/filemod': - specifier: 1.1.0 - version: 1.1.0 + specifier: 2.0.0 + version: 2.0.0 '@types/jscodeshift': specifier: ^0.11.10 version: 0.11.10 @@ -2968,7 +2968,7 @@ importers: version: 0.15.1 memfs: specifier: ^4.6.0 - version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0) + version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.2) ts-morph: specifier: ^19.0.0 version: 19.0.0 @@ -4113,8 +4113,8 @@ importers: specifier: workspace:* version: link:../../utilities '@intuita-inc/filemod': - specifier: 1.1.0 - version: 1.1.0 + specifier: 2.0.0 + version: 2.0.0 '@types/jscodeshift': specifier: ^0.11.10 version: 0.11.10 @@ -4129,7 +4129,7 @@ importers: version: 0.15.1 memfs: specifier: ^4.6.0 - version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0) + version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.2) ts-morph: specifier: ^19.0.0 version: 19.0.0 @@ -4147,7 +4147,7 @@ importers: dependencies: '@effect/schema': specifier: 0.49.4 - version: 0.49.4(effect@2.0.0-next.56)(fast-check@3.14.0) + version: 0.49.4(effect@2.0.0-next.56)(fast-check@3.15.0) js-yaml: specifier: 4.1.0 version: 4.1.0 @@ -4218,6 +4218,12 @@ importers: utilities: dependencies: + '@intuita-inc/filemod': + specifier: 2.0.0 + version: 2.0.0 + glob: + specifier: 10.3.10 + version: 10.3.10 jscodeshift: specifier: ^0.15.1 version: 0.15.1 @@ -4228,6 +4234,9 @@ importers: '@types/jscodeshift': specifier: ^0.11.10 version: 0.11.10 + memfs: + specifier: 4.6.0 + version: 4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.2) packages: @@ -4254,6 +4263,11 @@ packages: resolution: {integrity: sha512-BmR4bWbDIoFJmJ9z2cZ8Gmm2MXgEDgjdWgpKmKWUt54UGFJdlj31ECtbaDvCG/qVdG3AQ1SfpZEs01lUFbzLOQ==} engines: {node: '>=6.9.0'} + /@babel/compat-data@7.23.5: + resolution: {integrity: sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/core@7.23.3: resolution: {integrity: sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==} engines: {node: '>=6.9.0'} @@ -4295,7 +4309,7 @@ packages: resolution: {integrity: sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.4 + '@babel/types': 7.23.6 dev: true /@babel/helper-compilation-targets@7.22.15: @@ -4308,6 +4322,17 @@ packages: lru-cache: 5.1.1 semver: 6.3.1 + /@babel/helper-compilation-targets@7.23.6: + resolution: {integrity: sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/compat-data': 7.23.5 + '@babel/helper-validator-option': 7.23.5 + browserslist: 4.22.2 + lru-cache: 5.1.1 + semver: 6.3.1 + dev: true + /@babel/helper-create-class-features-plugin@7.22.15(@babel/core@7.23.3): resolution: {integrity: sha512-jKkwA59IXcvSaiK2UN45kKwSC9o+KuoXsBDvHvU/7BecYIp8GQ2UwrVvFgJASUT+hBnwJx6MhvMCuMzwZZ7jlg==} engines: {node: '>=6.9.0'} @@ -4325,6 +4350,24 @@ packages: '@babel/helper-split-export-declaration': 7.22.6 semver: 6.3.1 + /@babel/helper-create-class-features-plugin@7.23.7(@babel/core@7.23.3): + resolution: {integrity: sha512-xCoqR/8+BoNnXOY7RVSgv6X+o7pmT5q1d+gGcRlXYkI+9B31glE4jeejhKVpA04O1AtzOt7OSQ6VYKP5FcRl9g==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.23.3 + '@babel/helper-annotate-as-pure': 7.22.5 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-function-name': 7.23.0 + '@babel/helper-member-expression-to-functions': 7.23.0 + '@babel/helper-optimise-call-expression': 7.22.5 + '@babel/helper-replace-supers': 7.22.20(@babel/core@7.23.3) + '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + semver: 6.3.1 + dev: true + /@babel/helper-create-regexp-features-plugin@7.22.15(@babel/core@7.23.3): resolution: {integrity: sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w==} engines: {node: '>=6.9.0'} @@ -4337,13 +4380,13 @@ packages: semver: 6.3.1 dev: true - /@babel/helper-define-polyfill-provider@0.4.3(@babel/core@7.23.3): - resolution: {integrity: sha512-WBrLmuPP47n7PNwsZ57pqam6G/RGo1vw/87b0Blc53tZNGZ4x7YvZ6HgQe2vo1W/FR20OgjeZuGXzudPiXHFug==} + /@babel/helper-define-polyfill-provider@0.4.4(@babel/core@7.23.3): + resolution: {integrity: sha512-QcJMILQCu2jm5TFPGA3lCpJJTeEP+mqeXooG/NZbg/h5FTFi6V0+99ahlRsW8/kRLyb24LZVCCiclDedhLKcBA==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: '@babel/core': 7.23.3 - '@babel/helper-compilation-targets': 7.22.15 + '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-plugin-utils': 7.22.5 debug: 4.3.4 lodash.debounce: 4.0.8 @@ -4457,13 +4500,18 @@ packages: resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} engines: {node: '>=6.9.0'} + /@babel/helper-validator-option@7.23.5: + resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/helper-wrap-function@7.22.20: resolution: {integrity: sha512-pms/UwkOpnQe/PDAEdV/d7dVCoBbB+R4FvYoHGZz+4VPcg7RtYy2KP7S2lbuWM6FCSgob5wshfGESbC/hzNXZw==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-function-name': 7.23.0 '@babel/template': 7.22.15 - '@babel/types': 7.23.4 + '@babel/types': 7.23.6 dev: true /@babel/helpers@7.23.4: @@ -4513,8 +4561,8 @@ packages: '@babel/plugin-transform-optional-chaining': 7.23.4(@babel/core@7.23.3) dev: true - /@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.23.3(@babel/core@7.23.3): - resolution: {integrity: sha512-XaJak1qcityzrX0/IU5nKHb34VaibwP3saKqG6a/tppelgllOH13LUann4ZCIBcVOeE6H18K4Vx9QKkVww3z/w==} + /@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.23.7(@babel/core@7.23.3): + resolution: {integrity: sha512-LlRT7HgaifEpQA1ZgLVOIJZZFVPWN5iReq/7/JixwBtwcoeVGDBD53ZV28rrsLYOZs1Y/EHhA8N/Z6aazHR8cw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -4774,8 +4822,8 @@ packages: '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/plugin-transform-async-generator-functions@7.23.4(@babel/core@7.23.3): - resolution: {integrity: sha512-efdkfPhHYTtn0G6n2ddrESE91fgXxjlqLsnUtPWnJs4a4mZIbUaK7ffqKIIUKXSHwcDvaCVX6GXkaJJFqtX7jw==} + /@babel/plugin-transform-async-generator-functions@7.23.7(@babel/core@7.23.3): + resolution: {integrity: sha512-PdxEpL71bJp1byMG0va5gwQcXHxuEYC/BgI/e88mGTtohbZN28O5Yit0Plkkm/dBzCF/BxmbNcses1RH1T+urA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -4836,23 +4884,22 @@ packages: '@babel/core': ^7.12.0 dependencies: '@babel/core': 7.23.3 - '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.23.3) + '@babel/helper-create-class-features-plugin': 7.23.7(@babel/core@7.23.3) '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.23.3) dev: true - /@babel/plugin-transform-classes@7.23.3(@babel/core@7.23.3): - resolution: {integrity: sha512-FGEQmugvAEu2QtgtU0uTASXevfLMFfBeVCIIdcQhn/uBQsMTjBajdnAtanQlOcuihWh10PZ7+HWvc7NtBwP74w==} + /@babel/plugin-transform-classes@7.23.8(@babel/core@7.23.3): + resolution: {integrity: sha512-yAYslGsY1bX6Knmg46RjiCiNSwJKv2IUC8qOdYKqMMr0491SXFhcHqOdRDeCRohOOIzwN/90C6mQ9qAKgrP7dg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.3 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-compilation-targets': 7.22.15 + '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-function-name': 7.23.0 - '@babel/helper-optimise-call-expression': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-replace-supers': 7.22.20(@babel/core@7.23.3) '@babel/helper-split-export-declaration': 7.22.6 @@ -4944,14 +4991,15 @@ packages: '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-flow': 7.23.3(@babel/core@7.23.3) - /@babel/plugin-transform-for-of@7.23.3(@babel/core@7.23.3): - resolution: {integrity: sha512-X8jSm8X1CMwxmK878qsUGJRmbysKNbdpTv/O1/v0LuY/ZkZrng5WYiekYSdg9m09OTmDDUWeEDsTE+17WYbAZw==} + /@babel/plugin-transform-for-of@7.23.6(@babel/core@7.23.3): + resolution: {integrity: sha512-aYH4ytZ0qSuBbpfhuofbg/e96oQ7U2w1Aw/UQmKT+1l39uEhUPoFS3fHevDc1G0OvewyDudfMKY1OulczHzWIw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.3 '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 dev: true /@babel/plugin-transform-function-name@7.23.3(@babel/core@7.23.3): @@ -4961,7 +5009,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.3 - '@babel/helper-compilation-targets': 7.22.15 + '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-function-name': 7.23.0 '@babel/helper-plugin-utils': 7.22.5 dev: true @@ -5102,9 +5150,9 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/compat-data': 7.23.3 + '@babel/compat-data': 7.23.5 '@babel/core': 7.23.3 - '@babel/helper-compilation-targets': 7.22.15 + '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.23.3) '@babel/plugin-transform-parameters': 7.23.3(@babel/core@7.23.3) @@ -5171,7 +5219,7 @@ packages: dependencies: '@babel/core': 7.23.3 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.22.15(@babel/core@7.23.3) + '@babel/helper-create-class-features-plugin': 7.23.7(@babel/core@7.23.3) '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.23.3) dev: true @@ -5313,20 +5361,20 @@ packages: '@babel/helper-plugin-utils': 7.22.5 dev: true - /@babel/preset-env@7.23.3(@babel/core@7.23.3): - resolution: {integrity: sha512-ovzGc2uuyNfNAs/jyjIGxS8arOHS5FENZaNn4rtE7UdKMMkqHCvboHfcuhWLZNX5cB44QfcGNWjaevxMzzMf+Q==} + /@babel/preset-env@7.23.8(@babel/core@7.23.3): + resolution: {integrity: sha512-lFlpmkApLkEP6woIKprO6DO60RImpatTQKtz4sUcDjVcK8M8mQ4sZsuxaTMNOZf0sqAq/ReYW1ZBHnOQwKpLWA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/compat-data': 7.23.3 + '@babel/compat-data': 7.23.5 '@babel/core': 7.23.3 - '@babel/helper-compilation-targets': 7.22.15 + '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-validator-option': 7.22.15 + '@babel/helper-validator-option': 7.23.5 '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.23.3(@babel/core@7.23.3) '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.23.3(@babel/core@7.23.3) - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.23.3(@babel/core@7.23.3) + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.23.7(@babel/core@7.23.3) '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.23.3) '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.23.3) '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.23.3) @@ -5347,13 +5395,13 @@ packages: '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.23.3) '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.23.3) '@babel/plugin-transform-arrow-functions': 7.23.3(@babel/core@7.23.3) - '@babel/plugin-transform-async-generator-functions': 7.23.4(@babel/core@7.23.3) + '@babel/plugin-transform-async-generator-functions': 7.23.7(@babel/core@7.23.3) '@babel/plugin-transform-async-to-generator': 7.23.3(@babel/core@7.23.3) '@babel/plugin-transform-block-scoped-functions': 7.23.3(@babel/core@7.23.3) '@babel/plugin-transform-block-scoping': 7.23.4(@babel/core@7.23.3) '@babel/plugin-transform-class-properties': 7.23.3(@babel/core@7.23.3) '@babel/plugin-transform-class-static-block': 7.23.4(@babel/core@7.23.3) - '@babel/plugin-transform-classes': 7.23.3(@babel/core@7.23.3) + '@babel/plugin-transform-classes': 7.23.8(@babel/core@7.23.3) '@babel/plugin-transform-computed-properties': 7.23.3(@babel/core@7.23.3) '@babel/plugin-transform-destructuring': 7.23.3(@babel/core@7.23.3) '@babel/plugin-transform-dotall-regex': 7.23.3(@babel/core@7.23.3) @@ -5361,7 +5409,7 @@ packages: '@babel/plugin-transform-dynamic-import': 7.23.4(@babel/core@7.23.3) '@babel/plugin-transform-exponentiation-operator': 7.23.3(@babel/core@7.23.3) '@babel/plugin-transform-export-namespace-from': 7.23.4(@babel/core@7.23.3) - '@babel/plugin-transform-for-of': 7.23.3(@babel/core@7.23.3) + '@babel/plugin-transform-for-of': 7.23.6(@babel/core@7.23.3) '@babel/plugin-transform-function-name': 7.23.3(@babel/core@7.23.3) '@babel/plugin-transform-json-strings': 7.23.4(@babel/core@7.23.3) '@babel/plugin-transform-literals': 7.23.3(@babel/core@7.23.3) @@ -5395,10 +5443,10 @@ packages: '@babel/plugin-transform-unicode-regex': 7.23.3(@babel/core@7.23.3) '@babel/plugin-transform-unicode-sets-regex': 7.23.3(@babel/core@7.23.3) '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.23.3) - babel-plugin-polyfill-corejs2: 0.4.6(@babel/core@7.23.3) - babel-plugin-polyfill-corejs3: 0.8.6(@babel/core@7.23.3) - babel-plugin-polyfill-regenerator: 0.5.3(@babel/core@7.23.3) - core-js-compat: 3.33.3 + babel-plugin-polyfill-corejs2: 0.4.7(@babel/core@7.23.3) + babel-plugin-polyfill-corejs3: 0.8.7(@babel/core@7.23.3) + babel-plugin-polyfill-regenerator: 0.5.4(@babel/core@7.23.3) + core-js-compat: 3.35.0 semver: 6.3.1 transitivePeerDependencies: - supports-color @@ -5422,7 +5470,7 @@ packages: dependencies: '@babel/core': 7.23.3 '@babel/helper-plugin-utils': 7.22.5 - '@babel/types': 7.23.4 + '@babel/types': 7.23.6 esutils: 2.0.3 dev: true @@ -5456,11 +5504,11 @@ packages: resolution: {integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==} dev: true - /@babel/runtime@7.23.4: - resolution: {integrity: sha512-2Yv65nlWnWlSpe3fXEyX5i7fx5kIKo4Qbcj+hMO0odwaneFjfXw5fdum+4yL20O0QiaHpia0cYQ9xpNMqrBwHg==} + /@babel/runtime@7.23.8: + resolution: {integrity: sha512-Y7KbAP984rn1VGMbGqKmBLio9V7y5Je9GvU4rQPCPinCyNfUcToxIXl06d59URp/F3LwinvODxab5N/G6qggkw==} engines: {node: '>=6.9.0'} dependencies: - regenerator-runtime: 0.14.0 + regenerator-runtime: 0.14.1 dev: true /@babel/template@7.22.15: @@ -5496,6 +5544,15 @@ packages: '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 + /@babel/types@7.23.6: + resolution: {integrity: sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.23.4 + '@babel/helper-validator-identifier': 7.22.20 + to-fast-properties: 2.0.0 + dev: true + /@bcoe/v8-coverage@0.2.3: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true @@ -5507,24 +5564,24 @@ packages: '@jridgewell/trace-mapping': 0.3.9 dev: true - /@effect/schema@0.48.4(effect@2.0.0-next.55)(fast-check@3.14.0): + /@effect/schema@0.48.4(effect@2.0.0-next.55)(fast-check@3.15.0): resolution: {integrity: sha512-V+1eY8VvYuEZs+vU0JWPoh30gNdBtDnabOJrE2tNuoMKcw9LgjQFaPoVR4Jw7Swm0TmdfRHuIkhWjK4i7XyGiA==} peerDependencies: effect: 2.0.0-next.55 fast-check: ^3.13.2 dependencies: effect: 2.0.0-next.55 - fast-check: 3.14.0 + fast-check: 3.15.0 dev: false - /@effect/schema@0.49.4(effect@2.0.0-next.56)(fast-check@3.14.0): + /@effect/schema@0.49.4(effect@2.0.0-next.56)(fast-check@3.15.0): resolution: {integrity: sha512-Em5qFV7kXfHpt6n89B2Zwd0ccGgfFpZbBAfQuGPdw/zY18k01Tl3ufKfBA6fFphKQiWrU6JS9btTlq1+/WRRIg==} peerDependencies: effect: 2.0.0-next.56 fast-check: ^3.13.2 dependencies: effect: 2.0.0-next.56 - fast-check: 3.14.0 + fast-check: 3.15.0 dev: false /@esbuild/aix-ppc64@0.19.10: @@ -6187,11 +6244,8 @@ packages: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} dev: true - /@intuita-inc/filemod@1.1.0: - resolution: {integrity: sha512-X3cahch1BBSHr08vFCvf6zDIxyfabYI3xrGs2Cmdzj45UzYNMwmLjohqkJNeyYLBmVcHDIzW9PDKyiOUfWAa+w==} - dependencies: - glob: 10.3.10 - dev: true + /@intuita-inc/filemod@2.0.0: + resolution: {integrity: sha512-fGFJ5gfX2NQi2ugqEcxClCplj8jVPYO1YIvOJLNVv9vSb/mNvHkuT6HC//Q3knVe7I0KJ2LkxaUZDs//ElAelA==} /@isaacs/cliui@8.0.2: resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} @@ -6203,6 +6257,7 @@ packages: strip-ansi-cjs: /strip-ansi@6.0.1 wrap-ansi: 8.1.0 wrap-ansi-cjs: /wrap-ansi@7.0.0 + dev: false /@istanbuljs/schema@0.1.3: resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} @@ -6285,6 +6340,7 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} requiresBuild: true + dev: false optional: true /@pkgr/utils@2.4.2: @@ -6945,38 +7001,38 @@ packages: dependencies: '@babel/core': 7.23.3 - /babel-plugin-polyfill-corejs2@0.4.6(@babel/core@7.23.3): - resolution: {integrity: sha512-jhHiWVZIlnPbEUKSSNb9YoWcQGdlTLq7z1GHL4AjFxaoOUMuuEVJ+Y4pAaQUGOGk93YsVCKPbqbfw3m0SM6H8Q==} + /babel-plugin-polyfill-corejs2@0.4.7(@babel/core@7.23.3): + resolution: {integrity: sha512-LidDk/tEGDfuHW2DWh/Hgo4rmnw3cduK6ZkOI1NPFceSK3n/yAGeOsNT7FLnSGHkXj3RHGSEVkN3FsCTY6w2CQ==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/compat-data': 7.23.3 + '@babel/compat-data': 7.23.5 '@babel/core': 7.23.3 - '@babel/helper-define-polyfill-provider': 0.4.3(@babel/core@7.23.3) + '@babel/helper-define-polyfill-provider': 0.4.4(@babel/core@7.23.3) semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true - /babel-plugin-polyfill-corejs3@0.8.6(@babel/core@7.23.3): - resolution: {integrity: sha512-leDIc4l4tUgU7str5BWLS2h8q2N4Nf6lGZP6UrNDxdtfF2g69eJ5L0H7S8A5Ln/arfFAfHor5InAdZuIOwZdgQ==} + /babel-plugin-polyfill-corejs3@0.8.7(@babel/core@7.23.3): + resolution: {integrity: sha512-KyDvZYxAzkC0Aj2dAPyDzi2Ym15e5JKZSK+maI7NAwSqofvuFglbSsxE7wUOvTg9oFVnHMzVzBKcqEb4PJgtOA==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: '@babel/core': 7.23.3 - '@babel/helper-define-polyfill-provider': 0.4.3(@babel/core@7.23.3) - core-js-compat: 3.33.3 + '@babel/helper-define-polyfill-provider': 0.4.4(@babel/core@7.23.3) + core-js-compat: 3.35.0 transitivePeerDependencies: - supports-color dev: true - /babel-plugin-polyfill-regenerator@0.5.3(@babel/core@7.23.3): - resolution: {integrity: sha512-8sHeDOmXC8csczMrYEOf0UTNa4yE2SxV5JGeT/LP1n0OYVDUUFPxG9vdk2AlDlIit4t+Kf0xCtpgXPBwnn/9pw==} + /babel-plugin-polyfill-regenerator@0.5.4(@babel/core@7.23.3): + resolution: {integrity: sha512-S/x2iOCvDaCASLYsOOgWOq4bCfKYVqvO/uxjkaYyZ3rVsVE3CeAI/c84NpyuBBymEgNvHgjEot3a9/Z/kXvqsg==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: '@babel/core': 7.23.3 - '@babel/helper-define-polyfill-provider': 0.4.3(@babel/core@7.23.3) + '@babel/helper-define-polyfill-provider': 0.4.4(@babel/core@7.23.3) transitivePeerDependencies: - supports-color dev: true @@ -7023,6 +7079,17 @@ packages: node-releases: 2.0.13 update-browserslist-db: 1.0.13(browserslist@4.22.1) + /browserslist@4.22.2: + resolution: {integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001578 + electron-to-chromium: 1.4.634 + node-releases: 2.0.14 + update-browserslist-db: 1.0.13(browserslist@4.22.2) + dev: true + /buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} @@ -7052,6 +7119,10 @@ packages: /caniuse-lite@1.0.30001563: resolution: {integrity: sha512-na2WUmOxnwIZtwnFI2CZ/3er0wdNzU7hN+cPYz/z2ajHThnkWjNBOpEPP4n+4r2WPM847JaMotaJE3bnfzjyKw==} + /caniuse-lite@1.0.30001578: + resolution: {integrity: sha512-J/jkFgsQ3NEl4w2lCoM9ZPxrD+FoBNJ7uJUpGVjIg/j0OwJosWM36EPDv+Yyi0V4twBk9pPmlFS+PLykgEvUmg==} + dev: true + /ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} dev: false @@ -7187,10 +7258,10 @@ packages: /convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - /core-js-compat@3.33.3: - resolution: {integrity: sha512-cNzGqFsh3Ot+529GIXacjTJ7kegdt5fPXxCBVS1G0iaZpuo/tBz399ymceLJveQhFFZ8qThHiP3fzuoQjKN2ow==} + /core-js-compat@3.35.0: + resolution: {integrity: sha512-5blwFAddknKeNgsjBzilkdQ0+YK8L1PfqPYq40NOYMYFSS38qj+hpTcLLWwpIwA2A5bje/x5jmVn2tzUMg9IVw==} dependencies: - browserslist: 4.22.1 + browserslist: 4.22.2 dev: true /create-require@1.1.1: @@ -7324,8 +7395,13 @@ packages: /electron-to-chromium@1.4.589: resolution: {integrity: sha512-zF6y5v/YfoFIgwf2dDfAqVlPPsyQeWNpEWXbAlDUS8Ax4Z2VoiiZpAPC0Jm9hXEkJm2vIZpwB6rc4KnLTQffbQ==} + /electron-to-chromium@1.4.634: + resolution: {integrity: sha512-gQNahJfF5AE4MZo+pMSwmnwkzVZ+F4ZGGj4Z/MMddOXVQM0y9OHy6ts3W9SDzAJaiZM3p6eixn5ABCQ+AfXzcQ==} + dev: true + /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + dev: false /emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} @@ -7719,11 +7795,11 @@ packages: strip-final-newline: 3.0.0 dev: true - /fast-check@3.14.0: - resolution: {integrity: sha512-9Z0zqASzDNjXBox/ileV/fd+4P+V/f3o4shM6QawvcdLFh8yjPG4h5BrHUZ8yzY6amKGDTAmRMyb/JZqe+dCgw==} + /fast-check@3.15.0: + resolution: {integrity: sha512-iBz6c+EXL6+nI931x/sbZs1JYTZtLG6Cko0ouS8LRTikhDR7+wZk4TYzdRavlnByBs2G6+nuuJ7NYL9QplNt8Q==} engines: {node: '>=8.0.0'} dependencies: - pure-rand: 6.0.2 + pure-rand: 6.0.4 dev: false /fast-deep-equal@3.1.3: @@ -7821,6 +7897,7 @@ packages: dependencies: cross-spawn: 7.0.3 signal-exit: 4.0.2 + dev: false /fs-minipass@2.1.0: resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} @@ -7930,6 +8007,7 @@ packages: minimatch: 9.0.3 minipass: 6.0.2 path-scurry: 1.10.1 + dev: false /glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} @@ -8179,6 +8257,7 @@ packages: /is-fullwidth-code-point@3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} + dev: false /is-fullwidth-code-point@4.0.0: resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==} @@ -8356,6 +8435,7 @@ packages: '@isaacs/cliui': 8.0.2 optionalDependencies: '@pkgjs/parseargs': 0.11.0 + dev: false /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -8366,7 +8446,7 @@ packages: dependencies: argparse: 2.0.1 - /jscodeshift@0.14.0(@babel/preset-env@7.23.3): + /jscodeshift@0.14.0(@babel/preset-env@7.23.8): resolution: {integrity: sha512-7eCC1knD7bLUPuSCwXsMZUH51O8jIcoVyKtI6P0XM0IVzlGjckPy3FIwQlorzbN0Sg79oK+RlohN32Mqf/lrYA==} hasBin: true peerDependencies: @@ -8378,7 +8458,7 @@ packages: '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.23.3) '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.23.3) '@babel/plugin-transform-modules-commonjs': 7.23.3(@babel/core@7.23.3) - '@babel/preset-env': 7.23.3(@babel/core@7.23.3) + '@babel/preset-env': 7.23.8(@babel/core@7.23.3) '@babel/preset-flow': 7.23.3(@babel/core@7.23.3) '@babel/preset-typescript': 7.23.3(@babel/core@7.23.3) '@babel/register': 7.22.15(@babel/core@7.23.3) @@ -8438,7 +8518,7 @@ packages: engines: {node: '>=4'} hasBin: true - /json-joy@9.9.1(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0): + /json-joy@9.9.1(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.2): resolution: {integrity: sha512-/d7th2nbQRBQ/nqTkBe6KjjvDciSwn9UICmndwk3Ed/Bk9AqkTRm4PnLVfXG4DKbT0rEY0nKnwE7NqZlqKE6kg==} engines: {node: '>=10.0'} hasBin: true @@ -8451,7 +8531,7 @@ packages: hyperdyperid: 1.2.0 quill-delta: 5.1.0 rxjs: 7.8.1 - tslib: 2.6.0 + tslib: 2.6.2 dev: true /json-schema-traverse@0.4.1: @@ -8606,6 +8686,7 @@ packages: /lru-cache@10.0.0: resolution: {integrity: sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==} engines: {node: 14 || >=16.14} + dev: false /lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} @@ -8755,15 +8836,15 @@ packages: '@types/mdast': 4.0.3 dev: false - /memfs@4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0): + /memfs@4.6.0(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.2): resolution: {integrity: sha512-I6mhA1//KEZfKRQT9LujyW6lRbX7RkC24xKododIDO3AGShcaFAMKElv1yFGWX8fD4UaSiwasr3NeQ5TdtHY1A==} engines: {node: '>= 4.0.0'} peerDependencies: tslib: '2' dependencies: - json-joy: 9.9.1(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.0) - thingies: 1.13.1(tslib@2.6.0) - tslib: 2.6.0 + json-joy: 9.9.1(quill-delta@5.1.0)(rxjs@7.8.1)(tslib@2.6.2) + thingies: 1.13.1(tslib@2.6.2) + tslib: 2.6.2 transitivePeerDependencies: - quill-delta - rxjs @@ -9074,6 +9155,7 @@ packages: engines: {node: '>=16 || 14 >=14.17'} dependencies: brace-expansion: 2.0.1 + dev: false /minipass@3.3.6: resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} @@ -9095,6 +9177,7 @@ packages: /minipass@6.0.2: resolution: {integrity: sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==} engines: {node: '>=16 || 14 >=14.17'} + dev: false /minizlib@2.1.2: resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} @@ -9164,6 +9247,10 @@ packages: /node-releases@2.0.13: resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} + /node-releases@2.0.14: + resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} + dev: true + /npm-run-path@4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} @@ -9375,6 +9462,7 @@ packages: dependencies: lru-cache: 10.0.0 minipass: 6.0.2 + dev: false /path-to-regexp@1.8.0: resolution: {integrity: sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==} @@ -9479,8 +9567,8 @@ packages: engines: {node: '>=6'} dev: true - /pure-rand@6.0.2: - resolution: {integrity: sha512-6Yg0ekpKICSjPswYOuC5sku/TSWaRYlA0qsXqJgM/d/4pLPHPuTxK7Nbf7jFKzAeedUhR8C7K9Uv63FBsSo8xQ==} + /pure-rand@6.0.4: + resolution: {integrity: sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==} dev: false /queue-microtask@1.2.3: @@ -9545,14 +9633,14 @@ packages: resolution: {integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==} dev: true - /regenerator-runtime@0.14.0: - resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} + /regenerator-runtime@0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} dev: true /regenerator-transform@0.15.2: resolution: {integrity: sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==} dependencies: - '@babel/runtime': 7.23.4 + '@babel/runtime': 7.23.8 dev: true /regexp.prototype.flags@1.5.0: @@ -9682,7 +9770,7 @@ packages: /rxjs@7.8.1: resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} dependencies: - tslib: 2.6.0 + tslib: 2.6.2 dev: true /safe-array-concat@1.0.0: @@ -9753,6 +9841,7 @@ packages: /signal-exit@4.0.2: resolution: {integrity: sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==} engines: {node: '>=14'} + dev: false /signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} @@ -9829,6 +9918,7 @@ packages: emoji-regex: 8.0.0 is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 + dev: false /string-width@5.1.2: resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} @@ -9972,13 +10062,13 @@ packages: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true - /thingies@1.13.1(tslib@2.6.0): + /thingies@1.13.1(tslib@2.6.2): resolution: {integrity: sha512-hULXJ4FOE73gc5ZZ0n+HrR1XmqLhHDRrZW9XJHolylQZCGA1wh6FPCeU8Oz+BcY0NQ/EG5vXM9pIrS8v7mmdNw==} engines: {node: '>=10.18'} peerDependencies: tslib: ^2 dependencies: - tslib: 2.6.0 + tslib: 2.6.2 dev: true /tinybench@2.5.1: @@ -10122,6 +10212,10 @@ packages: /tslib@2.6.0: resolution: {integrity: sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==} + /tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + dev: true + /tsx@4.7.0: resolution: {integrity: sha512-I+t79RYPlEYlHn9a+KzwrvEwhJg35h/1zHsLC2JXvhC2mdynMv6Zxzvhv5EMV6VF5qJlLlkSnMVvdZV3PSIGcg==} engines: {node: '>=18.0.0'} @@ -10367,6 +10461,17 @@ packages: escalade: 3.1.1 picocolors: 1.0.0 + /update-browserslist-db@1.0.13(browserslist@4.22.2): + resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + dependencies: + browserslist: 4.22.2 + escalade: 3.1.1 + picocolors: 1.0.0 + dev: true + /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: @@ -10677,6 +10782,7 @@ packages: ansi-styles: 4.3.0 string-width: 4.2.3 strip-ansi: 6.0.1 + dev: false /wrap-ansi@8.1.0: resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} diff --git a/utilities/index.ts b/utilities/index.ts index 7c67531e..d6561fac 100644 --- a/utilities/index.ts +++ b/utilities/index.ts @@ -1,4 +1,15 @@ +import { type IFs } from 'memfs'; +import { + PathHashDigest, + UnifiedEntry, + GlobArguments, + PathAPI, + UnifiedFileSystem, +} from '@intuita-inc/filemod'; +import { FSOption, GlobOptionsWithFileTypesUnset, glob } from 'glob'; import jscodeshift, { API } from 'jscodeshift'; +import { createHash } from 'node:crypto'; +import { basename, dirname, join } from 'node:path'; export const buildApi = (parser: string | undefined): API => ({ j: parser ? jscodeshift.withParser(parser) : jscodeshift, @@ -14,3 +25,94 @@ export const buildApi = (parser: string | undefined): API => ({ ); }, }); + +export const buildPathHashDigest = (path: string) => + createHash('ripemd160').update(path).digest('base64url') as PathHashDigest; + +export const getUnifiedEntry = + (fileSystem: IFs) => + async (path: string): Promise => { + const stat = await fileSystem.promises.stat(path); + + if (stat.isDirectory()) { + return { + kind: 'directory', + path, + }; + } + + if (stat.isFile()) { + return { + kind: 'file', + path, + }; + } + + throw new Error(`The entry ${path} is neither a directory nor a file`); + }; + +export const buildGlobWrapper = + (fileSystem: IFs) => (globArguments: GlobArguments) => { + return glob(globArguments.includePatterns.slice(), { + absolute: true, + cwd: globArguments.currentWorkingDirectory, + ignore: globArguments.excludePatterns.slice(), + fs: fileSystem as unknown as FSOption, + } satisfies GlobOptionsWithFileTypesUnset); + }; + +export const buildReadDirectory = + (fileSystem: IFs) => + async (path: string): Promise> => { + const entries = await fileSystem.promises.readdir(path, { + withFileTypes: true, + }); + + return entries.map((entry) => { + if (typeof entry === 'string' || !('isDirectory' in entry)) { + throw new Error('Entry can neither be a string or a Buffer'); + } + + if (entry.isDirectory()) { + return { + kind: 'directory' as const, + path: join(path, entry.name.toString()), + }; + } + + if (entry.isFile()) { + return { + kind: 'file' as const, + path: join(path, entry.name.toString()), + }; + } + + throw new Error('The entry is neither directory not file'); + }); + }; + +export const buildReadFile = + (fileSystem: IFs) => + async (path: string): Promise => { + const data = await fileSystem.promises.readFile(path, { + encoding: 'utf8', + }); + + return data.toString(); + }; + +export const buildUnifiedFileSystem = (fileSystem: IFs) => + new UnifiedFileSystem( + buildPathHashDigest, + getUnifiedEntry(fileSystem), + buildGlobWrapper(fileSystem), + buildReadDirectory(fileSystem), + buildReadFile(fileSystem), + ); + +export const buildPathAPI = (currentWorkingDirectory: string): PathAPI => ({ + getDirname: (path) => dirname(path), + getBasename: (path) => basename(path), + joinPaths: (...paths) => join(...paths), + currentWorkingDirectory, +}); diff --git a/utilities/package.json b/utilities/package.json index a8102777..bc0a12ed 100644 --- a/utilities/package.json +++ b/utilities/package.json @@ -3,9 +3,12 @@ "type": "module", "devDependencies": { "@codemod-registry/tsconfig": "workspace:*", - "@types/jscodeshift": "^0.11.10" + "@types/jscodeshift": "^0.11.10", + "memfs": "4.6.0" }, "dependencies": { - "jscodeshift": "^0.15.1" + "jscodeshift": "^0.15.1", + "@intuita-inc/filemod": "2.0.0", + "glob": "10.3.10" } } From e1db10c961af3750f97fa22aeb4fae2857cb9c28 Mon Sep 17 00:00:00 2001 From: Greg Pabian <35925521+grzpab@users.noreply.github.com> Date: Wed, 17 Jan 2024 12:45:12 +0100 Subject: [PATCH 2/2] chore: replace ts-node with tsx for the builder package --- builder/package.json | 6 +++--- pnpm-lock.yaml | 37 +++---------------------------------- 2 files changed, 6 insertions(+), 37 deletions(-) diff --git a/builder/package.json b/builder/package.json index d4e33f3f..d5756eea 100644 --- a/builder/package.json +++ b/builder/package.json @@ -10,11 +10,11 @@ "@codemod-registry/tsconfig": "workspace:*", "@types/node": "^20.9.2", "@types/tar": "^6.1.9", - "ts-node": "^10.9.1", + "tsx": "^4.7.0", "typescript": "^5.2.2" }, "scripts": { - "build": "ts-node --esm ./index.ts", - "build:homedir": "ts-node --esm ./index.ts --homedir" + "build": "tsx ./index.ts", + "build:homedir": "tsx --esm ./index.ts --homedir" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 92c0fa67..fb4fcb60 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -75,9 +75,9 @@ importers: '@types/tar': specifier: ^6.1.9 version: 6.1.10 - ts-node: - specifier: ^10.9.1 - version: 10.9.1(@types/node@20.9.3)(typescript@5.2.2) + tsx: + specifier: ^4.7.0 + version: 4.7.0 typescript: specifier: ^5.2.2 version: 5.2.2 @@ -10178,37 +10178,6 @@ packages: yn: 3.1.1 dev: true - /ts-node@10.9.1(@types/node@20.9.3)(typescript@5.2.2): - resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} - hasBin: true - peerDependencies: - '@swc/core': '>=1.2.50' - '@swc/wasm': '>=1.2.50' - '@types/node': '*' - typescript: '>=2.7' - peerDependenciesMeta: - '@swc/core': - optional: true - '@swc/wasm': - optional: true - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.9 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 20.9.3 - acorn: 8.10.0 - acorn-walk: 8.3.1 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.2.2 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - dev: true - /tslib@2.6.0: resolution: {integrity: sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==}