Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
415 commits
Select commit Hold shift + click to select a range
32c57c1
Propagate vm sandbox writes
noise64 Jul 1, 2026
f58ea03
Hide vm context metadata
noise64 Jul 2, 2026
14d5801
Replay vm context string descriptors
noise64 Jul 2, 2026
30ec2de
Replay vm context symbol descriptors
noise64 Jul 2, 2026
1c93805
Promote vm create-and-run context test
noise64 Jul 2, 2026
b5a7e05
Clarify vm prototype context gaps
noise64 Jul 2, 2026
7cf9a6d
Validate vm Script options
noise64 Jul 2, 2026
0c70cd4
Promote vm strict mode coverage
noise64 Jul 2, 2026
f7a0405
Promote vm context fixture coverage
noise64 Jul 2, 2026
9039668
Hide extra vm context globals
noise64 Jul 2, 2026
d1ad461
Promote vm context property forwarding
noise64 Jul 2, 2026
ae5b6ee
Narrow vm strict assignment gap
noise64 Jul 2, 2026
3ffda0a
Harden vm baseline global writeback
noise64 Jul 2, 2026
c06f363
Harden vm validation and assert regex handling
noise64 Jul 2, 2026
3513473
Promote vm empty proxy execution
noise64 Jul 2, 2026
b03e972
Use explicit require in module resolution runtime tests
noise64 Jul 2, 2026
499db76
Match CJS export-star hasOwn guards
noise64 Jul 2, 2026
bb83bd2
Tighten CJS defineProperty enumerable detection
noise64 Jul 2, 2026
0969af3
Align CJS descriptor enumerable scanning
noise64 Jul 2, 2026
d246ba2
Support loader CJS Object.keys reexports
noise64 Jul 2, 2026
5a76b0a
Clarify preload self-reference gap
noise64 Jul 2, 2026
03a4ea7
Align Rust CJS reexport guard scanning
noise64 Jul 2, 2026
7a092a4
Share Rust CJS hasOwn guard parsing
noise64 Jul 2, 2026
fd6593c
Share Rust CJS key comparison parsing
noise64 Jul 2, 2026
966d407
Share Rust CJS require call parsing
noise64 Jul 2, 2026
9bbb759
Share Rust scanner whitespace skipping
noise64 Jul 2, 2026
5abc2c8
Share Rust CJS identifier matching
noise64 Jul 2, 2026
109538e
Share Rust package map target selection
noise64 Jul 2, 2026
3e73a33
Share Rust package target resolve context
noise64 Jul 2, 2026
7f920fd
Share JS package map target selection
noise64 Jul 2, 2026
5735a3d
Share Rust direct reexport key parsing
noise64 Jul 2, 2026
0b3e96a
Share Rust defineProperty call parsing
noise64 Jul 2, 2026
aade138
Share JS defineProperty call parsing
noise64 Jul 2, 2026
5f11384
Align CJS directory and loader guard resolution
noise64 Jul 2, 2026
5bfa305
Restore CJS directory resolution gate
noise64 Jul 2, 2026
4f9061d
Share CJS package file probe helpers
noise64 Jul 2, 2026
65c76a3
Tighten CJS reexport descriptor detection
noise64 Jul 2, 2026
0bee725
Handle loader CJS require spread reexports
noise64 Jul 2, 2026
1ea54ac
Harden package warning emitter contract
noise64 Jul 2, 2026
5765a74
Cover CJS package subpath fallbacks
noise64 Jul 2, 2026
686736f
Cover CJS native addon fallbacks
noise64 Jul 2, 2026
53ec05d
Clarify CJS analysis package fallbacks
noise64 Jul 2, 2026
e6d7d0c
Centralize package resolve mode decisions
noise64 Jul 2, 2026
a250279
Share loader descriptor scanner mechanics
noise64 Jul 2, 2026
809f9e0
Share loader has-own parser
noise64 Jul 2, 2026
80ba007
Share Rust descriptor scanner mechanics
noise64 Jul 2, 2026
ab75360
Remove unused CJS parser helper
noise64 Jul 2, 2026
8e9ce47
Move package conditions onto resolve mode
noise64 Jul 2, 2026
1d4d315
Share loader function getter parser
noise64 Jul 2, 2026
5b82122
Share registered loader default resolver
noise64 Jul 2, 2026
d2b81b7
Share CJS analysis directory fallbacks
noise64 Jul 2, 2026
faac61f
Hide package warning suppression state
noise64 Jul 2, 2026
a51b509
Hide package warning dedupe state
noise64 Jul 2, 2026
eb9b718
Remove package warning helper global
noise64 Jul 2, 2026
d1ab302
Share loader CJS identifier parsing
noise64 Jul 2, 2026
bfff83f
Share loader require binding parser
noise64 Jul 2, 2026
c96a08a
Share loader object keys parser
noise64 Jul 2, 2026
fb0ba3e
Share loader export name parser
noise64 Jul 2, 2026
b25e719
Share loader getter identifier parser
noise64 Jul 2, 2026
12aac5a
Share loader descriptor function parser
noise64 Jul 2, 2026
6296743
Hide private builtin modules from users
noise64 Jul 2, 2026
308343f
Share loader named identifier parser
noise64 Jul 2, 2026
468d303
Share CJS analyzer if parser
noise64 Jul 2, 2026
9e30d31
Share loader if guard parser
noise64 Jul 2, 2026
85a07e2
Share loader reexport identifier parser
noise64 Jul 2, 2026
95d6e7b
Share loader call identifier parser
noise64 Jul 2, 2026
d3aa604
Share loader Object keys parser
noise64 Jul 2, 2026
538fb99
Cover private builtin resolution APIs
noise64 Jul 2, 2026
407e874
Share loader export target parser
noise64 Jul 2, 2026
662798b
Share loader keyword parser
noise64 Jul 2, 2026
f484b29
Share Rust import keyword parser
noise64 Jul 2, 2026
e334b9d
Share ESM syntax keyword parser
noise64 Jul 2, 2026
ef8cd87
Share declaration keyword parser
noise64 Jul 2, 2026
c58d60b
Share CJS fixed-name parser
noise64 Jul 2, 2026
6808cba
Share CJS descriptor keyword parser
noise64 Jul 2, 2026
f31c61c
Share CJS Object keys parser
noise64 Jul 2, 2026
31f876f
Share CJS helper prefix parser
noise64 Jul 2, 2026
2b384a1
Share dynamic CJS identifier parser
noise64 Jul 2, 2026
7a73725
Share loader ESM syntax parser
noise64 Jul 2, 2026
1ac6fbb
Share loader identifier boundary parser
noise64 Jul 2, 2026
56ab0a5
Share Rust import meta parser
noise64 Jul 2, 2026
1678437
Parse loader import meta tokens
noise64 Jul 2, 2026
0060d4b
Share Rust object method parser
noise64 Jul 2, 2026
7cedf0a
Share Rust in-token parser
noise64 Jul 2, 2026
0d95108
Parse import meta main tokens
noise64 Jul 2, 2026
202968c
Share static import specifier parser
noise64 Jul 2, 2026
92f135f
Share import attribute string scanner
noise64 Jul 2, 2026
6661423
Share dynamic import specifier parser
noise64 Jul 2, 2026
2a5aace
Share package warning de-dupe state
noise64 Jul 2, 2026
766a6da
Share JS package exports lookup
noise64 Jul 2, 2026
89181dc
Share JS comment scanner
noise64 Jul 2, 2026
a8cf731
Cover CJS comment statement boundaries
noise64 Jul 2, 2026
8ba768c
Share Rust declaration keyword parsing
noise64 Jul 2, 2026
5d46a12
Reject private names as free CJS identifiers
noise64 Jul 2, 2026
59b564f
Share Rust CJS global name parsing
noise64 Jul 2, 2026
2405b57
Share Rust CJS declaration parsing
noise64 Jul 2, 2026
9836653
Remove unused Rust module scanner helpers
noise64 Jul 2, 2026
a8dda49
Parse createRequire graph imports as tokens
noise64 Jul 2, 2026
ed15a6d
Allow comments in createRequire wrapper scan
noise64 Jul 2, 2026
238106e
Allow comments in static import scans
noise64 Jul 2, 2026
3882423
Allow comments in static import attributes
noise64 Jul 2, 2026
31f3a2a
Allow comments in dynamic import attributes
noise64 Jul 2, 2026
9f4dbe8
Defer loader CJS previous-token checks
noise64 Jul 2, 2026
e0f4214
Share loader require binding keyword parsing
noise64 Jul 2, 2026
675e15b
Share Rust variable declaration keyword parsing
noise64 Jul 2, 2026
b690d3b
Align Rust CJS descriptor tests with Node
noise64 Jul 2, 2026
887986b
Mark ignored Rust scanner traversals
noise64 Jul 2, 2026
50ce3f1
Share JS CJS package fallback probing
noise64 Jul 2, 2026
b22879c
Reuse loader require call parser
noise64 Jul 2, 2026
e053455
Cover loader CJS continuation reexports
noise64 Jul 2, 2026
33da680
Cache require ESM graph file info
noise64 Jul 2, 2026
2a03800
Align JS package condition values
noise64 Jul 2, 2026
a8a31da
Reject node imports package targets
noise64 Jul 2, 2026
eae5e89
Align encoded imports package targets
noise64 Jul 3, 2026
d41acc5
Resolve loader CJS package reexports
noise64 Jul 3, 2026
4df7020
Harden CJS forEach reexport parsing
noise64 Jul 3, 2026
ff5b359
Align CJS require spread continuation exports
noise64 Jul 3, 2026
488808a
Align CJS direct require continuations
noise64 Jul 3, 2026
0f9e95f
Avoid CJS analysis probe Vec allocation
noise64 Jul 3, 2026
d89d10b
Cover CJS imports reexport analysis
noise64 Jul 3, 2026
ba520b7
Cover programmatic loader chaining
noise64 Jul 3, 2026
0c68c53
Clarify util inspect namespace compatibility
noise64 Jul 3, 2026
bbae930
Share Rust CJS ASI continuation scanner helper
noise64 Jul 3, 2026
920a901
Align loader CJS ASI continuation scanning
noise64 Jul 3, 2026
1d3036d
Avoid loader ASI pair substring allocation
noise64 Jul 3, 2026
6337078
Share CJS object literal entry parsing
noise64 Jul 3, 2026
fc90071
Share loader object literal entry parsing
noise64 Jul 3, 2026
0b18ad1
Avoid Rust CJS ASI pair slicing
noise64 Jul 3, 2026
9ddf93c
Share loader CJS operator parsing
noise64 Jul 3, 2026
e73e5bc
Share Rust CJS operator parsing
noise64 Jul 3, 2026
3b8f7a6
Share CJS spread token checks
noise64 Jul 3, 2026
51283eb
Share CJS assignment token checks
noise64 Jul 3, 2026
97fc0d9
Require loader CJS reexport boundaries
noise64 Jul 3, 2026
356d0de
Allow package root export targets
noise64 Jul 3, 2026
fddfc46
Share CJS getter return parsing
noise64 Jul 3, 2026
1e87112
Avoid loader getter member allocation
noise64 Jul 3, 2026
c296011
Fix ambiguous JS module syntax detection
noise64 Jul 3, 2026
db0cd7a
Defer CJS wrapper redeclaration scan
noise64 Jul 3, 2026
e08660f
Fix require ESM syntax detection bridge
noise64 Jul 3, 2026
d8e2595
Promote module diagnostics channel tests
noise64 Jul 3, 2026
79c5be1
Promote delayed require tests
noise64 Jul 3, 2026
f4b6bda
Clarify runnable module subtests
noise64 Jul 3, 2026
3fd8c31
Clarify runnable source map module subtests
noise64 Jul 3, 2026
09d40fc
Fix test module mock dynamic imports
noise64 Jul 3, 2026
81ae155
Cover dynamic import cache mutation
noise64 Jul 3, 2026
d7e99ae
Clarify loader CLI known gaps
noise64 Jul 3, 2026
3697f52
Promote extensionless ESM import subtests
noise64 Jul 3, 2026
57c8ddd
Promote ESM type flag import subtests
noise64 Jul 3, 2026
98844ca
Cover module syntax scanner false positives
noise64 Jul 3, 2026
710a5d2
Promote CJS source map cache cleanup
noise64 Jul 3, 2026
1df6794
Clarify VM module leak compatibility status
noise64 Jul 3, 2026
b4f3e14
Classify source map CallSite offset difference
noise64 Jul 3, 2026
7277585
Fix cjs require runtime fixture
noise64 Jul 3, 2026
15d62cd
Cover package exports CJS reexport analysis
noise64 Jul 3, 2026
15be5e3
Add opt-in runtime test caches
noise64 Jul 5, 2026
0c5e2de
Unify module package resolution paths
noise64 Jul 6, 2026
a140a78
Guard Rust-owned CJS package imports
noise64 Jul 6, 2026
a6daf92
Bridge CJS package exports to Rust resolver
noise64 Jul 6, 2026
a970d09
Honor require extensions in CJS package fallback
noise64 Jul 6, 2026
e9ee149
Preserve CJS package ownership metadata
noise64 Jul 6, 2026
30abd32
Cache require esm graph specifier scans
noise64 Jul 6, 2026
5673eae
Share Rust module syntax classification
noise64 Jul 6, 2026
0b36887
Share CJS loader file result shaping
noise64 Jul 6, 2026
4029e2a
Remove stale module kind wrappers
noise64 Jul 6, 2026
cf072f3
Bridge CJS package fallback probing
noise64 Jul 6, 2026
8f4fd02
Merge branch 'main' into module-improvments
noise64 Jul 6, 2026
a385aeb
Guard exact CJS package imports resolution
noise64 Jul 6, 2026
e8369d7
Realpath ESM symlink module identity
noise64 Jul 6, 2026
8b24742
Resolve loader file URLs from directory bases
noise64 Jul 6, 2026
42e7b60
Update runtime dts goldenfiles
noise64 Jul 6, 2026
cf9809e
Fix diagnostics module import tracing semantics
noise64 Jul 6, 2026
e785abb
Avoid retaining CJS modules for snapshots
noise64 Jul 6, 2026
b71f71f
Share registered loader result helpers
noise64 Jul 6, 2026
fec39c7
Share static registered loader cache fill
noise64 Jul 6, 2026
2d8e69d
Share loader format normalization
noise64 Jul 6, 2026
ceeb3d9
Guard shared loader format normalization
noise64 Jul 6, 2026
45ea607
Guard static registered loader cache sharing
noise64 Jul 6, 2026
cf2b223
Share Rust loader package format mapping
noise64 Jul 6, 2026
53ef259
Share Rust package URL result object
noise64 Jul 6, 2026
e269ff0
Guard Rust package bridge result sharing
noise64 Jul 6, 2026
30d5d29
Fix CI runtime compatibility failures
noise64 Jul 6, 2026
40e0b52
Share registered loader context merging
noise64 Jul 6, 2026
a7bf64b
Share registered loader chain checks
noise64 Jul 6, 2026
4f59665
Share registered loader source checks
noise64 Jul 6, 2026
a18a84e
Share static loader source checks
noise64 Jul 6, 2026
be00440
Share registered loader source returns
noise64 Jul 6, 2026
ae8ef0f
Share static loader URL returns
noise64 Jul 6, 2026
6904cca
Share loader path return conversion
noise64 Jul 6, 2026
09ff150
Share loader module file-source returns
noise64 Jul 6, 2026
a3db39f
Share registered loader final format
noise64 Jul 6, 2026
5b68bb2
Share registered loader default load
noise64 Jul 6, 2026
7216d23
Share registered loader load format checks
noise64 Jul 6, 2026
9a145c9
Share registered loader resolve checks
noise64 Jul 6, 2026
b36f00b
Share registered loader load result checks
noise64 Jul 6, 2026
6796686
Guard CJS default snapshot ownership
noise64 Jul 6, 2026
ea28a0e
Share registered loader hook result handling
noise64 Jul 6, 2026
b80edc1
Share registered loader next normalization
noise64 Jul 6, 2026
9375530
Share registered loader resolve inputs
noise64 Jul 6, 2026
a779006
Share registered loader hook entries
noise64 Jul 6, 2026
918d4a0
Add optional unoptimized test loop
noise64 Jul 6, 2026
6c53447
Share test wasmtime config setup
noise64 Jul 6, 2026
bd4b93f
Share test linker host setup
noise64 Jul 6, 2026
e7a9701
Guard test artifact cache freshness
noise64 Jul 6, 2026
e8eafc6
Clarify test cache drop behavior
noise64 Jul 6, 2026
a6933fe
Share CJS package bridge file shaping
noise64 Jul 6, 2026
8127500
Share CJS package import fallback
noise64 Jul 6, 2026
3d3daba
Share loader function header parsing
noise64 Jul 6, 2026
9429f17
Share loader optional semicolon parsing
noise64 Jul 6, 2026
d9a8cd8
Share loader getter semicolon parsing
noise64 Jul 6, 2026
3364522
Share CJS require id validation
noise64 Jul 6, 2026
3b572de
Share require resolve request validation
noise64 Jul 6, 2026
da43459
Share CJS module record initialization
noise64 Jul 7, 2026
771ebb6
Share CJS load failure cleanup
noise64 Jul 7, 2026
43b3d97
Share registered loader CommonJS returns
noise64 Jul 7, 2026
80a8fc2
Share sync loader file source fallback
noise64 Jul 7, 2026
941c4b0
Share CJS loader file URL results
noise64 Jul 7, 2026
1c8c04b
Share static loader source reads
noise64 Jul 7, 2026
451a59c
Update module source guards
noise64 Jul 7, 2026
710adba
Avoid mutating loader resolve results
noise64 Jul 7, 2026
851a8c9
Share registered loader builtin resolution
noise64 Jul 7, 2026
b36dc73
Share JS package resolver bridge call
noise64 Jul 7, 2026
266a55d
Share Rust JS-condition package resolution
noise64 Jul 7, 2026
dbe3b3c
Share global-condition package resolution
noise64 Jul 7, 2026
2bb46b9
Share ESM package identity normalization
noise64 Jul 7, 2026
dc6b63a
Share loader package result shaping
noise64 Jul 7, 2026
42ffd6c
Share loader file URL source reads
noise64 Jul 7, 2026
0622a2d
Share registered loader raw results
noise64 Jul 7, 2026
e50fa59
Share registered loader base contexts
noise64 Jul 7, 2026
1d2fbc1
Share registered loader URL format results
noise64 Jul 7, 2026
7394200
Share CJS analysis package contexts
noise64 Jul 7, 2026
f3f4306
Share static loader child URL normalization
noise64 Jul 7, 2026
3778f13
Preserve static loader file URL suffixes
noise64 Jul 7, 2026
729e92c
Fix module CI regressions
noise64 Jul 7, 2026
ef082d8
Share named import resolver contexts
noise64 Jul 7, 2026
b41170a
Share directory import resolver context
noise64 Jul 7, 2026
b02d674
Trim CJS package exports helper state
noise64 Jul 7, 2026
6abef10
Trim package scope cache state
noise64 Jul 7, 2026
06e9603
Share CJS reexport recursion analysis
noise64 Jul 7, 2026
2474b80
Guard prepared component cache keys
noise64 Jul 7, 2026
16b5db6
Remove dead JS whitespace scanner
noise64 Jul 7, 2026
f8f004b
Share package resolver bridge execution
noise64 Jul 7, 2026
42a04a8
Keep package import metadata Rust-owned
noise64 Jul 7, 2026
2d4314b
Guard Rust-owned package map errors
noise64 Jul 7, 2026
a252507
Share global package condition provider
noise64 Jul 7, 2026
a4cf206
Use Rust package condition arrays directly
noise64 Jul 7, 2026
67fab57
Avoid package bridge condition copy
noise64 Jul 7, 2026
e4b8057
Avoid CJS exports condition copy
noise64 Jul 7, 2026
e4ac460
Avoid require esm graph condition copy
noise64 Jul 7, 2026
6d07429
Avoid sync loader CJS condition copy
noise64 Jul 7, 2026
f56956a
Share sync loader source fallback
noise64 Jul 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,22 @@ jobs:
strategy:
fail-fast: false
matrix:
group: [1, 2, 3, 4, 5, 6, 7, 8]
group: [1, 2, 3, 4, 5, 6, 7, 8, 9]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/actions/setup
- name: Enable Golem wasmtime fork
run: bash .github/scripts/enable-wasmtime-fork.sh
- name: Runtime tests (group ${{ matrix.group }}/8)
- uses: actions/setup-node@v4
if: matrix.group == 9
with:
node-version: "22.14.0"
- name: Runtime tests (group ${{ matrix.group }}/9)
run: cargo test --test runtime $CI_WASMTIME_FORK_FEATURES -- --report-time --format ctrf --logfile target/ctrf.json ':tag:group${{ matrix.group }}'
env:
NODE_MODULES_APP_STRICT_NODE_BASELINE: "1"
- name: Publish Test Report
uses: ctrf-io/github-test-reporter@v1
if: always()
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.14.0
29 changes: 29 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,22 @@ cargo build --release
cargo test
```

### Optional fast test caches

The runtime and node compatibility test harness keeps all cache behavior off by default. For local iteration, enable the clean-state-preserving caches explicitly:

```bash
WASM_RQUICKJS_TEST_FAST=1 cargo test --test runtime --features use-golem-wasmtime -- module_resolution --report-time --test-threads 1
```

`WASM_RQUICKJS_TEST_FAST=1` enables:

- `WASM_RQUICKJS_TEST_WASMTIME_CACHE=1` — uses Wasmtime's filesystem compilation cache.
- `WASM_RQUICKJS_TEST_PREPARED_COMPONENT_CACHE=1` — reuses process-local `Engine`/`Linker`/`Component` values on the normal `TestInstance::new` path while still creating a fresh `Store`, component instance, WASI context, temp dir, and QuickJS runtime state per test. Node-compat tests that use `GolemPreparedComponent` do not currently use this cache layer.
- `WASM_RQUICKJS_TEST_ARTIFACT_CACHE=1` — reuses wrapper build and optimized component artifacts when their source inputs are unchanged.

Use `WASM_RQUICKJS_TEST_DROP_CACHE=1` with the artifact cache to force wrapper build and Wizer outputs to be refreshed. Do not use grouped tests to speed up module compatibility checks; these tests rely on clean runtime state per case.

### ⚠️ CRITICAL TEST RULES

**DO NOT run `cargo test` without arguments** — it runs everything and takes too long. **ALWAYS filter** to a specific test harness and module. Load the `skeleton-development` skill for full test rules and examples.
Expand Down Expand Up @@ -149,6 +165,19 @@ The `tests/node_compat/` directory contains vendored Node.js test files used to

Load the `fixing-node-compat-test` skill for the full workflow when making a test pass.

## Node Modules App Tests

The `tests/node_modules_apps/` directory contains CI-enforced runtime tests for unbundled npm apps installed with real `node_modules` and attached to the component filesystem as `/app`. This suite is separate from `tests/libraries/`, which documents Rollup-bundled package compatibility.

Important rules:

- `tests/node_modules_apps/config.jsonc` is the source of truth for node modules app tests. Runtime tests in `tests/runtime/node_modules_apps.rs` are generated from it.
- Add app fixtures under `tests/node_modules_apps/apps/<app>/` with a `package.json`, `run-node.mjs`, and `test-*` files exporting `run()`.
- Node modules app tests run `npm install --install-links --ignore-scripts --no-audit --no-fund`, verify the raw test with host Node.js, then run it through wasm-rquickjs from `/app`.
- Keep this suite focused on real `node_modules` module loading, CJS/ESM interop, package maps, filesystem-backed package behavior, and high-value smoke tests. Do not use it for native `.node`, WASM artifact loading, subprocess-heavy, or live-network scenarios.
- CI runs node modules app tests as runtime `group9`; regular runtime tests use `group1` through `group8`.
- Before running node modules app runtime tests after skeleton changes, run `./cleanup-skeleton.sh`, then use `cargo test --test runtime --features use-golem-wasmtime -- ':tag:group9'` for the CI-like group, `cargo test --test runtime --features use-golem-wasmtime -- node_modules_app --nocapture` for the full node modules app suite, or a narrower node modules app filter.

### ⚠️ Keeping `node_compat` and `node_compat_report` in sync

The `tests/node_compat.rs` test harness and the `tests/node_compat_report.rs` report generator are **two separate runners** with independent Host types, linker setups, and WASI context configurations. **Whenever you change the WASI context, linker setup, or Host configuration in `tests/common/mod.rs` (used by `node_compat`), you MUST apply the same change to `tests/node_compat_report.rs`** — otherwise the two runners will produce different results.
Expand Down
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,8 @@ Compatibility stubs — no V8 inspector in WASM.
<details>
<summary><strong><code>node:module</code></strong></summary>

- `require`, `createRequire`, `builtinModules`, `isBuiltin`, `runMain`, `_nodeModulePaths`
- `require`, `require.resolve`, `createRequire`, `builtinModules`, `isBuiltin`, `runMain`, `_nodeModulePaths`
- Package resolution supports `package.json` `main`, `exports` root/subpath maps, wildcard `exports` patterns, `imports` maps, and wildcard `imports` patterns. CJS resolution recognizes `golem`, `node`, `require`, `module-sync`, and `default` conditions; ESM resolution recognizes `golem`, `node`, `import`, `module-sync`, and `default`. Package `imports` can target relative files, external packages, and `node:` builtins.

</details>

Expand Down Expand Up @@ -1452,6 +1453,22 @@ There are a few important things to keep in mind when working on the project:
times and huge resulting binaries. Use the `cleanup-skeleton.sh` script to quickly remove the `target` directory from
the `skeleton` crate.

- Runtime and node compatibility tests that use the shared `CompiledTest` harness support opt-in local caches for faster
iteration:
`WASM_RQUICKJS_TEST_FAST=1 cargo test --test runtime --features use-golem-wasmtime -- module_resolution --report-time --test-threads 1`.
The caches are off by default and preserve a fresh Wasmtime `Store`, component instance, WASI context, temporary
directory, and QuickJS runtime state for each test. `WASM_RQUICKJS_TEST_FAST=1` enables the wrapper/optimized artifact
cache, prepared component cache, and Wasmtime compilation cache together. Use `WASM_RQUICKJS_TEST_ARTIFACT_CACHE=1`,
`WASM_RQUICKJS_TEST_PREPARED_COMPONENT_CACHE=1`, or `WASM_RQUICKJS_TEST_WASMTIME_CACHE=1` to enable only one layer, and
`WASM_RQUICKJS_TEST_DROP_CACHE=1` when generated wrapper or optimized component artifacts must be rebuilt; it forces
artifact cache freshness checks to miss, removes the central wrapper cache stamps, clears the in-process prepared
component cache, and bypasses the Wasmtime compilation cache for that run. `WASM_RQUICKJS_TEST_UNOPTIMIZED=1` skips
Wizer pre-initialization for `CompiledTest::new*` fixtures when a very short compile/test loop is more useful than
optimized-component startup behavior. The prepared component cache
currently applies to the normal `TestInstance::new` path; node-compat tests that instantiate through
`GolemPreparedComponent` still benefit from artifact and Wasmtime compilation caches, but do not use that prepared
component cache layer.

## Acknowledgements

The builtin JS modules are based on the work of several other projects:
Expand Down
Loading
Loading