Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 26783b6

Browse files
committed
make getTopmostPackageJSON public again, and update PackageExports test
1 parent 1506ac0 commit 26783b6

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

javascript/ql/src/semmle/javascript/PackageExports.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ private int countSlashes(string path) { result = count(path.splitAt("/")) - 1 }
2828
* There can be multiple results if the there exists multiple package.json that are equally deeply nested in the folder structure.
2929
* Results are limited to package.json files that are at most nested 2 directories deep.
3030
*/
31-
private PackageJSON getTopmostPackageJSON() {
31+
PackageJSON getTopmostPackageJSON() {
3232
result =
3333
min(PackageJSON j |
3434
countSlashes(j.getFile().getRelativePath()) <= 3 and

javascript/ql/test/library-tests/PackageExports/tests.ql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ import semmle.javascript.PackageExports as Exports
33

44
query PackageJSON getTopmostPackageJSON() { result = Exports::getTopmostPackageJSON() }
55

6-
query DataFlow::Node getAValueExportedBy(PackageJSON json) {
7-
result = Exports::getAValueExportedBy(json)
8-
}
6+
query DataFlow::Node getALibraryInputParameter() { result = Exports::getALibraryInputParameter() }
97

108
query DataFlow::Node getAnExportedValue(Module mod, string name) {
119
result = mod.getAnExportedValue(name)

0 commit comments

Comments
 (0)