From 63b34abc50a3ffb8d66a7038c627e640421f147d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 8 May 2026 00:42:30 +0000 Subject: [PATCH 1/2] =?UTF-8?q?chore(release):=20=F0=9F=93=A6=20version=20?= =?UTF-8?q?packages=20(canary)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/pre.json | 1 + CHANGELOG.md | 18 +++++++++++++++--- package.json | 2 +- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index 28cc2ac..af91f8f 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -5,6 +5,7 @@ "@fltsci/taurpc": "1.8.1" }, "changesets": [ + "allow-channel-reuse", "bigint-rewrite-f64-not-opaque", "bump-specta-rc-25", "calm-wombats-stand", diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a3e51c..acee90f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # taurpc +## 2.0.0-canary.8 + +### Patch Changes + +- [#31](https://github.com/fltsci/TauRPC/pull/31) [`e65f48e`](https://github.com/fltsci/TauRPC/commit/e65f48eff5cd8357f8c8232b63cee3827a0e0669) Thanks [@johncarmack1984](https://github.com/johncarmack1984)! - Allow `Channel`s to be reused across multiple TauRPC command invocations. + + Previously, when a command argument contained a `Channel` and the runtime ran a transform pass (e.g. semantic-types decoding), the generated TS proxy mutated the original channel's `onmessage` handler in place. Passing the same channel to a second command (or any code path that re-invoked the proxy) would re-wrap the already-wrapped handler, double-decoding payloads. + + The proxy now wraps via `new Channel((response) => v.onmessage(transform(response)))` instead of mutating, so the original channel is untouched and safe to reuse. + + Generated bindings now import `Channel` from `@tauri-apps/api/core` whenever the affected transform path is reachable. + ## 2.0.0-canary.7 ### Patch Changes @@ -94,11 +106,11 @@ createTauRPCProxy, type InferCommandOutput, type Router, - } from './taurpc/bindings' + } from "./taurpc/bindings"; // after - import type { Router } from './taurpc/bindings' - import { createTauRPCProxy, type InferCommandOutput } from './taurpc/proxy' + import type { Router } from "./taurpc/bindings"; + import { createTauRPCProxy, type InferCommandOutput } from "./taurpc/proxy"; ``` ## 1.8.2-canary.2 diff --git a/package.json b/package.json index 7309645..eb6f53b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fltsci/taurpc", - "version": "2.0.0-canary.7", + "version": "2.0.0-canary.8", "description": "Type-safe IPC layer for Tauri commands and events; forked from MatsDK/TauRPC", "main": "dist/index.cjs", "repository": { From a8a4e1723b924c07a8f7dda2e87a4a30838ddc88 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 8 May 2026 00:42:36 +0000 Subject: [PATCH 2/2] =?UTF-8?q?chore(release):=20=F0=9F=93=A6=20format=20a?= =?UTF-8?q?uto-generated=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index acee90f..23bda0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -106,11 +106,11 @@ createTauRPCProxy, type InferCommandOutput, type Router, - } from "./taurpc/bindings"; + } from './taurpc/bindings' // after - import type { Router } from "./taurpc/bindings"; - import { createTauRPCProxy, type InferCommandOutput } from "./taurpc/proxy"; + import type { Router } from './taurpc/bindings' + import { createTauRPCProxy, type InferCommandOutput } from './taurpc/proxy' ``` ## 1.8.2-canary.2