Skip to content

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

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

desrosj wants to merge 1 commit into
fix-actions-6.6/pin-wp-env-core-versionfrom
fix-actions-6.6/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 to 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 fails — even though none of them are actually testing anything related to Browserslist or console output.

package-lock.json on this branch pins caniuse-lite at 1.0.30001636, published 2024-06-16 — well past the roughly six-month threshold Browserslist uses to decide the data is stale enough to warn about.

How?

This is based on 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 couldn't be cherry-picked cleanly here — that commit anchors its change immediately after a process.env.TZ = 'UTC'; line that doesn't exist in wp/6.6's copy of test/unit/jest.config.js — so the same two-line change was applied by hand instead.

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.6/ignore-browserslist-old-data branch from 8310f63 to 9f51e2e Compare August 26, 2026 05:48
@desrosj
desrosj force-pushed the fix-actions-6.6/ignore-browserslist-old-data branch 2 times, most recently from 5487742 to 35f7e58 Compare August 26, 2026 14:16
@desrosj
desrosj force-pushed the fix-actions-6.6/ignore-browserslist-old-data branch from 35f7e58 to 88977f7 Compare August 26, 2026 18:33
@desrosj
desrosj force-pushed the fix-actions-6.6/ignore-browserslist-old-data branch from 88977f7 to 5a40d9f Compare August 27, 2026 00:23
@desrosj
desrosj force-pushed the fix-actions-6.6/ignore-browserslist-old-data branch from 5a40d9f to b967e10 Compare August 27, 2026 15:08
@desrosj
desrosj removed this pull request from stack #91 September 10, 2026 19:36
@desrosj
desrosj force-pushed the fix-actions-6.6/ignore-browserslist-old-data branch from b967e10 to 33a1ede Compare September 10, 2026 19:36
@desrosj
desrosj added this pull request to stack #186 September 10, 2026 19:37
@desrosj
desrosj force-pushed the fix-actions-6.6/ignore-browserslist-old-data branch from 33a1ede to efab69e Compare September 10, 2026 23:52
@desrosj
desrosj force-pushed the fix-actions-6.6/ignore-browserslist-old-data branch from efab69e to f1b49a0 Compare September 11, 2026 00:29
@desrosj
desrosj force-pushed the fix-actions-6.6/ignore-browserslist-old-data branch from f1b49a0 to 35d5039 Compare September 11, 2026 01:14
@desrosj
desrosj force-pushed the fix-actions-6.6/ignore-browserslist-old-data branch 2 times, most recently from b0d79ce to c192292 Compare September 14, 2026 01:34
@desrosj
desrosj force-pushed the fix-actions-6.6/ignore-browserslist-old-data branch from c192292 to a7e8a83 Compare September 14, 2026 19:19
@desrosj
desrosj marked this pull request as ready for review September 14, 2026 23:59
@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.

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, since this branch's
`test/unit/jest.config.js` predates the `process.env.TZ` line the
original patch anchors on. Based on the fix originally committed
directly to `wp/7.0`, with no associated pull request.
@desrosj
desrosj force-pushed the fix-actions-6.6/ignore-browserslist-old-data branch from a7e8a83 to 1695111 Compare September 15, 2026 00:10
@desrosj
desrosj removed this pull request from stack #186 September 15, 2026 00:25
@desrosj
desrosj added this pull request to stack #354 September 15, 2026 00:26
@desrosj

desrosj commented Sep 15, 2026

Copy link
Copy Markdown
Owner Author

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

@desrosj desrosj closed this Sep 15, 2026
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