codeowners
codeowners copied to clipboard
feat: support Next.js/Nuxt.js-style dynamic route parameters in patterns
This PR adds support for Next.js/Nuxt.js-style dynamic route parameters in CODEOWNERS patterns, addressing issue #42.
Modern web frameworks like Next.js and Nuxt.js use square brackets [paramName] in file and directory names to denote dynamic route parameters. This is a fundamental pattern in these frameworks' file-based routing systems. Examples:
/pages/users/[userId].js # Dynamic user page
/pages/[category]/[productId].js # Dynamic product in category
/api/[supplierId]/performance/*.ts # API endpoints with supplier context
Currently, CODEOWNERS rejects such patterns with an error:
unexpected character '[' at position X