mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-01 07:33:12 +08:00
* Expand static compilation for common Effect 4 patterns * Run every Effect 4 fixture slice in CI * Preserve existing corpus behavior across Effect 4 lowering * Preserve Effect platform callbacks and native stream state * Record new corpus baselines and retain child stdin refusals * Retire the obsolete stateful regex diagnostic * Preserve promise reference count layout for cycle collection
26 lines
1.5 KiB
Plaintext
26 lines
1.5 KiB
Plaintext
create-require.ts:13:13 - error SC2020: 'module.createRequire' is part of the standard library types but has no scriptc lowering yet
|
|
|
|
12 | // The base names some OTHER file: unrecognized — the member fence.
|
|
13 | const req = createRequire("/tmp/parent.js");
|
|
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
14 | console.log(String(req("./config.cjs")));
|
|
|
|
hint: the lowered shape is a const binding (or a proven stable top-level let/var) over createRequire(import.meta.url) (or __filename) whose require calls take STATIC string literals — builtins, project modules (including #imports), relative .json documents, --npm-static packages, and installed npm packages under --dynamic resolve at build time; dynamic specifiers cannot exist in a compiled binary's fixed module graph
|
|
|
|
create-require.ts:20:1 - error SC2020: 'createRequire's require with this argument shape' is part of the standard library types but has no scriptc lowering yet
|
|
|
|
19 | const which = "left" + "-pad";
|
|
20 | require(which);
|
|
| ^~~~~~~~~~~~~~
|
|
21 |
|
|
|
|
hint: the compiled module graph is fixed at build time — the one lowered form is require("<static string literal>")
|
|
|
|
create-require.ts:23:1 - error SC2020: 'createRequire's require of './helper.js'' is part of the standard library types but has no scriptc lowering yet
|
|
|
|
22 | // An unresolved relative target.
|
|
23 | require("./helper.js");
|
|
| ^~~~~~~~~~~~~~~~~~~~~~
|
|
24 |
|
|
|
|
hint: relative program modules lower when they resolve into the compiled graph; relative .json documents bake at build time |