Repository navigation
Repair wp/6.5 branch Actions: Ignore the stale Browserslist data warning in unit tests - #82993
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
Size Change: 0 B Total Size: 1.72 MB ℹ️ View Unchanged
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. If 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:
|
ac609ed to
4b707e0
Compare
4b707e0 to
3e2e793
Compare
3e2e793 to
d9d196a
Compare
b40ba23 to
9884fd4
Compare
9884fd4 to
b800f34
Compare
b800f34 to
b9dc482
Compare
wp/6.5 branch Actions: Ignore stale Browserslist data warning in unit testswp/6.5 branch Actions: Ignore the stale Browserslist data warning in unit tests
b9dc482 to
6df70b4
Compare
6df70b4 to
6fe7c75
Compare
Part of #82928.
What?
This configures Jest to ignore the stale Browserslist data warning when running tests.
Why?
Browserslist's bundled
caniuse-litedatabase on this branch is old enough to print aconsole.warnthe first time it's consulted during a test run.@wordpress/jest-consoleautomatically fails any test where an unexpectedconsole.warnoccurs, so whichever suite happens to invoke Browserslist first fails — even though none of them are actually testing anything related to Browserslist or console output.This branch's
package-lock.jsonpinscaniuse-liteto1.0.30001579, published in January 2024 — well past the roughly six-month staleness threshold Browserslist warns at — so this branch is affected.How?
This is adapted by hand from commit a468930, which was committed directly to the
wp/7.0branch and configuresBROWSERSLIST_IGNORE_OLD_DATAintest/unit/jest.config.js. It couldn't be cleanly cherry-picked here: this branch'stest/unit/jest.config.jspredates theprocess.env.TZ = 'UTC';line the original change was anchored to, so the same two-line change (setting the environment variable, with the same explanatory comment) was applied directly instead.This was never merged forward to
wp/7.1ortrunkbecause those branches instead keepcaniuse-liteitself genuinely fresh via routine dependency-bump PRs (e.g. #79630), which isn't a viable long-term strategy for a frozen maintenance branch like this one.Use of AI Tools
This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.