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

chore(tests): migrate to vitest #1753

Merged
merged 9 commits into from
May 4, 2023
Merged

chore(tests): migrate to vitest #1753

merged 9 commits into from
May 4, 2023

Conversation

arjunvegda
Copy link
Collaborator

@arjunvegda arjunvegda commented Apr 14, 2023

Summary

Check List

  • yarn run prettier for formatting code and docs
  • Wait for chore: add extension in imports #1678 to be merged and update tests if needed
  • Ensure that the old TypeScript tests work as expected

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 14, 2023

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.

Latest deployment of this branch, based on commit 1b2e647:

Sandbox Source
React Configuration
React Typescript Configuration
React Browserify Configuration
React Snowpack Configuration
React Parcel Configuration
@pavlobu/zustand demo Configuration

@github-actions
Copy link

github-actions bot commented Apr 14, 2023

Size Change: 0 B

Total Size: 40.1 kB

ℹ️ View Unchanged
Filename Size
dist/context.js 766 B
dist/esm/context.js 572 B
dist/esm/index.js 573 B
dist/esm/middleware.js 3.87 kB
dist/esm/middleware/immer.js 210 B
dist/esm/shallow.js 509 B
dist/esm/vanilla.js 629 B
dist/index.js 725 B
dist/middleware.js 4.43 kB
dist/middleware/immer.js 328 B
dist/shallow.js 1.11 kB
dist/system/context.development.js 680 B
dist/system/context.production.js 365 B
dist/system/index.development.js 735 B
dist/system/index.production.js 402 B
dist/system/middleware.development.js 4 kB
dist/system/middleware.production.js 2.62 kB
dist/system/middleware/immer.development.js 292 B
dist/system/middleware/immer.production.js 187 B
dist/system/shallow.development.js 558 B
dist/system/shallow.production.js 344 B
dist/system/vanilla.development.js 672 B
dist/system/vanilla.production.js 310 B
dist/umd/context.development.js 868 B
dist/umd/context.production.js 533 B
dist/umd/index.development.js 855 B
dist/umd/index.production.js 533 B
dist/umd/middleware.development.js 4.58 kB
dist/umd/middleware.production.js 2.97 kB
dist/umd/middleware/immer.development.js 482 B
dist/umd/middleware/immer.production.js 342 B
dist/umd/shallow.development.js 1.23 kB
dist/umd/shallow.production.js 883 B
dist/umd/vanilla.development.js 800 B
dist/umd/vanilla.production.js 410 B
dist/vanilla.js 683 B

compressed-size-action

@dai-shi
Copy link
Member

dai-shi commented May 1, 2023

@arjunvegda #1678 is merged.

@arjunvegda arjunvegda marked this pull request as ready for review May 1, 2023 22:51
@arjunvegda arjunvegda requested a review from dai-shi May 1, 2023 22:51
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.

looks good except for one.

@@ -69,7 +69,6 @@ jobs:
run: |
sed -i~ "s/<rootDir>\/src\(.*\)\.ts/<rootDir>\/dist\/umd\1.development.js/" package.json
sed -i~ 's/"test:ci":.*,$/"test:ci": "jest",/' package.json
sed -i~ 's/= await import(/= require(/' tests/devtools.test.tsx
Copy link
Member

Choose a reason for hiding this comment

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

should remove L80 too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good call! Done

Copy link
Member

Choose a reason for hiding this comment

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

I didn't realize that one.
I meant this: sed -i~ 's/= await import(/= require(/' tests/devtools.test.tsx.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh! I'm surprised that it did not cause the tests to fail this time 🤔 Fixed it in this commit

dai-shi added a commit to Aslemammad/valtio that referenced this pull request May 1, 2023
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.

LGTM

