Skip to content

Repair wp/6.7 branch Actions: Ignore stale Browserslist data warning in unit tests - #55

Closed
desrosj wants to merge 1 commit into
fix-actions-6.7/pin-wp-env-core-versionfrom
fix-actions-6.7/ignore-browserslist-old-data
Closed

desrosj wants to merge 1 commit into
fix-actions-6.7/pin-wp-env-core-versionfrom
fix-actions-6.7/ignore-browserslist-old-data

Conversation

@desrosj

@desrosj desrosj commented Aug 26, 2026

Copy link
Copy Markdown
Owner

What?

This configures Jest to ignore the stale Browserslist data warning when running tests.

Why?

Browserslist's bundled caniuse-lite database on this branch is old enough that it can print a console.warn the first time it's consulted during a test run. @wordpress/jest-console automatically fails any test where an unexpected console.warn occurs, so whichever suite happens to invoke Browserslist first would fail — even though none of them are actually testing anything related to Browserslist or console output.

How?

This is the same fix as commit a468930, which was committed directly to the wp/7.0 branch and configures BROWSERSLIST_IGNORE_OLD_DATA in test/unit/jest.config.js. It was applied by hand here rather than cherry-picked, because wp/6.7's test/unit/jest.config.js predates the process.env.TZ line the original commit anchors its change on.

This was never merged forward to wp/7.1 or trunk because those branches instead keep caniuse-lite itself genuinely fresh via routine dependency-bump PRs (e.g. WordPress#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.

@desrosj
desrosj force-pushed the fix-actions-6.7/ignore-browserslist-old-data branch from 80e1d30 to 23a2140 Compare August 26, 2026 13:13
@desrosj
desrosj force-pushed the fix-actions-6.7/ignore-browserslist-old-data branch from 23a2140 to 58d09de Compare August 26, 2026 14:15
@desrosj
desrosj force-pushed the fix-actions-6.7/ignore-browserslist-old-data branch from 58d09de to fde256d Compare August 26, 2026 18:34
@desrosj
desrosj force-pushed the fix-actions-6.7/ignore-browserslist-old-data branch from fde256d to 190b117 Compare August 27, 2026 00:20
@desrosj
desrosj force-pushed the fix-actions-6.7/ignore-browserslist-old-data branch from 190b117 to f0a5d9f Compare August 27, 2026 00:45
@desrosj
desrosj force-pushed the fix-actions-6.7/ignore-browserslist-old-data branch from f0a5d9f to b6bd64c Compare August 27, 2026 15:09
@desrosj
desrosj removed this pull request from stack #90 September 10, 2026 19:33
@desrosj
desrosj force-pushed the fix-actions-6.7/ignore-browserslist-old-data branch from b6bd64c to 166ad98 Compare September 10, 2026 19:35
@desrosj
desrosj added this pull request to stack #185 September 10, 2026 19:36
@desrosj
desrosj force-pushed the fix-actions-6.7/ignore-browserslist-old-data branch from 166ad98 to c405879 Compare September 10, 2026 23:57
@desrosj
desrosj force-pushed the fix-actions-6.7/ignore-browserslist-old-data branch from c405879 to 05d0fc5 Compare September 11, 2026 00:28
@desrosj
desrosj force-pushed the fix-actions-6.7/ignore-browserslist-old-data branch from 05d0fc5 to 93320c2 Compare September 11, 2026 01:14
@desrosj
desrosj force-pushed the fix-actions-6.7/ignore-browserslist-old-data branch from 93320c2 to 71eb8c1 Compare September 11, 2026 02:18
@desrosj
desrosj marked this pull request as ready for review September 11, 2026 02:44
@desrosj
desrosj marked this pull request as draft September 11, 2026 03:22
@github-actions

Copy link
Copy Markdown

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: desrosj <desrosj@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@desrosj
desrosj force-pushed the fix-actions-6.7/ignore-browserslist-old-data branch from 71eb8c1 to 66b389a Compare September 14, 2026 01:47
Browserslist's bundled `caniuse-lite` database on this branch is old
enough to print a `console.warn` the first time it is consulted
during a test run. `@wordpress/jest-console` fails any test where an
unexpected `console.warn` occurs, so whichever suite happens to
invoke Browserslist first fails, even though none of them test
anything related to Browserslist or console output.

Applied by hand rather than cherry-picked from `wp/7.0`, since this
branch's `test/unit/jest.config.js` predates the `process.env.TZ`
line the original commit anchors on.
@desrosj
desrosj force-pushed the fix-actions-6.7/ignore-browserslist-old-data branch from 66b389a to 8f52682 Compare September 14, 2026 19:07
@desrosj
desrosj marked this pull request as ready for review September 14, 2026 19:29
@desrosj
desrosj marked this pull request as draft September 14, 2026 19:31
@desrosj
desrosj marked this pull request as ready for review September 14, 2026 19:38
@desrosj

desrosj commented Sep 15, 2026

Copy link
Copy Markdown
Owner Author

Migrated to real upstream: WordPress#82901. Closing this fork PR.

@desrosj desrosj closed this Sep 15, 2026
@desrosj
desrosj deleted the fix-actions-6.7/ignore-browserslist-old-data branch October 29, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant