@kakarot-ci/core 0.6.0 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/index.js CHANGED
@@ -713,19 +713,18 @@ async function analyzeFile(filePath, content, changedRanges, ref, githubClient,
713
713
  }
714
714
 
715
715
  // src/utils/test-target-extractor.ts
716
+ import { minimatch } from "minimatch";
716
717
  async function extractTestTargets(files, githubClient, prHeadRef, config) {
717
718
  info(`Analyzing ${files.length} file(s) for test targets`);
718
719
  const diffs = parsePullRequestFiles(files);
719
720
  const filteredDiffs = diffs.filter((diff) => {
720
721
  const matchesInclude = config.includePatterns.some((pattern) => {
721
- const regex = new RegExp(pattern.replace(/\*\*/g, ".*").replace(/\*/g, "[^/]*"));
722
- return regex.test(diff.filename);
722
+ return minimatch(diff.filename, pattern);
723
723
  });
724
724
  if (!matchesInclude)
725
725
  return false;
726
726
  const matchesExclude = config.excludePatterns.some((pattern) => {
727
- const regex = new RegExp(pattern.replace(/\*\*/g, ".*").replace(/\*/g, "[^/]*"));
728
- return regex.test(diff.filename);
727
+ return minimatch(diff.filename, pattern);
729
728
  });
730
729
  return !matchesExclude;
731
730
  });