diff --git a/.changeset/promise-stubhook-disposal.md b/.changeset/promise-stubhook-disposal.md deleted file mode 100644 index d27fa453..00000000 --- a/.changeset/promise-stubhook-disposal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"capnweb": patch ---- - -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. diff --git a/.changeset/result-stub-elision.md b/.changeset/result-stub-elision.md deleted file mode 100644 index d23953e3..00000000 --- a/.changeset/result-stub-elision.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"capnweb": minor -"capnweb-validate": minor ---- - -Fixed methods declared to return `Promise>` producing broken stub-of-stub result types; they now type the same as `Promise`. If you annotated such a result as `RpcPromise>`, write `RpcPromise` instead. diff --git a/.changeset/rpc-promise-ctor-elision.md b/.changeset/rpc-promise-ctor-elision.md deleted file mode 100644 index ea4c8143..00000000 --- a/.changeset/rpc-promise-ctor-elision.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"capnweb": patch ---- - -The `RpcPromise` constructor now applies the same stub elision as method result types: wrapping a `Promise>` produces the same `RpcPromise` 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. diff --git a/.changeset/rpc-promise-from-promise.md b/.changeset/rpc-promise-from-promise.md deleted file mode 100644 index 0428ba5d..00000000 --- a/.changeset/rpc-promise-from-promise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"capnweb": minor ---- - -`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. diff --git a/.changeset/writable-stream-arg-disposal.md b/.changeset/writable-stream-arg-disposal.md deleted file mode 100644 index 810282ea..00000000 --- a/.changeset/writable-stream-arg-disposal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"capnweb": patch ---- - -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. diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a68b127..85d0fa9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # capnweb +## 0.12.0 + +### Minor Changes + +- [#253](https://github.com/cloudflare/capnweb/pull/253) [`46de5a7`](https://github.com/cloudflare/capnweb/commit/46de5a7503e09242755c1bc59e67bdac37a5e8ab) Thanks [@ndisidore](https://github.com/ndisidore)! - Fixed methods declared to return `Promise>` producing broken stub-of-stub result types; they now type the same as `Promise`. If you annotated such a result as `RpcPromise>`, write `RpcPromise` instead. + +- [#242](https://github.com/cloudflare/capnweb/pull/242) [`9751a4e`](https://github.com/cloudflare/capnweb/commit/9751a4eb7422712c92b8a5c2100bc3a562e0a433) Thanks [@ndisidore](https://github.com/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](https://github.com/cloudflare/capnweb/pull/241) [`2de5871`](https://github.com/cloudflare/capnweb/commit/2de5871421d852c8d5a3db241ce6f5648db3104a) Thanks [@ndisidore](https://github.com/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](https://github.com/cloudflare/capnweb/pull/251) [`7a6e5da`](https://github.com/cloudflare/capnweb/commit/7a6e5da8cf9d14f766e35dd9b07aab5637803e11) Thanks [@ndisidore](https://github.com/ndisidore)! - The `RpcPromise` constructor now applies the same stub elision as method result types: wrapping a `Promise>` produces the same `RpcPromise` 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](https://github.com/cloudflare/capnweb/pull/243) [`7e864a8`](https://github.com/cloudflare/capnweb/commit/7e864a872bab9f810f24f43c478af64c6c773b00) Thanks [@ndisidore](https://github.com/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. + ## 0.11.1 ### Patch Changes diff --git a/package-lock.json b/package-lock.json index b311046e..49febfb3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "capnweb", - "version": "0.11.1", + "version": "0.12.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "capnweb", - "version": "0.11.1", + "version": "0.12.0", "license": "MIT", "workspaces": [ ".", @@ -7000,7 +7000,7 @@ } }, "packages/capnweb-validate": { - "version": "0.2.4", + "version": "0.3.0", "license": "MIT", "dependencies": { "typescript": ">=5.7.0 <7", @@ -7011,7 +7011,7 @@ }, "devDependencies": { "@typescript/vfs": "^1.6.4", - "capnweb": "^0.11.1", + "capnweb": "^0.12.0", "tsdown": "^0.22.0" }, "peerDependencies": { diff --git a/package.json b/package.json index 0627d486..0814a6f7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "capnweb", - "version": "0.11.1", + "version": "0.12.0", "description": "JavaScript/TypeScript-native RPC library with Promise Pipelining", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/capnweb-validate/CHANGELOG.md b/packages/capnweb-validate/CHANGELOG.md index 50ca882b..ecebbf18 100644 --- a/packages/capnweb-validate/CHANGELOG.md +++ b/packages/capnweb-validate/CHANGELOG.md @@ -1,5 +1,11 @@ # capnweb-validate +## 0.3.0 + +### Minor Changes + +- [#253](https://github.com/cloudflare/capnweb/pull/253) [`46de5a7`](https://github.com/cloudflare/capnweb/commit/46de5a7503e09242755c1bc59e67bdac37a5e8ab) Thanks [@ndisidore](https://github.com/ndisidore)! - Fixed methods declared to return `Promise>` producing broken stub-of-stub result types; they now type the same as `Promise`. If you annotated such a result as `RpcPromise>`, write `RpcPromise` instead. + ## 0.2.4 ### Patch Changes diff --git a/packages/capnweb-validate/package.json b/packages/capnweb-validate/package.json index a76e4bf9..c2779ba2 100644 --- a/packages/capnweb-validate/package.json +++ b/packages/capnweb-validate/package.json @@ -1,6 +1,6 @@ { "name": "capnweb-validate", - "version": "0.2.4", + "version": "0.3.0", "description": "Build-time TypeScript validation transform for capnweb RPC.", "license": "MIT", "type": "module", @@ -79,7 +79,7 @@ }, "devDependencies": { "@typescript/vfs": "^1.6.4", - "capnweb": "^0.11.1", + "capnweb": "^0.12.0", "tsdown": "^0.22.0" }, "publishConfig": {