fix(release): pin the type toolchain the artifact validator installs - #34
Merged
Conversation
The consumer harness installs with npm and no lockfile, so every version it does not pin floats. It pinned typescript and the @types it names, but not @types/node: that one arrived through bun-types, which asks for '*'. bun reads '*' as the newest version and npm reads it as the latest dist-tag, so the two managers disagreed and the harness got @types/node 22 under bun-types 1.4. The repository never noticed, because it installs with bun against the lockfile. Only the validator installs the other way, and it broke there alone: an empty file failed to compile against bun-types with four missing Node globals, failing the v0.2.3 publish before anything reached npm. Declare @types/node in the catalog and consume it at the root, so bun pins the version the harness now installs. The resolved version does not change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XtPnrL2GXJVhNxFoBDq4yt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The v0.2.3 publish failed in
Pack and validate published artifacts. Nothing reached npm; every step before it passed.The consumer harness in
pack-and-validate.mjsinstalls with npm and--package-lock=false, so anything it does not pin floats. It pinnedtypescript,@types/bun,@types/reactand@types/react-dom, but not@types/node— that one arrived only throughbun-types, which asks for"*".bun and npm read
"*"differently:*tobun.lock)@types/node@25.5.0, the newest version@types/node@22.20.2, thelatestdist-tagbun-types@1.4.2does not compile against@types/node@22. An empty file reproduces it outside this repository:No dependency of ours moved. The
latestdist-tag did, so the same commit that published 0.2.2 would fail today.Change
Declare
@types/nodein the catalog, consume it at the root, and pin it in the harness beside the other type packages. Consuming it at the root is what keeps the pin honest: the catalog value is now the version bun resolves, so the validator cannot drift away from what the repository builds against.The resolved version does not change —
bun.lockalready had 25.5.0, and the only lockfile lines added are the declaration itself.Verification
node ./scripts/npm-publish/pack-and-validate.mjson a realprepare-packages.mjs v0.2.3tree: Validated 10 package tarballs. This is the step that failed; CI does not run it.bun install --frozen-lockfileaccepts the lockfile with no changes.bun run lintandbun run ts:buildpass.Note for later, out of scope here:
@roj-ai/demo,@roj-ai/platform-cliand@roj-ai/sandbox-runtimedeclare"@types/bun": "latest", which re-resolves on every unfrozen install. Same class of problem, different blast radius.🤖 Generated with Claude Code
https://claude.ai/code/session_01XtPnrL2GXJVhNxFoBDq4yt