From fc438ff2bf20560f78512191202885e9960cc15c Mon Sep 17 00:00:00 2001 From: Greg Soltis Date: Thu, 10 Feb 2022 10:50:52 -0800 Subject: [PATCH 1/3] Light tweaks to make existing benchmarks run --- cli/Makefile | 2 +- cli/scripts/generate.mjs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/Makefile b/cli/Makefile index 483486dc9dd5b..02237a8836c0c 100644 --- a/cli/Makefile +++ b/cli/Makefile @@ -244,7 +244,7 @@ demo/lerna: | scripts/node_modules demo/nx: | scripts/node_modules node scripts/generate.mjs nx -demo/turbo: | scripts/node_modules +demo/turbo: | scripts/node_modules turbo node scripts/generate.mjs turbo bench/lerna: demo/lerna diff --git a/cli/scripts/generate.mjs b/cli/scripts/generate.mjs index d37f450de8f68..fb54e3a0a7a99 100644 --- a/cli/scripts/generate.mjs +++ b/cli/scripts/generate.mjs @@ -57,8 +57,8 @@ packageGraph.forEachNode((node) => { const root = path.join(__dirname, "../demo", type); function generate(root, skipInstall) { + fs.mkdirSync(root, { recursive: true }); if (type !== "nx") { - fs.mkdirSync(root, { recursive: true }); fs.writeFileSync( path.join(root, ".gitignore"), `node_modules @@ -265,7 +265,7 @@ module.exports = { ); // instead of dealing with actual code, just list as implicitDependencies const safeName = node.data.name.replace(/^@[^/]+\//, ""); - const workspace = fs.readJSONSync(path.join(root, "nx.json")); + const workspace = fs.readJSONSync(path.join(root, "workspace.json")); workspace.projects[safeName] = { ...workspace.projects[safeName], implicitDependencies: node.data.implicitDependencies || [], From 9887af116a796f774d30eea6857863fe44f7a308 Mon Sep 17 00:00:00 2001 From: Greg Soltis Date: Thu, 10 Feb 2022 10:55:01 -0800 Subject: [PATCH 2/3] Only bench/turbo needs to depend on turbo. Remove bench/turbo-new, it does not work --- cli/Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/cli/Makefile b/cli/Makefile index 02237a8836c0c..1ac8c222775f1 100644 --- a/cli/Makefile +++ b/cli/Makefile @@ -244,7 +244,7 @@ demo/lerna: | scripts/node_modules demo/nx: | scripts/node_modules node scripts/generate.mjs nx -demo/turbo: | scripts/node_modules turbo +demo/turbo: | scripts/node_modules node scripts/generate.mjs turbo bench/lerna: demo/lerna @@ -256,12 +256,9 @@ bench/lage: demo/lage bench/nx: demo/nx cd demo/nx && node_modules/.bin/nx run-many --target=build --all -bench/turbo: demo/turbo +bench/turbo: demo/turbo turbo cd demo/turbo && ../../turbo run test -bench/turbo-new: demo/turbo - cd demo/turbo && ../../turbo-new run build test - bench: bench/lerna bench/lage bench/nx bench/turbo clean: From 4272575153d6a98f48ca0ccad7670dbcfd07d7a2 Mon Sep 17 00:00:00 2001 From: Greg Soltis Date: Thu, 10 Feb 2022 13:52:28 -0800 Subject: [PATCH 3/3] Add back bench/turbo-new --- cli/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cli/Makefile b/cli/Makefile index 1ac8c222775f1..a1c0bbdc1e56f 100644 --- a/cli/Makefile +++ b/cli/Makefile @@ -259,6 +259,9 @@ bench/nx: demo/nx bench/turbo: demo/turbo turbo cd demo/turbo && ../../turbo run test +bench/turbo-new: demo/turbo + cd demo/turbo && ../../turbo-new run build test + bench: bench/lerna bench/lage bench/nx bench/turbo clean: