Skip to content

Commit 54bea44

Browse files
update minimatch dependency to v10 (#1247)
Signed-off-by: Andrew Twydell <andrew.twydell@ibm.com>
1 parent 98cca9e commit 54bea44

3 files changed

Lines changed: 56 additions & 54 deletions

File tree

package-lock.json

Lines changed: 49 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"leven": "^3.1.0",
5858
"markdown-it": "^14.1.0",
5959
"mime": "^1.3.4",
60-
"minimatch": "^3.0.3",
60+
"minimatch": "^10.2.2",
6161
"parse-semver": "^1.1.1",
6262
"read": "^1.0.7",
6363
"secretlint": "^10.1.2",
@@ -76,7 +76,6 @@
7676
"@types/hosted-git-info": "^3.0.2",
7777
"@types/markdown-it": "^0.0.2",
7878
"@types/mime": "^1",
79-
"@types/minimatch": "^3.0.3",
8079
"@types/mocha": "^7.0.2",
8180
"@types/node": "^20.0.0",
8281
"@types/read": "^0.0.28",

src/package.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { ExtensionKind, ManifestPackage, UnverifiedManifest } from './manifest';
77
import { ITranslations, patchNLS } from './nls';
88
import * as util from './util';
99
import { glob } from 'glob';
10-
import minimatch from 'minimatch';
10+
import { minimatch, MinimatchOptions } from 'minimatch';
1111
import markdownit from 'markdown-it';
1212
import * as cheerio from 'cheerio';
1313
import * as url from 'url';
@@ -30,7 +30,7 @@ import * as jsonc from 'jsonc-parser';
3030
import * as vsceSign from '@vscode/vsce-sign';
3131
import { getRuleNameFromRuleId, lintFiles, lintText, prettyPrintLintResult } from './secretLint';
3232

33-
const MinimatchOptions: minimatch.IOptions = { dot: true };
33+
const minimatchOptions: MinimatchOptions = { dot: true };
3434

3535
export 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

Comments
 (0)