Skip to content

[pull] main from nodejs:main - #1353

Merged
pull[bot] merged 7 commits into
adamlaska:mainfrom
nodejs:main
Sep 22, 2026
Merged

pull[bot] merged 7 commits into
adamlaska:mainfrom
nodejs:main

Conversation

@pull

@pull pull Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

soulee-dev and others added 7 commits September 22, 2026 03:28
add-64.js measured the same add_f64 symbol with the same signature as
add-f64.js and differed only in its argument constants.

Signed-off-by: Soul Lee <alus20x@gmail.com>
PR-URL: #66121
Refs: #63068
Refs: #62918
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Signed-off-by: leah-1ee <selee3196@gmail.com>
PR-URL: #65901
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Expose SQLite's virtual table API through a new
`database.createModule(name, options)` method, wrapping
`sqlite3_create_module_v2()`. This enables read-only virtual tables
backed by JavaScript data sources, usable either as an eponymous table
(`SELECT * FROM module_name`) or via `CREATE VIRTUAL TABLE t USING
module_name`. Hidden columns pass parameters using table-valued
function syntax (`SELECT * FROM module_name(param1, param2)`).

`options` accepts `columns`, `rows`, `directOnly`, and
`useBigIntArguments`. Column types are validated against INTEGER,
TEXT, REAL, BLOB, and ANY, and column names are quoted when building
the `sqlite3_declare_vtab()` schema.

Rebased from #61544, which was
opened by byteforge38 and became inactive. Changes on top of that
work:

- xColumn reports the value each hidden column was constrained to,
  rather than NULL. SQLite treats xBestIndex's `omit` as a hint, so it
  may recheck a constraint it already handed to xFilter; against NULL
  that recheck rejected every row, and `gs(1, 3) WHERE start = 1`
  returned no rows.
- xBestIndex lowers estimatedCost as it consumes constraints. With a
  constant cost the planner was free to pick the unconstrained plan and
  recheck afterwards, so a correlated parameter such as
  `FROM t, gs(t.a, t.a + 1)` also returned no rows.
- Violations of the iteration protocol report a SQLite error instead of
  calling PropagateJSError with no JavaScript exception pending. That
  left `.all()` returning undefined and `exec()` reporting success.
- xBestIndex passes the constrained hidden-column indices to xFilter
  through idxStr rather than an int bitmask, which previously aliased
  for parameter indices at or above the width of an int.
- xFilter, xNext, and xColumn take a CallbackDepthGuard. Without it
  close() from inside rows(), an iterator's next(), or a row getter
  finalized the statement that SQLite was still stepping, crashing the
  process.
- xClose calls the iterator's return() method so generator `finally`
  blocks run when SQLite stops stepping early, as it does for LIMIT or
  a `break` out of a for...of loop. It is skipped while tearing down
  from ~StatementSync or ~DatabaseSync, which run from garbage
  collection callbacks where JavaScript cannot be executed; an
  abandoned generator does not run `finally` in JavaScript either. It
  is also skipped when an error is already pending, so that error still
  reaches the caller.
- VirtualTableModule holds a BaseObjectWeakPtr<DatabaseSync> to match
  UserDefinedFunction instead of a raw pointer.
- createModule() rejects being called from an authorizer callback.
- Documents that values yielded by rows() follow the usual conversion
  rules, so a number is stored as REAL and a BigInt as INTEGER even
  when a column declares INTEGER, since virtual tables do not apply
  column affinity to the values they return.

Refs: #61544
Refs: #63826
Fixes: #61539

Co-authored-by: byteforge38 <stormcraft318@gmail.com>
Signed-off-by: Trevor Burnham <trevorburnham@gmail.com>
Assisted-by: Claude Opus 5
PR-URL: #65787
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
PR-URL: #62143
Fixes: #61740
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Add reusable AsyncWrap and HandleWrap interfaces and use them for
signal_wrap and watchdog typings.

This reflects the native inheritance hierarchy and exposes AsyncWrap
methods that are already available at runtime.

Signed-off-by: leah-1ee <selee3196@gmail.com>
PR-URL: #66150
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #66146
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Notable changes:

crypto:
  * (SEMVER-MINOR) add crypto.parsePKCS12() (Brian Muenzenmeyer) #65627
doc:
  * add araujogui to collaborators (Guilherme Araújo) #66090
ffi:
  * (SEMVER-MINOR) load libraries from a mounted VFS (Matteo Collina) #65909
fs:
  * (SEMVER-MINOR) add openAsBlobSync (greenhead) #65644
net:
  * (SEMVER-MINOR) support sending net.BoundSocket to threads and child processes (Guy Bedford) #64725
perf_hooks:
  * (SEMVER-MINOR) implement SlidingWindowHistogram (James M Snell) #65825
  * (SEMVER-MINOR) implement qrde analysis support in Histogram (James M Snell) #65806
sqlite:
  * (SEMVER-MINOR) bind undefined to NULL (Trevor Burnham) #65709
src,lib:
  * (SEMVER-MINOR) add util.markPromiseAsHandled (James M Snell) #65805
test:
  * (SEMVER-MINOR) expand histogram test coverage (James M Snell) #65825
util:
  * (SEMVER-MINOR) implement util.throttle (James M Snell) #65899
  * (SEMVER-MINOR) implement debounce (James M Snell) #65899

PR-URL: #66163
@pull pull Bot locked and limited conversation to collaborators Sep 22, 2026
@pull pull Bot added the ⤵️ pull label Sep 22, 2026
@pull
pull Bot merged commit 976a36a into adamlaska:main Sep 22, 2026
22 of 26 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants