udecode / zustand-x

Zustand store factory for a best-in-class developer experience.
https://zustand-x.udecode.dev
MIT License
328 stars 20 forks source link

Upgrade Zustand #57

Closed enchorb closed 1 year ago

enchorb commented 1 year ago

Description

Upgrade zustand and immer dependencies Zustand v4+ deprecated some types so brought them in-package

changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 3b797e8e3484e4c5f419c29b3560964ff9c51332

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---------------- | ----- | | @udecode/zustood | Major |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

reviewpad[bot] commented 1 year ago

AI-Generated Summary: This pull request updates the dependencies in the package.json and yarn.lock files. More specifically, the zustand library has been upgraded to version 4.3.9, the immer library to version 10.0.2, and the react-tracked library to version 1.7.11. The zustood package version has also been bumped to 1.1.4. Additionally, the pull request implements some updates in the code base according to the newer library versions and removes the redundant DevtoolsOptions type. It impacts 14 files in total, including additions, deletions and modifications.

reviewpad[bot] commented 1 year ago

Thank you @enchorb for this first contribution!

reviewpad[bot] commented 1 year ago

Reviewpad Report

:bangbang: Errors

:warning: Warnings

reviewpad[bot] commented 1 year ago

AI-Generated Summary: This pull request contains three patches. The primary goal was to update various dependencies in the package.json and yarn.lock files. The 'zustand' version was updated to ^4.3.9 from ^3.6.4. The versions of 'immer' and 'react-tracked' were also updated.

In the second patch, several fixes were introduced to address issues related to the upgrade, including type adjustments and import corrections. The types and imports from 'zustand' and 'immer' were updated to match their new versions, and unused types were removed from the 'DevtoolsOptions.ts'.

The last patch created a markdown file called 'funny-trains-matter.md' within a '.changeset' directory. This file emphasizes the major changes brought about in the '@udecode/zustood' package, including the result of upgrading transitions to 'zustand' V4 and 'immer'.

zbeyens commented 1 year ago

Awesome, thanks for the PR @enchorb. Could you fix the CI? Then I'll land it.

Fixes #53

reviewpad[bot] commented 1 year ago

AI-Generated Summary: This pull request includes several significant changes over 4 patches.

  1. The first patch updates the dependencies in both the main package.json and the zustood package. Notably, the zustood version has also been bumped up. The immer and react-tracked dependencies are updated along with the zustand dependency.

  2. The second patch involves post-upgrade fixes and refactoring, mainly around the usage of the zustand and immer libraries. This includes changes to the store creation, middleware and types. There is also a notable deletion of the DevtoolsOptions type.

  3. The third patch adds a new markdown file funny-trains-matter.md under the .changeset directory, providing a summary for the changes introduced in this PR, including the upgrade to Zustand v4 and immer.

  4. The final patch updates the Node.js versions used in the GitHub Actions workflows from version 12 to 16, providing a more up-to-date testing environment. The checkout actions version also updated to v3.

enchorb commented 1 year ago

@zbeyens I believe the one test errored on CI because it is on node 12, added another commit to bump CI node version to 16

reviewpad[bot] commented 1 year ago

AI-Generated Summary: This pull request upgrades the zustand dependency to version 4, updating various relevant files in the process. Additionally, several other dependencies have been upgraded such as immer and react-tracked. Deprecated types in zustand v4+ were addressed. The node setup on several GitHub workflows has been updated to use actions/checkout@v3 and node-version: 16. A significant number of changes have been implemented in the zustood files to accommodate these upgrades. The associated package.json files have been updated to reflect the new version of zustand and immer.

zbeyens commented 1 year ago

@enchorb You don't need to bump the version, changeset will take care of this.

reviewpad[bot] commented 1 year ago

AI-Generated Summary: This pull request introduces several major changes:

It is recommended to review the official documentation of zustand v4 and immer for any additional changes and updates.

enchorb commented 1 year ago

@zbeyens If you need another maintainer I'd be happy to be added

zbeyens commented 1 year ago

Sure, invite sent!