diff --git a/.changeset/honest-phones-punch.md b/.changeset/honest-phones-punch.md deleted file mode 100644 index fd3f0fb7..00000000 --- a/.changeset/honest-phones-punch.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -"@preact-signals/utils": minor ---- - -Implemented `experimental_stateMacrosOptimization` for automatic optimization of state macroses in JSX - -Example: -```tsx -import { $state, $derived } from '@preact-signals/utils/macro' - -let a = $state(10) -let b = $state(20) - -const c = <>{a * b + 10} -``` -Will be optimized to: -```tsx -import { deepSignal as _deepSignal, $ as _$ } from "@preact-signals/utils"; - -let a = _deepSignal(10); -let b = _deepSignal(20); - -const c = <>{_$(() => a.value * b.value + 10)}; -``` - - -In result your components will have less rerender when using state bindings diff --git a/.changeset/twenty-deers-talk.md b/.changeset/twenty-deers-talk.md deleted file mode 100644 index a383eba0..00000000 --- a/.changeset/twenty-deers-talk.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -"@preact-signals/utils": minor ---- - -Removed `experimental_` prefix from `stateMacro` options of `@preact-signals/utils/babel` - -Migration (Vite): - -```diff -import { defineConfig } from "vite"; -import react from "@vitejs/plugin-react"; - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [ - react({ - babel: { - plugins: [ - "module:@preact-signals/safe-react/babel", - [ - "module:@preact-signals/utils/babel", - { -- experimental_stateMacros: true, -+ stateMacros: true, - }, - ], - ], - }, - }), - ], -}); -``` \ No newline at end of file diff --git a/apps/next-react-test/CHANGELOG.md b/apps/next-react-test/CHANGELOG.md index a28f09f5..f05cbcd3 100644 --- a/apps/next-react-test/CHANGELOG.md +++ b/apps/next-react-test/CHANGELOG.md @@ -1,5 +1,14 @@ # next-react-test +## 0.1.26 + +### Patch Changes + +- Updated dependencies [dcd7e2c] +- Updated dependencies [f706a6e] + - @preact-signals/utils@0.22.0 + - components-for-test@6.0.6 + ## 0.1.25 ### Patch Changes diff --git a/apps/next-react-test/package.json b/apps/next-react-test/package.json index df1b9bff..9bfd78cd 100644 --- a/apps/next-react-test/package.json +++ b/apps/next-react-test/package.json @@ -1,6 +1,6 @@ { "name": "next-react-test", - "version": "0.1.25", + "version": "0.1.26", "private": true, "scripts": { "dev": "next dev", diff --git a/apps/preact-test/CHANGELOG.md b/apps/preact-test/CHANGELOG.md index 61086a15..79433b55 100644 --- a/apps/preact-test/CHANGELOG.md +++ b/apps/preact-test/CHANGELOG.md @@ -1,5 +1,14 @@ # preact-test +## 0.0.45 + +### Patch Changes + +- Updated dependencies [dcd7e2c] +- Updated dependencies [f706a6e] + - @preact-signals/utils@0.22.0 + - components-for-test@6.0.6 + ## 0.0.44 ### Patch Changes diff --git a/apps/preact-test/package.json b/apps/preact-test/package.json index 4166d88a..0b5e4e87 100644 --- a/apps/preact-test/package.json +++ b/apps/preact-test/package.json @@ -1,7 +1,7 @@ { "name": "preact-test", "private": true, - "version": "0.0.44", + "version": "0.0.45", "type": "module", "scripts": { "dev": "vite", diff --git a/apps/react-test/CHANGELOG.md b/apps/react-test/CHANGELOG.md index 6ebf3f8c..231ef4bd 100644 --- a/apps/react-test/CHANGELOG.md +++ b/apps/react-test/CHANGELOG.md @@ -1,5 +1,14 @@ # react-test +## 0.0.51 + +### Patch Changes + +- Updated dependencies [dcd7e2c] +- Updated dependencies [f706a6e] + - @preact-signals/utils@0.22.0 + - components-for-test@6.0.6 + ## 0.0.50 ### Patch Changes diff --git a/apps/react-test/package.json b/apps/react-test/package.json index 8b5dff1c..5a8604d6 100644 --- a/apps/react-test/package.json +++ b/apps/react-test/package.json @@ -1,7 +1,7 @@ { "name": "react-test", "private": true, - "version": "0.0.50", + "version": "0.0.51", "type": "module", "scripts": { "dev:patching": "cross-env TRACKING_METHOD='patching' vite", diff --git a/apps/transformer-playground/CHANGELOG.md b/apps/transformer-playground/CHANGELOG.md index d170e85c..b7de217b 100644 --- a/apps/transformer-playground/CHANGELOG.md +++ b/apps/transformer-playground/CHANGELOG.md @@ -1,5 +1,13 @@ # transformer-playground +## 0.0.8 + +### Patch Changes + +- Updated dependencies [dcd7e2c] +- Updated dependencies [f706a6e] + - @preact-signals/utils@0.22.0 + ## 0.0.7 ### Patch Changes diff --git a/apps/transformer-playground/package.json b/apps/transformer-playground/package.json index cc50d924..20bb12ac 100644 --- a/apps/transformer-playground/package.json +++ b/apps/transformer-playground/package.json @@ -1,7 +1,7 @@ { "name": "transformer-playground", "private": true, - "version": "0.0.7", + "version": "0.0.8", "type": "module", "scripts": { "dev": "vite", diff --git a/packages/components-for-test/CHANGELOG.md b/packages/components-for-test/CHANGELOG.md index 80abd420..a6eb4dde 100644 --- a/packages/components-for-test/CHANGELOG.md +++ b/packages/components-for-test/CHANGELOG.md @@ -1,5 +1,14 @@ # components-for-test +## 6.0.6 + +### Patch Changes + +- Updated dependencies [dcd7e2c] +- Updated dependencies [f706a6e] + - @preact-signals/utils@0.22.0 + - @preact-signals/query@2.0.6 + ## 6.0.5 ### Patch Changes diff --git a/packages/components-for-test/package.json b/packages/components-for-test/package.json index 9b730ced..5be4a61a 100644 --- a/packages/components-for-test/package.json +++ b/packages/components-for-test/package.json @@ -1,6 +1,6 @@ { "name": "components-for-test", - "version": "6.0.5", + "version": "6.0.6", "private": true, "sideEffects": false, "author": { diff --git a/packages/query/CHANGELOG.md b/packages/query/CHANGELOG.md index a3e18383..c1129d29 100644 --- a/packages/query/CHANGELOG.md +++ b/packages/query/CHANGELOG.md @@ -1,5 +1,13 @@ # @preact-signals/query +## 2.0.6 + +### Patch Changes + +- Updated dependencies [dcd7e2c] +- Updated dependencies [f706a6e] + - @preact-signals/utils@0.22.0 + ## 2.0.5 ### Patch Changes diff --git a/packages/query/package.json b/packages/query/package.json index b947e7d5..be4a9ce1 100644 --- a/packages/query/package.json +++ b/packages/query/package.json @@ -1,6 +1,6 @@ { "name": "@preact-signals/query", - "version": "2.0.5", + "version": "2.0.6", "private": false, "publishConfig": { "access": "public" diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 7bcb9ff7..df50fba7 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,5 +1,64 @@ # @preact-signals/utils +## 0.22.0 + +### Minor Changes + +- dcd7e2c: Implemented `experimental_stateMacrosOptimization` for automatic optimization of state macroses in JSX + + Example: + + ```tsx + import { $state, $derived } from "@preact-signals/utils/macro"; + + let a = $state(10); + let b = $state(20); + + const c = <>{a * b + 10}; + ``` + + Will be optimized to: + + ```tsx + import { deepSignal as _deepSignal, $ as _$ } from "@preact-signals/utils"; + + let a = _deepSignal(10); + let b = _deepSignal(20); + + const c = <>{_$(() => a.value * b.value + 10)}; + ``` + + In result your components will have less rerender when using state bindings + +- f706a6e: Removed `experimental_` prefix from `stateMacro` options of `@preact-signals/utils/babel` + + Migration (Vite): + + ```diff + import { defineConfig } from "vite"; + import react from "@vitejs/plugin-react"; + + // https://vitejs.dev/config/ + export default defineConfig({ + plugins: [ + react({ + babel: { + plugins: [ + "module:@preact-signals/safe-react/babel", + [ + "module:@preact-signals/utils/babel", + { + - experimental_stateMacros: true, + + stateMacros: true, + }, + ], + ], + }, + }), + ], + }); + ``` + ## 0.21.0 ### Minor Changes diff --git a/packages/utils/package.json b/packages/utils/package.json index 7f252dea..6e251f38 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@preact-signals/utils", - "version": "0.21.0", + "version": "0.22.0", "private": false, "publishConfig": { "access": "public"