From 5a7861e20eefa9fc0cca7c500a9624202f7989e3 Mon Sep 17 00:00:00 2001 From: Charlie Lye Date: Mon, 1 Apr 2024 21:17:38 +0000 Subject: [PATCH 1/7] jest fast transpile. no more ts-jest. --- yarn-project/accounts/package.json | 14 +- yarn-project/archiver/package.json | 14 +- yarn-project/aztec-faucet/package.json | 14 +- yarn-project/aztec-node/package.json | 14 +- yarn-project/aztec.js/package.json | 14 +- .../contract/contract_function_interaction.ts | 2 +- yarn-project/aztec/package.json | 14 +- yarn-project/circuit-types/package.json | 14 +- yarn-project/circuits.js/jest.config.ts | 12 - yarn-project/circuits.js/package.json | 22 +- yarn-project/circuits.js/package.local.json | 5 + yarn-project/cli/package.json | 14 +- .../end-to-end/jest.integration.config.json | 8 +- yarn-project/end-to-end/package.json | 1 - yarn-project/entrypoints/package.json | 14 +- yarn-project/ethereum/package.json | 14 +- yarn-project/foundation/package.json | 15 +- yarn-project/key-store/package.json | 14 +- yarn-project/kv-store/package.json | 14 +- yarn-project/merkle-tree/package.json | 14 +- yarn-project/noir-compiler/package.json | 13 +- yarn-project/noir-contracts.js/package.json | 14 +- .../noir-protocol-circuits-types/package.json | 2 - yarn-project/p2p-bootstrap/package.json | 14 +- yarn-project/p2p/package.json | 14 +- yarn-project/package.common.json | 6 +- yarn-project/package.json | 6 +- yarn-project/protocol-contracts/package.json | 14 +- yarn-project/prover-client/package.json | 14 +- yarn-project/pxe/package.json | 14 +- yarn-project/scripts/package.json | 14 +- .../jest.integration.config.json | 8 +- yarn-project/sequencer-client/package.json | 1 - yarn-project/simulator/package.json | 14 +- yarn-project/simulator/src/public/index.ts | 4 +- yarn-project/types/package.json | 15 +- yarn-project/world-state/package.json | 14 +- yarn-project/yarn.lock | 275 ++++++++++-------- 38 files changed, 448 insertions(+), 255 deletions(-) delete mode 100644 yarn-project/circuits.js/jest.config.ts create mode 100644 yarn-project/circuits.js/package.local.json diff --git a/yarn-project/accounts/package.json b/yarn-project/accounts/package.json index 4888de8dbf2..b78eb273ca5 100644 --- a/yarn-project/accounts/package.json +++ b/yarn-project/accounts/package.json @@ -31,19 +31,26 @@ "clean": "rm -rf ./dest .tsbuildinfo ./src/artifacts", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests" }, "inherits": [ "../package.common.json", "./package.local.json" ], "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" + "rootDir": "./src", + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "dependencies": { "@aztec/aztec.js": "workspace:^", @@ -61,7 +68,6 @@ "@types/node": "^18.7.23", "jest": "^29.5.0", "jest-mock-extended": "^3.0.3", - "ts-jest": "^29.1.0", "ts-loader": "^9.4.4", "ts-node": "^10.9.1", "typescript": "^5.0.4" diff --git a/yarn-project/archiver/package.json b/yarn-project/archiver/package.json index f6b5637d66c..17e7cb0ffdf 100644 --- a/yarn-project/archiver/package.json +++ b/yarn-project/archiver/package.json @@ -16,7 +16,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests", "start": "node ./dest", "start:dev": "tsc-watch -p tsconfig.json --onSuccess 'yarn start'", "test:integration": "concurrently -k -s first -c reset,dim -n test,anvil \"yarn test:integration:run\" \"anvil\"", @@ -26,13 +26,20 @@ "../package.common.json" ], "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", "rootDir": "./src", - "workerThreads": true + "workerThreads": true, + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "dependencies": { "@aztec/circuit-types": "workspace:^", @@ -63,7 +70,6 @@ "concurrently": "^8.0.1", "jest": "^29.5.0", "jest-mock-extended": "^3.0.4", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, diff --git a/yarn-project/aztec-faucet/package.json b/yarn-project/aztec-faucet/package.json index 79edde0925f..28accc5b543 100644 --- a/yarn-project/aztec-faucet/package.json +++ b/yarn-project/aztec-faucet/package.json @@ -18,18 +18,25 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests" }, "inherits": [ "../package.common.json" ], "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" + "rootDir": "./src", + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "dependencies": { "@aztec/ethereum": "workspace:^", @@ -44,7 +51,6 @@ "@types/jest": "^29.5.0", "@types/node": "^18.7.23", "jest": "^29.5.0", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, diff --git a/yarn-project/aztec-node/package.json b/yarn-project/aztec-node/package.json index f49c5c58920..36f1026b451 100644 --- a/yarn-project/aztec-node/package.json +++ b/yarn-project/aztec-node/package.json @@ -19,18 +19,25 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests" }, "inherits": [ "../package.common.json" ], "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" + "rootDir": "./src", + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "dependencies": { "@aztec/archiver": "workspace:^", @@ -56,7 +63,6 @@ "@types/jest": "^29.5.0", "@types/node": "^18.7.23", "jest": "^29.5.0", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, diff --git a/yarn-project/aztec.js/package.json b/yarn-project/aztec.js/package.json index bcaa7ac78a5..d4f1ad2ed96 100644 --- a/yarn-project/aztec.js/package.json +++ b/yarn-project/aztec.js/package.json @@ -35,19 +35,26 @@ "clean": "rm -rf ./dest .tsbuildinfo ./src/account_contract/artifacts", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests" }, "inherits": [ "../package.common.json", "./package.local.json" ], "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" + "rootDir": "./src", + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "dependencies": { "@aztec/circuit-types": "workspace:^", @@ -69,7 +76,6 @@ "process": "^0.11.10", "resolve-typescript-plugin": "^2.0.1", "stream-browserify": "^3.0.0", - "ts-jest": "^29.1.0", "ts-loader": "^9.4.4", "ts-node": "^10.9.1", "tty-browserify": "^0.0.1", diff --git a/yarn-project/aztec.js/src/contract/contract_function_interaction.ts b/yarn-project/aztec.js/src/contract/contract_function_interaction.ts index f04d81d2579..a79e8c652f4 100644 --- a/yarn-project/aztec.js/src/contract/contract_function_interaction.ts +++ b/yarn-project/aztec.js/src/contract/contract_function_interaction.ts @@ -3,7 +3,7 @@ import { type AztecAddress, FunctionData, TxContext } from '@aztec/circuits.js'; import { type FunctionAbi, FunctionType, encodeArguments } from '@aztec/foundation/abi'; import { type Wallet } from '../account/wallet.js'; -import { BaseContractInteraction, SendMethodOptions } from './base_contract_interaction.js'; +import { BaseContractInteraction, type SendMethodOptions } from './base_contract_interaction.js'; export { SendMethodOptions }; diff --git a/yarn-project/aztec/package.json b/yarn-project/aztec/package.json index e693c48b7f6..19a4ca67445 100644 --- a/yarn-project/aztec/package.json +++ b/yarn-project/aztec/package.json @@ -20,7 +20,7 @@ "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", "build:dev": "tsc -b --watch", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests", "run:example:token": "DEBUG='aztec:*' node ./dest/examples/token.js" }, "inherits": [ @@ -62,17 +62,23 @@ "@types/jest": "^29.5.0", "@types/koa": "^2.13.6", "jest": "^29.5.0", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" + "rootDir": "./src", + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "engines": { "node": ">=18" diff --git a/yarn-project/circuit-types/package.json b/yarn-project/circuit-types/package.json index fbf2b25be3b..d0a245f9f42 100644 --- a/yarn-project/circuit-types/package.json +++ b/yarn-project/circuit-types/package.json @@ -23,18 +23,25 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests" }, "inherits": [ "../package.common.json" ], "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" + "rootDir": "./src", + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "dependencies": { "@aztec/circuits.js": "workspace:^", @@ -56,7 +63,6 @@ "@types/node": "^18.7.23", "jest": "^29.5.0", "jest-mock-extended": "^3.0.3", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, diff --git a/yarn-project/circuits.js/jest.config.ts b/yarn-project/circuits.js/jest.config.ts deleted file mode 100644 index 83d85d85f9b..00000000000 --- a/yarn-project/circuits.js/jest.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { Config } from 'jest'; - -const config: Config = { - preset: 'ts-jest/presets/default-esm', - moduleNameMapper: { - '^(\\.{1,2}/.*)\\.[cm]?js$': '$1', - }, - testRegex: './src/.*\\.test\\.(js|mjs|ts)$', - rootDir: './src', -}; - -export default config; diff --git a/yarn-project/circuits.js/package.json b/yarn-project/circuits.js/package.json index 4584f83c848..ad9e4e7cd81 100644 --- a/yarn-project/circuits.js/package.json +++ b/yarn-project/circuits.js/package.json @@ -2,6 +2,10 @@ "name": "@aztec/circuits.js", "version": "0.1.0", "type": "module", + "inherits": [ + "../package.common.json", + "./package.local.json" + ], "exports": { ".": "./dest/index.js", "./hash": "./dest/hash/index.js", @@ -29,7 +33,7 @@ "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", "remake-constants": "node --loader ts-node/esm src/scripts/constants.in.ts && prettier -w src/constants.gen.ts && cd ../../l1-contracts && ./.foundry/bin/forge fmt", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests" }, "dependencies": { "@aztec/bb.js": "portal:../../barretenberg/ts", @@ -46,7 +50,6 @@ "@types/node": "^18.7.23", "jest": "^29.5.0", "prettier": "^2.8.4", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, @@ -58,5 +61,20 @@ "types": "./dest/index.d.ts", "engines": { "node": ">=18" + }, + "jest": { + "extensionsToTreatAsEsm": [ + ".ts" + ], + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "moduleNameMapper": { + "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" + }, + "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", + "rootDir": "./src" } } diff --git a/yarn-project/circuits.js/package.local.json b/yarn-project/circuits.js/package.local.json new file mode 100644 index 00000000000..6b4e2e7041b --- /dev/null +++ b/yarn-project/circuits.js/package.local.json @@ -0,0 +1,5 @@ +{ + "scripts": { + "build": "yarn clean && yarn generate && tsc -b" + } +} diff --git a/yarn-project/cli/package.json b/yarn-project/cli/package.json index 98b3f1bf879..8ccbe353260 100644 --- a/yarn-project/cli/package.json +++ b/yarn-project/cli/package.json @@ -19,19 +19,26 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests", "start": "node --no-warnings ./dest/bin/index.js" }, "inherits": [ "../package.common.json" ], "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" + "rootDir": "./src", + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "dependencies": { "@aztec/accounts": "workspace:^", @@ -64,7 +71,6 @@ "@types/source-map-support": "^0.5.10", "jest": "^29.5.0", "jest-mock-extended": "^3.0.5", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, diff --git a/yarn-project/end-to-end/jest.integration.config.json b/yarn-project/end-to-end/jest.integration.config.json index d9dc9cf2dbb..c29166140a6 100644 --- a/yarn-project/end-to-end/jest.integration.config.json +++ b/yarn-project/end-to-end/jest.integration.config.json @@ -1,10 +1,8 @@ { - "preset": "ts-jest/presets/default-esm", - "globals": { - "ts-jest": { - "useESM": true - } + "transform": { + "^.+\\.tsx?$": ["@swc/jest"] }, + "extensionsToTreatAsEsm": [".ts"], "moduleNameMapper": { "^(\\.{1,2}/.*)\\.js$": "$1" }, diff --git a/yarn-project/end-to-end/package.json b/yarn-project/end-to-end/package.json index 00f3077716b..4e0050f4a64 100644 --- a/yarn-project/end-to-end/package.json +++ b/yarn-project/end-to-end/package.json @@ -64,7 +64,6 @@ "resolve-typescript-plugin": "^2.0.1", "stream-browserify": "^3.0.0", "string-argv": "^0.3.2", - "ts-jest": "^29.1.0", "ts-loader": "^9.4.4", "ts-node": "^10.9.1", "tslib": "^2.4.0", diff --git a/yarn-project/entrypoints/package.json b/yarn-project/entrypoints/package.json index 586e59570b5..7e62b41ff6d 100644 --- a/yarn-project/entrypoints/package.json +++ b/yarn-project/entrypoints/package.json @@ -23,18 +23,25 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests" }, "inherits": [ "../package.common.json" ], "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" + "rootDir": "./src", + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "dependencies": { "@aztec/aztec.js": "workspace:^", @@ -48,7 +55,6 @@ "@jest/globals": "^29.5.0", "@types/jest": "^29.5.0", "jest": "^29.5.0", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, diff --git a/yarn-project/ethereum/package.json b/yarn-project/ethereum/package.json index 6cb69e9451f..f844712e9ef 100644 --- a/yarn-project/ethereum/package.json +++ b/yarn-project/ethereum/package.json @@ -18,7 +18,7 @@ "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", "start:dev": "tsc-watch -p tsconfig.json --onSuccess 'yarn start'", "start": "node ./dest/index.js", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests" }, "inherits": [ "../package.common.json" @@ -34,7 +34,6 @@ "@types/jest": "^29.5.0", "@types/node": "^18.14.6", "jest": "^29.5.0", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, @@ -45,12 +44,19 @@ ], "types": "./dest/index.d.ts", "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" + "rootDir": "./src", + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "engines": { "node": ">=18" diff --git a/yarn-project/foundation/package.json b/yarn-project/foundation/package.json index 41e639e51f2..e4da9fc5363 100644 --- a/yarn-project/foundation/package.json +++ b/yarn-project/foundation/package.json @@ -48,19 +48,25 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test:light": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests" }, "inherits": [ "../package.common.json" ], "jest": { - "preset": "ts-jest/presets/default-esm", + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" + "rootDir": "./src", + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "dependencies": { "@aztec/bb.js": "portal:../../barretenberg/ts", @@ -116,7 +122,6 @@ "jest": "^29.5.0", "prettier": "^2.7.1", "supertest": "^6.3.3", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, diff --git a/yarn-project/key-store/package.json b/yarn-project/key-store/package.json index d3283515ac1..27830c38bae 100644 --- a/yarn-project/key-store/package.json +++ b/yarn-project/key-store/package.json @@ -16,18 +16,25 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests" }, "inherits": [ "../package.common.json" ], "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" + "rootDir": "./src", + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "dependencies": { "@aztec/circuit-types": "workspace:^", @@ -41,7 +48,6 @@ "@types/jest": "^29.5.0", "@types/node": "^18.7.23", "jest": "^29.5.0", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, diff --git a/yarn-project/kv-store/package.json b/yarn-project/kv-store/package.json index 55808c67312..d5bfb66aec4 100644 --- a/yarn-project/kv-store/package.json +++ b/yarn-project/kv-store/package.json @@ -13,20 +13,27 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests", "start": "DEBUG='aztec:*' && node ./dest/bin/index.js" }, "inherits": [ "../package.common.json" ], "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", "rootDir": "./src", - "workerThreads": true + "workerThreads": true, + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "dependencies": { "@aztec/foundation": "workspace:^", @@ -38,7 +45,6 @@ "@types/node": "^18.7.23", "jest": "^29.5.0", "jest-mock-extended": "^3.0.3", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, diff --git a/yarn-project/merkle-tree/package.json b/yarn-project/merkle-tree/package.json index 75bb7b0e2bf..70f816d62b5 100644 --- a/yarn-project/merkle-tree/package.json +++ b/yarn-project/merkle-tree/package.json @@ -16,20 +16,27 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests" }, "inherits": [ "../package.common.json", "./package.local.json" ], "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", "rootDir": "./src", - "testTimeout": 15000 + "testTimeout": 15000, + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "dependencies": { "@aztec/circuit-types": "workspace:^", @@ -46,7 +53,6 @@ "@types/node": "^18.15.3", "@types/sha256": "^0.2.0", "jest": "^29.5.0", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, diff --git a/yarn-project/noir-compiler/package.json b/yarn-project/noir-compiler/package.json index 3f0703c3134..110a881ff8f 100644 --- a/yarn-project/noir-compiler/package.json +++ b/yarn-project/noir-compiler/package.json @@ -23,13 +23,12 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests" }, "inherits": [ "../package.common.json" ], "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, @@ -41,8 +40,13 @@ "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", "rootDir": "./src", "transform": { - "^.+\\.cts$": "ts-jest" - } + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "dependencies": { "@aztec/circuits.js": "workspace:^", @@ -70,7 +74,6 @@ "@types/pako": "^2.0.0", "@types/semver": "^7.5.4", "jest": "^29.5.0", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, diff --git a/yarn-project/noir-contracts.js/package.json b/yarn-project/noir-contracts.js/package.json index b8c6324b1c3..5d3d3fc7f6c 100644 --- a/yarn-project/noir-contracts.js/package.json +++ b/yarn-project/noir-contracts.js/package.json @@ -13,7 +13,7 @@ "clean": "rm -rf .tsbuildinfo ./artifacts ./codegenCache.json", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests", "generate": "yarn generate:noir-contracts", "generate:noir-contracts": "./scripts/generate-types.sh && run -T prettier -w ./src --loglevel warn" }, @@ -22,12 +22,19 @@ "./package.local.json" ], "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" + "rootDir": "./src", + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "dependencies": { "@aztec/aztec.js": "workspace:^", @@ -38,7 +45,6 @@ "@jest/globals": "^29.5.0", "@types/jest": "^29.5.0", "jest": "^29.5.0", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, diff --git a/yarn-project/noir-protocol-circuits-types/package.json b/yarn-project/noir-protocol-circuits-types/package.json index 0656a50551b..faa2d64f07b 100644 --- a/yarn-project/noir-protocol-circuits-types/package.json +++ b/yarn-project/noir-protocol-circuits-types/package.json @@ -17,7 +17,6 @@ "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" }, "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, @@ -44,7 +43,6 @@ "jest": "^29.5.0", "levelup": "^5.1.1", "memdown": "^6.1.1", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, diff --git a/yarn-project/p2p-bootstrap/package.json b/yarn-project/p2p-bootstrap/package.json index 8853e898b11..c715d62a522 100644 --- a/yarn-project/p2p-bootstrap/package.json +++ b/yarn-project/p2p-bootstrap/package.json @@ -18,7 +18,7 @@ "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", "start:dev": "tsc-watch -p tsconfig.json --onSuccess 'yarn start'", "start": "node ./dest/index.js", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests" }, "inherits": [ "../package.common.json" @@ -34,7 +34,6 @@ "@types/jest": "^29.5.0", "@types/node": "^18.14.6", "jest": "^29.5.0", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, @@ -45,12 +44,19 @@ ], "types": "./dest/index.d.ts", "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" + "rootDir": "./src", + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "engines": { "node": ">=18" diff --git a/yarn-project/p2p/package.json b/yarn-project/p2p/package.json index 1e4aab4e5ef..61c052d6f1f 100644 --- a/yarn-project/p2p/package.json +++ b/yarn-project/p2p/package.json @@ -16,7 +16,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests", "start": "node ./dest", "start:dev": "tsc-watch -p tsconfig.json --onSuccess 'yarn start'" }, @@ -24,12 +24,19 @@ "../package.common.json" ], "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" + "rootDir": "./src", + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "dependencies": { "@aztec/circuit-types": "workspace:^", @@ -58,7 +65,6 @@ "@types/node": "^18.14.6", "jest": "^29.5.0", "jest-mock-extended": "^3.0.4", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, diff --git a/yarn-project/package.common.json b/yarn-project/package.common.json index 57e7aa40182..3baad97350e 100644 --- a/yarn-project/package.common.json +++ b/yarn-project/package.common.json @@ -5,7 +5,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests" }, "engines": { "node": ">=18" @@ -16,11 +16,11 @@ "@types/jest": "^29.5.0", "jest": "^29.5.0", "typescript": "^5.0.4", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1" }, "jest": { - "preset": "ts-jest/presets/default-esm", + "extensionsToTreatAsEsm": [".ts"], + "transform": { "^.+\\.tsx?$": ["@swc/jest"] }, "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, diff --git a/yarn-project/package.json b/yarn-project/package.json index 099b942e593..a74c1f2f628 100644 --- a/yarn-project/package.json +++ b/yarn-project/package.json @@ -15,7 +15,7 @@ "build:fast": "yarn generate && tsc -b", "build:dev": "./watch.sh", "generate": "FORCE_COLOR=true yarn workspaces foreach --parallel --topological-dev --verbose run generate", - "clean": "yarn workspaces foreach -p -v run clean " + "clean": "yarn workspaces foreach -p -v run clean" }, "workspaces": [ "accounts", @@ -55,6 +55,8 @@ "prettier": "@aztec/foundation/prettier", "devDependencies": { "@monorepo-utils/workspaces-to-typescript-project-references": "^2.9.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@trivago/prettier-plugin-sort-imports": "^4.1.1", "eslint": "^8.21.0", "eslint-import-resolver-typescript": "^3.5.5", @@ -65,8 +67,6 @@ "typescript": "^5.0.4" }, "resolutions": { - "ts-jest@^29.1.0": "patch:ts-jest@npm%3A29.1.1#./.yarn/patches/ts-jest-npm-29.1.1-04e888e48e.patch", - "ts-jest@^29.1.1": "patch:ts-jest@npm%3A29.1.1#./.yarn/patches/ts-jest-npm-29.1.1-04e888e48e.patch", "@aztec/bb.js": "portal:../barretenberg/ts", "@noir-lang/acvm_js": "portal:../noir/packages/acvm_js", "@noir-lang/types": "portal:../noir/packages/types", diff --git a/yarn-project/protocol-contracts/package.json b/yarn-project/protocol-contracts/package.json index 7bd6ed8c27d..d0d254c2dee 100644 --- a/yarn-project/protocol-contracts/package.json +++ b/yarn-project/protocol-contracts/package.json @@ -26,19 +26,26 @@ "clean": "rm -rf ./dest .tsbuildinfo ./src/artifacts", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests" }, "inherits": [ "../package.common.json", "./package.local.json" ], "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" + "rootDir": "./src", + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "dependencies": { "@aztec/circuits.js": "workspace:^", @@ -54,7 +61,6 @@ "@types/node": "^18.7.23", "jest": "^29.5.0", "jest-mock-extended": "^3.0.3", - "ts-jest": "^29.1.0", "ts-loader": "^9.4.4", "ts-node": "^10.9.1", "typescript": "^5.0.4" diff --git a/yarn-project/prover-client/package.json b/yarn-project/prover-client/package.json index a1b03a69775..6071ba9ad4a 100644 --- a/yarn-project/prover-client/package.json +++ b/yarn-project/prover-client/package.json @@ -16,18 +16,25 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests" }, "inherits": [ "../package.common.json" ], "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" + "rootDir": "./src", + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "dependencies": { "@aztec/circuit-types": "workspace:^", @@ -47,7 +54,6 @@ "@types/node": "^18.7.23", "jest": "^29.5.0", "jest-mock-extended": "^3.0.3", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, diff --git a/yarn-project/pxe/package.json b/yarn-project/pxe/package.json index 8a28a6da967..563ac0c866f 100644 --- a/yarn-project/pxe/package.json +++ b/yarn-project/pxe/package.json @@ -17,20 +17,27 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests", "start": "DEBUG='aztec:*' && node ./dest/bin/index.js" }, "inherits": [ "../package.common.json" ], "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", "rootDir": "./src", - "workerThreads": true + "workerThreads": true, + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "dependencies": { "@aztec/circuit-types": "workspace:^", @@ -59,7 +66,6 @@ "@types/node": "^18.7.23", "jest": "^29.5.0", "jest-mock-extended": "^3.0.3", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, diff --git a/yarn-project/scripts/package.json b/yarn-project/scripts/package.json index 154b80198a5..94e2988785e 100644 --- a/yarn-project/scripts/package.json +++ b/yarn-project/scripts/package.json @@ -18,7 +18,7 @@ "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", "start:dev": "tsc-watch -p tsconfig.json --onSuccess 'yarn start'", "start": "node ./dest/index.js", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests", "generate:noir-circuits": "echo Noop", "generate:noir-contracts": "echo Noop", "generate:l1-contracts": "echo Noop", @@ -42,7 +42,6 @@ "@types/lodash.pick": "^4.4.7", "@types/node": "^18.14.6", "jest": "^29.5.0", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, @@ -53,12 +52,19 @@ ], "types": "./dest/index.d.ts", "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" + "rootDir": "./src", + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "engines": { "node": ">=18" diff --git a/yarn-project/sequencer-client/jest.integration.config.json b/yarn-project/sequencer-client/jest.integration.config.json index 6e18da6f18e..a6ed7527b34 100644 --- a/yarn-project/sequencer-client/jest.integration.config.json +++ b/yarn-project/sequencer-client/jest.integration.config.json @@ -1,10 +1,8 @@ { - "preset": "ts-jest/presets/default-esm", - "globals": { - "ts-jest": { - "useESM": true - } + "transform": { + "^.+\\.tsx?$": ["@swc/jest"] }, + "extensionsToTreatAsEsm": [".ts"], "moduleNameMapper": { "^(\\.{1,2}/.*)\\.js$": "$1" }, diff --git a/yarn-project/sequencer-client/package.json b/yarn-project/sequencer-client/package.json index 76801f120d2..843bf99f306 100644 --- a/yarn-project/sequencer-client/package.json +++ b/yarn-project/sequencer-client/package.json @@ -56,7 +56,6 @@ "levelup": "^5.1.1", "memdown": "^6.1.1", "prettier": "^2.8.7", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, diff --git a/yarn-project/simulator/package.json b/yarn-project/simulator/package.json index 3999470cf4d..a42ff7c0d1b 100644 --- a/yarn-project/simulator/package.json +++ b/yarn-project/simulator/package.json @@ -16,18 +16,25 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests" }, "inherits": [ "../package.common.json" ], "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" + "rootDir": "./src", + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "dependencies": { "@aztec/circuit-types": "workspace:^", @@ -53,7 +60,6 @@ "jest": "^29.5.0", "jest-mock-extended": "^3.0.4", "lodash.merge": "^4.6.2", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4", "viem": "^2.7.15" diff --git a/yarn-project/simulator/src/public/index.ts b/yarn-project/simulator/src/public/index.ts index c5297f5ad00..7791d89ec4e 100644 --- a/yarn-project/simulator/src/public/index.ts +++ b/yarn-project/simulator/src/public/index.ts @@ -1,7 +1,7 @@ export * from './db.js'; export { - PublicExecution, - PublicExecutionResult, + type PublicExecution, + type PublicExecutionResult, isPublicExecutionResult, collectPublicDataReads, collectPublicDataUpdateRequests, diff --git a/yarn-project/types/package.json b/yarn-project/types/package.json index 724ff7853dd..9832f31fb76 100644 --- a/yarn-project/types/package.json +++ b/yarn-project/types/package.json @@ -18,8 +18,7 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test:light": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests", "generate": "yarn generate:noir-contracts", "generate:noir-contracts": "./scripts/copy-contracts.sh" }, @@ -28,12 +27,19 @@ "./package.local.json" ], "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" + "rootDir": "./src", + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "dependencies": { "@aztec/ethereum": "workspace:^", @@ -56,7 +62,6 @@ "jest": "^29.5.0", "prettier": "^2.7.1", "supertest": "^6.3.3", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, diff --git a/yarn-project/world-state/package.json b/yarn-project/world-state/package.json index e65cae9fcc1..2cae20bf522 100644 --- a/yarn-project/world-state/package.json +++ b/yarn-project/world-state/package.json @@ -16,18 +16,25 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests" }, "inherits": [ "../package.common.json" ], "jest": { - "preset": "ts-jest/presets/default-esm", "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" + "rootDir": "./src", + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "extensionsToTreatAsEsm": [ + ".ts" + ] }, "dependencies": { "@aztec/circuit-types": "workspace:^", @@ -47,7 +54,6 @@ "jest": "^29.5.0", "jest-mock-extended": "^3.0.5", "memdown": "^6.1.1", - "ts-jest": "^29.1.0", "ts-node": "^10.9.1", "typescript": "^5.0.4" }, diff --git a/yarn-project/yarn.lock b/yarn-project/yarn.lock index d7b669b926e..75a80018296 100644 --- a/yarn-project/yarn.lock +++ b/yarn-project/yarn.lock @@ -73,7 +73,6 @@ __metadata: "@types/node": ^18.7.23 jest: ^29.5.0 jest-mock-extended: ^3.0.3 - ts-jest: ^29.1.0 ts-loader: ^9.4.4 ts-node: ^10.9.1 tslib: ^2.4.0 @@ -107,7 +106,6 @@ __metadata: lmdb: ^2.9.2 lodash.groupby: ^4.6.0 lodash.omit: ^4.5.0 - ts-jest: ^29.1.0 ts-node: ^10.9.1 tsc-watch: ^6.0.0 tslib: ^2.5.0 @@ -130,7 +128,6 @@ __metadata: koa: ^2.14.2 koa-cors: ^0.0.16 koa-router: ^12.0.0 - ts-jest: ^29.1.0 ts-node: ^10.9.1 typescript: ^5.0.4 viem: ^2.7.15 @@ -163,7 +160,6 @@ __metadata: jest: ^29.5.0 koa: ^2.14.2 koa-router: ^12.0.0 - ts-jest: ^29.1.0 ts-node: ^10.9.1 tslib: ^2.4.0 typescript: ^5.0.4 @@ -192,7 +188,6 @@ __metadata: process: ^0.11.10 resolve-typescript-plugin: ^2.0.1 stream-browserify: ^3.0.0 - ts-jest: ^29.1.0 ts-loader: ^9.4.4 ts-node: ^10.9.1 tslib: ^2.4.0 @@ -209,6 +204,8 @@ __metadata: resolution: "@aztec/aztec3-packages@workspace:." dependencies: "@monorepo-utils/workspaces-to-typescript-project-references": ^2.9.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@trivago/prettier-plugin-sort-imports": ^4.1.1 eslint: ^8.21.0 eslint-import-resolver-typescript: ^3.5.5 @@ -248,7 +245,6 @@ __metadata: jest: ^29.5.0 koa: ^2.14.2 koa-router: ^12.0.0 - ts-jest: ^29.1.0 ts-node: ^10.9.1 typescript: ^5.0.4 viem: ^2.7.15 @@ -292,7 +288,6 @@ __metadata: lodash.clonedeep: ^4.5.0 lodash.isequal: ^4.5.0 lodash.times: ^4.3.2 - ts-jest: ^29.1.0 ts-node: ^10.9.1 tslib: ^2.5.0 typescript: ^5.0.4 @@ -314,7 +309,6 @@ __metadata: jest: ^29.5.0 lodash.chunk: ^4.2.0 prettier: ^2.8.4 - ts-jest: ^29.1.0 ts-node: ^10.9.1 tslib: ^2.4.0 typescript: ^5.0.4 @@ -351,7 +345,6 @@ __metadata: node-fetch: ^3.3.2 semver: ^7.5.4 source-map-support: ^0.5.21 - ts-jest: ^29.1.0 ts-node: ^10.9.1 tslib: ^2.4.0 typescript: ^5.0.4 @@ -422,7 +415,6 @@ __metadata: resolve-typescript-plugin: ^2.0.1 stream-browserify: ^3.0.0 string-argv: ^0.3.2 - ts-jest: ^29.1.0 ts-loader: ^9.4.4 ts-node: ^10.9.1 tslib: ^2.4.0 @@ -448,7 +440,6 @@ __metadata: "@jest/globals": ^29.5.0 "@types/jest": ^29.5.0 jest: ^29.5.0 - ts-jest: ^29.1.0 ts-node: ^10.9.1 tslib: ^2.4.0 typescript: ^5.0.4 @@ -465,7 +456,6 @@ __metadata: "@types/node": ^18.14.6 dotenv: ^16.0.3 jest: ^29.5.0 - ts-jest: ^29.1.0 ts-node: ^10.9.1 tslib: ^2.4.0 typescript: ^5.0.4 @@ -527,7 +517,6 @@ __metadata: prettier: ^2.7.1 sha3: ^2.1.4 supertest: ^6.3.3 - ts-jest: ^29.1.0 ts-node: ^10.9.1 typescript: ^5.0.4 zod: ^3.22.4 @@ -546,7 +535,6 @@ __metadata: "@types/jest": ^29.5.0 "@types/node": ^18.7.23 jest: ^29.5.0 - ts-jest: ^29.1.0 ts-node: ^10.9.1 tslib: ^2.4.0 typescript: ^5.0.4 @@ -564,7 +552,6 @@ __metadata: jest: ^29.5.0 jest-mock-extended: ^3.0.3 lmdb: ^2.9.2 - ts-jest: ^29.1.0 ts-node: ^10.9.1 typescript: ^5.0.4 languageName: unknown @@ -596,7 +583,6 @@ __metadata: "@types/sha256": ^0.2.0 jest: ^29.5.0 sha256: ^0.2.0 - ts-jest: ^29.1.0 ts-node: ^10.9.1 tslib: ^2.4.0 typescript: ^5.0.4 @@ -628,7 +614,6 @@ __metadata: memfs: ^4.6.0 pako: ^2.1.0 semver: ^7.5.4 - ts-jest: ^29.1.0 ts-node: ^10.9.1 tslib: ^2.4.0 typescript: ^5.0.4 @@ -647,7 +632,6 @@ __metadata: "@jest/globals": ^29.5.0 "@types/jest": ^29.5.0 jest: ^29.5.0 - ts-jest: ^29.1.0 ts-node: ^10.9.1 tslib: ^2.4.0 typescript: ^5.0.4 @@ -674,7 +658,6 @@ __metadata: jest: ^29.5.0 levelup: ^5.1.1 memdown: ^6.1.1 - ts-jest: ^29.1.0 ts-node: ^10.9.1 tslib: ^2.4.0 typescript: ^5.0.4 @@ -692,7 +675,6 @@ __metadata: "@types/node": ^18.14.6 dotenv: ^16.0.3 jest: ^29.5.0 - ts-jest: ^29.1.0 ts-node: ^10.9.1 tslib: ^2.4.0 typescript: ^5.0.4 @@ -726,7 +708,6 @@ __metadata: jest-mock-extended: ^3.0.4 libp2p: ^0.46.6 sha3: ^2.1.4 - ts-jest: ^29.1.0 ts-node: ^10.9.1 tslib: ^2.4.0 typescript: ^5.0.4 @@ -747,7 +728,6 @@ __metadata: jest: ^29.5.0 jest-mock-extended: ^3.0.3 lodash.omit: ^4.5.0 - ts-jest: ^29.1.0 ts-loader: ^9.4.4 ts-node: ^10.9.1 tslib: ^2.4.0 @@ -773,7 +753,6 @@ __metadata: jest: ^29.5.0 jest-mock-extended: ^3.0.3 lodash.chunk: ^4.2.0 - ts-jest: ^29.1.0 ts-node: ^10.9.1 tslib: ^2.4.0 typescript: ^5.0.4 @@ -806,7 +785,6 @@ __metadata: koa-router: ^12.0.0 lodash.omit: ^4.5.0 sha3: ^2.1.4 - ts-jest: ^29.1.0 ts-node: ^10.9.1 tslib: ^2.4.0 typescript: ^5.0.4 @@ -829,7 +807,6 @@ __metadata: fs-extra: ^11.1.1 jest: ^29.5.0 lodash.pick: ^4.4.0 - ts-jest: ^29.1.0 ts-node: ^10.9.1 tslib: ^2.4.0 typescript: ^5.0.4 @@ -876,7 +853,6 @@ __metadata: lodash.pick: ^4.4.0 memdown: ^6.1.1 prettier: ^2.8.7 - ts-jest: ^29.1.0 ts-node: ^10.9.1 tslib: ^2.4.0 typescript: ^5.0.4 @@ -908,7 +884,6 @@ __metadata: levelup: ^5.1.1 lodash.merge: ^4.6.2 memdown: ^6.1.1 - ts-jest: ^29.1.0 ts-node: ^10.9.1 tslib: ^2.4.0 typescript: ^5.0.4 @@ -938,7 +913,6 @@ __metadata: jest: ^29.5.0 prettier: ^2.7.1 supertest: ^6.3.3 - ts-jest: ^29.1.0 ts-node: ^10.9.1 typescript: ^5.0.4 languageName: unknown @@ -962,7 +936,6 @@ __metadata: jest: ^29.5.0 jest-mock-extended: ^3.0.5 memdown: ^6.1.1 - ts-jest: ^29.1.0 ts-node: ^10.9.1 tslib: ^2.4.0 typescript: ^5.0.4 @@ -1854,6 +1827,15 @@ __metadata: languageName: node linkType: hard +"@jest/create-cache-key-function@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/create-cache-key-function@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + checksum: 681bc761fa1d6fa3dd77578d444f97f28296ea80755e90e46d1c8fa68661b9e67f54dd38b988742db636d26cf160450dc6011892cec98b3a7ceb58cad8ff3aae + languageName: node + linkType: hard + "@jest/environment@npm:^29.7.0": version: 29.7.0 resolution: "@jest/environment@npm:29.7.0" @@ -2917,6 +2899,151 @@ __metadata: languageName: node linkType: hard +"@swc/core-darwin-arm64@npm:1.4.11": + version: 1.4.11 + resolution: "@swc/core-darwin-arm64@npm:1.4.11" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@swc/core-darwin-x64@npm:1.4.11": + version: 1.4.11 + resolution: "@swc/core-darwin-x64@npm:1.4.11" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@swc/core-linux-arm-gnueabihf@npm:1.4.11": + version: 1.4.11 + resolution: "@swc/core-linux-arm-gnueabihf@npm:1.4.11" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@swc/core-linux-arm64-gnu@npm:1.4.11": + version: 1.4.11 + resolution: "@swc/core-linux-arm64-gnu@npm:1.4.11" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@swc/core-linux-arm64-musl@npm:1.4.11": + version: 1.4.11 + resolution: "@swc/core-linux-arm64-musl@npm:1.4.11" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@swc/core-linux-x64-gnu@npm:1.4.11": + version: 1.4.11 + resolution: "@swc/core-linux-x64-gnu@npm:1.4.11" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@swc/core-linux-x64-musl@npm:1.4.11": + version: 1.4.11 + resolution: "@swc/core-linux-x64-musl@npm:1.4.11" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@swc/core-win32-arm64-msvc@npm:1.4.11": + version: 1.4.11 + resolution: "@swc/core-win32-arm64-msvc@npm:1.4.11" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@swc/core-win32-ia32-msvc@npm:1.4.11": + version: 1.4.11 + resolution: "@swc/core-win32-ia32-msvc@npm:1.4.11" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@swc/core-win32-x64-msvc@npm:1.4.11": + version: 1.4.11 + resolution: "@swc/core-win32-x64-msvc@npm:1.4.11" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@swc/core@npm:^1.4.11": + version: 1.4.11 + resolution: "@swc/core@npm:1.4.11" + dependencies: + "@swc/core-darwin-arm64": 1.4.11 + "@swc/core-darwin-x64": 1.4.11 + "@swc/core-linux-arm-gnueabihf": 1.4.11 + "@swc/core-linux-arm64-gnu": 1.4.11 + "@swc/core-linux-arm64-musl": 1.4.11 + "@swc/core-linux-x64-gnu": 1.4.11 + "@swc/core-linux-x64-musl": 1.4.11 + "@swc/core-win32-arm64-msvc": 1.4.11 + "@swc/core-win32-ia32-msvc": 1.4.11 + "@swc/core-win32-x64-msvc": 1.4.11 + "@swc/counter": ^0.1.2 + "@swc/types": ^0.1.5 + peerDependencies: + "@swc/helpers": ^0.5.0 + dependenciesMeta: + "@swc/core-darwin-arm64": + optional: true + "@swc/core-darwin-x64": + optional: true + "@swc/core-linux-arm-gnueabihf": + optional: true + "@swc/core-linux-arm64-gnu": + optional: true + "@swc/core-linux-arm64-musl": + optional: true + "@swc/core-linux-x64-gnu": + optional: true + "@swc/core-linux-x64-musl": + optional: true + "@swc/core-win32-arm64-msvc": + optional: true + "@swc/core-win32-ia32-msvc": + optional: true + "@swc/core-win32-x64-msvc": + optional: true + peerDependenciesMeta: + "@swc/helpers": + optional: true + checksum: 3af0cbfc89c2fc06ac7796e4c7e584a534fb21d2a9e688fe9b53192b09b41f5c7c9b6aa39ac89c32aead245966f00283240c898de501ea8908d2f392e999dc9b + languageName: node + linkType: hard + +"@swc/counter@npm:^0.1.2, @swc/counter@npm:^0.1.3": + version: 0.1.3 + resolution: "@swc/counter@npm:0.1.3" + checksum: df8f9cfba9904d3d60f511664c70d23bb323b3a0803ec9890f60133954173047ba9bdeabce28cd70ba89ccd3fd6c71c7b0bd58be85f611e1ffbe5d5c18616598 + languageName: node + linkType: hard + +"@swc/jest@npm:^0.2.36": + version: 0.2.36 + resolution: "@swc/jest@npm:0.2.36" + dependencies: + "@jest/create-cache-key-function": ^29.7.0 + "@swc/counter": ^0.1.3 + jsonc-parser: ^3.2.0 + peerDependencies: + "@swc/core": "*" + checksum: 14f2e696ac093e23dae1e2e57d894bbcde4de6fe80341a26c8d0d8cbae5aae31832f8fa32dc698529f128d19a76aeedf2227f59480de6dab5eb3f30bfdf9b71a + languageName: node + linkType: hard + +"@swc/types@npm:^0.1.5": + version: 0.1.6 + resolution: "@swc/types@npm:0.1.6" + dependencies: + "@swc/counter": ^0.1.3 + checksum: fd579fbb9ab220b01b8eec03e32c37d355efbbce12e408e4c2743ca147760b749e068f5d3bec288b26bb10ecf2fe8d061c2554df0985d50d0e56962597262b34 + languageName: node + linkType: hard + "@tootallnate/quickjs-emscripten@npm:^0.23.0": version: 0.23.0 resolution: "@tootallnate/quickjs-emscripten@npm:0.23.0" @@ -4836,15 +4963,6 @@ __metadata: languageName: node linkType: hard -"bs-logger@npm:0.x": - version: 0.2.6 - resolution: "bs-logger@npm:0.2.6" - dependencies: - fast-json-stable-stringify: 2.x - checksum: d34bdaf68c64bd099ab97c3ea608c9ae7d3f5faa1178b3f3f345acd94e852e608b2d4f9103fb2e503f5e69780e98293df41691b84be909b41cf5045374d54606 - languageName: node - linkType: hard - "bser@npm:2.1.1": version: 2.1.1 resolution: "bser@npm:2.1.1" @@ -6848,7 +6966,7 @@ __metadata: languageName: node linkType: hard -"fast-json-stable-stringify@npm:2.x, fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": +"fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": version: 2.1.0 resolution: "fast-json-stable-stringify@npm:2.1.0" checksum: b191531e36c607977e5b1c47811158733c34ccb3bfde92c44798929e9b4154884378536d26ad90dfecd32e1ffc09c545d23535ad91b3161a27ddbb8ebe0cbecb @@ -8930,7 +9048,7 @@ __metadata: languageName: node linkType: hard -"jest-util@npm:^29.0.0, jest-util@npm:^29.7.0": +"jest-util@npm:^29.7.0": version: 29.7.0 resolution: "jest-util@npm:29.7.0" dependencies: @@ -9622,13 +9740,6 @@ __metadata: languageName: node linkType: hard -"lodash.memoize@npm:4.x": - version: 4.1.2 - resolution: "lodash.memoize@npm:4.1.2" - checksum: 9ff3942feeccffa4f1fafa88d32f0d24fdc62fd15ded5a74a5f950ff5f0c6f61916157246744c620173dddf38d37095a92327d5fd3861e2063e736a5c207d089 - languageName: node - linkType: hard - "lodash.merge@npm:^4.6.2": version: 4.6.2 resolution: "lodash.merge@npm:4.6.2" @@ -9787,7 +9898,7 @@ __metadata: languageName: node linkType: hard -"make-error@npm:1.x, make-error@npm:^1.1.1": +"make-error@npm:^1.1.1": version: 1.3.6 resolution: "make-error@npm:1.3.6" checksum: b86e5e0e25f7f777b77fabd8e2cbf15737972869d852a22b7e73c17623928fccb826d8e46b9951501d3f20e51ad74ba8c59ed584f610526a48f8ccf88aaec402 @@ -12760,72 +12871,6 @@ __metadata: languageName: node linkType: hard -"ts-jest@npm:29.1.1": - version: 29.1.1 - resolution: "ts-jest@npm:29.1.1" - dependencies: - bs-logger: 0.x - fast-json-stable-stringify: 2.x - jest-util: ^29.0.0 - json5: ^2.2.3 - lodash.memoize: 4.x - make-error: 1.x - semver: ^7.5.3 - yargs-parser: ^21.0.1 - peerDependencies: - "@babel/core": ">=7.0.0-beta.0 <8" - "@jest/types": ^29.0.0 - babel-jest: ^29.0.0 - jest: ^29.0.0 - typescript: ">=4.3 <6" - peerDependenciesMeta: - "@babel/core": - optional: true - "@jest/types": - optional: true - babel-jest: - optional: true - esbuild: - optional: true - bin: - ts-jest: cli.js - checksum: a8c9e284ed4f819526749f6e4dc6421ec666f20ab44d31b0f02b4ed979975f7580b18aea4813172d43e39b29464a71899f8893dd29b06b4a351a3af8ba47b402 - languageName: node - linkType: hard - -"ts-jest@patch:ts-jest@npm%3A29.1.1#./.yarn/patches/ts-jest-npm-29.1.1-04e888e48e.patch::locator=%40aztec%2Faztec3-packages%40workspace%3A.": - version: 29.1.1 - resolution: "ts-jest@patch:ts-jest@npm%3A29.1.1#./.yarn/patches/ts-jest-npm-29.1.1-04e888e48e.patch::version=29.1.1&hash=e3c0a5&locator=%40aztec%2Faztec3-packages%40workspace%3A." - dependencies: - bs-logger: 0.x - fast-json-stable-stringify: 2.x - jest-util: ^29.0.0 - json5: ^2.2.3 - lodash.memoize: 4.x - make-error: 1.x - semver: ^7.5.3 - yargs-parser: ^21.0.1 - peerDependencies: - "@babel/core": ">=7.0.0-beta.0 <8" - "@jest/types": ^29.0.0 - babel-jest: ^29.0.0 - jest: ^29.0.0 - typescript: ">=4.3 <6" - peerDependenciesMeta: - "@babel/core": - optional: true - "@jest/types": - optional: true - babel-jest: - optional: true - esbuild: - optional: true - bin: - ts-jest: cli.js - checksum: 81022fc5cb39e8ab819e37a1cc68cd5e919849baf6573c27ceebcc61a4ba24048bcb7aac13c846396753b4a4a63b20c147cabfdc60727ef9acec835c770d9a8a - languageName: node - linkType: hard - "ts-loader@npm:^9.4.4": version: 9.5.1 resolution: "ts-loader@npm:9.5.1" @@ -13832,7 +13877,7 @@ __metadata: languageName: node linkType: hard -"yargs-parser@npm:^21.0.1, yargs-parser@npm:^21.1.1": +"yargs-parser@npm:^21.1.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1" checksum: ed2d96a616a9e3e1cc7d204c62ecc61f7aaab633dcbfab2c6df50f7f87b393993fe6640d017759fe112d0cb1e0119f2b4150a87305cc873fd90831c6a58ccf1c From c68eabf96223238e4c5cac2fd3e50d048642add3 Mon Sep 17 00:00:00 2001 From: Charlie Lye Date: Mon, 1 Apr 2024 21:54:57 +0000 Subject: [PATCH 2/7] fix --- yarn-project/end-to-end/jest.config.ts | 12 -------- yarn-project/end-to-end/package.json | 35 +++++++++++++++++++--- yarn-project/end-to-end/package.local.json | 7 +++++ 3 files changed, 38 insertions(+), 16 deletions(-) delete mode 100644 yarn-project/end-to-end/jest.config.ts create mode 100644 yarn-project/end-to-end/package.local.json diff --git a/yarn-project/end-to-end/jest.config.ts b/yarn-project/end-to-end/jest.config.ts deleted file mode 100644 index 83d85d85f9b..00000000000 --- a/yarn-project/end-to-end/jest.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { Config } from 'jest'; - -const config: Config = { - preset: 'ts-jest/presets/default-esm', - moduleNameMapper: { - '^(\\.{1,2}/.*)\\.[cm]?js$': '$1', - }, - testRegex: './src/.*\\.test\\.(js|mjs|ts)$', - rootDir: './src', -}; - -export default config; diff --git a/yarn-project/end-to-end/package.json b/yarn-project/end-to-end/package.json index 4e0050f4a64..1666dcad39d 100644 --- a/yarn-project/end-to-end/package.json +++ b/yarn-project/end-to-end/package.json @@ -3,6 +3,10 @@ "version": "0.0.0", "type": "module", "exports": "./dest/index.js", + "inherits": [ + "../package.common.json", + "./package.local.json" + ], "scripts": { "build": "yarn clean && tsc -b && webpack", "build:e2e": "yarn clean && tsc -b", @@ -11,9 +15,9 @@ "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src \"!src/web/main.js\" && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "DEBUG='aztec:*' NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --runInBand --testTimeout=60000 --forceExit", + "test": "DEBUG='aztec:*' NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --runInBand --testTimeout=60000 --forceExit", "test:integration": "concurrently -k -s first -c reset,dim -n test,anvil \"yarn test:integration:run\" \"anvil\"", - "test:integration:run": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --runInBand --config jest.integration.config.json" + "test:integration:run": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --no-cache --runInBand --config jest.integration.config.json" }, "dependencies": { "@aztec/accounts": "workspace:^", @@ -76,12 +80,35 @@ "winston": "^3.10.0" }, "devDependencies": { - "concurrently": "^7.6.0" + "@jest/globals": "^29.5.0", + "@types/jest": "^29.5.0", + "concurrently": "^7.6.0", + "jest": "^29.5.0", + "ts-node": "^10.9.1", + "typescript": "^5.0.4" }, "files": [ "dest", "src", "!*.test.*" ], - "types": "./dest/index.d.ts" + "types": "./dest/index.d.ts", + "engines": { + "node": ">=18" + }, + "jest": { + "extensionsToTreatAsEsm": [ + ".ts" + ], + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "moduleNameMapper": { + "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" + }, + "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", + "rootDir": "./src" + } } diff --git a/yarn-project/end-to-end/package.local.json b/yarn-project/end-to-end/package.local.json new file mode 100644 index 00000000000..70da0aee091 --- /dev/null +++ b/yarn-project/end-to-end/package.local.json @@ -0,0 +1,7 @@ +{ + "scripts": { + "build": "yarn clean && tsc -b && webpack", + "formatting": "run -T prettier --check ./src \"!src/web/main.js\" && run -T eslint ./src", + "test": "DEBUG='aztec:*' NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --runInBand --testTimeout=60000 --forceExit" + } +} From d40faaae4a43e8044294f800b4f66d7e085916cb Mon Sep 17 00:00:00 2001 From: Charlie Lye Date: Mon, 1 Apr 2024 22:52:07 +0000 Subject: [PATCH 3/7] fix maybe --- yarn-project/accounts/package.json | 2 + yarn-project/archiver/package.json | 2 + yarn-project/aztec-faucet/package.json | 2 + yarn-project/aztec-node/package.json | 2 + yarn-project/aztec.js/package.json | 2 + yarn-project/aztec/package.json | 2 + yarn-project/circuit-types/package.json | 2 + yarn-project/circuits.js/package.json | 2 + yarn-project/cli/package.json | 2 + yarn-project/end-to-end/package.json | 2 + yarn-project/entrypoints/package.json | 2 + yarn-project/ethereum/package.json | 2 + yarn-project/foundation/package.json | 2 + yarn-project/key-store/package.json | 2 + yarn-project/kv-store/package.json | 2 + yarn-project/merkle-tree/package.json | 2 + yarn-project/noir-compiler/package.json | 2 + yarn-project/noir-contracts.js/package.json | 2 + yarn-project/p2p-bootstrap/package.json | 2 + yarn-project/p2p/package.json | 2 + yarn-project/package.common.json | 2 + yarn-project/package.json | 2 - yarn-project/protocol-contracts/package.json | 2 + yarn-project/prover-client/package.json | 2 + yarn-project/pxe/package.json | 2 + yarn-project/scripts/package.json | 2 + yarn-project/simulator/package.json | 2 + yarn-project/types/package.json | 2 + yarn-project/world-state/package.json | 2 + yarn-project/yarn.lock | 56 +++++++++++++++++++- 30 files changed, 110 insertions(+), 4 deletions(-) diff --git a/yarn-project/accounts/package.json b/yarn-project/accounts/package.json index b78eb273ca5..353e845fbe9 100644 --- a/yarn-project/accounts/package.json +++ b/yarn-project/accounts/package.json @@ -64,6 +64,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/node": "^18.7.23", "jest": "^29.5.0", diff --git a/yarn-project/archiver/package.json b/yarn-project/archiver/package.json index 17e7cb0ffdf..1388a96f992 100644 --- a/yarn-project/archiver/package.json +++ b/yarn-project/archiver/package.json @@ -61,6 +61,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/debug": "^4.1.7", "@types/jest": "^29.5.0", "@types/lodash.groupby": "^4.6.9", diff --git a/yarn-project/aztec-faucet/package.json b/yarn-project/aztec-faucet/package.json index 28accc5b543..6d151e3ffe4 100644 --- a/yarn-project/aztec-faucet/package.json +++ b/yarn-project/aztec-faucet/package.json @@ -48,6 +48,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/node": "^18.7.23", "jest": "^29.5.0", diff --git a/yarn-project/aztec-node/package.json b/yarn-project/aztec-node/package.json index 36f1026b451..66c91d4f8ef 100644 --- a/yarn-project/aztec-node/package.json +++ b/yarn-project/aztec-node/package.json @@ -60,6 +60,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/node": "^18.7.23", "jest": "^29.5.0", diff --git a/yarn-project/aztec.js/package.json b/yarn-project/aztec.js/package.json index d4f1ad2ed96..ee0cf6defc4 100644 --- a/yarn-project/aztec.js/package.json +++ b/yarn-project/aztec.js/package.json @@ -67,6 +67,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/node": "^18.7.23", "buffer": "^6.0.3", diff --git a/yarn-project/aztec/package.json b/yarn-project/aztec/package.json index 19a4ca67445..8102ad4c9a5 100644 --- a/yarn-project/aztec/package.json +++ b/yarn-project/aztec/package.json @@ -59,6 +59,8 @@ "types": "./dest/index.d.ts", "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/koa": "^2.13.6", "jest": "^29.5.0", diff --git a/yarn-project/circuit-types/package.json b/yarn-project/circuit-types/package.json index d0a245f9f42..01c06fbde8c 100644 --- a/yarn-project/circuit-types/package.json +++ b/yarn-project/circuit-types/package.json @@ -56,6 +56,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/lodash.clonedeep": "^4.5.7", "@types/lodash.isequal": "^4.5.6", diff --git a/yarn-project/circuits.js/package.json b/yarn-project/circuits.js/package.json index ad9e4e7cd81..7dff197b16b 100644 --- a/yarn-project/circuits.js/package.json +++ b/yarn-project/circuits.js/package.json @@ -45,6 +45,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/lodash.chunk": "^4.2.7", "@types/node": "^18.7.23", diff --git a/yarn-project/cli/package.json b/yarn-project/cli/package.json index 8ccbe353260..fd177aef9ce 100644 --- a/yarn-project/cli/package.json +++ b/yarn-project/cli/package.json @@ -64,6 +64,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/lodash.startcase": "^4.4.7", "@types/node": "^18.7.23", diff --git a/yarn-project/end-to-end/package.json b/yarn-project/end-to-end/package.json index 1666dcad39d..a7cd2c8c38c 100644 --- a/yarn-project/end-to-end/package.json +++ b/yarn-project/end-to-end/package.json @@ -81,6 +81,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "concurrently": "^7.6.0", "jest": "^29.5.0", diff --git a/yarn-project/entrypoints/package.json b/yarn-project/entrypoints/package.json index 7e62b41ff6d..8d7c9619cdd 100644 --- a/yarn-project/entrypoints/package.json +++ b/yarn-project/entrypoints/package.json @@ -53,6 +53,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "jest": "^29.5.0", "ts-node": "^10.9.1", diff --git a/yarn-project/ethereum/package.json b/yarn-project/ethereum/package.json index f844712e9ef..b6c6d2821bf 100644 --- a/yarn-project/ethereum/package.json +++ b/yarn-project/ethereum/package.json @@ -31,6 +31,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/node": "^18.14.6", "jest": "^29.5.0", diff --git a/yarn-project/foundation/package.json b/yarn-project/foundation/package.json index e4da9fc5363..acc36eed633 100644 --- a/yarn-project/foundation/package.json +++ b/yarn-project/foundation/package.json @@ -92,6 +92,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/bn.js": "^5.1.3", "@types/debug": "^4.1.7", "@types/detect-node": "^2.0.0", diff --git a/yarn-project/key-store/package.json b/yarn-project/key-store/package.json index 27830c38bae..37c8776a9d3 100644 --- a/yarn-project/key-store/package.json +++ b/yarn-project/key-store/package.json @@ -45,6 +45,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/node": "^18.7.23", "jest": "^29.5.0", diff --git a/yarn-project/kv-store/package.json b/yarn-project/kv-store/package.json index d5bfb66aec4..699858a1091 100644 --- a/yarn-project/kv-store/package.json +++ b/yarn-project/kv-store/package.json @@ -41,6 +41,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/node": "^18.7.23", "jest": "^29.5.0", diff --git a/yarn-project/merkle-tree/package.json b/yarn-project/merkle-tree/package.json index 70f816d62b5..3ed2f264d79 100644 --- a/yarn-project/merkle-tree/package.json +++ b/yarn-project/merkle-tree/package.json @@ -49,6 +49,8 @@ "devDependencies": { "@aztec/circuits.js": "workspace:^", "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/node": "^18.15.3", "@types/sha256": "^0.2.0", diff --git a/yarn-project/noir-compiler/package.json b/yarn-project/noir-compiler/package.json index 110a881ff8f..910eb2e970d 100644 --- a/yarn-project/noir-compiler/package.json +++ b/yarn-project/noir-compiler/package.json @@ -66,6 +66,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/fs-extra": "^11.0.1", "@types/jest": "^29.5.0", "@types/lodash.camelcase": "^4.3.7", diff --git a/yarn-project/noir-contracts.js/package.json b/yarn-project/noir-contracts.js/package.json index 5d3d3fc7f6c..5c9157b9248 100644 --- a/yarn-project/noir-contracts.js/package.json +++ b/yarn-project/noir-contracts.js/package.json @@ -43,6 +43,8 @@ "devDependencies": { "@aztec/noir-compiler": "workspace:^", "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "jest": "^29.5.0", "ts-node": "^10.9.1", diff --git a/yarn-project/p2p-bootstrap/package.json b/yarn-project/p2p-bootstrap/package.json index c715d62a522..085c57a3a71 100644 --- a/yarn-project/p2p-bootstrap/package.json +++ b/yarn-project/p2p-bootstrap/package.json @@ -31,6 +31,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/node": "^18.14.6", "jest": "^29.5.0", diff --git a/yarn-project/p2p/package.json b/yarn-project/p2p/package.json index 61c052d6f1f..77432fc4aa9 100644 --- a/yarn-project/p2p/package.json +++ b/yarn-project/p2p/package.json @@ -61,6 +61,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/node": "^18.14.6", "jest": "^29.5.0", diff --git a/yarn-project/package.common.json b/yarn-project/package.common.json index 3baad97350e..377af145c37 100644 --- a/yarn-project/package.common.json +++ b/yarn-project/package.common.json @@ -13,6 +13,8 @@ "files": ["dest", "src", "!*.test.*"], "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "jest": "^29.5.0", "typescript": "^5.0.4", diff --git a/yarn-project/package.json b/yarn-project/package.json index a74c1f2f628..bf2e9624305 100644 --- a/yarn-project/package.json +++ b/yarn-project/package.json @@ -55,8 +55,6 @@ "prettier": "@aztec/foundation/prettier", "devDependencies": { "@monorepo-utils/workspaces-to-typescript-project-references": "^2.9.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@trivago/prettier-plugin-sort-imports": "^4.1.1", "eslint": "^8.21.0", "eslint-import-resolver-typescript": "^3.5.5", diff --git a/yarn-project/protocol-contracts/package.json b/yarn-project/protocol-contracts/package.json index d0d254c2dee..3384a5e0b25 100644 --- a/yarn-project/protocol-contracts/package.json +++ b/yarn-project/protocol-contracts/package.json @@ -56,6 +56,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/lodash.omit": "^4.5.9", "@types/node": "^18.7.23", diff --git a/yarn-project/prover-client/package.json b/yarn-project/prover-client/package.json index 6071ba9ad4a..70fb96bd65a 100644 --- a/yarn-project/prover-client/package.json +++ b/yarn-project/prover-client/package.json @@ -49,6 +49,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/memdown": "^3.0.0", "@types/node": "^18.7.23", diff --git a/yarn-project/pxe/package.json b/yarn-project/pxe/package.json index 563ac0c866f..b60d081de5e 100644 --- a/yarn-project/pxe/package.json +++ b/yarn-project/pxe/package.json @@ -61,6 +61,8 @@ "devDependencies": { "@aztec/noir-contracts.js": "workspace:^", "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/lodash.omit": "^4.5.7", "@types/node": "^18.7.23", diff --git a/yarn-project/scripts/package.json b/yarn-project/scripts/package.json index 94e2988785e..e67b14e5a6d 100644 --- a/yarn-project/scripts/package.json +++ b/yarn-project/scripts/package.json @@ -38,6 +38,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/lodash.pick": "^4.4.7", "@types/node": "^18.14.6", diff --git a/yarn-project/simulator/package.json b/yarn-project/simulator/package.json index a42ff7c0d1b..f1f15cde0c7 100644 --- a/yarn-project/simulator/package.json +++ b/yarn-project/simulator/package.json @@ -52,6 +52,8 @@ "@aztec/merkle-tree": "workspace:^", "@aztec/noir-contracts.js": "workspace:^", "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/levelup": "^5.1.3", "@types/lodash.merge": "^4.6.9", diff --git a/yarn-project/types/package.json b/yarn-project/types/package.json index 9832f31fb76..7b8107f3fcc 100644 --- a/yarn-project/types/package.json +++ b/yarn-project/types/package.json @@ -47,6 +47,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/debug": "^4.1.7", "@types/detect-node": "^2.0.0", "@types/jest": "^29.5.0", diff --git a/yarn-project/world-state/package.json b/yarn-project/world-state/package.json index 2cae20bf522..e47625175f7 100644 --- a/yarn-project/world-state/package.json +++ b/yarn-project/world-state/package.json @@ -47,6 +47,8 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/levelup": "^5.1.2", "@types/memdown": "^3.0.0", diff --git a/yarn-project/yarn.lock b/yarn-project/yarn.lock index 75a80018296..7e73ceabcd4 100644 --- a/yarn-project/yarn.lock +++ b/yarn-project/yarn.lock @@ -69,6 +69,8 @@ __metadata: "@aztec/foundation": "workspace:^" "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/node": ^18.7.23 jest: ^29.5.0 @@ -93,6 +95,8 @@ __metadata: "@aztec/protocol-contracts": "workspace:^" "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/debug": ^4.1.7 "@types/jest": ^29.5.0 "@types/lodash.groupby": ^4.6.9 @@ -122,6 +126,8 @@ __metadata: "@aztec/ethereum": "workspace:^" "@aztec/foundation": "workspace:^" "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/node": ^18.7.23 jest: ^29.5.0 @@ -155,6 +161,8 @@ __metadata: "@aztec/types": "workspace:^" "@aztec/world-state": "workspace:^" "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/node": ^18.7.23 jest: ^29.5.0 @@ -179,6 +187,8 @@ __metadata: "@aztec/protocol-contracts": "workspace:^" "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/node": ^18.7.23 buffer: ^6.0.3 @@ -204,8 +214,6 @@ __metadata: resolution: "@aztec/aztec3-packages@workspace:." dependencies: "@monorepo-utils/workspaces-to-typescript-project-references": ^2.9.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@trivago/prettier-plugin-sort-imports": ^4.1.1 eslint: ^8.21.0 eslint-import-resolver-typescript: ^3.5.5 @@ -238,6 +246,8 @@ __metadata: "@aztec/protocol-contracts": "workspace:^" "@aztec/pxe": "workspace:^" "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/koa": ^2.13.6 abitype: ^0.8.11 @@ -277,6 +287,8 @@ __metadata: "@aztec/foundation": "workspace:^" "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/lodash.clonedeep": ^4.5.7 "@types/lodash.isequal": ^4.5.6 @@ -302,6 +314,8 @@ __metadata: "@aztec/foundation": "workspace:^" "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/lodash.chunk": ^4.2.7 "@types/node": ^18.7.23 @@ -332,6 +346,8 @@ __metadata: "@iarna/toml": ^2.2.5 "@jest/globals": ^29.5.0 "@libp2p/peer-id-factory": ^3.0.4 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/lodash.startcase": ^4.4.7 "@types/node": ^18.7.23 @@ -390,6 +406,8 @@ __metadata: "@aztec/world-state": "workspace:^" "@jest/globals": ^29.5.0 "@noble/curves": ^1.0.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/fs-extra": ^11.0.2 "@types/jest": ^29.5.0 "@types/koa": ^2.13.9 @@ -438,6 +456,8 @@ __metadata: "@aztec/foundation": "workspace:^" "@aztec/protocol-contracts": "workspace:^" "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 jest: ^29.5.0 ts-node: ^10.9.1 @@ -452,6 +472,8 @@ __metadata: dependencies: "@aztec/foundation": "workspace:^" "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/node": ^18.14.6 dotenv: ^16.0.3 @@ -471,6 +493,8 @@ __metadata: "@jest/globals": ^29.5.0 "@koa/cors": ^5.0.0 "@noble/curves": ^1.2.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/bn.js": ^5.1.3 "@types/debug": ^4.1.7 "@types/detect-node": ^2.0.0 @@ -532,6 +556,8 @@ __metadata: "@aztec/foundation": "workspace:^" "@aztec/kv-store": "workspace:^" "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/node": ^18.7.23 jest: ^29.5.0 @@ -547,6 +573,8 @@ __metadata: dependencies: "@aztec/foundation": "workspace:^" "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/node": ^18.7.23 jest: ^29.5.0 @@ -578,6 +606,8 @@ __metadata: "@aztec/kv-store": "workspace:^" "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/node": ^18.15.3 "@types/sha256": ^0.2.0 @@ -598,6 +628,8 @@ __metadata: "@aztec/types": "workspace:^" "@iarna/toml": ^2.2.5 "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/fs-extra": ^11.0.1 "@types/jest": ^29.5.0 "@types/lodash.camelcase": ^4.3.7 @@ -630,6 +662,8 @@ __metadata: "@aztec/aztec.js": "workspace:^" "@aztec/noir-compiler": "workspace:^" "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 jest: ^29.5.0 ts-node: ^10.9.1 @@ -671,6 +705,8 @@ __metadata: "@aztec/foundation": "workspace:^" "@aztec/p2p": "workspace:^" "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/node": ^18.14.6 dotenv: ^16.0.3 @@ -701,6 +737,8 @@ __metadata: "@libp2p/peer-id": ^3.0.2 "@libp2p/peer-id-factory": ^3.0.3 "@libp2p/tcp": ^8.0.4 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/node": ^18.14.6 it-pipe: ^3.0.1 @@ -722,6 +760,8 @@ __metadata: "@aztec/foundation": "workspace:^" "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/lodash.omit": ^4.5.9 "@types/node": ^18.7.23 @@ -747,6 +787,8 @@ __metadata: "@aztec/simulator": "workspace:^" "@aztec/world-state": "workspace:^" "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/memdown": ^3.0.0 "@types/node": ^18.7.23 @@ -776,6 +818,8 @@ __metadata: "@aztec/simulator": "workspace:^" "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/lodash.omit": ^4.5.7 "@types/node": ^18.7.23 @@ -801,6 +845,8 @@ __metadata: "@aztec/circuit-types": "workspace:^" "@aztec/foundation": "workspace:^" "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/lodash.pick": ^4.4.7 "@types/node": ^18.14.6 @@ -874,6 +920,8 @@ __metadata: "@jest/globals": ^29.5.0 "@noir-lang/acvm_js": "portal:../../noir/packages/acvm_js" "@noir-lang/types": "portal:../../noir/packages/types" + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/levelup": ^5.1.3 "@types/lodash.merge": ^4.6.9 @@ -898,6 +946,8 @@ __metadata: "@aztec/ethereum": "workspace:^" "@aztec/foundation": "workspace:^" "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/debug": ^4.1.7 "@types/detect-node": ^2.0.0 "@types/jest": ^29.5.0 @@ -929,6 +979,8 @@ __metadata: "@aztec/merkle-tree": "workspace:^" "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/levelup": ^5.1.2 "@types/memdown": ^3.0.0 From d259f3028ee463b877b1353b714df090d558dfa3 Mon Sep 17 00:00:00 2001 From: Charlie Lye Date: Mon, 1 Apr 2024 23:37:31 +0000 Subject: [PATCH 4/7] Revert "fix maybe" This reverts commit 60dc04adc61453db3b7ffe94459d6292f642efcb. --- yarn-project/accounts/package.json | 2 - yarn-project/archiver/package.json | 2 - yarn-project/aztec-faucet/package.json | 2 - yarn-project/aztec-node/package.json | 2 - yarn-project/aztec.js/package.json | 2 - yarn-project/aztec/package.json | 2 - yarn-project/circuit-types/package.json | 2 - yarn-project/circuits.js/package.json | 2 - yarn-project/cli/package.json | 2 - yarn-project/end-to-end/package.json | 2 - yarn-project/entrypoints/package.json | 2 - yarn-project/ethereum/package.json | 2 - yarn-project/foundation/package.json | 2 - yarn-project/key-store/package.json | 2 - yarn-project/kv-store/package.json | 2 - yarn-project/merkle-tree/package.json | 2 - yarn-project/noir-compiler/package.json | 2 - yarn-project/noir-contracts.js/package.json | 2 - yarn-project/p2p-bootstrap/package.json | 2 - yarn-project/p2p/package.json | 2 - yarn-project/package.common.json | 2 - yarn-project/package.json | 2 + yarn-project/protocol-contracts/package.json | 2 - yarn-project/prover-client/package.json | 2 - yarn-project/pxe/package.json | 2 - yarn-project/scripts/package.json | 2 - yarn-project/simulator/package.json | 2 - yarn-project/types/package.json | 2 - yarn-project/world-state/package.json | 2 - yarn-project/yarn.lock | 56 +------------------- 30 files changed, 4 insertions(+), 110 deletions(-) diff --git a/yarn-project/accounts/package.json b/yarn-project/accounts/package.json index 353e845fbe9..b78eb273ca5 100644 --- a/yarn-project/accounts/package.json +++ b/yarn-project/accounts/package.json @@ -64,8 +64,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/node": "^18.7.23", "jest": "^29.5.0", diff --git a/yarn-project/archiver/package.json b/yarn-project/archiver/package.json index 1388a96f992..17e7cb0ffdf 100644 --- a/yarn-project/archiver/package.json +++ b/yarn-project/archiver/package.json @@ -61,8 +61,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/debug": "^4.1.7", "@types/jest": "^29.5.0", "@types/lodash.groupby": "^4.6.9", diff --git a/yarn-project/aztec-faucet/package.json b/yarn-project/aztec-faucet/package.json index 6d151e3ffe4..28accc5b543 100644 --- a/yarn-project/aztec-faucet/package.json +++ b/yarn-project/aztec-faucet/package.json @@ -48,8 +48,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/node": "^18.7.23", "jest": "^29.5.0", diff --git a/yarn-project/aztec-node/package.json b/yarn-project/aztec-node/package.json index 66c91d4f8ef..36f1026b451 100644 --- a/yarn-project/aztec-node/package.json +++ b/yarn-project/aztec-node/package.json @@ -60,8 +60,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/node": "^18.7.23", "jest": "^29.5.0", diff --git a/yarn-project/aztec.js/package.json b/yarn-project/aztec.js/package.json index ee0cf6defc4..d4f1ad2ed96 100644 --- a/yarn-project/aztec.js/package.json +++ b/yarn-project/aztec.js/package.json @@ -67,8 +67,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/node": "^18.7.23", "buffer": "^6.0.3", diff --git a/yarn-project/aztec/package.json b/yarn-project/aztec/package.json index 8102ad4c9a5..19a4ca67445 100644 --- a/yarn-project/aztec/package.json +++ b/yarn-project/aztec/package.json @@ -59,8 +59,6 @@ "types": "./dest/index.d.ts", "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/koa": "^2.13.6", "jest": "^29.5.0", diff --git a/yarn-project/circuit-types/package.json b/yarn-project/circuit-types/package.json index 01c06fbde8c..d0a245f9f42 100644 --- a/yarn-project/circuit-types/package.json +++ b/yarn-project/circuit-types/package.json @@ -56,8 +56,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/lodash.clonedeep": "^4.5.7", "@types/lodash.isequal": "^4.5.6", diff --git a/yarn-project/circuits.js/package.json b/yarn-project/circuits.js/package.json index 7dff197b16b..ad9e4e7cd81 100644 --- a/yarn-project/circuits.js/package.json +++ b/yarn-project/circuits.js/package.json @@ -45,8 +45,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/lodash.chunk": "^4.2.7", "@types/node": "^18.7.23", diff --git a/yarn-project/cli/package.json b/yarn-project/cli/package.json index fd177aef9ce..8ccbe353260 100644 --- a/yarn-project/cli/package.json +++ b/yarn-project/cli/package.json @@ -64,8 +64,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/lodash.startcase": "^4.4.7", "@types/node": "^18.7.23", diff --git a/yarn-project/end-to-end/package.json b/yarn-project/end-to-end/package.json index a7cd2c8c38c..1666dcad39d 100644 --- a/yarn-project/end-to-end/package.json +++ b/yarn-project/end-to-end/package.json @@ -81,8 +81,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "concurrently": "^7.6.0", "jest": "^29.5.0", diff --git a/yarn-project/entrypoints/package.json b/yarn-project/entrypoints/package.json index 8d7c9619cdd..7e62b41ff6d 100644 --- a/yarn-project/entrypoints/package.json +++ b/yarn-project/entrypoints/package.json @@ -53,8 +53,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "jest": "^29.5.0", "ts-node": "^10.9.1", diff --git a/yarn-project/ethereum/package.json b/yarn-project/ethereum/package.json index b6c6d2821bf..f844712e9ef 100644 --- a/yarn-project/ethereum/package.json +++ b/yarn-project/ethereum/package.json @@ -31,8 +31,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/node": "^18.14.6", "jest": "^29.5.0", diff --git a/yarn-project/foundation/package.json b/yarn-project/foundation/package.json index acc36eed633..e4da9fc5363 100644 --- a/yarn-project/foundation/package.json +++ b/yarn-project/foundation/package.json @@ -92,8 +92,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/bn.js": "^5.1.3", "@types/debug": "^4.1.7", "@types/detect-node": "^2.0.0", diff --git a/yarn-project/key-store/package.json b/yarn-project/key-store/package.json index 37c8776a9d3..27830c38bae 100644 --- a/yarn-project/key-store/package.json +++ b/yarn-project/key-store/package.json @@ -45,8 +45,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/node": "^18.7.23", "jest": "^29.5.0", diff --git a/yarn-project/kv-store/package.json b/yarn-project/kv-store/package.json index 699858a1091..d5bfb66aec4 100644 --- a/yarn-project/kv-store/package.json +++ b/yarn-project/kv-store/package.json @@ -41,8 +41,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/node": "^18.7.23", "jest": "^29.5.0", diff --git a/yarn-project/merkle-tree/package.json b/yarn-project/merkle-tree/package.json index 3ed2f264d79..70f816d62b5 100644 --- a/yarn-project/merkle-tree/package.json +++ b/yarn-project/merkle-tree/package.json @@ -49,8 +49,6 @@ "devDependencies": { "@aztec/circuits.js": "workspace:^", "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/node": "^18.15.3", "@types/sha256": "^0.2.0", diff --git a/yarn-project/noir-compiler/package.json b/yarn-project/noir-compiler/package.json index 910eb2e970d..110a881ff8f 100644 --- a/yarn-project/noir-compiler/package.json +++ b/yarn-project/noir-compiler/package.json @@ -66,8 +66,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/fs-extra": "^11.0.1", "@types/jest": "^29.5.0", "@types/lodash.camelcase": "^4.3.7", diff --git a/yarn-project/noir-contracts.js/package.json b/yarn-project/noir-contracts.js/package.json index 5c9157b9248..5d3d3fc7f6c 100644 --- a/yarn-project/noir-contracts.js/package.json +++ b/yarn-project/noir-contracts.js/package.json @@ -43,8 +43,6 @@ "devDependencies": { "@aztec/noir-compiler": "workspace:^", "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "jest": "^29.5.0", "ts-node": "^10.9.1", diff --git a/yarn-project/p2p-bootstrap/package.json b/yarn-project/p2p-bootstrap/package.json index 085c57a3a71..c715d62a522 100644 --- a/yarn-project/p2p-bootstrap/package.json +++ b/yarn-project/p2p-bootstrap/package.json @@ -31,8 +31,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/node": "^18.14.6", "jest": "^29.5.0", diff --git a/yarn-project/p2p/package.json b/yarn-project/p2p/package.json index 77432fc4aa9..61c052d6f1f 100644 --- a/yarn-project/p2p/package.json +++ b/yarn-project/p2p/package.json @@ -61,8 +61,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/node": "^18.14.6", "jest": "^29.5.0", diff --git a/yarn-project/package.common.json b/yarn-project/package.common.json index 377af145c37..3baad97350e 100644 --- a/yarn-project/package.common.json +++ b/yarn-project/package.common.json @@ -13,8 +13,6 @@ "files": ["dest", "src", "!*.test.*"], "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "jest": "^29.5.0", "typescript": "^5.0.4", diff --git a/yarn-project/package.json b/yarn-project/package.json index bf2e9624305..a74c1f2f628 100644 --- a/yarn-project/package.json +++ b/yarn-project/package.json @@ -55,6 +55,8 @@ "prettier": "@aztec/foundation/prettier", "devDependencies": { "@monorepo-utils/workspaces-to-typescript-project-references": "^2.9.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@trivago/prettier-plugin-sort-imports": "^4.1.1", "eslint": "^8.21.0", "eslint-import-resolver-typescript": "^3.5.5", diff --git a/yarn-project/protocol-contracts/package.json b/yarn-project/protocol-contracts/package.json index 3384a5e0b25..d0d254c2dee 100644 --- a/yarn-project/protocol-contracts/package.json +++ b/yarn-project/protocol-contracts/package.json @@ -56,8 +56,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/lodash.omit": "^4.5.9", "@types/node": "^18.7.23", diff --git a/yarn-project/prover-client/package.json b/yarn-project/prover-client/package.json index 70fb96bd65a..6071ba9ad4a 100644 --- a/yarn-project/prover-client/package.json +++ b/yarn-project/prover-client/package.json @@ -49,8 +49,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/memdown": "^3.0.0", "@types/node": "^18.7.23", diff --git a/yarn-project/pxe/package.json b/yarn-project/pxe/package.json index b60d081de5e..563ac0c866f 100644 --- a/yarn-project/pxe/package.json +++ b/yarn-project/pxe/package.json @@ -61,8 +61,6 @@ "devDependencies": { "@aztec/noir-contracts.js": "workspace:^", "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/lodash.omit": "^4.5.7", "@types/node": "^18.7.23", diff --git a/yarn-project/scripts/package.json b/yarn-project/scripts/package.json index e67b14e5a6d..94e2988785e 100644 --- a/yarn-project/scripts/package.json +++ b/yarn-project/scripts/package.json @@ -38,8 +38,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/lodash.pick": "^4.4.7", "@types/node": "^18.14.6", diff --git a/yarn-project/simulator/package.json b/yarn-project/simulator/package.json index f1f15cde0c7..a42ff7c0d1b 100644 --- a/yarn-project/simulator/package.json +++ b/yarn-project/simulator/package.json @@ -52,8 +52,6 @@ "@aztec/merkle-tree": "workspace:^", "@aztec/noir-contracts.js": "workspace:^", "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/levelup": "^5.1.3", "@types/lodash.merge": "^4.6.9", diff --git a/yarn-project/types/package.json b/yarn-project/types/package.json index 7b8107f3fcc..9832f31fb76 100644 --- a/yarn-project/types/package.json +++ b/yarn-project/types/package.json @@ -47,8 +47,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/debug": "^4.1.7", "@types/detect-node": "^2.0.0", "@types/jest": "^29.5.0", diff --git a/yarn-project/world-state/package.json b/yarn-project/world-state/package.json index e47625175f7..2cae20bf522 100644 --- a/yarn-project/world-state/package.json +++ b/yarn-project/world-state/package.json @@ -47,8 +47,6 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@swc/core": "^1.4.11", - "@swc/jest": "^0.2.36", "@types/jest": "^29.5.0", "@types/levelup": "^5.1.2", "@types/memdown": "^3.0.0", diff --git a/yarn-project/yarn.lock b/yarn-project/yarn.lock index 7e73ceabcd4..75a80018296 100644 --- a/yarn-project/yarn.lock +++ b/yarn-project/yarn.lock @@ -69,8 +69,6 @@ __metadata: "@aztec/foundation": "workspace:^" "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/node": ^18.7.23 jest: ^29.5.0 @@ -95,8 +93,6 @@ __metadata: "@aztec/protocol-contracts": "workspace:^" "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/debug": ^4.1.7 "@types/jest": ^29.5.0 "@types/lodash.groupby": ^4.6.9 @@ -126,8 +122,6 @@ __metadata: "@aztec/ethereum": "workspace:^" "@aztec/foundation": "workspace:^" "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/node": ^18.7.23 jest: ^29.5.0 @@ -161,8 +155,6 @@ __metadata: "@aztec/types": "workspace:^" "@aztec/world-state": "workspace:^" "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/node": ^18.7.23 jest: ^29.5.0 @@ -187,8 +179,6 @@ __metadata: "@aztec/protocol-contracts": "workspace:^" "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/node": ^18.7.23 buffer: ^6.0.3 @@ -214,6 +204,8 @@ __metadata: resolution: "@aztec/aztec3-packages@workspace:." dependencies: "@monorepo-utils/workspaces-to-typescript-project-references": ^2.9.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@trivago/prettier-plugin-sort-imports": ^4.1.1 eslint: ^8.21.0 eslint-import-resolver-typescript: ^3.5.5 @@ -246,8 +238,6 @@ __metadata: "@aztec/protocol-contracts": "workspace:^" "@aztec/pxe": "workspace:^" "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/koa": ^2.13.6 abitype: ^0.8.11 @@ -287,8 +277,6 @@ __metadata: "@aztec/foundation": "workspace:^" "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/lodash.clonedeep": ^4.5.7 "@types/lodash.isequal": ^4.5.6 @@ -314,8 +302,6 @@ __metadata: "@aztec/foundation": "workspace:^" "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/lodash.chunk": ^4.2.7 "@types/node": ^18.7.23 @@ -346,8 +332,6 @@ __metadata: "@iarna/toml": ^2.2.5 "@jest/globals": ^29.5.0 "@libp2p/peer-id-factory": ^3.0.4 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/lodash.startcase": ^4.4.7 "@types/node": ^18.7.23 @@ -406,8 +390,6 @@ __metadata: "@aztec/world-state": "workspace:^" "@jest/globals": ^29.5.0 "@noble/curves": ^1.0.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/fs-extra": ^11.0.2 "@types/jest": ^29.5.0 "@types/koa": ^2.13.9 @@ -456,8 +438,6 @@ __metadata: "@aztec/foundation": "workspace:^" "@aztec/protocol-contracts": "workspace:^" "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 jest: ^29.5.0 ts-node: ^10.9.1 @@ -472,8 +452,6 @@ __metadata: dependencies: "@aztec/foundation": "workspace:^" "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/node": ^18.14.6 dotenv: ^16.0.3 @@ -493,8 +471,6 @@ __metadata: "@jest/globals": ^29.5.0 "@koa/cors": ^5.0.0 "@noble/curves": ^1.2.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/bn.js": ^5.1.3 "@types/debug": ^4.1.7 "@types/detect-node": ^2.0.0 @@ -556,8 +532,6 @@ __metadata: "@aztec/foundation": "workspace:^" "@aztec/kv-store": "workspace:^" "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/node": ^18.7.23 jest: ^29.5.0 @@ -573,8 +547,6 @@ __metadata: dependencies: "@aztec/foundation": "workspace:^" "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/node": ^18.7.23 jest: ^29.5.0 @@ -606,8 +578,6 @@ __metadata: "@aztec/kv-store": "workspace:^" "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/node": ^18.15.3 "@types/sha256": ^0.2.0 @@ -628,8 +598,6 @@ __metadata: "@aztec/types": "workspace:^" "@iarna/toml": ^2.2.5 "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/fs-extra": ^11.0.1 "@types/jest": ^29.5.0 "@types/lodash.camelcase": ^4.3.7 @@ -662,8 +630,6 @@ __metadata: "@aztec/aztec.js": "workspace:^" "@aztec/noir-compiler": "workspace:^" "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 jest: ^29.5.0 ts-node: ^10.9.1 @@ -705,8 +671,6 @@ __metadata: "@aztec/foundation": "workspace:^" "@aztec/p2p": "workspace:^" "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/node": ^18.14.6 dotenv: ^16.0.3 @@ -737,8 +701,6 @@ __metadata: "@libp2p/peer-id": ^3.0.2 "@libp2p/peer-id-factory": ^3.0.3 "@libp2p/tcp": ^8.0.4 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/node": ^18.14.6 it-pipe: ^3.0.1 @@ -760,8 +722,6 @@ __metadata: "@aztec/foundation": "workspace:^" "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/lodash.omit": ^4.5.9 "@types/node": ^18.7.23 @@ -787,8 +747,6 @@ __metadata: "@aztec/simulator": "workspace:^" "@aztec/world-state": "workspace:^" "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/memdown": ^3.0.0 "@types/node": ^18.7.23 @@ -818,8 +776,6 @@ __metadata: "@aztec/simulator": "workspace:^" "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/lodash.omit": ^4.5.7 "@types/node": ^18.7.23 @@ -845,8 +801,6 @@ __metadata: "@aztec/circuit-types": "workspace:^" "@aztec/foundation": "workspace:^" "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/lodash.pick": ^4.4.7 "@types/node": ^18.14.6 @@ -920,8 +874,6 @@ __metadata: "@jest/globals": ^29.5.0 "@noir-lang/acvm_js": "portal:../../noir/packages/acvm_js" "@noir-lang/types": "portal:../../noir/packages/types" - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/levelup": ^5.1.3 "@types/lodash.merge": ^4.6.9 @@ -946,8 +898,6 @@ __metadata: "@aztec/ethereum": "workspace:^" "@aztec/foundation": "workspace:^" "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/debug": ^4.1.7 "@types/detect-node": ^2.0.0 "@types/jest": ^29.5.0 @@ -979,8 +929,6 @@ __metadata: "@aztec/merkle-tree": "workspace:^" "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 - "@swc/core": ^1.4.11 - "@swc/jest": ^0.2.36 "@types/jest": ^29.5.0 "@types/levelup": ^5.1.2 "@types/memdown": ^3.0.0 From e551a5497c3d113184a88cdbf728d57cb647de19 Mon Sep 17 00:00:00 2001 From: Charlie Lye Date: Mon, 1 Apr 2024 23:39:02 +0000 Subject: [PATCH 5/7] fix maybe --- yarn-project/end-to-end/package.json | 2 ++ yarn-project/yarn.lock | 2 ++ 2 files changed, 4 insertions(+) diff --git a/yarn-project/end-to-end/package.json b/yarn-project/end-to-end/package.json index 1666dcad39d..091c8ca0c1d 100644 --- a/yarn-project/end-to-end/package.json +++ b/yarn-project/end-to-end/package.json @@ -44,6 +44,8 @@ "@aztec/world-state": "workspace:^", "@jest/globals": "^29.5.0", "@noble/curves": "^1.0.0", + "@swc/core": "^1.4.11", + "@swc/jest": "^0.2.36", "@types/fs-extra": "^11.0.2", "@types/jest": "^29.5.0", "@types/koa": "^2.13.9", diff --git a/yarn-project/yarn.lock b/yarn-project/yarn.lock index 75a80018296..e8cafc9ef00 100644 --- a/yarn-project/yarn.lock +++ b/yarn-project/yarn.lock @@ -390,6 +390,8 @@ __metadata: "@aztec/world-state": "workspace:^" "@jest/globals": ^29.5.0 "@noble/curves": ^1.0.0 + "@swc/core": ^1.4.11 + "@swc/jest": ^0.2.36 "@types/fs-extra": ^11.0.2 "@types/jest": ^29.5.0 "@types/koa": ^2.13.9 From 3cbe186fc9236781e263c487f9390d97befc6f1b Mon Sep 17 00:00:00 2001 From: Charlie Lye Date: Wed, 3 Apr 2024 17:05:39 +0000 Subject: [PATCH 6/7] fixes --- .../noir-protocol-circuits-types/package.json | 19 +++++++++++++++--- .../package.local.json | 6 ++++++ yarn-project/sequencer-client/jest.config.ts | 12 ----------- yarn-project/sequencer-client/package.json | 20 ++++++++++++++++++- 4 files changed, 41 insertions(+), 16 deletions(-) create mode 100644 yarn-project/noir-protocol-circuits-types/package.local.json delete mode 100644 yarn-project/sequencer-client/jest.config.ts diff --git a/yarn-project/noir-protocol-circuits-types/package.json b/yarn-project/noir-protocol-circuits-types/package.json index faa2d64f07b..49c2f916be8 100644 --- a/yarn-project/noir-protocol-circuits-types/package.json +++ b/yarn-project/noir-protocol-circuits-types/package.json @@ -6,22 +6,35 @@ ".": "./dest/index.js", "./types": "./dest/types/index.js" }, + "inherits": [ + "../package.common.json", + "./package.local.json" + ], "scripts": { "build": "yarn clean && yarn generate && tsc -b", "clean": "rm -rf ./dest .tsbuildinfo src/types src/target", "formatting": "run -T prettier --check ./src && run -T eslint ./src", - "formatting:fix": "NODE_OPTIONS='--max-old-space-size=8096' run -T eslint --fix ./src && run -T prettier -w ./src", + "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", "formatting:fix:types": "NODE_OPTIONS='--max-old-space-size=8096' run -T eslint --fix ./src/types && run -T prettier -w ./src/types", "generate": "yarn generate:noir-circuits", "generate:noir-circuits": "mkdir -p ./src/target && cp ../../noir-projects/noir-protocol-circuits/target/* ./src/target && node --no-warnings --loader ts-node/esm src/scripts/generate_ts_from_abi.ts && run -T prettier -w ./src/types", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests" + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests", + "build:dev": "tsc -b --watch" }, "jest": { "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src" + "rootDir": "./src", + "extensionsToTreatAsEsm": [ + ".ts" + ], + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + } }, "dependencies": { "@aztec/circuits.js": "workspace:^", diff --git a/yarn-project/noir-protocol-circuits-types/package.local.json b/yarn-project/noir-protocol-circuits-types/package.local.json new file mode 100644 index 00000000000..9ade866233e --- /dev/null +++ b/yarn-project/noir-protocol-circuits-types/package.local.json @@ -0,0 +1,6 @@ +{ + "scripts": { + "build": "yarn clean && yarn generate && tsc -b", + "clean": "rm -rf ./dest .tsbuildinfo src/types src/target" + } +} diff --git a/yarn-project/sequencer-client/jest.config.ts b/yarn-project/sequencer-client/jest.config.ts deleted file mode 100644 index 83d85d85f9b..00000000000 --- a/yarn-project/sequencer-client/jest.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { Config } from 'jest'; - -const config: Config = { - preset: 'ts-jest/presets/default-esm', - moduleNameMapper: { - '^(\\.{1,2}/.*)\\.[cm]?js$': '$1', - }, - testRegex: './src/.*\\.test\\.(js|mjs|ts)$', - rootDir: './src', -}; - -export default config; diff --git a/yarn-project/sequencer-client/package.json b/yarn-project/sequencer-client/package.json index 843bf99f306..cda27227c2c 100644 --- a/yarn-project/sequencer-client/package.json +++ b/yarn-project/sequencer-client/package.json @@ -10,13 +10,16 @@ "name": "Sequencer Client", "tsconfig": "./tsconfig.json" }, + "inherits": [ + "../package.common.json" + ], "scripts": { "build": "yarn clean && tsc -b", "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests", "test:integration": "concurrently -k -s first -c reset,dim -n test,anvil \"yarn test:integration:run\" \"anvil\"", "test:integration:run": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --config jest.integration.config.json" }, @@ -67,5 +70,20 @@ "types": "./dest/index.d.ts", "engines": { "node": ">=18" + }, + "jest": { + "extensionsToTreatAsEsm": [ + ".ts" + ], + "transform": { + "^.+\\.tsx?$": [ + "@swc/jest" + ] + }, + "moduleNameMapper": { + "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" + }, + "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", + "rootDir": "./src" } } From f475038bc071ad436555aedb2119cc2720be8b46 Mon Sep 17 00:00:00 2001 From: Charlie Lye Date: Wed, 3 Apr 2024 21:05:47 +0000 Subject: [PATCH 7/7] we're so fast now we need to wait. --- yarn-project/Earthfile | 4 ++-- yarn-project/end-to-end/Dockerfile | 2 +- yarn-project/end-to-end/scripts/docker-compose-p2p.yml | 6 +++++- yarn-project/end-to-end/scripts/docker-compose.yml | 6 +++++- yarn-project/foundation/package.json | 1 + 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/yarn-project/Earthfile b/yarn-project/Earthfile index b62d02875d1..e37d7332233 100644 --- a/yarn-project/Earthfile +++ b/yarn-project/Earthfile @@ -71,11 +71,11 @@ end-to-end: RUN yarn workspaces focus @aztec/end-to-end --production && yarn cache clean SAVE ARTIFACT /usr/src/* -end-to-end-minimal: +end-to-end-minimal: # end to end test runner BUILD +aztec FROM node:18.19.1-slim - RUN apt-get update && apt-get install jq chromium -y + RUN apt-get update && apt-get install jq chromium netcat-openbsd -y ENV CHROME_BIN="/usr/bin/chromium" COPY +end-to-end/. /usr/src WORKDIR /usr/src/yarn-project/end-to-end diff --git a/yarn-project/end-to-end/Dockerfile b/yarn-project/end-to-end/Dockerfile index 2464da00364..52bd00f142e 100644 --- a/yarn-project/end-to-end/Dockerfile +++ b/yarn-project/end-to-end/Dockerfile @@ -40,7 +40,7 @@ RUN rm -rf /usr/src/noir-projects /usr/src/l1-contracts # Create minimal image. FROM node:18.19.1-slim -RUN apt-get update && apt-get install jq gnupg wget -y && \ +RUN apt-get update && apt-get install jq gnupg wget netcat-openbsd -y && \ wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \ sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \ apt-get update && \ diff --git a/yarn-project/end-to-end/scripts/docker-compose-p2p.yml b/yarn-project/end-to-end/scripts/docker-compose-p2p.yml index 69e9443a1ba..2af25f1ca0f 100644 --- a/yarn-project/end-to-end/scripts/docker-compose-p2p.yml +++ b/yarn-project/end-to-end/scripts/docker-compose-p2p.yml @@ -37,6 +37,10 @@ services: P2P_NAT_ENABLED: 'false' P2P_ENABLED: 'true' BOOTSTRAP_NODES: '/ip4/p2p-bootstrap/tcp/40400/p2p/12D3KooWGBpbC6qQFkaCYphjNeY6sV99o4SnEWyTeBigoVriDn4D' - command: ${TEST:-./src/e2e_p2p_network.test.ts} + entrypoint: > + sh -c ' + while ! nc -z sandbox 8080; do sleep 1; done; + yarn test ${TEST:-./src/e2e_deploy_contract.test.ts} + ' volumes: - ../log:/usr/src/yarn-project/end-to-end/log:rw diff --git a/yarn-project/end-to-end/scripts/docker-compose.yml b/yarn-project/end-to-end/scripts/docker-compose.yml index 8d0c71158a8..054e16477f8 100644 --- a/yarn-project/end-to-end/scripts/docker-compose.yml +++ b/yarn-project/end-to-end/scripts/docker-compose.yml @@ -38,7 +38,11 @@ services: ETHEREUM_HOST: http://fork:8545 CHAIN_ID: 31337 PXE_URL: http://sandbox:8080 - command: ${TEST:-./src/e2e_deploy_contract.test.ts} + entrypoint: > + sh -c ' + while ! nc -z sandbox 8080; do sleep 1; done; + yarn test ${TEST:-./src/e2e_deploy_contract.test.ts} + ' volumes: # TODO(AD) currently earthly uses /build instead of /usr/src - ../log:/usr/src/yarn-project/end-to-end/log:rw diff --git a/yarn-project/foundation/package.json b/yarn-project/foundation/package.json index e4da9fc5363..1987eb4f805 100644 --- a/yarn-project/foundation/package.json +++ b/yarn-project/foundation/package.json @@ -46,6 +46,7 @@ "build": "yarn clean && tsc -b", "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", + "generate": "true", "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests"