Skip to content

Commit

Permalink
test(size): migrate to pnp
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZhengYP committed Apr 13, 2022
1 parent ab0b482 commit e66a012
Show file tree
Hide file tree
Showing 6 changed files with 2,648 additions and 1,333 deletions.
3 changes: 2 additions & 1 deletion scripts/benchmark-size/runner/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
.yarn
2 changes: 2 additions & 0 deletions scripts/benchmark-size/runner/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nodeLinker: node-modules
nmHoistingLimits: dependencies
8 changes: 6 additions & 2 deletions scripts/benchmark-size/runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,23 @@
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.0.6",
"@types/execa": "^2.0.0",
"@types/node": "^17.0.23",
"esbuild": "latest",
"execa": "^5.1.1",
"fs-extra": "^10.0.0",
"handlebars": "^4.7.7",
"listr2": "^3.13.3",
"prettier": "^2.6.2",
"rollup": "latest",
"rollup-plugin-terser": "^7.0.2",
"semver": "^7.3.5",
"webpack": "latest"
"webpack": "latest",
"yargs": "^17.4.1"
},
"author": "",
"license": "UNLICENSED",
"devDependencies": {
"@types/listr": "^0.14.4"
}
},
"packageManager": "[email protected]"
}
2 changes: 1 addition & 1 deletion scripts/benchmark-size/runner/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const validateRuntime = async () => {
throw e;
}
try {
await exec("./node_modules/.bin/lerna", ["--version"], {
await exec("yarn", ["lerna", "--version"], {
cwd: PROJECT_ROOT,
});
} catch (e) {
Expand Down
4 changes: 2 additions & 2 deletions scripts/benchmark-size/runner/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const loadWorkspacePackages = async (options?: {
scope?: string[];
since?: SinceOption;
}): Promise<WorkspacePackage[]> => {
const args = ["list", "--json"];
const args = ["lerna", "list", "--json"];
if (options?.scope) {
options.scope.forEach((scope) => {
args.push(...["--scope", scope]);
Expand All @@ -44,7 +44,7 @@ export const loadWorkspacePackages = async (options?: {
}
}

const { stdout } = await exec("./node_modules/.bin/lerna", args, {
const { stdout } = await exec("yarn", args, {
cwd: PROJECT_ROOT,
encoding: "utf8",
});
Expand Down
Loading

0 comments on commit e66a012

Please sign in to comment.