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

Update dependency zustand to v5 #4421

Merged
merged 2 commits into from
Oct 22, 2024
Merged

Update dependency zustand to v5 #4421

merged 2 commits into from
Oct 22, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 20, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
zustand ^4.5.5 -> ^5.0.0 age adoption passing confidence

Release Notes

pmndrs/zustand (zustand)

v5.0.0

Compare Source

🎉🎉🎉 Zustand v5 🐻🐻🐻
TL;DR
  • No new features
  • Drop many old things
  • Migration from v4 should be smooth.
Changes in v5
  • Drop default exports
  • Drop deprecated features
  • Make React 18 the minimum required version
  • Make use-sync-external-store a peer dependency (required for createWithEqualityFn and useStoreWithEqualityFn in zustand/traditional)
  • Make TypeScript 4.5 the minimum required version
  • Drop UMD/SystemJS support
  • Organize entry points in the package.json
  • Drop ES5 support
  • Stricter types when setState's replace flag is set
  • Persist middleware behavioral change
  • Other small improvements (technically breaking changes)
Migration Guide

Read the migration guide carefully:
https://github.com/pmndrs/zustand/blob/main/docs/migrations/migrating-to-v5.md

Frequently Reported Issue

During the RC period, some users encountered the following infinite loop error:

Uncaught Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.

This case was already a non-ideal behavior in v4 but appears more explicitly as an error in v5. While there are several ways to resolve this, using useShallow often fixes the problem.

What's Changed
New Contributors

Full Changelog: pmndrs/zustand@v4.5.5...v5.0.0


Configuration

📅 Schedule: Branch creation - "on sunday before 6:00am" in timezone UTC, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link

vercel bot commented Oct 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lobe-chat-database ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 20, 2024 7:27pm
lobe-chat-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 20, 2024 7:27pm

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Oct 20, 2024
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Oct 20, 2024
@lobehubbot
Copy link
Member

👍 @renovate[bot]

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

Copy link
Contributor Author

renovate bot commented Oct 20, 2024

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

Copy link

codecov bot commented Oct 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.27%. Comparing base (3389fbb) to head (9605ad7).
Report is 18 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #4421    +/-   ##
========================================
  Coverage   92.27%   92.27%            
========================================
  Files         493      493            
  Lines       35661    35661            
  Branches     3254     2306   -948     
========================================
  Hits        32905    32905            
  Misses       2756     2756            
Flag Coverage Δ
app 92.27% <ø> (ø)
server 97.37% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lobehubbot
Copy link
Member

❤️ Great PR @renovate[bot] ❤️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.
项目的成长离不开用户反馈和贡献,感谢您的贡献! 如果您对 LobeHub 开发者社区感兴趣,请加入我们的 discord,然后私信 @arvinxx@canisminor1990。他们会邀请您加入我们的私密开发者频道。我们将会讨论关于 Lobe Chat 的开发,分享和讨论全球范围内的 AI 消息。

@lobehubbot
Copy link
Member

🎉 This PR is included in version 1.22.18 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file released size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants