From 25a52c397bde8dc951955d4640bb15e56ea2e34b Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Wed, 8 Nov 2023 16:54:30 +0000 Subject: [PATCH 01/41] force exit --- .changeset/silver-peaches-lie.md | 5 +++++ packages/cli/src/cmds/entrypoint.ts | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 .changeset/silver-peaches-lie.md diff --git a/.changeset/silver-peaches-lie.md b/.changeset/silver-peaches-lie.md new file mode 100644 index 00000000..e6867eca --- /dev/null +++ b/.changeset/silver-peaches-lie.md @@ -0,0 +1,5 @@ +--- +"@moonwall/cli": patch +--- + +Force exit on failure diff --git a/packages/cli/src/cmds/entrypoint.ts b/packages/cli/src/cmds/entrypoint.ts index 91373ee6..0ca5b550 100755 --- a/packages/cli/src/cmds/entrypoint.ts +++ b/packages/cli/src/cmds/entrypoint.ts @@ -104,9 +104,13 @@ yargs(hideBin(process.argv)) async (args) => { if (args.envName) { process.env.MOON_RUN_SCRIPTS = "true"; - (await testCmd(args.envName.toString(), { testNamePattern: args.GrepTest })) - ? process.exit(0) - : process.exit(1); + if (await testCmd(args.envName.toString(), { testNamePattern: args.GrepTest })) { + console.log("✅ All tests passed"); + process.exit(0); + } else { + console.log("❌ Some tests failed"); + process.kill(process.pid, 'SIGTERM'); + } } else { console.log("❌ No environment specified"); console.log(`👉 Run 'pnpm moonwall --help' for more information`); From 7853ba0c0ea36baaf9cadeb83dbe1aeda040f8a0 Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Wed, 8 Nov 2023 16:56:49 +0000 Subject: [PATCH 02/41] fmt --- packages/cli/src/cmds/entrypoint.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/src/cmds/entrypoint.ts b/packages/cli/src/cmds/entrypoint.ts index 0ca5b550..df898a72 100755 --- a/packages/cli/src/cmds/entrypoint.ts +++ b/packages/cli/src/cmds/entrypoint.ts @@ -109,7 +109,7 @@ yargs(hideBin(process.argv)) process.exit(0); } else { console.log("❌ Some tests failed"); - process.kill(process.pid, 'SIGTERM'); + process.kill(process.pid, "SIGTERM"); } } else { console.log("❌ No environment specified"); From 968194588f26a2a7e5ece70bfc6a8a230b965037 Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Wed, 8 Nov 2023 17:05:04 +0000 Subject: [PATCH 03/41] fix tests --- packages/cli/src/cmds/runTests.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/cli/src/cmds/runTests.ts b/packages/cli/src/cmds/runTests.ts index a5ff5d55..166b4bb6 100644 --- a/packages/cli/src/cmds/runTests.ts +++ b/packages/cli/src/cmds/runTests.ts @@ -36,7 +36,6 @@ export async function testCmd(envName: string, additionalArgs?: object): Promise const failed = vitest!.state.getFiles().filter((file) => file.result!.state === "fail"); if (failed.length > 0) { - process.stderr.write("Tests failed\n"); return false; } else { return true; From bc936c96c78a9682f38d4f49caa01656187ea743 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 8 Nov 2023 17:39:05 +0000 Subject: [PATCH 04/41] Version Packages --- .changeset/silver-peaches-lie.md | 5 ----- docs/CHANGELOG.md | 2 ++ docs/package.json | 2 +- packages/cli/CHANGELOG.md | 8 ++++++++ packages/cli/package.json | 2 +- packages/types/CHANGELOG.md | 2 ++ packages/types/package.json | 2 +- packages/util/CHANGELOG.md | 6 ++++++ packages/util/package.json | 2 +- test/CHANGELOG.md | 2 ++ test/package.json | 2 +- 11 files changed, 25 insertions(+), 10 deletions(-) delete mode 100644 .changeset/silver-peaches-lie.md diff --git a/.changeset/silver-peaches-lie.md b/.changeset/silver-peaches-lie.md deleted file mode 100644 index e6867eca..00000000 --- a/.changeset/silver-peaches-lie.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@moonwall/cli": patch ---- - -Force exit on failure diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 607a096d..d3695b77 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,7 @@ # @moonwall/docs +## 4.3.1 + ## 4.3.0 ## 4.2.10 diff --git a/docs/package.json b/docs/package.json index dbf7cfcd..40d9c485 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/docs", "type": "module", - "version": "4.3.0", + "version": "4.3.1", "private": true, "description": "Testing framework for the Moon family of projects", "scripts": { diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index ef41cc45..1211759c 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,13 @@ # @moonwall/cli +## 4.3.1 + +### Patch Changes + +- 25a52c3: Force exit on failure + - @moonwall/types@4.3.1 + - @moonwall/util@4.3.1 + ## 4.3.0 ### Minor Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 98b27b8e..0b8d65d9 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/cli", "type": "module", - "version": "4.3.0", + "version": "4.3.1", "description": "Testing framework for the Moon family of projects", "author": "timbrinded", "license": "ISC", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 5db3f221..f1872ce9 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,5 +1,7 @@ # @moonwall/types +## 4.3.1 + ## 4.3.0 ## 4.2.10 diff --git a/packages/types/package.json b/packages/types/package.json index 18a7bbf9..cb79a819 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/types", "type": "module", - "version": "4.3.0", + "version": "4.3.1", "description": "Testing framework for the Moon family of projects", "author": "timbrinded", "license": "ISC", diff --git a/packages/util/CHANGELOG.md b/packages/util/CHANGELOG.md index 1905e4ee..ffbc46c9 100644 --- a/packages/util/CHANGELOG.md +++ b/packages/util/CHANGELOG.md @@ -1,5 +1,11 @@ # @moonwall/util +## 4.3.1 + +### Patch Changes + +- @moonwall/types@4.3.1 + ## 4.3.0 ### Patch Changes diff --git a/packages/util/package.json b/packages/util/package.json index 5377e03a..d4f8010e 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/util", "type": "module", - "version": "4.3.0", + "version": "4.3.1", "description": "Testing framework for the Moon family of projects", "author": "timbrinded", "license": "ISC", diff --git a/test/CHANGELOG.md b/test/CHANGELOG.md index 022db4b5..d6b9635b 100644 --- a/test/CHANGELOG.md +++ b/test/CHANGELOG.md @@ -1,5 +1,7 @@ # @moonwall/tests +## 4.3.1 + ## 4.3.0 ## 4.2.10 diff --git a/test/package.json b/test/package.json index e9784808..7f466c01 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/tests", "type": "module", - "version": "4.3.0", + "version": "4.3.1", "private": true, "packageManager": "pnpm@7.23.0", "description": "Testing framework for the Moon family of projects", From 3978aed38b0c09305fa260d1c4e5b76ca8cb1f08 Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Thu, 9 Nov 2023 10:04:42 +0000 Subject: [PATCH 05/41] pkg updates --- .changeset/fast-windows-rule.md | 8 + package.json | 6 +- packages/cli/package.json | 16 +- packages/types/package.json | 4 +- packages/util/package.json | 12 +- pnpm-lock.yaml | 713 +++++++++++--------------------- test/package.json | 10 +- 7 files changed, 284 insertions(+), 485 deletions(-) create mode 100644 .changeset/fast-windows-rule.md diff --git a/.changeset/fast-windows-rule.md b/.changeset/fast-windows-rule.md new file mode 100644 index 00000000..99851145 --- /dev/null +++ b/.changeset/fast-windows-rule.md @@ -0,0 +1,8 @@ +--- +"@moonwall/types": patch +"@moonwall/util": patch +"@moonwall/cli": patch +"@moonwall/tests": patch +--- + +Package Ver Updates diff --git a/package.json b/package.json index ee805b91..f586b176 100644 --- a/package.json +++ b/package.json @@ -26,9 +26,9 @@ "devDependencies": { "@changesets/cli": "^2.26.2", "@pnpm/eslint-config": "^1.1.0", - "@typescript-eslint/eslint-plugin": "^6.7.4", - "@typescript-eslint/parser": "^6.7.4", - "eslint": "^8.50.0", + "@typescript-eslint/eslint-plugin": "^6.10.0", + "@typescript-eslint/parser": "^6.10.0", + "eslint": "^8.53.0", "eslint-config-prettier": "^9.0.0", "eslint-config-xo": "^0.43.1", "eslint-config-xo-typescript": "^1.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 0b8d65d9..767b5800 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -61,7 +61,7 @@ "prepublish": "pnpm run build && pnpm run generate-types" }, "dependencies": { - "@acala-network/chopsticks": "^0.9.0", + "@acala-network/chopsticks": "^0.9.1", "@moonbeam-network/api-augment": "^0.2500.0", "@moonwall/types": "workspace:*", "@moonwall/util": "workspace:*", @@ -84,25 +84,25 @@ "dotenv": "^16.3.1", "ethers": "^6.8.1", "execa": "^8.0.1", - "inquirer": "^9.2.11", + "inquirer": "^9.2.12", "inquirer-press-to-continue": "^1.2.0", "jsonc-parser": "^3.2.0", "minimatch": "^9.0.3", "node-fetch": "^3.3.2", "semver": "^7.5.4", - "viem": "^1.18.0", + "viem": "^1.18.9", "vitest": "1.0.0-beta.3", "web3": "4.2.1", "web3-providers-ws": "4.0.7", "ws": "^8.14.2", - "yaml": "^2.3.3", + "yaml": "^2.3.4", "yargs": "^17.7.2" }, "devDependencies": { - "@types/cli-progress": "^3.11.4", - "@types/debug": "^4.1.10", - "@types/node": "^20.8.10", - "@types/yargs": "^17.0.29", + "@types/cli-progress": "^3.11.5", + "@types/debug": "^4.1.12", + "@types/node": "^20.9.0", + "@types/yargs": "^17.0.31", "prettier": "^2.8.8", "tsup": "^7.2.0", "tsx": "^3.14.0", diff --git a/packages/types/package.json b/packages/types/package.json index cb79a819..a846b57b 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -64,12 +64,12 @@ "@polkadot/types": "^10.10.1", "@polkadot/util": "^12.5.1", "@polkadot/util-crypto": "^12.5.1", - "@types/node": "^20.8.9", + "@types/node": "^20.9.0", "@zombienet/utils": "^0.0.24", "bottleneck": "^2.19.5", "debug": "^4.3.4", "ethers": "^6.8.1", - "viem": "^1.18.0", + "viem": "^1.18.9", "web3": "4.2.1" }, "publishConfig": { diff --git a/packages/util/package.json b/packages/util/package.json index d4f8010e..560cac21 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -76,22 +76,22 @@ "debug": "^4.3.4", "dotenv": "^16.3.1", "ethers": "^6.8.1", - "inquirer": "^9.2.11", + "inquirer": "^9.2.12", "inquirer-press-to-continue": "^1.2.0", "node-fetch": "^3.3.2", "rlp": "^3.0.0", "semver": "^7.5.4", - "viem": "^1.16.6", + "viem": "^1.18.9", "vitest": "1.0.0-beta.3", "web3": "4.2.1", "ws": "^8.14.2", - "yaml": "^2.3.3", + "yaml": "^2.3.4", "yargs": "^17.7.2" }, "devDependencies": { - "@types/debug": "^4.1.10", - "@types/node": "^20.8.7", - "@types/yargs": "^17.0.29", + "@types/debug": "^4.1.12", + "@types/node": "^20.9.0", + "@types/yargs": "^17.0.31", "prettier": "^2.8.8", "tsup": "^7.2.0", "typescript": "^5.2.2" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0c857e44..26b5f8ff 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,23 +15,23 @@ importers: specifier: ^1.1.0 version: 1.1.0 '@typescript-eslint/eslint-plugin': - specifier: ^6.7.4 - version: 6.7.5(@typescript-eslint/parser@6.7.5)(eslint@8.51.0)(typescript@5.2.2) + specifier: ^6.10.0 + version: 6.10.0(@typescript-eslint/parser@6.10.0)(eslint@8.53.0)(typescript@5.2.2) '@typescript-eslint/parser': - specifier: ^6.7.4 - version: 6.7.5(eslint@8.51.0)(typescript@5.2.2) + specifier: ^6.10.0 + version: 6.10.0(eslint@8.53.0)(typescript@5.2.2) eslint: - specifier: ^8.50.0 - version: 8.51.0 + specifier: ^8.53.0 + version: 8.53.0 eslint-config-prettier: specifier: ^9.0.0 - version: 9.0.0(eslint@8.51.0) + version: 9.0.0(eslint@8.53.0) eslint-config-xo: specifier: ^0.43.1 - version: 0.43.1(eslint@8.51.0) + version: 0.43.1(eslint@8.53.0) eslint-config-xo-typescript: specifier: ^1.0.1 - version: 1.0.1(@typescript-eslint/eslint-plugin@6.7.5)(@typescript-eslint/parser@6.7.5)(eslint@8.51.0)(typescript@5.2.2) + version: 1.0.1(@typescript-eslint/eslint-plugin@6.10.0)(@typescript-eslint/parser@6.10.0)(eslint@8.53.0)(typescript@5.2.2) prettier: specifier: ^2.8.8 version: 2.8.8 @@ -55,8 +55,8 @@ importers: packages/cli: dependencies: '@acala-network/chopsticks': - specifier: ^0.9.0 - version: 0.9.0(@polkadot/util@12.5.1)(debug@4.3.4) + specifier: ^0.9.1 + version: 0.9.1(@polkadot/util@12.5.1)(debug@4.3.4) '@moonbeam-network/api-augment': specifier: ^0.2500.0 version: 0.2500.0 @@ -92,10 +92,10 @@ importers: version: 12.5.1(@polkadot/util@12.5.1) '@zombienet/orchestrator': specifier: ^0.0.62 - version: 0.0.62(@polkadot/util@12.5.1)(@types/node@20.8.10) + version: 0.0.62(@polkadot/util@12.5.1)(@types/node@20.9.0) '@zombienet/utils': specifier: ^0.0.24 - version: 0.0.24(@types/node@20.8.10)(typescript@5.2.2) + version: 0.0.24(@types/node@20.9.0)(typescript@5.2.2) bottleneck: specifier: ^2.19.5 version: 2.19.5 @@ -124,11 +124,11 @@ importers: specifier: ^8.0.1 version: 8.0.1 inquirer: - specifier: ^9.2.11 - version: 9.2.11 + specifier: ^9.2.12 + version: 9.2.12 inquirer-press-to-continue: specifier: ^1.2.0 - version: 1.2.0(inquirer@9.2.11) + version: 1.2.0(inquirer@9.2.12) jsonc-parser: specifier: ^3.2.0 version: 3.2.0 @@ -142,11 +142,11 @@ importers: specifier: ^7.5.4 version: 7.5.4 viem: - specifier: ^1.18.0 - version: 1.18.6(typescript@5.2.2) + specifier: ^1.18.9 + version: 1.18.9(typescript@5.2.2) vitest: specifier: 1.0.0-beta.3 - version: 1.0.0-beta.3(@types/node@20.8.10)(@vitest/ui@1.0.0-beta.1) + version: 1.0.0-beta.3(@types/node@20.9.0)(@vitest/ui@1.0.0-beta.1) web3: specifier: 4.2.1 version: 4.2.1(typescript@5.2.2) @@ -157,24 +157,24 @@ importers: specifier: ^8.14.2 version: 8.14.2 yaml: - specifier: ^2.3.3 + specifier: ^2.3.4 version: 2.3.4 yargs: specifier: ^17.7.2 version: 17.7.2 devDependencies: '@types/cli-progress': - specifier: ^3.11.4 - version: 3.11.4 + specifier: ^3.11.5 + version: 3.11.5 '@types/debug': - specifier: ^4.1.10 - version: 4.1.10 + specifier: ^4.1.12 + version: 4.1.12 '@types/node': - specifier: ^20.8.10 - version: 20.8.10 + specifier: ^20.9.0 + version: 20.9.0 '@types/yargs': - specifier: ^17.0.29 - version: 17.0.29 + specifier: ^17.0.31 + version: 17.0.31 prettier: specifier: ^2.8.8 version: 2.8.8 @@ -209,11 +209,11 @@ importers: specifier: ^12.5.1 version: 12.5.1(@polkadot/util@12.5.1) '@types/node': - specifier: ^20.8.9 - version: 20.8.9 + specifier: ^20.9.0 + version: 20.9.0 '@zombienet/utils': specifier: ^0.0.24 - version: 0.0.24(@types/node@20.8.9)(typescript@5.2.2) + version: 0.0.24(@types/node@20.9.0)(typescript@5.2.2) bottleneck: specifier: ^2.19.5 version: 2.19.5 @@ -224,8 +224,8 @@ importers: specifier: ^6.8.1 version: 6.8.1 viem: - specifier: ^1.18.0 - version: 1.18.0(typescript@5.2.2) + specifier: ^1.18.9 + version: 1.18.9(typescript@5.2.2) web3: specifier: 4.2.1 version: 4.2.1(typescript@5.2.2) @@ -300,11 +300,11 @@ importers: specifier: ^6.8.1 version: 6.8.1 inquirer: - specifier: ^9.2.11 - version: 9.2.11 + specifier: ^9.2.12 + version: 9.2.12 inquirer-press-to-continue: specifier: ^1.2.0 - version: 1.2.0(inquirer@9.2.11) + version: 1.2.0(inquirer@9.2.12) node-fetch: specifier: ^3.3.2 version: 3.3.2 @@ -315,11 +315,11 @@ importers: specifier: ^7.5.4 version: 7.5.4 viem: - specifier: ^1.16.6 - version: 1.16.6(typescript@5.2.2) + specifier: ^1.18.9 + version: 1.18.9(typescript@5.2.2) vitest: specifier: 1.0.0-beta.3 - version: 1.0.0-beta.3(@types/node@20.8.7) + version: 1.0.0-beta.3(@types/node@20.9.0)(@vitest/ui@1.0.0-beta.1) web3: specifier: 4.2.1 version: 4.2.1(typescript@5.2.2) @@ -327,21 +327,21 @@ importers: specifier: ^8.14.2 version: 8.14.2 yaml: - specifier: ^2.3.3 - version: 2.3.3 + specifier: ^2.3.4 + version: 2.3.4 yargs: specifier: ^17.7.2 version: 17.7.2 devDependencies: '@types/debug': - specifier: ^4.1.10 - version: 4.1.10 + specifier: ^4.1.12 + version: 4.1.12 '@types/node': - specifier: ^20.8.7 - version: 20.8.7 + specifier: ^20.9.0 + version: 20.9.0 '@types/yargs': - specifier: ^17.0.29 - version: 17.0.29 + specifier: ^17.0.31 + version: 17.0.31 prettier: specifier: ^2.8.8 version: 2.8.8 @@ -355,8 +355,8 @@ importers: test: devDependencies: '@acala-network/chopsticks': - specifier: ^0.9.0 - version: 0.9.0(@polkadot/util@12.5.1)(debug@4.3.4) + specifier: ^0.9.1 + version: 0.9.1(@polkadot/util@12.5.1)(debug@4.3.4) '@moonbeam-network/api-augment': specifier: ^0.2500.0 version: 0.2500.0 @@ -382,14 +382,14 @@ importers: specifier: ^12.5.1 version: 12.5.1 '@types/node': - specifier: ^20.8.10 - version: 20.8.10 + specifier: ^20.9.0 + version: 20.9.0 '@vitest/ui': specifier: 1.0.0-beta.1 version: 1.0.0-beta.1(vitest@1.0.0-beta.3) bun-types: - specifier: ^1.0.9 - version: 1.0.9 + specifier: ^1.0.11 + version: 1.0.11 chai: specifier: ^4.3.10 version: 4.3.10 @@ -406,8 +406,8 @@ importers: specifier: ^2.8.8 version: 2.8.8 solc: - specifier: ^0.8.22 - version: 0.8.22 + specifier: ^0.8.23 + version: 0.8.23 tsx: specifier: ^3.14.0 version: 3.14.0 @@ -415,11 +415,11 @@ importers: specifier: ^5.2.2 version: 5.2.2 viem: - specifier: ^1.18.1 - version: 1.18.6(typescript@5.2.2) + specifier: ^1.18.9 + version: 1.18.9(typescript@5.2.2) vitest: specifier: 1.0.0-beta.3 - version: 1.0.0-beta.3(@types/node@20.8.10)(@vitest/ui@1.0.0-beta.1) + version: 1.0.0-beta.3(@types/node@20.9.0)(@vitest/ui@1.0.0-beta.1) web3: specifier: 4.2.1 version: 4.2.1(typescript@5.2.2) @@ -434,16 +434,16 @@ packages: engines: {node: '>=0.10.0'} dev: true - /@acala-network/chopsticks-core@0.9.0(@polkadot/util@12.5.1): - resolution: {integrity: sha512-qm3mK1ckKTzwZYg+LC7Xm1f4zR7ioky/kqakaIxu2pj/EJzhezx6dH1NKtPUqEbx3SB9mMLxt61FnnaV2TmKmg==} + /@acala-network/chopsticks-core@0.9.1(@polkadot/util@12.5.1): + resolution: {integrity: sha512-pFPbSELcpkSzPy9lpomYAcn6BMFXqn6Z+0RNR+CcLSqHeMoJRKGh/w9T7MwFKd4MqDjY8/WZhLmp4X6bp7xAng==} dependencies: - '@acala-network/chopsticks-executor': 0.9.0 + '@acala-network/chopsticks-executor': 0.9.1 '@polkadot/api': 10.10.1 '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) comlink: 4.4.1 eventemitter3: 5.0.1 lodash: 4.17.21 - pino: 8.16.0 + pino: 8.16.1 pino-pretty: 10.2.3 zod: 3.22.4 transitivePeerDependencies: @@ -452,10 +452,10 @@ packages: - supports-color - utf-8-validate - /@acala-network/chopsticks-db@0.9.0(@polkadot/util@12.5.1): - resolution: {integrity: sha512-CNGvJ0Uwc2HYQNZA8BncmqRI0e1z1oIxEEoelj8qVxKxpUNj8aU18rXUOb5PmAg5GF8hVMMmdA4DD6z4uRGUTA==} + /@acala-network/chopsticks-db@0.9.1(@polkadot/util@12.5.1): + resolution: {integrity: sha512-jtDTqGu5CKyaAKKHI3Oi8FIRc3jwm1oMgbjTSYWD9oSzEBAqn2Xmbwg6VxCQhWH20ydrcxPyALEWb9mMICoNtw==} dependencies: - '@acala-network/chopsticks-core': 0.9.0(@polkadot/util@12.5.1) + '@acala-network/chopsticks-core': 0.9.1(@polkadot/util@12.5.1) idb: 7.1.1 sqlite3: 5.1.6 typeorm: 0.3.17(sqlite3@5.1.6) @@ -483,20 +483,20 @@ packages: - typeorm-aurora-data-api-driver - utf-8-validate - /@acala-network/chopsticks-executor@0.9.0: - resolution: {integrity: sha512-GjPBgeqaAG1obPe61RG++OW7glSBFcCq3XH/JKuOMTbB+OtggTplKAN+btsa6s9sZyJEQWYNF4QsrXaiJXFPNg==} + /@acala-network/chopsticks-executor@0.9.1: + resolution: {integrity: sha512-uukm3GInn+z+3jjZTFClJZjoWlM/IudpaYw+wO5h+6XIySmkLIfsPd19Kq4Nj0S0DFRPDHynnqsgg2JL789P+A==} dependencies: '@polkadot/util': 12.5.1 '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) - /@acala-network/chopsticks@0.9.0(@polkadot/util@12.5.1)(debug@4.3.4): - resolution: {integrity: sha512-jhbIjfgiM1A2RJssstgGUvNf3geOT/Ztm5Rz5m1qnmub/sCciQhHTg8rUtl2kNGdsW14WFm/HORIaz0lT/CyJA==} + /@acala-network/chopsticks@0.9.1(@polkadot/util@12.5.1)(debug@4.3.4): + resolution: {integrity: sha512-oTrJGQ/omE/6Di06RIPwAD4VdC8akstWY4GpZc1n+ZGn5YIHLDv7Nxzi2q2VBY9zBIIAp8Xw96cMId7ane2G+Q==} hasBin: true dependencies: - '@acala-network/chopsticks-core': 0.9.0(@polkadot/util@12.5.1) - '@acala-network/chopsticks-db': 0.9.0(@polkadot/util@12.5.1) + '@acala-network/chopsticks-core': 0.9.1(@polkadot/util@12.5.1) + '@acala-network/chopsticks-db': 0.9.1(@polkadot/util@12.5.1) '@pnpm/npm-conf': 2.2.2 - axios: 1.5.1(debug@4.3.4) + axios: 1.6.1(debug@4.3.4) dotenv: 16.3.1 global-agent: 3.0.0 js-yaml: 4.1.0 @@ -1130,13 +1130,13 @@ packages: requiresBuild: true optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.51.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.53.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.51.0 + eslint: 8.53.0 eslint-visitor-keys: 3.4.3 dev: true @@ -1145,8 +1145,8 @@ packages: engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true - /@eslint/eslintrc@2.1.2: - resolution: {integrity: sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==} + /@eslint/eslintrc@2.1.3: + resolution: {integrity: sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 @@ -1162,8 +1162,8 @@ packages: - supports-color dev: true - /@eslint/js@8.51.0: - resolution: {integrity: sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg==} + /@eslint/js@8.53.0: + resolution: {integrity: sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true @@ -1177,11 +1177,11 @@ packages: requiresBuild: true optional: true - /@humanwhocodes/config-array@0.11.11: - resolution: {integrity: sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==} + /@humanwhocodes/config-array@0.11.13: + resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==} engines: {node: '>=10.10.0'} dependencies: - '@humanwhocodes/object-schema': 1.2.1 + '@humanwhocodes/object-schema': 2.0.1 debug: 4.3.4(supports-color@8.1.1) minimatch: 3.1.2 transitivePeerDependencies: @@ -1193,8 +1193,8 @@ packages: engines: {node: '>=12.22'} dev: true - /@humanwhocodes/object-schema@1.2.1: - resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} + /@humanwhocodes/object-schema@2.0.1: + resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==} dev: true /@jest/schemas@29.6.3: @@ -1364,14 +1364,14 @@ packages: resolution: {integrity: sha512-SKS6ojdy2Pcrr/BQEMgkc/u1fPqFePVe7N1LgWV7Dh30g7L9Q4r2ZAbnW5JP5/RK9j1Jd1aplmjR80Vd7MOViw==} engines: {node: '>=12.22.0'} dependencies: - '@typescript-eslint/eslint-plugin': 6.7.5(@typescript-eslint/parser@6.7.5)(eslint@8.51.0)(typescript@5.2.2) - '@typescript-eslint/parser': 6.7.5(eslint@8.51.0)(typescript@5.2.2) - eslint: 8.51.0 - eslint-config-standard-with-typescript: 39.1.1(@typescript-eslint/eslint-plugin@6.7.5)(eslint-plugin-import@2.28.1)(eslint-plugin-n@16.2.0)(eslint-plugin-promise@6.1.1)(eslint@8.51.0)(typescript@5.2.2) - eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.5)(eslint@8.51.0) - eslint-plugin-n: 16.2.0(eslint@8.51.0) - eslint-plugin-node: 11.1.0(eslint@8.51.0) - eslint-plugin-promise: 6.1.1(eslint@8.51.0) + '@typescript-eslint/eslint-plugin': 6.10.0(@typescript-eslint/parser@6.10.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.10.0(eslint@8.53.0)(typescript@5.2.2) + eslint: 8.53.0 + eslint-config-standard-with-typescript: 39.1.1(@typescript-eslint/eslint-plugin@6.10.0)(eslint-plugin-import@2.28.1)(eslint-plugin-n@16.2.0)(eslint-plugin-promise@6.1.1)(eslint@8.53.0)(typescript@5.2.2) + eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.10.0)(eslint@8.53.0) + eslint-plugin-n: 16.2.0(eslint@8.53.0) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-promise: 6.1.1(eslint@8.53.0) typescript: 5.2.2 transitivePeerDependencies: - eslint-import-resolver-typescript @@ -1873,16 +1873,16 @@ packages: /@types/bn.js@5.1.2: resolution: {integrity: sha512-dkpZu0szUtn9UXTmw+e0AJFd4D2XAxDnsCLdc05SfqpqzPEBft8eQr8uaFitfo/dUUOZERaLec2hHMG87A4Dxg==} dependencies: - '@types/node': 20.8.10 + '@types/node': 20.9.0 - /@types/cli-progress@3.11.4: - resolution: {integrity: sha512-yufTxeeNCZuEIxx2uebK8lpSAsJM4lvzakm/VxzYhDtqhXCzwH9jpn7nPCxzrROuEbLATqhFq4MIPoG0tlrsvw==} + /@types/cli-progress@3.11.5: + resolution: {integrity: sha512-D4PbNRbviKyppS5ivBGyFO29POlySLmA2HyUFE4p5QGazAMM3CwkKWcvTl8gvElSuxRh6FPKL8XmidX873ou4g==} dependencies: - '@types/node': 20.8.10 + '@types/node': 20.9.0 dev: true - /@types/debug@4.1.10: - resolution: {integrity: sha512-tOSCru6s732pofZ+sMv9o4o3Zc+Sa8l3bxd/tweTQudFn06vAzb13ZX46Zi6m6EJ+RUbRTHvgQJ1gBtSgkaUYA==} + /@types/debug@4.1.12: + resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} dependencies: '@types/ms': 0.7.32 dev: true @@ -1897,6 +1897,10 @@ packages: resolution: {integrity: sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==} dev: true + /@types/json-schema@7.0.15: + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + dev: true + /@types/json5@0.0.29: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true @@ -1917,28 +1921,17 @@ packages: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} dev: true - /@types/node@16.18.60: - resolution: {integrity: sha512-ZUGPWx5vKfN+G2/yN7pcSNLkIkXEvlwNaJEd4e0ppX7W2S8XAkdc/37hM4OUNJB9sa0p12AOvGvxL4JCPiz9DA==} + /@types/node@16.18.61: + resolution: {integrity: sha512-k0N7BqGhJoJzdh6MuQg1V1ragJiXTh8VUBAZTWjJ9cUq23SG0F0xavOwZbhiP4J3y20xd6jxKx+xNUhkMAi76Q==} dev: true /@types/node@18.15.13: resolution: {integrity: sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==} - /@types/node@20.8.10: - resolution: {integrity: sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==} - dependencies: - undici-types: 5.26.5 - - /@types/node@20.8.7: - resolution: {integrity: sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==} - dependencies: - undici-types: 5.25.3 - - /@types/node@20.8.9: - resolution: {integrity: sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg==} + /@types/node@20.9.0: + resolution: {integrity: sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==} dependencies: undici-types: 5.26.5 - dev: false /@types/normalize-package-data@2.4.2: resolution: {integrity: sha512-lqa4UEhhv/2sjjIQgjX8B+RBjj47eo0mzGasklVJ78UKGQY1r0VpB9XHDaZZO9qzEFDdy4MrXLuEaSmPrPSe/A==} @@ -1948,6 +1941,10 @@ packages: resolution: {integrity: sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==} dev: true + /@types/semver@7.5.5: + resolution: {integrity: sha512-+d+WYC1BxJ6yVOgUgzK8gWvp5qF8ssV5r4nsDcZWKRWcDQLQ619tvWAxJQYGgBrO1MnLJC7a5GtiYsAoQ47dJg==} + dev: true + /@types/web-bluetooth@0.0.18: resolution: {integrity: sha512-v/ZHEj9xh82usl8LMR3GarzFY1IrbXJw5L4QfQhokjRV91q+SelFqxQWSep1ucXEZ22+dSTwLFkXeur25sPIbw==} dev: true @@ -1955,20 +1952,20 @@ packages: /@types/ws@8.5.3: resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} dependencies: - '@types/node': 20.8.10 + '@types/node': 20.9.0 /@types/yargs-parser@21.0.1: resolution: {integrity: sha512-axdPBuLuEJt0c4yI5OZssC19K2Mq1uKdrfZBzuxLvaztgqUtFYZUNw7lETExPYJR9jdEoIg4mb7RQKRQzOkeGQ==} dev: true - /@types/yargs@17.0.29: - resolution: {integrity: sha512-nacjqA3ee9zRF/++a3FUY1suHTFKZeHba2n8WeDw9cCVdmzmHpIxyzOJBcpHvvEmS8E9KqWlSnWHUkOrkhWcvA==} + /@types/yargs@17.0.31: + resolution: {integrity: sha512-bocYSx4DI8TmdlvxqGpVNXOgCNR1Jj0gNPhhAY+iz1rgKDAaYrAYdFYnhDV1IFuiuVc9HkOwyDcFxaTElF3/wg==} dependencies: '@types/yargs-parser': 21.0.1 dev: true - /@typescript-eslint/eslint-plugin@6.7.5(@typescript-eslint/parser@6.7.5)(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-JhtAwTRhOUcP96D0Y6KYnwig/MRQbOoLGXTON2+LlyB/N35SP9j1boai2zzwXb7ypKELXMx3DVk9UTaEq1vHEw==} + /@typescript-eslint/eslint-plugin@6.10.0(@typescript-eslint/parser@6.10.0)(eslint@8.53.0)(typescript@5.2.2): + resolution: {integrity: sha512-uoLj4g2OTL8rfUQVx2AFO1hp/zja1wABJq77P6IclQs6I/m9GLrm7jCdgzZkvWdDCQf1uEvoa8s8CupsgWQgVg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha @@ -1979,13 +1976,13 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.9.1 - '@typescript-eslint/parser': 6.7.5(eslint@8.51.0)(typescript@5.2.2) - '@typescript-eslint/scope-manager': 6.7.5 - '@typescript-eslint/type-utils': 6.7.5(eslint@8.51.0)(typescript@5.2.2) - '@typescript-eslint/utils': 6.7.5(eslint@8.51.0)(typescript@5.2.2) - '@typescript-eslint/visitor-keys': 6.7.5 + '@typescript-eslint/parser': 6.10.0(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/scope-manager': 6.10.0 + '@typescript-eslint/type-utils': 6.10.0(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.10.0(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.10.0 debug: 4.3.4(supports-color@8.1.1) - eslint: 8.51.0 + eslint: 8.53.0 graphemer: 1.4.0 ignore: 5.2.4 natural-compare: 1.4.0 @@ -1996,8 +1993,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@6.7.5(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-bIZVSGx2UME/lmhLcjdVc7ePBwn7CLqKarUBL4me1C5feOd663liTGjMBGVcGr+BhnSLeP4SgwdvNnnkbIdkCw==} + /@typescript-eslint/parser@6.10.0(eslint@8.53.0)(typescript@5.2.2): + resolution: {integrity: sha512-+sZwIj+s+io9ozSxIWbNB5873OSdfeBEH/FR0re14WLI6BaKuSOnnwCJ2foUiu8uXf4dRp1UqHP0vrZ1zXGrog==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -2006,27 +2003,27 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 6.7.5 - '@typescript-eslint/types': 6.7.5 - '@typescript-eslint/typescript-estree': 6.7.5(typescript@5.2.2) - '@typescript-eslint/visitor-keys': 6.7.5 + '@typescript-eslint/scope-manager': 6.10.0 + '@typescript-eslint/types': 6.10.0 + '@typescript-eslint/typescript-estree': 6.10.0(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.10.0 debug: 4.3.4(supports-color@8.1.1) - eslint: 8.51.0 + eslint: 8.53.0 typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager@6.7.5: - resolution: {integrity: sha512-GAlk3eQIwWOJeb9F7MKQ6Jbah/vx1zETSDw8likab/eFcqkjSD7BI75SDAeC5N2L0MmConMoPvTsmkrg71+B1A==} + /@typescript-eslint/scope-manager@6.10.0: + resolution: {integrity: sha512-TN/plV7dzqqC2iPNf1KrxozDgZs53Gfgg5ZHyw8erd6jd5Ta/JIEcdCheXFt9b1NYb93a1wmIIVW/2gLkombDg==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.7.5 - '@typescript-eslint/visitor-keys': 6.7.5 + '@typescript-eslint/types': 6.10.0 + '@typescript-eslint/visitor-keys': 6.10.0 dev: true - /@typescript-eslint/type-utils@6.7.5(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-Gs0qos5wqxnQrvpYv+pf3XfcRXW6jiAn9zE/K+DlmYf6FcpxeNYN0AIETaPR7rHO4K2UY+D0CIbDP9Ut0U4m1g==} + /@typescript-eslint/type-utils@6.10.0(eslint@8.53.0)(typescript@5.2.2): + resolution: {integrity: sha512-wYpPs3hgTFblMYwbYWPT3eZtaDOjbLyIYuqpwuLBBqhLiuvJ+9sEp2gNRJEtR5N/c9G1uTtQQL5AhV0fEPJYcg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -2035,23 +2032,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.7.5(typescript@5.2.2) - '@typescript-eslint/utils': 6.7.5(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/typescript-estree': 6.10.0(typescript@5.2.2) + '@typescript-eslint/utils': 6.10.0(eslint@8.53.0)(typescript@5.2.2) debug: 4.3.4(supports-color@8.1.1) - eslint: 8.51.0 + eslint: 8.53.0 ts-api-utils: 1.0.3(typescript@5.2.2) typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types@6.7.5: - resolution: {integrity: sha512-WboQBlOXtdj1tDFPyIthpKrUb+kZf2VroLZhxKa/VlwLlLyqv/PwUNgL30BlTVZV1Wu4Asu2mMYPqarSO4L5ZQ==} + /@typescript-eslint/types@6.10.0: + resolution: {integrity: sha512-36Fq1PWh9dusgo3vH7qmQAj5/AZqARky1Wi6WpINxB6SkQdY5vQoT2/7rW7uBIsPDcvvGCLi4r10p0OJ7ITAeg==} engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@6.7.5(typescript@5.2.2): - resolution: {integrity: sha512-NhJiJ4KdtwBIxrKl0BqG1Ur+uw7FiOnOThcYx9DpOGJ/Abc9z2xNzLeirCG02Ig3vkvrc2qFLmYSSsaITbKjlg==} + /@typescript-eslint/typescript-estree@6.10.0(typescript@5.2.2): + resolution: {integrity: sha512-ek0Eyuy6P15LJVeghbWhSrBCj/vJpPXXR+EpaRZqou7achUWL8IdYnMSC5WHAeTWswYQuP2hAZgij/bC9fanBg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' @@ -2059,8 +2056,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 6.7.5 - '@typescript-eslint/visitor-keys': 6.7.5 + '@typescript-eslint/types': 6.10.0 + '@typescript-eslint/visitor-keys': 6.10.0 debug: 4.3.4(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 @@ -2071,33 +2068,37 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@6.7.5(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-pfRRrH20thJbzPPlPc4j0UNGvH1PjPlhlCMq4Yx7EGjV7lvEeGX0U6MJYe8+SyFutWgSHsdbJ3BXzZccYggezA==} + /@typescript-eslint/utils@6.10.0(eslint@8.53.0)(typescript@5.2.2): + resolution: {integrity: sha512-v+pJ1/RcVyRc0o4wAGux9x42RHmAjIGzPRo538Z8M1tVx6HOnoQBCX/NoadHQlZeC+QO2yr4nNSFWOoraZCAyg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.51.0) - '@types/json-schema': 7.0.13 - '@types/semver': 7.5.3 - '@typescript-eslint/scope-manager': 6.7.5 - '@typescript-eslint/types': 6.7.5 - '@typescript-eslint/typescript-estree': 6.7.5(typescript@5.2.2) - eslint: 8.51.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.53.0) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.5 + '@typescript-eslint/scope-manager': 6.10.0 + '@typescript-eslint/types': 6.10.0 + '@typescript-eslint/typescript-estree': 6.10.0(typescript@5.2.2) + eslint: 8.53.0 semver: 7.5.4 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys@6.7.5: - resolution: {integrity: sha512-3MaWdDZtLlsexZzDSdQWsFQ9l9nL8B80Z4fImSpyllFC/KLqWQRdEcB+gGGO+N3Q2uL40EsG66wZLsohPxNXvg==} + /@typescript-eslint/visitor-keys@6.10.0: + resolution: {integrity: sha512-xMGluxQIEtOM7bqFCo+rCMh5fqI+ZxV5RUUOa29iVPz1OgCZrtc7rFnz5cLUazlkPKYqX+75iuDq7m0HQ48nCg==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.7.5 + '@typescript-eslint/types': 6.10.0 eslint-visitor-keys: 3.4.3 dev: true + /@ungap/structured-clone@1.2.0: + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + dev: true + /@vitest/expect@1.0.0-beta.3: resolution: {integrity: sha512-fbDKa7aj/xiCcS9X6RwlPXTZ5SNQpvPl0eswD+d3Lnp8gmuB8j2mb+CDUMe7VRg+ah5Cm/kqAc9DzYTe2IcvgQ==} dependencies: @@ -2136,7 +2137,7 @@ packages: pathe: 1.1.1 picocolors: 1.0.0 sirv: 2.0.3 - vitest: 1.0.0-beta.3(@types/node@20.8.10)(@vitest/ui@1.0.0-beta.1) + vitest: 1.0.0-beta.3(@types/node@20.9.0)(@vitest/ui@1.0.0-beta.1) /@vitest/utils@1.0.0-beta.1: resolution: {integrity: sha512-jfcqEzZamUA2Th76NVOHyRMAUIAuxMG9q+BstUbxzPQ9IkbCjz5GkhagPfy4r6zTFiElhX7mmPVj/nvB/Ea/bQ==} @@ -2314,14 +2315,14 @@ packages: - vue dev: true - /@zombienet/orchestrator@0.0.62(@polkadot/util@12.5.1)(@types/node@20.8.10): + /@zombienet/orchestrator@0.0.62(@polkadot/util@12.5.1)(@types/node@20.9.0): resolution: {integrity: sha512-nUX9/UrEv4k2kW7zOPBKIK6opaQ/7/QWQ4ZRfWooihM0k2cZ+HVeJ1AVXeDKnnbvaxfHG2/jrhIx5btuRYvbyQ==} engines: {node: '>=18'} dependencies: '@polkadot/api': 10.10.1 '@polkadot/keyring': 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) - '@zombienet/utils': 0.0.24(@types/node@20.8.10)(typescript@5.2.2) + '@zombienet/utils': 0.0.24(@types/node@20.9.0)(typescript@5.2.2) JSONStream: 1.3.5 chai: 4.3.10 debug: 4.3.4(supports-color@8.1.1) @@ -2349,26 +2350,7 @@ packages: - utf-8-validate dev: false - /@zombienet/utils@0.0.24(@types/node@20.8.10)(typescript@5.2.2): - resolution: {integrity: sha512-CUHn4u04ryfRqCQQsZHSpMIpMxzdMvSZR86Gp3Hwexf7wZTkHNZ5hsJnQO+J/yl28ny0GcjLJSU1hZ2kMV+hqw==} - engines: {node: '>=18'} - dependencies: - cli-table3: 0.6.3 - debug: 4.3.4(supports-color@8.1.1) - mocha: 10.2.0 - nunjucks: 3.2.4 - toml: 3.0.0 - ts-node: 10.9.1(@types/node@20.8.10)(typescript@5.2.2) - transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' - - '@types/node' - - chokidar - - supports-color - - typescript - dev: false - - /@zombienet/utils@0.0.24(@types/node@20.8.9)(typescript@5.2.2): + /@zombienet/utils@0.0.24(@types/node@20.9.0)(typescript@5.2.2): resolution: {integrity: sha512-CUHn4u04ryfRqCQQsZHSpMIpMxzdMvSZR86Gp3Hwexf7wZTkHNZ5hsJnQO+J/yl28ny0GcjLJSU1hZ2kMV+hqw==} engines: {node: '>=18'} dependencies: @@ -2377,7 +2359,7 @@ packages: mocha: 10.2.0 nunjucks: 3.2.4 toml: 3.0.0 - ts-node: 10.9.1(@types/node@20.8.9)(typescript@5.2.2) + ts-node: 10.9.1(@types/node@20.9.0)(typescript@5.2.2) transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -2691,8 +2673,8 @@ packages: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} - /axios@1.5.1(debug@4.3.4): - resolution: {integrity: sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==} + /axios@1.6.1(debug@4.3.4): + resolution: {integrity: sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==} dependencies: follow-redirects: 1.15.3(debug@4.3.4) form-data: 4.0.0 @@ -2798,8 +2780,8 @@ packages: semver: 7.5.4 dev: true - /bun-types@1.0.9: - resolution: {integrity: sha512-9zWU5b/D41v4h5YgQxMW7aUvwYqMhU7WRjhPMN73XE6MNl5mvZ5vgAEWV8Lisdd4JgDSdWk2t9oY6kYqeDhQSA==} + /bun-types@1.0.11: + resolution: {integrity: sha512-XaDwjnBlkdTOtBEAcXhDnPSKFMlwFK/526z0iyairYIDhZJMzZM1QU4D7XRiEI2SpKQWexn0S/LN9Mwx5xSJNg==} dev: true /bundle-require@4.0.2(esbuild@0.18.20): @@ -3546,16 +3528,16 @@ packages: engines: {node: '>=12'} dev: false - /eslint-config-prettier@9.0.0(eslint@8.51.0): + /eslint-config-prettier@9.0.0(eslint@8.53.0): resolution: {integrity: sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.51.0 + eslint: 8.53.0 dev: true - /eslint-config-standard-with-typescript@39.1.1(@typescript-eslint/eslint-plugin@6.7.5)(eslint-plugin-import@2.28.1)(eslint-plugin-n@16.2.0)(eslint-plugin-promise@6.1.1)(eslint@8.51.0)(typescript@5.2.2): + /eslint-config-standard-with-typescript@39.1.1(@typescript-eslint/eslint-plugin@6.10.0)(eslint-plugin-import@2.28.1)(eslint-plugin-n@16.2.0)(eslint-plugin-promise@6.1.1)(eslint@8.53.0)(typescript@5.2.2): resolution: {integrity: sha512-t6B5Ep8E4I18uuoYeYxINyqcXb2UbC0SOOTxRtBSt2JUs+EzeXbfe2oaiPs71AIdnoWhXDO2fYOHz8df3kV84A==} peerDependencies: '@typescript-eslint/eslint-plugin': ^6.4.0 @@ -3565,19 +3547,19 @@ packages: eslint-plugin-promise: ^6.0.0 typescript: '*' dependencies: - '@typescript-eslint/eslint-plugin': 6.7.5(@typescript-eslint/parser@6.7.5)(eslint@8.51.0)(typescript@5.2.2) - '@typescript-eslint/parser': 6.7.5(eslint@8.51.0)(typescript@5.2.2) - eslint: 8.51.0 - eslint-config-standard: 17.1.0(eslint-plugin-import@2.28.1)(eslint-plugin-n@16.2.0)(eslint-plugin-promise@6.1.1)(eslint@8.51.0) - eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.5)(eslint@8.51.0) - eslint-plugin-n: 16.2.0(eslint@8.51.0) - eslint-plugin-promise: 6.1.1(eslint@8.51.0) + '@typescript-eslint/eslint-plugin': 6.10.0(@typescript-eslint/parser@6.10.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.10.0(eslint@8.53.0)(typescript@5.2.2) + eslint: 8.53.0 + eslint-config-standard: 17.1.0(eslint-plugin-import@2.28.1)(eslint-plugin-n@16.2.0)(eslint-plugin-promise@6.1.1)(eslint@8.53.0) + eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.10.0)(eslint@8.53.0) + eslint-plugin-n: 16.2.0(eslint@8.53.0) + eslint-plugin-promise: 6.1.1(eslint@8.53.0) typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /eslint-config-standard@17.1.0(eslint-plugin-import@2.28.1)(eslint-plugin-n@16.2.0)(eslint-plugin-promise@6.1.1)(eslint@8.51.0): + /eslint-config-standard@17.1.0(eslint-plugin-import@2.28.1)(eslint-plugin-n@16.2.0)(eslint-plugin-promise@6.1.1)(eslint@8.53.0): resolution: {integrity: sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q==} engines: {node: '>=12.0.0'} peerDependencies: @@ -3586,13 +3568,13 @@ packages: eslint-plugin-n: '^15.0.0 || ^16.0.0 ' eslint-plugin-promise: ^6.0.0 dependencies: - eslint: 8.51.0 - eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.5)(eslint@8.51.0) - eslint-plugin-n: 16.2.0(eslint@8.51.0) - eslint-plugin-promise: 6.1.1(eslint@8.51.0) + eslint: 8.53.0 + eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.10.0)(eslint@8.53.0) + eslint-plugin-n: 16.2.0(eslint@8.53.0) + eslint-plugin-promise: 6.1.1(eslint@8.53.0) dev: true - /eslint-config-xo-typescript@1.0.1(@typescript-eslint/eslint-plugin@6.7.5)(@typescript-eslint/parser@6.7.5)(eslint@8.51.0)(typescript@5.2.2): + /eslint-config-xo-typescript@1.0.1(@typescript-eslint/eslint-plugin@6.10.0)(@typescript-eslint/parser@6.10.0)(eslint@8.53.0)(typescript@5.2.2): resolution: {integrity: sha512-vPQssnRSUgBFOEfB/KY12CXwltwFSn4RSCfa+w7gjBC2PFQ7Yfgmyei+1XUZ3K+8LRGef2NMJUcxts7PldhDjg==} engines: {node: '>=16'} peerDependencies: @@ -3601,20 +3583,20 @@ packages: eslint: '>=8.0.0' typescript: '>=4.7' dependencies: - '@typescript-eslint/eslint-plugin': 6.7.5(@typescript-eslint/parser@6.7.5)(eslint@8.51.0)(typescript@5.2.2) - '@typescript-eslint/parser': 6.7.5(eslint@8.51.0)(typescript@5.2.2) - eslint: 8.51.0 + '@typescript-eslint/eslint-plugin': 6.10.0(@typescript-eslint/parser@6.10.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.10.0(eslint@8.53.0)(typescript@5.2.2) + eslint: 8.53.0 typescript: 5.2.2 dev: true - /eslint-config-xo@0.43.1(eslint@8.51.0): + /eslint-config-xo@0.43.1(eslint@8.53.0): resolution: {integrity: sha512-azv1L2PysRA0NkZOgbndUpN+581L7wPqkgJOgxxw3hxwXAbJgD6Hqb/SjHRiACifXt/AvxCzE/jIKFAlI7XjvQ==} engines: {node: '>=12'} peerDependencies: eslint: '>=8.27.0' dependencies: confusing-browser-globals: 1.0.11 - eslint: 8.51.0 + eslint: 8.53.0 dev: true /eslint-import-resolver-node@0.3.9: @@ -3627,7 +3609,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.7.5)(eslint-import-resolver-node@0.3.9)(eslint@8.51.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.10.0)(eslint-import-resolver-node@0.3.9)(eslint@8.53.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -3648,37 +3630,37 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.7.5(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.10.0(eslint@8.53.0)(typescript@5.2.2) debug: 3.2.7 - eslint: 8.51.0 + eslint: 8.53.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-es-x@7.2.0(eslint@8.51.0): + /eslint-plugin-es-x@7.2.0(eslint@8.53.0): resolution: {integrity: sha512-9dvv5CcvNjSJPqnS5uZkqb3xmbeqRLnvXKK7iI5+oK/yTusyc46zbBZKENGsOfojm/mKfszyZb+wNqNPAPeGXA==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: eslint: '>=8' dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.51.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.53.0) '@eslint-community/regexpp': 4.9.1 - eslint: 8.51.0 + eslint: 8.53.0 dev: true - /eslint-plugin-es@3.0.1(eslint@8.51.0): + /eslint-plugin-es@3.0.1(eslint@8.53.0): resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=4.19.1' dependencies: - eslint: 8.51.0 + eslint: 8.53.0 eslint-utils: 2.1.0 regexpp: 3.2.0 dev: true - /eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.7.5)(eslint@8.51.0): + /eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.10.0)(eslint@8.53.0): resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==} engines: {node: '>=4'} peerDependencies: @@ -3688,16 +3670,16 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 6.7.5(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.10.0(eslint@8.53.0)(typescript@5.2.2) array-includes: 3.1.7 array.prototype.findlastindex: 1.2.3 array.prototype.flat: 1.3.2 array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.51.0 + eslint: 8.53.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.5)(eslint-import-resolver-node@0.3.9)(eslint@8.51.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.10.0)(eslint-import-resolver-node@0.3.9)(eslint@8.53.0) has: 1.0.4 is-core-module: 2.13.0 is-glob: 4.0.3 @@ -3713,16 +3695,16 @@ packages: - supports-color dev: true - /eslint-plugin-n@16.2.0(eslint@8.51.0): + /eslint-plugin-n@16.2.0(eslint@8.53.0): resolution: {integrity: sha512-AQER2jEyQOt1LG6JkGJCCIFotzmlcCZFur2wdKrp1JX2cNotC7Ae0BcD/4lLv3lUAArM9uNS8z/fsvXTd0L71g==} engines: {node: '>=16.0.0'} peerDependencies: eslint: '>=7.0.0' dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.51.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.53.0) builtins: 5.0.1 - eslint: 8.51.0 - eslint-plugin-es-x: 7.2.0(eslint@8.51.0) + eslint: 8.53.0 + eslint-plugin-es-x: 7.2.0(eslint@8.53.0) get-tsconfig: 4.7.2 ignore: 5.2.4 is-core-module: 2.13.0 @@ -3731,14 +3713,14 @@ packages: semver: 7.5.4 dev: true - /eslint-plugin-node@11.1.0(eslint@8.51.0): + /eslint-plugin-node@11.1.0(eslint@8.53.0): resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=5.16.0' dependencies: - eslint: 8.51.0 - eslint-plugin-es: 3.0.1(eslint@8.51.0) + eslint: 8.53.0 + eslint-plugin-es: 3.0.1(eslint@8.53.0) eslint-utils: 2.1.0 ignore: 5.2.4 minimatch: 3.1.2 @@ -3746,13 +3728,13 @@ packages: semver: 6.3.1 dev: true - /eslint-plugin-promise@6.1.1(eslint@8.51.0): + /eslint-plugin-promise@6.1.1(eslint@8.53.0): resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.51.0 + eslint: 8.53.0 dev: true /eslint-scope@7.2.2: @@ -3780,18 +3762,19 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint@8.51.0: - resolution: {integrity: sha512-2WuxRZBrlwnXi+/vFSJyjMqrNjtJqiasMzehF0shoLaW7DzS3/9Yvrmq5JiT66+pNjiX4UBnLDiKHcWAr/OInA==} + /eslint@8.53.0: + resolution: {integrity: sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.51.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.53.0) '@eslint-community/regexpp': 4.9.1 - '@eslint/eslintrc': 2.1.2 - '@eslint/js': 8.51.0 - '@humanwhocodes/config-array': 0.11.11 + '@eslint/eslintrc': 2.1.3 + '@eslint/js': 8.53.0 + '@humanwhocodes/config-array': 0.11.13 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 @@ -4509,18 +4492,18 @@ packages: /ini@1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} - /inquirer-press-to-continue@1.2.0(inquirer@9.2.11): + /inquirer-press-to-continue@1.2.0(inquirer@9.2.12): resolution: {integrity: sha512-HdKOgEAydYhI3OKLy5S4LMi7a/AHJjPzF06mHqbdVxlTmHOaytQVBaVbQcSytukD70K9FYLhYicNOPuNjFiWVQ==} peerDependencies: inquirer: '>=8.0.0 <10.0.0' dependencies: deep-equal: 2.2.2 - inquirer: 9.2.11 + inquirer: 9.2.12 ora: 6.3.1 dev: false - /inquirer@9.2.11: - resolution: {integrity: sha512-B2LafrnnhbRzCWfAdOXisUzL89Kg8cVJlYmhqoi3flSiV/TveO+nsXwgKr9h9PIo+J1hz7nBSk6gegRIMBBf7g==} + /inquirer@9.2.12: + resolution: {integrity: sha512-mg3Fh9g2zfuVWJn6lhST0O7x4n03k7G8Tx5nvikJkbq8/CK47WDVm+UznF0G6s5Zi0KcyUisr6DU8T67N5U+1Q==} engines: {node: '>=14.18.0'} dependencies: '@ljharb/through': 2.3.11 @@ -5366,6 +5349,12 @@ packages: object-assign: 4.1.1 thenify-all: 1.6.0 + /n@9.2.0: + resolution: {integrity: sha512-R8mFN2OWwNVc+r1f9fDzcT34DnDwUIHskrpTesZ6SdluaXBBnRtTu5tlfaSPloBi1Z/eGJoPO9nhyawWPad5UQ==} + os: ['!win32'] + hasBin: true + dev: true + /nanoid@3.3.3: resolution: {integrity: sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -5873,8 +5862,8 @@ packages: /pino-std-serializers@6.2.2: resolution: {integrity: sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA==} - /pino@8.16.0: - resolution: {integrity: sha512-UUmvQ/7KTZt/vHjhRrnyS7h+J7qPBQnpG80V56xmIC+o9IqYmQOw/UIny9S9zYDfRBR0ClouCr464EkBMIT7Fw==} + /pino@8.16.1: + resolution: {integrity: sha512-3bKsVhBmgPjGV9pyn4fO/8RtoVDR8ssW1ev819FsRXlRNgW8gR/9Kx+gCK4UPWd4JjrRDLWpzd/pb1AyWm3MGA==} hasBin: true dependencies: atomic-sleep: 1.0.0 @@ -5882,7 +5871,7 @@ packages: on-exit-leak-free: 2.1.2 pino-abstract-transport: 1.1.0 pino-std-serializers: 6.2.2 - process-warning: 2.2.0 + process-warning: 2.3.0 quick-format-unescaped: 4.0.4 real-require: 0.2.0 safe-stable-stringify: 2.4.3 @@ -5971,8 +5960,8 @@ packages: ansi-styles: 5.2.0 react-is: 18.2.0 - /process-warning@2.2.0: - resolution: {integrity: sha512-/1WZ8+VQjR6avWOgHeEPd7SDQmFQ1B5mC1eRXsCm5TarlNmx/wCsa5GEaxGm05BORRtyG/Ex/3xq3TuRvq57qg==} + /process-warning@2.3.0: + resolution: {integrity: sha512-N6mp1+2jpQr3oCFMz6SeHRGbv6Slb20bRhj4v3xR99HqNToAcOe1MFOp4tytyzOfJn+QtN8Rf7U/h2KAn4kC6g==} /process@0.11.10: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} @@ -6020,7 +6009,7 @@ packages: '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 '@types/long': 4.0.2 - '@types/node': 20.8.10 + '@types/node': 20.9.0 long: 4.0.0 dev: false @@ -6468,8 +6457,8 @@ packages: smart-buffer: 4.2.0 optional: true - /solc@0.8.22: - resolution: {integrity: sha512-bA2tMZXx93R8L5LUH7TlB/f+QhkVyxrrY6LmgJnFFZlRknrhYVlBK1e3uHIdKybwoFabOFSzeaZjPeL/GIpFGQ==} + /solc@0.8.23: + resolution: {integrity: sha512-uqe69kFWfJc3cKdxj+Eg9CdW1CP3PLZDPeyJStQVWL8Q9jjjKD0VuRAKBFR8mrWiq5A7gJqERxJFYJsklrVsfA==} engines: {node: '>=10.0.0'} hasBin: true dependencies: @@ -6478,6 +6467,7 @@ packages: follow-redirects: 1.15.3(debug@4.3.4) js-sha3: 0.8.0 memorystream: 0.3.1 + n: 9.2.0 semver: 5.7.2 tmp: 0.0.33 transitivePeerDependencies: @@ -6868,7 +6858,7 @@ packages: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} dev: true - /ts-node@10.9.1(@types/node@16.18.60)(typescript@4.9.5): + /ts-node@10.9.1(@types/node@16.18.61)(typescript@4.9.5): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -6887,7 +6877,7 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 16.18.60 + '@types/node': 16.18.61 acorn: 8.10.0 acorn-walk: 8.2.0 arg: 4.1.3 @@ -6899,38 +6889,7 @@ packages: yn: 3.1.1 dev: true - /ts-node@10.9.1(@types/node@20.8.10)(typescript@5.2.2): - resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} - hasBin: true - peerDependencies: - '@swc/core': '>=1.2.50' - '@swc/wasm': '>=1.2.50' - '@types/node': '*' - typescript: '>=2.7' - peerDependenciesMeta: - '@swc/core': - optional: true - '@swc/wasm': - optional: true - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.9 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 20.8.10 - acorn: 8.10.0 - acorn-walk: 8.2.0 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.2.2 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - dev: false - - /ts-node@10.9.1(@types/node@20.8.9)(typescript@5.2.2): + /ts-node@10.9.1(@types/node@20.9.0)(typescript@5.2.2): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -6949,7 +6908,7 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.8.9 + '@types/node': 20.9.0 acorn: 8.10.0 acorn-walk: 8.2.0 arg: 4.1.3 @@ -7192,11 +7151,11 @@ packages: hasBin: true dependencies: '@types/json-schema': 7.0.13 - '@types/node': 16.18.60 + '@types/node': 16.18.61 glob: 7.2.3 path-equal: 1.2.5 safe-stable-stringify: 2.4.3 - ts-node: 10.9.1(@types/node@16.18.60)(typescript@4.9.5) + ts-node: 10.9.1(@types/node@16.18.61)(typescript@4.9.5) typescript: 4.9.5 yargs: 17.7.2 transitivePeerDependencies: @@ -7233,9 +7192,6 @@ packages: which-boxed-primitive: 1.0.2 dev: true - /undici-types@5.25.3: - resolution: {integrity: sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==} - /undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} @@ -7307,31 +7263,8 @@ packages: spdx-expression-parse: 3.0.1 dev: true - /viem@1.16.6(typescript@5.2.2): - resolution: {integrity: sha512-jcWcFQ+xzIfDwexwPJRvCuCRJKEkK9iHTStG7mpU5MmuSBpACs4nATBDyXNFtUiyYTFzLlVEwWkt68K0nCSImg==} - peerDependencies: - typescript: '>=5.0.4' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@adraffy/ens-normalize': 1.9.4 - '@noble/curves': 1.2.0 - '@noble/hashes': 1.3.2 - '@scure/bip32': 1.3.2 - '@scure/bip39': 1.2.1 - abitype: 0.9.8(typescript@5.2.2) - isows: 1.0.3(ws@8.13.0) - typescript: 5.2.2 - ws: 8.13.0 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - zod - dev: false - - /viem@1.18.0(typescript@5.2.2): - resolution: {integrity: sha512-NeKi5RFj7fHdsnk5pojivHFLkTyBWyehxeSE/gSPTDJKCWnR9i+Ra0W++VwN5ghciEG55O8b4RdpYhzGmhnr7A==} + /viem@1.18.9(typescript@5.2.2): + resolution: {integrity: sha512-eAXtoTwAFA3YEgjTYMb5ZTQrDC0UPx5qyZ4sv90TirVKepcM9mBPksTkC1SSWya0UdxhBmhEBL/CiYMjmGCTWg==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -7351,52 +7284,8 @@ packages: - bufferutil - utf-8-validate - zod - dev: false - - /viem@1.18.6(typescript@5.2.2): - resolution: {integrity: sha512-oKkrxF2aqxjJ4pmm0ko7j+ZFRekP6VGIknSroV+6+dF+T31bscltPZwJ0fOJDxCOVhoVtxrKFRTkkasEVDblUA==} - peerDependencies: - typescript: '>=5.0.4' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@adraffy/ens-normalize': 1.9.4 - '@noble/curves': 1.2.0 - '@noble/hashes': 1.3.2 - '@scure/bip32': 1.3.2 - '@scure/bip39': 1.2.1 - abitype: 0.9.8(typescript@5.2.2) - isows: 1.0.3(ws@8.13.0) - typescript: 5.2.2 - ws: 8.13.0 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - zod - - /vite-node@1.0.0-beta.3(@types/node@20.8.10): - resolution: {integrity: sha512-qpdoB+N9LV2Lr3W6k8vZwm/lN3hdmz+c0Tixh2ktnX/ywF0OkQf7wIWLeiFLvW4Fa/iw4qhye7xiBBMP1o6/sA==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - dependencies: - cac: 6.7.14 - debug: 4.3.4(supports-color@8.1.1) - mlly: 1.4.2 - pathe: 1.1.1 - picocolors: 1.0.0 - vite: 4.4.11(@types/node@20.8.10) - transitivePeerDependencies: - - '@types/node' - - less - - lightningcss - - sass - - stylus - - sugarss - - supports-color - - terser - /vite-node@1.0.0-beta.3(@types/node@20.8.7): + /vite-node@1.0.0-beta.3(@types/node@20.9.0): resolution: {integrity: sha512-qpdoB+N9LV2Lr3W6k8vZwm/lN3hdmz+c0Tixh2ktnX/ywF0OkQf7wIWLeiFLvW4Fa/iw4qhye7xiBBMP1o6/sA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -7406,7 +7295,7 @@ packages: mlly: 1.4.2 pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.4.11(@types/node@20.8.7) + vite: 4.4.11(@types/node@20.9.0) transitivePeerDependencies: - '@types/node' - less @@ -7416,44 +7305,8 @@ packages: - sugarss - supports-color - terser - dev: false - - /vite@4.4.11(@types/node@20.8.10): - resolution: {integrity: sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==} - engines: {node: ^14.18.0 || >=16.0.0} - hasBin: true - peerDependencies: - '@types/node': '>= 14' - less: '*' - lightningcss: ^1.21.0 - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - '@types/node': 20.8.10 - esbuild: 0.18.20 - postcss: 8.4.31 - rollup: 3.29.4 - optionalDependencies: - fsevents: 2.3.3 - /vite@4.4.11(@types/node@20.8.7): + /vite@4.4.11(@types/node@20.9.0): resolution: {integrity: sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -7481,7 +7334,7 @@ packages: terser: optional: true dependencies: - '@types/node': 20.8.7 + '@types/node': 20.9.0 esbuild: 0.18.20 postcss: 8.4.31 rollup: 3.29.4 @@ -7501,7 +7354,7 @@ packages: mark.js: 8.11.1 minisearch: 6.1.0 shiki: 0.14.5 - vite: 4.4.11(@types/node@20.8.7) + vite: 4.4.11(@types/node@20.9.0) vue: 3.3.4 transitivePeerDependencies: - '@algolia/client-search' @@ -7530,7 +7383,7 @@ packages: - universal-cookie dev: true - /vitest@1.0.0-beta.3(@types/node@20.8.10)(@vitest/ui@1.0.0-beta.1): + /vitest@1.0.0-beta.3(@types/node@20.9.0)(@vitest/ui@1.0.0-beta.1): resolution: {integrity: sha512-Ytj70kgJq1MxWpS8U33nRwF7Mngzr0NxD6J1J8WZGZrYhGRktW3t0AwbjLyFg1URiW3ds6FSp/T3C8JEnP49cA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -7555,7 +7408,7 @@ packages: jsdom: optional: true dependencies: - '@types/node': 20.8.10 + '@types/node': 20.9.0 '@vitest/expect': 1.0.0-beta.3 '@vitest/runner': 1.0.0-beta.3 '@vitest/snapshot': 1.0.0-beta.3 @@ -7575,64 +7428,8 @@ packages: strip-literal: 1.3.0 tinybench: 2.5.1 tinypool: 0.8.1 - vite: 4.4.11(@types/node@20.8.10) - vite-node: 1.0.0-beta.3(@types/node@20.8.10) - why-is-node-running: 2.2.2 - transitivePeerDependencies: - - less - - lightningcss - - sass - - stylus - - sugarss - - supports-color - - terser - - /vitest@1.0.0-beta.3(@types/node@20.8.7): - resolution: {integrity: sha512-Ytj70kgJq1MxWpS8U33nRwF7Mngzr0NxD6J1J8WZGZrYhGRktW3t0AwbjLyFg1URiW3ds6FSp/T3C8JEnP49cA==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - peerDependencies: - '@edge-runtime/vm': '*' - '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': '*' - '@vitest/ui': '*' - happy-dom: '*' - jsdom: '*' - peerDependenciesMeta: - '@edge-runtime/vm': - optional: true - '@types/node': - optional: true - '@vitest/browser': - optional: true - '@vitest/ui': - optional: true - happy-dom: - optional: true - jsdom: - optional: true - dependencies: - '@types/node': 20.8.7 - '@vitest/expect': 1.0.0-beta.3 - '@vitest/runner': 1.0.0-beta.3 - '@vitest/snapshot': 1.0.0-beta.3 - '@vitest/spy': 1.0.0-beta.3 - '@vitest/utils': 1.0.0-beta.3 - acorn: 8.10.0 - acorn-walk: 8.2.0 - cac: 6.7.14 - chai: 4.3.10 - debug: 4.3.4(supports-color@8.1.1) - local-pkg: 0.4.3 - magic-string: 0.30.5 - pathe: 1.1.1 - picocolors: 1.0.0 - std-env: 3.4.3 - strip-literal: 1.3.0 - tinybench: 2.5.1 - tinypool: 0.8.1 - vite: 4.4.11(@types/node@20.8.7) - vite-node: 1.0.0-beta.3(@types/node@20.8.7) + vite: 4.4.11(@types/node@20.9.0) + vite-node: 1.0.0-beta.3(@types/node@20.9.0) why-is-node-running: 2.2.2 transitivePeerDependencies: - less @@ -7642,7 +7439,6 @@ packages: - sugarss - supports-color - terser - dev: false /vscode-oniguruma@1.7.0: resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} @@ -8139,11 +7935,6 @@ packages: /yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - /yaml@2.3.3: - resolution: {integrity: sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==} - engines: {node: '>= 14'} - dev: false - /yaml@2.3.4: resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} engines: {node: '>= 14'} diff --git a/test/package.json b/test/package.json index 7f466c01..d11276e3 100644 --- a/test/package.json +++ b/test/package.json @@ -13,7 +13,7 @@ "bun_test": "bun test suites/bun_test/*" }, "devDependencies": { - "@acala-network/chopsticks": "^0.9.0", + "@acala-network/chopsticks": "^0.9.1", "@moonbeam-network/api-augment": "^0.2500.0", "@moonwall/cli": "workspace:*", "@moonwall/types": "workspace:*", @@ -22,18 +22,18 @@ "@polkadot/api": "^10.10.1", "@polkadot/api-augment": "^10.10.1", "@polkadot/util": "^12.5.1", - "@types/node": "^20.8.10", + "@types/node": "^20.9.0", "@vitest/ui": "1.0.0-beta.1", - "bun-types": "^1.0.9", + "bun-types": "^1.0.11", "chai": "^4.3.10", "chalk": "^5.3.0", "ethers": "^6.8.1", "pnpm": "8.6.2", "prettier": "^2.8.8", - "solc": "^0.8.22", + "solc": "^0.8.23", "tsx": "^3.14.0", "typescript": "^5.2.2", - "viem": "^1.18.1", + "viem": "^1.18.9", "vitest": "1.0.0-beta.3", "web3": "4.2.1", "yargs": "^17.7.2" From a415b7bc0b1968ef6b65783e1ecfb96f0611054d Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Thu, 9 Nov 2023 10:17:41 +0000 Subject: [PATCH 06/41] updated vitest --- packages/cli/package.json | 2 +- packages/util/package.json | 2 +- pnpm-lock.yaml | 81 +++++++++++++++++--------------------- test/package.json | 4 +- 4 files changed, 41 insertions(+), 48 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 767b5800..c64232f2 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -91,7 +91,7 @@ "node-fetch": "^3.3.2", "semver": "^7.5.4", "viem": "^1.18.9", - "vitest": "1.0.0-beta.3", + "vitest": "1.0.0-beta.4", "web3": "4.2.1", "web3-providers-ws": "4.0.7", "ws": "^8.14.2", diff --git a/packages/util/package.json b/packages/util/package.json index 560cac21..35f503df 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -82,7 +82,7 @@ "rlp": "^3.0.0", "semver": "^7.5.4", "viem": "^1.18.9", - "vitest": "1.0.0-beta.3", + "vitest": "1.0.0-beta.4", "web3": "4.2.1", "ws": "^8.14.2", "yaml": "^2.3.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 26b5f8ff..530766c7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -145,8 +145,8 @@ importers: specifier: ^1.18.9 version: 1.18.9(typescript@5.2.2) vitest: - specifier: 1.0.0-beta.3 - version: 1.0.0-beta.3(@types/node@20.9.0)(@vitest/ui@1.0.0-beta.1) + specifier: 1.0.0-beta.4 + version: 1.0.0-beta.4(@types/node@20.9.0)(@vitest/ui@1.0.0-beta.4) web3: specifier: 4.2.1 version: 4.2.1(typescript@5.2.2) @@ -318,8 +318,8 @@ importers: specifier: ^1.18.9 version: 1.18.9(typescript@5.2.2) vitest: - specifier: 1.0.0-beta.3 - version: 1.0.0-beta.3(@types/node@20.9.0)(@vitest/ui@1.0.0-beta.1) + specifier: 1.0.0-beta.4 + version: 1.0.0-beta.4(@types/node@20.9.0)(@vitest/ui@1.0.0-beta.4) web3: specifier: 4.2.1 version: 4.2.1(typescript@5.2.2) @@ -385,8 +385,8 @@ importers: specifier: ^20.9.0 version: 20.9.0 '@vitest/ui': - specifier: 1.0.0-beta.1 - version: 1.0.0-beta.1(vitest@1.0.0-beta.3) + specifier: 1.0.0-beta.4 + version: 1.0.0-beta.4(vitest@1.0.0-beta.4) bun-types: specifier: ^1.0.11 version: 1.0.11 @@ -418,8 +418,8 @@ importers: specifier: ^1.18.9 version: 1.18.9(typescript@5.2.2) vitest: - specifier: 1.0.0-beta.3 - version: 1.0.0-beta.3(@types/node@20.9.0)(@vitest/ui@1.0.0-beta.1) + specifier: 1.0.0-beta.4 + version: 1.0.0-beta.4(@types/node@20.9.0)(@vitest/ui@1.0.0-beta.4) web3: specifier: 4.2.1 version: 4.2.1(typescript@5.2.2) @@ -2099,55 +2099,48 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /@vitest/expect@1.0.0-beta.3: - resolution: {integrity: sha512-fbDKa7aj/xiCcS9X6RwlPXTZ5SNQpvPl0eswD+d3Lnp8gmuB8j2mb+CDUMe7VRg+ah5Cm/kqAc9DzYTe2IcvgQ==} + /@vitest/expect@1.0.0-beta.4: + resolution: {integrity: sha512-JOpNEva2AFxfySH3F+X+hT52Kq/ZdIrGtzWYbj6yRuBuxFqM55n/7/jV4XtQG+XkmehP3OUZGx5zISOU8KHPQw==} dependencies: - '@vitest/spy': 1.0.0-beta.3 - '@vitest/utils': 1.0.0-beta.3 + '@vitest/spy': 1.0.0-beta.4 + '@vitest/utils': 1.0.0-beta.4 chai: 4.3.10 - /@vitest/runner@1.0.0-beta.3: - resolution: {integrity: sha512-9xakpVjEpuFiyoCt42d0Ff/PiPOlBLQeKjEZbnT3LURi1M26llNVZ2I9ogDQipH3EH9IK0/xDfYAxOjs2jYaDw==} + /@vitest/runner@1.0.0-beta.4: + resolution: {integrity: sha512-rlXCMp5MxMVVVN5hdhzPL9NpIkfZC0EXwAtN5gwBbCBoVRv9dBQiZ5qTw+LaNmugPl8gm76U4e4/nMZS9s6wyw==} dependencies: - '@vitest/utils': 1.0.0-beta.3 + '@vitest/utils': 1.0.0-beta.4 p-limit: 4.0.0 pathe: 1.1.1 - /@vitest/snapshot@1.0.0-beta.3: - resolution: {integrity: sha512-fun2daxMGuXo2wBi6ItFgUFl0xnN4v2hVXvIYGvoJG9SoPobfPlQ79MO8gMKOt++rWlUXNj7J23KHcoOyZ2Wwg==} + /@vitest/snapshot@1.0.0-beta.4: + resolution: {integrity: sha512-CzmHLGo4RNEQUojYtuEz8wWKp9/p3hvXskejRRJB1iCRH48uWROmoyb2iEQUhgpQw/+WwI4wRP7jek5lp48pRA==} dependencies: magic-string: 0.30.5 pathe: 1.1.1 pretty-format: 29.7.0 - /@vitest/spy@1.0.0-beta.3: - resolution: {integrity: sha512-ybwJagwd1f3awJixX9YWdGtZNHXbJozzEekRfYdHmTudPgIX5bxFCcH4cG/gtGY6VbVuvExwk0Es04bFx2YkLA==} + /@vitest/spy@1.0.0-beta.4: + resolution: {integrity: sha512-YvKUUl7KucKzLJb8+RTd8H3G24EVPGk+CVMFawwtD/KuYjBzM8RCh3oJTTba6ktLpB8JLVy8NVTNL4Oeigqs8A==} dependencies: tinyspy: 2.2.0 - /@vitest/ui@1.0.0-beta.1(vitest@1.0.0-beta.3): - resolution: {integrity: sha512-c6FKsyrEh6YtOPkzkmCnMVGKpuwm/fRVn8D8faUMJJKZkUwLfGIP6fSS5gJFFQlVnAHH3Faed5tCmXK/9Kn67A==} + /@vitest/ui@1.0.0-beta.4(vitest@1.0.0-beta.4): + resolution: {integrity: sha512-aU0EcYvrJPNNyoxnqcza0i1/yqUQ1MW/XC3aM7isOK5h/hNzx/jGmpQiY891yCT/7GTX0pdgC/glDw7ny42osQ==} peerDependencies: - vitest: '>=0.30.1 <1' + vitest: ^1.0.0-0 dependencies: - '@vitest/utils': 1.0.0-beta.1 + '@vitest/utils': 1.0.0-beta.4 fast-glob: 3.3.1 fflate: 0.8.1 flatted: 3.2.9 pathe: 1.1.1 picocolors: 1.0.0 sirv: 2.0.3 - vitest: 1.0.0-beta.3(@types/node@20.9.0)(@vitest/ui@1.0.0-beta.1) + vitest: 1.0.0-beta.4(@types/node@20.9.0)(@vitest/ui@1.0.0-beta.4) - /@vitest/utils@1.0.0-beta.1: - resolution: {integrity: sha512-jfcqEzZamUA2Th76NVOHyRMAUIAuxMG9q+BstUbxzPQ9IkbCjz5GkhagPfy4r6zTFiElhX7mmPVj/nvB/Ea/bQ==} - dependencies: - diff-sequences: 29.6.3 - loupe: 2.3.6 - pretty-format: 29.7.0 - - /@vitest/utils@1.0.0-beta.3: - resolution: {integrity: sha512-8j7Xg3A13kt78DqWJC3ludyMsBbKQn/LcX9wcULxZFMGQqmSkUFN8ij6JWFQs67w39T+clLWzPrV+NRxe+Mc9g==} + /@vitest/utils@1.0.0-beta.4: + resolution: {integrity: sha512-YY4bhhVqyTxuNwuZJXiCM4/D0Z7Z3H3JDHNM8gXty7EyRUf4iPDQtXzIWe1r4zdTtoFnzFAeMr+891pWlv4SPA==} dependencies: diff-sequences: 29.6.3 loupe: 2.3.7 @@ -7285,8 +7278,8 @@ packages: - utf-8-validate - zod - /vite-node@1.0.0-beta.3(@types/node@20.9.0): - resolution: {integrity: sha512-qpdoB+N9LV2Lr3W6k8vZwm/lN3hdmz+c0Tixh2ktnX/ywF0OkQf7wIWLeiFLvW4Fa/iw4qhye7xiBBMP1o6/sA==} + /vite-node@1.0.0-beta.4(@types/node@20.9.0): + resolution: {integrity: sha512-YODjVvHd2Jih+TGMG3B99ktSyvET9w2cMevorAjcuQ3KKiPhDxEf2bRia2KsDHfnUGIfSpwoUdbcDdJ5xR7epg==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true dependencies: @@ -7383,8 +7376,8 @@ packages: - universal-cookie dev: true - /vitest@1.0.0-beta.3(@types/node@20.9.0)(@vitest/ui@1.0.0-beta.1): - resolution: {integrity: sha512-Ytj70kgJq1MxWpS8U33nRwF7Mngzr0NxD6J1J8WZGZrYhGRktW3t0AwbjLyFg1URiW3ds6FSp/T3C8JEnP49cA==} + /vitest@1.0.0-beta.4(@types/node@20.9.0)(@vitest/ui@1.0.0-beta.4): + resolution: {integrity: sha512-WOJTqxY3hWqn4yy26SK+cx+BlPBeK/KtY9ALWkD6FLWLhSGY0QFEmarc8sdb/UGZQ8xs5pOvcQQS9JJSV8HH8g==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -7409,12 +7402,12 @@ packages: optional: true dependencies: '@types/node': 20.9.0 - '@vitest/expect': 1.0.0-beta.3 - '@vitest/runner': 1.0.0-beta.3 - '@vitest/snapshot': 1.0.0-beta.3 - '@vitest/spy': 1.0.0-beta.3 - '@vitest/ui': 1.0.0-beta.1(vitest@1.0.0-beta.3) - '@vitest/utils': 1.0.0-beta.3 + '@vitest/expect': 1.0.0-beta.4 + '@vitest/runner': 1.0.0-beta.4 + '@vitest/snapshot': 1.0.0-beta.4 + '@vitest/spy': 1.0.0-beta.4 + '@vitest/ui': 1.0.0-beta.4(vitest@1.0.0-beta.4) + '@vitest/utils': 1.0.0-beta.4 acorn: 8.10.0 acorn-walk: 8.2.0 cac: 6.7.14 @@ -7429,7 +7422,7 @@ packages: tinybench: 2.5.1 tinypool: 0.8.1 vite: 4.4.11(@types/node@20.9.0) - vite-node: 1.0.0-beta.3(@types/node@20.9.0) + vite-node: 1.0.0-beta.4(@types/node@20.9.0) why-is-node-running: 2.2.2 transitivePeerDependencies: - less diff --git a/test/package.json b/test/package.json index d11276e3..86a84def 100644 --- a/test/package.json +++ b/test/package.json @@ -23,7 +23,7 @@ "@polkadot/api-augment": "^10.10.1", "@polkadot/util": "^12.5.1", "@types/node": "^20.9.0", - "@vitest/ui": "1.0.0-beta.1", + "@vitest/ui": "1.0.0-beta.4", "bun-types": "^1.0.11", "chai": "^4.3.10", "chalk": "^5.3.0", @@ -34,7 +34,7 @@ "tsx": "^3.14.0", "typescript": "^5.2.2", "viem": "^1.18.9", - "vitest": "1.0.0-beta.3", + "vitest": "1.0.0-beta.4", "web3": "4.2.1", "yargs": "^17.7.2" } From 415c5d1c93e5dc2d26315a164945ced79e87ac4c Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Thu, 9 Nov 2023 10:29:09 +0000 Subject: [PATCH 07/41] fix chopsticks --- packages/cli/src/internal/commandParsers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/internal/commandParsers.ts b/packages/cli/src/internal/commandParsers.ts index 9ff09a9a..31c440d4 100644 --- a/packages/cli/src/internal/commandParsers.ts +++ b/packages/cli/src/internal/commandParsers.ts @@ -71,7 +71,7 @@ export function parseChopsticksRunCmd(launchSpecs: ChopsticksLaunchSpec[]): { if (launchSpecs.length === 1) { const chopsticksCmd = "node"; const chopsticksArgs = [ - "node_modules/@acala-network/chopsticks/chopsticks.js", + "node_modules/@acala-network/chopsticks/chopsticks.cjs", `--config=${launchSpecs[0].configPath}`, ]; @@ -99,7 +99,7 @@ export function parseChopsticksRunCmd(launchSpecs: ChopsticksLaunchSpec[]): { } const chopsticksCmd = "node"; - const chopsticksArgs = ["node_modules/@acala-network/chopsticks/chopsticks.js", "xcm"]; + const chopsticksArgs = ["node_modules/@acala-network/chopsticks/chopsticks.cjs", "xcm"]; launchSpecs.forEach((spec) => { const type = spec.type ? spec.type : "parachain"; From 154386a9f2a83d210df7e2472fe55608066679b7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 9 Nov 2023 10:43:09 +0000 Subject: [PATCH 08/41] Version Packages --- .changeset/fast-windows-rule.md | 8 -------- docs/CHANGELOG.md | 2 ++ docs/package.json | 2 +- packages/cli/CHANGELOG.md | 9 +++++++++ packages/cli/package.json | 2 +- packages/types/CHANGELOG.md | 6 ++++++ packages/types/package.json | 2 +- packages/util/CHANGELOG.md | 8 ++++++++ packages/util/package.json | 2 +- test/CHANGELOG.md | 6 ++++++ test/package.json | 2 +- 11 files changed, 36 insertions(+), 13 deletions(-) delete mode 100644 .changeset/fast-windows-rule.md diff --git a/.changeset/fast-windows-rule.md b/.changeset/fast-windows-rule.md deleted file mode 100644 index 99851145..00000000 --- a/.changeset/fast-windows-rule.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@moonwall/types": patch -"@moonwall/util": patch -"@moonwall/cli": patch -"@moonwall/tests": patch ---- - -Package Ver Updates diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index d3695b77..cdea3cb7 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,7 @@ # @moonwall/docs +## 4.3.2 + ## 4.3.1 ## 4.3.0 diff --git a/docs/package.json b/docs/package.json index 40d9c485..9c2bf9bc 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/docs", "type": "module", - "version": "4.3.1", + "version": "4.3.2", "private": true, "description": "Testing framework for the Moon family of projects", "scripts": { diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 1211759c..d8586102 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,14 @@ # @moonwall/cli +## 4.3.2 + +### Patch Changes + +- 3978aed: Package Ver Updates +- Updated dependencies [3978aed] + - @moonwall/types@4.3.2 + - @moonwall/util@4.3.2 + ## 4.3.1 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index c64232f2..d9e44556 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/cli", "type": "module", - "version": "4.3.1", + "version": "4.3.2", "description": "Testing framework for the Moon family of projects", "author": "timbrinded", "license": "ISC", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index f1872ce9..bc8042ac 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,5 +1,11 @@ # @moonwall/types +## 4.3.2 + +### Patch Changes + +- 3978aed: Package Ver Updates + ## 4.3.1 ## 4.3.0 diff --git a/packages/types/package.json b/packages/types/package.json index a846b57b..c4d96147 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/types", "type": "module", - "version": "4.3.1", + "version": "4.3.2", "description": "Testing framework for the Moon family of projects", "author": "timbrinded", "license": "ISC", diff --git a/packages/util/CHANGELOG.md b/packages/util/CHANGELOG.md index ffbc46c9..4e77aaeb 100644 --- a/packages/util/CHANGELOG.md +++ b/packages/util/CHANGELOG.md @@ -1,5 +1,13 @@ # @moonwall/util +## 4.3.2 + +### Patch Changes + +- 3978aed: Package Ver Updates +- Updated dependencies [3978aed] + - @moonwall/types@4.3.2 + ## 4.3.1 ### Patch Changes diff --git a/packages/util/package.json b/packages/util/package.json index 35f503df..707e2868 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/util", "type": "module", - "version": "4.3.1", + "version": "4.3.2", "description": "Testing framework for the Moon family of projects", "author": "timbrinded", "license": "ISC", diff --git a/test/CHANGELOG.md b/test/CHANGELOG.md index d6b9635b..c47dfff3 100644 --- a/test/CHANGELOG.md +++ b/test/CHANGELOG.md @@ -1,5 +1,11 @@ # @moonwall/tests +## 4.3.2 + +### Patch Changes + +- 3978aed: Package Ver Updates + ## 4.3.1 ## 4.3.0 diff --git a/test/package.json b/test/package.json index 86a84def..9048d656 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/tests", "type": "module", - "version": "4.3.1", + "version": "4.3.2", "private": true, "packageManager": "pnpm@7.23.0", "description": "Testing framework for the Moon family of projects", From accbb0d38c9fc70314f4c1a973de9732dfdb2322 Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Thu, 9 Nov 2023 16:03:34 +0000 Subject: [PATCH 09/41] added waits :( --- .changeset/friendly-seahorses-jump.md | 5 +++++ packages/cli/src/internal/foundations/devModeHelpers.ts | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .changeset/friendly-seahorses-jump.md diff --git a/.changeset/friendly-seahorses-jump.md b/.changeset/friendly-seahorses-jump.md new file mode 100644 index 00000000..ac89b945 --- /dev/null +++ b/.changeset/friendly-seahorses-jump.md @@ -0,0 +1,5 @@ +--- +"@moonwall/cli": patch +--- + +Relaxing contract deployment timer diff --git a/packages/cli/src/internal/foundations/devModeHelpers.ts b/packages/cli/src/internal/foundations/devModeHelpers.ts index a13d317a..12fee4d1 100644 --- a/packages/cli/src/internal/foundations/devModeHelpers.ts +++ b/packages/cli/src/internal/foundations/devModeHelpers.ts @@ -60,7 +60,7 @@ export async function createDevBlock< let originalBlockNumber: bigint; const containsViem = - MoonwallContext.getContext().providers.find((prov) => prov.type == "viem") && !context.viem() + context.viem() && MoonwallContext.getContext().providers.find((prov) => prov.type == "viem") ? true : false; @@ -169,12 +169,15 @@ export async function createDevBlock< if (blockNum > originalBlockNumber) { break; } - await setTimeout(1); + await setTimeout(5); } } else if (results.find((r) => r.type == "eth")) { await setTimeout(10); } + // TODO: investigate why new block is created but transaction receipts not found + await setTimeout(50); // needed to stop timing issues for some reason + const actualEvents = result.flatMap((resp) => resp.events); if (options.expectEvents && options.expectEvents.length > 0) { From 81897b11b5ba576176d4945804033d18244afa2e Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Thu, 9 Nov 2023 16:09:58 +0000 Subject: [PATCH 10/41] static wait --- .../src/internal/foundations/devModeHelpers.ts | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/packages/cli/src/internal/foundations/devModeHelpers.ts b/packages/cli/src/internal/foundations/devModeHelpers.ts index 12fee4d1..04759bd6 100644 --- a/packages/cli/src/internal/foundations/devModeHelpers.ts +++ b/packages/cli/src/internal/foundations/devModeHelpers.ts @@ -161,23 +161,11 @@ export async function createDevBlock< }; }); - // Avoiding race condition by ensuring ethereum block is created - if (containsViem && originalBlockNumber! !== undefined) { - const pubClient = context.viem(); - for (;;) { - const blockNum = await pubClient.getBlockNumber(); - if (blockNum > originalBlockNumber) { - break; - } - await setTimeout(5); - } - } else if (results.find((r) => r.type == "eth")) { - await setTimeout(10); + if (results.find((r) => r.type == "eth")) { + // TODO: investigate why new block is created but transaction receipts not found + await setTimeout(80); // needed to stop timing issues for some reason } - // TODO: investigate why new block is created but transaction receipts not found - await setTimeout(50); // needed to stop timing issues for some reason - const actualEvents = result.flatMap((resp) => resp.events); if (options.expectEvents && options.expectEvents.length > 0) { From bcc3fa5b9e7f415abef9945e0bfa3e680ed1a2e0 Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Thu, 9 Nov 2023 16:23:01 +0000 Subject: [PATCH 11/41] non-eth fix --- packages/cli/src/internal/foundations/devModeHelpers.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/internal/foundations/devModeHelpers.ts b/packages/cli/src/internal/foundations/devModeHelpers.ts index 04759bd6..503bde72 100644 --- a/packages/cli/src/internal/foundations/devModeHelpers.ts +++ b/packages/cli/src/internal/foundations/devModeHelpers.ts @@ -1,5 +1,5 @@ import "@moonbeam-network/api-augment"; -import { BlockCreation, ExtrinsicCreation, GenericContext } from "@moonwall/types"; +import { BlockCreation, DevModeContext, ExtrinsicCreation, GenericContext } from "@moonwall/types"; import { alith, createAndFinalizeBlock, @@ -60,7 +60,9 @@ export async function createDevBlock< let originalBlockNumber: bigint; const containsViem = - context.viem() && MoonwallContext.getContext().providers.find((prov) => prov.type == "viem") + (context as DevModeContext).isEthereumChain && + context.viem() && + MoonwallContext.getContext().providers.find((prov) => prov.type == "viem") ? true : false; From fde65907087175802497f982dd01c21b58ce27e7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 9 Nov 2023 16:24:22 +0000 Subject: [PATCH 12/41] Version Packages --- .changeset/friendly-seahorses-jump.md | 5 ----- docs/CHANGELOG.md | 2 ++ docs/package.json | 2 +- packages/cli/CHANGELOG.md | 8 ++++++++ packages/cli/package.json | 2 +- packages/types/CHANGELOG.md | 2 ++ packages/types/package.json | 2 +- packages/util/CHANGELOG.md | 6 ++++++ packages/util/package.json | 2 +- test/CHANGELOG.md | 2 ++ test/package.json | 2 +- 11 files changed, 25 insertions(+), 10 deletions(-) delete mode 100644 .changeset/friendly-seahorses-jump.md diff --git a/.changeset/friendly-seahorses-jump.md b/.changeset/friendly-seahorses-jump.md deleted file mode 100644 index ac89b945..00000000 --- a/.changeset/friendly-seahorses-jump.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@moonwall/cli": patch ---- - -Relaxing contract deployment timer diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index cdea3cb7..84667630 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,7 @@ # @moonwall/docs +## 4.3.3 + ## 4.3.2 ## 4.3.1 diff --git a/docs/package.json b/docs/package.json index 9c2bf9bc..3b125a5a 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/docs", "type": "module", - "version": "4.3.2", + "version": "4.3.3", "private": true, "description": "Testing framework for the Moon family of projects", "scripts": { diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index d8586102..21aaaf60 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,13 @@ # @moonwall/cli +## 4.3.3 + +### Patch Changes + +- accbb0d: Relaxing contract deployment timer + - @moonwall/types@4.3.3 + - @moonwall/util@4.3.3 + ## 4.3.2 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index d9e44556..70b259e6 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/cli", "type": "module", - "version": "4.3.2", + "version": "4.3.3", "description": "Testing framework for the Moon family of projects", "author": "timbrinded", "license": "ISC", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index bc8042ac..c18bad27 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,5 +1,7 @@ # @moonwall/types +## 4.3.3 + ## 4.3.2 ### Patch Changes diff --git a/packages/types/package.json b/packages/types/package.json index c4d96147..15341dbd 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/types", "type": "module", - "version": "4.3.2", + "version": "4.3.3", "description": "Testing framework for the Moon family of projects", "author": "timbrinded", "license": "ISC", diff --git a/packages/util/CHANGELOG.md b/packages/util/CHANGELOG.md index 4e77aaeb..9e6cfe94 100644 --- a/packages/util/CHANGELOG.md +++ b/packages/util/CHANGELOG.md @@ -1,5 +1,11 @@ # @moonwall/util +## 4.3.3 + +### Patch Changes + +- @moonwall/types@4.3.3 + ## 4.3.2 ### Patch Changes diff --git a/packages/util/package.json b/packages/util/package.json index 707e2868..cade890c 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/util", "type": "module", - "version": "4.3.2", + "version": "4.3.3", "description": "Testing framework for the Moon family of projects", "author": "timbrinded", "license": "ISC", diff --git a/test/CHANGELOG.md b/test/CHANGELOG.md index c47dfff3..81793587 100644 --- a/test/CHANGELOG.md +++ b/test/CHANGELOG.md @@ -1,5 +1,7 @@ # @moonwall/tests +## 4.3.3 + ## 4.3.2 ### Patch Changes diff --git a/test/package.json b/test/package.json index 9048d656..bdf37708 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/tests", "type": "module", - "version": "4.3.2", + "version": "4.3.3", "private": true, "packageManager": "pnpm@7.23.0", "description": "Testing framework for the Moon family of projects", From 9ffef52c3c75ce58b092cfd601e21f1786c77ef8 Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Fri, 10 Nov 2023 09:45:04 +0000 Subject: [PATCH 13/41] nulled the ctx after use --- packages/cli/src/lib/runnerContext.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/lib/runnerContext.ts b/packages/cli/src/lib/runnerContext.ts index 10164260..a51be395 100644 --- a/packages/cli/src/lib/runnerContext.ts +++ b/packages/cli/src/lib/runnerContext.ts @@ -78,7 +78,7 @@ export function describeSuite({ describe.skip(`🗃️ #${suiteId} ${title}`); return; } - let ctx: MoonwallContext | undefined = undefined; + let ctx: MoonwallContext | null = null; beforeAll(async function () { const globalConfig = await importAsyncConfig(); @@ -98,6 +98,7 @@ export function describeSuite({ afterAll(async function () { await MoonwallContext.destroy(); + ctx = null; }); const testCase = (params: ITestCase) => { From 2e5b977b3e517ae228d9c882037fa0d37cdc005d Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Fri, 10 Nov 2023 10:16:04 +0000 Subject: [PATCH 14/41] encapsulation fix --- .changeset/three-beers-add.md | 5 ++ packages/cli/src/cmds/entrypoint.ts | 8 ++- packages/cli/src/cmds/runTests.ts | 60 ++++++++++--------- .../internal/foundations/devModeHelpers.ts | 2 +- 4 files changed, 43 insertions(+), 32 deletions(-) create mode 100644 .changeset/three-beers-add.md diff --git a/.changeset/three-beers-add.md b/.changeset/three-beers-add.md new file mode 100644 index 00000000..f2928445 --- /dev/null +++ b/.changeset/three-beers-add.md @@ -0,0 +1,5 @@ +--- +"@moonwall/cli": patch +--- + +Encapsulation fix diff --git a/packages/cli/src/cmds/entrypoint.ts b/packages/cli/src/cmds/entrypoint.ts index df898a72..8d2dfa42 100755 --- a/packages/cli/src/cmds/entrypoint.ts +++ b/packages/cli/src/cmds/entrypoint.ts @@ -106,16 +106,18 @@ yargs(hideBin(process.argv)) process.env.MOON_RUN_SCRIPTS = "true"; if (await testCmd(args.envName.toString(), { testNamePattern: args.GrepTest })) { console.log("✅ All tests passed"); - process.exit(0); + process.exitCode = 0; } else { console.log("❌ Some tests failed"); - process.kill(process.pid, "SIGTERM"); + process.exitCode = 1; } + process.exit(); } else { console.log("❌ No environment specified"); console.log(`👉 Run 'pnpm moonwall --help' for more information`); - process.exit(1); + process.exitCode = 1; } + process.exit(); } ) .command( diff --git a/packages/cli/src/cmds/runTests.ts b/packages/cli/src/cmds/runTests.ts index 166b4bb6..ba0ea96b 100644 --- a/packages/cli/src/cmds/runTests.ts +++ b/packages/cli/src/cmds/runTests.ts @@ -9,37 +9,41 @@ import { cacheConfig, importAsyncConfig, loadEnvVars } from "../lib/configReader import { contextCreator, runNetworkOnly } from "../lib/globalContext"; export async function testCmd(envName: string, additionalArgs?: object): Promise { - await cacheConfig(); - const globalConfig = await importAsyncConfig(); - const env = globalConfig.environments.find(({ name }) => name === envName)!; - process.env.MOON_TEST_ENV = envName; - - if (!env) { - const envList = globalConfig.environments.map((env) => env.name); - throw new Error( - `No environment found in config for: ${chalk.bgWhiteBright.blackBright( - envName - )}\n Environments defined in config are: ${envList}\n` - ); - } - loadEnvVars(); + return new Promise(async (resolve, reject) => { + await cacheConfig(); + const globalConfig = await importAsyncConfig(); + const env = globalConfig.environments.find(({ name }) => name === envName)!; + process.env.MOON_TEST_ENV = envName; + + if (!env) { + const envList = globalConfig.environments.map((env) => env.name); + reject( + new Error( + `No environment found in config for: ${chalk.bgWhiteBright.blackBright( + envName + )}\n Environments defined in config are: ${envList}\n` + ) + ); + } + loadEnvVars(); - await commonChecks(env); + await commonChecks(env); - if ( - (env.foundation.type == "dev" && !env.foundation.launchSpec[0].retainAllLogs) || - (env.foundation.type == "chopsticks" && !env.foundation.launchSpec[0].retainAllLogs) - ) { - clearNodeLogs(); - } - const vitest = await executeTests(env, additionalArgs); - const failed = vitest!.state.getFiles().filter((file) => file.result!.state === "fail"); + if ( + (env.foundation.type == "dev" && !env.foundation.launchSpec[0].retainAllLogs) || + (env.foundation.type == "chopsticks" && !env.foundation.launchSpec[0].retainAllLogs) + ) { + clearNodeLogs(); + } + const vitest = await executeTests(env, additionalArgs); + const failed = vitest!.state.getFiles().filter((file) => file.result!.state === "fail"); - if (failed.length > 0) { - return false; - } else { - return true; - } + if (failed.length > 0) { + resolve(false); + } else { + resolve(true); + } + }); } export async function executeTests(env: Environment, additionalArgs?: object) { diff --git a/packages/cli/src/internal/foundations/devModeHelpers.ts b/packages/cli/src/internal/foundations/devModeHelpers.ts index 503bde72..a3d518e8 100644 --- a/packages/cli/src/internal/foundations/devModeHelpers.ts +++ b/packages/cli/src/internal/foundations/devModeHelpers.ts @@ -163,7 +163,7 @@ export async function createDevBlock< }; }); - if (results.find((r) => r.type == "eth")) { + if (results.find((res) => res.type == "eth")) { // TODO: investigate why new block is created but transaction receipts not found await setTimeout(80); // needed to stop timing issues for some reason } From 216a403cc603a36eedb3575b6754b82f699dacb7 Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Fri, 10 Nov 2023 10:39:28 +0000 Subject: [PATCH 15/41] encapsulation fix --- packages/cli/src/cmds/entrypoint.ts | 10 ++- packages/cli/src/cmds/main.ts | 1 - packages/cli/src/cmds/runNetwork.ts | 1 - packages/cli/src/cmds/runTests.ts | 124 ++++++++++++++-------------- 4 files changed, 69 insertions(+), 67 deletions(-) diff --git a/packages/cli/src/cmds/entrypoint.ts b/packages/cli/src/cmds/entrypoint.ts index 8d2dfa42..60a5db67 100755 --- a/packages/cli/src/cmds/entrypoint.ts +++ b/packages/cli/src/cmds/entrypoint.ts @@ -104,20 +104,22 @@ yargs(hideBin(process.argv)) async (args) => { if (args.envName) { process.env.MOON_RUN_SCRIPTS = "true"; - if (await testCmd(args.envName.toString(), { testNamePattern: args.GrepTest })) { + const testsPassed = await testCmd(args.envName.toString(), { + testNamePattern: args.GrepTest, + }); + + if (testsPassed) { console.log("✅ All tests passed"); process.exitCode = 0; } else { console.log("❌ Some tests failed"); process.exitCode = 1; } - process.exit(); } else { console.log("❌ No environment specified"); console.log(`👉 Run 'pnpm moonwall --help' for more information`); process.exitCode = 1; } - process.exit(); } ) .command( @@ -136,7 +138,7 @@ yargs(hideBin(process.argv)) async (argv) => { process.env.MOON_RUN_SCRIPTS = "true"; await runNetworkCmd(argv as any); - process.exit(0); + process.exitCode = 0; } ) .demandCommand(1) diff --git a/packages/cli/src/cmds/main.ts b/packages/cli/src/cmds/main.ts index e0eb77ae..f76c0049 100644 --- a/packages/cli/src/cmds/main.ts +++ b/packages/cli/src/cmds/main.ts @@ -37,7 +37,6 @@ export async function main() { } process.stdout.write(`Goodbye! 👋\n`); - process.exit(0); } async function mainMenu(config: MoonwallConfig) { diff --git a/packages/cli/src/cmds/runNetwork.ts b/packages/cli/src/cmds/runNetwork.ts index f1cf9c37..9a5d8aa0 100644 --- a/packages/cli/src/cmds/runNetwork.ts +++ b/packages/cli/src/cmds/runNetwork.ts @@ -192,7 +192,6 @@ export async function runNetworkCmd(args) { } await MoonwallContext.destroy(); console.log(`Goodbye! 👋`); - process.exit(0); } const reportServicePorts = async () => { diff --git a/packages/cli/src/cmds/runTests.ts b/packages/cli/src/cmds/runTests.ts index ba0ea96b..42946943 100644 --- a/packages/cli/src/cmds/runTests.ts +++ b/packages/cli/src/cmds/runTests.ts @@ -47,73 +47,75 @@ export async function testCmd(envName: string, additionalArgs?: object): Promise } export async function executeTests(env: Environment, additionalArgs?: object) { - const globalConfig = await importAsyncConfig(); - if (env.foundation.type === "read_only") { - try { - if (!process.env.MOON_TEST_ENV) { - throw new Error("MOON_TEST_ENV not set"); + return new Promise(async (resolve, reject) => { + const globalConfig = await importAsyncConfig(); + if (env.foundation.type === "read_only") { + try { + if (!process.env.MOON_TEST_ENV) { + throw new Error("MOON_TEST_ENV not set"); + } + + const ctx = await contextCreator(); + const chainData = ctx.providers + .filter((provider) => provider.type == "polkadotJs" && provider.name.includes("para")) + .map((provider) => { + return { + [provider.name]: { + rtName: (provider.greet() as any).rtName, + rtVersion: (provider.greet() as any).rtVersion, + }, + }; + }); + // TODO: Extend/develop this feature to respect para/relay chain specifications + const { rtVersion, rtName } = Object.values(chainData[0])[0]; + process.env.MOON_RTVERSION = rtVersion; + process.env.MOON_RTNAME = rtName; + await ctx.disconnect(); + } catch { + // No chain to test against } - - const ctx = await contextCreator(); - const chainData = ctx.providers - .filter((provider) => provider.type == "polkadotJs" && provider.name.includes("para")) - .map((provider) => { - return { - [provider.name]: { - rtName: (provider.greet() as any).rtName, - rtVersion: (provider.greet() as any).rtVersion, - }, - }; - }); - // TODO: Extend/develop this feature to respect para/relay chain specifications - const { rtVersion, rtName } = Object.values(chainData[0])[0]; - process.env.MOON_RTVERSION = rtVersion; - process.env.MOON_RTNAME = rtName; - await ctx.disconnect(); - } catch { - // No chain to test against } - } - const baseOptions = { - watch: false, - globals: true, - reporters: env.reporters ? env.reporters : ["default"], - outputFile: env.reportFile, - testTimeout: env.timeout || globalConfig.defaultTestTimeout, - hookTimeout: env.timeout || globalConfig.defaultTestTimeout, - passWithNoTests: false, - deps: { - optimizer: { ssr: { enabled: false }, web: { enabled: false } }, - }, - include: env.include ? env.include : ["**/*{test,spec,test_,test-}*{ts,mts,cts}"], - onConsoleLog(log) { - if (filterList.includes(log.trim())) return false; - // if (log.trim() == "stdout | unknown test" || log.trim() == "") return false; - if (log.includes("has multiple versions, ensure that there is only one installed.")) { - return false; - } - }, - } satisfies UserConfig; + const baseOptions = { + watch: false, + globals: true, + reporters: env.reporters ? env.reporters : ["default"], + outputFile: env.reportFile, + testTimeout: env.timeout || globalConfig.defaultTestTimeout, + hookTimeout: env.timeout || globalConfig.defaultTestTimeout, + passWithNoTests: false, + deps: { + optimizer: { ssr: { enabled: false }, web: { enabled: false } }, + }, + include: env.include ? env.include : ["**/*{test,spec,test_,test-}*{ts,mts,cts}"], + onConsoleLog(log) { + if (filterList.includes(log.trim())) return false; + // if (log.trim() == "stdout | unknown test" || log.trim() == "") return false; + if (log.includes("has multiple versions, ensure that there is only one installed.")) { + return false; + } + }, + } satisfies UserConfig; - // TODO: Create options builder class - const options = addThreadConfig(baseOptions, env.multiThreads); + // TODO: Create options builder class + const options = addThreadConfig(baseOptions, env.multiThreads); - if ( - globalConfig.environments.find((env) => env.name === process.env.MOON_TEST_ENV)?.foundation - .type == "zombie" - ) { - await runNetworkOnly(); - process.env.MOON_RECYCLE = "true"; - } + if ( + globalConfig.environments.find((env) => env.name === process.env.MOON_TEST_ENV)?.foundation + .type == "zombie" + ) { + await runNetworkOnly(); + process.env.MOON_RECYCLE = "true"; + } - try { - const folders = env.testFileDir.map((folder) => path.join(".", folder, "/")); - return await startVitest("test", folders, { ...options, ...additionalArgs }); - } catch (e) { - console.error(e); - process.exit(1); - } + try { + const folders = env.testFileDir.map((folder) => path.join(".", folder, "/")); + resolve(await startVitest("test", folders, { ...options, ...additionalArgs })); + } catch (e) { + console.error(e); + reject(e); + } + }); } const filterList = ["", "", "stdout | unknown test"]; From 8b4e97bfeacfb10e92cd7b079f30ea194867c765 Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Fri, 10 Nov 2023 10:47:23 +0000 Subject: [PATCH 16/41] fix build --- packages/cli/src/cmds/runTests.ts | 4 ++-- packages/cli/src/internal/fileCheckers.ts | 7 +++---- packages/cli/src/lib/binariesHelpers.ts | 2 +- packages/cli/src/lib/globalContext.ts | 3 +-- packages/cli/src/lib/governanceProcedures.ts | 2 +- test/scripts/compile-contracts.ts | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/packages/cli/src/cmds/runTests.ts b/packages/cli/src/cmds/runTests.ts index 42946943..20f0c20d 100644 --- a/packages/cli/src/cmds/runTests.ts +++ b/packages/cli/src/cmds/runTests.ts @@ -1,7 +1,7 @@ import { Environment } from "@moonwall/types"; import chalk from "chalk"; import path from "path"; -import type { UserConfig } from "vitest"; +import type { UserConfig, Vitest } from "vitest"; import { startVitest } from "vitest/node"; import { clearNodeLogs } from "../internal/cmdFunctions/tempLogs"; import { commonChecks } from "../internal/launcherCommon"; @@ -47,7 +47,7 @@ export async function testCmd(envName: string, additionalArgs?: object): Promise } export async function executeTests(env: Environment, additionalArgs?: object) { - return new Promise(async (resolve, reject) => { + return new Promise(async (resolve, reject) => { const globalConfig = await importAsyncConfig(); if (env.foundation.type === "read_only") { try { diff --git a/packages/cli/src/internal/fileCheckers.ts b/packages/cli/src/internal/fileCheckers.ts index fc52a5dd..670f99c4 100644 --- a/packages/cli/src/internal/fileCheckers.ts +++ b/packages/cli/src/internal/fileCheckers.ts @@ -73,7 +73,7 @@ export async function downloadBinsIfMissing(binPath: string) { process.arch )} architecture, you will need to build it manually from source 🛠️` ); - process.exit(130); + throw new Error("Executable binary not available") } } @@ -101,8 +101,7 @@ export function checkListeningPorts(processId: number) { "Running Moonwall with this in the background may cause unexpected behaviour. Please manually kill the process and try running Moonwall again." ); console.log(`N.B. You can kill it with: sudo kill -9 ${processId}`); - - process.exit(1); + throw new Error(e); } } @@ -155,7 +154,7 @@ export async function promptAlreadyRunning(pids: number[]) { break; case "abort": - process.exit(130); + throw new Error("Abort Signal Picked") } } diff --git a/packages/cli/src/lib/binariesHelpers.ts b/packages/cli/src/lib/binariesHelpers.ts index c761066d..fcf13675 100644 --- a/packages/cli/src/lib/binariesHelpers.ts +++ b/packages/cli/src/lib/binariesHelpers.ts @@ -62,7 +62,7 @@ export async function getMoonbeamDockerBinary(binaryTag: string): Promise Date: Fri, 10 Nov 2023 11:21:17 +0000 Subject: [PATCH 17/41] fmt --- packages/cli/src/internal/fileCheckers.ts | 4 ++-- .../internal/foundations/devModeHelpers.ts | 21 ++++++++++--------- packages/cli/src/lib/binariesHelpers.ts | 2 +- packages/cli/src/lib/globalContext.ts | 2 +- packages/cli/src/lib/governanceProcedures.ts | 2 +- 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/packages/cli/src/internal/fileCheckers.ts b/packages/cli/src/internal/fileCheckers.ts index 670f99c4..ecd18cea 100644 --- a/packages/cli/src/internal/fileCheckers.ts +++ b/packages/cli/src/internal/fileCheckers.ts @@ -73,7 +73,7 @@ export async function downloadBinsIfMissing(binPath: string) { process.arch )} architecture, you will need to build it manually from source 🛠️` ); - throw new Error("Executable binary not available") + throw new Error("Executable binary not available"); } } @@ -154,7 +154,7 @@ export async function promptAlreadyRunning(pids: number[]) { break; case "abort": - throw new Error("Abort Signal Picked") + throw new Error("Abort Signal Picked"); } } diff --git a/packages/cli/src/internal/foundations/devModeHelpers.ts b/packages/cli/src/internal/foundations/devModeHelpers.ts index a3d518e8..ad337928 100644 --- a/packages/cli/src/internal/foundations/devModeHelpers.ts +++ b/packages/cli/src/internal/foundations/devModeHelpers.ts @@ -57,24 +57,20 @@ export async function createDevBlock< ApiType extends ApiTypes, Calls extends CallType | Array> >(context: GenericContext, options: BlockCreation, transactions?: Calls) { - let originalBlockNumber: bigint; - const containsViem = (context as DevModeContext).isEthereumChain && context.viem() && MoonwallContext.getContext().providers.find((prov) => prov.type == "viem") ? true : false; + const api = context.polkadotJs(); - if (containsViem) { - originalBlockNumber = await context.viem().getBlockNumber(); - } + const originalBlockNumber = (await api.rpc.chain.getHeader()).number.toBigInt(); const signer = options.signer !== undefined ? returnSigner(options) : returnDefaultSigner(); const results: ({ type: "eth"; hash: string } | { type: "sub"; hash: string })[] = []; - const api = context.polkadotJs(); const txs = transactions == undefined ? [] : Array.isArray(transactions) ? transactions : [transactions]; @@ -128,9 +124,7 @@ export async function createDevBlock< }; } - // We retrieve the events for that block const allRecords: EventRecord[] = await (await api.at(blockResult.hash)).query.system.events(); - // We retrieve the block (including the extrinsics) const blockData = await api.rpc.chain.getBlock(blockResult.hash); const result: ExtrinsicCreation[] = results.map((result) => { @@ -164,8 +158,15 @@ export async function createDevBlock< }); if (results.find((res) => res.type == "eth")) { - // TODO: investigate why new block is created but transaction receipts not found - await setTimeout(80); // needed to stop timing issues for some reason + // Wait until new block is actually created + for (;;) { + const currentBlock = (await api.rpc.chain.getHeader()).number.toBigInt(); + + if (currentBlock > originalBlockNumber) { + break; + } + await setTimeout(10); + } } const actualEvents = result.flatMap((resp) => resp.events); diff --git a/packages/cli/src/lib/binariesHelpers.ts b/packages/cli/src/lib/binariesHelpers.ts index fcf13675..59c9c5b4 100644 --- a/packages/cli/src/lib/binariesHelpers.ts +++ b/packages/cli/src/lib/binariesHelpers.ts @@ -62,7 +62,7 @@ export async function getMoonbeamDockerBinary(binaryTag: string): Promise Date: Fri, 10 Nov 2023 11:35:01 +0000 Subject: [PATCH 18/41] fix --- packages/cli/src/lib/globalContext.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/packages/cli/src/lib/globalContext.ts b/packages/cli/src/lib/globalContext.ts index 122d041b..58c99cce 100644 --- a/packages/cli/src/lib/globalContext.ts +++ b/packages/cli/src/lib/globalContext.ts @@ -34,6 +34,7 @@ import { isEthereumZombieConfig, isOptionSet, } from "./configReader"; +import { checkAlreadyRunning } from "../internal/fileCheckers"; const debugSetup = Debug("global:context"); export class MoonwallContext { @@ -478,6 +479,12 @@ export class MoonwallContext { if (ctx.zombieNetwork) { console.log("🪓 Killing zombie nodes"); await ctx.zombieNetwork.stop(); + const processIds = Object.values((ctx.zombieNetwork.client as any).processMap) + .filter((item) => item!["pid"]) + .map((process) => process!["pid"]); + + await waitForPidsToDie(processIds); + ctx.ipcServer?.close(); ctx.ipcServer?.removeAllListeners(); } @@ -519,3 +526,15 @@ async function isPidRunning(pid: number): Promise { return false; } } + +async function waitForPidsToDie(pids: number[]): Promise { + const checkPids = async (): Promise => { + const checks = pids.map(async (pid) => await isPidRunning(pid)); + const results = await Promise.all(checks); + return results.every((running) => !running); + }; + + while (!(await checkPids())) { + await new Promise((resolve) => setTimeout(resolve, 1000)); + } +} From 89f76aff1b5da71cd399926edf1c100d5b3fe866 Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Fri, 10 Nov 2023 11:44:57 +0000 Subject: [PATCH 19/41] manually kill zombies --- packages/cli/src/lib/globalContext.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/cli/src/lib/globalContext.ts b/packages/cli/src/lib/globalContext.ts index 58c99cce..abe82988 100644 --- a/packages/cli/src/lib/globalContext.ts +++ b/packages/cli/src/lib/globalContext.ts @@ -34,7 +34,6 @@ import { isEthereumZombieConfig, isOptionSet, } from "./configReader"; -import { checkAlreadyRunning } from "../internal/fileCheckers"; const debugSetup = Debug("global:context"); export class MoonwallContext { @@ -308,9 +307,6 @@ export class MoonwallContext { process.once("exit", onProcessExit); process.once("SIGINT", onProcessExit); - // process.env.MOON_MONITORED_NODE = zombieConfig.parachains[0].collator - // ? `${network.tmpDir}/${zombieConfig.parachains[0].collator.name}.log` - // : `${network.tmpDir}/${zombieConfig.parachains[0].collators![0].name}.log`; this.zombieNetwork = network; return; } @@ -483,6 +479,8 @@ export class MoonwallContext { .filter((item) => item!["pid"]) .map((process) => process!["pid"]); + execaCommandSync(`kill ${processIds.join(" ")}`); + await waitForPidsToDie(processIds); ctx.ipcServer?.close(); From 8475a8ffc7865d7b7591488f85a1485921adb4f3 Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Fri, 10 Nov 2023 13:38:02 +0000 Subject: [PATCH 20/41] fix exit --- packages/cli/src/cmds/entrypoint.ts | 21 ++++++++++--------- .../cli/src/internal/providerFactories.ts | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/packages/cli/src/cmds/entrypoint.ts b/packages/cli/src/cmds/entrypoint.ts index 60a5db67..83b1b799 100755 --- a/packages/cli/src/cmds/entrypoint.ts +++ b/packages/cli/src/cmds/entrypoint.ts @@ -101,20 +101,21 @@ yargs(hideBin(process.argv)) description: "Pattern to grep test ID/Description to run", }); }, - async (args) => { + (args) => { if (args.envName) { process.env.MOON_RUN_SCRIPTS = "true"; - const testsPassed = await testCmd(args.envName.toString(), { + + testCmd(args.envName.toString(), { testNamePattern: args.GrepTest, + }).then((testsPassed) => { + if (testsPassed) { + console.log("✅ All tests passed"); + process.exit(0); + } else { + console.log("❌ Some tests failed"); + process.exit(1); + } }); - - if (testsPassed) { - console.log("✅ All tests passed"); - process.exitCode = 0; - } else { - console.log("❌ Some tests failed"); - process.exitCode = 1; - } } else { console.log("❌ No environment specified"); console.log(`👉 Run 'pnpm moonwall --help' for more information`); diff --git a/packages/cli/src/internal/providerFactories.ts b/packages/cli/src/internal/providerFactories.ts index bbacec51..683e1654 100644 --- a/packages/cli/src/internal/providerFactories.ts +++ b/packages/cli/src/internal/providerFactories.ts @@ -267,7 +267,7 @@ export class ProviderInterfaceFactory { `👋 Provider ${this.name} is connected to chain ` + (await api.provider!.getNetwork()).chainId ), - disconnect: async () => api.provider!.destroy(), + disconnect: () => api.provider!.destroy(), }; } From a5f6e19bd4a9ccc1335294876b353453209c6a62 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 10 Nov 2023 13:50:02 +0000 Subject: [PATCH 21/41] Version Packages --- .changeset/three-beers-add.md | 5 ----- docs/CHANGELOG.md | 2 ++ docs/package.json | 2 +- packages/cli/CHANGELOG.md | 8 ++++++++ packages/cli/package.json | 2 +- packages/types/CHANGELOG.md | 2 ++ packages/types/package.json | 2 +- packages/util/CHANGELOG.md | 6 ++++++ packages/util/package.json | 2 +- test/CHANGELOG.md | 2 ++ test/package.json | 2 +- 11 files changed, 25 insertions(+), 10 deletions(-) delete mode 100644 .changeset/three-beers-add.md diff --git a/.changeset/three-beers-add.md b/.changeset/three-beers-add.md deleted file mode 100644 index f2928445..00000000 --- a/.changeset/three-beers-add.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@moonwall/cli": patch ---- - -Encapsulation fix diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 84667630..1368ff12 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,7 @@ # @moonwall/docs +## 4.3.4 + ## 4.3.3 ## 4.3.2 diff --git a/docs/package.json b/docs/package.json index 3b125a5a..77dcac44 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/docs", "type": "module", - "version": "4.3.3", + "version": "4.3.4", "private": true, "description": "Testing framework for the Moon family of projects", "scripts": { diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 21aaaf60..cef1fea1 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,13 @@ # @moonwall/cli +## 4.3.4 + +### Patch Changes + +- 2e5b977: Encapsulation fix + - @moonwall/types@4.3.4 + - @moonwall/util@4.3.4 + ## 4.3.3 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 70b259e6..fa02db1c 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/cli", "type": "module", - "version": "4.3.3", + "version": "4.3.4", "description": "Testing framework for the Moon family of projects", "author": "timbrinded", "license": "ISC", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index c18bad27..62ea5a58 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,5 +1,7 @@ # @moonwall/types +## 4.3.4 + ## 4.3.3 ## 4.3.2 diff --git a/packages/types/package.json b/packages/types/package.json index 15341dbd..bd40dda8 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/types", "type": "module", - "version": "4.3.3", + "version": "4.3.4", "description": "Testing framework for the Moon family of projects", "author": "timbrinded", "license": "ISC", diff --git a/packages/util/CHANGELOG.md b/packages/util/CHANGELOG.md index 9e6cfe94..2bcb1abc 100644 --- a/packages/util/CHANGELOG.md +++ b/packages/util/CHANGELOG.md @@ -1,5 +1,11 @@ # @moonwall/util +## 4.3.4 + +### Patch Changes + +- @moonwall/types@4.3.4 + ## 4.3.3 ### Patch Changes diff --git a/packages/util/package.json b/packages/util/package.json index cade890c..51b15e9c 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/util", "type": "module", - "version": "4.3.3", + "version": "4.3.4", "description": "Testing framework for the Moon family of projects", "author": "timbrinded", "license": "ISC", diff --git a/test/CHANGELOG.md b/test/CHANGELOG.md index 81793587..eabd3403 100644 --- a/test/CHANGELOG.md +++ b/test/CHANGELOG.md @@ -1,5 +1,7 @@ # @moonwall/tests +## 4.3.4 + ## 4.3.3 ## 4.3.2 diff --git a/test/package.json b/test/package.json index bdf37708..71f4a678 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/tests", "type": "module", - "version": "4.3.3", + "version": "4.3.4", "private": true, "packageManager": "pnpm@7.23.0", "description": "Testing framework for the Moon family of projects", From 2259e7eac55690585ceee389bd77b6acd1310197 Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Fri, 10 Nov 2023 15:44:09 +0000 Subject: [PATCH 22/41] moving back to old process.exit --- packages/cli/package.json | 8 +- packages/cli/src/cmds/entrypoint.ts | 23 +-- packages/cli/src/cmds/runTests.ts | 64 ++++--- packages/types/package.json | 4 +- packages/util/package.json | 6 +- pnpm-lock.yaml | 266 +++++++++++++++++----------- test/package.json | 12 +- 7 files changed, 223 insertions(+), 160 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index fa02db1c..2ea9d20e 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -62,7 +62,7 @@ }, "dependencies": { "@acala-network/chopsticks": "^0.9.1", - "@moonbeam-network/api-augment": "^0.2500.0", + "@moonbeam-network/api-augment": "^0.2600.0", "@moonwall/types": "workspace:*", "@moonwall/util": "workspace:*", "@polkadot/api": "^10.10.1", @@ -92,7 +92,7 @@ "semver": "^7.5.4", "viem": "^1.18.9", "vitest": "1.0.0-beta.4", - "web3": "4.2.1", + "web3": "4.2.2", "web3-providers-ws": "4.0.7", "ws": "^8.14.2", "yaml": "^2.3.4", @@ -103,9 +103,9 @@ "@types/debug": "^4.1.12", "@types/node": "^20.9.0", "@types/yargs": "^17.0.31", - "prettier": "^2.8.8", + "prettier": "^3.0.3", "tsup": "^7.2.0", - "tsx": "^3.14.0", + "tsx": "^4.1.0", "typescript": "^5.2.2" }, "publishConfig": { diff --git a/packages/cli/src/cmds/entrypoint.ts b/packages/cli/src/cmds/entrypoint.ts index 83b1b799..2546a5a0 100755 --- a/packages/cli/src/cmds/entrypoint.ts +++ b/packages/cli/src/cmds/entrypoint.ts @@ -11,6 +11,16 @@ import { fetchArtifact } from "../internal/cmdFunctions/fetchArtifact"; import dotenv from "dotenv"; dotenv.config(); +process.on("unhandledRejection", (reason, promise) => { + console.error("Unhandled Rejection at:", promise, "reason:", reason); + process.exit(1); +}); + +process.on("uncaughtException", (error) => { + console.error("Uncaught Exception:", error); + process.exit(1); +}); + const defaultConfigFiles = ["./moonwall.config", "./moonwall.config.json"]; function findExistingConfig(files: string[]): string | undefined { @@ -101,20 +111,11 @@ yargs(hideBin(process.argv)) description: "Pattern to grep test ID/Description to run", }); }, - (args) => { + async (args) => { if (args.envName) { process.env.MOON_RUN_SCRIPTS = "true"; - - testCmd(args.envName.toString(), { + await testCmd(args.envName.toString(), { testNamePattern: args.GrepTest, - }).then((testsPassed) => { - if (testsPassed) { - console.log("✅ All tests passed"); - process.exit(0); - } else { - console.log("❌ Some tests failed"); - process.exit(1); - } }); } else { console.log("❌ No environment specified"); diff --git a/packages/cli/src/cmds/runTests.ts b/packages/cli/src/cmds/runTests.ts index 20f0c20d..5c621f70 100644 --- a/packages/cli/src/cmds/runTests.ts +++ b/packages/cli/src/cmds/runTests.ts @@ -9,41 +9,39 @@ import { cacheConfig, importAsyncConfig, loadEnvVars } from "../lib/configReader import { contextCreator, runNetworkOnly } from "../lib/globalContext"; export async function testCmd(envName: string, additionalArgs?: object): Promise { - return new Promise(async (resolve, reject) => { - await cacheConfig(); - const globalConfig = await importAsyncConfig(); - const env = globalConfig.environments.find(({ name }) => name === envName)!; - process.env.MOON_TEST_ENV = envName; - - if (!env) { - const envList = globalConfig.environments.map((env) => env.name); - reject( - new Error( - `No environment found in config for: ${chalk.bgWhiteBright.blackBright( - envName - )}\n Environments defined in config are: ${envList}\n` - ) - ); - } - loadEnvVars(); - - await commonChecks(env); + await cacheConfig(); + const globalConfig = await importAsyncConfig(); + const env = globalConfig.environments.find(({ name }) => name === envName)!; + process.env.MOON_TEST_ENV = envName; + + if (!env) { + const envList = globalConfig.environments.map((env) => env.name); + new Error( + `No environment found in config for: ${chalk.bgWhiteBright.blackBright( + envName + )}\n Environments defined in config are: ${envList}\n` + ); + } + loadEnvVars(); - if ( - (env.foundation.type == "dev" && !env.foundation.launchSpec[0].retainAllLogs) || - (env.foundation.type == "chopsticks" && !env.foundation.launchSpec[0].retainAllLogs) - ) { - clearNodeLogs(); - } - const vitest = await executeTests(env, additionalArgs); - const failed = vitest!.state.getFiles().filter((file) => file.result!.state === "fail"); + await commonChecks(env); - if (failed.length > 0) { - resolve(false); - } else { - resolve(true); - } - }); + if ( + (env.foundation.type == "dev" && !env.foundation.launchSpec[0].retainAllLogs) || + (env.foundation.type == "chopsticks" && !env.foundation.launchSpec[0].retainAllLogs) + ) { + clearNodeLogs(); + } + const vitest = await executeTests(env, additionalArgs); + const failed = vitest!.state.getFiles().filter((file) => file.result!.state === "fail"); + + if (failed.length === 0) { + console.log("✅ All tests passed"); + process.exit(0); + } else { + console.log("❌ Some tests failed"); + process.exit(1); + } } export async function executeTests(env: Environment, additionalArgs?: object) { diff --git a/packages/types/package.json b/packages/types/package.json index bd40dda8..a0eb2c1b 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -70,7 +70,7 @@ "debug": "^4.3.4", "ethers": "^6.8.1", "viem": "^1.18.9", - "web3": "4.2.1" + "web3": "4.2.2" }, "publishConfig": { "access": "public" @@ -78,6 +78,6 @@ "devDependencies": { "tsup": "^7.2.0", "typescript": "^5.2.2", - "typescript-json-schema": "^0.59.0" + "typescript-json-schema": "^0.62.0" } } diff --git a/packages/util/package.json b/packages/util/package.json index 51b15e9c..5d140b74 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -57,7 +57,7 @@ "prepublish": "pnpm run build && pnpm run generate-types" }, "dependencies": { - "@moonbeam-network/api-augment": "^0.2400.0", + "@moonbeam-network/api-augment": "^0.2600.0", "@moonwall/types": "workspace:*", "@polkadot/api": "^10.10.1", "@polkadot/api-augment": "^10.10.1", @@ -83,7 +83,7 @@ "semver": "^7.5.4", "viem": "^1.18.9", "vitest": "1.0.0-beta.4", - "web3": "4.2.1", + "web3": "4.2.2", "ws": "^8.14.2", "yaml": "^2.3.4", "yargs": "^17.7.2" @@ -92,7 +92,7 @@ "@types/debug": "^4.1.12", "@types/node": "^20.9.0", "@types/yargs": "^17.0.31", - "prettier": "^2.8.8", + "prettier": "^3.0.3", "tsup": "^7.2.0", "typescript": "^5.2.2" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 530766c7..b13e3c63 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -58,8 +58,8 @@ importers: specifier: ^0.9.1 version: 0.9.1(@polkadot/util@12.5.1)(debug@4.3.4) '@moonbeam-network/api-augment': - specifier: ^0.2500.0 - version: 0.2500.0 + specifier: ^0.2600.0 + version: 0.2600.0 '@moonwall/types': specifier: workspace:* version: link:../types @@ -148,8 +148,8 @@ importers: specifier: 1.0.0-beta.4 version: 1.0.0-beta.4(@types/node@20.9.0)(@vitest/ui@1.0.0-beta.4) web3: - specifier: 4.2.1 - version: 4.2.1(typescript@5.2.2) + specifier: 4.2.2 + version: 4.2.2(typescript@5.2.2) web3-providers-ws: specifier: 4.0.7 version: 4.0.7 @@ -176,14 +176,14 @@ importers: specifier: ^17.0.31 version: 17.0.31 prettier: - specifier: ^2.8.8 - version: 2.8.8 + specifier: ^3.0.3 + version: 3.0.3 tsup: specifier: ^7.2.0 version: 7.2.0(typescript@5.2.2) tsx: - specifier: ^3.14.0 - version: 3.14.0 + specifier: ^4.1.0 + version: 4.1.0 typescript: specifier: ^5.2.2 version: 5.2.2 @@ -227,8 +227,8 @@ importers: specifier: ^1.18.9 version: 1.18.9(typescript@5.2.2) web3: - specifier: 4.2.1 - version: 4.2.1(typescript@5.2.2) + specifier: 4.2.2 + version: 4.2.2(typescript@5.2.2) devDependencies: tsup: specifier: ^7.2.0 @@ -237,14 +237,14 @@ importers: specifier: ^5.2.2 version: 5.2.2 typescript-json-schema: - specifier: ^0.59.0 - version: 0.59.0 + specifier: ^0.62.0 + version: 0.62.0 packages/util: dependencies: '@moonbeam-network/api-augment': - specifier: ^0.2400.0 - version: 0.2400.0 + specifier: ^0.2600.0 + version: 0.2600.0 '@moonwall/types': specifier: workspace:* version: link:../types @@ -321,8 +321,8 @@ importers: specifier: 1.0.0-beta.4 version: 1.0.0-beta.4(@types/node@20.9.0)(@vitest/ui@1.0.0-beta.4) web3: - specifier: 4.2.1 - version: 4.2.1(typescript@5.2.2) + specifier: 4.2.2 + version: 4.2.2(typescript@5.2.2) ws: specifier: ^8.14.2 version: 8.14.2 @@ -343,8 +343,8 @@ importers: specifier: ^17.0.31 version: 17.0.31 prettier: - specifier: ^2.8.8 - version: 2.8.8 + specifier: ^3.0.3 + version: 3.0.3 tsup: specifier: ^7.2.0 version: 7.2.0(typescript@5.2.2) @@ -358,8 +358,8 @@ importers: specifier: ^0.9.1 version: 0.9.1(@polkadot/util@12.5.1)(debug@4.3.4) '@moonbeam-network/api-augment': - specifier: ^0.2500.0 - version: 0.2500.0 + specifier: ^0.2600.0 + version: 0.2600.0 '@moonwall/cli': specifier: workspace:* version: link:../packages/cli @@ -370,8 +370,8 @@ importers: specifier: workspace:* version: link:../packages/util '@openzeppelin/contracts': - specifier: ^4.9.3 - version: 4.9.3 + specifier: ^5.0.0 + version: 5.0.0 '@polkadot/api': specifier: ^10.10.1 version: 10.10.1 @@ -400,17 +400,17 @@ importers: specifier: ^6.8.1 version: 6.8.1 pnpm: - specifier: 8.6.2 - version: 8.6.2 + specifier: 8.10.2 + version: 8.10.2 prettier: - specifier: ^2.8.8 - version: 2.8.8 + specifier: ^3.0.3 + version: 3.0.3 solc: specifier: ^0.8.23 version: 0.8.23 tsx: - specifier: ^3.14.0 - version: 3.14.0 + specifier: ^4.1.0 + version: 4.1.0 typescript: specifier: ^5.2.2 version: 5.2.2 @@ -421,8 +421,8 @@ importers: specifier: 1.0.0-beta.4 version: 1.0.0-beta.4(@types/node@20.9.0)(@vitest/ui@1.0.0-beta.4) web3: - specifier: 4.2.1 - version: 4.2.1(typescript@5.2.2) + specifier: 4.2.2 + version: 4.2.2(typescript@5.2.2) yargs: specifier: ^17.7.2 version: 17.7.2 @@ -1281,13 +1281,8 @@ packages: - encoding - supports-color - /@moonbeam-network/api-augment@0.2400.0: - resolution: {integrity: sha512-Kec+G3ohgRJyt09bsxfWFB2m24cja6aU81o3NICoOOftD1Jrn6EnKRPLilELYFTRZwYYRQT5TcUELRx1JzLicA==} - engines: {node: '>=14.0.0'} - dev: false - - /@moonbeam-network/api-augment@0.2500.0: - resolution: {integrity: sha512-HOHQE9FCw9Pft+t5bWKe+c5+mKJ/5ZD1UztJlGBMxg4NRLCdZiKxdbPBiv2OTpRsBRq5v6PD2LaTFayRjXZYNQ==} + /@moonbeam-network/api-augment@0.2600.0: + resolution: {integrity: sha512-Hnn7mw8Im+X8GgbX11EjydbPM5MTQSG6yHs7JE2mPYCgSf6PkqUqOil5F4nACI4hMn6rM6GTTdRXscu0ztiNvQ==} engines: {node: '>=14.0.0'} /@noble/curves@1.1.0: @@ -1352,8 +1347,8 @@ packages: rimraf: 3.0.2 optional: true - /@openzeppelin/contracts@4.9.3: - resolution: {integrity: sha512-He3LieZ1pP2TNt5JbkPA4PNT9WC3gOTOlDcFGJW4Le4QKqwmiNJCRt44APfxMxvq7OugU/cqYuPcSBzOw38DAg==} + /@openzeppelin/contracts@5.0.0: + resolution: {integrity: sha512-bv2sdS6LKqVVMLI5+zqnNrNU/CA+6z6CmwFXm/MzmOPBRSO5reEJN7z0Gbzvs0/bv/MZZXNklubpwy3v2+azsw==} dev: true /@pnpm/config.env-replace@1.1.0: @@ -1806,7 +1801,7 @@ packages: resolution: {integrity: sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A==} dependencies: '@noble/curves': 1.1.0 - '@noble/hashes': 1.3.2 + '@noble/hashes': 1.3.1 '@scure/base': 1.1.3 /@scure/bip32@1.3.2: @@ -1893,10 +1888,6 @@ packages: ci-info: 3.9.0 dev: true - /@types/json-schema@7.0.13: - resolution: {integrity: sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==} - dev: true - /@types/json-schema@7.0.15: resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} dev: true @@ -2824,6 +2815,13 @@ packages: function-bind: 1.1.1 get-intrinsic: 1.2.1 + /call-bind@1.0.5: + resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==} + dependencies: + function-bind: 1.1.2 + get-intrinsic: 1.2.2 + set-function-length: 1.1.1 + /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -3264,6 +3262,14 @@ packages: gopd: 1.0.1 has-property-descriptors: 1.0.0 + /define-data-property@1.1.1: + resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.2 + gopd: 1.0.1 + has-property-descriptors: 1.0.1 + /define-properties@1.2.1: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} @@ -4109,6 +4115,9 @@ packages: /function-bind@1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + /function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + /function.prototype.name@1.1.6: resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} engines: {node: '>= 0.4'} @@ -4166,6 +4175,14 @@ packages: has-proto: 1.0.1 has-symbols: 1.0.3 + /get-intrinsic@1.2.2: + resolution: {integrity: sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==} + dependencies: + function-bind: 1.1.2 + has-proto: 1.0.1 + has-symbols: 1.0.3 + hasown: 2.0.0 + /get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} @@ -4323,6 +4340,11 @@ packages: dependencies: get-intrinsic: 1.2.1 + /has-property-descriptors@1.0.1: + resolution: {integrity: sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==} + dependencies: + get-intrinsic: 1.2.2 + /has-proto@1.0.1: resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} engines: {node: '>= 0.4'} @@ -4344,6 +4366,12 @@ packages: resolution: {integrity: sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==} engines: {node: '>= 0.4.0'} + /hasown@2.0.0: + resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} + engines: {node: '>= 0.4'} + dependencies: + function-bind: 1.1.2 + /he@1.2.0: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} hasBin: true @@ -5890,8 +5918,8 @@ packages: mlly: 1.4.2 pathe: 1.1.1 - /pnpm@8.6.2: - resolution: {integrity: sha512-Dmgwe+T34Xr6UYaTLXSphPS7ok4h2EPkaHQEH6j7USoAk21CzueAdD1nQLkWJwDnZkJucho0LbKntJ+9B5xlUQ==} + /pnpm@8.10.2: + resolution: {integrity: sha512-B4IJPVumx62UYggbwe8HdQFqS0EJ7KHh/tzqbxEBQ69fUJk9s2xCfU+oxivjkgoyJNsS2nGdJGyhndnxgEjDPA==} engines: {node: '>=16.14'} hasBin: true dev: true @@ -5945,6 +5973,12 @@ packages: hasBin: true dev: true + /prettier@3.0.3: + resolution: {integrity: sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==} + engines: {node: '>=14'} + hasBin: true + dev: true + /pretty-format@29.7.0: resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -6320,6 +6354,15 @@ packages: /set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + /set-function-length@1.1.1: + resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.1 + get-intrinsic: 1.2.2 + gopd: 1.0.1 + has-property-descriptors: 1.0.1 + /set-function-name@2.0.1: resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} engines: {node: '>= 0.4'} @@ -6851,7 +6894,7 @@ packages: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} dev: true - /ts-node@10.9.1(@types/node@16.18.61)(typescript@4.9.5): + /ts-node@10.9.1(@types/node@16.18.61)(typescript@5.1.6): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -6877,7 +6920,7 @@ packages: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.9.5 + typescript: 5.1.6 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: true @@ -6964,8 +7007,9 @@ packages: - ts-node dev: true - /tsx@3.14.0: - resolution: {integrity: sha512-xHtFaKtHxM9LOklMmJdI3BEnQq/D5F73Of2E1GDrITi9sgoVkvIsrQUTY1G8FlmGtA+awCI4EBlTRRYxkL2sRg==} + /tsx@4.1.0: + resolution: {integrity: sha512-u4l17Yd63Wsk2fzNn1wZCmcS9kwJ/2ysl7wuoVggv2hd3NjLA5JQPpyJMXoWSXOwOvoQUzNcu/sf/35HEsnXsg==} + engines: {node: '>=18.0.0'} hasBin: true dependencies: esbuild: 0.18.20 @@ -7139,26 +7183,26 @@ packages: transitivePeerDependencies: - supports-color - /typescript-json-schema@0.59.0: - resolution: {integrity: sha512-eYB9RO8p4PntznWUukdDQHckNfxzjEFCJUgsWeCE43mcFioE0wXGTSECGk1uhty9XQMxkpuI4pKAqqnb62ln3Q==} + /typescript-json-schema@0.62.0: + resolution: {integrity: sha512-qRO6pCgyjKJ230QYdOxDRpdQrBeeino4v5p2rYmSD72Jf4rD3O+cJcROv46sQukm46CLWoeusqvBgKpynEv25g==} hasBin: true dependencies: - '@types/json-schema': 7.0.13 + '@types/json-schema': 7.0.15 '@types/node': 16.18.61 glob: 7.2.3 path-equal: 1.2.5 safe-stable-stringify: 2.4.3 - ts-node: 10.9.1(@types/node@16.18.61)(typescript@4.9.5) - typescript: 4.9.5 + ts-node: 10.9.1(@types/node@16.18.61)(typescript@5.1.6) + typescript: 5.1.6 yargs: 17.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' dev: true - /typescript@4.9.5: - resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} - engines: {node: '>=4.2.0'} + /typescript@5.1.6: + resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + engines: {node: '>=14.17'} hasBin: true dev: true @@ -7240,7 +7284,7 @@ packages: is-arguments: 1.1.1 is-generator-function: 1.0.10 is-typed-array: 1.1.12 - which-typed-array: 1.1.11 + which-typed-array: 1.1.13 /uuid@9.0.1: resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} @@ -7482,15 +7526,15 @@ packages: resolution: {integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==} engines: {node: '>= 8'} - /web3-core@4.3.0: - resolution: {integrity: sha512-//cy1W780nkMXd/9g2+GIa7KlHMuE+PJPhPD4NdwpUxvtQni6GkXSxtFnImZufyGVP+BpO5g7QneiSeu5ce+IQ==} + /web3-core@4.3.1: + resolution: {integrity: sha512-xa3w5n/ESxp5HIbrwsYBhpAPx2KI5LprjRFEtRwP0GpqqhTcCSMMYoyItRqQQ+k9YnB0PoFpWJfJI6Qn5x8YUQ==} engines: {node: '>=14', npm: '>=6.12.0'} dependencies: - web3-errors: 1.1.3 + web3-errors: 1.1.4 web3-eth-iban: 4.0.7 web3-providers-http: 4.1.0 web3-providers-ws: 4.0.7 - web3-types: 1.3.0 + web3-types: 1.3.1 web3-utils: 4.0.7 web3-validator: 2.0.3 optionalDependencies: @@ -7507,13 +7551,19 @@ packages: dependencies: web3-types: 1.3.0 + /web3-errors@1.1.4: + resolution: {integrity: sha512-WahtszSqILez+83AxGecVroyZsMuuRT+KmQp4Si5P4Rnqbczno1k748PCrZTS1J4UCPmXMG2/Vt+0Bz2zwXkwQ==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + web3-types: 1.3.1 + /web3-eth-abi@4.1.4(typescript@5.2.2): resolution: {integrity: sha512-YLOBVVxxxLYKXjaiwZjEWYEnkMmmrm0nswZsvzSsINy/UgbWbzfoiZU+zn4YNWIEhORhx1p37iS3u/dP6VyC2w==} engines: {node: '>=14', npm: '>=6.12.0'} dependencies: abitype: 0.7.1(typescript@5.2.2) - web3-errors: 1.1.3 - web3-types: 1.3.0 + web3-errors: 1.1.4 + web3-types: 1.3.1 web3-utils: 4.0.7 web3-validator: 2.0.3 transitivePeerDependencies: @@ -7527,20 +7577,20 @@ packages: '@ethereumjs/rlp': 4.0.1 crc-32: 1.2.2 ethereum-cryptography: 2.1.2 - web3-errors: 1.1.3 - web3-types: 1.3.0 + web3-errors: 1.1.4 + web3-types: 1.3.1 web3-utils: 4.0.7 web3-validator: 2.0.3 - /web3-eth-contract@4.1.2(typescript@5.2.2): - resolution: {integrity: sha512-kVcMIurY4buNOfVhuE1Gg8NmSo5EmAOgBwECwU6lE8xUkbWAC6nhJGX1fgZjoC075HnSr89G1zgwlePyEdC0wQ==} + /web3-eth-contract@4.1.3(typescript@5.2.2): + resolution: {integrity: sha512-F6e3eyetUDiNOb78EDVJtNOb0H1GPz3xAZH8edSfYdhaxI9tTutP2V3p++kh2ZJ/RrdE2+xil7H/nPLgHymBvg==} engines: {node: '>=14', npm: '>=6.12.0'} dependencies: - web3-core: 4.3.0 - web3-errors: 1.1.3 + web3-core: 4.3.1 + web3-errors: 1.1.4 web3-eth: 4.3.1(typescript@5.2.2) web3-eth-abi: 4.1.4(typescript@5.2.2) - web3-types: 1.3.0 + web3-types: 1.3.1 web3-utils: 4.0.7 web3-validator: 2.0.3 transitivePeerDependencies: @@ -7555,12 +7605,12 @@ packages: engines: {node: '>=14', npm: '>=6.12.0'} dependencies: '@adraffy/ens-normalize': 1.10.0 - web3-core: 4.3.0 - web3-errors: 1.1.3 + web3-core: 4.3.1 + web3-errors: 1.1.4 web3-eth: 4.3.1(typescript@5.2.2) - web3-eth-contract: 4.1.2(typescript@5.2.2) + web3-eth-contract: 4.1.3(typescript@5.2.2) web3-net: 4.0.7 - web3-types: 1.3.0 + web3-types: 1.3.1 web3-utils: 4.0.7 web3-validator: 2.0.3 transitivePeerDependencies: @@ -7574,8 +7624,8 @@ packages: resolution: {integrity: sha512-8weKLa9KuKRzibC87vNLdkinpUE30gn0IGY027F8doeJdcPUfsa4IlBgNC4k4HLBembBB2CTU0Kr/HAOqMeYVQ==} engines: {node: '>=14', npm: '>=6.12.0'} dependencies: - web3-errors: 1.1.3 - web3-types: 1.3.0 + web3-errors: 1.1.4 + web3-types: 1.3.1 web3-utils: 4.0.7 web3-validator: 2.0.3 @@ -7583,10 +7633,10 @@ packages: resolution: {integrity: sha512-sXeyLKJ7ddQdMxz1BZkAwImjqh7OmKxhXoBNF3isDmD4QDpMIwv/t237S3q4Z0sZQamPa/pHebJRWVuvP8jZdw==} engines: {node: '>=14', npm: '>=6.12.0'} dependencies: - web3-core: 4.3.0 + web3-core: 4.3.1 web3-eth: 4.3.1(typescript@5.2.2) web3-rpc-methods: 1.1.3 - web3-types: 1.3.0 + web3-types: 1.3.1 web3-utils: 4.0.7 web3-validator: 2.0.3 transitivePeerDependencies: @@ -7601,14 +7651,14 @@ packages: engines: {node: '>=14', npm: '>=6.12.0'} dependencies: setimmediate: 1.0.5 - web3-core: 4.3.0 - web3-errors: 1.1.3 + web3-core: 4.3.1 + web3-errors: 1.1.4 web3-eth-abi: 4.1.4(typescript@5.2.2) web3-eth-accounts: 4.1.0 web3-net: 4.0.7 web3-providers-ws: 4.0.7 web3-rpc-methods: 1.1.3 - web3-types: 1.3.0 + web3-types: 1.3.1 web3-utils: 4.0.7 web3-validator: 2.0.3 transitivePeerDependencies: @@ -7622,9 +7672,9 @@ packages: resolution: {integrity: sha512-SzEaXFrBjY25iQGk5myaOfO9ZyfTwQEa4l4Ps4HDNVMibgZji3WPzpjq8zomVHMwi8bRp6VV7YS71eEsX7zLow==} engines: {node: '>=14', npm: '>=6.12.0'} dependencies: - web3-core: 4.3.0 + web3-core: 4.3.1 web3-rpc-methods: 1.1.3 - web3-types: 1.3.0 + web3-types: 1.3.1 web3-utils: 4.0.7 transitivePeerDependencies: - bufferutil @@ -7636,8 +7686,8 @@ packages: engines: {node: '>=14', npm: '>=6.12.0'} dependencies: cross-fetch: 4.0.0 - web3-errors: 1.1.3 - web3-types: 1.3.0 + web3-errors: 1.1.4 + web3-types: 1.3.1 web3-utils: 4.0.7 transitivePeerDependencies: - encoding @@ -7647,8 +7697,8 @@ packages: engines: {node: '>=14', npm: '>=6.12.0'} requiresBuild: true dependencies: - web3-errors: 1.1.3 - web3-types: 1.3.0 + web3-errors: 1.1.4 + web3-types: 1.3.1 web3-utils: 4.0.7 optional: true @@ -7670,8 +7720,8 @@ packages: resolution: {integrity: sha512-XB6SsCZZPdZUMPIRqDxJkZFKMu0/Y+yaExAt+Z7RqmuM7xF55fJ/Qb84LQho8zarvUoYziy4jnIfs+SXImxQUw==} engines: {node: '>=14', npm: '>=6.12.0'} dependencies: - web3-core: 4.3.0 - web3-types: 1.3.0 + web3-core: 4.3.1 + web3-types: 1.3.1 web3-validator: 2.0.3 transitivePeerDependencies: - bufferutil @@ -7683,14 +7733,18 @@ packages: engines: {node: '>=14', npm: '>=6.12.0'} requiresBuild: true + /web3-types@1.3.1: + resolution: {integrity: sha512-8fXi7h/t95VKRtgU4sxprLPZpsTh3jYDfSghshIDBgUD/OoGe5S+syP24SUzBZYllZ/L+hMr2gdp/0bGJa8pYQ==} + engines: {node: '>=14', npm: '>=6.12.0'} + /web3-utils@4.0.7: resolution: {integrity: sha512-sy8S6C2FIa5NNHc8DjND+Fx3S8KDAizuh5RbL1RX3h0PRbFgPfWzF5RfUns8gTt0mjJuOhs/IaDhrZfeTszG5A==} engines: {node: '>=14', npm: '>=6.12.0'} requiresBuild: true dependencies: ethereum-cryptography: 2.1.2 - web3-errors: 1.1.3 - web3-types: 1.3.0 + web3-errors: 1.1.4 + web3-types: 1.3.1 web3-validator: 2.0.3 /web3-validator@2.0.3: @@ -7700,20 +7754,20 @@ packages: dependencies: ethereum-cryptography: 2.1.2 util: 0.12.5 - web3-errors: 1.1.3 - web3-types: 1.3.0 + web3-errors: 1.1.4 + web3-types: 1.3.1 zod: 3.22.4 - /web3@4.2.1(typescript@5.2.2): - resolution: {integrity: sha512-zSB+Ds1lSMu/IhAX0xKhiFI7ZA1BQ6y2WOqFE9ikqPjaMkpOEBBkl61nzWfLJRoerTB1ohEXAP20jLDXcFd4hQ==} + /web3@4.2.2(typescript@5.2.2): + resolution: {integrity: sha512-im7weoHY7TW87nhFk10ysupZnsDJEO/xDpz985AgrTd/7KxExlzjjKd+4nue0WskUF0th0mgoMs1YaA8xUjCjw==} engines: {node: '>=14.0.0', npm: '>=6.12.0'} dependencies: - web3-core: 4.3.0 - web3-errors: 1.1.3 + web3-core: 4.3.1 + web3-errors: 1.1.4 web3-eth: 4.3.1(typescript@5.2.2) web3-eth-abi: 4.1.4(typescript@5.2.2) web3-eth-accounts: 4.1.0 - web3-eth-contract: 4.1.2(typescript@5.2.2) + web3-eth-contract: 4.1.3(typescript@5.2.2) web3-eth-ens: 4.0.8(typescript@5.2.2) web3-eth-iban: 4.0.7 web3-eth-personal: 4.0.8(typescript@5.2.2) @@ -7721,7 +7775,7 @@ packages: web3-providers-http: 4.1.0 web3-providers-ws: 4.0.7 web3-rpc-methods: 1.1.3 - web3-types: 1.3.0 + web3-types: 1.3.1 web3-utils: 4.0.7 web3-validator: 2.0.3 transitivePeerDependencies: @@ -7817,6 +7871,16 @@ packages: gopd: 1.0.1 has-tostringtag: 1.0.0 + /which-typed-array@1.1.13: + resolution: {integrity: sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.5 + call-bind: 1.0.5 + for-each: 0.3.3 + gopd: 1.0.1 + has-tostringtag: 1.0.0 + /which@1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} hasBin: true diff --git a/test/package.json b/test/package.json index 71f4a678..e4222be7 100644 --- a/test/package.json +++ b/test/package.json @@ -14,11 +14,11 @@ }, "devDependencies": { "@acala-network/chopsticks": "^0.9.1", - "@moonbeam-network/api-augment": "^0.2500.0", + "@moonbeam-network/api-augment": "^0.2600.0", "@moonwall/cli": "workspace:*", "@moonwall/types": "workspace:*", "@moonwall/util": "workspace:*", - "@openzeppelin/contracts": "^4.9.3", + "@openzeppelin/contracts": "^5.0.0", "@polkadot/api": "^10.10.1", "@polkadot/api-augment": "^10.10.1", "@polkadot/util": "^12.5.1", @@ -28,14 +28,14 @@ "chai": "^4.3.10", "chalk": "^5.3.0", "ethers": "^6.8.1", - "pnpm": "8.6.2", - "prettier": "^2.8.8", + "pnpm": "8.10.2", + "prettier": "^3.0.3", "solc": "^0.8.23", - "tsx": "^3.14.0", + "tsx": "^4.1.0", "typescript": "^5.2.2", "viem": "^1.18.9", "vitest": "1.0.0-beta.4", - "web3": "4.2.1", + "web3": "4.2.2", "yargs": "^17.7.2" } } From bd6ef1dac72c4cb7b2a69fcd9e462cf8f880648b Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Fri, 10 Nov 2023 15:46:12 +0000 Subject: [PATCH 23/41] changeset --- .changeset/chilled-ants-help.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .changeset/chilled-ants-help.md diff --git a/.changeset/chilled-ants-help.md b/.changeset/chilled-ants-help.md new file mode 100644 index 00000000..ab4df475 --- /dev/null +++ b/.changeset/chilled-ants-help.md @@ -0,0 +1,8 @@ +--- +"@moonwall/types": patch +"@moonwall/util": patch +"@moonwall/cli": patch +"@moonwall/tests": patch +--- + +Reverting to old exitlogic From 64e1ff8c834cf32530655e83a311ffc00fc46781 Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Fri, 10 Nov 2023 15:56:18 +0000 Subject: [PATCH 24/41] fmt --- .../cli/src/internal/foundations/devModeHelpers.ts | 2 +- packages/cli/src/internal/localNode.ts | 6 +++--- packages/cli/src/internal/providerFactories.ts | 6 +++++- packages/cli/src/lib/contractFunctions.ts | 5 ++--- packages/cli/src/lib/governanceProcedures.ts | 12 ++++++------ packages/cli/src/lib/handlers/devHandler.ts | 4 ++-- 6 files changed, 19 insertions(+), 16 deletions(-) diff --git a/packages/cli/src/internal/foundations/devModeHelpers.ts b/packages/cli/src/internal/foundations/devModeHelpers.ts index ad337928..a3cc66f1 100644 --- a/packages/cli/src/internal/foundations/devModeHelpers.ts +++ b/packages/cli/src/internal/foundations/devModeHelpers.ts @@ -55,7 +55,7 @@ function returnDefaultSigner() { export async function createDevBlock< ApiType extends ApiTypes, - Calls extends CallType | Array> + Calls extends CallType | Array>, >(context: GenericContext, options: BlockCreation, transactions?: Calls) { const containsViem = (context as DevModeContext).isEthereumChain && diff --git a/packages/cli/src/internal/localNode.ts b/packages/cli/src/internal/localNode.ts index eec90d8f..33187f00 100644 --- a/packages/cli/src/internal/localNode.ts +++ b/packages/cli/src/internal/localNode.ts @@ -26,9 +26,9 @@ export async function launchNode(cmd: string, args: string[], name: string): Pro const logLocation = path .join( dirPath, - `${path.basename(cmd)}_node_${ - args.find((a) => a.includes("port"))?.split("=")[1] - }_${new Date().getTime()}.log` + `${path.basename(cmd)}_node_${args + .find((a) => a.includes("port")) + ?.split("=")[1]}_${new Date().getTime()}.log` ) .replaceAll("node_node_undefined", "chopsticks"); process.env.MOON_LOG_LOCATION = logLocation; diff --git a/packages/cli/src/internal/providerFactories.ts b/packages/cli/src/internal/providerFactories.ts index 683e1654..ab10ff7f 100644 --- a/packages/cli/src/internal/providerFactories.ts +++ b/packages/cli/src/internal/providerFactories.ts @@ -202,7 +202,11 @@ export interface ProviderInterface { } export class ProviderInterfaceFactory { - constructor(private name: string, private type: ProviderType, private connect: () => any) {} + constructor( + private name: string, + private type: ProviderType, + private connect: () => any + ) {} public async create(): Promise { switch (this.type) { diff --git a/packages/cli/src/lib/contractFunctions.ts b/packages/cli/src/lib/contractFunctions.ts index ec24534e..a8904c80 100644 --- a/packages/cli/src/lib/contractFunctions.ts +++ b/packages/cli/src/lib/contractFunctions.ts @@ -24,9 +24,8 @@ import { importJsonConfig } from "./configReader"; function getCompiledPath(contractName: string) { const config = importJsonConfig(); - const contractsDir = config.environments.find( - (env) => env.name === process.env.MOON_TEST_ENV - )?.contracts; + const contractsDir = config.environments.find((env) => env.name === process.env.MOON_TEST_ENV) + ?.contracts; if (!contractsDir) { throw new Error( diff --git a/packages/cli/src/lib/governanceProcedures.ts b/packages/cli/src/lib/governanceProcedures.ts index 17a71785..69ec7f82 100644 --- a/packages/cli/src/lib/governanceProcedures.ts +++ b/packages/cli/src/lib/governanceProcedures.ts @@ -20,7 +20,7 @@ export const TECHNICAL_COMMITTEE_THRESHOLD = Math.ceil( export const notePreimage = async < Call extends SubmittableExtrinsic, - ApiType extends ApiTypes + ApiType extends ApiTypes, >( context: DevModeContext, proposal: Call, @@ -37,7 +37,7 @@ export const notePreimage = async < // Creates the Council Proposal and fast track it before executing it export const instantFastTrack = async < Call extends SubmittableExtrinsic, - ApiType extends ApiTypes + ApiType extends ApiTypes, >( context: DevModeContext, proposal: string | Call, @@ -67,7 +67,7 @@ export const instantFastTrack = async < // Close it (Execute if successful) export const execCouncilProposal = async < Call extends SubmittableExtrinsic, - ApiType extends ApiTypes + ApiType extends ApiTypes, >( context: DevModeContext, polkadotCall: Call, @@ -129,7 +129,7 @@ export const execCouncilProposal = async < // Returns referendum index and proposal hash export const proposeReferendaAndDeposit = async < Call extends SubmittableExtrinsic, - ApiType extends ApiTypes + ApiType extends ApiTypes, >( context: DevModeContext, decisionDepositer: KeyringPair, @@ -176,7 +176,7 @@ export const proposeReferendaAndDeposit = async < // Returns referendum index and proposal hash export const dispatchAsGeneralAdmin = async < Call extends SubmittableExtrinsic, - ApiType extends ApiTypes + ApiType extends ApiTypes, >( context: DevModeContext, call: string | Call @@ -239,7 +239,7 @@ export const maximizeConvictionVotingOf = async ( // Close it (Execute if successful) export const execTechnicalCommitteeProposal = async < Call extends SubmittableExtrinsic, - ApiType extends ApiTypes + ApiType extends ApiTypes, >( context: DevModeContext, polkadotCall: Call, diff --git a/packages/cli/src/lib/handlers/devHandler.ts b/packages/cli/src/lib/handlers/devHandler.ts index 144939e0..4310581f 100644 --- a/packages/cli/src/lib/handlers/devHandler.ts +++ b/packages/cli/src/lib/handlers/devHandler.ts @@ -79,7 +79,7 @@ export const devHandler: FoundationHandler<"dev"> = ({ testCases, context, testC createBlock: async < ApiType extends ApiTypes, - Calls extends CallType | CallType[] + Calls extends CallType | CallType[], >( transactions?: Calls, options?: BlockCreation @@ -101,7 +101,7 @@ export const devHandler: FoundationHandler<"dev"> = ({ testCases, context, testC }) | (EthersTransactionOptions & { libraryType: "ethers"; - }) + }), >( options: TOptions ) => { From 88fb3917437d5abf86adea07ecd11c12da00a42e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 10 Nov 2023 16:05:04 +0000 Subject: [PATCH 25/41] Version Packages --- .changeset/chilled-ants-help.md | 8 -------- docs/CHANGELOG.md | 2 ++ docs/package.json | 2 +- packages/cli/CHANGELOG.md | 9 +++++++++ packages/cli/package.json | 2 +- packages/types/CHANGELOG.md | 6 ++++++ packages/types/package.json | 2 +- packages/util/CHANGELOG.md | 8 ++++++++ packages/util/package.json | 2 +- test/CHANGELOG.md | 6 ++++++ test/package.json | 2 +- 11 files changed, 36 insertions(+), 13 deletions(-) delete mode 100644 .changeset/chilled-ants-help.md diff --git a/.changeset/chilled-ants-help.md b/.changeset/chilled-ants-help.md deleted file mode 100644 index ab4df475..00000000 --- a/.changeset/chilled-ants-help.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@moonwall/types": patch -"@moonwall/util": patch -"@moonwall/cli": patch -"@moonwall/tests": patch ---- - -Reverting to old exitlogic diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 1368ff12..36b0a50a 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,7 @@ # @moonwall/docs +## 4.3.5 + ## 4.3.4 ## 4.3.3 diff --git a/docs/package.json b/docs/package.json index 77dcac44..9c67a54d 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/docs", "type": "module", - "version": "4.3.4", + "version": "4.3.5", "private": true, "description": "Testing framework for the Moon family of projects", "scripts": { diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index cef1fea1..b52af9f0 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,14 @@ # @moonwall/cli +## 4.3.5 + +### Patch Changes + +- bd6ef1d: Reverting to old exitlogic +- Updated dependencies [bd6ef1d] + - @moonwall/types@4.3.5 + - @moonwall/util@4.3.5 + ## 4.3.4 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 2ea9d20e..cac48a66 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/cli", "type": "module", - "version": "4.3.4", + "version": "4.3.5", "description": "Testing framework for the Moon family of projects", "author": "timbrinded", "license": "ISC", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 62ea5a58..dac5f66f 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,5 +1,11 @@ # @moonwall/types +## 4.3.5 + +### Patch Changes + +- bd6ef1d: Reverting to old exitlogic + ## 4.3.4 ## 4.3.3 diff --git a/packages/types/package.json b/packages/types/package.json index a0eb2c1b..d7b5c9aa 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/types", "type": "module", - "version": "4.3.4", + "version": "4.3.5", "description": "Testing framework for the Moon family of projects", "author": "timbrinded", "license": "ISC", diff --git a/packages/util/CHANGELOG.md b/packages/util/CHANGELOG.md index 2bcb1abc..4f2f22e7 100644 --- a/packages/util/CHANGELOG.md +++ b/packages/util/CHANGELOG.md @@ -1,5 +1,13 @@ # @moonwall/util +## 4.3.5 + +### Patch Changes + +- bd6ef1d: Reverting to old exitlogic +- Updated dependencies [bd6ef1d] + - @moonwall/types@4.3.5 + ## 4.3.4 ### Patch Changes diff --git a/packages/util/package.json b/packages/util/package.json index 5d140b74..da547d79 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/util", "type": "module", - "version": "4.3.4", + "version": "4.3.5", "description": "Testing framework for the Moon family of projects", "author": "timbrinded", "license": "ISC", diff --git a/test/CHANGELOG.md b/test/CHANGELOG.md index eabd3403..42ef207d 100644 --- a/test/CHANGELOG.md +++ b/test/CHANGELOG.md @@ -1,5 +1,11 @@ # @moonwall/tests +## 4.3.5 + +### Patch Changes + +- bd6ef1d: Reverting to old exitlogic + ## 4.3.4 ## 4.3.3 diff --git a/test/package.json b/test/package.json index e4222be7..7851ba34 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/tests", "type": "module", - "version": "4.3.4", + "version": "4.3.5", "private": true, "packageManager": "pnpm@7.23.0", "description": "Testing framework for the Moon family of projects", From fa6e69b98dfa52283e32044ce15744db6280a9a1 Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Sun, 12 Nov 2023 13:00:38 +0000 Subject: [PATCH 26/41] initial --- packages/cli/package.json | 1 + packages/cli/src/cmds/entrypoint.ts | 259 +++++++++++++++------------- packages/cli/src/cmds/runTests.ts | 8 +- pnpm-lock.yaml | 7 + 4 files changed, 151 insertions(+), 124 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index cac48a66..97ebada3 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -82,6 +82,7 @@ "colors": "^1.4.0", "debug": "^4.3.4", "dotenv": "^16.3.1", + "effect": "2.0.0-next.54", "ethers": "^6.8.1", "execa": "^8.0.1", "inquirer": "^9.2.12", diff --git a/packages/cli/src/cmds/entrypoint.ts b/packages/cli/src/cmds/entrypoint.ts index 2546a5a0..1a4e7176 100755 --- a/packages/cli/src/cmds/entrypoint.ts +++ b/packages/cli/src/cmds/entrypoint.ts @@ -6,31 +6,14 @@ import { hideBin } from "yargs/helpers"; import { testCmd } from "./runTests"; import { runNetworkCmd } from "./runNetwork"; import { generateConfig } from "../internal/cmdFunctions/initialisation"; -import { main } from "./main"; import { fetchArtifact } from "../internal/cmdFunctions/fetchArtifact"; import dotenv from "dotenv"; +import { Effect, Console, pipe } from "effect"; +import { main } from "./main"; dotenv.config(); -process.on("unhandledRejection", (reason, promise) => { - console.error("Unhandled Rejection at:", promise, "reason:", reason); - process.exit(1); -}); - -process.on("uncaughtException", (error) => { - console.error("Uncaught Exception:", error); - process.exit(1); -}); - const defaultConfigFiles = ["./moonwall.config", "./moonwall.config.json"]; -function findExistingConfig(files: string[]): string | undefined { - for (const file of files) { - if (fs.existsSync(file)) { - return file; - } - } -} - const defaultConfigFile = findExistingConfig(defaultConfigFiles) || "./moonwall.config.json"; // Hack to expose config-path to all commands and fallback @@ -46,108 +29,144 @@ const parsed = yargs(hideBin(process.argv)) .parseSync(); process.env.MOON_CONFIG_PATH = parsed.configFile; -yargs(hideBin(process.argv)) - .usage("Usage: $0") - .version("2.0.0") - .options({ - configFile: { - type: "string", - alias: "c", - description: "path to MoonwallConfig file", - default: defaultConfigFile, - }, - }) - .middleware((argv) => { - process.env.MOON_CONFIG_PATH = argv.configFile; - }) - .command(`init`, "Run tests for a given Environment", async () => { - await generateConfig(); - }) - .command( - `download [ver] [path]`, - "Download x86 artifact from GitHub", - (yargs) => { - return yargs - .positional("bin", { - describe: "Name of artifact to download\n[ moonbeam | polkadot | *-runtime ]", - }) - .positional("ver", { - describe: "Artifact version to download", - default: "latest", - }) - .positional("path", { - describe: "Path where to save artifacts", - type: "string", - default: "./", - }) - .option("overwrite", { - describe: "If file exists, should it be overwritten?", - type: "boolean", - alias: "d", - default: true, - }) - .option("output-name", { - describe: "Rename downloaded file to this name", - alias: "o", - type: "string", - }); - }, - async (argv) => { - await fetchArtifact(argv as any); - } - ) - .command( - `test [GrepTest]`, - "Run tests for a given Environment", - (yargs) => { - return yargs - .positional("envName", { - describe: "Network environment to run tests against", - array: true, - string: true, - }) - .positional("GrepTest", { - type: "string", - description: "Pattern to grep test ID/Description to run", - }); - }, - async (args) => { - if (args.envName) { +const cliStart = Effect.try(() => + yargs(hideBin(process.argv)) + .usage("Usage: $0") + .version("2.0.0") + .options({ + configFile: { + type: "string", + alias: "c", + description: "path to MoonwallConfig file", + default: defaultConfigFile, + }, + }) + .middleware((argv) => { + process.env.MOON_CONFIG_PATH = argv.configFile; + }) + .command(`init`, "Run tests for a given Environment", async () => { + await generateConfig(); + }) + .command( + `download [ver] [path]`, + "Download x86 artifact from GitHub", + (yargs) => { + return yargs + .positional("bin", { + describe: "Name of artifact to download\n[ moonbeam | polkadot | *-runtime ]", + }) + .positional("ver", { + describe: "Artifact version to download", + default: "latest", + }) + .positional("path", { + describe: "Path where to save artifacts", + type: "string", + default: "./", + }) + .option("overwrite", { + describe: "If file exists, should it be overwritten?", + type: "boolean", + alias: "d", + default: true, + }) + .option("output-name", { + describe: "Rename downloaded file to this name", + alias: "o", + type: "string", + }); + }, + async (argv) => { + await fetchArtifact(argv as any); + } + ) + .command( + `test [GrepTest]`, + "Run tests for a given Environment", + (yargs) => { + return yargs + .positional("envName", { + describe: "Network environment to run tests against", + array: true, + string: true, + }) + .positional("GrepTest", { + type: "string", + description: "Pattern to grep test ID/Description to run", + }); + }, + async ({ envName, GrepTest }) => { + const effect = pipe( + Effect.gen(function* (_) { + if (envName) { + yield* _(runTestEffect(envName as any, GrepTest)); + } else { + yield* _(Effect.logError("👉 Run 'pnpm moonwall --help' for more information")); + yield* _(Effect.fail("❌ No environment specified")); + } + }), + Effect.catchAll((error: any) => Effect.logError(`Error: ${error.message}`)) + ); + + await Effect.runPromiseExit(effect); + } + ) + .command( + `run [GrepTest]`, + "Start new network found in global config", + (yargs) => { + return yargs + .positional("envName", { + describe: "Network environment to start", + }) + .positional("GrepTest", { + type: "string", + description: "Pattern to grep test ID/Description to run", + }); + }, + async (argv) => { process.env.MOON_RUN_SCRIPTS = "true"; - await testCmd(args.envName.toString(), { - testNamePattern: args.GrepTest, - }); - } else { - console.log("❌ No environment specified"); - console.log(`👉 Run 'pnpm moonwall --help' for more information`); - process.exitCode = 1; + await runNetworkCmd(argv as any); + process.exitCode = 0; } + ) + .demandCommand(1) + .fail(async (msg) => { + Console.error(msg); + await main(); + }) + .help("h") + .alias("h", "help") + .parse() +); + +const runTestEffect = (envName: string, grepTest?: string) => + pipe( + setEnvVar("MOON_RUN_SCRIPTS", "true"), + Effect.flatMap(() => Effect.tryPromise(() => testCmd(envName, { testNamePattern: grepTest }))), + Effect.tap((result) => + Effect.succeed(() => { + process.exitCode = result ? 0 : 1; + }) + ) + ); + +const setEnvVar = (key: string, value: string) => Effect.succeed(() => (process.env[key] = value)); + +function findExistingConfig(files: string[]): string | undefined { + for (const file of files) { + if (fs.existsSync(file)) { + return file; } - ) - .command( - `run [GrepTest]`, - "Start new network found in global config", - (yargs) => { - return yargs - .positional("envName", { - describe: "Network environment to start", - }) - .positional("GrepTest", { - type: "string", - description: "Pattern to grep test ID/Description to run", - }); - }, - async (argv) => { - process.env.MOON_RUN_SCRIPTS = "true"; - await runNetworkCmd(argv as any); - process.exitCode = 0; - } - ) - .demandCommand(1) - .fail(async (msg) => { - console.log(msg); - await main(); + } +} + +Effect.runPromise(cliStart) + .then((res) => { + Console.log(res); + process.exit(0); }) - .help("h") - .alias("h", "help") - .parse(); + .catch((defect) => { + Console.error(defect); + process.exit(1); + }); diff --git a/packages/cli/src/cmds/runTests.ts b/packages/cli/src/cmds/runTests.ts index 5c621f70..a3dedd1b 100644 --- a/packages/cli/src/cmds/runTests.ts +++ b/packages/cli/src/cmds/runTests.ts @@ -6,7 +6,7 @@ import { startVitest } from "vitest/node"; import { clearNodeLogs } from "../internal/cmdFunctions/tempLogs"; import { commonChecks } from "../internal/launcherCommon"; import { cacheConfig, importAsyncConfig, loadEnvVars } from "../lib/configReader"; -import { contextCreator, runNetworkOnly } from "../lib/globalContext"; +import { MoonwallContext, contextCreator, runNetworkOnly } from "../lib/globalContext"; export async function testCmd(envName: string, additionalArgs?: object): Promise { await cacheConfig(); @@ -37,10 +37,10 @@ export async function testCmd(envName: string, additionalArgs?: object): Promise if (failed.length === 0) { console.log("✅ All tests passed"); - process.exit(0); + return true; } else { console.log("❌ Some tests failed"); - process.exit(1); + return false; } } @@ -68,7 +68,7 @@ export async function executeTests(env: Environment, additionalArgs?: object) { const { rtVersion, rtName } = Object.values(chainData[0])[0]; process.env.MOON_RTVERSION = rtVersion; process.env.MOON_RTNAME = rtName; - await ctx.disconnect(); + await MoonwallContext.destroy(); } catch { // No chain to test against } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b13e3c63..9816a628 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -117,6 +117,9 @@ importers: dotenv: specifier: ^16.3.1 version: 16.3.1 + effect: + specifier: 2.0.0-next.54 + version: 2.0.0-next.54 ethers: specifier: ^6.8.1 version: 6.8.1 @@ -3345,6 +3348,10 @@ packages: resolution: {integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==} engines: {node: '>=12'} + /effect@2.0.0-next.54: + resolution: {integrity: sha512-qROhKMxlm6fpa90YRfWSgKeelDfhaDq2igPK+pIKupGehiCnZH4vd2qrY71HVZ10qZgXxh0VXpGyDQxJC+EQqw==} + dev: false + /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} From 24950feabaaa56c7dc7366884cfa08c4d3ba2753 Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Sun, 12 Nov 2023 18:11:43 +0000 Subject: [PATCH 27/41] progress on switchover --- packages/cli/src/cmds/entrypoint.ts | 266 +++++++++++++++------------ test/configs/moonwall.config | 78 ++++++++ test/configs/moonwall.config.mjs.bak | 27 --- 3 files changed, 227 insertions(+), 144 deletions(-) create mode 100644 test/configs/moonwall.config delete mode 100644 test/configs/moonwall.config.mjs.bak diff --git a/packages/cli/src/cmds/entrypoint.ts b/packages/cli/src/cmds/entrypoint.ts index 1a4e7176..26b1e656 100755 --- a/packages/cli/src/cmds/entrypoint.ts +++ b/packages/cli/src/cmds/entrypoint.ts @@ -16,128 +16,162 @@ const defaultConfigFiles = ["./moonwall.config", "./moonwall.config.json"]; const defaultConfigFile = findExistingConfig(defaultConfigFiles) || "./moonwall.config.json"; -// Hack to expose config-path to all commands and fallback -const parsed = yargs(hideBin(process.argv)) - .options({ - configFile: { - type: "string", - alias: "c", - description: "path to MoonwallConfig file", - default: defaultConfigFile, - }, - }) - .parseSync(); -process.env.MOON_CONFIG_PATH = parsed.configFile; +const parseConfigFile = () => + Effect.try(() => + yargs(hideBin(process.argv)) + .options({ + configFile: { + type: "string", + alias: "c", + description: "path to MoonwallConfig file", + default: defaultConfigFile, + }, + }) + .parseSync() + ); -const cliStart = Effect.try(() => - yargs(hideBin(process.argv)) - .usage("Usage: $0") - .version("2.0.0") - .options({ - configFile: { - type: "string", - alias: "c", - description: "path to MoonwallConfig file", - default: defaultConfigFile, - }, - }) - .middleware((argv) => { - process.env.MOON_CONFIG_PATH = argv.configFile; - }) - .command(`init`, "Run tests for a given Environment", async () => { - await generateConfig(); - }) - .command( - `download [ver] [path]`, - "Download x86 artifact from GitHub", - (yargs) => { - return yargs - .positional("bin", { - describe: "Name of artifact to download\n[ moonbeam | polkadot | *-runtime ]", - }) - .positional("ver", { - describe: "Artifact version to download", - default: "latest", - }) - .positional("path", { - describe: "Path where to save artifacts", - type: "string", - default: "./", - }) - .option("overwrite", { - describe: "If file exists, should it be overwritten?", - type: "boolean", - alias: "d", - default: true, - }) - .option("output-name", { - describe: "Rename downloaded file to this name", - alias: "o", +const setEnvVar = (key: string, value: string) => + Effect.succeed(() => { + process.env[key] = value; + }); + +const setupConfigFileEnv = pipe( + parseConfigFile(), + Effect.flatMap((parsed) => setEnvVar("MOON_CONFIG_PATH", parsed.configFile)) +); + +const cliStart = pipe( + setupConfigFileEnv, + Effect.flatMap(() => + Effect.try(() => { + const argv = yargs(hideBin(process.argv)) + .usage("Usage: $0") + .version("2.0.0") + .options({ + configFile: { type: "string", - }); - }, - async (argv) => { - await fetchArtifact(argv as any); + alias: "c", + description: "path to MoonwallConfig file", + default: defaultConfigFile, + }, + }) + .parseSync(); + + if (!argv._.length) { + console.log(process.env.MOON_CONFIG_PATH); + return main(); } - ) - .command( - `test [GrepTest]`, - "Run tests for a given Environment", - (yargs) => { - return yargs - .positional("envName", { - describe: "Network environment to run tests against", - array: true, - string: true, + + return ( + yargs(hideBin(process.argv)) + .usage("Usage: $0") + .version("2.0.0") + .options({ + configFile: { + type: "string", + alias: "c", + description: "path to MoonwallConfig file", + default: defaultConfigFile, + }, }) - .positional("GrepTest", { - type: "string", - description: "Pattern to grep test ID/Description to run", - }); - }, - async ({ envName, GrepTest }) => { - const effect = pipe( - Effect.gen(function* (_) { - if (envName) { - yield* _(runTestEffect(envName as any, GrepTest)); - } else { - yield* _(Effect.logError("👉 Run 'pnpm moonwall --help' for more information")); - yield* _(Effect.fail("❌ No environment specified")); + // TODO: Turn this into an effect + .command(`init`, "Run tests for a given Environment", async () => { + await generateConfig(); + }) + // TODO: Turn this into an effect + .command( + `download [ver] [path]`, + "Download x86 artifact from GitHub", + (yargs) => { + return yargs + .positional("bin", { + describe: "Name of artifact to download\n[ moonbeam | polkadot | *-runtime ]", + }) + .positional("ver", { + describe: "Artifact version to download", + default: "latest", + }) + .positional("path", { + describe: "Path where to save artifacts", + type: "string", + default: "./", + }) + .option("overwrite", { + describe: "If file exists, should it be overwritten?", + type: "boolean", + alias: "d", + default: true, + }) + .option("output-name", { + describe: "Rename downloaded file to this name", + alias: "o", + type: "string", + }); + }, + async (argv) => { + await fetchArtifact(argv as any); } - }), - Effect.catchAll((error: any) => Effect.logError(`Error: ${error.message}`)) - ); + ) + .command( + `test [GrepTest]`, + "Run tests for a given Environment", + (yargs) => + yargs + .positional("envName", { + describe: "Network environment to run tests against", + array: true, + string: true, + }) + .positional("GrepTest", { + type: "string", + description: "Pattern to grep test ID/Description to run", + }), + async ({ envName, GrepTest }) => { + const effect = pipe( + Effect.gen(function* (_) { + if (envName) { + yield* _(runTestEffect(envName as any, GrepTest)); + } else { + yield* _(Effect.logError("👉 Run 'pnpm moonwall --help' for more information")); + yield* _(Effect.fail("❌ No environment specified")); + } + }), + Effect.catchAll((error: any) => Effect.logError(`Error: ${error.message}`)) + ); - await Effect.runPromiseExit(effect); - } - ) - .command( - `run [GrepTest]`, - "Start new network found in global config", - (yargs) => { - return yargs - .positional("envName", { - describe: "Network environment to start", - }) - .positional("GrepTest", { - type: "string", - description: "Pattern to grep test ID/Description to run", - }); - }, - async (argv) => { - process.env.MOON_RUN_SCRIPTS = "true"; - await runNetworkCmd(argv as any); - process.exitCode = 0; - } - ) - .demandCommand(1) - .fail(async (msg) => { - Console.error(msg); - await main(); + await Effect.runPromiseExit(effect); + } + ) + // TODO: Turn this into an Effect + .command( + `run [GrepTest]`, + "Start new network found in global config", + (yargs) => + yargs + .positional("envName", { + describe: "Network environment to start", + }) + .positional("GrepTest", { + type: "string", + description: "Pattern to grep test ID/Description to run", + }), + async (argv) => { + process.env.MOON_RUN_SCRIPTS = "true"; + await runNetworkCmd(argv as any); + process.exitCode = 0; + } + ) + // .demandCommand(1) + // .fail(async (msg) => { + // Console.error(msg); + // await main(); + // }) + .help("h") + .alias("h", "help") + .parse() + ); }) - .help("h") - .alias("h", "help") - .parse() + ) ); const runTestEffect = (envName: string, grepTest?: string) => @@ -151,8 +185,6 @@ const runTestEffect = (envName: string, grepTest?: string) => ) ); -const setEnvVar = (key: string, value: string) => Effect.succeed(() => (process.env[key] = value)); - function findExistingConfig(files: string[]): string | undefined { for (const file of files) { if (fs.existsSync(file)) { diff --git a/test/configs/moonwall.config b/test/configs/moonwall.config new file mode 100644 index 00000000..a29db1b4 --- /dev/null +++ b/test/configs/moonwall.config @@ -0,0 +1,78 @@ +{ + "label": "Global Test Config 🐯", + "defaultTestTimeout": 60000, + "scriptsDir": "scripts/", + + "environments": [ + { + "name": "viem_test", + "testFileDir": ["suites/viem"], + "envVars": [""], + "foundation": { + "type": "read_only" + }, + "connections": [ + { + "name": "viem", + "type": "viem", + "endpoints": ["wss://wss.api.moonbeam.network"] + } + ] + }, + + { + "name": "basic2", + "description": "Suite of tests that doesnt involve any blockchain stuff", + "testFileDir": ["suites/basic/"], + "foundation": { + "type": "read_only" + }, + "runScripts": [ + "compile-contracts.ts compile -p contracts/precompiles", + "greeting.js", + "shelley_prose.sh" + ], + "connections": [] + }, + + { + "name": "moonriver_smoke", + "testFileDir": ["suites/dummy-smoke/"], + "include": ["**/*conditional*"], + "foundation": { + "type": "read_only" + }, + "connections": [ + { + "name": "MB", + "type": "polkadotJs", + "endpoints": ["wss://wss.api.moonriver.moonbeam.network"] + } + ] + }, + { + "name": "chop_state_test", + "testFileDir": ["suites/chopsticks/"], + "include": ["**/*state*"], + "foundation": { + "type": "chopsticks", + "launchSpec": [ + { + "name": "mb", + "type": "parachain", + "running": false, + "buildBlockMode": "manual", + "configPath": "./configs/moonbeamChopsticks.yml" + } + ] + }, + "connections": [ + { + "name": "MB", + "type": "polkadotJs", + "endpoints": ["ws://127.0.0.1:12000"] + } + ] + } + ] +} diff --git a/test/configs/moonwall.config.mjs.bak b/test/configs/moonwall.config.mjs.bak deleted file mode 100644 index 33c4f9a2..00000000 --- a/test/configs/moonwall.config.mjs.bak +++ /dev/null @@ -1,27 +0,0 @@ -// import { MoonwallConfig } from "moonwall"; - -export default function config() { - return { - label: "moonwall_config", - defaultTestTimeout: 30000, - environments: [ - { - name: "default_env", - testFileDir: ["tests/"], - foundation: { - type: "read_only", - // Provide additional config here if you are starting a new network - }, - connections: [ - { - name: "eth", - type: "ethers", - endpoints: ["wss://moonbeam.api.onfinality.io/public-ws"], - }, - ], - }, - // Add additional environments as required - ], - }; - } - \ No newline at end of file From ea0a7021dadfb7943b368e42dc17cf9ae57f808c Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Mon, 13 Nov 2023 09:59:20 +0000 Subject: [PATCH 28/41] Fix config mgmt --- packages/cli/src/cmds/entrypoint.ts | 299 ++++++++++++++-------------- 1 file changed, 145 insertions(+), 154 deletions(-) diff --git a/packages/cli/src/cmds/entrypoint.ts b/packages/cli/src/cmds/entrypoint.ts index 26b1e656..c858ed53 100755 --- a/packages/cli/src/cmds/entrypoint.ts +++ b/packages/cli/src/cmds/entrypoint.ts @@ -14,11 +14,59 @@ dotenv.config(); const defaultConfigFiles = ["./moonwall.config", "./moonwall.config.json"]; +const findExistingConfig = (files: string[]): string | undefined => { + for (const file of files) { + if (fs.existsSync(file)) { + return file; + } + } +}; + const defaultConfigFile = findExistingConfig(defaultConfigFiles) || "./moonwall.config.json"; -const parseConfigFile = () => - Effect.try(() => +const parseConfigFile = Effect.sync(() => + yargs(hideBin(process.argv)) + .options({ + configFile: { + type: "string", + alias: "c", + description: "path to MoonwallConfig file", + default: defaultConfigFile, + }, + }) + .parseSync() +); + +const setEnvVar = (key: string, value: string) => Effect.sync(() => (process.env[key] = value)); + +const setupConfigFileEnv = pipe( + parseConfigFile, + Effect.flatMap((parsed) => setEnvVar("MOON_CONFIG_PATH", parsed.configFile)) +); + +const cliStart = Effect.try(() => { + const argv = yargs(hideBin(process.argv)) + .usage("Usage: $0") + .version("2.0.0") + .options({ + configFile: { + type: "string", + alias: "c", + description: "path to MoonwallConfig file", + default: defaultConfigFile, + }, + }) + .parseSync(); + + if (!argv._.length) { + console.log(process.env.MOON_CONFIG_PATH); + return main(); + } + + return ( yargs(hideBin(process.argv)) + .usage("Usage: $0") + .version("2.0.0") .options({ configFile: { type: "string", @@ -27,152 +75,98 @@ const parseConfigFile = () => default: defaultConfigFile, }, }) - .parseSync() - ); - -const setEnvVar = (key: string, value: string) => - Effect.succeed(() => { - process.env[key] = value; - }); - -const setupConfigFileEnv = pipe( - parseConfigFile(), - Effect.flatMap((parsed) => setEnvVar("MOON_CONFIG_PATH", parsed.configFile)) -); - -const cliStart = pipe( - setupConfigFileEnv, - Effect.flatMap(() => - Effect.try(() => { - const argv = yargs(hideBin(process.argv)) - .usage("Usage: $0") - .version("2.0.0") - .options({ - configFile: { - type: "string", - alias: "c", - description: "path to MoonwallConfig file", - default: defaultConfigFile, - }, - }) - .parseSync(); - - if (!argv._.length) { - console.log(process.env.MOON_CONFIG_PATH); - return main(); - } - - return ( - yargs(hideBin(process.argv)) - .usage("Usage: $0") - .version("2.0.0") - .options({ - configFile: { + // TODO: Turn this into an effect + .command(`init`, "Run tests for a given Environment", async () => { + await generateConfig(); + }) + // TODO: Turn this into an effect + .command( + `download [ver] [path]`, + "Download x86 artifact from GitHub", + (yargs) => { + return yargs + .positional("bin", { + describe: "Name of artifact to download\n[ moonbeam | polkadot | *-runtime ]", + }) + .positional("ver", { + describe: "Artifact version to download", + default: "latest", + }) + .positional("path", { + describe: "Path where to save artifacts", + type: "string", + default: "./", + }) + .option("overwrite", { + describe: "If file exists, should it be overwritten?", + type: "boolean", + alias: "d", + default: true, + }) + .option("output-name", { + describe: "Rename downloaded file to this name", + alias: "o", + type: "string", + }); + }, + async (argv) => { + await fetchArtifact(argv as any); + } + ) + .command( + `test [GrepTest]`, + "Run tests for a given Environment", + (yargs) => + yargs + .positional("envName", { + describe: "Network environment to run tests against", + array: true, + string: true, + }) + .positional("GrepTest", { type: "string", - alias: "c", - description: "path to MoonwallConfig file", - default: defaultConfigFile, - }, - }) - // TODO: Turn this into an effect - .command(`init`, "Run tests for a given Environment", async () => { - await generateConfig(); - }) - // TODO: Turn this into an effect - .command( - `download [ver] [path]`, - "Download x86 artifact from GitHub", - (yargs) => { - return yargs - .positional("bin", { - describe: "Name of artifact to download\n[ moonbeam | polkadot | *-runtime ]", - }) - .positional("ver", { - describe: "Artifact version to download", - default: "latest", - }) - .positional("path", { - describe: "Path where to save artifacts", - type: "string", - default: "./", - }) - .option("overwrite", { - describe: "If file exists, should it be overwritten?", - type: "boolean", - alias: "d", - default: true, - }) - .option("output-name", { - describe: "Rename downloaded file to this name", - alias: "o", - type: "string", - }); - }, - async (argv) => { - await fetchArtifact(argv as any); - } - ) - .command( - `test [GrepTest]`, - "Run tests for a given Environment", - (yargs) => - yargs - .positional("envName", { - describe: "Network environment to run tests against", - array: true, - string: true, - }) - .positional("GrepTest", { - type: "string", - description: "Pattern to grep test ID/Description to run", - }), - async ({ envName, GrepTest }) => { - const effect = pipe( - Effect.gen(function* (_) { - if (envName) { - yield* _(runTestEffect(envName as any, GrepTest)); - } else { - yield* _(Effect.logError("👉 Run 'pnpm moonwall --help' for more information")); - yield* _(Effect.fail("❌ No environment specified")); - } - }), - Effect.catchAll((error: any) => Effect.logError(`Error: ${error.message}`)) - ); + description: "Pattern to grep test ID/Description to run", + }), + async ({ envName, GrepTest }) => { + const effect = pipe( + Effect.gen(function* (_) { + if (envName) { + yield* _(runTestEffect(envName as any, GrepTest)); + } else { + yield* _(Effect.logError("👉 Run 'pnpm moonwall --help' for more information")); + yield* _(Effect.fail("❌ No environment specified")); + } + }), + Effect.catchAll((error: any) => Effect.logError(`Error: ${error.message}`)) + ); - await Effect.runPromiseExit(effect); - } - ) - // TODO: Turn this into an Effect - .command( - `run [GrepTest]`, - "Start new network found in global config", - (yargs) => - yargs - .positional("envName", { - describe: "Network environment to start", - }) - .positional("GrepTest", { - type: "string", - description: "Pattern to grep test ID/Description to run", - }), - async (argv) => { - process.env.MOON_RUN_SCRIPTS = "true"; - await runNetworkCmd(argv as any); - process.exitCode = 0; - } - ) - // .demandCommand(1) - // .fail(async (msg) => { - // Console.error(msg); - // await main(); - // }) - .help("h") - .alias("h", "help") - .parse() - ); - }) - ) -); + await Effect.runPromiseExit(effect); + } + ) + // TODO: Turn this into an Effect + .command( + `run [GrepTest]`, + "Start new network found in global config", + (yargs) => + yargs + .positional("envName", { + describe: "Network environment to start", + }) + .positional("GrepTest", { + type: "string", + description: "Pattern to grep test ID/Description to run", + }), + async (argv) => { + process.env.MOON_RUN_SCRIPTS = "true"; + await runNetworkCmd(argv as any); + process.exitCode = 0; + } + ) + .help("h") + .alias("h", "help") + .parse() + ); +}); const runTestEffect = (envName: string, grepTest?: string) => pipe( @@ -185,15 +179,12 @@ const runTestEffect = (envName: string, grepTest?: string) => ) ); -function findExistingConfig(files: string[]): string | undefined { - for (const file of files) { - if (fs.existsSync(file)) { - return file; - } - } -} +const cli = setupConfigFileEnv.pipe( + Effect.flatMap(() => cliStart), + Effect.catchAll((error: any) => Effect.logError(`Error: ${error.message}`)) +); -Effect.runPromise(cliStart) +Effect.runPromise(cli) .then((res) => { Console.log(res); process.exit(0); From 4048b276a7592d1935aa20c051bf0f37e47262ba Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Mon, 13 Nov 2023 11:33:59 +0000 Subject: [PATCH 29/41] effect'd run cmd --- packages/cli/src/cmds/entrypoint.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/cli/src/cmds/entrypoint.ts b/packages/cli/src/cmds/entrypoint.ts index c858ed53..8e9ff092 100755 --- a/packages/cli/src/cmds/entrypoint.ts +++ b/packages/cli/src/cmds/entrypoint.ts @@ -10,6 +10,7 @@ import { fetchArtifact } from "../internal/cmdFunctions/fetchArtifact"; import dotenv from "dotenv"; import { Effect, Console, pipe } from "effect"; import { main } from "./main"; +import { set } from "effect/HashMap"; dotenv.config(); const defaultConfigFiles = ["./moonwall.config", "./moonwall.config.json"]; @@ -59,7 +60,6 @@ const cliStart = Effect.try(() => { .parseSync(); if (!argv._.length) { - console.log(process.env.MOON_CONFIG_PATH); return main(); } @@ -143,7 +143,6 @@ const cliStart = Effect.try(() => { await Effect.runPromiseExit(effect); } ) - // TODO: Turn this into an Effect .command( `run [GrepTest]`, "Start new network found in global config", @@ -157,8 +156,12 @@ const cliStart = Effect.try(() => { description: "Pattern to grep test ID/Description to run", }), async (argv) => { - process.env.MOON_RUN_SCRIPTS = "true"; - await runNetworkCmd(argv as any); + const effect = Effect.gen(function* (_) { + yield* _(setEnvVar("MOON_RUN_SCRIPTS", "true")); + yield* _(Effect.tryPromise(() => runNetworkCmd(argv as any))); + }); + + await Effect.runPromise(effect); process.exitCode = 0; } ) @@ -179,7 +182,8 @@ const runTestEffect = (envName: string, grepTest?: string) => ) ); -const cli = setupConfigFileEnv.pipe( +const cli = pipe( + setupConfigFileEnv, Effect.flatMap(() => cliStart), Effect.catchAll((error: any) => Effect.logError(`Error: ${error.message}`)) ); From 70ec38caeabc57d979f0443a07804de3fe831a94 Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Mon, 13 Nov 2023 11:57:36 +0000 Subject: [PATCH 30/41] lint --- packages/cli/src/cmds/entrypoint.ts | 209 ++++++++++++++-------------- 1 file changed, 105 insertions(+), 104 deletions(-) diff --git a/packages/cli/src/cmds/entrypoint.ts b/packages/cli/src/cmds/entrypoint.ts index 8e9ff092..8fbf430b 100755 --- a/packages/cli/src/cmds/entrypoint.ts +++ b/packages/cli/src/cmds/entrypoint.ts @@ -10,7 +10,6 @@ import { fetchArtifact } from "../internal/cmdFunctions/fetchArtifact"; import dotenv from "dotenv"; import { Effect, Console, pipe } from "effect"; import { main } from "./main"; -import { set } from "effect/HashMap"; dotenv.config(); const defaultConfigFiles = ["./moonwall.config", "./moonwall.config.json"]; @@ -63,112 +62,114 @@ const cliStart = Effect.try(() => { return main(); } - return ( - yargs(hideBin(process.argv)) - .usage("Usage: $0") - .version("2.0.0") - .options({ - configFile: { - type: "string", - alias: "c", - description: "path to MoonwallConfig file", - default: defaultConfigFile, - }, - }) - // TODO: Turn this into an effect - .command(`init`, "Run tests for a given Environment", async () => { - await generateConfig(); - }) - // TODO: Turn this into an effect - .command( - `download [ver] [path]`, - "Download x86 artifact from GitHub", - (yargs) => { - return yargs - .positional("bin", { - describe: "Name of artifact to download\n[ moonbeam | polkadot | *-runtime ]", - }) - .positional("ver", { - describe: "Artifact version to download", - default: "latest", - }) - .positional("path", { - describe: "Path where to save artifacts", - type: "string", - default: "./", - }) - .option("overwrite", { - describe: "If file exists, should it be overwritten?", - type: "boolean", - alias: "d", - default: true, - }) - .option("output-name", { - describe: "Rename downloaded file to this name", - alias: "o", - type: "string", - }); - }, - async (argv) => { - await fetchArtifact(argv as any); - } - ) - .command( - `test [GrepTest]`, - "Run tests for a given Environment", - (yargs) => - yargs - .positional("envName", { - describe: "Network environment to run tests against", - array: true, - string: true, - }) - .positional("GrepTest", { - type: "string", - description: "Pattern to grep test ID/Description to run", - }), - async ({ envName, GrepTest }) => { - const effect = pipe( - Effect.gen(function* (_) { - if (envName) { - yield* _(runTestEffect(envName as any, GrepTest)); - } else { - yield* _(Effect.logError("👉 Run 'pnpm moonwall --help' for more information")); - yield* _(Effect.fail("❌ No environment specified")); - } - }), - Effect.catchAll((error: any) => Effect.logError(`Error: ${error.message}`)) - ); + return yargs(hideBin(process.argv)) + .usage("Usage: $0") + .version("2.0.0") + .options({ + configFile: { + type: "string", + alias: "c", + description: "path to MoonwallConfig file", + default: defaultConfigFile, + }, + }) + .command(`init`, "Run tests for a given Environment", async () => { + const effect = Effect.gen(function* (_) { + yield* _(Effect.tryPromise(() => generateConfig())); + }); - await Effect.runPromiseExit(effect); - } - ) - .command( - `run [GrepTest]`, - "Start new network found in global config", - (yargs) => - yargs - .positional("envName", { - describe: "Network environment to start", - }) - .positional("GrepTest", { - type: "string", - description: "Pattern to grep test ID/Description to run", - }), - async (argv) => { - const effect = Effect.gen(function* (_) { - yield* _(setEnvVar("MOON_RUN_SCRIPTS", "true")); - yield* _(Effect.tryPromise(() => runNetworkCmd(argv as any))); + await Effect.runPromise(effect); + }) + .command( + `download [ver] [path]`, + "Download x86 artifact from GitHub", + (yargs) => { + return yargs + .positional("bin", { + describe: "Name of artifact to download\n[ moonbeam | polkadot | *-runtime ]", + }) + .positional("ver", { + describe: "Artifact version to download", + default: "latest", + }) + .positional("path", { + describe: "Path where to save artifacts", + type: "string", + default: "./", + }) + .option("overwrite", { + describe: "If file exists, should it be overwritten?", + type: "boolean", + alias: "d", + default: true, + }) + .option("output-name", { + describe: "Rename downloaded file to this name", + alias: "o", + type: "string", }); + }, + async (argv) => { + const effect = Effect.gen(function* (_) { + yield* _(Effect.tryPromise(() => fetchArtifact(argv as any))); + }); + await Effect.runPromise(effect); + } + ) + .command( + `test [GrepTest]`, + "Run tests for a given Environment", + (yargs) => + yargs + .positional("envName", { + describe: "Network environment to run tests against", + array: true, + string: true, + }) + .positional("GrepTest", { + type: "string", + description: "Pattern to grep test ID/Description to run", + }), + async ({ envName, GrepTest }) => { + const effect = pipe( + Effect.gen(function* (_) { + if (envName) { + yield* _(runTestEffect(envName as any, GrepTest)); + } else { + yield* _(Effect.logError("👉 Run 'pnpm moonwall --help' for more information")); + yield* _(Effect.fail("❌ No environment specified")); + } + }), + Effect.catchAll((error: any) => Effect.logError(`Error: ${error.message}`)) + ); - await Effect.runPromise(effect); - process.exitCode = 0; - } - ) - .help("h") - .alias("h", "help") - .parse() - ); + await Effect.runPromiseExit(effect); + } + ) + .command( + `run [GrepTest]`, + "Start new network found in global config", + (yargs) => + yargs + .positional("envName", { + describe: "Network environment to start", + }) + .positional("GrepTest", { + type: "string", + description: "Pattern to grep test ID/Description to run", + }), + async (argv) => { + const effect = Effect.gen(function* (_) { + yield* _(setEnvVar("MOON_RUN_SCRIPTS", "true")); + yield* _(Effect.tryPromise(() => runNetworkCmd(argv as any))); + }); + + await Effect.runPromise(effect); + } + ) + .help("h") + .alias("h", "help") + .parse(); }); const runTestEffect = (envName: string, grepTest?: string) => From f53a25fd0248b7f8bb0fb315dffabb07565c3622 Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Mon, 13 Nov 2023 13:22:53 +0000 Subject: [PATCH 31/41] fibre runtime --- .changeset/itchy-yaks-listen.md | 7 +++++++ .../src/internal/foundations/devModeHelpers.ts | 3 +++ packages/util/src/functions/viem.ts | 18 +++++++++++++++--- 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 .changeset/itchy-yaks-listen.md diff --git a/.changeset/itchy-yaks-listen.md b/.changeset/itchy-yaks-listen.md new file mode 100644 index 00000000..9e2f3214 --- /dev/null +++ b/.changeset/itchy-yaks-listen.md @@ -0,0 +1,7 @@ +--- +"@moonwall/util": minor +"@moonwall/cli": minor +"@moonwall/tests": minor +--- + +Switched to Fibre-based Runtime diff --git a/packages/cli/src/internal/foundations/devModeHelpers.ts b/packages/cli/src/internal/foundations/devModeHelpers.ts index a3cc66f1..f4a9bf64 100644 --- a/packages/cli/src/internal/foundations/devModeHelpers.ts +++ b/packages/cli/src/internal/foundations/devModeHelpers.ts @@ -167,7 +167,10 @@ export async function createDevBlock< } await setTimeout(10); } + // TODO: Investigate why extra time needed + await setTimeout(100); } + const actualEvents = result.flatMap((resp) => resp.events); diff --git a/packages/util/src/functions/viem.ts b/packages/util/src/functions/viem.ts index 4300cc8a..18e45445 100644 --- a/packages/util/src/functions/viem.ts +++ b/packages/util/src/functions/viem.ts @@ -14,6 +14,7 @@ import { hexToNumber, http, } from "viem"; +import { setTimeout as timer } from "timers/promises"; import { privateKeyToAccount } from "viem/accounts"; import { Chain } from "viem/chains"; import { ALITH_ADDRESS, ALITH_PRIVATE_KEY } from "../constants/accounts"; @@ -160,9 +161,20 @@ export async function deployViemContract Date: Mon, 13 Nov 2023 13:50:37 +0000 Subject: [PATCH 32/41] fmt --- packages/cli/src/cmds/entrypoint.ts | 4 ++-- packages/cli/src/internal/foundations/devModeHelpers.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/cmds/entrypoint.ts b/packages/cli/src/cmds/entrypoint.ts index 8fbf430b..17b140dd 100755 --- a/packages/cli/src/cmds/entrypoint.ts +++ b/packages/cli/src/cmds/entrypoint.ts @@ -134,7 +134,7 @@ const cliStart = Effect.try(() => { const effect = pipe( Effect.gen(function* (_) { if (envName) { - yield* _(runTestEffect(envName as any, GrepTest)); + return yield* _(runTestEffect(envName as any, GrepTest)); } else { yield* _(Effect.logError("👉 Run 'pnpm moonwall --help' for more information")); yield* _(Effect.fail("❌ No environment specified")); @@ -143,7 +143,7 @@ const cliStart = Effect.try(() => { Effect.catchAll((error: any) => Effect.logError(`Error: ${error.message}`)) ); - await Effect.runPromiseExit(effect); + await Effect.runPromise(effect); } ) .command( diff --git a/packages/cli/src/internal/foundations/devModeHelpers.ts b/packages/cli/src/internal/foundations/devModeHelpers.ts index f4a9bf64..710757ff 100644 --- a/packages/cli/src/internal/foundations/devModeHelpers.ts +++ b/packages/cli/src/internal/foundations/devModeHelpers.ts @@ -170,7 +170,6 @@ export async function createDevBlock< // TODO: Investigate why extra time needed await setTimeout(100); } - const actualEvents = result.flatMap((resp) => resp.events); From d3d0081cfccd12407223f6230761613be7b92438 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 13 Nov 2023 14:03:08 +0000 Subject: [PATCH 33/41] Version Packages --- .changeset/itchy-yaks-listen.md | 7 ------- docs/CHANGELOG.md | 2 ++ docs/package.json | 2 +- packages/cli/CHANGELOG.md | 12 ++++++++++++ packages/cli/package.json | 2 +- packages/types/CHANGELOG.md | 2 ++ packages/types/package.json | 2 +- packages/util/CHANGELOG.md | 10 ++++++++++ packages/util/package.json | 2 +- test/CHANGELOG.md | 6 ++++++ test/package.json | 2 +- 11 files changed, 37 insertions(+), 12 deletions(-) delete mode 100644 .changeset/itchy-yaks-listen.md diff --git a/.changeset/itchy-yaks-listen.md b/.changeset/itchy-yaks-listen.md deleted file mode 100644 index 9e2f3214..00000000 --- a/.changeset/itchy-yaks-listen.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@moonwall/util": minor -"@moonwall/cli": minor -"@moonwall/tests": minor ---- - -Switched to Fibre-based Runtime diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 36b0a50a..004ecc3d 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,7 @@ # @moonwall/docs +## 4.4.0 + ## 4.3.5 ## 4.3.4 diff --git a/docs/package.json b/docs/package.json index 9c67a54d..b1a70919 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/docs", "type": "module", - "version": "4.3.5", + "version": "4.4.0", "private": true, "description": "Testing framework for the Moon family of projects", "scripts": { diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index b52af9f0..c807656a 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,17 @@ # @moonwall/cli +## 4.4.0 + +### Minor Changes + +- f53a25f: Switched to Fibre-based Runtime + +### Patch Changes + +- Updated dependencies [f53a25f] + - @moonwall/util@4.4.0 + - @moonwall/types@4.4.0 + ## 4.3.5 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 97ebada3..9dae5efc 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/cli", "type": "module", - "version": "4.3.5", + "version": "4.4.0", "description": "Testing framework for the Moon family of projects", "author": "timbrinded", "license": "ISC", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index dac5f66f..3eb62971 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,5 +1,7 @@ # @moonwall/types +## 4.4.0 + ## 4.3.5 ### Patch Changes diff --git a/packages/types/package.json b/packages/types/package.json index d7b5c9aa..da57e8db 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/types", "type": "module", - "version": "4.3.5", + "version": "4.4.0", "description": "Testing framework for the Moon family of projects", "author": "timbrinded", "license": "ISC", diff --git a/packages/util/CHANGELOG.md b/packages/util/CHANGELOG.md index 4f2f22e7..2f2eaa33 100644 --- a/packages/util/CHANGELOG.md +++ b/packages/util/CHANGELOG.md @@ -1,5 +1,15 @@ # @moonwall/util +## 4.4.0 + +### Minor Changes + +- f53a25f: Switched to Fibre-based Runtime + +### Patch Changes + +- @moonwall/types@4.4.0 + ## 4.3.5 ### Patch Changes diff --git a/packages/util/package.json b/packages/util/package.json index da547d79..ceec67eb 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/util", "type": "module", - "version": "4.3.5", + "version": "4.4.0", "description": "Testing framework for the Moon family of projects", "author": "timbrinded", "license": "ISC", diff --git a/test/CHANGELOG.md b/test/CHANGELOG.md index 42ef207d..d9dde10a 100644 --- a/test/CHANGELOG.md +++ b/test/CHANGELOG.md @@ -1,5 +1,11 @@ # @moonwall/tests +## 4.4.0 + +### Minor Changes + +- f53a25f: Switched to Fibre-based Runtime + ## 4.3.5 ### Patch Changes diff --git a/test/package.json b/test/package.json index 7851ba34..5f75bfa6 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/tests", "type": "module", - "version": "4.3.5", + "version": "4.4.0", "private": true, "packageManager": "pnpm@7.23.0", "description": "Testing framework for the Moon family of projects", From 4226ef917598fe58ef69f34c7b50c6522ee8bfd2 Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Mon, 13 Nov 2023 16:41:45 +0000 Subject: [PATCH 34/41] updated test fns --- packages/cli/src/cmds/entrypoint.ts | 35 +++++++++------------- packages/cli/src/cmds/runTests.ts | 45 +++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 21 deletions(-) diff --git a/packages/cli/src/cmds/entrypoint.ts b/packages/cli/src/cmds/entrypoint.ts index 17b140dd..7adfb006 100755 --- a/packages/cli/src/cmds/entrypoint.ts +++ b/packages/cli/src/cmds/entrypoint.ts @@ -3,7 +3,7 @@ import "@moonbeam-network/api-augment"; import yargs from "yargs"; import fs from "fs"; import { hideBin } from "yargs/helpers"; -import { testCmd } from "./runTests"; +import { testEffect } from "./runTests"; import { runNetworkCmd } from "./runNetwork"; import { generateConfig } from "../internal/cmdFunctions/initialisation"; import { fetchArtifact } from "../internal/cmdFunctions/fetchArtifact"; @@ -119,6 +119,7 @@ const cliStart = Effect.try(() => { .command( `test [GrepTest]`, "Run tests for a given Environment", + (yargs) => yargs .positional("envName", { @@ -130,18 +131,19 @@ const cliStart = Effect.try(() => { type: "string", description: "Pattern to grep test ID/Description to run", }), + async ({ envName, GrepTest }) => { - const effect = pipe( + const effect = Effect.all([ + setEnvVar("MOON_RUN_SCRIPTS", "true"), Effect.gen(function* (_) { if (envName) { - return yield* _(runTestEffect(envName as any, GrepTest)); + return yield* _(testEffect(envName as any, { testNamePattern: GrepTest })); } else { yield* _(Effect.logError("👉 Run 'pnpm moonwall --help' for more information")); - yield* _(Effect.fail("❌ No environment specified")); + return yield* _(Effect.fail("❌ No environment specified")); } }), - Effect.catchAll((error: any) => Effect.logError(`Error: ${error.message}`)) - ); + ]); await Effect.runPromise(effect); } @@ -159,10 +161,12 @@ const cliStart = Effect.try(() => { description: "Pattern to grep test ID/Description to run", }), async (argv) => { - const effect = Effect.gen(function* (_) { - yield* _(setEnvVar("MOON_RUN_SCRIPTS", "true")); - yield* _(Effect.tryPromise(() => runNetworkCmd(argv as any))); - }); + const effect = Effect.all([ + setEnvVar("MOON_RUN_SCRIPTS", "true"), + Effect.gen(function* (_) { + yield* _(Effect.tryPromise(() => runNetworkCmd(argv as any))); + }), + ]); await Effect.runPromise(effect); } @@ -172,17 +176,6 @@ const cliStart = Effect.try(() => { .parse(); }); -const runTestEffect = (envName: string, grepTest?: string) => - pipe( - setEnvVar("MOON_RUN_SCRIPTS", "true"), - Effect.flatMap(() => Effect.tryPromise(() => testCmd(envName, { testNamePattern: grepTest }))), - Effect.tap((result) => - Effect.succeed(() => { - process.exitCode = result ? 0 : 1; - }) - ) - ); - const cli = pipe( setupConfigFileEnv, Effect.flatMap(() => cliStart), diff --git a/packages/cli/src/cmds/runTests.ts b/packages/cli/src/cmds/runTests.ts index a3dedd1b..05870fbf 100644 --- a/packages/cli/src/cmds/runTests.ts +++ b/packages/cli/src/cmds/runTests.ts @@ -1,6 +1,7 @@ import { Environment } from "@moonwall/types"; import chalk from "chalk"; import path from "path"; +import { Effect } from "effect"; import type { UserConfig, Vitest } from "vitest"; import { startVitest } from "vitest/node"; import { clearNodeLogs } from "../internal/cmdFunctions/tempLogs"; @@ -8,6 +9,50 @@ import { commonChecks } from "../internal/launcherCommon"; import { cacheConfig, importAsyncConfig, loadEnvVars } from "../lib/configReader"; import { MoonwallContext, contextCreator, runNetworkOnly } from "../lib/globalContext"; +export const testEffect = (envName: string, additionalArgs?: object) => { + return Effect.gen(function* (_) { + yield* _(Effect.tryPromise(() => cacheConfig())); + const globalConfig = yield* _(Effect.tryPromise(() => importAsyncConfig())); + const env = yield* _( + Effect.sync(() => globalConfig.environments.find(({ name }) => name === envName)!) + ); + yield* _(Effect.sync(() => (process.env.MOON_TEST_ENV = envName))); + + if (!env) { + const envList = yield* _(Effect.sync(() => globalConfig.environments.map((env) => env.name))); + return Effect.fail( + `No environment found in config for: ${chalk.bgWhiteBright.blackBright( + envName + )}\n Environments defined in config are: ${envList}\n` + ); + } + + yield* _(Effect.sync(() => loadEnvVars())); + yield* _(Effect.promise(() => commonChecks(env))); + + if ( + (env.foundation.type == "dev" && !env.foundation.launchSpec[0].retainAllLogs) || + (env.foundation.type == "chopsticks" && !env.foundation.launchSpec[0].retainAllLogs) + ) { + yield* _(Effect.sync(() => clearNodeLogs())); + } + const vitest = yield* _(Effect.promise(() => executeTests(env, additionalArgs))); + const failed = yield* _( + Effect.sync(() => vitest!.state.getFiles().filter((file) => file.result!.state === "fail")) + ); + + if (failed.length === 0) { + console.log("✅ All tests passed"); + Effect.logInfo("✅ All tests passed"); + return true; + } else { + console.log("❌ Some tests failed"); + Effect.logInfo("❌ Some tests failed"); + return Effect.fail("❌ Some tests failed"); + } + }); +}; + export async function testCmd(envName: string, additionalArgs?: object): Promise { await cacheConfig(); const globalConfig = await importAsyncConfig(); From 474b83e7eebe0838289b634887a973d54cc3ae3d Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Tue, 14 Nov 2023 11:01:08 +0000 Subject: [PATCH 35/41] added Effect Error shortcircuits --- packages/cli/src/cmds/runTests.ts | 65 ++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 19 deletions(-) diff --git a/packages/cli/src/cmds/runTests.ts b/packages/cli/src/cmds/runTests.ts index 05870fbf..a2406712 100644 --- a/packages/cli/src/cmds/runTests.ts +++ b/packages/cli/src/cmds/runTests.ts @@ -9,26 +9,55 @@ import { commonChecks } from "../internal/launcherCommon"; import { cacheConfig, importAsyncConfig, loadEnvVars } from "../lib/configReader"; import { MoonwallContext, contextCreator, runNetworkOnly } from "../lib/globalContext"; +class EnvironmentMissingError { + readonly _tag = "EnvironmentMissingError"; + constructor(readonly env: string) {} +} + +class TestsFailedError { + readonly _tag = "TestsFailedError"; +} + +class CommonCheckError { + readonly _tag = "CommonCheckError"; +} + +class ConfigError { + readonly _tag = "ConfigError"; +} + export const testEffect = (envName: string, additionalArgs?: object) => { return Effect.gen(function* (_) { - yield* _(Effect.tryPromise(() => cacheConfig())); - const globalConfig = yield* _(Effect.tryPromise(() => importAsyncConfig())); - const env = yield* _( - Effect.sync(() => globalConfig.environments.find(({ name }) => name === envName)!) + yield* _( + Effect.tryPromise({ + try: () => cacheConfig(), + catch: () => new ConfigError(), + }) + ); + const globalConfig = yield* _( + Effect.tryPromise({ + try: () => importAsyncConfig(), + catch: () => new ConfigError(), + }) ); - yield* _(Effect.sync(() => (process.env.MOON_TEST_ENV = envName))); - if (!env) { - const envList = yield* _(Effect.sync(() => globalConfig.environments.map((env) => env.name))); - return Effect.fail( - `No environment found in config for: ${chalk.bgWhiteBright.blackBright( - envName - )}\n Environments defined in config are: ${envList}\n` - ); - } + const env = yield* _( + Effect.filterOrFail( + Effect.sync(() => globalConfig.environments.find(({ name }) => name === envName)), + (env) => !!env, + () => new EnvironmentMissingError(envName) + ) + ); + yield* _(Effect.sync(() => (process.env.MOON_TEST_ENV = envName))); yield* _(Effect.sync(() => loadEnvVars())); - yield* _(Effect.promise(() => commonChecks(env))); + + yield* _( + Effect.tryPromise({ + try: () => commonChecks(env), + catch: () => new CommonCheckError(), + }) + ); if ( (env.foundation.type == "dev" && !env.foundation.launchSpec[0].retainAllLogs) || @@ -42,13 +71,11 @@ export const testEffect = (envName: string, additionalArgs?: object) => { ); if (failed.length === 0) { - console.log("✅ All tests passed"); - Effect.logInfo("✅ All tests passed"); + yield* _(Effect.sync(() => console.log("✅ All tests passed"))); return true; } else { - console.log("❌ Some tests failed"); - Effect.logInfo("❌ Some tests failed"); - return Effect.fail("❌ Some tests failed"); + yield* _(Effect.sync(() => console.log("❌ Some tests failed"))); + yield* _(Effect.fail(new TestsFailedError())); } }); }; From ef7e5562327f8f5dacf8009f0ffe4db48102e172 Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Tue, 14 Nov 2023 12:44:00 +0000 Subject: [PATCH 36/41] Converted test function to Effects --- packages/cli/src/cmds/entrypoint.ts | 36 +++----- packages/cli/src/cmds/runTests.ts | 116 +++++++++++++++++++++++++- packages/cli/src/lib/globalContext.ts | 4 +- packages/types/config_schema.json | 4 + packages/types/src/config.ts | 6 ++ test/moonwall.config.json | 10 ++- 6 files changed, 147 insertions(+), 29 deletions(-) diff --git a/packages/cli/src/cmds/entrypoint.ts b/packages/cli/src/cmds/entrypoint.ts index 7adfb006..597311c8 100755 --- a/packages/cli/src/cmds/entrypoint.ts +++ b/packages/cli/src/cmds/entrypoint.ts @@ -74,9 +74,7 @@ const cliStart = Effect.try(() => { }, }) .command(`init`, "Run tests for a given Environment", async () => { - const effect = Effect.gen(function* (_) { - yield* _(Effect.tryPromise(() => generateConfig())); - }); + const effect = Effect.tryPromise(() => generateConfig()); await Effect.runPromise(effect); }) @@ -110,9 +108,7 @@ const cliStart = Effect.try(() => { }); }, async (argv) => { - const effect = Effect.gen(function* (_) { - yield* _(Effect.tryPromise(() => fetchArtifact(argv as any))); - }); + const effect = Effect.tryPromise(() => fetchArtifact(argv)); await Effect.runPromise(effect); } ) @@ -133,17 +129,15 @@ const cliStart = Effect.try(() => { }), async ({ envName, GrepTest }) => { - const effect = Effect.all([ - setEnvVar("MOON_RUN_SCRIPTS", "true"), - Effect.gen(function* (_) { - if (envName) { - return yield* _(testEffect(envName as any, { testNamePattern: GrepTest })); - } else { - yield* _(Effect.logError("👉 Run 'pnpm moonwall --help' for more information")); - return yield* _(Effect.fail("❌ No environment specified")); - } - }), - ]); + process.env.MOON_RUN_SCRIPTS = "true"; + const effect = Effect.gen(function* (_) { + if (envName) { + yield* _(testEffect(envName as any, { testNamePattern: GrepTest })); + } else { + console.error("👉 Run 'pnpm moonwall --help' for more information"); + yield* _(Effect.fail("❌ No environment specified")); + } + }); await Effect.runPromise(effect); } @@ -161,12 +155,8 @@ const cliStart = Effect.try(() => { description: "Pattern to grep test ID/Description to run", }), async (argv) => { - const effect = Effect.all([ - setEnvVar("MOON_RUN_SCRIPTS", "true"), - Effect.gen(function* (_) { - yield* _(Effect.tryPromise(() => runNetworkCmd(argv as any))); - }), - ]); + process.env.MOON_RUN_SCRIPTS = "true"; + const effect = Effect.tryPromise(() => runNetworkCmd(argv as any)); await Effect.runPromise(effect); } diff --git a/packages/cli/src/cmds/runTests.ts b/packages/cli/src/cmds/runTests.ts index a2406712..f4be84b7 100644 --- a/packages/cli/src/cmds/runTests.ts +++ b/packages/cli/src/cmds/runTests.ts @@ -1,7 +1,7 @@ import { Environment } from "@moonwall/types"; import chalk from "chalk"; import path from "path"; -import { Effect } from "effect"; +import { Effect, Config } from "effect"; import type { UserConfig, Vitest } from "vitest"; import { startVitest } from "vitest/node"; import { clearNodeLogs } from "../internal/cmdFunctions/tempLogs"; @@ -24,6 +24,11 @@ class CommonCheckError { class ConfigError { readonly _tag = "ConfigError"; + constructor(readonly customMessage?: string) {} +} + +class MoonwallContextError { + readonly _tag = "MoonwallContextError"; } export const testEffect = (envName: string, additionalArgs?: object) => { @@ -65,14 +70,14 @@ export const testEffect = (envName: string, additionalArgs?: object) => { ) { yield* _(Effect.sync(() => clearNodeLogs())); } - const vitest = yield* _(Effect.promise(() => executeTests(env, additionalArgs))); + const vitest = yield* _(executeTestEffect(env, additionalArgs)); const failed = yield* _( Effect.sync(() => vitest!.state.getFiles().filter((file) => file.result!.state === "fail")) ); if (failed.length === 0) { yield* _(Effect.sync(() => console.log("✅ All tests passed"))); - return true; + return; } else { yield* _(Effect.sync(() => console.log("❌ Some tests failed"))); yield* _(Effect.fail(new TestsFailedError())); @@ -116,6 +121,111 @@ export async function testCmd(envName: string, additionalArgs?: object): Promise } } +export const executeTestEffect = (env: Environment, additionalArgs?: object) => { + return Effect.gen(function* (_) { + const globalConfig = yield* _( + Effect.tryPromise({ + try: () => importAsyncConfig(), + catch: () => new ConfigError(), + }) + ); + + if (env.foundation.type === "read_only" && env.foundation.launchSpec.disableRuntimeVersionCheck !== true) { + yield* _(Effect.config(Config.string("MOON_TEST_ENV"))); + + const ctx = yield* _( + Effect.tryPromise({ + try: () => contextCreator(), + catch: () => new MoonwallContextError(), + }) + ); + + const chainData = yield* _( + Effect.filterOrFail( + Effect.sync(() => + ctx.providers + .filter((provider) => provider.type == "polkadotJs" && provider.name.includes("para")) + .map((provider) => { + return { + [provider.name]: { + rtName: (provider.greet() as any).rtName, + rtVersion: (provider.greet() as any).rtVersion, + }, + }; + }) + ), + (data) => data.length > 0, + () => + new ConfigError( + "No polkadotJs provider named 'para' found (this is required for read_only foundations)" + ) + ) + ); + + const { rtVersion, rtName } = yield* _(Effect.sync(() => Object.values(chainData[0])[0])); + process.env.MOON_RTVERSION = rtVersion; + process.env.MOON_RTNAME = rtName; + + yield* _( + Effect.tryPromise({ + try: () => MoonwallContext.destroy(), + catch: () => new MoonwallContextError(), + }) + ); + } + + const baseOptions = { + watch: false, + globals: true, + reporters: env.reporters ? env.reporters : ["default"], + outputFile: env.reportFile, + testTimeout: env.timeout || globalConfig.defaultTestTimeout, + hookTimeout: env.timeout || globalConfig.defaultTestTimeout, + passWithNoTests: false, + deps: { + optimizer: { ssr: { enabled: false }, web: { enabled: false } }, + }, + include: env.include ? env.include : ["**/*{test,spec,test_,test-}*{ts,mts,cts}"], + onConsoleLog(log) { + if (filterList.includes(log.trim())) return false; + // if (log.trim() == "stdout | unknown test" || log.trim() == "") return false; + if (log.includes("has multiple versions, ensure that there is only one installed.")) { + return false; + } + }, + } satisfies UserConfig; + + const options = yield* _( + Effect.try({ + try: () => addThreadConfig(baseOptions, env.multiThreads), + catch: () => new ConfigError(), + }) + ); + + if ( + globalConfig.environments.find((env) => env.name === process.env.MOON_TEST_ENV).foundation + .type == "zombie" + ) { + yield* _( + Effect.tryPromise({ + try: () => runNetworkOnly(), + catch: () => new MoonwallContextError(), + }) + ); + process.env.MOON_RECYCLE = "true"; + } + + const folders = env.testFileDir.map((folder) => path.join(".", folder, "/")); + + return yield* _( + Effect.tryPromise({ + try: () => startVitest("test", folders, { ...options, ...additionalArgs }), + catch: (e: any) => new Error(e.message), + }) + ); + }); +}; + export async function executeTests(env: Environment, additionalArgs?: object) { return new Promise(async (resolve, reject) => { const globalConfig = await importAsyncConfig(); diff --git a/packages/cli/src/lib/globalContext.ts b/packages/cli/src/lib/globalContext.ts index abe82988..76b8e6b7 100644 --- a/packages/cli/src/lib/globalContext.ts +++ b/packages/cli/src/lib/globalContext.ts @@ -124,7 +124,7 @@ export class MoonwallContext { private handleReadOnly(env: Environment): IGlobalContextFoundation { if (env.foundation.type !== "read_only") { - throw new Error(`Foundation type must be 'dev'`); + throw new Error(`Foundation type must be 'read_only'`); } if (!env.connections) { @@ -141,7 +141,7 @@ export class MoonwallContext { private handleChopsticks(env: Environment): IGlobalContextFoundation { if (env.foundation.type !== "chopsticks") { - throw new Error(`Foundation type must be 'dev'`); + throw new Error(`Foundation type must be 'chopsticks'`); } this.rtUpgradePath = env.foundation.rtUpgradePath; diff --git a/packages/types/config_schema.json b/packages/types/config_schema.json index 2a6f104c..e080a467 100644 --- a/packages/types/config_schema.json +++ b/packages/types/config_schema.json @@ -326,6 +326,10 @@ "ReadOnlyLaunchSpec": { "description": "A launch specification object for the \"read_only\" foundation type.", "properties": { + "disableRuntimeVersionCheck": { + "description": "Disable runtime version check.\nRT Version check is enabled by default.", + "type": "boolean" + }, "name": { "description": "The name of the launch spec.", "type": "string" diff --git a/packages/types/src/config.ts b/packages/types/src/config.ts index 61d2dde1..f8f3df7c 100644 --- a/packages/types/src/config.ts +++ b/packages/types/src/config.ts @@ -201,6 +201,12 @@ export interface ReadOnlyLaunchSpec extends GenericLaunchSpec { * Can be set to false to disable. */ rateLimiter?: boolean | Bottleneck.ConstructorOptions; + + /** + * Disable runtime version check. + * RT Version check is enabled by default. + */ + disableRuntimeVersionCheck?: boolean; } /** diff --git a/test/moonwall.config.json b/test/moonwall.config.json index 485ce5b6..6c418f2b 100644 --- a/test/moonwall.config.json +++ b/test/moonwall.config.json @@ -172,11 +172,14 @@ "description": "Suite of tests that doesnt involve any blockchain stuff", "testFileDir": ["suites/basic/"], "foundation": { + "launchSpec": { + "disableRuntimeVersionCheck": true + }, "type": "read_only" }, "runScripts": [ "compile-contracts.ts compile -p contracts/precompiles", - "greeting.js", + "greeting.js timbo", "shelley_prose.sh" ], "connections": [] @@ -597,6 +600,11 @@ } }, "connections": [ + { + "name": "para", + "type": "polkadotJs", + "endpoints": ["wss://wss.api.moonbeam.network"] + }, { "name": "eth", "type": "ethers", From bdd4ef905afc05fdd8494537bc6307d50cc0665d Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Tue, 14 Nov 2023 12:51:14 +0000 Subject: [PATCH 37/41] fix for tail command --- packages/cli/src/cmds/runNetwork.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/cmds/runNetwork.ts b/packages/cli/src/cmds/runNetwork.ts index 9a5d8aa0..02be45c5 100644 --- a/packages/cli/src/cmds/runNetwork.ts +++ b/packages/cli/src/cmds/runNetwork.ts @@ -439,7 +439,9 @@ const resolveTailChoice = async (env: Environment) => { switchNode = false; await new Promise(async (resolve) => { const onData = (chunk: any) => ui.log.write(chunk.toString()); - const logFilePath = `${process.env.MOON_ZOMBIE_DIR}/${zombieNodes[zombieNodePointer]}.log`; + const logFilePath = process.env.MOON_ZOMBIE_NODES + ? `${process.env.MOON_ZOMBIE_DIR}/${zombieNodes[zombieNodePointer]}.log` + : process.env.MOON_LOG_LOCATION; // eslint-disable-next-line prefer-const let currentReadPosition = 0; From 99acacfa5d81b322b6f453a53d7b4383e98301ce Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Tue, 14 Nov 2023 12:56:19 +0000 Subject: [PATCH 38/41] bug fix --- packages/cli/src/internal/localNode.ts | 52 +++----------------------- 1 file changed, 5 insertions(+), 47 deletions(-) diff --git a/packages/cli/src/internal/localNode.ts b/packages/cli/src/internal/localNode.ts index 33187f00..e5193d8b 100644 --- a/packages/cli/src/internal/localNode.ts +++ b/packages/cli/src/internal/localNode.ts @@ -61,52 +61,9 @@ export async function launchNode(cmd: string, args: string[], name: string): Pro return { pid: runningNode.pid, kill: runningNode.kill }; } -const WEB_SOCKET_TIMEOUT = 5000; // e.g., 5 seconds - -// async function checkWebSocketJSONRPC(port: number): Promise { -// return new Promise((resolve, reject) => { -// const ws = new WebSocket(`ws://localhost:${port}`); -// const timeout = setTimeout(() => { -// ws.close(); -// reject(new Error("WebSocket response timeout")); -// }, WEB_SOCKET_TIMEOUT); - -// ws.once("open", () => { -// ws.send( -// JSON.stringify({ -// jsonrpc: "2.0", -// id: 1, -// method: "system_chain", -// params: [], -// }) -// ); -// }); - -// ws.once("message", (data) => { -// clearTimeout(timeout); -// try { -// const { jsonrpc, id } = JSON.parse(data.toString()); -// if (jsonrpc === "2.0" && id === 1) { -// resolve(true); -// } else { -// reject(new Error("Invalid JSON-RPC response")); -// } -// } catch (e) { -// reject(new Error("Failed to parse WebSocket message")); -// } finally { -// ws.close(); -// } -// }); - -// ws.once("error", (err) => { -// clearTimeout(timeout); -// ws.close(); -// reject(new Error(`WebSocket error: ${err.message}`)); -// }); -// }); -// } - async function checkWebSocketJSONRPC(port: number): Promise { + const WEB_SOCKET_TIMEOUT = 5000; // e.g., 5 seconds + return new Promise((resolve, reject) => { const ws = new WebSocket(`ws://localhost:${port}`); const timeout = setTimeout(() => { @@ -156,7 +113,9 @@ async function checkWebSocketJSONRPC(port: number): Promise { }); } -function findPortsByPid(pid: number, retryDelay: number = 10000) { +function findPortsByPid(pid: number, timeout: number = 10000) { + const end = Date.now() + timeout; + for (;;) { const command = `lsof -i -n -P | grep LISTEN | grep ${pid} || true`; const { stdout } = execaCommandSync(command, { shell: true, cleanup: true, timeout: 2000 }); @@ -175,7 +134,6 @@ function findPortsByPid(pid: number, retryDelay: number = 10000) { return ports; } - const end = Date.now() + retryDelay; if (Date.now() > end) break; } From 46a61659073c9cde6b688c41f7a57bbadbf41441 Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Tue, 14 Nov 2023 13:14:33 +0000 Subject: [PATCH 39/41] zombie fix --- packages/cli/src/cmds/runNetwork.ts | 1 - packages/cli/src/cmds/runTests.ts | 5 ++++- packages/cli/src/lib/globalContext.ts | 14 ++++++++++---- packages/types/src/config.ts | 2 +- test/moonwall.config.json | 5 ++++- 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/packages/cli/src/cmds/runNetwork.ts b/packages/cli/src/cmds/runNetwork.ts index 02be45c5..5c0ee629 100644 --- a/packages/cli/src/cmds/runNetwork.ts +++ b/packages/cli/src/cmds/runNetwork.ts @@ -191,7 +191,6 @@ export async function runNetworkCmd(args) { } } await MoonwallContext.destroy(); - console.log(`Goodbye! 👋`); } const reportServicePorts = async () => { diff --git a/packages/cli/src/cmds/runTests.ts b/packages/cli/src/cmds/runTests.ts index f4be84b7..d4e17974 100644 --- a/packages/cli/src/cmds/runTests.ts +++ b/packages/cli/src/cmds/runTests.ts @@ -130,7 +130,10 @@ export const executeTestEffect = (env: Environment, additionalArgs?: object) => }) ); - if (env.foundation.type === "read_only" && env.foundation.launchSpec.disableRuntimeVersionCheck !== true) { + if ( + env.foundation.type === "read_only" && + env.foundation.launchSpec.disableRuntimeVersionCheck !== true + ) { yield* _(Effect.config(Config.string("MOON_TEST_ENV"))); const ctx = yield* _( diff --git a/packages/cli/src/lib/globalContext.ts b/packages/cli/src/lib/globalContext.ts index 76b8e6b7..69b56b0e 100644 --- a/packages/cli/src/lib/globalContext.ts +++ b/packages/cli/src/lib/globalContext.ts @@ -181,10 +181,11 @@ export class MoonwallContext { const processIds = Object.values((this.zombieNetwork.client as any).processMap) .filter((item) => item!["pid"]) .map((process) => process!["pid"]); - execaCommandSync(`kill ${processIds.join(" ")}`); + execaCommand(`kill ${processIds.join(" ")}`, { + reject: false, + }); } catch (err) { - console.log(err); - console.log("Failed to kill zombie nodes"); + // console.log(err.message); } }; @@ -479,7 +480,12 @@ export class MoonwallContext { .filter((item) => item!["pid"]) .map((process) => process!["pid"]); - execaCommandSync(`kill ${processIds.join(" ")}`); + try { + execaCommandSync(`kill ${processIds.join(" ")}`, {}); + } catch (e) { + console.log(e.message); + console.log("continuing..."); + } await waitForPidsToDie(processIds); diff --git a/packages/types/src/config.ts b/packages/types/src/config.ts index f8f3df7c..0065420d 100644 --- a/packages/types/src/config.ts +++ b/packages/types/src/config.ts @@ -202,7 +202,7 @@ export interface ReadOnlyLaunchSpec extends GenericLaunchSpec { */ rateLimiter?: boolean | Bottleneck.ConstructorOptions; - /** + /** * Disable runtime version check. * RT Version check is enabled by default. */ diff --git a/test/moonwall.config.json b/test/moonwall.config.json index 6c418f2b..d4cb23f1 100644 --- a/test/moonwall.config.json +++ b/test/moonwall.config.json @@ -88,7 +88,10 @@ "testFileDir": ["suites/viem"], "envVars": [""], "foundation": { - "type": "read_only" + "type": "read_only", + "launchSpec": { + "disableRuntimeVersionCheck": true + } }, "connections": [ { From 400a5bb7d4d360f599aaf9d417bb96c6dbf22feb Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Tue, 14 Nov 2023 13:30:06 +0000 Subject: [PATCH 40/41] changeset --- .changeset/slow-snakes-exist.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changeset/slow-snakes-exist.md diff --git a/.changeset/slow-snakes-exist.md b/.changeset/slow-snakes-exist.md new file mode 100644 index 00000000..9fb0fabe --- /dev/null +++ b/.changeset/slow-snakes-exist.md @@ -0,0 +1,7 @@ +--- +"@moonwall/types": patch +"@moonwall/util": patch +"@moonwall/cli": patch +--- + +Extra Fibre work From f0e1fedff1ff3f26c13e1180917c646abc1fa04b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 14 Nov 2023 13:37:50 +0000 Subject: [PATCH 41/41] Version Packages --- .changeset/slow-snakes-exist.md | 7 ------- docs/CHANGELOG.md | 2 ++ docs/package.json | 2 +- packages/cli/CHANGELOG.md | 9 +++++++++ packages/cli/package.json | 2 +- packages/types/CHANGELOG.md | 6 ++++++ packages/types/package.json | 2 +- packages/util/CHANGELOG.md | 8 ++++++++ packages/util/package.json | 2 +- test/CHANGELOG.md | 2 ++ test/package.json | 2 +- 11 files changed, 32 insertions(+), 12 deletions(-) delete mode 100644 .changeset/slow-snakes-exist.md diff --git a/.changeset/slow-snakes-exist.md b/.changeset/slow-snakes-exist.md deleted file mode 100644 index 9fb0fabe..00000000 --- a/.changeset/slow-snakes-exist.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@moonwall/types": patch -"@moonwall/util": patch -"@moonwall/cli": patch ---- - -Extra Fibre work diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 004ecc3d..aeae12e3 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,7 @@ # @moonwall/docs +## 4.4.1 + ## 4.4.0 ## 4.3.5 diff --git a/docs/package.json b/docs/package.json index b1a70919..9b6922b4 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/docs", "type": "module", - "version": "4.4.0", + "version": "4.4.1", "private": true, "description": "Testing framework for the Moon family of projects", "scripts": { diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index c807656a..538aacba 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,14 @@ # @moonwall/cli +## 4.4.1 + +### Patch Changes + +- 400a5bb: Extra Fibre work +- Updated dependencies [400a5bb] + - @moonwall/types@4.4.1 + - @moonwall/util@4.4.1 + ## 4.4.0 ### Minor Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 9dae5efc..38797a35 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/cli", "type": "module", - "version": "4.4.0", + "version": "4.4.1", "description": "Testing framework for the Moon family of projects", "author": "timbrinded", "license": "ISC", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 3eb62971..242639d4 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,5 +1,11 @@ # @moonwall/types +## 4.4.1 + +### Patch Changes + +- 400a5bb: Extra Fibre work + ## 4.4.0 ## 4.3.5 diff --git a/packages/types/package.json b/packages/types/package.json index da57e8db..6626af62 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/types", "type": "module", - "version": "4.4.0", + "version": "4.4.1", "description": "Testing framework for the Moon family of projects", "author": "timbrinded", "license": "ISC", diff --git a/packages/util/CHANGELOG.md b/packages/util/CHANGELOG.md index 2f2eaa33..bf29a5df 100644 --- a/packages/util/CHANGELOG.md +++ b/packages/util/CHANGELOG.md @@ -1,5 +1,13 @@ # @moonwall/util +## 4.4.1 + +### Patch Changes + +- 400a5bb: Extra Fibre work +- Updated dependencies [400a5bb] + - @moonwall/types@4.4.1 + ## 4.4.0 ### Minor Changes diff --git a/packages/util/package.json b/packages/util/package.json index ceec67eb..38560bc6 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/util", "type": "module", - "version": "4.4.0", + "version": "4.4.1", "description": "Testing framework for the Moon family of projects", "author": "timbrinded", "license": "ISC", diff --git a/test/CHANGELOG.md b/test/CHANGELOG.md index d9dde10a..dc339c65 100644 --- a/test/CHANGELOG.md +++ b/test/CHANGELOG.md @@ -1,5 +1,7 @@ # @moonwall/tests +## 4.4.1 + ## 4.4.0 ### Minor Changes diff --git a/test/package.json b/test/package.json index 5f75bfa6..194a1305 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "name": "@moonwall/tests", "type": "module", - "version": "4.4.0", + "version": "4.4.1", "private": true, "packageManager": "pnpm@7.23.0", "description": "Testing framework for the Moon family of projects",