Context
The sequential Bun corpus frontier is now js/third_party/@duckdb/node-api/duckdb.test.ts at position 3949/4708, following completed Azure module support in #208. This contributes to #66.
Current gap
The module prepares, but runtime resolution fails with Cannot find module '@duckdb/node-api'. The copied suite contains 18 broad API tests, not just an import smoke test.
Scope
- Numeric enums (
ResultReturnType,StatementType) with reverse mappings. - DuckDB type/value/vector classes and string/conversion behavior across scalar and nested data types.
- Instance/connection lifecycle, basic queries, prepared and pending statements, incremental execution, and streaming.
- Data chunks, result metadata/inspection conveniences, readers, and configurable
duckdb_apiloading. - Correct cleanup and deterministic errors without native-addon stack leakage.
Acceptance criteria
require('@duckdb/node-api')resolves through Home's module system.- All 18 copied DuckDB Node API tests pass logically, including the all-data-types matrix.
- Async instance/connection/statement/result lifecycle matches the tested API.
- Vector validity, item access, value conversions, and nested type metadata match expectations.
- The exact passing result is pinned in the permanent third-party gate.