Fix error when a `files.excludes` pattern contains braces (#696)
parent
fd9de48d27
commit
16b11482ba
|
@ -11,12 +11,14 @@
|
|||
"@tailwindcss/forms": "0.5.3",
|
||||
"@tailwindcss/line-clamp": "0.4.2",
|
||||
"@tailwindcss/typography": "0.5.7",
|
||||
"@types/braces": "3.0.1",
|
||||
"@types/debounce": "1.2.0",
|
||||
"@types/moo": "0.5.3",
|
||||
"@types/node": "14.14.34",
|
||||
"@types/semver": "7.3.10",
|
||||
"@types/vscode": "1.65.0",
|
||||
"becke-ch--regex--s0-0-v1--base--pl--lib": "1.4.0",
|
||||
"braces": "3.0.2",
|
||||
"builtin-modules": "3.2.0",
|
||||
"chokidar": "3.5.1",
|
||||
"color-name": "1.1.4",
|
||||
|
@ -4666,6 +4668,11 @@
|
|||
"@babel/types": "^7.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/braces": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/braces/-/braces-3.0.1.tgz",
|
||||
"integrity": "sha512-+euflG6ygo4bn0JHtn4pYqcXwRtLvElQ7/nnjDu7iYG56H0+OhCd7d6Ug0IE3WcFpZozBKW2+80FUbv5QGk5AQ=="
|
||||
},
|
||||
"node_modules/@types/debounce": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/debounce/-/debounce-1.2.0.tgz",
|
||||
|
@ -24822,6 +24829,11 @@
|
|||
"@babel/types": "^7.3.0"
|
||||
}
|
||||
},
|
||||
"@types/braces": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/braces/-/braces-3.0.1.tgz",
|
||||
"integrity": "sha512-+euflG6ygo4bn0JHtn4pYqcXwRtLvElQ7/nnjDu7iYG56H0+OhCd7d6Ug0IE3WcFpZozBKW2+80FUbv5QGk5AQ=="
|
||||
},
|
||||
"@types/debounce": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/debounce/-/debounce-1.2.0.tgz",
|
||||
|
|
|
@ -321,7 +321,9 @@
|
|||
"check": "tsc --noEmit"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/braces": "3.0.1",
|
||||
"@types/vscode": "1.65.0",
|
||||
"braces": "3.0.2",
|
||||
"color-name": "1.1.4",
|
||||
"concurrently": "7.0.0",
|
||||
"rimraf": "3.0.2",
|
||||
|
|
|
@ -43,6 +43,7 @@ import { dedupe, equal } from 'tailwindcss-language-service/src/util/array'
|
|||
import namedColors from 'color-name'
|
||||
import minimatch from 'minimatch'
|
||||
import { CONFIG_GLOB, CSS_GLOB } from 'tailwindcss-language-server/src/lib/constants'
|
||||
import braces from 'braces'
|
||||
|
||||
const colorNames = Object.keys(namedColors)
|
||||
|
||||
|
@ -644,7 +645,9 @@ export async function activate(context: ExtensionContext) {
|
|||
|
||||
let [configFile] = await Workspace.findFiles(
|
||||
new RelativePattern(folder, `**/${CONFIG_GLOB}`),
|
||||
`{${getExcludePatterns(folder).join(',')}}`,
|
||||
`{${getExcludePatterns(folder)
|
||||
.flatMap((pattern) => braces.expand(pattern))
|
||||
.join(',')}}`,
|
||||
1
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue