Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/code-scanning/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
},
"devDependencies": {
"@types/jest": "catalog:",
"@types/micromatch": "^4.0.10",
"@types/node": "catalog:",
"@types/picomatch": "^4.0.3",
"json5": "^2.2.3",
"micromatch": "^4.0.8",
"picomatch": "^4.0.7",
"rimraf": "catalog:",
"ts-jest": "catalog:",
"tsx": "^4.23.11",
Expand Down
4 changes: 2 additions & 2 deletions packages/code-scanning/src/validate-lock-files.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as path from 'path';
import * as yaml from 'yaml';
import * as micromatch from 'micromatch';
import * as picomatch from 'picomatch';

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

const packageDir = path.dirname(relativePath);
return micromatch.isMatch(packageDir, workspace.patterns, { dot: true, matchBase: false });
return picomatch.isMatch(packageDir, workspace.patterns, { dot: true, matchBase: false, posix: true });
Comment thread
IlyaKhD marked this conversation as resolved.
}

// Find lock files in current or parent directories up to rootPath
Expand Down
3 changes: 2 additions & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"@actions/github": "catalog:",
"@types/jest": "catalog:",
"@types/node": "catalog:",
"minimatch": "^10.2.5",
"@types/picomatch": "^4.0.3",
"picomatch": "^4.0.7",
"rimraf": "catalog:",
"typescript": "catalog:"
}
Expand Down
7 changes: 4 additions & 3 deletions packages/common/src/path-utils.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import * as core from '@actions/core'
import { MinimatchOptions, minimatch } from "minimatch";
import * as picomatch from 'picomatch';

const NEGATION = '!';
const matchOptions: MinimatchOptions = {
const matchOptions: picomatch.PicomatchOptions = {
dot: true,
posix: true,
}

function match(path: string, pattern: string): boolean {
return minimatch(path.replace(/\\/g, '/'), pattern, matchOptions);
return picomatch.isMatch(path.replace(/\\/g, '/'), pattern, matchOptions);
}

export function filterPaths(
Expand Down
85 changes: 24 additions & 61 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading