snyk 1.1085.0 → 1.1087.0

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.
@@ -1510,6 +1510,7 @@ async function getStats(path) {
1510
1510
  });
1511
1511
  }
1512
1512
  exports.getStats = getStats;
1513
+ const ignoreFolders = ['node_modules', '.build'];
1513
1514
  /**
1514
1515
  * Find all files in given search path. Returns paths to files found.
1515
1516
  *
@@ -1521,13 +1522,15 @@ exports.getStats = getStats;
1521
1522
  async function find(path, ignore = [], filter = [], levelsDeep = 4) {
1522
1523
  const found = [];
1523
1524
  const foundAll = [];
1524
- // ensure we ignore find against node_modules path.
1525
- if (path.endsWith('node_modules')) {
1525
+ // ensure we ignore find against node_modules path and .build folder for swift.
1526
+ if (path.endsWith('node_modules') || path.endsWith('/.build')) {
1526
1527
  return { files: found, allFilesFound: foundAll };
1527
1528
  }
1528
- // ensure node_modules is always ignored
1529
- if (!ignore.includes('node_modules')) {
1530
- ignore.push('node_modules');
1529
+ // ensure dependencies folders is always ignored
1530
+ for (const folder of ignoreFolders) {
1531
+ if (!ignore.includes(folder)) {
1532
+ ignore.push(folder);
1533
+ }
1531
1534
  }
1532
1535
  try {
1533
1536
  if (levelsDeep < 0) {