fix(release): compile only publishable src projects before payload verify (#13238)

The verify step ran pn compile-only, whose typecheck-everything graph
includes test tsconfigs; the release runner install does not provide
the test-only devDependencies, so the v11.17.0 release failed with
TS2307 errors before verification began. Build only the publishable
projects own tsconfigs instead: the packed payloads need nothing else,
and the build-artifacts step already proved the src graph compiles in
this environment.
This commit is contained in:
Zoltan Kochan authored and GitHub committed 2026-07-23 17:30:48 +02:00
1 parent 1d3c3d808f
commit d1d53e484b
1 file changed
+15 -6
+15 -6
View File
@@ -398,28 +398,37 @@ jobs:
# steps below will use and reports every tarball's file list, so a
# packing regression fails here, before the first immutable npm
# publish. `pnpm pack` does not run `prepublishOnly`, so the
# compiled payloads are built first with the same script CI uses
# (mostly warm after the build-artifacts step above). The
# publishable projects' src tsconfigs are built first — only those:
# the typecheck-everything graph also drags in test tsconfigs,
# whose devDependencies this runner's install does not provide
# (mostly warm after the build-artifacts step above anyway). The
# publishable projects are selected by explicit name filters:
# unlike recursive publish, recursive pack does not skip private
# packages, and packing the private workspace root would walk the
# whole repository.
run: |
set -euo pipefail
pn compile-only
verify_dir=$(mktemp -d)
pn list --filter=!pnpm --filter=!@pnpm/exe --depth=-1 --json > "$verify_dir/projects.json"
filters=()
while IFS= read -r filter; do
filters+=("$filter")
tsconfig_dirs=()
while IFS=$'\t' read -r name dir; do
filters+=("--filter=$name")
if [ -n "$dir" ]; then
tsconfig_dirs+=("$dir")
fi
done < <(node -e '
const { existsSync } = require("node:fs")
const { join } = require("node:path")
const projects = JSON.parse(require("node:fs").readFileSync(process.argv[1], "utf8"))
for (const project of projects) {
if (!project.private && project.name && project.version && project.path) {
console.log(`--filter=${project.name}`)
const dir = existsSync(join(project.path, "tsconfig.json")) ? project.path : ""
console.log(`${project.name}\t${dir}`)
}
}
' "$verify_dir/projects.json")
pn exec tsgo --build "${tsconfig_dirs[@]}"
# Recursive pack runs one project at a time, so pack in four
# concurrent chunks; dry-run packing only reads the tree.
chunk_size=$(( (${#filters[@]} + 3) / 4 ))