Skip to content

Fix repo path validation for framework-specific route segments - #1190

Open
sentry[bot] wants to merge 2 commits into
mainfrom
seer/fix/repo-path-validation
Open

Fix repo path validation for framework-specific route segments#1190
sentry[bot] wants to merge 2 commits into
mainfrom
seer/fix/repo-path-validation

Conversation

@sentry

@sentry sentry Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

This PR addresses an issue where certain framework-specific file paths, particularly those used in SvelteKit for dynamic routes (e.g., [postId]), were being rejected by the isValidRepoPath utility due to an overly restrictive regex.

The REPO_PATH_SEGMENT_PATTERN regex in src/utils/repo-path.ts previously did not allow characters like [, ], (, ), and @. This caused validation errors when attempting to load example files from frameworks that utilize these characters in their routing conventions.

Changes Made:

  • Updated REPO_PATH_SEGMENT_PATTERN in src/utils/repo-path.ts to include [, ], (, ), and @ characters. The + character was also explicitly added to support SvelteKit's +page.svelte convention.
  • Added new test cases to tests/repo-path.test.ts to ensure that SvelteKit bracket-style dynamic routes, Next.js/Remix parenthesis route groups, and @-prefixed directories are now correctly validated as valid repository paths.

Fixes TANSTACK-COM-3ZT

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 29, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tanstack-com b793716 Commit Preview URL

Branch Preview URL
Aug 29 2026, 11:03 PM

@tannerlinsley tannerlinsley added the source-audit Tracked by the automated source audit label Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

source-audit Tracked by the automated source audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant