Skip to content

Module improvements - #113

Merged
noise64 merged 584 commits into
mainfrom
module-improvments
Jul 28, 2026
Merged

Module improvements#113
noise64 merged 584 commits into
mainfrom
module-improvments

Conversation

@noise64

@noise64 noise64 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Resolves GOL-57
Resolves GOL-393

This PR completes the same-process module-loader work.

What this enables

  • loads installed node_modules with Node-style package entry points, exports/imports maps, conditions, self-references, extensions, directories, and symlinks.
  • runs mixed CommonJS/ESM dependency graphs, including require(esm), CJS named exports/reexports, JSON import attributes, cycles, and Node-compatible cache behavior.
  • preserves mutable Node module APIs such as require.cache, require.extensions, Module._pathCache, custom extension handlers, and side-effect-free require.resolve.
  • supports same-process programmatic loader hooks and validates real npm package graphs across HTTP, database, cloud SDK, logging, validation, and data-format libraries.

Accepted follow-up boundaries are limited to:

  • simulated Node CLI, preload, process.execPath, and spawned-process loader modes;
  • TypeScript stripping/transpilation and Amaro;
  • worker-thread-only behavior;
  • native .node, WebAssembly/V8-specific behavior, and other true WASI/platform gaps;
  • non-core VM realm/GC/leak behavior and Node-internals-only tests.

Ordinary same-process package resolution, module-kind detection, registered-loader behavior, and CommonJS/ESM interop are covered here and are not deferred.

Node compatibility

  • CI-enforced passing entries: 3,085 → 3,234 (+149).
  • primary covered surface (runnable + known-gap): 4,295 → 4,425 (+130); known gaps 1,210 → 1,191 (−19); passing coverage 71.8% → 73.1%.

Functional followups

  • GOL-54 — complete non-core node:vm realm, GC, leak, and cached-data behavior.
  • GOL-325 — propagate HTTP abort cancellation to the underlying WASI request.
  • GOL-359 — synchronize live ESM exports for every loaded builtin.
  • GOL-361 — normalize QuickJS property-redefinition errors.
  • GOL-386 — fix pipelined HTTP keep-alive request sequencing.
  • GOL-388 — canonicalize real host symlinks for module identity.
  • GOL-389 — emit socket timeouts when pending writes stop progressing.
  • GOL-390 — route CommonJS loading through public Module hooks.
  • GOL-391 — preserve unrelated rejections during failing require(esm).
  • GOL-392 — restore Node-compatible unhandledRejection turn ordering.

Performance / CI related followups

  • GOL-347 — benchmark module-loader artifact size and startup.
  • GOL-348 — cache negative package.json lookups.
  • GOL-349 — cache repeated require(esm) graph analysis.
  • GOL-350 — reduce cold module-resolution filesystem probes.
  • GOL-351 — remove module-resolver hot-path micro-costs.
  • GOL-352 — diagnose the concurrent string_decoder hang.
  • GOL-360 — fix large TCP write backpressure stalls.
  • GOL-387 — diagnose WASI HTTP incomplete-message flakes.

@noise64 noise64 changed the title Module improvments Module improvements Jun 15, 2026
@noise64 noise64 self-assigned this Jun 15, 2026
@noise64 noise64 added this to the Golem 1.6 milestone Jun 15, 2026
@blacksmith-sh

This comment has been minimized.

@blacksmith-sh

This comment has been minimized.

@blacksmith-sh

This comment has been minimized.

@blacksmith-sh

This comment has been minimized.

@blacksmith-sh

This comment has been minimized.

@noise64
noise64 merged commit 5f62618 into main Jul 28, 2026
77 of 78 checks passed
@noise64
noise64 deleted the module-improvments branch July 28, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant