chore(release): prove the candidate against real applications first - #109
Merged
Conversation
A library with no outside users only learns it broke something after it has broken it. The usual answer is to wait for users; the faster one is to point this at the applications that already depend on the library and let them fail before the release rather than inside it. npm run consumers -- <path> [<path>...] packs the candidate, installs the tarball into each application with --no-save, runs that application's own build, then puts the previous dependency back. A failure is reported and the run continues, so one broken consumer does not hide the others. It names no application: the paths are arguments, so the repo stays the standalone building block it claims to be.
|
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.



Why
A library with no outside users only learns it broke something after it has
broken it. The usual answer is "wait for users". The faster one is that real
applications already depend on this library, and they can fail here instead of
inside a release.
That is not hypothetical: the foreign-backup defect fixed in #58 was found
because a real application was handed the wrong file by a person, not because a
test caught it. Every version so far has been published first and verified in
the consumers afterwards, one bump at a time.
What it does
Packs the release candidate, installs that exact tarball into each application
with
--no-save, runs the application's own build, then puts the previousdependency back with
npm ci.are the bytes npm would publish, not a workspace that happens to resolve.
--no-saveleavespackage.jsonand thelockfile alone, so this never shows up as a change in an application's repo,
and the restore step means no repository is left pinned to an unpublished
tarball where a later build or deploy would pick it up.
the run continues, so the output is the state of all of them.
standalone building block it claims to be, and the rule in CLAUDE.md holds.
Verified for real
Run against three applications that depend on this library today, on 1.8.20:
They were on three different versions, which is exactly the drift this closes:
each was going to discover the new version separately, after publication.
Verification
Gate green, exit 0. 780 tests over 65 files.
knipdeclaresscripts/*.mjsasan entry, so the script is not read as dead code.