diff --git a/src/utils/repo-path.ts b/src/utils/repo-path.ts index f7b790c6c..8f6da3605 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 9c616368f..762a500ef 100644 --- a/tests/repo-path.test.ts +++ b/tests/repo-path.test.ts @@ -22,6 +22,14 @@ assert.equal( 'Svelte bracket-notation route params are valid repo path segments', ) +assert.equal( + isValidRepoPath( + 'examples/vue/basic-file-based-jsx/src/routes/(group)/inside.tsx', + ), + true, + 'route groups are valid repo path segments', +) + assert.equal( isValidRepoPath('../src/routes/__root.tsx'), false,