Skip to content

Node compatibility tests and improvements#80

Merged
vigoo merged 1461 commits intomainfrom
node-compat
Mar 20, 2026
Merged

Node compatibility tests and improvements#80
vigoo merged 1461 commits intomainfrom
node-compat

Conversation

@vigoo
Copy link
Contributor

@vigoo vigoo commented Feb 13, 2026

Summary

Massive expansion of Node.js API compatibility, backed by a comprehensive vendored test suite from Node.js v22 and extensive third-party library testing.

Node.js Built-in Module Expansion

Added 38 new built-in modules and significantly enhanced existing ones:

New modules: node:assert, node:async_hooks, node:cluster, node:constants, node:dgram, node:diagnostics_channel, node:dns, node:domain, node:events (replacing eventemitter), node:http2, node:https, node:inspector, node:intl, node:net, node:perf_hooks, node:punycode, node:querystring, node:readline, node:repl, node:sqlite, node:test, node:timers, node:tls, node:trace_events, node:tty, node:v8, node:vm, node:worker_threads, node:zlib, and more
Major enhancements: node:fs, node:crypto/WebCrypto, node:http, node:buffer, node:path, node:stream, node:url, node:util, node:console, node:process, node:os

Node.js v22 Compatibility Test Suite

Vendored 6,847 tests from the official Node.js v22 test suite with a custom test runner and report generator:

Third-Party Library Testing

Tested 200 npm libraries across 16 categories (AI/ML SDKs, databases, HTTP clients, testing frameworks, observability, templating, validation, etc.):

Notable compatible libraries include: Axios, OpenAI SDK, Anthropic SDK, Zod, Drizzle ORM, Prisma, pg, mysql2, Lodash, date-fns, Winston, Pino, uuid, semver, Handlebars, EJS, and many more.

Test Infrastructure

  • Split monolithic runtime.rs into per-module test files for faster iteration
  • Added node_compat.rs test harness with parallel execution using test-r
  • Added node_compat_report.rs for automated compatibility report generation
  • Created tools/ai-dev-tools/ — a TypeScript CLI for batch library testing workflows
  • Added 7 agent skills for development workflows (skeleton development, fixing node compat tests, adding built-in modules, etc.)
  • CI pipeline improvements with shared setup action and parallelized test jobs

Other Changes

  • Updated rquickjs dependency with rejection tracking support
  • Added rusqlite vendor submodule for node:sqlite support
  • Included Cargo.lock in skeleton for reproducible builds
  • Updated README with comprehensive supported APIs documentation

vigoo added 30 commits March 12, 2026 01:08
Automated fix via node-compat-fixer
Automated fix via node-compat-fixer
Automated fix via node-compat-fixer
Automated fix via node-compat-fixer
Automated fix via node-compat-fixer
…eletion.js

Automated fix via node-compat-fixer
@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.

@vigoo vigoo marked this pull request as ready for review March 20, 2026 18:34
@vigoo vigoo merged commit 810e587 into main Mar 20, 2026
19 checks passed
@vigoo vigoo deleted the node-compat branch March 20, 2026 20:29
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