Repository navigation
[scripts] Bug Fix: wait out minimumReleaseAge boundary in example installs - #8934
Merged
etrepum merged 3 commits intoAug 7, 2026
Merged
Conversation
…talls ## Description The integration tests build each example with a fresh `pnpm install` and no lockfile, so their third-party dependencies resolve against the live registry under the monorepo's 7-day `minimumReleaseAge` (which reaches those installs as the `npm_config_minimum_release_age` pnpm exports to child processes). npm does not require a dependency to exist when the package depending on it is published, so a family that publishes exact-pinned siblings in a loop lands its parent on the registry ahead of the children: 8 of the 10 dependencies `@zag-js/combobox` pins to its own version go up after it, `@zag-js/[email protected]` by 87 seconds. Once that gap ages past the cooldown there is a window of the same width where the parent is mature, an exactly-pinned child is not, and pnpm fails with ERR_PNPM_NO_MATURE_MATCHING_VERSION rather than backtracking to a parent whose whole closure is mature. Across the last four `@zag-js` releases that window is 26s to 88s wide and recurs once per release. This retries the install on that error, three times a minute apart, and gives the installing hooks that budget on top of their timeout. The cooldown is not softened: nothing is added to `minimumReleaseAgeExclude` and no immature version is installed, a retry only succeeds once pnpm accepts the version on its own terms. Other failures still fail on the first attempt. ## Test plan ### Before `examples/node-state-style` failed in the window that opened 2026-08-05T15:12:57Z and closed 87 seconds later: ERR_PNPM_NO_MATURE_MATCHING_VERSION Version 1.43.0 (released 6 days ago) of @zag-js/dismissable does not meet the minimumReleaseAge constraint This error happened while installing the dependencies of @zag-js/[email protected] Registry publish times for that release, showing the parent ahead of the child it pins exactly: 15:12:57.883Z @zag-js/combobox (mature, accepted) 15:14:25.377Z @zag-js/dismissable (87s short, rejected) ### After Exercised against real pnpm output, since detection depends on the error text arriving in `err.stdout`: immature dependency -> retries, then fails through the usual expect() bogus version -> fails immediately, no retry mature dependency -> succeeds, no retry Co-Authored-By: Claude Opus 5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
## Description
The retry added in the previous commit turned `expectSuccessfulExec`'s
`.catch(err => ...)` into a `try`/`catch`. The callback parameter was
`any`, but a catch binding is `unknown` under `strict`, so the existing
`err[prop]` reporting stopped type checking:
scripts/__tests__/integration/utils.mjs(113,57):
error TS18046: 'err' is of type 'unknown'.
Narrow the caught value once, at the top of the handler, so the failure
reporting below reads the same shape it always did.
## Test plan
### Before
`pnpm run ci-check` fails in `tsc-scripts` with TS18046.
### After
`pnpm run ci-check` exits 0 (tsc, tsc-scripts, tsc-extension,
tsc-website, flow, prettier, lint).
Co-Authored-By: Claude Opus 5 <[email protected]>
etrepum
marked this pull request as ready for review
August 5, 2026 23:54
etrepum
requested review from
acywatson,
fantactuka,
ivailop7,
potatowagon and
zurfyx
as code owners
August 5, 2026 23:54
zurfyx
approved these changes
Aug 6, 2026
Merged
This branch was successfully deployed
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.
Description
The integration tests build each example with a fresh
pnpm installand no lockfile, so their third-party dependencies resolve against the live registry under the monorepo's 7-dayminimumReleaseAge(which reaches those installs as thenpm_config_minimum_release_agepnpm exports to child processes).npm does not require a dependency to exist when the package depending on it is published, so a family that publishes exact-pinned siblings in a loop lands its parent on the registry ahead of the children: 8 of the 10 dependencies
@zag-js/comboboxpins to its own version go up after it,@zag-js/[email protected]by 87 seconds. Once that gap ages past the cooldown there is a window of the same width where the parent is mature, an exactly-pinned child is not, and pnpm fails with ERR_PNPM_NO_MATURE_MATCHING_VERSION rather than backtracking to a parent whose whole closure is mature. Across the last four@zag-jsreleases that window is 26s to 88s wide and recurs once per release.This retries the install on that error, three times a minute apart, and gives the installing hooks that budget on top of their timeout. The cooldown is not softened: nothing is added to
minimumReleaseAgeExcludeand no immature version is installed, a retry only succeeds once pnpm accepts the version on its own terms. Other failures still fail on the first attempt.Test plan
Before
examples/node-state-stylefailed in the window that opened 2026-08-05T15:12:57Z and closed 87 seconds later:Registry publish times for that release, showing the parent ahead of the child it pins exactly:
After
Exercised against real pnpm output, since detection depends on the error text arriving in
err.stdout: