Skip to content

Commit e28c184

Browse files
authored
Fixed clientInExt regex for `document without client (#617)
1 parent 6601a89 commit e28c184

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const mapDocsToClients = (documents: string[], clients: string[]) => {
1717
})
1818

1919
const docsWithoutClient = documents.filter(d => !mappedDocs.has(d)).filter((file: string) => {
20-
const clientInExt = /\.\w+\.gql|graphql$/.test(file)
20+
const clientInExt = new RegExp(`\\.(${clients.join('|')})\\.(gql|graphql)$`).test(file)
2121
const clientInPath = new RegExp(`\\/(${clients.join('|')})\\/(?=${file.split('/').pop()?.replace(/\./g, '\\.')})`).test(file)
2222

2323
return !clientInExt && !clientInPath

0 commit comments

Comments
 (0)