From 462566cc672411d93453ae0ba249902df8ea52e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Jakub=20Nani=C5=A1ta?= Date: Sun, 21 Jan 2024 10:10:04 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Use=20@swc/jest=20to=20speed=20u?= =?UTF-8?q?p=20test=20runs=20(#224)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/create-lz-oapp/jest.config.js | 4 +- packages/create-lz-oapp/package.json | 3 +- packages/devtools-evm-hardhat/jest.config.js | 4 +- packages/devtools-evm-hardhat/package.json | 3 +- packages/devtools-evm/jest.config.js | 4 +- packages/devtools-evm/package.json | 3 +- packages/devtools/jest.config.js | 4 +- packages/devtools/package.json | 3 +- packages/io-devtools/jest.config.js | 4 +- packages/io-devtools/package.json | 3 +- .../__snapshots__/filesystem.test.ts.snap | 8 +- .../test/filesystem/filesystem.test.ts | 4 +- .../stdio/__snapshots__/printer.test.ts.snap | 20 +- .../omnicounter-devtools-evm/jest.config.js | 4 +- .../omnicounter-devtools-evm/package.json | 3 +- packages/omnicounter-devtools/jest.config.js | 4 +- packages/omnicounter-devtools/package.json | 3 +- packages/protocol-devtools-evm/jest.config.js | 5 +- packages/protocol-devtools-evm/package.json | 3 +- packages/protocol-devtools/jest.config.js | 4 +- packages/protocol-devtools/package.json | 3 +- packages/toolbox-foundry/package.json | 3 +- packages/toolbox-hardhat/jest.config.js | 5 +- packages/toolbox-hardhat/package.json | 3 +- .../ua-devtools-evm-hardhat/jest.config.js | 4 +- packages/ua-devtools-evm-hardhat/package.json | 3 +- packages/ua-devtools-evm/jest.config.js | 4 +- packages/ua-devtools-evm/package.json | 3 +- packages/ua-devtools/jest.config.js | 4 +- packages/ua-devtools/package.json | 3 +- pnpm-lock.yaml | 419 ++++++++++++------ .../devtools-evm-hardhat-test/jest.config.js | 4 +- tests/devtools-evm-hardhat-test/package.json | 3 +- tests/devtools-evm-test/jest.config.js | 4 +- tests/devtools-evm-test/package.json | 3 +- .../jest.config.js | 4 +- .../ua-devtools-evm-hardhat-test/package.json | 3 +- 37 files changed, 379 insertions(+), 189 deletions(-) diff --git a/packages/create-lz-oapp/jest.config.js b/packages/create-lz-oapp/jest.config.js index 17ae5d1ac..b7bdeb7ab 100644 --- a/packages/create-lz-oapp/jest.config.js +++ b/packages/create-lz-oapp/jest.config.js @@ -1,9 +1,11 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - preset: 'ts-jest', testEnvironment: 'node', testTimeout: 15000, moduleNameMapper: { '^@/(.*)$': '/src/$1', }, + transform: { + '^.+\\.(t|j)sx?$': '@swc/jest', + }, }; diff --git a/packages/create-lz-oapp/package.json b/packages/create-lz-oapp/package.json index bd4e9425e..cd8adda9b 100644 --- a/packages/create-lz-oapp/package.json +++ b/packages/create-lz-oapp/package.json @@ -33,6 +33,8 @@ }, "devDependencies": { "@layerzerolabs/io-devtools": "~0.0.2", + "@swc/core": "^1.3.104", + "@swc/jest": "^0.2.30", "@types/jest": "^29.5.11", "@types/prompts": "^2.4.9", "@types/react": "^17.0.74", @@ -49,7 +51,6 @@ "prompts": "^2.4.2", "react": "^17.0.2", "tiged": "^2.12.5", - "ts-jest": "^29.1.1", "ts-node": "^10.9.2", "tsup": "~8.0.1", "typescript": "^5.3.3", diff --git a/packages/devtools-evm-hardhat/jest.config.js b/packages/devtools-evm-hardhat/jest.config.js index 4851c7ff2..9de065f61 100644 --- a/packages/devtools-evm-hardhat/jest.config.js +++ b/packages/devtools-evm-hardhat/jest.config.js @@ -1,9 +1,11 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - preset: 'ts-jest', cache: false, testEnvironment: 'node', moduleNameMapper: { '^@/(.*)$': '/src/$1', }, + transform: { + '^.+\\.(t|j)sx?$': '@swc/jest', + }, }; diff --git a/packages/devtools-evm-hardhat/package.json b/packages/devtools-evm-hardhat/package.json index 2f1bb4487..22123505b 100644 --- a/packages/devtools-evm-hardhat/package.json +++ b/packages/devtools-evm-hardhat/package.json @@ -53,6 +53,8 @@ "@layerzerolabs/lz-evm-sdk-v1": "~2.0.11", "@layerzerolabs/test-devtools": "~0.0.2", "@nomiclabs/hardhat-ethers": "^2.2.3", + "@swc/core": "^1.3.104", + "@swc/jest": "^0.2.30", "@types/jest": "^29.5.11", "fast-check": "^3.15.0", "hardhat": "^2.19.4", @@ -60,7 +62,6 @@ "jest": "^29.7.0", "p-memoize": "~4.0.1", "sinon": "^17.0.1", - "ts-jest": "^29.1.1", "ts-node": "^10.9.2", "tslib": "~2.6.2", "tsup": "~8.0.1", diff --git a/packages/devtools-evm/jest.config.js b/packages/devtools-evm/jest.config.js index 4851c7ff2..9de065f61 100644 --- a/packages/devtools-evm/jest.config.js +++ b/packages/devtools-evm/jest.config.js @@ -1,9 +1,11 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - preset: 'ts-jest', cache: false, testEnvironment: 'node', moduleNameMapper: { '^@/(.*)$': '/src/$1', }, + transform: { + '^.+\\.(t|j)sx?$': '@swc/jest', + }, }; diff --git a/packages/devtools-evm/package.json b/packages/devtools-evm/package.json index 8fcde0b61..4f40d68bd 100644 --- a/packages/devtools-evm/package.json +++ b/packages/devtools-evm/package.json @@ -50,10 +50,11 @@ "@layerzerolabs/io-devtools": "~0.0.3", "@layerzerolabs/lz-definitions": "~2.0.11", "@layerzerolabs/test-devtools": "~0.0.2", + "@swc/core": "^1.3.104", + "@swc/jest": "^0.2.30", "@types/jest": "^29.5.11", "fast-check": "^3.15.0", "jest": "^29.7.0", - "ts-jest": "^29.1.1", "ts-node": "^10.9.2", "tslib": "~2.6.2", "tsup": "~8.0.1", diff --git a/packages/devtools/jest.config.js b/packages/devtools/jest.config.js index 10f10f1ad..d081b6c92 100644 --- a/packages/devtools/jest.config.js +++ b/packages/devtools/jest.config.js @@ -1,10 +1,12 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - preset: 'ts-jest', cache: false, testEnvironment: 'node', setupFilesAfterEnv: ['/jest.setup.js'], moduleNameMapper: { '^@/(.*)$': '/src/$1', }, + transform: { + '^.+\\.(t|j)sx?$': '@swc/jest', + }, }; diff --git a/packages/devtools/package.json b/packages/devtools/package.json index fe5cc58d9..ca006284e 100644 --- a/packages/devtools/package.json +++ b/packages/devtools/package.json @@ -33,11 +33,12 @@ "@layerzerolabs/io-devtools": "~0.0.2", "@layerzerolabs/lz-definitions": "~2.0.11", "@layerzerolabs/test-devtools": "~0.0.2", + "@swc/core": "^1.3.104", + "@swc/jest": "^0.2.30", "@types/jest": "^29.5.11", "fast-check": "^3.15.0", "jest": "^29.7.0", "jest-extended": "^4.0.2", - "ts-jest": "^29.1.1", "ts-node": "^10.9.2", "tslib": "~2.6.2", "tsup": "~8.0.1", diff --git a/packages/io-devtools/jest.config.js b/packages/io-devtools/jest.config.js index 4851c7ff2..9de065f61 100644 --- a/packages/io-devtools/jest.config.js +++ b/packages/io-devtools/jest.config.js @@ -1,9 +1,11 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - preset: 'ts-jest', cache: false, testEnvironment: 'node', moduleNameMapper: { '^@/(.*)$': '/src/$1', }, + transform: { + '^.+\\.(t|j)sx?$': '@swc/jest', + }, }; diff --git a/packages/io-devtools/package.json b/packages/io-devtools/package.json index 6b59caf2e..432b32732 100644 --- a/packages/io-devtools/package.json +++ b/packages/io-devtools/package.json @@ -42,6 +42,8 @@ "winston": "^3.11.0" }, "devDependencies": { + "@swc/core": "^1.3.104", + "@swc/jest": "^0.2.30", "@types/ink-gradient": "^2.0.4", "@types/jest": "^29.5.11", "@types/prompts": "^2.4.9", @@ -52,7 +54,6 @@ "ink-table": "^3.1.0", "jest": "^29.7.0", "react": "^17.0.2", - "ts-jest": "^29.1.1", "ts-node": "^10.9.2", "tslib": "~2.6.2", "tsup": "~8.0.1", diff --git a/packages/io-devtools/test/filesystem/__snapshots__/filesystem.test.ts.snap b/packages/io-devtools/test/filesystem/__snapshots__/filesystem.test.ts.snap index e47c7efc8..125184dea 100644 --- a/packages/io-devtools/test/filesystem/__snapshots__/filesystem.test.ts.snap +++ b/packages/io-devtools/test/filesystem/__snapshots__/filesystem.test.ts.snap @@ -2,8 +2,6 @@ exports[`filesystem/filesystem importDefault should not work with a non-JS compatible file 1`] = `[SyntaxError: Invalid or unexpected token]`; -exports[`filesystem/filesystem importDefault should not work with an JS/ESM file 1`] = `[SyntaxError: Unexpected token 'export']`; - exports[`filesystem/filesystem importDefault should not work with an empty JSON file 1`] = `[SyntaxError: Unexpected end of JSON input]`; exports[`filesystem/filesystem importDefault should work with a JS/CJS file 1`] = ` @@ -12,6 +10,12 @@ exports[`filesystem/filesystem importDefault should work with a JS/CJS file 1`] } `; +exports[`filesystem/filesystem importDefault should work with a JS/ESM file 1`] = ` +{ + "i am": "an object", +} +`; + exports[`filesystem/filesystem importDefault should work with a JSON file 1`] = ` { "i am": "an object", diff --git a/packages/io-devtools/test/filesystem/filesystem.test.ts b/packages/io-devtools/test/filesystem/filesystem.test.ts index 8109314ad..d33493bc0 100644 --- a/packages/io-devtools/test/filesystem/filesystem.test.ts +++ b/packages/io-devtools/test/filesystem/filesystem.test.ts @@ -42,10 +42,10 @@ describe('filesystem/filesystem', () => { await expect(importDefault(fileName)).resolves.toMatchSnapshot() }) - it('should not work with an JS/ESM file', async () => { + it('should work with a JS/ESM file', async () => { const fileName = configPathFixture('object.esm.js') - await expect(importDefault(fileName)).rejects.toMatchSnapshot() + await expect(importDefault(fileName)).resolves.toMatchSnapshot() }) it('should work with a TS/CJS file', async () => { diff --git a/packages/io-devtools/test/stdio/__snapshots__/printer.test.ts.snap b/packages/io-devtools/test/stdio/__snapshots__/printer.test.ts.snap index 54ac8222b..1a3b9e432 100644 --- a/packages/io-devtools/test/stdio/__snapshots__/printer.test.ts.snap +++ b/packages/io-devtools/test/stdio/__snapshots__/printer.test.ts.snap @@ -22,7 +22,7 @@ exports[`stdio/printer printRecord should return a list of items with indices fo ├───┼──────────────────┤ │ 6 │ Symbol(oh hello) │ ├───┼──────────────────┤ -│ 7 │ () => { } │ +│ 7 │ ()=>{} │ └───┴──────────────────┘" `; @@ -42,7 +42,7 @@ exports[`stdio/printer printRecord should return a list of items with indices fo ├───────────┼──────────────────┤ │ symbol │ Symbol(oh hello) │ ├───────────┼──────────────────┤ -│ function │ () => { } │ +│ function │ ()=>{} │ └───────────┴──────────────────┘" `; @@ -64,7 +64,7 @@ exports[`stdio/printer printRecord should return a list of items with indices wi ├───┼──────────────────┤ │ 6 │ Symbol(oh hello) │ ├───┼──────────────────┤ -│ 7 │ () => { } │ +│ 7 │ ()=>{} │ └───┴──────────────────┘" `; @@ -86,7 +86,7 @@ exports[`stdio/printer printRecord should return a list of items with indices wi ├───────────┼──────────────────┤ │ symbol │ Symbol(oh hello) │ ├───────────┼──────────────────┤ -│ function │ () => { } │ +│ function │ ()=>{} │ └───────────┴──────────────────┘" `; @@ -106,7 +106,7 @@ exports[`stdio/printer printRecord should return a nested list for a nested obje ├──────────────┼──────────────────────────────────┤ │ symbol │ Symbol(oh hello) │ ├──────────────┼──────────────────────────────────┤ -│ function │ () => { } │ +│ function │ ()=>{} │ ├──────────────┼──────────────────────────────────┤ │ nestedArray │ ┌───┬──────────────────┐ │ │ │ │ 0 │ something │ │ @@ -123,7 +123,7 @@ exports[`stdio/printer printRecord should return a nested list for a nested obje │ │ ├───┼──────────────────┤ │ │ │ │ 6 │ Symbol(oh hello) │ │ │ │ ├───┼──────────────────┤ │ -│ │ │ 7 │ () => { } │ │ +│ │ │ 7 │ ()=>{} │ │ │ │ └───┴──────────────────┘ │ ├──────────────┼──────────────────────────────────┤ │ nestedObject │ ┌───────────┬──────────────────┐ │ @@ -141,7 +141,7 @@ exports[`stdio/printer printRecord should return a nested list for a nested obje │ │ ├───────────┼──────────────────┤ │ │ │ │ symbol │ Symbol(oh hello) │ │ │ │ ├───────────┼──────────────────┤ │ -│ │ │ function │ () => { } │ │ +│ │ │ function │ ()=>{} │ │ │ │ └───────────┴──────────────────┘ │ └──────────────┴──────────────────────────────────┘" `; @@ -162,7 +162,7 @@ exports[`stdio/printer printRecord should return a nested list for a nested obje ├───┼──────────────────────────────────┤ │ 6 │ Symbol(oh hello) │ ├───┼──────────────────────────────────┤ -│ 7 │ () => { } │ +│ 7 │ ()=>{} │ ├───┼──────────────────────────────────┤ │ 8 │ ┌───┬──────────────────┐ │ │ │ │ 0 │ something │ │ @@ -179,7 +179,7 @@ exports[`stdio/printer printRecord should return a nested list for a nested obje │ │ ├───┼──────────────────┤ │ │ │ │ 6 │ Symbol(oh hello) │ │ │ │ ├───┼──────────────────┤ │ -│ │ │ 7 │ () => { } │ │ +│ │ │ 7 │ ()=>{} │ │ │ │ └───┴──────────────────┘ │ ├───┼──────────────────────────────────┤ │ 9 │ ┌───────────┬──────────────────┐ │ @@ -197,7 +197,7 @@ exports[`stdio/printer printRecord should return a nested list for a nested obje │ │ ├───────────┼──────────────────┤ │ │ │ │ symbol │ Symbol(oh hello) │ │ │ │ ├───────────┼──────────────────┤ │ -│ │ │ function │ () => { } │ │ +│ │ │ function │ ()=>{} │ │ │ │ └───────────┴──────────────────┘ │ └───┴──────────────────────────────────┘" `; diff --git a/packages/omnicounter-devtools-evm/jest.config.js b/packages/omnicounter-devtools-evm/jest.config.js index 4851c7ff2..9de065f61 100644 --- a/packages/omnicounter-devtools-evm/jest.config.js +++ b/packages/omnicounter-devtools-evm/jest.config.js @@ -1,9 +1,11 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - preset: 'ts-jest', cache: false, testEnvironment: 'node', moduleNameMapper: { '^@/(.*)$': '/src/$1', }, + transform: { + '^.+\\.(t|j)sx?$': '@swc/jest', + }, }; diff --git a/packages/omnicounter-devtools-evm/package.json b/packages/omnicounter-devtools-evm/package.json index d5d839a0c..054af2bc3 100644 --- a/packages/omnicounter-devtools-evm/package.json +++ b/packages/omnicounter-devtools-evm/package.json @@ -40,9 +40,10 @@ "@layerzerolabs/protocol-devtools-evm": "~0.0.2", "@layerzerolabs/ua-devtools": "~0.0.2", "@layerzerolabs/ua-devtools-evm": "~0.0.2", + "@swc/core": "^1.3.104", + "@swc/jest": "^0.2.30", "@types/jest": "^29.5.11", "jest": "^29.7.0", - "ts-jest": "^29.1.1", "ts-node": "^10.9.2", "tslib": "~2.6.2", "tsup": "~8.0.1", diff --git a/packages/omnicounter-devtools/jest.config.js b/packages/omnicounter-devtools/jest.config.js index 4851c7ff2..9de065f61 100644 --- a/packages/omnicounter-devtools/jest.config.js +++ b/packages/omnicounter-devtools/jest.config.js @@ -1,9 +1,11 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - preset: 'ts-jest', cache: false, testEnvironment: 'node', moduleNameMapper: { '^@/(.*)$': '/src/$1', }, + transform: { + '^.+\\.(t|j)sx?$': '@swc/jest', + }, }; diff --git a/packages/omnicounter-devtools/package.json b/packages/omnicounter-devtools/package.json index 3fd769325..b3866cceb 100644 --- a/packages/omnicounter-devtools/package.json +++ b/packages/omnicounter-devtools/package.json @@ -33,9 +33,10 @@ "@layerzerolabs/devtools": "~0.0.2", "@layerzerolabs/lz-definitions": "~2.0.11", "@layerzerolabs/protocol-devtools": "~0.0.2", + "@swc/core": "^1.3.104", + "@swc/jest": "^0.2.30", "@types/jest": "^29.5.11", "jest": "^29.7.0", - "ts-jest": "^29.1.1", "ts-node": "^10.9.2", "tslib": "~2.6.2", "tsup": "~8.0.1", diff --git a/packages/protocol-devtools-evm/jest.config.js b/packages/protocol-devtools-evm/jest.config.js index 915f84a0d..9de065f61 100644 --- a/packages/protocol-devtools-evm/jest.config.js +++ b/packages/protocol-devtools-evm/jest.config.js @@ -1,10 +1,11 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - preset: 'ts-jest', cache: false, testEnvironment: 'node', - workerThreads: true, moduleNameMapper: { '^@/(.*)$': '/src/$1', }, + transform: { + '^.+\\.(t|j)sx?$': '@swc/jest', + }, }; diff --git a/packages/protocol-devtools-evm/package.json b/packages/protocol-devtools-evm/package.json index 5d546793b..93bd11d8c 100644 --- a/packages/protocol-devtools-evm/package.json +++ b/packages/protocol-devtools-evm/package.json @@ -51,10 +51,11 @@ "@layerzerolabs/lz-evm-sdk-v2": "~2.0.11", "@layerzerolabs/protocol-devtools": "~0.0.2", "@layerzerolabs/test-devtools": "~0.0.2", + "@swc/core": "^1.3.104", + "@swc/jest": "^0.2.30", "@types/jest": "^29.5.11", "fast-check": "^3.15.0", "jest": "^29.7.0", - "ts-jest": "^29.1.1", "ts-node": "^10.9.2", "tslib": "~2.6.2", "tsup": "~8.0.1", diff --git a/packages/protocol-devtools/jest.config.js b/packages/protocol-devtools/jest.config.js index 4851c7ff2..9de065f61 100644 --- a/packages/protocol-devtools/jest.config.js +++ b/packages/protocol-devtools/jest.config.js @@ -1,9 +1,11 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - preset: 'ts-jest', cache: false, testEnvironment: 'node', moduleNameMapper: { '^@/(.*)$': '/src/$1', }, + transform: { + '^.+\\.(t|j)sx?$': '@swc/jest', + }, }; diff --git a/packages/protocol-devtools/package.json b/packages/protocol-devtools/package.json index 196d657da..4f723c1ce 100644 --- a/packages/protocol-devtools/package.json +++ b/packages/protocol-devtools/package.json @@ -34,10 +34,11 @@ "@layerzerolabs/devtools": "~0.0.3", "@layerzerolabs/lz-definitions": "~2.0.11", "@layerzerolabs/test-devtools": "~0.0.2", + "@swc/core": "^1.3.104", + "@swc/jest": "^0.2.30", "@types/jest": "^29.5.11", "fast-check": "^3.15.0", "jest": "^29.7.0", - "ts-jest": "^29.1.1", "ts-node": "^10.9.2", "tslib": "~2.6.2", "tsup": "~8.0.1", diff --git a/packages/toolbox-foundry/package.json b/packages/toolbox-foundry/package.json index ee8fff3bb..4ec48991b 100644 --- a/packages/toolbox-foundry/package.json +++ b/packages/toolbox-foundry/package.json @@ -23,10 +23,11 @@ }, "dependencies": {}, "devDependencies": { + "@swc/core": "^1.3.104", + "@swc/jest": "^0.2.30", "@types/jest": "^29.5.11", "jest": "^29.7.0", "solidity-bytes-utils": "^0.8.1", - "ts-jest": "^29.1.1", "ts-node": "^10.9.2", "tsup": "~8.0.1", "typescript": "^5.3.3" diff --git a/packages/toolbox-hardhat/jest.config.js b/packages/toolbox-hardhat/jest.config.js index 2f60d2661..9de065f61 100644 --- a/packages/toolbox-hardhat/jest.config.js +++ b/packages/toolbox-hardhat/jest.config.js @@ -1,10 +1,11 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - preset: 'ts-jest', cache: false, testEnvironment: 'node', - testTimeout: 15000, moduleNameMapper: { '^@/(.*)$': '/src/$1', }, + transform: { + '^.+\\.(t|j)sx?$': '@swc/jest', + }, }; diff --git a/packages/toolbox-hardhat/package.json b/packages/toolbox-hardhat/package.json index af3310717..243258342 100644 --- a/packages/toolbox-hardhat/package.json +++ b/packages/toolbox-hardhat/package.json @@ -50,12 +50,13 @@ "zod": "^3.22.4" }, "devDependencies": { + "@swc/core": "^1.3.104", + "@swc/jest": "^0.2.30", "@types/jest": "^29.5.11", "ethers": "^5.7.0", "hardhat": "^2.19.4", "hardhat-deploy": "^0.11.45", "jest": "^29.7.0", - "ts-jest": "^29.1.1", "ts-node": "^10.9.2", "tsup": "~8.0.1", "typescript": "^5.3.3" diff --git a/packages/ua-devtools-evm-hardhat/jest.config.js b/packages/ua-devtools-evm-hardhat/jest.config.js index 4851c7ff2..9de065f61 100644 --- a/packages/ua-devtools-evm-hardhat/jest.config.js +++ b/packages/ua-devtools-evm-hardhat/jest.config.js @@ -1,9 +1,11 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - preset: 'ts-jest', cache: false, testEnvironment: 'node', moduleNameMapper: { '^@/(.*)$': '/src/$1', }, + transform: { + '^.+\\.(t|j)sx?$': '@swc/jest', + }, }; diff --git a/packages/ua-devtools-evm-hardhat/package.json b/packages/ua-devtools-evm-hardhat/package.json index ceb006c08..aaaaa21cc 100644 --- a/packages/ua-devtools-evm-hardhat/package.json +++ b/packages/ua-devtools-evm-hardhat/package.json @@ -50,6 +50,8 @@ "@layerzerolabs/protocol-devtools-evm": "~0.0.3", "@layerzerolabs/ua-devtools": "~0.0.2", "@layerzerolabs/ua-devtools-evm": "~0.0.2", + "@swc/core": "^1.3.104", + "@swc/jest": "^0.2.30", "@types/jest": "^29.5.11", "dotenv": "^16.3.1", "ethers": "^5.7.0", @@ -57,7 +59,6 @@ "hardhat": "^2.19.4", "hardhat-deploy": "^0.11.45", "jest": "^29.7.0", - "ts-jest": "^29.1.1", "ts-node": "^10.9.2", "tsup": "^8.0.1", "typescript": "^5.3.3", diff --git a/packages/ua-devtools-evm/jest.config.js b/packages/ua-devtools-evm/jest.config.js index 4851c7ff2..9de065f61 100644 --- a/packages/ua-devtools-evm/jest.config.js +++ b/packages/ua-devtools-evm/jest.config.js @@ -1,9 +1,11 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - preset: 'ts-jest', cache: false, testEnvironment: 'node', moduleNameMapper: { '^@/(.*)$': '/src/$1', }, + transform: { + '^.+\\.(t|j)sx?$': '@swc/jest', + }, }; diff --git a/packages/ua-devtools-evm/package.json b/packages/ua-devtools-evm/package.json index c3a7dd3b8..634d71ef6 100644 --- a/packages/ua-devtools-evm/package.json +++ b/packages/ua-devtools-evm/package.json @@ -43,10 +43,11 @@ "@layerzerolabs/protocol-devtools-evm": "~0.0.2", "@layerzerolabs/test-devtools": "~0.0.2", "@layerzerolabs/ua-devtools": "~0.0.2", + "@swc/core": "^1.3.104", + "@swc/jest": "^0.2.30", "@types/jest": "^29.5.11", "fast-check": "^3.15.0", "jest": "^29.7.0", - "ts-jest": "^29.1.1", "ts-node": "^10.9.2", "tslib": "~2.6.2", "tsup": "~8.0.1", diff --git a/packages/ua-devtools/jest.config.js b/packages/ua-devtools/jest.config.js index 4851c7ff2..9de065f61 100644 --- a/packages/ua-devtools/jest.config.js +++ b/packages/ua-devtools/jest.config.js @@ -1,9 +1,11 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - preset: 'ts-jest', cache: false, testEnvironment: 'node', moduleNameMapper: { '^@/(.*)$': '/src/$1', }, + transform: { + '^.+\\.(t|j)sx?$': '@swc/jest', + }, }; diff --git a/packages/ua-devtools/package.json b/packages/ua-devtools/package.json index 7831a8b57..5411ab5ae 100644 --- a/packages/ua-devtools/package.json +++ b/packages/ua-devtools/package.json @@ -35,10 +35,11 @@ "@layerzerolabs/lz-v2-utilities": "~2.0.11", "@layerzerolabs/protocol-devtools": "~0.0.2", "@layerzerolabs/test-devtools": "~0.0.2", + "@swc/core": "^1.3.104", + "@swc/jest": "^0.2.30", "@types/jest": "^29.5.11", "fast-check": "^3.15.0", "jest": "^29.7.0", - "ts-jest": "^29.1.1", "ts-node": "^10.9.2", "tslib": "~2.6.2", "tsup": "~8.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8e126f680..865be03f6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -148,7 +148,7 @@ importers: version: 0.8.1(@babel/core@7.23.7) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -223,7 +223,7 @@ importers: version: 0.8.1(@babel/core@7.23.7) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -237,6 +237,12 @@ importers: '@layerzerolabs/io-devtools': specifier: ~0.0.2 version: link:../io-devtools + '@swc/core': + specifier: ^1.3.104 + version: 1.3.104 + '@swc/jest': + specifier: ^0.2.30 + version: 0.2.30(@swc/core@1.3.104) '@types/jest': specifier: ^29.5.11 version: 29.5.11 @@ -285,15 +291,12 @@ importers: tiged: specifier: ^2.12.5 version: 2.12.5 - ts-jest: - specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.23.7)(esbuild@0.19.11)(jest@29.7.0)(typescript@5.3.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) tsup: specifier: ~8.0.1 - version: 8.0.1(ts-node@10.9.2)(typescript@5.3.3) + version: 8.0.1(@swc/core@1.3.104)(ts-node@10.9.2)(typescript@5.3.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -312,6 +315,12 @@ importers: '@layerzerolabs/test-devtools': specifier: ~0.0.2 version: link:../../tests/test-devtools + '@swc/core': + specifier: ^1.3.104 + version: 1.3.104 + '@swc/jest': + specifier: ^0.2.30 + version: 0.2.30(@swc/core@1.3.104) '@types/jest': specifier: ^29.5.11 version: 29.5.11 @@ -324,18 +333,15 @@ importers: jest-extended: specifier: ^4.0.2 version: 4.0.2(jest@29.7.0) - ts-jest: - specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.23.7)(esbuild@0.19.11)(jest@29.7.0)(typescript@5.3.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) tslib: specifier: ~2.6.2 version: 2.6.2 tsup: specifier: ~8.0.1 - version: 8.0.1(ts-node@10.9.2)(typescript@5.3.3) + version: 8.0.1(@swc/core@1.3.104)(ts-node@10.9.2)(typescript@5.3.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -385,6 +391,12 @@ importers: '@layerzerolabs/test-devtools': specifier: ~0.0.2 version: link:../../tests/test-devtools + '@swc/core': + specifier: ^1.3.104 + version: 1.3.104 + '@swc/jest': + specifier: ^0.2.30 + version: 0.2.30(@swc/core@1.3.104) '@types/jest': specifier: ^29.5.11 version: 29.5.11 @@ -394,18 +406,15 @@ importers: jest: specifier: ^29.7.0 version: 29.7.0(@types/node@18.18.14)(ts-node@10.9.2) - ts-jest: - specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.23.7)(esbuild@0.19.11)(jest@29.7.0)(typescript@5.3.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) tslib: specifier: ~2.6.2 version: 2.6.2 tsup: specifier: ~8.0.1 - version: 8.0.1(ts-node@10.9.2)(typescript@5.3.3) + version: 8.0.1(@swc/core@1.3.104)(ts-node@10.9.2)(typescript@5.3.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -461,6 +470,12 @@ importers: '@nomiclabs/hardhat-ethers': specifier: ^2.2.3 version: 2.2.3(ethers@5.7.2)(hardhat@2.19.4) + '@swc/core': + specifier: ^1.3.104 + version: 1.3.104 + '@swc/jest': + specifier: ^0.2.30 + version: 0.2.30(@swc/core@1.3.104) '@types/jest': specifier: ^29.5.11 version: 29.5.11 @@ -479,18 +494,15 @@ importers: sinon: specifier: ^17.0.1 version: 17.0.1 - ts-jest: - specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.23.7)(esbuild@0.19.11)(jest@29.7.0)(typescript@5.3.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) tslib: specifier: ~2.6.2 version: 2.6.2 tsup: specifier: ~8.0.1 - version: 8.0.1(ts-node@10.9.2)(typescript@5.3.3) + version: 8.0.1(@swc/core@1.3.104)(ts-node@10.9.2)(typescript@5.3.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -513,6 +525,12 @@ importers: specifier: ^1.9.6 version: 1.10.0 devDependencies: + '@swc/core': + specifier: ^1.3.104 + version: 1.3.104 + '@swc/jest': + specifier: ^0.2.30 + version: 0.2.30(@swc/core@1.3.104) '@types/ink-gradient': specifier: ^2.0.4 version: 2.0.4 @@ -543,18 +561,15 @@ importers: react: specifier: ^17.0.2 version: 17.0.2 - ts-jest: - specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.23.7)(esbuild@0.19.11)(jest@29.7.0)(typescript@5.3.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) tslib: specifier: ~2.6.2 version: 2.6.2 tsup: specifier: ~8.0.1 - version: 8.0.1(ts-node@10.9.2)(typescript@5.3.3) + version: 8.0.1(@swc/core@1.3.104)(ts-node@10.9.2)(typescript@5.3.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -573,24 +588,27 @@ importers: '@layerzerolabs/protocol-devtools': specifier: ~0.0.2 version: link:../protocol-devtools + '@swc/core': + specifier: ^1.3.104 + version: 1.3.104 + '@swc/jest': + specifier: ^0.2.30 + version: 0.2.30(@swc/core@1.3.104) '@types/jest': specifier: ^29.5.11 version: 29.5.11 jest: specifier: ^29.7.0 version: 29.7.0(@types/node@18.18.14)(ts-node@10.9.2) - ts-jest: - specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.23.7)(esbuild@0.19.11)(jest@29.7.0)(typescript@5.3.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) tslib: specifier: ~2.6.2 version: 2.6.2 tsup: specifier: ~8.0.1 - version: 8.0.1(ts-node@10.9.2)(typescript@5.3.3) + version: 8.0.1(@swc/core@1.3.104)(ts-node@10.9.2)(typescript@5.3.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -628,24 +646,27 @@ importers: '@layerzerolabs/ua-devtools-evm': specifier: ~0.0.2 version: link:../ua-devtools-evm + '@swc/core': + specifier: ^1.3.104 + version: 1.3.104 + '@swc/jest': + specifier: ^0.2.30 + version: 0.2.30(@swc/core@1.3.104) '@types/jest': specifier: ^29.5.11 version: 29.5.11 jest: specifier: ^29.7.0 version: 29.7.0(@types/node@18.18.14)(ts-node@10.9.2) - ts-jest: - specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.23.7)(esbuild@0.19.11)(jest@29.7.0)(typescript@5.3.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) tslib: specifier: ~2.6.2 version: 2.6.2 tsup: specifier: ~8.0.1 - version: 8.0.1(ts-node@10.9.2)(typescript@5.3.3) + version: 8.0.1(@swc/core@1.3.104)(ts-node@10.9.2)(typescript@5.3.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -664,6 +685,12 @@ importers: '@layerzerolabs/test-devtools': specifier: ~0.0.2 version: link:../../tests/test-devtools + '@swc/core': + specifier: ^1.3.104 + version: 1.3.104 + '@swc/jest': + specifier: ^0.2.30 + version: 0.2.30(@swc/core@1.3.104) '@types/jest': specifier: ^29.5.11 version: 29.5.11 @@ -673,18 +700,15 @@ importers: jest: specifier: ^29.7.0 version: 29.7.0(@types/node@18.18.14)(ts-node@10.9.2) - ts-jest: - specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.23.7)(esbuild@0.19.11)(jest@29.7.0)(typescript@5.3.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) tslib: specifier: ~2.6.2 version: 2.6.2 tsup: specifier: ~8.0.1 - version: 8.0.1(ts-node@10.9.2)(typescript@5.3.3) + version: 8.0.1(@swc/core@1.3.104)(ts-node@10.9.2)(typescript@5.3.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -737,6 +761,12 @@ importers: '@layerzerolabs/test-devtools': specifier: ~0.0.2 version: link:../../tests/test-devtools + '@swc/core': + specifier: ^1.3.104 + version: 1.3.104 + '@swc/jest': + specifier: ^0.2.30 + version: 0.2.30(@swc/core@1.3.104) '@types/jest': specifier: ^29.5.11 version: 29.5.11 @@ -746,18 +776,15 @@ importers: jest: specifier: ^29.7.0 version: 29.7.0(@types/node@18.18.14)(ts-node@10.9.2) - ts-jest: - specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.23.7)(esbuild@0.19.11)(jest@29.7.0)(typescript@5.3.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) tslib: specifier: ~2.6.2 version: 2.6.2 tsup: specifier: ~8.0.1 - version: 8.0.1(ts-node@10.9.2)(typescript@5.3.3) + version: 8.0.1(@swc/core@1.3.104)(ts-node@10.9.2)(typescript@5.3.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -767,6 +794,12 @@ importers: packages/toolbox-foundry: devDependencies: + '@swc/core': + specifier: ^1.3.104 + version: 1.3.104 + '@swc/jest': + specifier: ^0.2.30 + version: 0.2.30(@swc/core@1.3.104) '@types/jest': specifier: ^29.5.11 version: 29.5.11 @@ -776,15 +809,12 @@ importers: solidity-bytes-utils: specifier: ^0.8.1 version: 0.8.1(@babel/core@7.23.7) - ts-jest: - specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.23.7)(esbuild@0.19.11)(jest@29.7.0)(typescript@5.3.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) tsup: specifier: ~8.0.1 - version: 8.0.1(ts-node@10.9.2)(typescript@5.3.3) + version: 8.0.1(@swc/core@1.3.104)(ts-node@10.9.2)(typescript@5.3.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -852,6 +882,12 @@ importers: specifier: ^3.22.4 version: 3.22.4 devDependencies: + '@swc/core': + specifier: ^1.3.104 + version: 1.3.104 + '@swc/jest': + specifier: ^0.2.30 + version: 0.2.30(@swc/core@1.3.104) '@types/jest': specifier: ^29.5.11 version: 29.5.11 @@ -867,15 +903,12 @@ importers: jest: specifier: ^29.7.0 version: 29.7.0(@types/node@18.18.14)(ts-node@10.9.2) - ts-jest: - specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.23.7)(esbuild@0.19.11)(jest@29.7.0)(typescript@5.3.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) tsup: specifier: ~8.0.1 - version: 8.0.1(ts-node@10.9.2)(typescript@5.3.3) + version: 8.0.1(@swc/core@1.3.104)(ts-node@10.9.2)(typescript@5.3.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -900,6 +933,12 @@ importers: '@layerzerolabs/test-devtools': specifier: ~0.0.2 version: link:../../tests/test-devtools + '@swc/core': + specifier: ^1.3.104 + version: 1.3.104 + '@swc/jest': + specifier: ^0.2.30 + version: 0.2.30(@swc/core@1.3.104) '@types/jest': specifier: ^29.5.11 version: 29.5.11 @@ -909,18 +948,15 @@ importers: jest: specifier: ^29.7.0 version: 29.7.0(@types/node@18.18.14)(ts-node@10.9.2) - ts-jest: - specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.23.7)(esbuild@0.19.11)(jest@29.7.0)(typescript@5.3.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) tslib: specifier: ~2.6.2 version: 2.6.2 tsup: specifier: ~8.0.1 - version: 8.0.1(ts-node@10.9.2)(typescript@5.3.3) + version: 8.0.1(@swc/core@1.3.104)(ts-node@10.9.2)(typescript@5.3.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -964,6 +1000,12 @@ importers: '@layerzerolabs/ua-devtools': specifier: ~0.0.2 version: link:../ua-devtools + '@swc/core': + specifier: ^1.3.104 + version: 1.3.104 + '@swc/jest': + specifier: ^0.2.30 + version: 0.2.30(@swc/core@1.3.104) '@types/jest': specifier: ^29.5.11 version: 29.5.11 @@ -973,18 +1015,15 @@ importers: jest: specifier: ^29.7.0 version: 29.7.0(@types/node@18.18.14)(ts-node@10.9.2) - ts-jest: - specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.23.7)(esbuild@0.19.11)(jest@29.7.0)(typescript@5.3.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) tslib: specifier: ~2.6.2 version: 2.6.2 tsup: specifier: ~8.0.1 - version: 8.0.1(ts-node@10.9.2)(typescript@5.3.3) + version: 8.0.1(@swc/core@1.3.104)(ts-node@10.9.2)(typescript@5.3.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -1034,6 +1073,12 @@ importers: '@layerzerolabs/ua-devtools-evm': specifier: ~0.0.2 version: link:../ua-devtools-evm + '@swc/core': + specifier: ^1.3.104 + version: 1.3.104 + '@swc/jest': + specifier: ^0.2.30 + version: 0.2.30(@swc/core@1.3.104) '@types/jest': specifier: ^29.5.11 version: 29.5.11 @@ -1055,15 +1100,12 @@ importers: jest: specifier: ^29.7.0 version: 29.7.0(@types/node@18.18.14)(ts-node@10.9.2) - ts-jest: - specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.23.7)(esbuild@0.19.11)(jest@29.7.0)(typescript@5.3.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) tsup: specifier: ^8.0.1 - version: 8.0.1(ts-node@10.9.2)(typescript@5.3.3) + version: 8.0.1(@swc/core@1.3.104)(ts-node@10.9.2)(typescript@5.3.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -1154,6 +1196,12 @@ importers: '@openzeppelin/contracts-upgradeable': specifier: ^4.9.5 version: 4.9.5 + '@swc/core': + specifier: ^1.3.104 + version: 1.3.104 + '@swc/jest': + specifier: ^0.2.30 + version: 0.2.30(@swc/core@1.3.104) '@types/jest': specifier: ^29.5.11 version: 29.5.11 @@ -1175,12 +1223,9 @@ importers: solidity-bytes-utils: specifier: ^0.8.1 version: 0.8.1(@babel/core@7.23.7) - ts-jest: - specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.23.7)(esbuild@0.19.11)(jest@29.7.0)(typescript@5.3.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -1220,6 +1265,12 @@ importers: '@nomiclabs/hardhat-ethers': specifier: ^2.2.3 version: 2.2.3(ethers@5.7.2)(hardhat@2.19.4) + '@swc/core': + specifier: ^1.3.104 + version: 1.3.104 + '@swc/jest': + specifier: ^0.2.30 + version: 0.2.30(@swc/core@1.3.104) '@types/jest': specifier: ^29.5.11 version: 29.5.11 @@ -1235,12 +1286,9 @@ importers: jest: specifier: ^29.7.0 version: 29.7.0(@types/node@18.18.14)(ts-node@10.9.2) - ts-jest: - specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.23.7)(esbuild@0.19.11)(jest@29.7.0)(typescript@5.3.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -1255,13 +1303,13 @@ importers: version: 3.15.0 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) tslib: specifier: ~2.6.2 version: 2.6.2 tsup: specifier: ~8.0.1 - version: 8.0.1(ts-node@10.9.2)(typescript@5.3.3) + version: 8.0.1(@swc/core@1.3.104)(ts-node@10.9.2)(typescript@5.3.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -1273,13 +1321,13 @@ importers: version: 2.19.4(ts-node@10.9.2)(typescript@5.3.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) tslib: specifier: ~2.6.2 version: 2.6.2 tsup: specifier: ~8.0.1 - version: 8.0.1(ts-node@10.9.2)(typescript@5.3.3) + version: 8.0.1(@swc/core@1.3.104)(ts-node@10.9.2)(typescript@5.3.3) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -1291,7 +1339,7 @@ importers: version: 2.19.4(ts-node@10.9.2)(typescript@5.3.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) tslib: specifier: ~2.6.2 version: 2.6.2 @@ -1382,6 +1430,12 @@ importers: '@openzeppelin/contracts': specifier: ^4.9.5 version: 4.9.5 + '@swc/core': + specifier: ^1.3.104 + version: 1.3.104 + '@swc/jest': + specifier: ^0.2.30 + version: 0.2.30(@swc/core@1.3.104) '@types/jest': specifier: ^29.5.11 version: 29.5.11 @@ -1403,12 +1457,9 @@ importers: solidity-bytes-utils: specifier: ^0.8.1 version: 0.8.1(@babel/core@7.23.7) - ts-jest: - specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.23.7)(esbuild@0.19.11)(jest@29.7.0)(typescript@5.3.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) tslib: specifier: ~2.6.2 version: 2.6.2 @@ -2753,6 +2804,13 @@ packages: - ts-node dev: true + /@jest/create-cache-key-function@29.7.0: + resolution: {integrity: sha512-4QqS3LY5PBmTRHj9sAg1HLoPzqAI0uOX6wI/TRqHIcOxlFidy6YEmCQJk6FSZjNLGCeubDMfmkWL+qaLKhSGQA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/types': 29.6.3 + dev: true + /@jest/environment@29.7.0: resolution: {integrity: sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -3776,6 +3834,127 @@ packages: resolution: {integrity: sha512-Nko8R0/kUo391jsEHHxrGM07QFdnPGvlmox4rmH0kNiNAashItAilhy4Mv4pK5gQmW5f4sXAF58fwJbmlkGcVw==} dev: true + /@swc/core-darwin-arm64@1.3.104: + resolution: {integrity: sha512-rCnVj8x3kn6s914Adddu+zROHUn6mUEMkNKUckofs3W9OthNlZXJA3C5bS2MMTRFXCWamJ0Zmh6INFpz+f4Tfg==} + engines: {node: '>=10'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + optional: true + + /@swc/core-darwin-x64@1.3.104: + resolution: {integrity: sha512-LBCWGTYkn1UjyxrmcLS3vZgtCDVhwxsQMV7jz5duc7Gas8SRWh6ZYqvUkjlXMDX1yx0uvzHrkaRw445+zDRj7Q==} + engines: {node: '>=10'} + cpu: [x64] + os: [darwin] + requiresBuild: true + optional: true + + /@swc/core-linux-arm-gnueabihf@1.3.104: + resolution: {integrity: sha512-iFbsWcx0TKHWnFBNCuUstYqRtfkyBx7FKv5To1Hx14EMuvvoCD/qUoJEiNfDQN5n/xU9g5xq4RdbjEWCFLhAbA==} + engines: {node: '>=10'} + cpu: [arm] + os: [linux] + requiresBuild: true + optional: true + + /@swc/core-linux-arm64-gnu@1.3.104: + resolution: {integrity: sha512-1BIIp+nUPrRHHaJ35YJqrwXPwYSITp5robqqjyTwoKGw2kq0x+A964kpWul6v0d7A9Ial8fyH4m13eSWBodD2A==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + optional: true + + /@swc/core-linux-arm64-musl@1.3.104: + resolution: {integrity: sha512-IyDNkzpKwvLqmRwTW+s8f8OsOSSj1N6juZKbvNHpZRfWZkz3T70q3vJlDBWQwy8z8cm7ckd7YUT3eKcSBPPowg==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + optional: true + + /@swc/core-linux-x64-gnu@1.3.104: + resolution: {integrity: sha512-MfX/wiRdTjE5uXHTDnaX69xI4UBfxIhcxbVlMj//N+7AX/G2pl2UFityfVMU2HpM12BRckrCxVI8F/Zy3DZkYQ==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + requiresBuild: true + optional: true + + /@swc/core-linux-x64-musl@1.3.104: + resolution: {integrity: sha512-5yeILaxA31gGEmquErO8yxlq1xu0XVt+fz5mbbKXKZMRRILxYxNzAGb5mzV41r0oHz6Vhv4AXX/WMCmeWl+HkQ==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + requiresBuild: true + optional: true + + /@swc/core-win32-arm64-msvc@1.3.104: + resolution: {integrity: sha512-rwcImsYnWDWGmeESG0XdGGOql5s3cG5wA8C4hHHKdH76zamPfDKKQFBsjmoNi0f1IsxaI9AJPeOmD4bAhT1ZoQ==} + engines: {node: '>=10'} + cpu: [arm64] + os: [win32] + requiresBuild: true + optional: true + + /@swc/core-win32-ia32-msvc@1.3.104: + resolution: {integrity: sha512-ICDA+CJLYC7NkePnrbh/MvXwDQfy3rZSFgrVdrqRosv9DKHdFjYDnA9++7ozjrIdFdBrFW2NR7pyUcidlwhNzA==} + engines: {node: '>=10'} + cpu: [ia32] + os: [win32] + requiresBuild: true + optional: true + + /@swc/core-win32-x64-msvc@1.3.104: + resolution: {integrity: sha512-fZJ1Ju62U4lMZVU+nHxLkFNcu0hG5Y0Yj/5zjrlbuX5N8J5eDndWAFsVnQhxRTZqKhZB53pvWRQs5FItSDqgXg==} + engines: {node: '>=10'} + cpu: [x64] + os: [win32] + requiresBuild: true + optional: true + + /@swc/core@1.3.104: + resolution: {integrity: sha512-9LWH/qzR/Pmyco+XwPiPfz59T1sryI7o5dmqb593MfCkaX5Fzl9KhwQTI47i21/bXYuCdfa9ySZuVkzXMirYxA==} + engines: {node: '>=10'} + requiresBuild: true + peerDependencies: + '@swc/helpers': ^0.5.0 + peerDependenciesMeta: + '@swc/helpers': + optional: true + dependencies: + '@swc/counter': 0.1.2 + '@swc/types': 0.1.5 + optionalDependencies: + '@swc/core-darwin-arm64': 1.3.104 + '@swc/core-darwin-x64': 1.3.104 + '@swc/core-linux-arm-gnueabihf': 1.3.104 + '@swc/core-linux-arm64-gnu': 1.3.104 + '@swc/core-linux-arm64-musl': 1.3.104 + '@swc/core-linux-x64-gnu': 1.3.104 + '@swc/core-linux-x64-musl': 1.3.104 + '@swc/core-win32-arm64-msvc': 1.3.104 + '@swc/core-win32-ia32-msvc': 1.3.104 + '@swc/core-win32-x64-msvc': 1.3.104 + + /@swc/counter@0.1.2: + resolution: {integrity: sha512-9F4ys4C74eSTEUNndnER3VJ15oru2NumfQxS8geE+f3eB5xvfxpWyqE5XlVnxb/R14uoXi6SLbBwwiDSkv+XEw==} + + /@swc/jest@0.2.30(@swc/core@1.3.104): + resolution: {integrity: sha512-80KKC6GYvgrpX1/7yKsRbu88V6OAJIcMGzOLCt0pPSg1nEwJg/lLAodVy2hCD8OcYApmY5gSwD4SnwgA5Y7Q7A==} + engines: {npm: '>= 7.0.0'} + peerDependencies: + '@swc/core': '*' + dependencies: + '@jest/create-cache-key-function': 29.7.0 + '@swc/core': 1.3.104 + jsonc-parser: 3.2.0 + dev: true + + /@swc/types@0.1.5: + resolution: {integrity: sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==} + /@szmarczak/http-timer@4.0.6: resolution: {integrity: sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==} engines: {node: '>=10'} @@ -4937,13 +5116,6 @@ packages: update-browserslist-db: 1.0.13(browserslist@4.22.2) dev: true - /bs-logger@0.2.6: - resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} - engines: {node: '>= 6'} - dependencies: - fast-json-stable-stringify: 2.1.0 - dev: true - /bs58@4.0.1: resolution: {integrity: sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==} dependencies: @@ -7750,7 +7922,7 @@ packages: solc: 0.7.3(debug@4.3.4) source-map-support: 0.5.21 stacktrace-parser: 0.1.10 - ts-node: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + ts-node: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) tsort: 0.0.1 typescript: 5.3.3 undici: 5.28.2 @@ -8617,7 +8789,7 @@ packages: pretty-format: 29.7.0 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + ts-node: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -9053,6 +9225,10 @@ packages: hasBin: true dev: true + /jsonc-parser@3.2.0: + resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} + dev: true + /jsonfile@2.4.0: resolution: {integrity: sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==} optionalDependencies: @@ -9314,10 +9490,6 @@ packages: /lodash.isequal@4.5.0: resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} - /lodash.memoize@4.1.2: - resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} - dev: true - /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true @@ -10348,7 +10520,7 @@ packages: optional: true dependencies: lilconfig: 3.0.0 - ts-node: 10.9.2(@types/node@18.18.14)(typescript@5.3.3) + ts-node: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) yaml: 2.3.4 dev: true @@ -11843,42 +12015,7 @@ packages: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} dev: true - /ts-jest@29.1.1(@babel/core@7.23.7)(esbuild@0.19.11)(jest@29.7.0)(typescript@5.3.3): - resolution: {integrity: sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - hasBin: true - peerDependencies: - '@babel/core': '>=7.0.0-beta.0 <8' - '@jest/types': ^29.0.0 - babel-jest: ^29.0.0 - esbuild: '*' - jest: ^29.0.0 - typescript: '>=4.3 <6' - peerDependenciesMeta: - '@babel/core': - optional: true - '@jest/types': - optional: true - babel-jest: - optional: true - esbuild: - optional: true - dependencies: - '@babel/core': 7.23.7 - bs-logger: 0.2.6 - esbuild: 0.19.11 - fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@18.18.14)(ts-node@10.9.2) - jest-util: 29.7.0 - json5: 2.2.3 - lodash.memoize: 4.1.2 - make-error: 1.3.6 - semver: 7.5.4 - typescript: 5.3.3 - yargs-parser: 21.1.1 - dev: true - - /ts-node@10.9.2(@types/node@18.18.14)(typescript@5.3.3): + /ts-node@10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3): resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true peerDependencies: @@ -11893,6 +12030,7 @@ packages: optional: true dependencies: '@cspotcode/source-map-support': 0.8.1 + '@swc/core': 1.3.104 '@tsconfig/node10': 1.0.9 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 @@ -11927,7 +12065,7 @@ packages: /tsort@0.0.1: resolution: {integrity: sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==} - /tsup@8.0.1(ts-node@10.9.2)(typescript@5.3.3): + /tsup@8.0.1(@swc/core@1.3.104)(ts-node@10.9.2)(typescript@5.3.3): resolution: {integrity: sha512-hvW7gUSG96j53ZTSlT4j/KL0q1Q2l6TqGBFc6/mu/L46IoNWqLLUzLRLP1R8Q7xrJTmkDxxDoojV5uCVs1sVOg==} engines: {node: '>=18'} hasBin: true @@ -11946,6 +12084,7 @@ packages: typescript: optional: true dependencies: + '@swc/core': 1.3.104 bundle-require: 4.0.2(esbuild@0.19.11) cac: 6.7.14 chokidar: 3.5.3 diff --git a/tests/devtools-evm-hardhat-test/jest.config.js b/tests/devtools-evm-hardhat-test/jest.config.js index e1615c830..5afc43159 100644 --- a/tests/devtools-evm-hardhat-test/jest.config.js +++ b/tests/devtools-evm-hardhat-test/jest.config.js @@ -1,10 +1,12 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - preset: 'ts-jest', cache: false, testEnvironment: 'node', testTimeout: 150_000, moduleNameMapper: { '^@/(.*)$': '/src/$1', }, + transform: { + '^.+\\.(t|j)sx?$': '@swc/jest', + }, }; diff --git a/tests/devtools-evm-hardhat-test/package.json b/tests/devtools-evm-hardhat-test/package.json index 88c3336c2..c33003bfb 100644 --- a/tests/devtools-evm-hardhat-test/package.json +++ b/tests/devtools-evm-hardhat-test/package.json @@ -43,6 +43,8 @@ "@nomicfoundation/hardhat-ethers": "^3.0.5", "@openzeppelin/contracts": "^4.9.5", "@openzeppelin/contracts-upgradeable": "^4.9.5", + "@swc/core": "^1.3.104", + "@swc/jest": "^0.2.30", "@types/jest": "^29.5.11", "ethers": "^5.7.0", "fast-check": "^3.15.0", @@ -50,7 +52,6 @@ "hardhat-deploy": "^0.11.45", "jest": "^29.7.0", "solidity-bytes-utils": "^0.8.1", - "ts-jest": "^29.1.1", "ts-node": "^10.9.2", "typescript": "^5.3.3" } diff --git a/tests/devtools-evm-test/jest.config.js b/tests/devtools-evm-test/jest.config.js index e1615c830..5afc43159 100644 --- a/tests/devtools-evm-test/jest.config.js +++ b/tests/devtools-evm-test/jest.config.js @@ -1,10 +1,12 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - preset: 'ts-jest', cache: false, testEnvironment: 'node', testTimeout: 150_000, moduleNameMapper: { '^@/(.*)$': '/src/$1', }, + transform: { + '^.+\\.(t|j)sx?$': '@swc/jest', + }, }; diff --git a/tests/devtools-evm-test/package.json b/tests/devtools-evm-test/package.json index d89fe5779..588bb82b2 100644 --- a/tests/devtools-evm-test/package.json +++ b/tests/devtools-evm-test/package.json @@ -27,12 +27,13 @@ "@layerzerolabs/test-devtools": "~0.0.2", "@nomicfoundation/hardhat-ethers": "^3.0.5", "@nomiclabs/hardhat-ethers": "^2.2.3", + "@swc/core": "^1.3.104", + "@swc/jest": "^0.2.30", "@types/jest": "^29.5.11", "ethers": "^5.7.0", "fast-check": "^3.15.0", "hardhat": "^2.19.4", "jest": "^29.7.0", - "ts-jest": "^29.1.1", "ts-node": "^10.9.2", "typescript": "^5.3.3" } diff --git a/tests/ua-devtools-evm-hardhat-test/jest.config.js b/tests/ua-devtools-evm-hardhat-test/jest.config.js index 9b43c323b..17815ce75 100644 --- a/tests/ua-devtools-evm-hardhat-test/jest.config.js +++ b/tests/ua-devtools-evm-hardhat-test/jest.config.js @@ -1,10 +1,12 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - preset: 'ts-jest', cache: false, testEnvironment: 'node', testTimeout: 300_000, moduleNameMapper: { '^@/(.*)$': '/src/$1', }, + transform: { + '^.+\\.(t|j)sx?$': '@swc/jest', + }, }; diff --git a/tests/ua-devtools-evm-hardhat-test/package.json b/tests/ua-devtools-evm-hardhat-test/package.json index 4043fef74..d70299371 100644 --- a/tests/ua-devtools-evm-hardhat-test/package.json +++ b/tests/ua-devtools-evm-hardhat-test/package.json @@ -43,6 +43,8 @@ "@layerzerolabs/ua-devtools-evm-hardhat": "~0.0.3", "@nomicfoundation/hardhat-ethers": "^3.0.5", "@openzeppelin/contracts": "^4.9.5", + "@swc/core": "^1.3.104", + "@swc/jest": "^0.2.30", "@types/jest": "^29.5.11", "ethers": "^5.7.0", "fast-check": "^3.15.0", @@ -50,7 +52,6 @@ "hardhat-deploy": "^0.11.45", "jest": "^29.7.0", "solidity-bytes-utils": "^0.8.1", - "ts-jest": "^29.1.1", "ts-node": "^10.9.2", "tslib": "~2.6.2", "typescript": "^5.3.3"