@dai-shi dai-shi changed the title test: migrate to vitest chore(tests): migrate to vitest May 1, 2023
@dai-shi dai-shi merged commit 496a466 into main May 4, 2023
@dai-shi dai-shi deleted the test/migrate-to-vitest branch May 4, 2023 04:25
Comment on lines +134 to +135
"@vitest/ui": "^0.30.1",
"eslint-plugin-vitest": "^0.1.4",
Copy link
Member

Choose a reason for hiding this comment

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

I didn't notice when reviewing, but these shouldn't be in dependencies.

Copy link
Member

Choose a reason for hiding this comment

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

dai-shi added a commit to pmndrs/valtio that referenced this pull request May 4, 2023
* add vitest

* modify tests

* yarn lock

* remove swc and jest

* add types

* update

* update

* lint

* lint

* proxy-memoize

* fix ci

* fix ci

* fix

* fix

* lint, eslint-plugin-vitest, and ts-expect-error

* Update tests/computed.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* Update tests/computed.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* Update tests/computed.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* Update tests/derive.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* Update tests/derive.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* Update tests/derive.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* Update tests/derive.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* Update tests/derive.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* Update tests/derive.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* Update tests/getter.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* Update tests/getter.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* merge

* merge

* ts ci

* ts ci

* ts ci

* ts ci

* ts ci

* ts ci

* ts ci

* ts ci

* ts ci

* ts ci

* update

* update

* update

* update

* update

* Update package.json

Co-authored-by: Daishi Kato <[email protected]>

* Update vitest.config.ts

Co-authored-by: Daishi Kato <[email protected]>

* update

* update

* update

* update

* Update vitest.config.ts

* Update vitest.config.ts

* follow pmndrs/zustand#1753

* fix tests

---------

