Repository navigation
feat: use @bytecodealliance/jco-transpile for component encoding while pinning the jco Preview 1 adapter - #366
Open
philippedev101 wants to merge 1 commit into
Conversation
Import componentNew and metadataAdd from @bytecodealliance/jco-transpile/wasm-tools (0.24.0) while pinning @bytecodealliance/jco at 1.15.1 for preview1AdapterReactorPath. Upgrading @bytecodealliance/jco directly pulls in a newer Preview 1 adapter that imports wasi:sockets/network@0.2.10::network-error-code, which breaks HTTP world encoding against the bundled StarlingMonkey embedding. Keeping the adapter pinned while moving component encoding to @bytecodealliance/jco-transpile gives componentize() a current wasm-tools encoder (including Component Model async type opcode 0x43) without regressing HTTP compatibility. Add an offline Vitest regression in test/http-encoding.js covering HTTP world encoding against the bundled adapter.
philippedev101
requested review from
andreiltd,
tschneidereit and
vados-cosmonic
as code owners
November 28, 2026 19:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This moves
componentNewandmetadataAddto@bytecodealliance/jco-transpile/wasm-tools(0.24.0) while pinning@bytecodealliance/jcoat1.15.1forpreview1AdapterReactorPath. Component encoding now uses a currentwasm-toolsbuild that supports newer Component Model encodings (including async function type opcode0x43) without breaking HTTP world compatibility with the bundled StarlingMonkey embedding.Right now
src/componentize.jsimports all three helpers from@bytecodealliance/jco, andpackage.jsonuses"@bytecodealliance/jco": "^1.15.1". That couples the encoder version to the Preview 1 reactor adapter version. Upgrading@bytecodealliance/jcodirectly (for example to1.42.0) pulls in a newer Preview 1 adapter that importswasi:sockets/network@0.2.10::network-error-code, which fails component encoding intest/bindings.js(http-request) against the bundled embedding. Keeping the adapter pinned at1.15.1avoids that mismatch while lettingcomponentNewandmetadataAddstay current.Added an offline regression test in
test/http-encoding.jsthat componentizes the HTTP world without running network calls so future encoder or adapter updates catch drift deterministically. Verified withnpm run test:release(80 passed, 1 skipped, includinghttp-requestandtest/http-encoding.js) andnpm audit --omit=dev(0 vulnerabilities).