From d97bb6c5334abe8cf81d6a5aa047cbe2ac894787 Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 23:01:59 +0000 Subject: [PATCH 1/2] fix(docs): Allow square brackets in repo paths for dynamic routes --- src/utils/repo-path.ts | 2 +- tests/repo-path.test.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/utils/repo-path.ts b/src/utils/repo-path.ts index 22330d275..f7b790c6c 100644 --- a/src/utils/repo-path.ts +++ b/src/utils/repo-path.ts @@ -1,6 +1,6 @@ export const MAX_REPO_PATH_LENGTH = 512 -const REPO_PATH_SEGMENT_PATTERN = /^[a-zA-Z0-9._$+-]+$/ +const REPO_PATH_SEGMENT_PATTERN = /^[a-zA-Z0-9._$+\[\]-]+$/ export function isValidRepoPath(path: string) { if (path === '') { diff --git a/tests/repo-path.test.ts b/tests/repo-path.test.ts index b990d1ebc..3fc65507e 100644 --- a/tests/repo-path.test.ts +++ b/tests/repo-path.test.ts @@ -34,6 +34,14 @@ assert.equal( 'query delimiters are rejected', ) +assert.equal( + isValidRepoPath( + 'examples/svelte/ssr/src/routes/[postId]/+page.svelte', + ), + true, + 'SvelteKit/Next.js dynamic route bracket segments are valid repo path segments', +) + assert.equal( joinRepoPath('examples/react/start-basic', 'src/routes/__root.tsx'), 'examples/react/start-basic/src/routes/__root.tsx', From 7f96347ef52351d49f243944e14601ca3ed6e48d Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 23:02:48 +0000 Subject: [PATCH 2/2] ci: apply automated fixes --- tests/repo-path.test.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/repo-path.test.ts b/tests/repo-path.test.ts index 3fc65507e..95b0ee17a 100644 --- a/tests/repo-path.test.ts +++ b/tests/repo-path.test.ts @@ -35,9 +35,7 @@ assert.equal( ) assert.equal( - isValidRepoPath( - 'examples/svelte/ssr/src/routes/[postId]/+page.svelte', - ), + isValidRepoPath('examples/svelte/ssr/src/routes/[postId]/+page.svelte'), true, 'SvelteKit/Next.js dynamic route bracket segments are valid repo path segments', )