Skip to content

Commit e44d4c4

Browse files
authored
Merge pull request #16323 from asgerf/js/expose-internal-module-naming
JS: Expose InternalModuleNaming
2 parents 8d962a5 + d0c9e3f commit e44d4c4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

javascript/ql/lib/semmle/javascript/endpoints/EndpointNaming.qll

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ string renderName(string package, string name) { result = join("(" + package + "
432432
* These names are not necessarily part of a package's public API, and so we only used them
433433
* as a fallback when a publicly-accessible access path cannot be found.
434434
*/
435-
private module InternalModuleNaming {
435+
module InternalModuleNaming {
436436
/** Gets the path to `folder` relative to its enclosing non-private `package.json` file. */
437437
private string getPackageRelativePathFromFolder(Folder folder) {
438438
exists(PackageJson json |
@@ -446,7 +446,10 @@ private module InternalModuleNaming {
446446
getPackageRelativePathFromFolder(folder.getParentContainer()) + "/" + folder.getBaseName()
447447
}
448448

449-
private string getPackageRelativePath(Module mod) {
449+
/**
450+
* Gets the path to `mod` relative to its enclosing package, including the package name.
451+
*/
452+
string getPackageRelativePath(Module mod) {
450453
exists(PackageJson json, string relativePath |
451454
not json.isPrivate() and
452455
json.getExportedModule(relativePath) = mod and

0 commit comments

Comments
 (0)