@@ -55,11 +55,11 @@ module NameResolution {
55
55
// This ensures we can also use the PathExpr as a source when working with external (unresolved) modules.
56
56
exists ( Import imprt |
57
57
node1 = imprt .getImportedModule ( ) and
58
- node2 = imprt .getImportedPath ( )
58
+ node2 = imprt .getImportedPathExpr ( )
59
59
)
60
60
or
61
61
exists ( ImportNamespaceSpecifier spec |
62
- node1 = spec .getImportDeclaration ( ) .getImportedPath ( ) and
62
+ node1 = spec .getImportDeclaration ( ) .getImportedPathExpr ( ) and
63
63
node2 = spec .getLocal ( )
64
64
)
65
65
or
@@ -79,7 +79,7 @@ module NameResolution {
79
79
)
80
80
or
81
81
exists ( ExternalModuleReference ref |
82
- node1 = ref .getImportedPath ( ) and
82
+ node1 = ref .getImportedPathExpr ( ) and
83
83
node2 = ref
84
84
)
85
85
or
@@ -195,7 +195,7 @@ module NameResolution {
195
195
)
196
196
or
197
197
exists ( ImportSpecifier spec |
198
- node1 = spec .getImportDeclaration ( ) .getImportedPath ( ) and
198
+ node1 = spec .getImportDeclaration ( ) .getImportedPathExpr ( ) and
199
199
name = spec .getImportedName ( ) and
200
200
node2 = spec .getLocal ( )
201
201
)
@@ -411,12 +411,12 @@ module NameResolution {
411
411
* Unlike `trackModule`, this is intended to track uses of external packages.
412
412
*/
413
413
predicate nodeRefersToModule ( Node node , string mod , string qualifiedName ) {
414
- exists ( PathExpr path |
415
- path = any ( Import imprt ) .getImportedPath ( ) or
414
+ exists ( Expr path |
415
+ path = any ( Import imprt ) .getImportedPathExpr ( ) or
416
416
path = any ( ReExportDeclaration e ) .getImportedPath ( )
417
417
|
418
418
node = path and
419
- mod = normalizeModuleName ( path .getValue ( ) ) and
419
+ mod = normalizeModuleName ( path .getStringValue ( ) ) and
420
420
isExternalModuleName ( mod ) and
421
421
qualifiedName = ""
422
422
)
0 commit comments