Skip to content

Commit

Permalink
Merge pull request #16323 from asgerf/js/expose-internal-module-naming
Browse files Browse the repository at this point in the history
JS: Expose InternalModuleNaming
  • Loading branch information
asgerf authored Apr 26, 2024
2 parents 8d962a5 + d0c9e3f commit e44d4c4
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ string renderName(string package, string name) { result = join("(" + package + "
* These names are not necessarily part of a package's public API, and so we only used them
* as a fallback when a publicly-accessible access path cannot be found.
*/
private module InternalModuleNaming {
module InternalModuleNaming {
/** Gets the path to `folder` relative to its enclosing non-private `package.json` file. */
private string getPackageRelativePathFromFolder(Folder folder) {
exists(PackageJson json |
Expand All @@ -446,7 +446,10 @@ private module InternalModuleNaming {
getPackageRelativePathFromFolder(folder.getParentContainer()) + "/" + folder.getBaseName()
}

private string getPackageRelativePath(Module mod) {
/**
* Gets the path to `mod` relative to its enclosing package, including the package name.
*/
string getPackageRelativePath(Module mod) {
exists(PackageJson json, string relativePath |
not json.isPrivate() and
json.getExportedModule(relativePath) = mod and
Expand Down

0 comments on commit e44d4c4

Please sign in to comment.