Repository navigation
Repair wp/6.4 branch Actions: Ignore the stale Browserslist data warning in unit tests - #83684
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 ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Size Change: 0 B Total Size: 1.63 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. You can also manually ask me to refresh this list by adding the 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. |
49a9b90 to
f65a17a
Compare
f65a17a to
24e1dba
Compare
24e1dba to
4bcc7ca
Compare
4bcc7ca to
5f45852
Compare
wp/6.4 branch Actions: Ignore Browserslist old-data warning in unit testswp/6.4 branch Actions: Ignore the stale Browserslist data warning in unit tests
5f45852 to
0790069
Compare
0790069 to
f26c54c
Compare
Part of #82929.
What?
Sets
process.env.BROWSERSLIST_IGNORE_OLD_DATA = 'true'intest/unit/jest.config.js, suppressing Browserslist's warning about its bundledcaniuse-litedata being outdated.Why?
This branch's
package-lock.jsonpinscaniuse-lite@1.0.30001513, published 2023-07-07, well past the roughly six-month threshold at which Browserslist starts printing aconsole.warnthe first time it is consulted during a test run.@wordpress/jest-consolefails any test where an unexpectedconsole.warnoccurs, so whichever suite happens to invoke Browserslist first fails, even though none of them test anything related to Browserslist or console output. This is an actively firing failure on this branch, not a defensive-only fix.How?
Adapted by hand from commit a468930 ("Tests: Ignore Browserslist old data warning in unit tests"). That commit anchors its insertion right after a
process.env.TZ = 'UTC';line that does not exist in this branch'stest/unit/jest.config.js, so the same two-line change is placed immediately after thetranspiledPackageNamesblock instead.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.