Skip to content

Commit

Permalink
style(gas-report): rename mud-gas-report to gas-report (#1410)
Browse files Browse the repository at this point in the history
  • Loading branch information
holic committed Sep 7, 2023
1 parent 4604639 commit 9af542d
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .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.
4 changes: 2 additions & 2 deletions packages/gas-report/README.md
Expand Up @@ -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.
4 changes: 2 additions & 2 deletions packages/gas-report/package.json
Expand Up @@ -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"
},
Expand Down
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion 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,
Expand Down
2 changes: 1 addition & 1 deletion packages/schema-type/package.json
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/store/package.json
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/world/package.json
Expand Up @@ -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"
Expand Down

0 comments on commit 9af542d

Please sign in to comment.