getAlby / lightning-browser-extension

The Bitcoin Lightning Browser Extension that brings deep Lightning & Nostr integration to the web. Wallet interface to multiple lightning nodes and key signer for Nostr, Liquid and onchain use.
https://getalby.com/#extension
MIT License
540 stars 194 forks source link

Update zustand 4.5.2 → 5.0.1 (major) #3268

Open depfu[bot] opened 1 week ago

depfu[bot] commented 1 week ago

Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ zustand (4.5.2 → 5.0.1) · Repo

Release Notes

5.0.1

This fixes shallow function for some edge cases.

What's Changed

  • fix(shallow): fallback map-like iterator comparison by @dai-shi in #2795
  • fix(shallow): iterable-like insensitive keys order comparison (alternate implementation) by @dai-shi in #2821

New Contributors

Full Changelog: v5.0.0...v5.0.1

5.0.0

🎉🎉🎉 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: v4.5.5...v5.0.0

4.5.5

This improves the persist middleware behavior for an edge case.

What's Changed

New Contributors

Full Changelog: v4.5.4...v4.5.5

4.5.4

There was an issue in v4.5.3 with some bundlers.

What's Changed

Full Changelog: v4.5.3...v4.5.4

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)
socket-security[bot] commented 1 week ago

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/cli-width@3.0.0 environment 0 11.5 kB knownasilya
npm/zustand@5.0.1 None 0 88.5 kB daishi

🚮 Removed packages: npm/use-sync-external-store@1.2.0, npm/zustand@4.5.2

View full report↗︎