mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-06 08:23:19 +08:00
The project's "scriptc": { "packages": { name: "unloaded" } } map covered
require() and static imports of installed packages. Two shapes escaped it:
- A workspace package marked unloaded still resolved to its sources, so an
import() of it compiled the package and its whole dependency graph. The
workspace resolver now treats it as missing, and the import() rejects
with Node's ERR_MODULE_NOT_FOUND.
- A module only import() loads whose static import names a package Node
cannot resolve (unloaded or absent) failed the build with SC1010. Node
resolves that graph when the import() runs and rejects its promise
before any module of it evaluates. Preflight now walks each such root's
static graph; a refused graph becomes that rejection, with Node's
message and code, and its modules never join the compiled graph or the
npm selection.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>