From e41b2c32105da94bfff85705d4b708205d7390d0 Mon Sep 17 00:00:00 2001 From: mark2685 Date: Thu, 22 Jun 2023 14:50:03 -0700 Subject: [PATCH] fix: Update zustand peerDependencies; Update example zustand. Fix example test --- example/package.json | 2 +- example/src/App.test.tsx | 2 +- example/src/App.tsx | 3 +++ example/yarn.lock | 4 ++-- package.json | 4 ++-- src/computed.test.ts | 2 +- yarn.lock | 8 ++++---- 7 files changed, 14 insertions(+), 11 deletions(-) diff --git a/example/package.json b/example/package.json index b0a14787..91138401 100644 --- a/example/package.json +++ b/example/package.json @@ -16,7 +16,7 @@ "react-scripts": "5.0.1", "typescript": "^4.4.2", "web-vitals": "^2.1.0", - "zustand": "^4.3.2", + "zustand": "^4.3.8", "zustand-computed": "file:../" }, "scripts": { diff --git a/example/src/App.test.tsx b/example/src/App.test.tsx index 2a68616d..a96623c4 100644 --- a/example/src/App.test.tsx +++ b/example/src/App.test.tsx @@ -4,6 +4,6 @@ import App from './App'; test('renders learn react link', () => { render(); - const linkElement = screen.getByText(/learn react/i); + const linkElement = screen.getByText(/zustand-computed/i); expect(linkElement).toBeInTheDocument(); }); diff --git a/example/src/App.tsx b/example/src/App.tsx index 1cbb561d..e93bc444 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -59,6 +59,9 @@ function App() {
logo +

+ zustand-computed +

diff --git a/example/yarn.lock b/example/yarn.lock index 0699544f..bd5e22dd 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -9373,9 +9373,9 @@ yocto-queue@^0.1.0: integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== "zustand-computed@file:..": - version "1.3.3" + version "1.3.5" -zustand@^4.3.2: +zustand@^4.3.8: version "4.3.8" resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.3.8.tgz#37113df8e9e1421b0be1b2dca02b49b76210e7c4" integrity sha512-4h28KCkHg5ii/wcFFJ5Fp+k1J3gJoasaIbppdgZFO4BPJnsNxL0mQXBSFgOgAdCdBj35aDTPvdAJReTMntFPGg== diff --git a/package.json b/package.json index d422d78b..0dd958f3 100644 --- a/package.json +++ b/package.json @@ -39,11 +39,11 @@ "ts-jest": "^29.0.3", "ts-node": "^10.9.1", "typescript": "^4.8.4", - "zustand": "^4.3.2" + "zustand": "^4.3.8" }, "peerDependencies": { "react": "^18.2.0", - "zustand": "^4.1.4" + "zustand": "^4.3.8" }, "keywords": [ "react", diff --git a/src/computed.test.ts b/src/computed.test.ts index 97af12be..c5ba16bd 100644 --- a/src/computed.test.ts +++ b/src/computed.test.ts @@ -1,5 +1,5 @@ -import { computed, ComputedStateOpts } from "./computed" import { create } from "zustand" +import { computed, ComputedStateOpts } from "./computed" type Store = { count: number diff --git a/yarn.lock b/yarn.lock index d0ac2657..a2ea10ad 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4124,9 +4124,9 @@ yocto-queue@^0.1.0: resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== -zustand@^4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.3.2.tgz#bb121fcad84c5a569e94bd1a2695e1a93ba85d39" - integrity sha512-rd4haDmlwMTVWVqwvgy00ny8rtti/klRoZjFbL/MAcDnmD5qSw/RZc+Vddstdv90M5Lv6RPgWvm1Hivyn0QgJw== +zustand@^4.3.8: + version "4.3.8" + resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.3.8.tgz#37113df8e9e1421b0be1b2dca02b49b76210e7c4" + integrity sha512-4h28KCkHg5ii/wcFFJ5Fp+k1J3gJoasaIbppdgZFO4BPJnsNxL0mQXBSFgOgAdCdBj35aDTPvdAJReTMntFPGg== dependencies: use-sync-external-store "1.2.0"