From 6a55c1eee5246420092befc4edbb0837e315fb80 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 14:53:18 -0400 Subject: [PATCH] Version Packages (#517) Co-authored-by: github-actions[bot] --- .changeset/nervous-goats-rescue.md | 28 --------------------------- packages/anywidget/CHANGELOG.md | 31 ++++++++++++++++++++++++++++++ packages/anywidget/package.json | 2 +- packages/react/CHANGELOG.md | 7 +++++++ packages/react/package.json | 2 +- packages/svelte/CHANGELOG.md | 7 +++++++ packages/svelte/package.json | 2 +- packages/types/CHANGELOG.md | 28 +++++++++++++++++++++++++++ packages/types/package.json | 2 +- 9 files changed, 77 insertions(+), 32 deletions(-) delete mode 100644 .changeset/nervous-goats-rescue.md diff --git a/.changeset/nervous-goats-rescue.md b/.changeset/nervous-goats-rescue.md deleted file mode 100644 index 748aad18..00000000 --- a/.changeset/nervous-goats-rescue.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -"anywidget": patch -"@anywidget/types": patch ---- - -Add experimental `invoke` API to call Python functions from the front end and -await the response. - -This removes a lot of boilerplate required for this pattern. The API is -experimental and opt-in only. Subclasses must use the `command` to register -functions. - -```py -class Widget(anywidget.AnyWidget): - _esm = """ - export default { - async render({ model, el, experimental }) { - let [msg, buffers] = await experimental.invoke("_echo", "hello, world"); - console.log(msg); // "HELLO, WORLD" - }, - }; - """ - - @anywidget.experimental.command - def _echo(self, msg, buffers): - # upper case the message - return msg.upper(), buffers -``` diff --git a/packages/anywidget/CHANGELOG.md b/packages/anywidget/CHANGELOG.md index 85cf09da..e9e55142 100644 --- a/packages/anywidget/CHANGELOG.md +++ b/packages/anywidget/CHANGELOG.md @@ -1,5 +1,36 @@ # anywidget +## 0.9.4 + +### Patch Changes + +- Add experimental `invoke` API to call Python functions from the front end and ([#453](https://github.com/manzt/anywidget/pull/453)) + await the response. + + This removes a lot of boilerplate required for this pattern. The API is + experimental and opt-in only. Subclasses must use the `command` to register + functions. + + ```py + class Widget(anywidget.AnyWidget): + _esm = """ + export default { + async render({ model, el, experimental }) { + let [msg, buffers] = await experimental.invoke("_echo", "hello, world"); + console.log(msg); // "HELLO, WORLD" + }, + }; + """ + + @anywidget.experimental.command + def _echo(self, msg, buffers): + # upper case the message + return msg.upper(), buffers + ``` + +- Updated dependencies [[`777fc268ee06fcf13e48a1c00cfdf90c14d786dc`](https://github.com/manzt/anywidget/commit/777fc268ee06fcf13e48a1c00cfdf90c14d786dc)]: + - @anywidget/types@0.1.7 + ## 0.9.3 ### Patch Changes diff --git a/packages/anywidget/package.json b/packages/anywidget/package.json index 48749508..dbd8a6af 100644 --- a/packages/anywidget/package.json +++ b/packages/anywidget/package.json @@ -1,7 +1,7 @@ { "name": "anywidget", "type": "module", - "version": "0.9.3", + "version": "0.9.4", "author": "Trevor Manz", "license": "MIT", "main": "dist/index.js", diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index b96f43a4..d0e6f03a 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,12 @@ # @anywidget/react +## 0.0.5 + +### Patch Changes + +- Updated dependencies [[`777fc268ee06fcf13e48a1c00cfdf90c14d786dc`](https://github.com/manzt/anywidget/commit/777fc268ee06fcf13e48a1c00cfdf90c14d786dc)]: + - @anywidget/types@0.1.7 + ## 0.0.4 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 5b2ee9a0..783e5a60 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "@anywidget/react", "type": "module", - "version": "0.0.4", + "version": "0.0.5", "description": "React utilities for anywidget", "main": "index.js", "types": "dist/index.d.ts", diff --git a/packages/svelte/CHANGELOG.md b/packages/svelte/CHANGELOG.md index 6673b7f7..9d6f909a 100644 --- a/packages/svelte/CHANGELOG.md +++ b/packages/svelte/CHANGELOG.md @@ -1,5 +1,12 @@ # @anywidget/svelte +## 0.0.6 + +### Patch Changes + +- Updated dependencies [[`777fc268ee06fcf13e48a1c00cfdf90c14d786dc`](https://github.com/manzt/anywidget/commit/777fc268ee06fcf13e48a1c00cfdf90c14d786dc)]: + - @anywidget/types@0.1.7 + ## 0.0.5 ### Patch Changes diff --git a/packages/svelte/package.json b/packages/svelte/package.json index d68806e4..b212616a 100644 --- a/packages/svelte/package.json +++ b/packages/svelte/package.json @@ -1,7 +1,7 @@ { "name": "@anywidget/svelte", "type": "module", - "version": "0.0.5", + "version": "0.0.6", "description": "Svelte utilities for anywidget", "main": "src/index.js", "types": "dist/index.d.ts", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 1aad7403..70fd9ade 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,5 +1,33 @@ # @anywidget/types +## 0.1.7 + +### Patch Changes + +- Add experimental `invoke` API to call Python functions from the front end and ([#453](https://github.com/manzt/anywidget/pull/453)) + await the response. + + This removes a lot of boilerplate required for this pattern. The API is + experimental and opt-in only. Subclasses must use the `command` to register + functions. + + ```py + class Widget(anywidget.AnyWidget): + _esm = """ + export default { + async render({ model, el, experimental }) { + let [msg, buffers] = await experimental.invoke("_echo", "hello, world"); + console.log(msg); // "HELLO, WORLD" + }, + }; + """ + + @anywidget.experimental.command + def _echo(self, msg, buffers): + # upper case the message + return msg.upper(), buffers + ``` + ## 0.1.6 ### Patch Changes diff --git a/packages/types/package.json b/packages/types/package.json index 494fa8f3..73a7d661 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,7 +1,7 @@ { "name": "@anywidget/types", "type": "module", - "version": "0.1.6", + "version": "0.1.7", "description": "utility types for anywidget", "main": "./index.ts", "types": "./index.ts",