@@ -237,7 +237,7 @@ private class RequireVariable extends Variable {
237237}
238238
239239private predicate isModuleModule ( EarlyStageNode nd ) {
240- exists ( ImportDeclaration imp | imp .getImportedPath ( ) . getValue ( ) = "module" |
240+ exists ( ImportDeclaration imp | imp .getImportedPathString ( ) = "module" |
241241 nd = TDestructuredModuleImportNode ( imp )
242242 or
243243 nd = TValueNode ( imp .getASpecifier ( ) .( ImportNamespaceSpecifier ) )
@@ -263,7 +263,7 @@ private predicate isCreateRequire(EarlyStageNode nd) {
263263 )
264264 or
265265 exists ( ImportDeclaration decl , NamedImportSpecifier spec |
266- decl .getImportedPath ( ) . getValue ( ) = "module" and
266+ decl .getImportedPathString ( ) = "module" and
267267 spec = decl .getASpecifier ( ) and
268268 spec .getImportedName ( ) = "createRequire" and
269269 nd = TValueNode ( spec )
@@ -323,7 +323,7 @@ private predicate isRequire(EarlyStageNode nd) {
323323class Require extends CallExpr , Import {
324324 Require ( ) { isRequire ( TValueNode ( this .getCallee ( ) ) ) }
325325
326- override PathExpr getImportedPath ( ) { result = this .getArgument ( 0 ) }
326+ override Expr getImportedPathExpr ( ) { result = this .getArgument ( 0 ) }
327327
328328 override Module getEnclosingModule ( ) { this = result .getAnImport ( ) }
329329
@@ -391,7 +391,7 @@ class Require extends CallExpr, Import {
391391 * `.js`, `.json` and `.node`.
392392 */
393393 private File load ( int priority ) {
394- exists ( int r | this .getEnclosingModule ( ) .searchRoot ( this .getImportedPath ( ) , _, r ) |
394+ exists ( int r | this .getEnclosingModule ( ) .searchRoot ( this .getImportedPathExpr ( ) , _, r ) |
395395 result = loadAsFile ( this , r , priority - prioritiesPerCandidate ( ) * r ) or
396396 result =
397397 loadAsDirectory ( this , r ,
0 commit comments