-
fix(release): let pnpm version run on the version-injected tree
发布于
2026-08-18 03:59:22 +00:00 The Release workflow for v2.5.1 failed at "Build and test all packages",
so Maven Central, PyPI, npm, the GitHub Release and the reference-docs
push were all skipped. The tag exists but nothing shipped:gh release view v2.5.1is "not found", npm is still 2.5.0, PyPI 2.5.1 is a 404.build-all.sh injects the release version into each ecosystem before
building it --mvn versions:setfor Java,sedfor pyproject.toml,
pnpm versionfor Node. Java and Python come first, so by the time the
Node stage runs the tree necessarily has modifications. pnpm 11 added a
clean-working-tree gate toversion(opts.gitChecks !== falseguarding
isWorkingTreeClean) and aborts:[ERR_PNPM_UNCLEAN_WORKING_TREE] Working tree is not clean.pnpm 10 had no such gate, which is why this only appeared once
a7789b8
moved CI from pnpm 10 to 11. Release only runs on tag push, so v2.5.1 was
the first tag to exercise that combination.c9de934fixed a real instance of this -- a stale samples/json/lorem.json
rewritten by every Java build -- and that fix is in v2.5.1 and holds: a
fullmvn clean installnow leaves the tree clean. What remains is the
version injection itself.mvn versions:setrewrites java/pom.xml plus
the cli and core poms, and no amount of sample regeneration makes that go
away, so the gate has to be opted out of rather than satisfied.--no-git-checks is the narrowest fix. The gate guards against creating a
version commit or tag on top of uncommitted work, and --no-git-tag-version
already disables both, so nothing it protects applies here. The dirty tree
is this script's own deliberate output, three lines earlier.Verified locally on pnpm 11.21.0, java/python manifests dirtied to match
the CI state:pnpm version 2.5.1 --no-git-tag-version --allow-same-version
reproduces ERR_PNPM_UNCLEAN_WORKING_TREE, the same command with
--no-git-checks bumps 0.0.0 -> 2.5.1, and build-node.sh then builds and
passes all 33 tests. Confirmedpnpm install --frozen-lockfilehas no
such gate and succeeds on a dirty tree, and that this is the only
pnpm versioncall site in the repo.Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
下载附件