Skip to content

chore: Raise browserslist for modern bundlers, and fix old Jest#9831

Merged
devongovett merged 13 commits intomainfrom
raise-browserslist
Mar 24, 2026
Merged

chore: Raise browserslist for modern bundlers, and fix old Jest#9831
devongovett merged 13 commits intomainfrom
raise-browserslist

Conversation

@devongovett
Copy link
Copy Markdown
Member

@devongovett devongovett commented Mar 23, 2026

Raises the Browserslist for our packages to baseline widely available so that less syntax gets transpiled, except for the legacy .js versions used by webpack 4 (which does not support parsing optional chaining). Now Parcel compiles three different versions of every file (CJS, ESM modern, and ESM legacy).

Also fixes compatibility with Jest < 28, which doesn't support package exports (like webpack 4) but also only supports Common JS. So now for each subpath, we create a directory containing both CJS and ESM shims plus a package.json with "main" and "module" fields. Pretty ridiculous but otherwise we'd have to bump a major version.

@github-actions github-actions Bot added the RAC label Mar 23, 2026
@github-actions github-actions Bot added the S2 label Mar 24, 2026
@devongovett devongovett changed the title chore: Raise browserslist for modern bundlers chore: Raise browserslist for modern bundlers, and fix old Jest Mar 24, 2026
@devongovett devongovett marked this pull request as ready for review March 24, 2026 04:32
This reverts commit 2c3240a.
let express = false;
try {
provider = useProvider();
express = (useProvider() as any).theme.global.express;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to deal with compiling a third version of every icon to support optional chaining in webpack 4.

"next/@swc/helpers": "0.4.36"
}
},
"browserslist": "defaults"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prevents nextjs picking up the browserslistrc at the root of the repo (the version used here is old and doesn't support baseline queries)

@rspbot
Copy link
Copy Markdown

rspbot commented Mar 24, 2026

@devongovett devongovett added this pull request to the merge queue Mar 24, 2026
Merged via the queue into main with commit 14af59b Mar 24, 2026
31 checks passed
@devongovett devongovett deleted the raise-browserslist branch March 24, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants