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

fix(storage): avoid calling setItem with the state just retrieved #2678

Merged
merged 1 commit into from
Aug 15, 2024
Merged

fix(storage): avoid calling setItem with the state just retrieved #2678

merged 1 commit into from
Aug 15, 2024

Conversation

double-thinker
Copy link
Contributor

Related Bug Reports or Discussions

Fixes #2663

Summary

This PR avoids a setItem call with the state just reteived from the storage.

Check List

  • pnpm run prettier for formatting code and docs

Copy link

vercel bot commented Aug 14, 2024

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

Name Status Preview Comments Updated (UTC)
zustand-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 14, 2024 0:26am

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me.
(I will merge the PR when we prepare the new release.)

@dai-shi dai-shi added this to the v4.5.5 milestone Aug 15, 2024
@dai-shi dai-shi merged commit dad3641 into pmndrs:main Aug 15, 2024
39 checks passed
kodiakhq bot referenced this pull request in weareinreach/InReach Aug 15, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change | OpenSSF | Age | Adoption | Passing
| Confidence |
|---|---|---|---|---|---|---|---|---|
|
[@aws-sdk/client-cognito-identity-provider](https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-cognito-identity-provider)
([source](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-cognito-identity-provider))
| dependencies | minor | [`3.629.0` ->
`3.631.0`](https://renovatebot.com/diffs/npm/@aws-sdk%2fclient-cognito-identity-provider/3.629.0/3.631.0)
| [![OpenSSF
Scorecard](https://api.securityscorecards.dev/projects/github.com/aws/aws-sdk-js-v3/badge)](https://securityscorecards.dev/viewer/?uri=github.com/aws/aws-sdk-js-v3)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@aws-sdk%2fclient-cognito-identity-provider/3.631.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@aws-sdk%2fclient-cognito-identity-provider/3.631.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@aws-sdk%2fclient-cognito-identity-provider/3.629.0/3.631.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@aws-sdk%2fclient-cognito-identity-provider/3.629.0/3.631.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [chromatic](https://www.chromatic.com)
([source](https://github.com/chromaui/chromatic-cli)) |
devDependencies | patch | [`11.7.0` ->
`11.7.1`](https://renovatebot.com/diffs/npm/chromatic/11.7.0/11.7.1) |
[![OpenSSF
Scorecard](https://api.securityscorecards.dev/projects/github.com/chromaui/chromatic-cli/badge)](https://securityscorecards.dev/viewer/?uri=github.com/chromaui/chromatic-cli)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/chromatic/11.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/chromatic/11.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/chromatic/11.7.0/11.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/chromatic/11.7.0/11.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [chromatic](https://www.chromatic.com)
([source](https://github.com/chromaui/chromatic-cli)) | dependencies |
patch | [`11.7.0` ->
`11.7.1`](https://renovatebot.com/diffs/npm/chromatic/11.7.0/11.7.1) |
[![OpenSSF
Scorecard](https://api.securityscorecards.dev/projects/github.com/chromaui/chromatic-cli/badge)](https://securityscorecards.dev/viewer/?uri=github.com/chromaui/chromatic-cli)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/chromatic/11.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/chromatic/11.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/chromatic/11.7.0/11.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/chromatic/11.7.0/11.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js)
| dependencies | patch | [`1.11.5` ->
`1.11.7`](https://renovatebot.com/diffs/npm/libphonenumber-js/1.11.5/1.11.7)
| |
[![age](https://developer.mend.io/api/mc/badges/age/npm/libphonenumber-js/1.11.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/libphonenumber-js/1.11.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/libphonenumber-js/1.11.5/1.11.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/libphonenumber-js/1.11.5/1.11.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js)
| devDependencies | patch | [`1.11.5` ->
`1.11.7`](https://renovatebot.com/diffs/npm/libphonenumber-js/1.11.5/1.11.7)
| |
[![age](https://developer.mend.io/api/mc/badges/age/npm/libphonenumber-js/1.11.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/libphonenumber-js/1.11.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/libphonenumber-js/1.11.5/1.11.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/libphonenumber-js/1.11.5/1.11.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[nextjs-google-analytics](https://github.com/MauricioRobayo/nextjs-google-analytics)
| peerDependencies | patch | [`2.3.3` ->
`2.3.7`](https://renovatebot.com/diffs/npm/nextjs-google-analytics/2.3.3/2.3.7)
| [![OpenSSF
Scorecard](https://api.securityscorecards.dev/projects/github.com/MauricioRobayo/nextjs-google-analytics/badge)](https://securityscorecards.dev/viewer/?uri=github.com/MauricioRobayo/nextjs-google-analytics)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/nextjs-google-analytics/2.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/nextjs-google-analytics/2.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/nextjs-google-analytics/2.3.3/2.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/nextjs-google-analytics/2.3.3/2.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[nextjs-google-analytics](https://github.com/MauricioRobayo/nextjs-google-analytics)
| devDependencies | patch | [`2.3.3` ->
`2.3.7`](https://renovatebot.com/diffs/npm/nextjs-google-analytics/2.3.3/2.3.7)
| [![OpenSSF
Scorecard](https://api.securityscorecards.dev/projects/github.com/MauricioRobayo/nextjs-google-analytics/badge)](https://securityscorecards.dev/viewer/?uri=github.com/MauricioRobayo/nextjs-google-analytics)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/nextjs-google-analytics/2.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/nextjs-google-analytics/2.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/nextjs-google-analytics/2.3.3/2.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/nextjs-google-analytics/2.3.3/2.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[nextjs-google-analytics](https://github.com/MauricioRobayo/nextjs-google-analytics)
| dependencies | patch | [`2.3.3` ->
`2.3.7`](https://renovatebot.com/diffs/npm/nextjs-google-analytics/2.3.3/2.3.7)
| [![OpenSSF
Scorecard](https://api.securityscorecards.dev/projects/github.com/MauricioRobayo/nextjs-google-analytics/badge)](https://securityscorecards.dev/viewer/?uri=github.com/MauricioRobayo/nextjs-google-analytics)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/nextjs-google-analytics/2.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/nextjs-google-analytics/2.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/nextjs-google-analytics/2.3.3/2.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/nextjs-google-analytics/2.3.3/2.3.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [zustand](https://github.com/pmndrs/zustand) | dependencies | patch
| [`4.5.4` ->
`4.5.5`](https://renovatebot.com/diffs/npm/zustand/4.5.4/4.5.5) |
[![OpenSSF
Scorecard](https://api.securityscorecards.dev/projects/github.com/pmndrs/zustand/badge)](https://securityscorecards.dev/viewer/?uri=github.com/pmndrs/zustand)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/zustand/4.5.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/zustand/4.5.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/zustand/4.5.4/4.5.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/zustand/4.5.4/4.5.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>aws/aws-sdk-js-v3
(@&#8203;aws-sdk/client-cognito-identity-provider)</summary>

###
[`v3.631.0`](https://github.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-cognito-identity-provider/CHANGELOG.md#36310-2024-08-14)

[Compare
Source](https://github.com/aws/aws-sdk-js-v3/compare/v3.629.0...v3.631.0)

**Note:** Version bump only for package
[@&#8203;aws-sdk/client-cognito-identity-provider](https://github.com/aws-sdk/client-cognito-identity-provider)

</details>

<details>
<summary>chromaui/chromatic-cli (chromatic)</summary>

###
[`v11.7.1`](https://github.com/chromaui/chromatic-cli/blob/HEAD/CHANGELOG.md#v1171-Wed-Aug-14-2024)

[Compare
Source](https://github.com/chromaui/chromatic-cli/compare/v11.7.0...v11.7.1)

##### 🐛 Bug Fix

- Add key to configuration to fix
[#&#8203;1022](https://github.com/chromaui/chromatic-cli/issues/1022)
[#&#8203;1023](https://github.com/chromaui/chromatic-cli/pull/1023)
([@&#8203;winkerVSbecks](https://github.com/winkerVSbecks))

##### Authors: 1

- Varun Vachhar
([@&#8203;winkerVSbecks](https://github.com/winkerVSbecks))

***

</details>

<details>
<summary>catamphetamine/libphonenumber-js (libphonenumber-js)</summary>

###
[`v1.11.7`](https://gitlab.com/catamphetamine/libphonenumber-js/compare/v1.11.6...v1.11.7)

[Compare
Source](https://gitlab.com/catamphetamine/libphonenumber-js/compare/v1.11.6...v1.11.7)

###
[`v1.11.6`](https://gitlab.com/catamphetamine/libphonenumber-js/compare/v1.11.5...372ebdf546c73f6e375bede21b53da2f969df53c)

[Compare
Source](https://gitlab.com/catamphetamine/libphonenumber-js/compare/v1.11.5...v1.11.6)

</details>

<details>
<summary>MauricioRobayo/nextjs-google-analytics
(nextjs-google-analytics)</summary>

###
[`v2.3.7`](https://github.com/MauricioRobayo/nextjs-google-analytics/releases/tag/v2.3.7)

[Compare
Source](https://github.com/MauricioRobayo/nextjs-google-analytics/compare/v2.3.3...v2.3.7)

##### Bug Fixes

- install dependencies before release
([abb0c6f](https://github.com/MauricioRobayo/nextjs-google-analytics/commit/abb0c6f8cfe02102213de225cfc769317c7f9801))

</details>

<details>
<summary>pmndrs/zustand (zustand)</summary>

### [`v4.5.5`](https://github.com/pmndrs/zustand/releases/tag/v4.5.5)

[Compare
Source](https://github.com/pmndrs/zustand/compare/v4.5.4...v4.5.5)

This improves the `persist` middleware behavior for an edge case.

#### What's Changed

- fix(storage): avoid calling setItem with the state just retrieved by
[@&#8203;double-thinker](https://github.com/double-thinker) in
[https://github.com/pmndrs/zustand/pull/2678](https://github.com/pmndrs/zustand/pull/2678)
- chore(deps): update dependencies by
[@&#8203;dai-shi](https://github.com/dai-shi) in
[https://github.com/pmndrs/zustand/pull/2680](https://github.com/pmndrs/zustand/pull/2680)

#### New Contributors

- [@&#8203;alwalxed](https://github.com/alwalxed) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/2634](https://github.com/pmndrs/zustand/pull/2634)
- [@&#8203;YashChauhan858](https://github.com/YashChauhan858) made
their first contribution in
[https://github.com/pmndrs/zustand/pull/2636](https://github.com/pmndrs/zustand/pull/2636)
- [@&#8203;donutcube](https://github.com/donutcube) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/2650](https://github.com/pmndrs/zustand/pull/2650)
- [@&#8203;vorant94](https://github.com/vorant94) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/2661](https://github.com/pmndrs/zustand/pull/2661)
- [@&#8203;jeppester](https://github.com/jeppester) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/2667](https://github.com/pmndrs/zustand/pull/2667)
- [@&#8203;ryota-murakami](https://github.com/ryota-murakami) made
their first contribution in
[https://github.com/pmndrs/zustand/pull/2668](https://github.com/pmndrs/zustand/pull/2668)
- [@&#8203;double-thinker](https://github.com/double-thinker) made
their first contribution in
[https://github.com/pmndrs/zustand/pull/2678](https://github.com/pmndrs/zustand/pull/2678)

**Full Changelog**:
pmndrs/zustand@v4.5.4...v4.5.5

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

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

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job
log](https://developer.mend.io/github/weareinreach/InReach).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6ImRldiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiLCJkZXBlbmRlbmNpZXMiLCJrb2RpYWs6IG1lcmdlLm1ldGhvZCA9ICdzcXVhc2gnIl19-->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit


- **New Features**
- Updated multiple dependencies to their latest versions, potentially
introducing performance improvements and new features.

- **Bug Fixes**
- Minor version updates across several packages may include bug fixes
and enhancements, improving overall application stability.

- **Chores**
- Regular maintenance performed through dependency updates to ensure the
application remains secure and efficient.


<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@KiwiKilian KiwiKilian mentioned this pull request Nov 4, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants