Skip to content

ref(react-router): Reuse shared glob helper - #25982

Closed
nicohrubec wants to merge 1 commit into
developfrom
feat/react-router-reuse-glob-helper
Closed

nicohrubec wants to merge 1 commit into
developfrom
feat/react-router-reuse-glob-helper

Conversation

@nicohrubec

Copy link
Copy Markdown
Member

Why: React Router already depends on the bundler plugins, whose shared globFiles helper provides the same matching options. Reusing it removes React Router's direct glob dependency while preserving cleanup behavior.

How to review: The source map E2E test now verifies that uploaded client maps are deleted and server maps outside the configured pattern remain. Validation passed: development build, React Router lint/type checks and 315 tests, 46 Nuxt deletion/hook tests, 14 helper tests, and the React Router source map E2E test. Repository-wide lint and packaging encounter unrelated Ember issues.

Co-Authored-By: GPT-6 <codex@openai.com>
@nicohrubec nicohrubec self-assigned this Oct 31, 2026
@nicohrubec nicohrubec changed the title refactor(react-router): Reuse shared glob helper ref(react-router): Reuse shared glob helper Oct 31, 2026
@chargome

chargome commented Nov 3, 2026

Copy link
Copy Markdown
Member

@nicohrubec there were some competing prs, I moved all of it into #26014

@chargome chargome closed this Nov 3, 2026
chargome added a commit that referenced this pull request Nov 3, 2026
…router (#26014)

**Why:** `npm audit` flags `glob@13` and `minimatch@10` in
`@sentry/bundler-plugins` and `@sentry/react-router`. Only glob 14 fixes
this. This PR takes over #25981 (@renantatsuo) and #25982 (@nicohrubec)
with their commits kept, and adds two fixes on top:

- React Router now uses `globFiles` from the bundler plugins instead of
its own `glob` dependency.
- The default `filesToDeleteAfterUpload` pattern used the raw build
directory path. On Windows that contains backslashes, which glob treats
as escapes, so source maps were never deleted after upload. The path is
now converted to forward slashes.

The `browser-integration-tests` dev dependency is bumped as well. glob
13 stays in the lockfile through `nx`, `rimraf` and `@vercel/nft`, which
are all dev-only.

**How to review:** The bump and `globFiles` commits are unchanged from
the original PRs. Look at the forward-slash fix in `handleOnBuildEnd.ts`
and the new `glob.test.ts` case that runs the upload patterns against
the new minimatch 11 matcher.

Closes #25969

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: renantatsuo <tatsuorenan@gmail.com>
Co-authored-by: Nicolas Hrubec <nico.hrubec@sentry.io>
Co-authored-by: GPT-6 <codex@openai.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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