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
CommonJS model: forwardsOutside is skipped by the import reader and not memoized #35
Found in the PR #29 round-14 review. Two follow-ups on forwardsOutside, the cross-file check for "this file forwards its whole export into a file outside the model":
The incremental import reader skips it.module-importers.ts calls collectCommonJsExportEvidence directly. For a.js: module.exports = require('./esm'), resolution uses the pre-model path, but reader.commonJs(a.js) returns true and reExports returns a synthetic wildcard. Sync reopening therefore follows a model the resolver does not use. No edge difference has been found yet; it only widens reopening.
No memo. It reruns on every commonJsExportEvidence call (resolveModuleFile, readFile and a source compare per hop, up to 8 hops). resolveViaImport, matchReference and defaultModuleNamespace each call it again for the same file. Memoize per (context, file) and keep the record in a local in resolveViaImport.
Activity