Skip to content

Commit

Permalink
March Package Updates (#394)
Browse files Browse the repository at this point in the history
* Updated lint & polkadotJs

* Updated connection providers

* Updated chopsticks

* Updated Vitest

* Updated zombienet

* pkg updates
  • Loading branch information
timbrinded authored Mar 19, 2024
1 parent 38caada commit 17dd589
Show file tree
Hide file tree
Showing 73 changed files with 1,409 additions and 990 deletions.
8 changes: 8 additions & 0 deletions .changeset/thirty-wasps-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@moonwall/types": minor
"@moonwall/util": minor
"@moonwall/cli": minor
"@moonwall/tests": minor
---

Package Updates
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"typecheck": "pnpm -r --filter='./packages/**' run typecheck"
},
"devDependencies": {
"@biomejs/biome": "1.5.3",
"@biomejs/biome": "1.6.1",
"@changesets/cli": "2.27.1",
"typescript": "5.3.3"
"typescript": "5.4.2"
}
}
235 changes: 115 additions & 120 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,122 +1,117 @@
{
"name": "@moonwall/cli",
"type": "module",
"version": "5.0.3",
"description": "Testing framework for the Moon family of projects",
"author": "timbrinded",
"license": "ISC",
"homepage": "https://github.com/Moonsong-Labs/moonwall#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/Moonsong-Labs/moonwall.git",
"directory": "packages/cli"
},
"bugs": {
"url": "https://github.com/Moonsong-Labs/moonwall/issues"
},
"keywords": [
"moonwall",
"moonbeam",
"moondance",
"polkadot",
"kusama",
"substrate"
],
"exports": {
".": {
"types": "./dist/types/src/index.d.ts",
"import": "./dist/index.js",
"bun": "./src/cmds/entrypoint.ts"
}
},
"module": "./dist/index.js",
"types": "./dist/types/src/index.d.ts",
"bin": {
"moonwall": "./moonwall.mjs",
"moondebug": "./moondebug.mjs"
},
"engines": {
"node": ">=20",
"pnpm": ">=7"
},
"files": [
"dist",
"bin",
"*.d.ts",
"*.mjs"
],
"scripts": {
"clean": "rm -rf dist && rm -rf node_modules",
"build": "pnpm exec rm -rf dist && tsup src --format esm --no-splitting --sourcemap && pnpm generate-types",
"lint": "pnpm biome lint ./src",
"lint:fix": "pnpm biome lint ./src --apply",
"fmt": "biome format .",
"fmt:fix": "biome format . --write",
"generate-types": "tsc",
"watch": "tsup src --format esm --watch",
"typecheck": "pnpm exec tsc --noEmit",
"prepublish": "pnpm run build && pnpm run generate-types"
},
"dependencies": {
"@acala-network/chopsticks": "0.9.8",
"@moonbeam-network/api-augment": "0.2700.0",
"@moonwall/types": "workspace:*",
"@moonwall/util": "workspace:*",
"@octokit/rest": "^20.0.2",
"@polkadot/api": "10.11.2",
"@polkadot/api-derive": "10.11.2",
"@polkadot/keyring": "12.6.2",
"@polkadot/types": "10.11.2",
"@polkadot/types-codec": "10.11.2",
"@polkadot/util": "12.6.2",
"@polkadot/util-crypto": "12.6.2",
"@vitest/ui": "1.3.0",
"@zombienet/orchestrator": "0.0.68",
"@zombienet/utils": "0.0.24",
"bottleneck": "2.19.5",
"chalk": "5.3.0",
"clear": "0.1.0",
"cli-progress": "3.12.0",
"colors": "1.4.0",
"debug": "4.3.4",
"dotenv": "16.4.4",
"ethers": "6.11.1",
"get-port": "^7.0.0",
"inquirer": "9.2.15",
"inquirer-press-to-continue": "1.2.0",
"jsonc-parser": "3.2.1",
"minimatch": "9.0.3",
"node-fetch": "3.3.2",
"semver": "7.6.0",
"viem": "2.7.10",
"vitest": "1.3.0",
"web3": "4.5.0",
"web3-providers-ws": "^4.0.7",
"ws": "8.16.0",
"yaml": "2.3.4",
"yargs": "17.7.2"
},
"peerDependencies": {
"@acala-network/chopsticks": "0.9.8",
"@polkadot/api": "10.11.2",
"@vitest/ui": "1.2.2",
"vitest": "1.2.2"
},
"devDependencies": {
"@biomejs/biome": "1.5.3",
"@types/clear": "^0.1.4",
"@types/cli-progress": "3.11.5",
"@types/debug": "4.1.12",
"@types/inquirer": "^9.0.7",
"@types/node": "20.11.19",
"@types/semver": "^7.5.7",
"@types/ws": "^8.5.10",
"@types/yargs": "17.0.32",
"tsup": "8.0.2",
"tsx": "4.7.1",
"typescript": "5.3.3"
},
"publishConfig": {
"access": "public"
}
"name": "@moonwall/cli",
"type": "module",
"version": "5.0.3",
"description": "Testing framework for the Moon family of projects",
"author": "timbrinded",
"license": "ISC",
"homepage": "https://github.com/Moonsong-Labs/moonwall#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/Moonsong-Labs/moonwall.git",
"directory": "packages/cli"
},
"bugs": {
"url": "https://github.com/Moonsong-Labs/moonwall/issues"
},
"keywords": [
"moonwall",
"moonbeam",
"moondance",
"polkadot",
"kusama",
"substrate"
],
"exports": {
".": {
"types": "./dist/types/src/index.d.ts",
"import": "./dist/index.js",
"bun": "./src/cmds/entrypoint.ts"
}
},
"module": "./dist/index.js",
"types": "./dist/types/src/index.d.ts",
"bin": {
"moonwall": "./moonwall.mjs",
"moondebug": "./moondebug.mjs"
},
"engines": {
"node": ">=20",
"pnpm": ">=7"
},
"files": ["dist", "bin", "*.d.ts", "*.mjs"],
"scripts": {
"clean": "rm -rf dist && rm -rf node_modules",
"build": "pnpm exec rm -rf dist && tsup src --format esm --no-splitting --sourcemap && pnpm generate-types",
"lint": "pnpm biome lint ./src",
"lint:fix": "pnpm biome lint ./src --apply",
"fmt": "biome format .",
"fmt:fix": "biome format . --write",
"generate-types": "tsc",
"watch": "tsup src --format esm --watch",
"typecheck": "pnpm exec tsc --noEmit",
"prepublish": "pnpm run build && pnpm run generate-types"
},
"dependencies": {
"@acala-network/chopsticks": "0.9.10",
"@moonbeam-network/api-augment": "0.2801.0",
"@moonwall/types": "workspace:*",
"@moonwall/util": "workspace:*",
"@octokit/rest": "^20.0.2",
"@polkadot/api": "10.12.3",
"@polkadot/api-derive": "10.12.3",
"@polkadot/keyring": "12.6.2",
"@polkadot/types": "10.12.3",
"@polkadot/types-codec": "10.12.3",
"@polkadot/util": "12.6.2",
"@polkadot/util-crypto": "12.6.2",
"@vitest/ui": "1.4.0",
"@zombienet/orchestrator": "0.0.76",
"@zombienet/utils": "0.0.24",
"bottleneck": "2.19.5",
"chalk": "5.3.0",
"clear": "0.1.0",
"cli-progress": "3.12.0",
"colors": "1.4.0",
"debug": "4.3.4",
"dotenv": "16.4.5",
"ethers": "6.11.1",
"get-port": "^7.0.0",
"inquirer": "9.2.16",
"inquirer-press-to-continue": "1.2.0",
"jsonc-parser": "3.2.1",
"minimatch": "9.0.3",
"node-fetch": "3.3.2",
"semver": "7.6.0",
"viem": "2.8.13",
"vitest": "1.4.0",
"web3": "4.6.0",
"web3-providers-ws": "^4.0.7",
"ws": "8.16.0",
"yaml": "2.4.1",
"yargs": "17.7.2"
},
"peerDependencies": {
"@acala-network/chopsticks": "0.9.10",
"@polkadot/api": "10.11.2",
"@vitest/ui": "1.2.2",
"vitest": "1.2.2"
},
"devDependencies": {
"@biomejs/biome": "1.6.1",
"@types/clear": "^0.1.4",
"@types/cli-progress": "3.11.5",
"@types/debug": "4.1.12",
"@types/inquirer": "^9.0.7",
"@types/node": "20.11.29",
"@types/semver": "^7.5.8",
"@types/ws": "^8.5.10",
"@types/yargs": "17.0.32",
"tsup": "8.0.2",
"tsx": "4.7.1",
"typescript": "5.4.2"
},
"publishConfig": {
"access": "public"
}
}
2 changes: 1 addition & 1 deletion packages/cli/src/cmds/entrypoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import "@moonbeam-network/api-augment";
import dotenv from "dotenv";
import yargs from "yargs";
import { hideBin } from "yargs/helpers";
import { fetchArtifact, deriveTestIds, generateConfig, fetchArtifactArgs } from "../internal";
import { fetchArtifact, deriveTestIds, generateConfig, type fetchArtifactArgs } from "../internal";
import { main } from "./main";
import { runNetworkCmd } from "./runNetwork";
import { testCmd } from "./runTests";
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/src/cmds/interactiveCmds/chopsticksIntCmds.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { promises as fsPromises } from "fs";
import inquirer, { ChoiceCollection } from "inquirer";
import { promises as fsPromises } from "node:fs";
import inquirer, { type ChoiceCollection } from "inquirer";
import { parse } from "yaml";
import { getEnvironmentFromConfig } from "../../lib/configReader";
import { MoonwallContext } from "../../lib/globalContext";
Expand Down Expand Up @@ -52,7 +52,7 @@ export async function resolveChopsticksInteractiveCmdChoice() {
return (yaml.port as string) || "8000";
})
);
const port = parseInt(ports[0]);
const port = Number.parseInt(ports[0]);

