From 54251abf7e52ae2fe2707944e1cc4a2cd5ab7db7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 5 Jan 2025 19:05:09 +0000 Subject: [PATCH] Version Packages --- .changeset/shy-bats-drop.md | 70 ------------------------------- packages/zustand-x/CHANGELOG.md | 74 +++++++++++++++++++++++++++++++++ packages/zustand-x/package.json | 2 +- 3 files changed, 75 insertions(+), 71 deletions(-) delete mode 100644 .changeset/shy-bats-drop.md diff --git a/.changeset/shy-bats-drop.md b/.changeset/shy-bats-drop.md deleted file mode 100644 index 09b5118..0000000 --- a/.changeset/shy-bats-drop.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -'zustand-x': major ---- - -- Added support for Zustand 4.5.0+. -- `mutative` support. Pass `mutative: true` in the options. - -## Migration Instructions - -Update the Store Initialization: - -1. Replace the old method of initializing the store with the new API. - - ```tsx - const store = createStore( - () => ({ - name: 'zustandX', - stars: 0, - }), - { - name: 'repo', - immer: true, - } - ); - ``` - - or - - ```tsx - const store = createStore({ - name: 'zustandX', - stars: 0, - }, - { - name: 'repo', - immer: true, - } - ); - ``` - -2. Ensure to pass the configuration object with name and other options as needed. -3. If your application relies on immer, enable it by passing immer: true in the configuration object. - - ```tsx - const store = createStore( - () => ({ - name: 'zustandX', - stars: 0, - }), - { - name: 'repo', - immer: true, - } - ); - ``` - -4. With the new version, integrating middlewares has also changed. Here's how to upgrade your middleware usage: - - ```tsx - const store = createStore( - middlewareWrapHere(() => ({ - name: 'zustandX', - stars: 0, - })), - { - name: 'repo', - immer: true, - } - ); - ``` diff --git a/packages/zustand-x/CHANGELOG.md b/packages/zustand-x/CHANGELOG.md index 6eb30bf..128fcb0 100644 --- a/packages/zustand-x/CHANGELOG.md +++ b/packages/zustand-x/CHANGELOG.md @@ -1,5 +1,79 @@ # @udecode/zustood +## 5.0.0 + +### Major Changes + +- [#92](https://github.com/udecode/zustand-x/pull/92) by [@imarabinda](https://github.com/imarabinda) – + + - Added support for Zustand 4.5.0+. + - `mutative` support. Pass `mutative: true` in the options. + + ## Migration Instructions + + Update the Store Initialization: + + 1. Replace the old method of initializing the store with the new API. + + ```tsx + const store = createStore( + () => ({ + name: 'zustandX', + stars: 0, + }), + { + name: 'repo', + immer: true, + } + ); + ``` + + or + + ```tsx + const store = createStore( + { + name: 'zustandX', + stars: 0, + }, + { + name: 'repo', + immer: true, + } + ); + ``` + + 2. Ensure to pass the configuration object with name and other options as needed. + 3. If your application relies on immer, enable it by passing immer: true in the configuration object. + + ```tsx + const store = createStore( + () => ({ + name: 'zustandX', + stars: 0, + }), + { + name: 'repo', + immer: true, + } + ); + ``` + + 4. With the new version, integrating middlewares has also changed. Here's how to upgrade your middleware usage: + + ```tsx + const store = createStore( + middlewareWrapHere(() => ({ + name: 'zustandX', + stars: 0, + })), + { + name: 'repo', + immer: true, + } + ); + ``` + ## 3.0.4 ### Patch Changes diff --git a/packages/zustand-x/package.json b/packages/zustand-x/package.json index 65417e3..17f3491 100644 --- a/packages/zustand-x/package.json +++ b/packages/zustand-x/package.json @@ -1,6 +1,6 @@ { "name": "zustand-x", - "version": "4.0.0", + "version": "5.0.0", "description": "Zustand store factory for a best-in-class developer experience.", "license": "MIT", "homepage": "https://zustand-x.udecode.dev",