From 9af542d3e29e2699144534dec3430e19294077d4 Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Thu, 7 Sep 2023 03:30:35 -0700 Subject: [PATCH] style(gas-report): rename mud-gas-report to gas-report (#1410) --- .changeset/tricky-carrots-talk.md | 5 +++++ packages/gas-report/README.md | 4 ++-- packages/gas-report/package.json | 4 ++-- packages/gas-report/ts/{mud-gas-report.ts => gas-report.ts} | 4 ++-- packages/gas-report/tsup.config.ts | 2 +- packages/schema-type/package.json | 2 +- packages/store/package.json | 2 +- packages/world/package.json | 2 +- 8 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 .changeset/tricky-carrots-talk.md rename packages/gas-report/ts/{mud-gas-report.ts => gas-report.ts} (90%) diff --git a/.changeset/tricky-carrots-talk.md b/.changeset/tricky-carrots-talk.md new file mode 100644 index 0000000000..30626fbad7 --- /dev/null +++ b/.changeset/tricky-carrots-talk.md @@ -0,0 +1,5 @@ +--- +"@latticexyz/gas-report": major +--- + +Renames `mud-gas-report` binary to `gas-report`, since it's no longer MUD specific. diff --git a/packages/gas-report/README.md b/packages/gas-report/README.md index 7e6a41a40d..b703bee2f5 100644 --- a/packages/gas-report/README.md +++ b/packages/gas-report/README.md @@ -20,7 +20,7 @@ contract ExampleTest is Test, GasReporter { Then use the cli command to run tests and save the report: ```console -pnpm mud-gas-report --save gas-report.json +pnpm gas-report --save gas-report.json ``` -Run `pnpm mud-gas-report --help` for more details. +Run `pnpm gas-report --help` for more details. diff --git a/packages/gas-report/package.json b/packages/gas-report/package.json index 156ad28b92..b30f4e936f 100644 --- a/packages/gas-report/package.json +++ b/packages/gas-report/package.json @@ -20,13 +20,13 @@ } }, "bin": { - "mud-gas-report": "./dist/mud-gas-report.js" + "gas-report": "./dist/gas-report.js" }, "scripts": { "build": "tsup", "clean": "rimraf dist", "dev": "tsup --watch", - "prepare": "mkdir -p ./dist && touch ./dist/mud-gas-report.js", + "prepare": "mkdir -p ./dist && touch ./dist/gas-report.js", "test": "vitest typecheck --run --passWithNoTests && vitest --run --passWithNoTests && forge test", "test:ci": "pnpm run test" }, diff --git a/packages/gas-report/ts/mud-gas-report.ts b/packages/gas-report/ts/gas-report.ts similarity index 90% rename from packages/gas-report/ts/mud-gas-report.ts rename to packages/gas-report/ts/gas-report.ts index a65e95a086..aac2397f12 100755 --- a/packages/gas-report/ts/mud-gas-report.ts +++ b/packages/gas-report/ts/gas-report.ts @@ -10,11 +10,11 @@ import chalk from "chalk"; dotenv.config(); // $0 makes this a default command (as opposed to a sub-command), -// which replaces `mud-gas-report gas-report` with just `mud-gas-report` +// which replaces `gas-report gas-report` with just `gas-report` gasReport.command = "$0"; yargs(hideBin(process.argv)) - .scriptName("mud-gas-report") + .scriptName("gas-report") // Use the commands directory to scaffold // eslint-disable-next-line @typescript-eslint/no-explicit-any -- command array overload isn't typed, see https://github.com/yargs/yargs/blob/main/docs/advanced.md#esm-hierarchy .command(gasReport as any) diff --git a/packages/gas-report/tsup.config.ts b/packages/gas-report/tsup.config.ts index 1f0444cc6e..fafcaa7177 100644 --- a/packages/gas-report/tsup.config.ts +++ b/packages/gas-report/tsup.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from "tsup"; export default defineConfig({ - entry: ["ts/index.ts", "ts/mud-gas-report.ts"], + entry: ["ts/index.ts", "ts/gas-report.ts"], target: "esnext", format: ["esm"], dts: false, diff --git a/packages/schema-type/package.json b/packages/schema-type/package.json index 52110375d1..b952710612 100644 --- a/packages/schema-type/package.json +++ b/packages/schema-type/package.json @@ -29,7 +29,7 @@ "clean": "pnpm run clean:js", "clean:js": "rimraf dist/typescript", "dev": "tsup --watch", - "gas-report": "mud-gas-report --save gas-report.json", + "gas-report": "gas-report --save gas-report.json", "test": "vitest typecheck --run && vitest --run && forge test", "test:ci": "pnpm run test" }, diff --git a/packages/store/package.json b/packages/store/package.json index 7b21b96e94..ca5f07bc5a 100644 --- a/packages/store/package.json +++ b/packages/store/package.json @@ -45,7 +45,7 @@ "clean:js": "rimraf dist", "clean:mud": "rimraf src/codegen", "dev": "tsup --watch", - "gas-report": "mud-gas-report --save gas-report.json", + "gas-report": "gas-report --save gas-report.json", "lint": "solhint --config ./.solhint.json 'src/**/*.sol'", "test": "vitest typecheck --run && vitest --run --passWithNoTests && forge test", "test:ci": "pnpm run test" diff --git a/packages/world/package.json b/packages/world/package.json index 0181ae3278..394caa991a 100644 --- a/packages/world/package.json +++ b/packages/world/package.json @@ -40,7 +40,7 @@ "clean:js": "rimraf dist", "clean:mud": "rimraf src/codegen", "dev": "tsup --watch", - "gas-report": "mud-gas-report --save gas-report.json", + "gas-report": "gas-report --save gas-report.json", "lint": "solhint --config ./.solhint.json 'src/**/*.sol'", "test": "tsc --noEmit && vitest --run && forge test", "test:ci": "pnpm run test"