Co-authored-by: Daishi Kato <[email protected]>
Co-authored-by: daishi <[email protected]>
kodiakhq bot referenced this pull request in mheob/ef-calc May 12, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped)) | [`^18.16.2` -> `^18.16.6`](https://renovatebot.com/diffs/npm/@types%2fnode/18.16.3/18.16.6) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.16.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.16.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.16.6/compatibility-slim/18.16.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.16.6/confidence-slim/18.16.3)](https://docs.renovatebot.com/merge-confidence/) |
| [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped)) | [`^18.2.0` -> `^18.2.6`](https://renovatebot.com/diffs/npm/@types%2freact/18.2.0/18.2.6) | [![age](https://badges.renovateapi.com/packages/npm/@types%2freact/18.2.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2freact/18.2.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2freact/18.2.6/compatibility-slim/18.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2freact/18.2.6/confidence-slim/18.2.0)](https://docs.renovatebot.com/merge-confidence/) |
| [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped)) | [`^18.2.1` -> `^18.2.4`](https://renovatebot.com/diffs/npm/@types%2freact-dom/18.2.1/18.2.4) | [![age](https://badges.renovateapi.com/packages/npm/@types%2freact-dom/18.2.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2freact-dom/18.2.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2freact-dom/18.2.4/compatibility-slim/18.2.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2freact-dom/18.2.4/confidence-slim/18.2.1)](https://docs.renovatebot.com/merge-confidence/) |
| [eslint](https://eslint.org) ([source](https://github.com/eslint/eslint)) | [`^8.39.0` -> `^8.40.0`](https://renovatebot.com/diffs/npm/eslint/8.39.0/8.40.0) | [![age](https://badges.renovateapi.com/packages/npm/eslint/8.40.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/eslint/8.40.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/eslint/8.40.0/compatibility-slim/8.39.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/eslint/8.40.0/confidence-slim/8.39.0)](https://docs.renovatebot.com/merge-confidence/) |
| [vite](https://github.com/vitejs/vite/tree/main/#readme) ([source](https://github.com/vitejs/vite)) | [`^4.3.3` -> `^4.3.5`](https://renovatebot.com/diffs/npm/vite/4.3.3/4.3.5) | [![age](https://badges.renovateapi.com/packages/npm/vite/4.3.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/vite/4.3.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/vite/4.3.5/compatibility-slim/4.3.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/vite/4.3.5/confidence-slim/4.3.3)](https://docs.renovatebot.com/merge-confidence/) |
| [zustand](https://github.com/pmndrs/zustand) | [`^4.3.7` -> `^4.3.8`](https://renovatebot.com/diffs/npm/zustand/4.3.7/4.3.8) | [![age](https://badges.renovateapi.com/packages/npm/zustand/4.3.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/zustand/4.3.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/zustand/4.3.8/compatibility-slim/4.3.7)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/zustand/4.3.8/confidence-slim/4.3.7)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>eslint/eslint</summary>

### [`v8.40.0`](https://github.com/eslint/eslint/releases/tag/v8.40.0)

[Compare Source](https://github.com/eslint/eslint/compare/v8.39.0...v8.40.0)

#### Features

-   [`5db7808`](https://github.com/eslint/eslint/commit/5db7808139c1f2172797285a0700f01644bda254) feat: improve flat config errors for invalid rule options and severities ([#&#8203;17140](https://github.com/eslint/eslint/issues/17140)) (Josh Goldberg ✨)
-   [`f5574dc`](https://github.com/eslint/eslint/commit/f5574dc739fcc74a7841217ba1f31cce02bee1ff) feat: Add findConfigFile() method to FlatESLint ([#&#8203;17142](https://github.com/eslint/eslint/issues/17142)) (Nicholas C. Zakas)
-   [`e52b98b`](https://github.com/eslint/eslint/commit/e52b98bf25d882da4efd5559ce5974b6697cf701) feat: add `sourceCode` property to the rule context ([#&#8203;17107](https://github.com/eslint/eslint/issues/17107)) (Nitin Kumar)
-   [`1468f5b`](https://github.com/eslint/eslint/commit/1468f5b640cfa6fdd8a5ec895337f692def2780b) feat: add `physicalFilename` property to the rule context ([#&#8203;17111](https://github.com/eslint/eslint/issues/17111)) (Nitin Kumar)
-   [`0df4d4f`](https://github.com/eslint/eslint/commit/0df4d4f658c214e51310a986c03d44d34ceae3ec) feat: add `cwd` to rule context ([#&#8203;17106](https://github.com/eslint/eslint/issues/17106)) (Nitin Kumar)
-   [`52018f2`](https://github.com/eslint/eslint/commit/52018f21c19b3e461cae32843cddd17ed42f19cd) feat: add `filename` property to the rule context ([#&#8203;17108](https://github.com/eslint/eslint/issues/17108)) (Nitin Kumar)
-   [`559ff4e`](https://github.com/eslint/eslint/commit/559ff4e4bc54a8b6e6b54825d83c532d724204b3) feat: add new `omitLastInOneLineClassBody` option to the `semi` rule ([#&#8203;17105](https://github.com/eslint/eslint/issues/17105)) (Nitin Kumar)

#### Bug Fixes

-   [`f076e54`](https://github.com/eslint/eslint/commit/f076e54ecdb0fae70d9b43ad6888606097beef97) fix: Ensure FlatESLint#findConfigFile() doesn't throw. ([#&#8203;17151](https://github.com/eslint/eslint/issues/17151)) (Nicholas C. Zakas)

#### Documentation

-   [`e980bf3`](https://github.com/eslint/eslint/commit/e980bf38cf441f2eb29c458b93df77dc0111b391) docs: Update README (GitHub Actions Bot)
-   [`e92a6fc`](https://github.com/eslint/eslint/commit/e92a6fc7ed2a427f5e95f4b3a1c21d71553c97ee) docs: Update README (GitHub Actions Bot)
-   [`af5fe64`](https://github.com/eslint/eslint/commit/af5fe64c398c9bd4206c3c6c1ade81768b291031) docs: Fix custom rule schema docs ([#&#8203;17115](https://github.com/eslint/eslint/issues/17115)) (Adam Jones)
-   [`4a352a9`](https://github.com/eslint/eslint/commit/4a352a957ba9e721bec9f6f403b419a22b0ec423) docs: explain how to include predefined globals ([#&#8203;17114](https://github.com/eslint/eslint/issues/17114)) (Marcus Wyatt)
-   [`5ea15d9`](https://github.com/eslint/eslint/commit/5ea15d92ee358e8f3f652c94c019cac96aaec651) docs: add mastodon link in readme ([#&#8203;17110](https://github.com/eslint/eslint/issues/17110)) (唯然)

#### Chores

-   [`4053004`](https://github.com/eslint/eslint/commit/4053004c951813473d1c43f9f9959a9a3484242f) chore: upgrade [@&#8203;eslint/js](https://github.com/eslint/js)[@&#8203;8](https://github.com/8).40.0 ([#&#8203;17156](https://github.com/eslint/eslint/issues/17156)) (Milos Djermanovic)
-   [`50fed1d`](https://github.com/eslint/eslint/commit/50fed1da4449ad7ecbb558294438273cfce603d4) chore: package.json update for [@&#8203;eslint/js](https://github.com/eslint/js) release (ESLint Jenkins)
-   [`4c7a170`](https://github.com/eslint/eslint/commit/4c7a170b04c5a746e401bef7ce79766ff66a1168) chore: upgrade [@&#8203;eslint/eslintrc](https://github.com/eslint/eslintrc)[@&#8203;2](https://github.com/2).0.3 ([#&#8203;17155](https://github.com/eslint/eslint/issues/17155)) (Milos Djermanovic)
-   [`e80b7cc`](https://github.com/eslint/eslint/commit/e80b7cce640b60c00802148dbb51d03c7223afa9) chore: upgrade [email protected] ([#&#8203;17154](https://github.com/eslint/eslint/issues/17154)) (Milos Djermanovic)
-   [`ce3ac91`](https://github.com/eslint/eslint/commit/ce3ac91b510576e2afba1657aa5f09e162b4ab07) chore: upgrade [email protected] ([#&#8203;17153](https://github.com/eslint/eslint/issues/17153)) (Milos Djermanovic)
-   [`9094d79`](https://github.com/eslint/eslint/commit/9094d79fb42c0ebb6100426a3f2f851e8d42a0ee) chore: add `latest/` to `meta.docs.url` in all core rules ([#&#8203;17136](https://github.com/eslint/eslint/issues/17136)) (Milos Djermanovic)
-   [`d85efad`](https://github.com/eslint/eslint/commit/d85efad655deacc0dc3fdbbace33307094c3b91b) perf: don't use `grapheme-splitter` on ASCII strings in key-spacing rule ([#&#8203;17122](https://github.com/eslint/eslint/issues/17122)) (Milos Djermanovic)

</details>

<details>
<summary>vitejs/vite</summary>

### [`v4.3.5`](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small435-2023-05-05-small)

[Compare Source](https://github.com/vitejs/vite/compare/v4.3.4...v4.3.5)

-   fix: location is not defined error in cleanScssBugUrl ([#&#8203;13100](https://github.com/vitejs/vite/issues/13100)) ([91d7b67](https://github.com/vitejs/vite/commit/91d7b67)), closes [#&#8203;13100](https://github.com/vitejs/vite/issues/13100)
-   fix: unwrapId and pass ssr flag when adding to moduleGraph in this.load ([#&#8203;13083](https://github.com/vitejs/vite/issues/13083)) ([9041e19](https://github.com/vitejs/vite/commit/9041e19)), closes [#&#8203;13083](https://github.com/vitejs/vite/issues/13083)
-   fix(assetImportMetaUrl): reserve dynamic template literal query params ([#&#8203;13034](https://github.com/vitejs/vite/issues/13034)) ([7089528](https://github.com/vitejs/vite/commit/7089528)), closes [#&#8203;13034](https://github.com/vitejs/vite/issues/13034)
-   fix(debug): skip filter object args ([#&#8203;13098](https://github.com/vitejs/vite/issues/13098)) ([d95a9af](https://github.com/vitejs/vite/commit/d95a9af)), closes [#&#8203;13098](https://github.com/vitejs/vite/issues/13098)
-   fix(scan): handle html script tag attributes that contain ">" ([#&#8203;13101](https://github.com/vitejs/vite/issues/13101)) ([8a37de6](https://github.com/vitejs/vite/commit/8a37de6)), closes [#&#8203;13101](https://github.com/vitejs/vite/issues/13101)
-   fix(ssr): ignore \__esModule for ssrExportAll ([#&#8203;13084](https://github.com/vitejs/vite/issues/13084)) ([8a8ea1d](https://github.com/vitejs/vite/commit/8a8ea1d)), closes [#&#8203;13084](https://github.com/vitejs/vite/issues/13084)

### [`v4.3.4`](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small434-2023-05-02-small)

[Compare Source](https://github.com/vitejs/vite/compare/v4.3.3...v4.3.4)

-   fix(define): incorrect raw expression value type in build ([#&#8203;13003](https://github.com/vitejs/vite/issues/13003)) ([8f4cf07](https://github.com/vitejs/vite/commit/8f4cf07)), closes [#&#8203;13003](https://github.com/vitejs/vite/issues/13003)
-   fix(importAnalysisBuild): support parsing '**VITE_PRELOAD**' ([#&#8203;13023](https://github.com/vitejs/vite/issues/13023)) ([447df7c](https://github.com/vitejs/vite/commit/447df7c)), closes [#&#8203;13023](https://github.com/vitejs/vite/issues/13023)
-   fix(server): should respect hmr port when middlewareMode=false ([#&#8203;13040](https://github.com/vitejs/vite/issues/13040)) ([1ee0014](https://github.com/vitejs/vite/commit/1ee0014)), closes [#&#8203;13040](https://github.com/vitejs/vite/issues/13040)
-   fix(ssr): track for statements as block scope ([#&#8203;13021](https://github.com/vitejs/vite/issues/13021)) ([2f8502f](https://github.com/vitejs/vite/commit/2f8502f)), closes [#&#8203;13021](https://github.com/vitejs/vite/issues/13021)
-   chore: add changelog for vite 4.2.2 and 3.2.6 ([#&#8203;13055](https://github.com/vitejs/vite/issues/13055)) ([0c9f1f4](https://github.com/vitejs/vite/commit/0c9f1f4)), closes [#&#8203;13055](https://github.com/vitejs/vite/issues/13055)

</details>

<details>
<summary>pmndrs/zustand</summary>

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

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

For persist middleware, a new option for createJSONStorage in introduced to support more cases. Note that createJSONStorage isn't a required function (and it's not very recommended as it's not type safe), and one should create a custom storage for more use cases.

##### What's Changed

-   chore: add extension in imports by [@&#8203;dai-shi](https://github.com/dai-shi) in [https://github.com/pmndrs/zustand/pull/1678](https://github.com/pmndrs/zustand/pull/1678)
-   feat(middleware/persist): improve createJSONStorage for Maps by [@&#8203;lauhon](https://github.com/lauhon) in [https://github.com/pmndrs/zustand/pull/1763](https://github.com/pmndrs/zustand/pull/1763)
-   chore(tests): migrate to vitest by [@&#8203;arjunvegda](https://github.com/arjunvegda) in [https://github.com/pmndrs/zustand/pull/1753](https://github.com/pmndrs/zustand/pull/1753)

##### New Contributors

-   [@&#8203;JacobWeisenburger](https://github.com/JacobWeisenburger) made their first contribution in [https://github.com/pmndrs/zustand/pull/1737](https://github.com/pmndrs/zustand/pull/1737)
-   [@&#8203;spacemeowx2](https://github.com/spacemeowx2) made their first contribution in [https://github.com/pmndrs/zustand/pull/1742](https://github.com/pmndrs/zustand/pull/1742)
-   [@&#8203;arjunvegda](https://github.com/arjunvegda) made their first contribution in [https://github.com/pmndrs/zustand/pull/1754](https://github.com/pmndrs/zustand/pull/1754)
-   [@&#8203;zc627788](https://github.com/zc627788) made their first contribution in [https://github.com/pmndrs/zustand/pull/1752](https://github.com/pmndrs/zustand/pull/1752)
-   [@&#8203;arvinxx](https://github.com/arvinxx) made their first contribution in [https://github.com/pmndrs/zustand/pull/1758](https://github.com/pmndrs/zustand/pull/1758)
-   [@&#8203;SilentFlute](https://github.com/SilentFlute) made their first contribution in [https://github.com/pmndrs/zustand/pull/1762](https://github.com/pmndrs/zustand/pull/1762)
-   [@&#8203;dannobytes](https://github.com/dannobytes) made their first contribution in [https://github.com/pmndrs/zustand/pull/1779](https://github.com/pmndrs/zustand/pull/1779)
-   [@&#8203;BLooDBRothER](https://github.com/BLooDBRothER) made their first contribution in [https://github.com/pmndrs/zustand/pull/1777](https://github.com/pmndrs/zustand/pull/1777)
-   [@&#8203;lauhon](https://github.com/lauhon) made their first contribution in [https://github.com/pmndrs/zustand/pull/1763](https://github.com/pmndrs/zustand/pull/1763)

**Full Changelog**: pmndrs/zustand@v4.3.7...v4.3.8

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" in timezone Europe/Berlin, 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.

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

---

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

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/mheob/ef-calc).
bodinsamuel referenced this pull request in specfy/specfy Jul 8, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [zustand](https://github.com/pmndrs/zustand) | [`4.3.6` ->
`4.3.9`](https://renovatebot.com/diffs/npm/zustand/4.3.6/4.3.9) |
[![age](https://badges.renovateapi.com/packages/npm/zustand/4.3.9/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/zustand/4.3.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/zustand/4.3.9/compatibility-slim/4.3.6)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/zustand/4.3.9/confidence-slim/4.3.6)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

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

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

This includes a small improvement for production build mostly for Vite
users. Docs have been improved too!

#### What's Changed

- fix(build): mode env for "import" condition" by
[@&#8203;dai-shi](https://github.com/dai-shi) in
[https://github.com/pmndrs/zustand/pull/1845](https://github.com/pmndrs/zustand/pull/1845)

#### New Contributors

- [@&#8203;Debbl](https://github.com/Debbl) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/1792](https://github.com/pmndrs/zustand/pull/1792)
- [@&#8203;Nipodemos](https://github.com/Nipodemos) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/1782](https://github.com/pmndrs/zustand/pull/1782)
- [@&#8203;vadimshvetsov](https://github.com/vadimshvetsov) made their
first contribution in
[https://github.com/pmndrs/zustand/pull/1800](https://github.com/pmndrs/zustand/pull/1800)
- [@&#8203;bobylito](https://github.com/bobylito) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/1810](https://github.com/pmndrs/zustand/pull/1810)
- [@&#8203;celineling](https://github.com/celineling) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/1804](https://github.com/pmndrs/zustand/pull/1804)
- [@&#8203;valerii15298](https://github.com/valerii15298) made their
first contribution in
[https://github.com/pmndrs/zustand/pull/1819](https://github.com/pmndrs/zustand/pull/1819)
- [@&#8203;Hecmatyar](https://github.com/Hecmatyar) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/1816](https://github.com/pmndrs/zustand/pull/1816)
- [@&#8203;203x](https://github.com/203x) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/1826](https://github.com/pmndrs/zustand/pull/1826)
- [@&#8203;Ciensprog](https://github.com/Ciensprog) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/1844](https://github.com/pmndrs/zustand/pull/1844)
- [@&#8203;Romainlg29](https://github.com/Romainlg29) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/1843](https://github.com/pmndrs/zustand/pull/1843)
- [@&#8203;dcorb](https://github.com/dcorb) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/1847](https://github.com/pmndrs/zustand/pull/1847)
- [@&#8203;ivoilic](https://github.com/ivoilic) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/1856](https://github.com/pmndrs/zustand/pull/1856)
- [@&#8203;Kiku-CN](https://github.com/Kiku-CN) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/1889](https://github.com/pmndrs/zustand/pull/1889)
- [@&#8203;LartyHD](https://github.com/LartyHD) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/1893](https://github.com/pmndrs/zustand/pull/1893)
- [@&#8203;ChoiHyunjin](https://github.com/ChoiHyunjin) made their
first contribution in
[https://github.com/pmndrs/zustand/pull/1903](https://github.com/pmndrs/zustand/pull/1903)
- [@&#8203;thesuryavivek](https://github.com/thesuryavivek) made their
first contribution in
[https://github.com/pmndrs/zustand/pull/1906](https://github.com/pmndrs/zustand/pull/1906)
- [@&#8203;thedipankarroy](https://github.com/thedipankarroy) made
their first contribution in
[https://github.com/pmndrs/zustand/pull/1913](https://github.com/pmndrs/zustand/pull/1913)

**Full Changelog**:
pmndrs/zustand@v4.3.8...v4.3.9

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

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

For persist middleware, a new option for createJSONStorage in introduced
to support more cases. Note that createJSONStorage isn't a required
function (and it's not very recommended as it's not type safe), and one
should create a custom storage for more use cases.

#### What's Changed

- chore: add extension in imports by
[@&#8203;dai-shi](https://github.com/dai-shi) in
[https://github.com/pmndrs/zustand/pull/1678](https://github.com/pmndrs/zustand/pull/1678)
- feat(middleware/persist): improve createJSONStorage for Maps by
[@&#8203;lauhon](https://github.com/lauhon) in
[https://github.com/pmndrs/zustand/pull/1763](https://github.com/pmndrs/zustand/pull/1763)
- chore(tests): migrate to vitest by
[@&#8203;arjunvegda](https://github.com/arjunvegda) in
[https://github.com/pmndrs/zustand/pull/1753](https://github.com/pmndrs/zustand/pull/1753)

#### New Contributors

- [@&#8203;JacobWeisenburger](https://github.com/JacobWeisenburger)
made their first contribution in
[https://github.com/pmndrs/zustand/pull/1737](https://github.com/pmndrs/zustand/pull/1737)
- [@&#8203;spacemeowx2](https://github.com/spacemeowx2) made their
first contribution in
[https://github.com/pmndrs/zustand/pull/1742](https://github.com/pmndrs/zustand/pull/1742)
- [@&#8203;arjunvegda](https://github.com/arjunvegda) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/1754](https://github.com/pmndrs/zustand/pull/1754)
- [@&#8203;zc627788](https://github.com/zc627788) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/1752](https://github.com/pmndrs/zustand/pull/1752)
- [@&#8203;arvinxx](https://github.com/arvinxx) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/1758](https://github.com/pmndrs/zustand/pull/1758)
- [@&#8203;SilentFlute](https://github.com/SilentFlute) made their
first contribution in
[https://github.com/pmndrs/zustand/pull/1762](https://github.com/pmndrs/zustand/pull/1762)
- [@&#8203;dannobytes](https://github.com/dannobytes) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/1779](https://github.com/pmndrs/zustand/pull/1779)
- [@&#8203;BLooDBRothER](https://github.com/BLooDBRothER) made their
first contribution in
[https://github.com/pmndrs/zustand/pull/1777](https://github.com/pmndrs/zustand/pull/1777)
- [@&#8203;lauhon](https://github.com/lauhon) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/1763](https://github.com/pmndrs/zustand/pull/1763)

**Full Changelog**:
pmndrs/zustand@v4.3.7...v4.3.8

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

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

This includes a couple of improvements in `persist` middleware.

#### What's Changed

- feat(middleware/persist): add skip hydration option
[#&#8203;405](https://github.com/pmndrs/zustand/issues/405) by
[@&#8203;gmanninglive](https://github.com/gmanninglive) in
[https://github.com/pmndrs/zustand/pull/1647](https://github.com/pmndrs/zustand/pull/1647)
- fix(middleware/persist): ensure `persist` does not drop updates in
`onRehydrateStorage` when using a synchronous storage API by
[@&#8203;coffeebeats](https://github.com/coffeebeats) in
[https://github.com/pmndrs/zustand/pull/1689](https://github.com/pmndrs/zustand/pull/1689)
- fix(middleware/persist): ensure argument for `onRehydrateStorage` and
`onHydrate` is defined on first hydration by
[@&#8203;coffeebeats](https://github.com/coffeebeats) in
[https://github.com/pmndrs/zustand/pull/1692](https://github.com/pmndrs/zustand/pull/1692)

#### New Contributors

- [@&#8203;hi-otto](https://github.com/hi-otto) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/1687](https://github.com/pmndrs/zustand/pull/1687)
- [@&#8203;pastelmind](https://github.com/pastelmind) made their first
contribution in
[https://github.com/pmndrs/zustand/pull/1707](https://github.com/pmndrs/zustand/pull/1707)
- [@&#8203;gmanninglive](https://github.com/gmanninglive) made their
first contribution in
[https://github.com/pmndrs/zustand/pull/1647](https://github.com/pmndrs/zustand/pull/1647)
- [@&#8203;coffeebeats](https://github.com/coffeebeats) made their
first contribution in
[https://github.com/pmndrs/zustand/pull/1689](https://github.com/pmndrs/zustand/pull/1689)

**Full Changelog**:
pmndrs/zustand@v4.3.6...v4.3.7

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 4pm on friday,before 9am on
monday,every weekend" in timezone Europe/Paris, Automerge - At any time
(no schedule defined).

🚦 **Automerge**: Enabled.

♻ **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.

---

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

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/specfy/specfy).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xNTkuNyIsInVwZGF0ZWRJblZlciI6IjM1LjE1OS43IiwidGFyZ2V0QnJhbmNoIjoiY2hvcmUvcmVub3ZhdGVCYXNlQnJhbmNoIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Mercury21th000 pushed a commit to Mercury21th000/valtio that referenced this pull request Nov 17, 2024
* add vitest

* modify tests

* yarn lock

* remove swc and jest

* add types

* update

* update

* lint

* lint

* proxy-memoize

* fix ci

* fix ci

* fix

* fix

* lint, eslint-plugin-vitest, and ts-expect-error

* Update tests/computed.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* Update tests/computed.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* Update tests/computed.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* Update tests/derive.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* Update tests/derive.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* Update tests/derive.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* Update tests/derive.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* Update tests/derive.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* Update tests/derive.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* Update tests/getter.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* Update tests/getter.test.tsx

Co-authored-by: Daishi Kato <[email protected]>

* merge

* merge

* ts ci

* ts ci

* ts ci

* ts ci

* ts ci

* ts ci

* ts ci

* ts ci

* ts ci

* ts ci

* update

* update

* update

* update

* update

* Update package.json

Co-authored-by: Daishi Kato <[email protected]>

* Update vitest.config.ts

Co-authored-by: Daishi Kato <[email protected]>

* update

* update

* update

* update

* Update vitest.config.ts

* Update vitest.config.ts

* follow pmndrs/zustand#1753

* fix tests

---------

Co-authored-by: Daishi Kato <[email protected]>
Co-authored-by: daishi <[email protected]>
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.

3 participants