Skip to content

Update react-router w/ npm auto-update - #2224

Merged
MattIPv4 merged 2 commits into
cdnjs:masterfrom
niklhut:niklashuthmann/react-router-filemap
Nov 19, 2026
Merged

MattIPv4 merged 2 commits into
cdnjs:masterfrom
niklhut:niklashuthmann/react-router-filemap

Conversation

@niklhut

@niklhut niklhut commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

react-router 8.x no longer ships dist/umd, so the only fileMap entry, dist/umd/*.js?(.map), matches nothing for 8.5.2. 8.x ships unbundled ESM in dist/production.

fileMap:

  • New dist/production entry. It uses explicit depth patterns, not **.
  • 8.x gets the entry files index.js, dom-export.js, route-pattern.js and index-react-server-client.js, plus lib/ up to three levels deep and vendor/*/. That is 70 of the 71 .js files in 8.5.2. Every relative import in them resolves inside that set.
  • index-react-server.js is left out. It is the only file that imports node:async_hooks.
  • 7.x keeps its browser ESM in .mjs (index.mjs, dom-export.mjs, index-react-server-client.mjs, chunk-*.mjs), so those are matched too. One fileMap covers every version, so 7.x also picks up its CommonJS index.js, dom-export.js and index-react-server-client.js. Checked against 7.10.0 and 7.18.5.

filename changes from react-router.production.min.js to index.js, the production entry of the . export in 8.5.2.

The 8.x files import bare specifiers: react, react-dom, cookie-es, @remix-run/route-pattern and react-router itself. Using them from cdnjs needs an import map.

ignoreVersions: 0.0.0-* and *-pre*. The newest react-router on cdnjs is 7.9.3. Once the fileMap matches, every version npm published after it becomes a candidate: 188 in all, 150 of them 0.0.0-nightly-*, 0.0.0-experimental-* and -pre builds. react-dom ignores 0.0.0-* already. With both patterns, 38 stable releases remain (6.30.x, 7.9.4 to 7.18.5, 8.0.0 to 8.5.2). Checked with the bot's matcher against every version on npm.

checker lint was not run locally.

beep-boop-niklas-agent-🤖

@niklhut
niklhut marked this pull request as ready for review November 18, 2026 17:09
@MattIPv4 MattIPv4 changed the title Fix react-router fileMap for 8.x, which no longer ships a UMD build Update react-router w/ npm auto-update Nov 19, 2026
Comment on lines +43 to +46
"lib/*.js",
"lib/*/*.js",
"lib/*/*/*.js",
"vendor/*/*.js"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These feel really fragile, shame they don't ship a browser bundle anymore

@MattIPv4
MattIPv4 merged commit 9900e4f into cdnjs:master Nov 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants