auditor-lambda 0.2.2 → 0.2.3
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.
|
@@ -22,7 +22,10 @@ function shouldIgnore(relativePath, ignores) {
|
|
|
22
22
|
const normalized = normalizePath(relativePath);
|
|
23
23
|
return ignores.some((ignore) => {
|
|
24
24
|
const value = normalizePath(ignore);
|
|
25
|
-
return normalized === value ||
|
|
25
|
+
return (normalized === value ||
|
|
26
|
+
normalized.startsWith(`${value}/`) ||
|
|
27
|
+
normalized.includes(`/${value}/`) ||
|
|
28
|
+
normalized.endsWith(`/${value}`));
|
|
26
29
|
});
|
|
27
30
|
}
|
|
28
31
|
async function maybeHashFile(path, enabled) {
|
|
@@ -4,10 +4,14 @@
|
|
|
4
4
|
* already-lower-cased form of the path.
|
|
5
5
|
*/
|
|
6
6
|
export function isNodeModulesOrGit(normalized) {
|
|
7
|
-
return (normalized
|
|
8
|
-
normalized
|
|
7
|
+
return (normalized === "node_modules" ||
|
|
8
|
+
normalized.startsWith("node_modules/") ||
|
|
9
|
+
normalized.includes("/node_modules/") ||
|
|
10
|
+
normalized.endsWith("/node_modules") ||
|
|
11
|
+
normalized === ".git" ||
|
|
9
12
|
normalized.startsWith(".git/") ||
|
|
10
|
-
normalized
|
|
13
|
+
normalized.includes("/.git/") ||
|
|
14
|
+
normalized.endsWith("/.git"));
|
|
11
15
|
}
|
|
12
16
|
export function isBuildOutput(normalized) {
|
|
13
17
|
return normalized.startsWith("dist/") || normalized.startsWith("build/");
|