Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/workspace-plan.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ function requiredCapabilitiesFor(entrypoint, packageSummary = {}) {
}
if (blocker.code === "build-required") {
capabilities.add("build");
capabilities.add("dependency-install");
}
if (blocker.code === "ts-loader-required") {
capabilities.add("ts-loader");
Expand Down
7 changes: 5 additions & 2 deletions test/workspace-plan.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ test("workspace plan maps blocked entrypoints to opt-in install/build/capture st
assert.equal(plan.optIn.env, "TEST_EXEC=1");
assert.equal(plan.summary.entrypointCount, 2);
assert.equal(plan.summary.artifactStepCount, 2);
assert.equal(plan.summary.installStepCount, 1);
assert.equal(plan.summary.auditStepCount, 1);
assert.equal(plan.summary.installStepCount, 2);
assert.equal(plan.summary.auditStepCount, 2);
assert.equal(plan.summary.pruneDevWorkspaceDependencyStepCount, 1);
assert.equal(plan.summary.buildStepCount, 1);
assert.equal(plan.summary.captureStepCount, 2);
Expand Down Expand Up @@ -87,6 +87,9 @@ test("workspace plan maps blocked entrypoints to opt-in install/build/capture st
const buildEntrypoint = plan.fixtures[0].entrypoints.find((item) => item.packageName === "build-fixture");
assert.ok(buildEntrypoint);
assert.ok(buildEntrypoint.requiredCapabilities.includes("build"));
assert.ok(buildEntrypoint.requiredCapabilities.includes("dependency-install"));
assert.ok(buildEntrypoint.steps.some((step) => step.kind === "install" && step.command === "npm install --ignore-scripts"));
assert.ok(buildEntrypoint.steps.some((step) => step.kind === "audit" && step.command.includes("npm audit --json")));
assert.ok(buildEntrypoint.steps.some((step) => step.kind === "build" && step.command === "npm run build"));
assert.match(renderWorkspacePlanMarkdown(plan), /Entrypoint Workspaces/);
});
Expand Down
Loading