mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
recognize a src/index.js file as a main module for a package
This commit is contained in:
@@ -96,8 +96,11 @@ File resolveMainModule(PackageJSON pkg, int priority) {
|
||||
)
|
||||
)
|
||||
or
|
||||
result =
|
||||
tryExtensions(pkg.getFile().getParentContainer(), "index", priority - prioritiesPerCandidate())
|
||||
exists(Folder folder | folder = pkg.getFile().getParentContainer() |
|
||||
result =
|
||||
tryExtensions([folder, folder.getChildContainer("src")], "index",
|
||||
priority - prioritiesPerCandidate())
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user