Skip to content

🐛 Patch Zustand persist storage fallback#2415

Open
JFWooten4 wants to merge 1 commit intostellar:mainfrom
JFWooten4:2145-pt-43
Open

🐛 Patch Zustand persist storage fallback#2415
JFWooten4 wants to merge 1 commit intostellar:mainfrom
JFWooten4:2145-pt-43

Conversation

@JFWooten4
Copy link
Copy Markdown
Contributor

This showed up across different platforms when running yarn build (at the end, after everything else succeeds).

Build error remedied:

image

Changes

This patch adds a no-op removeItem fallback when the configured Zustand persist storage adapter does not provide one.

Previously, Zustand only logged a warning when removeItem was missing. With this patch, the middleware assigns an empty fallback function instead, preventing downstream calls such as clearStorage() from failing when a custom storage implementation does not support removal.

This is applied across the CommonJS, ESM, SystemJS, and UMD middleware builds included in the package patch. It lays the framework for a more comprehensive solution if we want to tackle the Actions cleanup drops.

Copilot AI review requested due to automatic review settings April 30, 2026 10:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the repository’s patch-package override for zustand@3.7.2 to prevent failures when a custom Zustand persist storage adapter does not implement removeItem, by installing a no-op fallback.

Changes:

  • Replace the persist middleware warning for missing removeItem with a no-op removeItem assignment.
  • Apply the same fallback across the CJS, ESM (.js and .mjs), SystemJS, and UMD builds shipped in the zustand package.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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