Skip to content

Commit 16b1148

Browse files
authored
Fix error when a files.excludes pattern contains braces (#696)
1 parent fd9de48 commit 16b1148

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

package-lock.json

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/vscode-tailwindcss/package.json

+2
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,9 @@
321321
"check": "tsc --noEmit"
322322
},
323323
"devDependencies": {
324+
"@types/braces": "3.0.1",
324325
"@types/vscode": "1.65.0",
326+
"braces": "3.0.2",
325327
"color-name": "1.1.4",
326328
"concurrently": "7.0.0",
327329
"rimraf": "3.0.2",

packages/vscode-tailwindcss/src/extension.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import { dedupe, equal } from 'tailwindcss-language-service/src/util/array'
4343
import namedColors from 'color-name'
4444
import minimatch from 'minimatch'
4545
import { CONFIG_GLOB, CSS_GLOB } from 'tailwindcss-language-server/src/lib/constants'
46+
import braces from 'braces'
4647

4748
const colorNames = Object.keys(namedColors)
4849

@@ -644,7 +645,9 @@ export async function activate(context: ExtensionContext) {
644645

645646
let [configFile] = await Workspace.findFiles(
646647
new RelativePattern(folder, `**/${CONFIG_GLOB}`),
647-
`{${getExcludePatterns(folder).join(',')}}`,
648+
`{${getExcludePatterns(folder)
649+
.flatMap((pattern) => braces.expand(pattern))
650+
.join(',')}}`,
648651
1
649652
)
650653

0 commit comments

Comments
 (0)