Skip to content

capnweb@0.12.0

Choose a tag to compare

@github-actions github-actions released this 20 Aug 16:28
· 2 commits to main since this release
7702075

Minor Changes

  • #253 46de5a7 Thanks @ndisidore! - Fixed methods declared to return Promise<RpcStub<T>> producing broken stub-of-stub result types; they now type the same as Promise<T>. If you annotated such a result as RpcPromise<RpcStub<T>>, write RpcPromise<T> instead.

  • #242 9751a4e Thanks @ndisidore! - RpcPromise can now be constructed from a Promise: pipelined calls queue in order until it settles, so you can publish a capability that doesn't exist yet.

Patch Changes

  • #241 2de5871 Thanks @ndisidore! - Fix RPC argument and capture leaks on failure paths: call arguments are now reliably disposed when a call is rejected, delivered to a broken or disposed stub, or fails to serialize.

  • #251 7a6e5da Thanks @ndisidore! - The RpcPromise constructor now applies the same stub elision as method result types: wrapping a Promise<RpcStub<T>> produces the same RpcPromise<T> a method declared to return that stub would, plain-interface stub payloads keep their stub type, and promises resolving to inline object literals with methods now infer correctly.

  • #243 7e864a8 Thanks @ndisidore! - Fix WritableStream stubs leaking call arguments when the stub was already disposed or the call path was invalid. All failure paths in WritableStreamStubHook.call() now dispose the copied arguments, matching ReadableStream behavior.