docs(publishing): record the version-bump trap that cost time cutting 0.4.0 - #165
Open
TheBlackBit wants to merge 1 commit into
Open
docs(publishing): record the version-bump trap that cost time cutting 0.4.0#165TheBlackBit wants to merge 1 commit into
TheBlackBit wants to merge 1 commit into
Conversation
… 0.4.0 `npm version -w …` bumps each package's own version but does NOT rewrite the storefront's dependency range on the gate. That range is the whole point of lockstep versioning — `^0.3.1` means >=0.3.1 <0.4.0, so leaving it publishes a 0.4.0 storefront that resolves a 0.3.x gate off the registry. The failure mode is worse than the omission. In the intermediate state npm can no longer satisfy the old range from the workspace, so it installs the PUBLISHED old gate into a nested packages/credentagent-storefront/node_modules/. tsc then resolves against that stale copy and fails with "has no exported member 'Branding'" — which reads like a broken barrel or a missing export, not a stale resolution. `npm install --package-lock-only` does not clear it; a plain `npm install` does. Also records the pipeline gotcha from the same session: `npm run build 2>&1 | tail` returns tail's exit status, so a `cmd | tail && next` chain walks past a failing build. Pre-flight results reported as green need pipefail or an explicit exit-code check. Both were hit cutting 0.4.0 (#162) and were until now recorded only in that PR's body, where nobody cutting the next release would find them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Ever Morales <ever.morales@koombea.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
In plain terms
Documentation only — one file, no code.
While cutting the 0.4.0 release, two things went wrong that the release checklist did not warn about. Both were figured out and worked around, but the knowledge ended up buried in a merged pull request description, where nobody cutting the next release would ever find it. This writes both into
docs/PUBLISHING.md, which is the page you actually read when releasing.What you're approving
docs/PUBLISHING.md. A new section, and one sentence added to the existing step 1 pointing at it. No code, no configuration, nothing that runs.The two things being recorded
1 · The version-bump tool doesn't finish the job. These two packages are always released with the same version number, and one of them lists the other as a required package "version 0.3.1 or newer, but below 0.4.0". The standard command for bumping versions updates each package's own number but silently leaves that requirement line alone. Miss it, and you publish a new storefront that goes and downloads the old gate — the exact thing matching version numbers exists to prevent.
What makes it worth writing down is not the omission but how it announces itself. Halfway through, the build fails with:
which reads like something is broken in the source code. Nothing is. The package is quietly reading a stale copy of the old version that got downloaded into a hidden folder. The section names the error, explains why it happens, and gives the fix — a plain
npm install, since the abbreviated--package-lock-onlyform does not clear it.2 · A shell habit that can make a failing build look like a passing one. Piping a command into
tailto shorten its output replaces its success-or-failure signal withtail's, which always succeeds. A chained command sequence then continues as if everything passed. This happened during the 0.4.0 pre-flight: the build had failed and the test and lint steps ran anyway, and the result was briefly reported as green when it was not. The note says to check exit codes directly whenever a pre-flight result is going to be called green.How to test
Read the rendered file on this branch and confirm the new section reads clearly and the link in step 1 jumps to it.
For reviewers — the detail
Section 1 — the dependency range
npm version X.Y.Z -w @openmobilehub/credentagent-gate -w @openmobilehub/credentagent-storefront --no-git-tag-versionupdates bothversionfields and leavesdependencies["@openmobilehub/credentagent-gate"]untouched. Because^0.3.1desugars to>=0.3.1 <0.4.0, a 0.4.0 storefront published with that range resolves a 0.3.x gate from the registry. The lockstep convention exists to keep the two in agreement, and this line is the only thing that actually enforces it at install time.The observed failure chain, in order:
^0.3.1.packages/credentagent-storefront/node_modules/@openmobilehub/credentagent-gate.npm install --package-lock-only, run after correcting the range, updates the lockfile but does not touchnode_modules— the nested copy survives.tsc --traceResolutionconfirms the resolution:successfully resolved to '…/packages/credentagent-storefront/node_modules/@openmobilehub/credentagent-gate/dist/index.d.ts' with Package ID '…@0.3.1'.Brandingis new in 0.4.0, so 0.3.1's declarations do not have it →TS2305.The section documents the plain
npm installas the fix and gives a one-liner asserting all three values (both versions and the range) read the new version.Section 2 — the pipefail note
Written as a blockquote inside the same section rather than a heading of its own, since it is a caution about how you verify rather than a step in the process. Scoped deliberately narrowly — "whenever a pre-flight result is going to be reported as green" — rather than a blanket rule about pipes, which would be noise.
Placement
Step 1 of "How a release ships" gains a pointer; the section itself sits between "How a release ships" and "Optional polish", so it is adjacent to the step it concerns without interrupting the numbered sequence. The in-page anchor
#the-version-bump-trap-npm-version-does-not-do-all-of-itmatches GitHub's slug for the heading (backticks and parentheses stripped, spaces hyphenated) — verified against the heading text rather than assumed.Both issues were hit cutting 0.4.0 in #162; this moves them from that PR body into the checklist.
🤖 Generated with Claude Code