Skip to content

Commit a56d6ab

Browse files
committed
chore: benchmark script
1 parent faa8249 commit a56d6ab

File tree

7 files changed

+4435
-15765
lines changed

7 files changed

+4435
-15765
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"test:integration:legacy:since:release": "yarn test:e2e:legacy:since:release",
4545
"test:protocols": "yarn build:protocols && lerna run test --scope '@aws-sdk/aws-protocoltests-*'",
4646
"test:server-protocols": "yarn build:server-protocols && lerna run test --scope '@aws-sdk/*-server'",
47-
"test:size": "cd scripts/benchmark-size/runner && yarn && ts-node ./cli.ts",
47+
"test:size": "cd scripts/benchmark-size/runner && yarn && npx tsx ./cli.ts",
4848
"test:unit": "make test-unit",
4949
"test:versions": "jest --config tests/versions/jest.config.js tests/versions/index.spec.ts",
5050
"update:versions:default": "node --es-module-specifier-resolution=node ./scripts/update-versions/default.mjs",
@@ -102,7 +102,7 @@
102102
"rimraf": "3.0.2",
103103
"ts-jest": "29.1.1",
104104
"ts-loader": "9.4.2",
105-
"ts-node": "10.9.1",
105+
"tsx": "4.19.2",
106106
"turbo": "2.1.2",
107107
"typescript": "~4.9.5",
108108
"verdaccio": "5.25.0",

scripts/benchmark-size/runner/local-registry.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export const localPublishChangedPackages = async (): Promise<string> => {
1717
console.info(`the package versions will be the actual version up with a patch version and preid "ci".`);
1818
await exec("yarn", ["local-publish"], {
1919
cwd: PROJECT_ROOT,
20+
stdio: "inherit",
2021
});
2122
console.info(`published ${readdirSync(join(PROJECT_ROOT, "verdaccio", "storage", "@aws-sdk")).length} packages`);
2223
return join(PROJECT_ROOT, "verdaccio", "config.yaml");
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
{
22
"compilerOptions": {
3-
"module": "ESNext", // to run ts-node with ESM dependencies
3+
"module": "ESNext",
44
"target": "ESNext",
55
"moduleResolution": "node",
66
"allowSyntheticDefaultImports": true
7-
},
8-
"ts-node": {
9-
// Tell ts-node CLI to install the --loader automatically, explained below
10-
"esm": true
117
}
128
}

scripts/benchmark-size/runner/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ export const sleep = (ms: number) =>
1313

1414
export const validateRuntime = async () => {
1515
try {
16-
await exec("yarn", ["--version"]);
16+
await exec("npx", ["--version"]);
1717
} catch (e) {
18-
console.error("yarn is not available, please install yarn globally");
18+
console.error("npx is not available, please install npx globally");
1919
throw e;
2020
}
2121
try {
22-
await exec("yarn", ["--silent", "lerna", "--version"], {
22+
await exec("npx", ["lerna", "--version"], {
2323
cwd: PROJECT_ROOT,
2424
});
2525
} catch (e) {

scripts/benchmark-size/runner/workspace.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const loadWorkspacePackages = async (options?: {
4444
}
4545
}
4646

47-
const { stdout } = await exec("yarn", ["--silent", "lerna", ...args], {
47+
const { stdout } = await exec("npx", ["lerna", ...args], {
4848
cwd: PROJECT_ROOT,
4949
encoding: "utf8",
5050
});

scripts/benchmark-size/runner/yarn.lock

Lines changed: 2541 additions & 1244 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)