mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
make getTopmostPackageJSON public again, and update PackageExports test
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user