@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/index.cjs CHANGED
@@ -769,19 +769,18 @@ async function analyzeFile(filePath, content, changedRanges, ref, githubClient,
769
769
  }
770
770
 
771
771
  // src/utils/test-target-extractor.ts
772
+ var import_minimatch = require("minimatch");
772
773
  async function extractTestTargets(files, githubClient, prHeadRef, config) {
773
774
  info(`Analyzing ${files.length} file(s) for test targets`);
774
775
  const diffs = parsePullRequestFiles(files);
775
776
  const filteredDiffs = diffs.filter((diff) => {
776
777
  const matchesInclude = config.includePatterns.some((pattern) => {
777
- const regex = new RegExp(pattern.replace(/\*\*/g, ".*").replace(/\*/g, "[^/]*"));
778
- return regex.test(diff.filename);
778
+ return (0, import_minimatch.minimatch)(diff.filename, pattern);
779
779
  });
780
780
  if (!matchesInclude)
781
781
  return false;
782
782
  const matchesExclude = config.excludePatterns.some((pattern) => {
783
- const regex = new RegExp(pattern.replace(/\*\*/g, ".*").replace(/\*/g, "[^/]*"));
784
- return regex.test(diff.filename);
783
+ return (0, import_minimatch.minimatch)(diff.filename, pattern);
785
784
  });
786
785
  return !matchesExclude;
787
786
  });