mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
Merge pull request #7734 from kaeluka/js-add-node-prefix-to-module-import
js: add support for the 'node:' prefix for importing internal modules
This commit is contained in:
@@ -741,7 +741,10 @@ module ModuleImportNode {
|
||||
* This predicate can be extended by subclassing `ModuleImportNode::Range`.
|
||||
*/
|
||||
cached
|
||||
ModuleImportNode moduleImport(string path) { Stages::Imports::ref() and result.getPath() = path }
|
||||
ModuleImportNode moduleImport(string path) {
|
||||
// NB. internal modules may be imported with a "node:" prefix
|
||||
Stages::Imports::ref() and result.getPath() = ["node:" + path, path]
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a (default) import of the given dependency `dep`, such as
|
||||
|
||||
Reference in New Issue
Block a user