You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Undeclared-import scan misses compiled CommonJS and module.exports requires #881
area:ownershipWhich side (Node or Vite) loads a module; double instances, aliases, mocks reaching Node codebugSomething isn't workingpriority:lowNice to have
The scan that finds an undeclared workspace library a React Native workspace package imports (#705) counts require("x") only as a whole statement, a declaration's initialiser, or under a member access. Common top-level, unconditional forms are missed:
module.exports = require("@w/lib") and exports.x = require("@w/lib");
compiled CommonJS: __importDefault(require("@w/lib")) (tsc) and _interopRequireDefault(require("@w/lib")) (Babel);
TypeScript's import x = require("@w/lib").
A workspace package whose only runtime entry is built CommonJS therefore still loads the library twice. The ownership guard reports it as SOURCE_EVALUATED_TWICE, but the closure does not take it in.
Acceptance criteria
Each form above adds the library to the closure, with a test per form.
A require that is conditional, in a string or comment, or type-only is still not counted.
area:ownershipWhich side (Node or Vite) loads a module; double instances, aliases, mocks reaching Node codebugSomething isn't workingpriority:lowNice to have
Activity