diff --git a/package-lock.json b/package-lock.json index 22c9e77d1..5dd9b77ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "lunr": "^2.3.9", "marked": "^4.2.12", - "minimatch": "^6.1.6", + "minimatch": "^7.1.3", "shiki": "^0.14.1" }, "bin": { @@ -2434,9 +2434,9 @@ } }, "node_modules/minimatch": { - "version": "6.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-6.1.6.tgz", - "integrity": "sha512-6bR3UIeh/DF8+p6A9Spyuy67ShOq42rOkHWi7eUe3Ua99Zo5lZfGC6lJJWkeoK4k9jQFT3Pl7czhTXimG2XheA==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.1.3.tgz", + "integrity": "sha512-kpcwpcyeYtgSzpOvUf+9RiaPgrqtR2NwuqejBV2VkWxR+KC8jMWTb76zSlVJXy6ypbY39u66Un4gTk0ryiXm2g==", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -5342,9 +5342,9 @@ } }, "minimatch": { - "version": "6.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-6.1.6.tgz", - "integrity": "sha512-6bR3UIeh/DF8+p6A9Spyuy67ShOq42rOkHWi7eUe3Ua99Zo5lZfGC6lJJWkeoK4k9jQFT3Pl7czhTXimG2XheA==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.1.3.tgz", + "integrity": "sha512-kpcwpcyeYtgSzpOvUf+9RiaPgrqtR2NwuqejBV2VkWxR+KC8jMWTb76zSlVJXy6ypbY39u66Un4gTk0ryiXm2g==", "requires": { "brace-expansion": "^2.0.1" } diff --git a/package.json b/package.json index 854559ecc..5f4145072 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "dependencies": { "lunr": "^2.3.9", "marked": "^4.2.12", - "minimatch": "^6.1.6", + "minimatch": "^7.1.3", "shiki": "^0.14.1" }, "peerDependencies": { diff --git a/src/lib/converter/converter.ts b/src/lib/converter/converter.ts index 3759ac054..d934d6898 100644 --- a/src/lib/converter/converter.ts +++ b/src/lib/converter/converter.ts @@ -50,8 +50,8 @@ export class Converter extends ChildableComponent< /** @internal */ @BindOption("externalPattern") externalPattern!: string[]; - private externalPatternCache?: InstanceType[]; - private excludeCache?: InstanceType[]; + private externalPatternCache?: Minimatch[]; + private excludeCache?: Minimatch[]; /** @internal */ @BindOption("excludeExternals") diff --git a/src/lib/utils/package-manifest.ts b/src/lib/utils/package-manifest.ts index e4951e260..0ec0cdc15 100644 --- a/src/lib/utils/package-manifest.ts +++ b/src/lib/utils/package-manifest.ts @@ -117,7 +117,7 @@ export function expandPackages( logger: Logger, packageJsonDir: string, workspaces: string[], - exclude: InstanceType[] + exclude: Minimatch[] ): string[] { // Technically npm and Yarn workspaces don't support recursive nesting, // however we support the passing of paths to either packages or diff --git a/src/lib/utils/paths.ts b/src/lib/utils/paths.ts index 9014b48b3..24c4d0557 100644 --- a/src/lib/utils/paths.ts +++ b/src/lib/utils/paths.ts @@ -7,9 +7,7 @@ import { normalizePath } from "./fs"; * * Handle a few Windows-Unix path gotchas. */ -export function createMinimatch( - patterns: string[] -): InstanceType[] { +export function createMinimatch(patterns: string[]): Minimatch[] { return patterns.map( (pattern) => new Minimatch(normalizePath(pattern).replace(/^\w:\//, ""), { @@ -18,10 +16,7 @@ export function createMinimatch( ); } -export function matchesAny( - patterns: readonly InstanceType[], - path: string -) { +export function matchesAny(patterns: readonly Minimatch[], path: string) { const normPath = normalizePath(path).replace(/^\w:\//, ""); return patterns.some((pat) => pat.match(normPath)); }