const choices: ChoiceCollection = [
{ name: "🆗 Create Block", value: "createblock" },
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/cmds/interactiveCmds/devIntCmds.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ApiPromise } from "@polkadot/api";
import inquirer, { ChoiceCollection } from "inquirer";
import inquirer, { type ChoiceCollection } from "inquirer";
import { MoonwallContext } from "../../lib/globalContext";
import { jumpRoundsDev, jumpToRoundDev } from "@moonwall/util";

Expand Down
6 changes: 3 additions & 3 deletions packages/cli/src/cmds/main.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { MoonwallConfig } from "@moonwall/types";
import type { MoonwallConfig } from "@moonwall/types";
import chalk from "chalk";
import clear from "clear";
import colors from "colors";
import fs from "fs";
import fs from "node:fs";
import inquirer from "inquirer";
import PressToContinuePrompt from "inquirer-press-to-continue";
import path from "path";
import path from "node:path";
import { SemVer, lt } from "semver";
import pkg from "../../package.json" assert { type: "json" };
import {
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/src/cmds/runNetwork.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Environment } from "@moonwall/types";
import type { Environment } from "@moonwall/types";
import chalk from "chalk";
import clear from "clear";
import fs, { promises as fsPromises } from "fs";
import fs, { promises as fsPromises } from "node:fs";
import inquirer from "inquirer";
import PressToContinuePrompt from "inquirer-press-to-continue";
import { parse } from "yaml";
Expand All @@ -20,7 +20,7 @@ import {
resolveZombieInteractiveCmdChoice,
} from "./interactiveCmds";
import { executeTests } from "./runTests";
import { RunCommandArgs } from "./entrypoint";
import type { RunCommandArgs } from "./entrypoint";

inquirer.registerPrompt("press-to-continue", PressToContinuePrompt);

Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/cmds/runTests.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Environment } from "@moonwall/types";
import type { Environment } from "@moonwall/types";
import chalk from "chalk";
import path from "path";
import path from "node:path";
import type { UserConfig, Vitest } from "vitest";
import { startVitest } from "vitest/node";
import { clearNodeLogs } from "../internal/cmdFunctions/tempLogs";
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/internal/cmdFunctions/downloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export async function downloader(url: string, outputPath: string): Promise<void>
readStream.pipe(writeStream);

await new Promise((resolve, reject) => {
const contentLength = parseInt(response.headers.get("Content-Length") || "0");
const contentLength = Number.parseInt(response.headers.get("Content-Length") || "0");
onStart(contentLength);

readStream.on("data", (chunk) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/internal/cmdFunctions/fetchArtifact.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from "node:fs/promises";
import path from "path";
import path from "node:path";
import semver from "semver";
import chalk from "chalk";
import inquirer from "inquirer";
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/internal/cmdFunctions/initialisation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FoundationType, MoonwallConfig } from "@moonwall/types";
import fs from "fs/promises";
import type { FoundationType, MoonwallConfig } from "@moonwall/types";
import fs from "node:fs/promises";
import inquirer from "inquirer";
import PressToContinuePrompt from "inquirer-press-to-continue";
inquirer.registerPrompt("press-to-continue", PressToContinuePrompt);
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/internal/cmdFunctions/tempLogs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import path from "path";
import fs from "fs";
import path from "node:path";
import fs from "node:fs";

export function clearNodeLogs(silent = true) {
const dirPath = path.join(process.cwd(), "tmp", "node_logs");
Expand Down
9 changes: 7 additions & 2 deletions packages/cli/src/internal/commandParsers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { ChopsticksLaunchSpec, DevLaunchSpec, RepoSpec, ZombieLaunchSpec } from "@moonwall/types";
import type {
ChopsticksLaunchSpec,
DevLaunchSpec,
RepoSpec,
ZombieLaunchSpec,
} from "@moonwall/types";
import chalk from "chalk";
import path from "path";
import path from "node:path";
import { standardRepos } from "../lib/repoDefinitions";

export function parseZombieCmd(launchSpec: ZombieLaunchSpec) {
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/internal/deriveTestIds.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import chalk from "chalk";
import fs from "fs";
import fs from "node:fs";
import inquirer from "inquirer";
import path from "path";
import path from "node:path";

export async function deriveTestIds(rootDir: string) {
const usedPrefixes: Set<string> = new Set();
Expand Down
Loading

0 comments on commit 17dd589

Please sign in to comment.