mirror of
https://github.com/github/codeql.git
synced 2026-02-23 02:13:41 +01:00
We don't extract node_modules folders by default so these tests aren't that relevant anymore, and we no longer follow node_modules resolution rules directly. Instead, these imports are resolved based on the monorepo support which simply requires a package.json file to exist. There is not a good enough reason to support node_modules directly, so we're accepting some minor regression in these tests.
12 lines
660 B
JavaScript
12 lines
660 B
JavaScript
require('fs'); // OK - there is an externs file for it
|
|
require('other'); // $ Alert - there is an externs file, but it is not a Node.js module
|
|
require('foo'); // OK - declared as a dependency
|
|
require('bar/sub'); // OK - 'bar' declared as a dependency
|
|
require('./local'); // OK - local import
|
|
require('/global'); // OK - global import
|
|
require('mod'); // $ MISSING: Alert // this is resolved due to the package.json file named "mod", but Node.js would not find it
|
|
require('undeclared'); // $ Alert
|
|
require('jade!./template.jade'); // OK - WebPack loader
|
|
require('imports?$=jquery!./m.js'); // OK - WebPack shim
|
|
require('react'); // OK - peer dependency
|