@@ -7,7 +7,7 @@ import { ExtensionKind, ManifestPackage, UnverifiedManifest } from './manifest';
77import { ITranslations , patchNLS } from './nls' ;
88import * as util from './util' ;
99import { glob } from 'glob' ;
10- import minimatch from 'minimatch' ;
10+ import { minimatch , MinimatchOptions } from 'minimatch' ;
1111import markdownit from 'markdown-it' ;
1212import * as cheerio from 'cheerio' ;
1313import * as url from 'url' ;
@@ -30,7 +30,7 @@ import * as jsonc from 'jsonc-parser';
3030import * as vsceSign from '@vscode/vsce-sign' ;
3131import { getRuleNameFromRuleId , lintFiles , lintText , prettyPrintLintResult } from './secretLint' ;
3232
33- const MinimatchOptions : minimatch . IOptions = { dot : true } ;
33+ const minimatchOptions : MinimatchOptions = { dot : true } ;
3434
3535export interface IInMemoryFile {
3636 path : string ;
@@ -1758,8 +1758,8 @@ function collectFiles(
17581758 . then ( ( { ignore, negate } ) =>
17591759 files . filter (
17601760 f =>
1761- ! ignore . some ( i => minimatch ( f , i , MinimatchOptions ) ) ||
1762- negate . some ( i => minimatch ( f , i . substr ( 1 ) , MinimatchOptions ) )
1761+ ! ignore . some ( i => minimatch ( f , i , minimatchOptions ) ) ||
1762+ negate . some ( i => minimatch ( f , i . substr ( 1 ) , minimatchOptions ) )
17631763 )
17641764 )
17651765 ) ;
@@ -2097,13 +2097,13 @@ export async function printAndValidatePackagedFiles(files: IFile[], cwd: string,
20972097 const unusedIncludePatterns = filesIncludePatterns . filter ( includePattern => {
20982098 let absoluteIncludePattern = includePattern . absolute ;
20992099 // Check if the pattern provided by the user matches any file in the package
2100- if ( localPaths . some ( localFilePath => minimatch ( localFilePath , absoluteIncludePattern , MinimatchOptions ) ) ) {
2100+ if ( localPaths . some ( localFilePath => minimatch ( localFilePath , absoluteIncludePattern , minimatchOptions ) ) ) {
21012101 return false ;
21022102 }
21032103 // Check if the pattern provided by the user matches any folder in the package
21042104 if ( ! / ( ^ | \/ ) [ ^ / ] * \* [ ^ / ] * $ / . test ( absoluteIncludePattern ) ) {
21052105 absoluteIncludePattern = ( / \/ $ / . test ( absoluteIncludePattern ) ? `${ absoluteIncludePattern } **` : `${ absoluteIncludePattern } /**` ) ;
2106- return ! localPaths . some ( localFilePath => minimatch ( localFilePath , absoluteIncludePattern , MinimatchOptions ) ) ;
2106+ return ! localPaths . some ( localFilePath => minimatch ( localFilePath , absoluteIncludePattern , minimatchOptions ) ) ;
21072107 }
21082108 // Pattern does not match any file or folder
21092109 return true ;
0 commit comments