Skip to content

Commit b51fbb6

Browse files
committed
chore(deps): replace micromatch with picomatch (direct dep)
1 parent 92bf1b7 commit b51fbb6

5 files changed

Lines changed: 34 additions & 69 deletions

File tree

‎packages/code-scanning/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
},
2020
"devDependencies": {
2121
"@types/jest": "catalog:",
22-
"@types/micromatch": "^4.0.10",
2322
"@types/node": "catalog:",
23+
"@types/picomatch": "^4.0.3",
2424
"json5": "^2.2.3",
25-
"micromatch": "^4.0.8",
25+
"picomatch": "^4.0.7",
2626
"rimraf": "catalog:",
2727
"ts-jest": "catalog:",
2828
"tsx": "^4.23.11",

‎packages/code-scanning/src/validate-lock-files.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as path from 'path';
22
import * as yaml from 'yaml';
3-
import * as micromatch from 'micromatch';
3+
import * as picomatch from 'picomatch';
44

55
import { FileSystem, NodeFileSystem } from './file-system';
66
import {
@@ -133,7 +133,7 @@ export async function discoverLockFiles(
133133
if (!relativePath || relativePath === '.') return false;
134134

135135
const packageDir = path.dirname(relativePath);
136-
return micromatch.isMatch(packageDir, workspace.patterns, { dot: true, matchBase: false });
136+
return picomatch.isMatch(packageDir, workspace.patterns, { dot: true, matchBase: false, posix: true });
137137
}
138138

139139
// Find lock files in current or parent directories up to rootPath

‎packages/common/package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"@actions/github": "catalog:",
1818
"@types/jest": "catalog:",
1919
"@types/node": "catalog:",
20-
"minimatch": "^10.2.5",
20+
"@types/picomatch": "^4.0.3",
21+
"picomatch": "^4.0.7",
2122
"rimraf": "catalog:",
2223
"typescript": "catalog:"
2324
}

‎packages/common/src/path-utils.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import * as core from '@actions/core'
2-
import { MinimatchOptions, minimatch } from "minimatch";
2+
import * as picomatch from 'picomatch';
33

44
const NEGATION = '!';
5-
const matchOptions: MinimatchOptions = {
5+
const matchOptions: picomatch.PicomatchOptions = {
66
dot: true,
7+
posix: true,
78
}
89

910
function match(path: string, pattern: string): boolean {
10-
return minimatch(path.replace(/\\/g, '/'), pattern, matchOptions);
11+
return picomatch.isMatch(path.replace(/\\/g, '/'), pattern, matchOptions);
1112
}
1213

1314
export function filterPaths(

‎pnpm-lock.yaml‎

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

0 commit comments

Comments
 (0)