Skip to content

Commit 7397616

Browse files
authored
perf(find-plugin): convert unused capture group to non-capture group (#435)
Signed-off-by: Frazer Smith <[email protected]>
1 parent f26b988 commit 7397616

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/find-plugins.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,16 +161,16 @@ function filterPath (path, filter) {
161161
return filter(path)
162162
}
163163

164-
const typescriptPattern = /\.(ts|mts|cts)$/iu
164+
const typescriptPattern = /\.(?:ts|mts|cts)$/iu
165165
function getScriptType (fname, packageType) {
166166
return {
167167
language: typescriptPattern.test(fname) ? 'typescript' : 'javascript',
168168
type: determineModuleType(fname, packageType)
169169
}
170170
}
171171

172-
const modulePattern = /\.(mjs|mts)$/iu
173-
const commonjsPattern = /\.(cjs|cts)$/iu
172+
const modulePattern = /\.(?:mjs|mts)$/iu
173+
const commonjsPattern = /\.(?:cjs|cts)$/iu
174174
function determineModuleType (fname, defaultType) {
175175
if (modulePattern.test(fname)) {
176176
return 'module'

0 commit comments

Comments
 (0)