mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
JS: Fix deprecated API usage
This commit is contained in:
@@ -78,7 +78,7 @@ predicate importLookup(ASTNode path, Module target, string kind) {
|
||||
or
|
||||
exists(ReExportDeclaration red |
|
||||
path = red.getImportedPath() and
|
||||
target = red.getImportedModule()
|
||||
target = red.getReExportedModule()
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ private predicate mayDynamicallyComputeExports(Module m) {
|
||||
or
|
||||
// `m` re-exports all exports of some other module that dynamically computes its exports
|
||||
exists(BulkReExportDeclaration rexp | rexp = m.(ES2015Module).getAnExport() |
|
||||
mayDynamicallyComputeExports(rexp.getImportedModule())
|
||||
mayDynamicallyComputeExports(rexp.getReExportedModule())
|
||||
)
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ private predicate relevantExport(ES2015Module m, string x) {
|
||||
)
|
||||
or
|
||||
exists(ReExportDeclaration rexp, string y |
|
||||
rexp.getImportedModule() = m and
|
||||
rexp.getReExportedModule() = m and
|
||||
reExportsAs(rexp, x, y)
|
||||
)
|
||||
}
|
||||
@@ -110,9 +110,9 @@ private predicate incompleteExport(ES2015Module m, string y) {
|
||||
mayDependOnLookupPath(rexp.getImportedPath().getStringValue())
|
||||
or
|
||||
// unresolvable path
|
||||
not exists(rexp.getImportedModule())
|
||||
not exists(rexp.getReExportedModule())
|
||||
or
|
||||
exists(Module n | n = rexp.getImportedModule() |
|
||||
exists(Module n | n = rexp.getReExportedModule() |
|
||||
// re-export from CommonJS/AMD
|
||||
mayDynamicallyComputeExports(n)
|
||||
or
|
||||
|
||||
Reference in New Issue
Block a user