make getTopmostPackageJSON public again, and update PackageExports test

This commit is contained in:
Erik Krogh Kristensen
2021-01-15 16:05:49 +01:00
parent 1506ac09e5
commit 26783b6ab0
2 changed files with 2 additions and 4 deletions

View File

@@ -28,7 +28,7 @@ private int countSlashes(string path) { result = count(path.splitAt("/")) - 1 }
* There can be multiple results if the there exists multiple package.json that are equally deeply nested in the folder structure.
* Results are limited to package.json files that are at most nested 2 directories deep.
*/
private PackageJSON getTopmostPackageJSON() {
PackageJSON getTopmostPackageJSON() {
result =
min(PackageJSON j |
countSlashes(j.getFile().getRelativePath()) <= 3 and

View File

@@ -3,9 +3,7 @@ import semmle.javascript.PackageExports as Exports
query PackageJSON getTopmostPackageJSON() { result = Exports::getTopmostPackageJSON() }
query DataFlow::Node getAValueExportedBy(PackageJSON json) {
result = Exports::getAValueExportedBy(json)
}
query DataFlow::Node getALibraryInputParameter() { result = Exports::getALibraryInputParameter() }
query DataFlow::Node getAnExportedValue(Module mod, string name) {
result = mod.getAnExportedValue(name)