Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Zustand #57

Merged
merged 6 commits into from
Jul 8, 2023
Merged

Upgrade Zustand #57

merged 6 commits into from
Jul 8, 2023

Conversation

enchorb
Copy link
Collaborator

@enchorb enchorb commented Jul 8, 2023

Description

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

@enchorb enchorb requested a review from zbeyens as a code owner July 8, 2023 13:40
@changeset-bot
Copy link

changeset-bot bot commented Jul 8, 2023

🦋 Changeset detected

Latest commit: 3b797e8

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
Copy link
Contributor

reviewpad bot commented Jul 8, 2023

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
Copy link
Contributor

reviewpad bot commented Jul 8, 2023

Thank you @enchorb for this first contribution!

@reviewpad reviewpad bot added medium Pull request is medium waiting-for-review labels Jul 8, 2023
@reviewpad
Copy link
Contributor

reviewpad bot commented Jul 8, 2023

Reviewpad Report

‼️ Errors

  • Unconventional commit detected: 'Update Deps' (f54b6e1)
  • Unconventional commit detected: 'Post Upgrade Fixes' (e7a7873)
  • Unconventional commit detected: 'Create funny-trains-matter.md' (2b1dbeb)
  • Unconventional commit detected: 'Bump Actions To Node 16' (e6e9357)
  • Unconventional commit detected: 'Major Version Bump' (417bfab)
  • Unconventional commit detected: 'Update package.json' (3b797e8)
  • Unconventional title detected: 'Upgrade Zustand' illegal 'U' character in commit message type: col=00

⚠️ Warnings

  • Please link an issue to the pull request

@reviewpad
Copy link
Contributor

reviewpad bot commented Jul 8, 2023

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
Copy link
Member

zbeyens commented Jul 8, 2023

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

Fixes #53

@reviewpad
Copy link
Contributor

reviewpad bot commented Jul 8, 2023

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
Copy link
Collaborator Author

enchorb commented Jul 8, 2023

@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
Copy link
Contributor

reviewpad bot commented Jul 8, 2023

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
Copy link
Member

zbeyens commented Jul 8, 2023

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

@reviewpad
Copy link
Contributor

reviewpad bot commented Jul 8, 2023

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

  • The zustand library has been upgraded to version 4 and immer to the latest version. This should bring new features, improvements, and performance optimizations. Also, the package now includes deprecated types in zustand v4+.
  • Updates the github workflows' node version to 16, updates the github actions versions to v3 and replaces the command Run lint with Run ${{ matrix.command }}.
  • Updates the package version of @udecode/zustood from 1.1.3 to 1.1.4.
  • Significant refactoring and improvements in the /packages/zustood directory to support the new version of zustand. This includes updates to types, imports, middlewares, and utilities among other things.
  • The DevtoolsOptions.ts file has been deleted, and these options are now imported from zustand/middleware.
  • Additionally, there are changes in the yarn.lock file reflecting the updated dependencies.

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

@zbeyens zbeyens merged commit 409420c into udecode:main Jul 8, 2023
@github-actions github-actions bot mentioned this pull request Jul 8, 2023
@enchorb
Copy link
Collaborator Author

enchorb commented Jul 14, 2023

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

@zbeyens
Copy link
Member

zbeyens commented Jul 14, 2023

Sure, invite sent!

@enchorb enchorb deleted the upgrade-zustand branch August 15, 2023 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium Pull request is medium waiting-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants