Repository navigation
Tests: Exempt @wordpress packages from the Vitest consumers release age - #87888
Conversation
The consumer installs packed @wordpress/scripts and @wordpress/eslint-plugin, which pin their @WordPress dependencies to the versions in the checkout. After each npm release those versions are newer than min-release-age allows, so the check failed on every pull request for a day. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🤖 PR meta 🤖🎉 PropsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the |
noruzzamans
left a comment
There was a problem hiding this comment.
Tested this locally by running node tools/validation/test-vitest-consumers.mjs --vite=8.0.0 — all consumer checks (commands, config discovery, jsdom, generated CSS, Jest compatibility, and lint defaults) passed cleanly without hitting the @wordpress/* release-age cooldown.
|
I'll merge without formal approval to stop all the CI check errors that are currently happening on all PRs touching package.json |
What?
Stops the "Vitest consumers" check from failing on every pull request for a day after each npm release.
Why?
The check installs packed
@wordpress/scriptsand@wordpress/eslint-pluginin a standalone project, under the samemin-release-age = 1policy as the repository. The packed packages pin their@wordpressdependencies to the versions in the checkout. Right after a release, those versions are less than a day old, so the install fails:Since
@wordpress/prettier-config@5.3.0was published on 2026-12-02 at 16:36 UTC, all 9 jobs have failed on every run, on unrelated pull requests such as #87862. Before that, every run since 2026-11-26 passed. The failure goes away on its own after a day, so it's only noise.How?
The consumer's
.npmrcexempts@wordpress/*from the release-age window withmin-release-age-exclude, which npm supports from 11.17. The repository requires npm 11.18 or later. The window still applies to third-party packages.The exemption covers the whole scope, not only the packages the packer pins. Directly or through each other, the two packed packages depend on 25
@wordpresspackages, and a release publishes new versions of them together.Testing Instructions
@wordpressrelease:npm view @wordpress/prettier-config time --json | tail -2.trunk, intools/validation/fixtures/vitest-consumer/.npmrc, setmin-release-ageto one more than the number of days since that release. This puts the release inside the window, as it is for a day after every release. Runnpm run test:unit:consumers. The install fails withnotargetfor a@wordpresspackage.min-release-agechange.The "Vitest consumers" jobs also run on this pull request, because it changes the fixture.
Use of AI Tools
Written with Claude Code (Claude Opus 5.5), at my direction: Claude found the cause, made the change, and drafted this description.
🤖 Generated with Claude Code