mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-06 08:23:19 +08:00
A literal import() whose specifier resolves to no module lowered to a deferred SC2012 refusal. It now rejects when the call runs, as Node does: a package nothing installed provides rejects with "Cannot find package", and a relative or absolute path to a file that does not exist rejects with "Cannot find module" and the file's URL as the error's url property. Builtins and URL specifiers keep their current lowering. error.nodeThrow takes an optional fourth argument for the url, which the runtime sets through scr_throw_node_coded_url.