Skip to content

fix(ext/node): keep v8.serialize output readable by Node.js#35118

Merged
bartlomieju merged 1 commit into
mainfrom
fix/node-v8-serialize-format-15
Jun 11, 2026
Merged

fix(ext/node): keep v8.serialize output readable by Node.js#35118
bartlomieju merged 1 commit into
mainfrom
fix/node-v8-serialize-format-15

Conversation

@bartlomieju

Copy link
Copy Markdown
Member

The V8 14.9 upgrade in Deno 2.8.0 bumped V8's ValueSerializer wire format
version from 15 to 16 (64-bit ArrayBuffer lengths). The format is not
forwards-compatible and no released Node.js or Electron can read version
16, so any v8.serialize output crossing the Deno -> Node.js boundary now
throws "Unable to deserialize cloned data due to invalid or unsupported
version" on the Node.js side. This broke the Vitest VS Code extension,
whose extension-host RPC v8-serializes every message exchanged with the
deno -A worker.js process it spawns: the JSON handshake succeeds, then
the first serialized RPC response is rejected and test discovery stalls
forever.

For payloads smaller than 4GB the version 16 byte stream is identical to
version 15 except for the version byte in the header (length fields are
varints either way, and varint<size_t> equals varint<uint32_t> for values
below 2^32), so the serializer now relabels the header as version 15 when
the output is below 4GB. Larger outputs keep the version 16 header since
they cannot be represented in version 15 at all.

Fixes #35113

@bartlomieju
bartlomieju merged commit 34f8f94 into main Jun 11, 2026
136 checks passed
@bartlomieju
bartlomieju deleted the fix/node-v8-serialize-format-15 branch June 11, 2026 00:53
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.

VS Code Vitest Integration Fails after Deno 2.8.0+ update

1 participant