diff --git a/.babelrc.json b/.babelrc.json index 22e6e87ea..fd2a00152 100644 --- a/.babelrc.json +++ b/.babelrc.json @@ -6,6 +6,7 @@ "targets": {"node": "12"}, "modules": "commonjs" } - ] + ], + "@babel/preset-typescript" ] } diff --git a/.swc/plugins/v7_macos_aarch64_0.104.38/02600c4b67347d0d4331e6578ece4f94d0272f398eebeb5c2a4ddd6fc2d74a65 b/.swc/plugins/v7_macos_aarch64_0.104.38/02600c4b67347d0d4331e6578ece4f94d0272f398eebeb5c2a4ddd6fc2d74a65 new file mode 100644 index 000000000..127727edd Binary files /dev/null and b/.swc/plugins/v7_macos_aarch64_0.104.38/02600c4b67347d0d4331e6578ece4f94d0272f398eebeb5c2a4ddd6fc2d74a65 differ diff --git a/package.json b/package.json index 260977c5c..cd2f1a015 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ }, "scripts": { "build": "run-p 'build:*'", - "build:source": "babel --source-maps --out-dir dist --ignore '**/__tests__/**','**/__mocks__/**' --copy-files --no-copy-ignored src", + "build:source": "babel --source-maps --extensions '.ts' --out-dir dist --ignore '**/__tests__/**','**/__mocks__/**' --copy-files --no-copy-ignored src", "build:types": "tsc -p src/", "ci-after-success": "node src ci-after-success", "commit": "node src commit", @@ -132,6 +132,7 @@ "@babel/cli": "^7.23.0", "@babel/core": "^7.23.2", "@babel/preset-env": "^7.23.2", + "@babel/preset-typescript": "^7.23.3", "@types/cross-spawn": "^6.0.4", "@types/lodash.merge": "^4", "depcheck": "^1.4.7", diff --git a/src/api/test.ts b/src/api/test.ts new file mode 100644 index 000000000..e47c5fda0 --- /dev/null +++ b/src/api/test.ts @@ -0,0 +1 @@ +export * from './test/index' \ No newline at end of file diff --git a/src/api/test/__tests__/__snapshots__/paths-to-module-name-mapper.ts.snap b/src/api/test/__tests__/__snapshots__/paths-to-module-name-mapper.ts.snap new file mode 100644 index 000000000..c0d20c8e4 --- /dev/null +++ b/src/api/test/__tests__/__snapshots__/paths-to-module-name-mapper.ts.snap @@ -0,0 +1,43 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`pathsToModuleNameMapper should convert tsconfig mapping with given prefix: / 1`] = ` +Object { + "^@foo\\\\-bar/common$": "/../common/dist/library", + "^@pkg/(.*)$": "/packages/$1", + "^api/(.*)$": "/src/api/$1", + "^client$": Array [ + "/src/client", + "/src/client/index", + ], + "^log$": "/src/utils/log", + "^mocks/(.*)$": "/test/mocks/$1", + "^server$": "/src/server", + "^test/(.*)$": "/test/$1", + "^test/(.*)/mock$": Array [ + "/test/mocks/$1", + "/test/__mocks__/$1", + ], + "^util/(.*)$": "/src/utils/$1", +} +`; + +exports[`pathsToModuleNameMapper should convert tsconfig mapping with given prefix: foo 1`] = ` +Object { + "^@foo\\\\-bar/common$": "foo/../common/dist/library", + "^@pkg/(.*)$": "foo/packages/$1", + "^api/(.*)$": "foo/src/api/$1", + "^client$": Array [ + "foo/src/client", + "foo/src/client/index", + ], + "^log$": "foo/src/utils/log", + "^mocks/(.*)$": "foo/test/mocks/$1", + "^server$": "foo/src/server", + "^test/(.*)$": "foo/test/$1", + "^test/(.*)/mock$": Array [ + "foo/test/mocks/$1", + "foo/test/__mocks__/$1", + ], + "^util/(.*)$": "foo/src/utils/$1", +} +`; diff --git a/src/api/test/__tests__/paths-to-module-name-mapper.ts b/src/api/test/__tests__/paths-to-module-name-mapper.ts new file mode 100644 index 000000000..64effd796 --- /dev/null +++ b/src/api/test/__tests__/paths-to-module-name-mapper.ts @@ -0,0 +1,104 @@ +import {pathsToModuleNameMapper} from '../paths-to-module-name-mapper' + +const tsconfigMap = { + log: ['src/utils/log'], + server: ['src/server'], + client: ['src/client', 'src/client/index'], + 'util/*': ['src/utils/*'], + 'api/*': ['src/api/*'], + 'test/*': ['test/*'], + 'mocks/*': ['test/mocks/*'], + 'test/*/mock': ['test/mocks/*', 'test/__mocks__/*'], + '@foo-bar/common': ['../common/dist/library'], + '@pkg/*': ['./packages/*'], +} + +describe('pathsToModuleNameMapper', () => { + test('should convert tsconfig mapping with no given prefix', () => { + expect(pathsToModuleNameMapper(tsconfigMap)).toMatchInlineSnapshot(` + Object { + "^@foo\\\\-bar/common$": "../common/dist/library", + "^@pkg/(.*)$": "./packages/$1", + "^api/(.*)$": "src/api/$1", + "^client$": Array [ + "src/client", + "src/client/index", + ], + "^log$": "src/utils/log", + "^mocks/(.*)$": "test/mocks/$1", + "^server$": "src/server", + "^test/(.*)$": "test/$1", + "^test/(.*)/mock$": Array [ + "test/mocks/$1", + "test/__mocks__/$1", + ], + "^util/(.*)$": "src/utils/$1", + } + `) + }) + + test('should add `js` extension to resolved config with useESM: true', () => { + expect(pathsToModuleNameMapper(tsconfigMap, {useESM: true})).toEqual({ + /** + * Why not using snapshot here? + * Because the snapshot does not keep the property order, which is important for jest. + * A pattern ending with `\\.js` should appear before another pattern without the extension does. + */ + '^log$': 'src/utils/log', + '^server$': 'src/server', + '^client$': ['src/client', 'src/client/index'], + '^util/(.*)\\.js$': 'src/utils/$1', + '^util/(.*)$': 'src/utils/$1', + '^api/(.*)\\.js$': 'src/api/$1', + '^api/(.*)$': 'src/api/$1', + '^test/(.*)\\.js$': 'test/$1', + '^test/(.*)$': 'test/$1', + '^mocks/(.*)\\.js$': 'test/mocks/$1', + '^mocks/(.*)$': 'test/mocks/$1', + '^test/(.*)/mock\\.js$': ['test/mocks/$1', 'test/__mocks__/$1'], + '^test/(.*)/mock$': ['test/mocks/$1', 'test/__mocks__/$1'], + '^@foo\\-bar/common$': '../common/dist/library', + '^@pkg/(.*)\\.js$': './packages/$1', + '^@pkg/(.*)$': './packages/$1', + '^(\\.{1,2}/.*)\\.js$': '$1', + }) + }) + + test.each(['/', 'foo'])( + 'should convert tsconfig mapping with given prefix', + prefix => { + expect(pathsToModuleNameMapper(tsconfigMap, {prefix})).toMatchSnapshot( + prefix, + ) + }, + ) + + describe('warnings', () => { + beforeEach(() => { + jest.spyOn(console, 'warn').mockImplementation() + }) + + afterEach(() => jest.mocked(console.warn).mockRestore()) + + test('should warn about mapping it cannot handle', () => { + expect( + pathsToModuleNameMapper({ + kept: ['src/kept'], + 'no-target': [], + 'too/*/many/*/stars': ['to/*/many/*/stars'], + }), + ).toMatchInlineSnapshot(` + Object { + "^kept$": "src/kept", + } + `) + + expect(jest.mocked(console.warn)).toHaveBeenCalledWith( + 'Not mapping "no-target" because it has no target.', + ) + expect(jest.mocked(console.warn)).toHaveBeenCalledWith( + 'Not mapping "too/*/many/*/stars" because it has more than one star (`*`).', + ) + }) + }) +}) diff --git a/src/api/test/index.ts b/src/api/test/index.ts new file mode 100644 index 000000000..a1dca9f33 --- /dev/null +++ b/src/api/test/index.ts @@ -0,0 +1 @@ +export {pathsToModuleNameMapper} from './paths-to-module-name-mapper' diff --git a/src/api/test/paths-to-module-name-mapper.ts b/src/api/test/paths-to-module-name-mapper.ts new file mode 100644 index 000000000..8f6b6638e --- /dev/null +++ b/src/api/test/paths-to-module-name-mapper.ts @@ -0,0 +1,76 @@ +/** + * NOTE: this was copy pasta'ed from `ts-jest` so that we can support path + * aliases in `tsconfig.json` without necessarily relying on `ts-jest` + * + * @see {@link https://github.com/kulshekhar/ts-jest/blob/dd3523cb7571714f06f1ea2ed1e3cf11970fbfce/src/config/paths-to-module-name-mapper.ts} + */ + +import type {Config} from '@jest/types' +import type {CompilerOptions} from 'typescript' + +type TsPathMapping = Exclude +type JestPathMapping = Config.InitialOptions['moduleNameMapper'] + +// we don't need to escape all chars, so commented out is the real one +// const escapeRegex = (str: string) => str.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&') +const escapeRegex = (str: string) => str.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&') + +export const pathsToModuleNameMapper = ( + mapping: TsPathMapping, + {prefix = '', useESM = false}: {prefix?: string; useESM?: boolean} = {}, +): JestPathMapping => { + const jestMap: JestPathMapping = {} + for (const fromPath of Object.keys(mapping)) { + const toPaths = mapping[fromPath] + // check that we have only one target path + if (toPaths.length === 0) { + console.warn(`Not mapping "${fromPath}" because it has no target.`) + + continue + } + + // split with '*' + const segments = fromPath.split(/\*/g) + if (segments.length === 1) { + const paths = toPaths.map(target => { + const enrichedPrefix = + prefix !== '' && !prefix.endsWith('/') ? `${prefix}/` : prefix + + return `${enrichedPrefix}${target}` + }) + const cjsPattern = `^${escapeRegex(fromPath)}$` + jestMap[cjsPattern] = paths.length === 1 ? paths[0] : paths + } else if (segments.length === 2) { + const paths = toPaths.map(target => { + const enrichedTarget = + target.startsWith('./') && prefix !== '' + ? target.substring(target.indexOf('/') + 1) + : target + const enrichedPrefix = + prefix !== '' && !prefix.endsWith('/') ? `${prefix}/` : prefix + + return `${enrichedPrefix}${enrichedTarget.replace(/\*/g, '$1')}` + }) + if (useESM) { + const esmPattern = `^${escapeRegex(segments[0])}(.*)${escapeRegex( + segments[1], + )}\\.js$` + jestMap[esmPattern] = paths.length === 1 ? paths[0] : paths + } + const cjsPattern = `^${escapeRegex(segments[0])}(.*)${escapeRegex( + segments[1], + )}$` + jestMap[cjsPattern] = paths.length === 1 ? paths[0] : paths + } else { + console.warn( + `Not mapping "${fromPath}" because it has more than one star (\`*\`).`, + ) + } + } + + if (useESM) { + jestMap['^(\\.{1,2}/.*)\\.js$'] = '$1' + } + + return jestMap +} diff --git a/yarn.lock b/yarn.lock index 564b24b67..7288fdb64 100644 --- a/yarn.lock +++ b/yarn.lock @@ -304,6 +304,25 @@ __metadata: languageName: node linkType: hard +"@babel/helper-create-class-features-plugin@npm:^7.23.6": + version: 7.23.7 + resolution: "@babel/helper-create-class-features-plugin@npm:7.23.7" + dependencies: + "@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/helper-skip-transparent-expression-wrappers": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 + semver: ^6.3.1 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 33e60714b856c3816a7965d4c76278cc8f430644a2dfc4eeafad2f7167c4fbd2becdb74cbfeb04b02efd6bbd07176ef53c6683262b588e65d378438e9c55c26b + languageName: node + linkType: hard + "@babel/helper-create-regexp-features-plugin@npm:^7.18.6": version: 7.20.5 resolution: "@babel/helper-create-regexp-features-plugin@npm:7.20.5" @@ -431,6 +450,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-member-expression-to-functions@npm:^7.23.0": + version: 7.23.0 + resolution: "@babel/helper-member-expression-to-functions@npm:7.23.0" + dependencies: + "@babel/types": ^7.23.0 + checksum: 494659361370c979ada711ca685e2efe9460683c36db1b283b446122596602c901e291e09f2f980ecedfe6e0f2bd5386cb59768285446530df10c14df1024e75 + languageName: node + linkType: hard + "@babel/helper-module-imports@npm:^7.18.6": version: 7.18.6 resolution: "@babel/helper-module-imports@npm:7.18.6" @@ -504,6 +532,21 @@ __metadata: languageName: node linkType: hard +"@babel/helper-module-transforms@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/helper-module-transforms@npm:7.23.3" + dependencies: + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-module-imports": ^7.22.15 + "@babel/helper-simple-access": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 + "@babel/helper-validator-identifier": ^7.22.20 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 5d0895cfba0e16ae16f3aa92fee108517023ad89a855289c4eb1d46f7aef4519adf8e6f971e1d55ac20c5461610e17213f1144097a8f932e768a9132e2278d71 + languageName: node + linkType: hard + "@babel/helper-optimise-call-expression@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helper-optimise-call-expression@npm:7.22.5" @@ -553,6 +596,19 @@ __metadata: languageName: node linkType: hard +"@babel/helper-replace-supers@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-replace-supers@npm:7.22.20" + dependencies: + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-member-expression-to-functions": ^7.22.15 + "@babel/helper-optimise-call-expression": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: a0008332e24daedea2e9498733e3c39b389d6d4512637e000f96f62b797e702ee24a407ccbcd7a236a551590a38f31282829a8ef35c50a3c0457d88218cae639 + languageName: node + linkType: hard + "@babel/helper-replace-supers@npm:^7.22.5, @babel/helper-replace-supers@npm:^7.22.9": version: 7.22.9 resolution: "@babel/helper-replace-supers@npm:7.22.9" @@ -923,6 +979,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-syntax-jsx@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-syntax-jsx@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 89037694314a74e7f0e7a9c8d3793af5bf6b23d80950c29b360db1c66859d67f60711ea437e70ad6b5b4b29affe17eababda841b6c01107c2b638e0493bafb4e + languageName: node + linkType: hard + "@babel/plugin-syntax-jsx@npm:^7.7.2": version: 7.18.6 resolution: "@babel/plugin-syntax-jsx@npm:7.18.6" @@ -1022,6 +1089,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-syntax-typescript@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-syntax-typescript@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: abfad3a19290d258b028e285a1f34c9b8a0cbe46ef79eafed4ed7ffce11b5d0720b5e536c82f91cbd8442cde35a3dd8e861fa70366d87ff06fdc0d4756e30876 + languageName: node + linkType: hard + "@babel/plugin-syntax-typescript@npm:^7.7.2": version: 7.12.13 resolution: "@babel/plugin-syntax-typescript@npm:7.12.13" @@ -1326,6 +1404,19 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-modules-commonjs@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/plugin-transform-modules-commonjs@npm:7.23.3" + dependencies: + "@babel/helper-module-transforms": ^7.23.3 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-simple-access": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 720a231ceade4ae4d2632478db4e7fecf21987d444942b72d523487ac8d715ca97de6c8f415c71e939595e1a4776403e7dc24ed68fe9125ad4acf57753c9bff7 + languageName: node + linkType: hard + "@babel/plugin-transform-modules-systemjs@npm:^7.23.0": version: 7.23.0 resolution: "@babel/plugin-transform-modules-systemjs@npm:7.23.0" @@ -1591,6 +1682,20 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-typescript@npm:^7.23.3": + version: 7.23.6 + resolution: "@babel/plugin-transform-typescript@npm:7.23.6" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-create-class-features-plugin": ^7.23.6 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-typescript": ^7.23.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 0462241843d14dff9f1a4c49ab182a6f01a5f7679957c786b08165dac3e8d49184011f05ca204183d164c54b9d3496d1b3005f904fa8708e394e6f15bf5548e6 + languageName: node + linkType: hard + "@babel/plugin-transform-unicode-escapes@npm:^7.22.10": version: 7.22.10 resolution: "@babel/plugin-transform-unicode-escapes@npm:7.22.10" @@ -1741,6 +1846,21 @@ __metadata: languageName: node linkType: hard +"@babel/preset-typescript@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/preset-typescript@npm:7.23.3" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-validator-option": ^7.22.15 + "@babel/plugin-syntax-jsx": ^7.23.3 + "@babel/plugin-transform-modules-commonjs": ^7.23.3 + "@babel/plugin-transform-typescript": ^7.23.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 105a2d39bbc464da0f7e1ad7f535c77c5f62d6b410219355b20e552e7d29933567a5c55339b5d0aec1a5c7a0a7dfdf1b54aae601a4fe15a157d54dcbfcb3e854 + languageName: node + linkType: hard + "@babel/regjsgen@npm:^0.8.0": version: 0.8.0 resolution: "@babel/regjsgen@npm:0.8.0" @@ -2214,12 +2334,13 @@ __metadata: "@babel/cli": ^7.23.0 "@babel/core": ^7.23.2 "@babel/preset-env": ^7.23.2 + "@babel/preset-typescript": ^7.23.3 "@commitlint/cli": ^17.8.1 "@commitlint/config-conventional": ^17.8.1 "@commitlint/prompt": ^17.8.1 "@swc-node/jest": ^1.5.6 - "@swc/core": ^1.3.38 - "@swc/helpers": ^0.4.14 + "@swc/core": ^1.3.102 + "@swc/helpers": ^0.5.3 "@types/cross-spawn": ^6.0.4 "@types/jest": ^29.5.4 "@types/lodash.has": ^4.5.8 @@ -2934,90 +3055,94 @@ __metadata: languageName: node linkType: hard -"@swc/core-darwin-arm64@npm:1.3.38": - version: 1.3.38 - resolution: "@swc/core-darwin-arm64@npm:1.3.38" +"@swc/core-darwin-arm64@npm:1.3.102": + version: 1.3.102 + resolution: "@swc/core-darwin-arm64@npm:1.3.102" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@swc/core-darwin-x64@npm:1.3.38": - version: 1.3.38 - resolution: "@swc/core-darwin-x64@npm:1.3.38" +"@swc/core-darwin-x64@npm:1.3.102": + version: 1.3.102 + resolution: "@swc/core-darwin-x64@npm:1.3.102" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@swc/core-linux-arm-gnueabihf@npm:1.3.38": - version: 1.3.38 - resolution: "@swc/core-linux-arm-gnueabihf@npm:1.3.38" +"@swc/core-linux-arm-gnueabihf@npm:1.3.102": + version: 1.3.102 + resolution: "@swc/core-linux-arm-gnueabihf@npm:1.3.102" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@swc/core-linux-arm64-gnu@npm:1.3.38": - version: 1.3.38 - resolution: "@swc/core-linux-arm64-gnu@npm:1.3.38" +"@swc/core-linux-arm64-gnu@npm:1.3.102": + version: 1.3.102 + resolution: "@swc/core-linux-arm64-gnu@npm:1.3.102" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@swc/core-linux-arm64-musl@npm:1.3.38": - version: 1.3.38 - resolution: "@swc/core-linux-arm64-musl@npm:1.3.38" +"@swc/core-linux-arm64-musl@npm:1.3.102": + version: 1.3.102 + resolution: "@swc/core-linux-arm64-musl@npm:1.3.102" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@swc/core-linux-x64-gnu@npm:1.3.38": - version: 1.3.38 - resolution: "@swc/core-linux-x64-gnu@npm:1.3.38" +"@swc/core-linux-x64-gnu@npm:1.3.102": + version: 1.3.102 + resolution: "@swc/core-linux-x64-gnu@npm:1.3.102" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@swc/core-linux-x64-musl@npm:1.3.38": - version: 1.3.38 - resolution: "@swc/core-linux-x64-musl@npm:1.3.38" +"@swc/core-linux-x64-musl@npm:1.3.102": + version: 1.3.102 + resolution: "@swc/core-linux-x64-musl@npm:1.3.102" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@swc/core-win32-arm64-msvc@npm:1.3.38": - version: 1.3.38 - resolution: "@swc/core-win32-arm64-msvc@npm:1.3.38" +"@swc/core-win32-arm64-msvc@npm:1.3.102": + version: 1.3.102 + resolution: "@swc/core-win32-arm64-msvc@npm:1.3.102" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@swc/core-win32-ia32-msvc@npm:1.3.38": - version: 1.3.38 - resolution: "@swc/core-win32-ia32-msvc@npm:1.3.38" +"@swc/core-win32-ia32-msvc@npm:1.3.102": + version: 1.3.102 + resolution: "@swc/core-win32-ia32-msvc@npm:1.3.102" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@swc/core-win32-x64-msvc@npm:1.3.38": - version: 1.3.38 - resolution: "@swc/core-win32-x64-msvc@npm:1.3.38" +"@swc/core-win32-x64-msvc@npm:1.3.102": + version: 1.3.102 + resolution: "@swc/core-win32-x64-msvc@npm:1.3.102" conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@swc/core@npm:^1.3.38": - version: 1.3.38 - resolution: "@swc/core@npm:1.3.38" +"@swc/core@npm:^1.3.102": + version: 1.3.102 + resolution: "@swc/core@npm:1.3.102" dependencies: - "@swc/core-darwin-arm64": 1.3.38 - "@swc/core-darwin-x64": 1.3.38 - "@swc/core-linux-arm-gnueabihf": 1.3.38 - "@swc/core-linux-arm64-gnu": 1.3.38 - "@swc/core-linux-arm64-musl": 1.3.38 - "@swc/core-linux-x64-gnu": 1.3.38 - "@swc/core-linux-x64-musl": 1.3.38 - "@swc/core-win32-arm64-msvc": 1.3.38 - "@swc/core-win32-ia32-msvc": 1.3.38 - "@swc/core-win32-x64-msvc": 1.3.38 + "@swc/core-darwin-arm64": 1.3.102 + "@swc/core-darwin-x64": 1.3.102 + "@swc/core-linux-arm-gnueabihf": 1.3.102 + "@swc/core-linux-arm64-gnu": 1.3.102 + "@swc/core-linux-arm64-musl": 1.3.102 + "@swc/core-linux-x64-gnu": 1.3.102 + "@swc/core-linux-x64-musl": 1.3.102 + "@swc/core-win32-arm64-msvc": 1.3.102 + "@swc/core-win32-ia32-msvc": 1.3.102 + "@swc/core-win32-x64-msvc": 1.3.102 + "@swc/counter": ^0.1.1 + "@swc/types": ^0.1.5 + peerDependencies: + "@swc/helpers": ^0.5.0 dependenciesMeta: "@swc/core-darwin-arm64": optional: true @@ -3039,16 +3164,33 @@ __metadata: optional: true "@swc/core-win32-x64-msvc": optional: true - checksum: c55d30e57638bcd21f788add8490c3f3e71bfe027aa5a8b153e1b1b9686ecddd6deeaaa6a6b17717c7eab4c1e2a232b465b6755b6c891506fc0d03139badfbf7 + peerDependenciesMeta: + "@swc/helpers": + optional: true + checksum: 45c0edb06f87a811e28fb3ed587fbe6b7ca67ff2440fe15666d43729788903a4af61e3b57842aecc0b2b70e3c9981b698d8233746ba94dfb5a19e1c62eea33ad languageName: node linkType: hard -"@swc/helpers@npm:^0.4.14": - version: 0.4.14 - resolution: "@swc/helpers@npm:0.4.14" +"@swc/counter@npm:^0.1.1": + version: 0.1.2 + resolution: "@swc/counter@npm:0.1.2" + checksum: 8427c594f1f0cf44b83885e9c8fe1e370c9db44ae96e07a37c117a6260ee97797d0709483efbcc244e77bac578690215f45b23254c4cd8a70fb25ddbb50bf33e + languageName: node + linkType: hard + +"@swc/helpers@npm:^0.5.3": + version: 0.5.3 + resolution: "@swc/helpers@npm:0.5.3" dependencies: tslib: ^2.4.0 - checksum: 273fd3f3fc461a92f3790cc551ea054745c6d6959afbe1232e6d7aa1c722bbc114d308aab96bef5c78fc0303c85c7b472ef00e2253251cc89737f3b1af56e5a5 + checksum: 61c3f7ccd47fc70ad91437df88be6b458cdc11e311cb331288827d7c50befffc72aa18fe913ec2a9e70fbf44e4b818bed38bfd7c329d689e1ff3c198d084cd02 + languageName: node + linkType: hard + +"@swc/types@npm:^0.1.5": + version: 0.1.5 + resolution: "@swc/types@npm:0.1.5" + checksum: 6aee11f62d3d805a64848e0bd5f0e0e615f958e327a9e1260056c368d7d28764d89e38bd8005a536c9bf18afbcd303edd84099d60df34a2975d62540f61df13b languageName: node linkType: hard