diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 674871fa2f6..e0514021577 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -155,7 +155,9 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile - - name: Release canary dry run + # `release.sh` always executes its Step 2/7 workspace build, even when + # `--skip-verify` bypasses the initial verification gate. + - name: Release canary dry run via release.sh internal build run: | git checkout -B master HEAD git checkout -- pnpm-lock.yaml diff --git a/scripts/run-typecheck-build-gaps.mjs b/scripts/run-typecheck-build-gaps.mjs index f6926e3daab..94ea5622ad3 100644 --- a/scripts/run-typecheck-build-gaps.mjs +++ b/scripts/run-typecheck-build-gaps.mjs @@ -49,8 +49,7 @@ function listWorkspacePackages() { function buildSkipsTypeScript(pkg) { const buildScript = pkg.scripts?.build; - const typecheckScript = pkg.scripts?.typecheck; - if (typeof buildScript !== "string" || typeof typecheckScript !== "string") { + if (typeof buildScript !== "string") { return false; } @@ -58,7 +57,7 @@ function buildSkipsTypeScript(pkg) { } const workspacePackages = listWorkspacePackages(); -const buildGapPackages = workspacePackages +const buildGapCandidates = workspacePackages .filter((workspacePkg) => workspacePkg.path !== repoRoot) .map((workspacePkg) => ({ name: workspacePkg.name, @@ -66,6 +65,17 @@ const buildGapPackages = workspacePackages pkg: readJson(path.join(workspacePkg.path, "package.json")), })) .filter(({ pkg }) => buildSkipsTypeScript(pkg)); +const packagesMissingTypecheck = buildGapCandidates.filter( + ({ pkg }) => typeof pkg.scripts?.typecheck !== "string", +); +for (const workspacePkg of packagesMissingTypecheck) { + console.warn( + `[typecheck:build-gaps] warning: ${workspacePkg.name} has a build script without tsc but no explicit typecheck script.`, + ); +} +const buildGapPackages = buildGapCandidates.filter( + ({ pkg }) => typeof pkg.scripts?.typecheck === "string", +); console.log( `[typecheck:build-gaps] typechecking ${buildGapPackages.length} workspace(s): ${buildGapPackages.map(({ name }) => name).join(", ") || "(none)"}`,