Skip to content

[scripts] Bug Fix: wait out minimumReleaseAge boundary in example installs - #8934

Merged
etrepum merged 3 commits into
meta:mainfrom
etrepum:claude/version-constraint-release-age-4ua4h8
Aug 7, 2026
Merged

etrepum merged 3 commits into
meta:mainfrom
etrepum:claude/version-constraint-release-age-4ua4h8

Conversation

@etrepum

@etrepum etrepum commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

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

…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]>
@vercel

vercel Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lexical Ready Ready Preview Aug 5, 2026 11:42pm
lexical-playground Ready Ready Preview Aug 5, 2026 11:42pm

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 5, 2026
## 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
etrepum added this pull request to the merge queue Aug 7, 2026
Merged via the queue into meta:main with commit a56df49 Aug 7, 2026
44 checks passed
@etrepum etrepum mentioned this pull request Aug 31, 2026

This branch was successfully deployed

2 active deployments
Preview – lexical — 8223eb03 Deployed Aug 5, 2026 by vercel[bot]
Preview – lexical-playground — 8223eb03 Deployed Aug 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. extended-tests Run extended e2e tests on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants