Skip to content

Commit 8930ce7

Browse files
committed
JS: Do not view packages as nested in a private package
1 parent 2d8d11f commit 8930ce7

File tree

1 file changed

+2
-1
lines changed
  • javascript/ql/lib/semmle/javascript

1 file changed

+2
-1
lines changed

javascript/ql/lib/semmle/javascript/NPM.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ class PackageJson extends JsonObject {
2929
parentDir.getAChildContainer+() = currentDir and
3030
pkgNameDiff = currentDir.getAbsolutePath().suffix(parentDir.getAbsolutePath().length()) and
3131
not exists(pkgNameDiff.indexOf("/node_modules/")) and
32-
result = parentPkgName + pkgNameDiff
32+
result = parentPkgName + pkgNameDiff and
33+
not parentPkg.isPrivate()
3334
)
3435
}
3536

0 commit comments

Comments
 (0)