()
| 3 | const $ = execa({ stdout: "inherit", stderr: "inherit" }); |
| 4 | |
| 5 | async function run() { |
| 6 | const fileNames = process.argv[2]; |
| 7 | |
| 8 | if (!fileNames) { |
| 9 | console.error("Specify a benchmark name(s), e.g. `pnpm bench object-with-extend`"); |
| 10 | process.exit(1); |
| 11 | } |
| 12 | const files = fileNames.split(",").map((file) => import.meta.resolve(`./${file}`).replace("file://", "")); |
| 13 | |
| 14 | for (const file of files) { |
| 15 | await $`pnpm tsx --conditions @zod/source ${file}`; |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | run(); |
| 20 |