Skip to content

chore(release): prove the candidate against real applications first - #109

Merged
florianmousseau merged 1 commit into
mainfrom
chore/verify-consumers
Jul 31, 2026
Merged

chore(release): prove the candidate against real applications first#109
florianmousseau merged 1 commit into
mainfrom
chore/verify-consumers

Conversation

@florianmousseau

Copy link
Copy Markdown
Contributor

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

npm run consumers -- ../app-one ../app-two

Packs the release candidate, installs that exact tarball into each application
with --no-save, runs the application's own build, then puts the previous
dependency back with npm ci.

  • The tarball, not the source folder: the bytes each application installs
    are the bytes npm would publish, not a workspace that happens to resolve.
  • Nothing tracked is touched: --no-save leaves package.json and the
    lockfile 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.
  • One failure does not hide the others: a broken consumer is reported and
    the run continues, so the output is the state of all of them.
  • It names no application. Paths are arguments. The repo stays the
    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:

ok       app A       was on 1.8.18
ok       app B       was on 1.8.16
ok       app C       was on 1.8.16

every application still builds. Safe to release.

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. knip declares scripts/*.mjs as
an entry, so the script is not read as dead code.

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.
@sonarqubecloud

Copy link
Copy Markdown

@florianmousseau
florianmousseau merged commit 7e03d43 into main Jul 31, 2026
7 checks passed
@florianmousseau
florianmousseau deleted the chore/verify-consumers branch July 31, 2026 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant