diff --git a/.eslintrc.json b/.eslintrc.json index 2928a8f7f6..cb587d603d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -45,11 +45,7 @@ "@typescript-eslint/explicit-module-boundary-types": "off", "@typescript-eslint/no-unused-vars": [ "warn", - { - "argsIgnorePattern": "^_", - "varsIgnorePattern": "^_", - "caughtErrorsIgnorePattern": "^_" - } + { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" } ], "@typescript-eslint/no-use-before-define": "off", "@typescript-eslint/no-empty-function": "off", diff --git a/.github/workflows/test-multiple-builds.yml b/.github/workflows/test-multiple-builds.yml index 2a53a4211c..2b47109f77 100644 --- a/.github/workflows/test-multiple-builds.yml +++ b/.github/workflows/test-multiple-builds.yml @@ -12,8 +12,8 @@ jobs: strategy: fail-fast: false matrix: - build: [cjs, esm, umd] - env: [development, production] + build: [cjs, esm] + env: [development] # [development, production] steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 @@ -24,10 +24,6 @@ jobs: cache-dependency-path: '**/pnpm-lock.yaml' - run: pnpm install --frozen-lockfile - run: pnpm build - - name: Use React 17 for production test - if: ${{ matrix.env == 'production' }} - run: | - pnpm add -D react@17.0.2 react-dom@17.0.2 @testing-library/react@12.1.4 - name: Patch for DEV-ONLY if: ${{ matrix.env == 'development' }} run: | @@ -42,7 +38,6 @@ jobs: if: ${{ matrix.build == 'cjs' }} run: | sed -i~ "s/resolve('\.\/src\(.*\)\.ts')/resolve('\.\/dist\1.js')/" vitest.config.ts - sed -i~ "s/module.exports.createStore = vanilla.createStore;//" dist/index.js - name: Patch for ESM if: ${{ matrix.build == 'esm' }} run: | @@ -50,18 +45,6 @@ jobs: sed -i~ "1s/^/import.meta.env=import.meta.env||{};import.meta.env.MODE='${NODE_ENV}';/" tests/*.tsx env: NODE_ENV: ${{ matrix.env }} - - name: Patch for UMD - if: ${{ matrix.build == 'umd' }} - run: | - sed -i~ "s/resolve('\.\/src\(.*\)\.ts')/resolve('\.\/dist\/umd\1.${NODE_ENV}.js')/" vitest.config.ts - env: - NODE_ENV: ${{ matrix.env }} - - name: Patch for SystemJS - if: ${{ matrix.build == 'system' }} - run: | - sed -i~ "s/resolve('\.\/src\(.*\)\.ts')/resolve('\.\/dist\/system\1.${NODE_ENV}.js')/" vitest.config.ts - env: - NODE_ENV: ${{ matrix.env }} - name: Test ${{ matrix.build }} ${{ matrix.env }} run: | pnpm test:spec diff --git a/.github/workflows/test-multiple-versions.yml b/.github/workflows/test-multiple-versions.yml index 697aef09c5..198112f3df 100644 --- a/.github/workflows/test-multiple-versions.yml +++ b/.github/workflows/test-multiple-versions.yml @@ -27,8 +27,6 @@ jobs: fail-fast: false matrix: react: - - 16.8.0 - - 17.0.0 - 18.0.0 - 18.1.0 - 18.2.0 @@ -36,22 +34,6 @@ jobs: - 19.0.0-rc.0 - 19.0.0-rc-49496d49-20240814 - 0.0.0-experimental-49496d49-20240814 - devtools-skip: - - CI-MATRIX-NOSKIP - include: - - devtools-skip: CI-MATRIX-[2345] - react: 16.8.0 - - devtools-skip: CI-MATRIX-[1345] - react: 16.8.0 - - devtools-skip: CI-MATRIX-[1245] - react: 16.8.0 - - devtools-skip: CI-MATRIX-[1235] - react: 16.8.0 - - devtools-skip: CI-MATRIX-[1234] - react: 16.8.0 - exclude: - - devtools-skip: CI-MATRIX-NOSKIP - react: 16.8.0 steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 @@ -61,18 +43,6 @@ jobs: cache: 'pnpm' cache-dependency-path: '**/pnpm-lock.yaml' - run: pnpm install --frozen-lockfile - - name: Install legacy testing-library - if: ${{ startsWith(matrix.react, '16.') || startsWith(matrix.react, '17.') }} - run: pnpm add -D @testing-library/react@12.1.4 - - name: Patch for React 16 - if: ${{ startsWith(matrix.react, '16.') }} - run: | - sed -i~ '1s/^/import React from "react";/' tests/*.tsx - sed -i~ 's/"jsx": "react-jsx"/"jsx": "react"/' tsconfig.json - sed -i~ 's/import\.meta\.env[?]\.MODE/"DEVELOPMENT".toLowerCase()/' src/*.ts src/*/*.ts - sed -i~ "s/it('\[${DEVTOOLS_SKIP}\]/it.skip('/" tests/devtools.test.tsx - env: - DEVTOOLS_SKIP: ${{ matrix.devtools-skip }} - name: Test ${{ matrix.react }} ${{ matrix.devtools-skip }} run: | pnpm add -D react@${{ matrix.react }} react-dom@${{ matrix.react }} diff --git a/.github/workflows/test-old-typescript.yml b/.github/workflows/test-old-typescript.yml index c1f86454fd..abb356d24a 100644 --- a/.github/workflows/test-old-typescript.yml +++ b/.github/workflows/test-old-typescript.yml @@ -23,10 +23,6 @@ jobs: - 4.7.4 - 4.6.4 - 4.5.5 - - 4.4.4 - - 4.3.5 - - 4.2.3 - - 4.1.5 steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 @@ -43,9 +39,6 @@ jobs: sed -i~ 's/"verbatimModuleSyntax": true,//' tsconfig.json - name: Patch for Old TS run: | - sed -i~ 's/\/\/ @ts-expect-error.*\[LATEST-TS-ONLY\]//' tests/*.tsx - sed -i~ 's/"target":/"skipLibCheck":true,"target":/' tsconfig.json - sed -i~ 's/"exactOptionalPropertyTypes": true,//' tsconfig.json sed -i~ 's/"moduleResolution": "bundler",/"moduleResolution": "node",/' tsconfig.json sed -i~ 's/"allowImportingTsExtensions": true,//' tsconfig.json sed -i~ 's/"zustand": \["\.\/src\/index\.ts"\],/"zustand": [".\/dist\/index.d.ts"],/' tsconfig.json @@ -55,9 +48,5 @@ jobs: pnpm add -D @types/node@18.13.0 - name: Install old TypeScript run: pnpm add -D typescript@${{ matrix.typescript }} - - name: Patch testing setup for Old TS - if: ${{ matrix.typescript == '4.4.4' || matrix.typescript == '4.3.5' || matrix.typescript == '4.2.3' || matrix.typescript == '4.1.5' }} - run: | - pnpm add -D vitest@0.33.0 @vitest/coverage-v8@0.33.0 @vitest/ui@0.33.0 - name: Test ${{ matrix.typescript }} run: pnpm test:types diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index fa15c8a7f8..0000000000 --- a/babel.config.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = (api, targets) => { - // https://babeljs.io/docs/en/config-files#config-function-api - const isTestEnv = api.env('test') - - return { - babelrc: false, - ignore: ['./node_modules'], - presets: [ - [ - '@babel/preset-env', - { - loose: true, - modules: isTestEnv ? 'commonjs' : false, - targets: isTestEnv ? { node: 'current' } : targets, - }, - ], - ], - plugins: [ - [ - '@babel/plugin-transform-react-jsx', - { - runtime: 'automatic', - }, - ], - ['@babel/plugin-transform-typescript', { isTSX: true }], - ], - } -} diff --git a/docs/guides/typescript.md b/docs/guides/typescript.md index c8630e86a5..001aff64ae 100644 --- a/docs/guides/typescript.md +++ b/docs/guides/typescript.md @@ -232,6 +232,36 @@ For a usual statically typed language, this is impossible. But thanks to TypeScr If you are eager to know what the answer is to this particular problem then you can [see it here](#middleware-that-changes-the-store-type). +### Handling Dynamic `replace` Flag + +If the value of the `replace` flag is not known at compile time and is determined dynamically, you might face issues. To handle this, you can use a workaround by annotating the `replace` parameter with `as any`: + +```ts +const replaceFlag = Math.random() > 0.5 +store.setState(partialOrFull, replaceFlag as any) +``` + +#### Example with `as any` Workaround + +```ts +import { create } from 'zustand' + +interface BearState { + bears: number + increase: (by: number) => void +} + +const useBearStore = create()((set) => ({ + bears: 0, + increase: (by) => set((state) => ({ bears: state.bears + by })), +})) + +const replaceFlag = Math.random() > 0.5 +useBearStore.setState({ bears: 5 }, replaceFlag as any) // Using the workaround +``` + +By following this approach, you can ensure that your code handles dynamic `replace` flags without encountering type issues. + ## Common recipes ### Middleware that doesn't change the store type diff --git a/docs/migrations/migrating-to-v5.md b/docs/migrations/migrating-to-v5.md new file mode 100644 index 0000000000..104c934ccc --- /dev/null +++ b/docs/migrations/migrating-to-v5.md @@ -0,0 +1,171 @@ +--- +title: 'How to Migrate to v5 from v4' +nav: 30 +--- + +# How to Migrate to v5 from v4 + +We highly recommend to update to the latest version of v4, before migrating to v5. It will show all deprecation warnings without breaking your app. + +## 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 +- Other small improvements (technically breaking changes) + +## Migration Guide + +### Using custom equality functions such as `shallow` + +The `create` function in v5 does not support customizing equality function. + +If you use custom equality function such as `shallow`, +the easiest migration is to use `createWithEqualityFn`. + +```js +// v4 +import { create } from 'zustand' +import { shallow } from 'zustand/shallow' + +const useCountStore = create((set) => ({ + count: 0, + text: 'hello', + // ... +})) + +const Component = () => { + const { count, text } = useCountStore( + (state) => ({ + count: state.count, + text: state.text, + }), + shallow, + ) + // ... +} +``` + +That can be done with `createWithEqualityFn` in v5: + +```bash +npm install use-sync-external-store +``` + +```js +// v5 +import { createWithEqualityFn as create } from 'zustand/traditional' + +// The rest is the same as v4 +``` + +Alternatively, for the `shallow` use case, you can use `useShallow` hook: + +```js +// v5 +import { create } from 'zustand' +import { useShallow } from 'zustand/shallow' + +const useCountStore = create((set) => ({ + count: 0, + text: 'hello', + // ... +})) + +const Component = () => { + const { count, text } = useCountStore( + useShallow((state) => ({ + count: state.count, + text: state.text, + })), + ) + // ... +} +``` + +### Requiring stable selector outputs + +There is a behavioral change in v5 to match React default behavior. +If a selector returns a new reference, it may cause infinite loops. + +For example, this may cause infinite loops. + +```js +// v4 +const action = useMainStore((state) => { + return state.action ?? () => {} +}) +``` + +The error message will be something like this: + +``` +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. +``` + +To fix it, make sure the selector function returns a stable reference. + +```js +// v5 + +const FALLBACK_ACTION = () => {} + +const action = useMainStore((state) => { + return state.action ?? FALLBACK_ACTION +}) +``` + +Alternatively, if you need v4 behavior, `createWithEqualityFn` will do. + +```js +// v5 +import { createWithEqualityFn as create } from 'zustand/traditional' +``` + +### Stricter types when setState's replace flag is set (Typescript only) + +```diff +- setState: +- (partial: T | Partial | ((state: T) => T | Partial), replace?: boolean | undefined) => void; ++ setState: ++ (partial: T | Partial | ((state: T) => T | Partial), replace?: false) => void; ++ (state: T | ((state: T) => T), replace: true) => void; +``` + +If you are not using the `replace` flag, no migration is required. + +If you are using the `replace` flag and it's set to `true`, you must provide a complete state object. +This change ensures that `store.setState({}, true)` (which results in an invalid state) is no longer considered valid. + +**Examples:** + +```ts +// Partial state update (valid) +store.setState({ key: 'value' }) + +// Complete state replacement (valid) +store.setState({ key: 'value' }, true) + +// Incomplete state replacement (invalid) +store.setState({}, true) // Error +``` + +#### Handling Dynamic `replace` Flag + +If the value of the `replace` flag is dynamic and determined at runtime, you might face issues. To handle this, you can use a workaround by annotating the `replace` parameter with `as any`: + +```ts +const replaceFlag = Math.random() > 0.5 +store.setState(partialOrFull, replaceFlag as any) +``` + +## Links + +- https://github.com/pmndrs/zustand/pull/2138 +- https://github.com/pmndrs/zustand/pull/2580 diff --git a/package.json b/package.json index c96002901f..66e1ee23d8 100644 --- a/package.json +++ b/package.json @@ -2,22 +2,31 @@ "name": "zustand", "description": "🐻 Bear necessities for state management in React", "private": true, - "version": "4.5.5", + "type": "commonjs", + "version": "5.0.0-beta.2", + "publishConfig": { + "tag": "next" + }, "main": "./index.js", "types": "./index.d.ts", "typesVersions": { - "<4.0": { + ">=4.5": { + "esm/*": [ + "esm/*" + ], + "*": [ + "*" + ] + }, + "*": { "esm/*": [ - "ts3.4/*" + "ts_version_4.5_and_above_is_required.d.ts" ], "*": [ - "ts3.4/*" + "ts_version_4.5_and_above_is_required.d.ts" ] } }, - "files": [ - "**" - ], "exports": { "./package.json": "./package.json", ".": { @@ -25,142 +34,39 @@ "types": "./esm/index.d.mts", "default": "./esm/index.mjs" }, - "module": { - "types": "./esm/index.d.ts", - "default": "./esm/index.js" - }, "default": { "types": "./index.d.ts", "default": "./index.js" } }, - "./vanilla": { - "import": { - "types": "./esm/vanilla.d.mts", - "default": "./esm/vanilla.mjs" - }, - "module": { - "types": "./esm/vanilla.d.ts", - "default": "./esm/vanilla.js" - }, - "default": { - "types": "./vanilla.d.ts", - "default": "./vanilla.js" - } - }, - "./middleware": { - "import": { - "types": "./esm/middleware.d.mts", - "default": "./esm/middleware.mjs" - }, - "module": { - "types": "./esm/middleware.d.ts", - "default": "./esm/middleware.js" - }, - "default": { - "types": "./middleware.d.ts", - "default": "./middleware.js" - } - }, - "./middleware/immer": { + "./*": { "import": { - "types": "./esm/middleware/immer.d.mts", - "default": "./esm/middleware/immer.mjs" - }, - "module": { - "types": "./esm/middleware/immer.d.ts", - "default": "./esm/middleware/immer.js" + "types": "./esm/*.d.mts", + "default": "./esm/*.mjs" }, "default": { - "types": "./middleware/immer.d.ts", - "default": "./middleware/immer.js" - } - }, - "./shallow": { - "import": { - "types": "./esm/shallow.d.mts", - "default": "./esm/shallow.mjs" - }, - "module": { - "types": "./esm/shallow.d.ts", - "default": "./esm/shallow.js" - }, - "default": { - "types": "./shallow.d.ts", - "default": "./shallow.js" - } - }, - "./vanilla/shallow": { - "import": { - "types": "./esm/vanilla/shallow.d.mts", - "default": "./esm/vanilla/shallow.mjs" - }, - "module": { - "types": "./esm/vanilla/shallow.d.ts", - "default": "./esm/vanilla/shallow.js" - }, - "default": { - "types": "./vanilla/shallow.d.ts", - "default": "./vanilla/shallow.js" - } - }, - "./react/shallow": { - "import": { - "types": "./esm/react/shallow.d.mts", - "default": "./esm/react/shallow.mjs" - }, - "module": { - "types": "./esm/react/shallow.d.ts", - "default": "./esm/react/shallow.js" - }, - "default": { - "types": "./react/shallow.d.ts", - "default": "./react/shallow.js" - } - }, - "./traditional": { - "import": { - "types": "./esm/traditional.d.mts", - "default": "./esm/traditional.mjs" - }, - "module": { - "types": "./esm/traditional.d.ts", - "default": "./esm/traditional.js" - }, - "default": { - "types": "./traditional.d.ts", - "default": "./traditional.js" - } - }, - "./context": { - "import": { - "types": "./esm/context.d.mts", - "default": "./esm/context.mjs" - }, - "module": { - "types": "./esm/context.d.ts", - "default": "./esm/context.js" - }, - "default": { - "types": "./context.d.ts", - "default": "./context.js" + "types": "./*.d.ts", + "default": "./*.js" } } }, + "files": [ + "**" + ], "sideEffects": false, "scripts": { "prebuild": "shx rm -rf dist", "build": "pnpm run prebuild && pnpm run '/^build:.*/' && pnpm run postbuild", "build:base": "rollup -c", "build:vanilla": "rollup -c --config-vanilla", + "build:react": "rollup -c --config-react", "build:middleware": "rollup -c --config-middleware", "build:middleware:immer": "rollup -c --config-middleware_immer", "build:shallow": "rollup -c --config-shallow", "build:vanilla:shallow": "rollup -c --config-vanilla_shallow", "build:react:shallow": "rollup -c --config-react_shallow", "build:traditional": "rollup -c --config-traditional", - "build:context": "rollup -c --config-context", - "postbuild": "pnpm patch-d-ts && pnpm copy && pnpm patch-esm-ts", + "postbuild": "pnpm patch-d-ts && pnpm copy && pnpm patch-old-ts && pnpm patch-esm-ts", "prettier": "prettier \"*.{js,json,md}\" \"{examples,src,tests,docs}/**/*.{js,jsx,ts,tsx,md,mdx}\" --write", "eslint": "eslint --no-eslintrc --c .eslintrc.json --fix '*.{js,ts}' '{src,tests}/**/*.{ts,tsx}'", "test": "pnpm run '/^test:.*/'", @@ -169,11 +75,12 @@ "test:lint": "eslint --no-eslintrc --c .eslintrc.json '*.{js,ts}' '{src,tests}/**/*.{ts,tsx}'", "test:spec": "vitest run", "patch-d-ts": "node -e \"var {entries}=require('./rollup.config.js');require('shelljs').find('dist/**/*.d.ts').forEach(f=>{entries.forEach(({find,replacement})=>require('shelljs').sed('-i',new RegExp(' from \\''+find.source.slice(0,-1)+'\\';$'),' from \\''+replacement+'\\';',f));require('shelljs').sed('-i',/ from '(\\.[^']+)\\.ts';$/,' from \\'\\$1\\';',f)})\"", - "copy": "shx cp -r dist/src/* dist/esm && shx cp -r dist/src/* dist && shx rm -rf dist/src && shx rm -rf dist/{src,tests} && downlevel-dts dist dist/ts3.4 && shx cp package.json readme.md LICENSE dist && json -I -f dist/package.json -e \"this.private=false; this.devDependencies=undefined; this.optionalDependencies=undefined; this.scripts=undefined; this.prettier=undefined;\"", - "patch-esm-ts": "node -e \"require('shelljs').find('dist/esm/**/*.d.ts').forEach(f=>{var f2=f.replace(/\\.ts$/,'.mts');require('fs').copyFileSync(f,f2);require('shelljs').sed('-i',/ from '(\\.[^']+)';$/,' from \\'\\$1.mjs\\';',f2);require('shelljs').sed('-i',/^declare module '(\\.[^']+)'/,'declare module \\'\\$1.mjs\\'',f2)})\"" + "copy": "shx cp -r dist/src/* dist/esm && shx cp -r dist/src/* dist && shx rm -rf dist/src && shx rm -rf dist/{src,tests} && shx cp package.json readme.md LICENSE dist && json -I -f dist/package.json -e \"this.private=false; this.devDependencies=undefined; this.optionalDependencies=undefined; this.scripts=undefined; this.prettier=undefined;\"", + "patch-old-ts": "shx touch dist/ts_version_4.5_and_above_is_required.d.ts", + "patch-esm-ts": "node -e \"require('shelljs').find('dist/esm/**/*.d.ts').forEach(f=>{var f2=f.replace(/\\.ts$/,'.mts');require('fs').renameSync(f,f2);require('shelljs').sed('-i',/ from '(\\.[^']+)';$/,' from \\'\\$1.mjs\\';',f2);require('shelljs').sed('-i',/^declare module '(\\.[^']+)'/,'declare module \\'\\$1.mjs\\'',f2)})\"" }, "engines": { - "node": ">=12.7.0" + "node": ">=12.20.0" }, "prettier": { "semi": false, @@ -202,22 +109,11 @@ }, "homepage": "https://github.com/pmndrs/zustand", "packageManager": "pnpm@8.15.0", - "dependencies": { - "use-sync-external-store": "1.2.2" - }, "devDependencies": { - "@babel/core": "^7.25.2", - "@babel/plugin-external-helpers": "^7.24.7", - "@babel/plugin-transform-react-jsx": "^7.25.2", - "@babel/plugin-transform-runtime": "^7.24.7", - "@babel/plugin-transform-typescript": "^7.25.2", - "@babel/preset-env": "^7.25.3", "@redux-devtools/extension": "^3.3.0", "@rollup/plugin-alias": "^5.1.0", - "@rollup/plugin-babel": "^6.0.4", "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-replace": "^5.0.7", - "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "^11.1.6", "@testing-library/react": "^16.0.0", "@types/node": "^22.3.0", @@ -228,7 +124,6 @@ "@typescript-eslint/parser": "^8.1.0", "@vitest/coverage-v8": "^2.0.5", "@vitest/ui": "^2.0.5", - "downlevel-dts": "^0.11.0", "esbuild": "^0.23.0", "eslint": "8.57.0", "eslint-config-prettier": "^9.1.0", @@ -251,12 +146,14 @@ "shelljs": "^0.8.5", "shx": "^0.3.4", "typescript": "^5.5.4", + "use-sync-external-store": "^1.2.2", "vitest": "^2.0.5" }, "peerDependencies": { - "@types/react": ">=16.8", + "@types/react": ">=18.0.0", "immer": ">=9.0.6", - "react": ">=16.8" + "react": ">=18.0.0", + "use-sync-external-store": ">=1.2.0" }, "peerDependenciesMeta": { "@types/react": { @@ -267,6 +164,9 @@ }, "react": { "optional": true + }, + "use-sync-external-store": { + "optional": true } } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 82241cff08..3e64e9043d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,48 +4,19 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false -dependencies: - use-sync-external-store: - specifier: 1.2.2 - version: 1.2.2(react@19.0.0-rc.0) - devDependencies: - '@babel/core': - specifier: ^7.25.2 - version: 7.25.2 - '@babel/plugin-external-helpers': - specifier: ^7.24.7 - version: 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-react-jsx': - specifier: ^7.25.2 - version: 7.25.2(@babel/core@7.25.2) - '@babel/plugin-transform-runtime': - specifier: ^7.24.7 - version: 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-typescript': - specifier: ^7.25.2 - version: 7.25.2(@babel/core@7.25.2) - '@babel/preset-env': - specifier: ^7.25.3 - version: 7.25.3(@babel/core@7.25.2) '@redux-devtools/extension': specifier: ^3.3.0 version: 3.3.0(redux@5.0.1) '@rollup/plugin-alias': specifier: ^5.1.0 version: 5.1.0(rollup@4.20.0) - '@rollup/plugin-babel': - specifier: ^6.0.4 - version: 6.0.4(@babel/core@7.25.2)(rollup@4.20.0) '@rollup/plugin-node-resolve': specifier: ^15.2.3 version: 15.2.3(rollup@4.20.0) '@rollup/plugin-replace': specifier: ^5.0.7 version: 5.0.7(rollup@4.20.0) - '@rollup/plugin-terser': - specifier: ^0.4.4 - version: 0.4.4(rollup@4.20.0) '@rollup/plugin-typescript': specifier: ^11.1.6 version: 11.1.6(rollup@4.20.0)(typescript@5.5.4) @@ -76,9 +47,6 @@ devDependencies: '@vitest/ui': specifier: ^2.0.5 version: 2.0.5(vitest@2.0.5) - downlevel-dts: - specifier: ^0.11.0 - version: 0.11.0 esbuild: specifier: ^0.23.0 version: 0.23.0 @@ -145,6 +113,9 @@ devDependencies: typescript: specifier: ^5.5.4 version: 5.5.4 + use-sync-external-store: + specifier: ^1.2.2 + version: 1.2.2(react@19.0.0-rc.0) vitest: specifier: ^2.0.5 version: 2.0.5(@types/node@22.3.0)(@vitest/ui@2.0.5)(jsdom@24.1.1) @@ -212,16 +183,6 @@ packages: '@babel/types': 7.25.2 dev: true - /@babel/helper-builder-binary-assignment-operator-visitor@7.24.7: - resolution: {integrity: sha512-xZeCVVdwb4MsDBkkyZ64tReWYrLRHlMN72vP7Bdm3OUOuyFZExhsHUUnuWnm2/XOlAJzR0LfPpB56WXZn0X/lA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/traverse': 7.25.3 - '@babel/types': 7.25.2 - transitivePeerDependencies: - - supports-color - dev: true - /@babel/helper-compilation-targets@7.25.2: resolution: {integrity: sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==} engines: {node: '>=6.9.0'} @@ -251,33 +212,6 @@ packages: - supports-color dev: true - /@babel/helper-create-regexp-features-plugin@7.25.2(@babel/core@7.25.2): - resolution: {integrity: sha512-+wqVGP+DFmqwFD3EH6TMTfUNeqDehV3E/dl+Sd54eaXqm17tEUNbEIn4sVivVowbvUpOtIGxdo3GoXyDH9N/9g==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-annotate-as-pure': 7.24.7 - regexpu-core: 5.3.2 - semver: 6.3.1 - dev: true - - /@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.25.2): - resolution: {integrity: sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==} - peerDependencies: - '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-compilation-targets': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - debug: 4.3.6 - lodash.debounce: 4.0.8 - resolve: 1.22.8 - transitivePeerDependencies: - - supports-color - dev: true - /@babel/helper-member-expression-to-functions@7.24.8: resolution: {integrity: sha512-LABppdt+Lp/RlBxqrh4qgf1oEH/WxdzQNDJIu5gC/W1GyvPVrOBiItmmM8wan2fm4oYqFuFfkXmlGpLQhPY8CA==} engines: {node: '>=6.9.0'} @@ -299,1146 +233,121 @@ packages: dev: true /@babel/helper-module-transforms@7.25.2(@babel/core@7.25.2): - resolution: {integrity: sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-module-imports': 7.24.7 - '@babel/helper-simple-access': 7.24.7 - '@babel/helper-validator-identifier': 7.24.7 - '@babel/traverse': 7.25.3 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/helper-optimise-call-expression@7.24.7: - resolution: {integrity: sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.25.2 - dev: true - - /@babel/helper-plugin-utils@7.24.8: - resolution: {integrity: sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-remap-async-to-generator@7.25.0(@babel/core@7.25.2): - resolution: {integrity: sha512-NhavI2eWEIz/H9dbrG0TuOicDhNexze43i5z7lEqwYm0WEZVTwnPpA0EafUTP7+6/W79HWIP2cTe3Z5NiSTVpw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-annotate-as-pure': 7.24.7 - '@babel/helper-wrap-function': 7.25.0 - '@babel/traverse': 7.25.3 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/helper-replace-supers@7.25.0(@babel/core@7.25.2): - resolution: {integrity: sha512-q688zIvQVYtZu+i2PsdIu/uWGRpfxzr5WESsfpShfZECkO+d2o+WROWezCi/Q6kJ0tfPa5+pUGUlfx2HhrA3Bg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-member-expression-to-functions': 7.24.8 - '@babel/helper-optimise-call-expression': 7.24.7 - '@babel/traverse': 7.25.3 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/helper-simple-access@7.24.7: - resolution: {integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/traverse': 7.25.3 - '@babel/types': 7.25.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/helper-skip-transparent-expression-wrappers@7.24.7: - resolution: {integrity: sha512-IO+DLT3LQUElMbpzlatRASEyQtfhSE0+m465v++3jyyXeBTBUjtVZg28/gHeV5mrTJqvEKhKroBGAvhW+qPHiQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/traverse': 7.25.3 - '@babel/types': 7.25.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/helper-string-parser@7.24.8: - resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-validator-identifier@7.24.7: - resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-validator-option@7.24.8: - resolution: {integrity: sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-wrap-function@7.25.0: - resolution: {integrity: sha512-s6Q1ebqutSiZnEjaofc/UKDyC4SbzV5n5SrA2Gq8UawLycr3i04f1dX4OzoQVnexm6aOCh37SQNYlJ/8Ku+PMQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/template': 7.25.0 - '@babel/traverse': 7.25.3 - '@babel/types': 7.25.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/helpers@7.25.0: - resolution: {integrity: sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/template': 7.25.0 - '@babel/types': 7.25.2 - dev: true - - /@babel/highlight@7.24.7: - resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.24.7 - chalk: 2.4.2 - js-tokens: 4.0.0 - picocolors: 1.0.1 - dev: true - - /@babel/parser@7.25.3: - resolution: {integrity: sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw==} - engines: {node: '>=6.0.0'} - hasBin: true - dependencies: - '@babel/types': 7.25.2 - dev: true - - /@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.3(@babel/core@7.25.2): - resolution: {integrity: sha512-wUrcsxZg6rqBXG05HG1FPYgsP6EvwF4WpBbxIpWIIYnH8wG0gzx3yZY3dtEHas4sTAOGkbTsc9EGPxwff8lRoA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/traverse': 7.25.3 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.0(@babel/core@7.25.2): - resolution: {integrity: sha512-Bm4bH2qsX880b/3ziJ8KD711LT7z4u8CFudmjqle65AZj/HNUFhEf90dqYv6O86buWvSBmeQDjv0Tn2aF/bIBA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.0(@babel/core@7.25.2): - resolution: {integrity: sha512-lXwdNZtTmeVOOFtwM/WDe7yg1PL8sYhRk/XH0FzbR2HDQ0xC+EnQ/JHeoMYSavtU115tnUk0q9CDyq8si+LMAA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-+izXIbke1T33mY4MSNnrqhPXDz01WYhEf3yF5NbnUtkiNnm+XBZJl3kNfoK6NKmYlz/D07+l2GWVK/QfDkNCuQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.13.0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 - '@babel/plugin-transform-optional-chaining': 7.24.8(@babel/core@7.25.2) - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.0(@babel/core@7.25.2): - resolution: {integrity: sha512-tggFrk1AIShG/RUQbEwt2Tr/E+ObkfwrPjR6BjbRvsx24+PSjK8zrq0GWPNCjo8qpRx4DuJzlcvWJqlm+0h3kw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/traverse': 7.25.3 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-external-helpers@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-IgK2yjWkxQhtc+UvSbUA8GfIDCQvs7FxqNtgLkmO5FAKos53sT2sl9bxeO4NxjcnZs27xnYIMyhjdXkNaZP4jA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-proposal-private-methods@7.18.6(@babel/core@7.25.2): - resolution: {integrity: sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==} - engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead. - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-create-class-features-plugin': 7.25.0(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.2): - resolution: {integrity: sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - dev: true - - /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.25.2): - resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.25.2): - resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.25.2): - resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.25.2): - resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.25.2): - resolution: {integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-syntax-import-assertions@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-Ec3NRUMoi8gskrkBe3fNmEQfxDvY8bgfQpz6jlk/41kX9eUjvpyqWU7PBP/pLAvMaSQjbMNKJmvX57jP+M6bPg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-syntax-import-attributes@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-hbX+lKKeUMGihnK8nvKqmXBInriT3GVjzXKFriV3YC6APGxMbP8RZNFwy91+hocLXq90Mta+HshoB31802bb8A==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.25.2): - resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.25.2): - resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.25.2): - resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.25.2): - resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.25.2): - resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.25.2): - resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.25.2): - resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.25.2): - resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.25.2): - resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.25.2): - resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-syntax-typescript@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.25.2): - resolution: {integrity: sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-transform-arrow-functions@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-Dt9LQs6iEY++gXUwY03DNFat5C2NbO48jj+j/bSAz6b3HgPs39qcPiYt77fDObIcFwj3/C2ICX9YMwGflUoSHQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-transform-async-generator-functions@7.25.0(@babel/core@7.25.2): - resolution: {integrity: sha512-uaIi2FdqzjpAMvVqvB51S42oC2JEVgh0LDsGfZVDysWE8LrJtQC2jvKmOqEYThKyB7bDEb7BP1GYWDm7tABA0Q==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-remap-async-to-generator': 7.25.0(@babel/core@7.25.2) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.2) - '@babel/traverse': 7.25.3 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-async-to-generator@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-SQY01PcJfmQ+4Ash7NE+rpbLFbmqA2GPIgqzxfFTL4t1FKRq4zTms/7htKpoCUI9OcFYgzqfmCdH53s6/jn5fA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-module-imports': 7.24.7 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-remap-async-to-generator': 7.25.0(@babel/core@7.25.2) - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-block-scoped-functions@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-yO7RAz6EsVQDaBH18IDJcMB1HnrUn2FJ/Jslc/WtPPWcjhpUJXU/rjbwmluzp7v/ZzWcEhTMXELnnsz8djWDwQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-transform-block-scoping@7.25.0(@babel/core@7.25.2): - resolution: {integrity: sha512-yBQjYoOjXlFv9nlXb3f1casSHOZkWr29NX+zChVanLg5Nc157CrbEX9D7hxxtTpuFy7Q0YzmmWfJxzvps4kXrQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-transform-class-properties@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-vKbfawVYayKcSeSR5YYzzyXvsDFWU2mD8U5TFeXtbCPLFUqe7GyCgvO6XDHzje862ODrOwy6WCPmKeWHbCFJ4w==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-create-class-features-plugin': 7.25.0(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-class-static-block@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-HMXK3WbBPpZQufbMG4B46A90PkuuhN9vBCb5T8+VAHqvAqvcLi+2cKoukcpmUYkszLhScU3l1iudhrks3DggRQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.12.0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-create-class-features-plugin': 7.25.0(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.25.2) - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-classes@7.25.0(@babel/core@7.25.2): - resolution: {integrity: sha512-xyi6qjr/fYU304fiRwFbekzkqVJZ6A7hOjWZd+89FVcBqPV3S9Wuozz82xdpLspckeaafntbzglaW4pqpzvtSw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-annotate-as-pure': 7.24.7 - '@babel/helper-compilation-targets': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-replace-supers': 7.25.0(@babel/core@7.25.2) - '@babel/traverse': 7.25.3 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-computed-properties@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-25cS7v+707Gu6Ds2oY6tCkUwsJ9YIDbggd9+cu9jzzDgiNq7hR/8dkzxWfKWnTic26vsI3EsCXNd4iEB6e8esQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/template': 7.25.0 - dev: true - - /@babel/plugin-transform-destructuring@7.24.8(@babel/core@7.25.2): - resolution: {integrity: sha512-36e87mfY8TnRxc7yc6M9g9gOB7rKgSahqkIKwLpz4Ppk2+zC2Cy1is0uwtuSG6AE4zlTOUa+7JGz9jCJGLqQFQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-transform-dotall-regex@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-ZOA3W+1RRTSWvyqcMJDLqbchh7U4NRGqwRfFSVbOLS/ePIP4vHB5e8T8eXcuqyN1QkgKyj5wuW0lcS85v4CrSw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-transform-duplicate-keys@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-JdYfXyCRihAe46jUIliuL2/s0x0wObgwwiGxw/UbgJBr20gQBThrokO4nYKgWkD7uBaqM7+9x5TU7NkExZJyzw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.0(@babel/core@7.25.2): - resolution: {integrity: sha512-YLpb4LlYSc3sCUa35un84poXoraOiQucUTTu8X1j18JV+gNa8E0nyUf/CjZ171IRGr4jEguF+vzJU66QZhn29g==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-transform-dynamic-import@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-sc3X26PhZQDb3JhORmakcbvkeInvxz+A8oda99lj7J60QRuPZvNAk9wQlTBS1ZynelDrDmTU4pw1tyc5d5ZMUg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.25.2) - dev: true - - /@babel/plugin-transform-exponentiation-operator@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-Rqe/vSc9OYgDajNIK35u7ot+KeCoetqQYFXM4Epf7M7ez3lWlOjrDjrwMei6caCVhfdw+mIKD4cgdGNy5JQotQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-builder-binary-assignment-operator-visitor': 7.24.7 - '@babel/helper-plugin-utils': 7.24.8 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-export-namespace-from@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-v0K9uNYsPL3oXZ/7F9NNIbAj2jv1whUEtyA6aujhekLs56R++JDQuzRcP2/z4WX5Vg/c5lE9uWZA0/iUoFhLTA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.25.2) - dev: true - - /@babel/plugin-transform-for-of@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-wo9ogrDG1ITTTBsy46oGiN1dS9A7MROBTcYsfS8DtsImMkHk9JXJ3EWQM6X2SUw4x80uGPlwj0o00Uoc6nEE3g==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-function-name@7.25.1(@babel/core@7.25.2): - resolution: {integrity: sha512-TVVJVdW9RKMNgJJlLtHsKDTydjZAbwIsn6ySBPQaEAUU5+gVvlJt/9nRmqVbsV/IBanRjzWoaAQKLoamWVOUuA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-compilation-targets': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/traverse': 7.25.3 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-json-strings@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-2yFnBGDvRuxAaE/f0vfBKvtnvvqU8tGpMHqMNpTN2oWMKIR3NqFkjaAgGwawhqK/pIN2T3XdjGPdaG0vDhOBGw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.25.2) - dev: true - - /@babel/plugin-transform-literals@7.25.2(@babel/core@7.25.2): - resolution: {integrity: sha512-HQI+HcTbm9ur3Z2DkO+jgESMAMcYLuN/A7NRw9juzxAezN9AvqvUTnpKP/9kkYANz6u7dFlAyOu44ejuGySlfw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-transform-logical-assignment-operators@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-4D2tpwlQ1odXmTEIFWy9ELJcZHqrStlzK/dAOWYyxX3zT0iXQB6banjgeOJQXzEc4S0E0a5A+hahxPaEFYftsw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.25.2) - dev: true - - /@babel/plugin-transform-member-expression-literals@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-T/hRC1uqrzXMKLQ6UCwMT85S3EvqaBXDGf0FaMf4446Qx9vKwlghvee0+uuZcDUCZU5RuNi4781UQ7R308zzBw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-transform-modules-amd@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-9+pB1qxV3vs/8Hdmz/CulFB8w2tuu6EB94JZFsjdqxQokwGa9Unap7Bo2gGBGIvPmDIVvQrom7r5m/TCDMURhg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-modules-commonjs@7.24.8(@babel/core@7.25.2): - resolution: {integrity: sha512-WHsk9H8XxRs3JXKWFiqtQebdh9b/pTk4EgueygFzYlTKAg0Ud985mSevdNjdXdFBATSKVJGQXP1tv6aGbssLKA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-simple-access': 7.24.7 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-modules-systemjs@7.25.0(@babel/core@7.25.2): - resolution: {integrity: sha512-YPJfjQPDXxyQWg/0+jHKj1llnY5f/R6a0p/vP4lPymxLu7Lvl4k2WMitqi08yxwQcCVUUdG9LCUj4TNEgAp3Jw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-validator-identifier': 7.24.7 - '@babel/traverse': 7.25.3 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-modules-umd@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-3aytQvqJ/h9z4g8AsKPLvD4Zqi2qT+L3j7XoFFu1XBlZWEl2/1kWnhmAbxpLgPrHSY0M6UA02jyTiwUVtiKR6A==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-named-capturing-groups-regex@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-/jr7h/EWeJtk1U/uz2jlsCioHkZk1JJZVcc8oQsJ1dUlaJD83f4/6Zeh2aHt9BIFokHIsSeDfhUmju0+1GPd6g==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-transform-new-target@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-RNKwfRIXg4Ls/8mMTza5oPF5RkOW8Wy/WgMAp1/F1yZ8mMbtwXW+HDoJiOsagWrAhI5f57Vncrmr9XeT4CVapA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-transform-nullish-coalescing-operator@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-Ts7xQVk1OEocqzm8rHMXHlxvsfZ0cEF2yomUqpKENHWMF4zKk175Y4q8H5knJes6PgYad50uuRmt3UJuhBw8pQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.2) - dev: true - - /@babel/plugin-transform-numeric-separator@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-e6q1TiVUzvH9KRvicuxdBTUj4AdKSRwzIyFFnfnezpCfP2/7Qmbb8qbU2j7GODbl4JMkblitCQjKYUaX/qkkwA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.25.2) - dev: true - - /@babel/plugin-transform-object-rest-spread@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-4QrHAr0aXQCEFni2q4DqKLD31n2DL+RxcwnNjDFkSG0eNQ/xCavnRkfCUjsyqGC2OviNJvZOF/mQqZBw7i2C5Q==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-compilation-targets': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-transform-parameters': 7.24.7(@babel/core@7.25.2) - dev: true - - /@babel/plugin-transform-object-super@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-A/vVLwN6lBrMFmMDmPPz0jnE6ZGx7Jq7d6sT/Ev4H65RER6pZ+kczlf1DthF5N0qaPHBsI7UXiE8Zy66nmAovg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-replace-supers': 7.25.0(@babel/core@7.25.2) - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-optional-catch-binding@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-uLEndKqP5BfBbC/5jTwPxLh9kqPWWgzN/f8w6UwAIirAEqiIVJWWY312X72Eub09g5KF9+Zn7+hT7sDxmhRuKA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.2) - dev: true - - /@babel/plugin-transform-optional-chaining@7.24.8(@babel/core@7.25.2): - resolution: {integrity: sha512-5cTOLSMs9eypEy8JUVvIKOu6NgvbJMnpG62VpIHrTmROdQ+L5mDAaI40g25k5vXti55JWNX5jCkq3HZxXBQANw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.2) - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-parameters@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-yGWW5Rr+sQOhK0Ot8hjDJuxU3XLRQGflvT4lhlSY0DFvdb3TwKaY26CJzHtYllU0vT9j58hc37ndFPsqT1SrzA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-transform-private-methods@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-COTCOkG2hn4JKGEKBADkA8WNb35TGkkRbI5iT845dB+NyqgO8Hn+ajPbSnIQznneJTa3d30scb6iz/DhH8GsJQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-create-class-features-plugin': 7.25.0(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-private-property-in-object@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-9z76mxwnwFxMyxZWEgdgECQglF2Q7cFLm0kMf8pGwt+GSJsY0cONKj/UuO4bOH0w/uAel3ekS4ra5CEAyJRmDA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-annotate-as-pure': 7.24.7 - '@babel/helper-create-class-features-plugin': 7.25.0(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.25.2) - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-property-literals@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-EMi4MLQSHfd2nrCqQEWxFdha2gBCqU4ZcCng4WBGZ5CJL4bBRW0ptdqqDdeirGZcpALazVVNJqRmsO8/+oNCBA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.25.2): - resolution: {integrity: sha512-KQsqEAVBpU82NM/B/N9j9WOdphom1SZH3R+2V7INrQUH+V9EBFwZsEJl8eBIVeQE62FxJCc70jzEZwqU7RcVqA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-annotate-as-pure': 7.24.7 - '@babel/helper-module-imports': 7.24.7 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.25.2) - '@babel/types': 7.25.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/plugin-transform-regenerator@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-lq3fvXPdimDrlg6LWBoqj+r/DEWgONuwjuOuQCSYgRroXDH/IdM1C0IZf59fL5cHLpjEH/O6opIRBbqv7ELnuA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - regenerator-transform: 0.15.2 - dev: true - - /@babel/plugin-transform-reserved-words@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-0DUq0pHcPKbjFZCfTss/pGkYMfy3vFWydkUBd9r0GHpIyfs2eCDENvqadMycRS9wZCXR41wucAfJHJmwA0UmoQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - dev: true - - /@babel/plugin-transform-runtime@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-YqXjrk4C+a1kZjewqt+Mmu2UuV1s07y8kqcUf4qYLnoqemhR4gRQikhdAhSVJioMjVTu6Mo6pAbaypEA3jY6fw==} + resolution: {integrity: sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==} engines: {node: '>=6.9.0'} peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/core': ^7.0.0 dependencies: '@babel/core': 7.25.2 '@babel/helper-module-imports': 7.24.7 - '@babel/helper-plugin-utils': 7.24.8 - babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.25.2) - babel-plugin-polyfill-corejs3: 0.10.6(@babel/core@7.25.2) - babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.25.2) - semver: 6.3.1 + '@babel/helper-simple-access': 7.24.7 + '@babel/helper-validator-identifier': 7.24.7 + '@babel/traverse': 7.25.3 transitivePeerDependencies: - supports-color dev: true - /@babel/plugin-transform-shorthand-properties@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-KsDsevZMDsigzbA09+vacnLpmPH4aWjcZjXdyFKGzpplxhbeB4wYtury3vglQkg6KM/xEPKt73eCjPPf1PgXBA==} + /@babel/helper-optimise-call-expression@7.24.7: + resolution: {integrity: sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/types': 7.25.2 + dev: true + + /@babel/helper-plugin-utils@7.24.8: + resolution: {integrity: sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==} + engines: {node: '>=6.9.0'} dev: true - /@babel/plugin-transform-spread@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-x96oO0I09dgMDxJaANcRyD4ellXFLLiWhuwDxKZX5g2rWP1bTPkBSwCYv96VDXVT1bD9aPj8tppr5ITIh8hBng==} + /@babel/helper-replace-supers@7.25.0(@babel/core@7.25.2): + resolution: {integrity: sha512-q688zIvQVYtZu+i2PsdIu/uWGRpfxzr5WESsfpShfZECkO+d2o+WROWezCi/Q6kJ0tfPa5+pUGUlfx2HhrA3Bg==} engines: {node: '>=6.9.0'} peerDependencies: - '@babel/core': ^7.0.0-0 + '@babel/core': ^7.0.0 dependencies: '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 + '@babel/helper-member-expression-to-functions': 7.24.8 + '@babel/helper-optimise-call-expression': 7.24.7 + '@babel/traverse': 7.25.3 transitivePeerDependencies: - supports-color dev: true - /@babel/plugin-transform-sticky-regex@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-kHPSIJc9v24zEml5geKg9Mjx5ULpfncj0wRpYtxbvKyTtHCYDkVE3aHQ03FrpEo4gEe2vrJJS1Y9CJTaThA52g==} + /@babel/helper-simple-access@7.24.7: + resolution: {integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/traverse': 7.25.3 + '@babel/types': 7.25.2 + transitivePeerDependencies: + - supports-color dev: true - /@babel/plugin-transform-template-literals@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-AfDTQmClklHCOLxtGoP7HkeMw56k1/bTQjwsfhL6pppo/M4TOBSq+jjBUBLmV/4oeFg4GWMavIl44ZeCtmmZTw==} + /@babel/helper-skip-transparent-expression-wrappers@7.24.7: + resolution: {integrity: sha512-IO+DLT3LQUElMbpzlatRASEyQtfhSE0+m465v++3jyyXeBTBUjtVZg28/gHeV5mrTJqvEKhKroBGAvhW+qPHiQ==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/traverse': 7.25.3 + '@babel/types': 7.25.2 + transitivePeerDependencies: + - supports-color dev: true - /@babel/plugin-transform-typeof-symbol@7.24.8(@babel/core@7.25.2): - resolution: {integrity: sha512-adNTUpDCVnmAE58VEqKlAA6ZBlNkMnWD0ZcW76lyNFN3MJniyGFZfNwERVk8Ap56MCnXztmDr19T4mPTztcuaw==} + /@babel/helper-string-parser@7.24.8: + resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 dev: true - /@babel/plugin-transform-typescript@7.25.2(@babel/core@7.25.2): - resolution: {integrity: sha512-lBwRvjSmqiMYe/pS0+1gggjJleUJi7NzjvQ1Fkqtt69hBa/0t1YuW/MLQMAPixfwaQOHUXsd6jeU3Z+vdGv3+A==} + /@babel/helper-validator-identifier@7.24.7: + resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-annotate-as-pure': 7.24.7 - '@babel/helper-create-class-features-plugin': 7.25.0(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 - '@babel/plugin-syntax-typescript': 7.24.7(@babel/core@7.25.2) - transitivePeerDependencies: - - supports-color dev: true - /@babel/plugin-transform-unicode-escapes@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-U3ap1gm5+4edc2Q/P+9VrBNhGkfnf+8ZqppY71Bo/pzZmXhhLdqgaUl6cuB07O1+AQJtCLfaOmswiNbSQ9ivhw==} + /@babel/helper-validator-option@7.24.8: + resolution: {integrity: sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 dev: true - /@babel/plugin-transform-unicode-property-regex@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-uH2O4OV5M9FZYQrwc7NdVmMxQJOCCzFeYudlZSzUAHRFeOujQefa92E74TQDVskNHCzOXoigEuoyzHDhaEaK5w==} + /@babel/helpers@7.25.0: + resolution: {integrity: sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.25.2 - '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 + '@babel/template': 7.25.0 + '@babel/types': 7.25.2 dev: true - /@babel/plugin-transform-unicode-regex@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-hlQ96MBZSAXUq7ltkjtu3FJCCSMx/j629ns3hA3pXnBXjanNP0LHi+JpPeA81zaWgVK1VGH95Xuy7u0RyQ8kMg==} + /@babel/highlight@7.24.7: + resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.25.2 - '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 + '@babel/helper-validator-identifier': 7.24.7 + chalk: 2.4.2 + js-tokens: 4.0.0 + picocolors: 1.0.1 dev: true - /@babel/plugin-transform-unicode-sets-regex@7.24.7(@babel/core@7.25.2): - resolution: {integrity: sha512-2G8aAvF4wy1w/AGZkemprdGMRg5o6zPNhbHVImRz3lss55TYCBd6xStN19rt8XJHq20sqV0JbyWjOWwQRwV/wg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 + /@babel/parser@7.25.3: + resolution: {integrity: sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw==} + engines: {node: '>=6.0.0'} + hasBin: true dependencies: - '@babel/core': 7.25.2 - '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 + '@babel/types': 7.25.2 dev: true - /@babel/preset-env@7.25.3(@babel/core@7.25.2): - resolution: {integrity: sha512-QsYW7UeAaXvLPX9tdVliMJE7MD7M6MLYVTovRTIwhoYQVFHR1rM4wO8wqAezYi3/BpSD+NzVCZ69R6smWiIi8g==} + /@babel/plugin-proposal-private-methods@7.18.6(@babel/core@7.25.2): + resolution: {integrity: sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==} engines: {node: '>=6.9.0'} + deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead. peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/compat-data': 7.25.2 '@babel/core': 7.25.2 - '@babel/helper-compilation-targets': 7.25.2 + '@babel/helper-create-class-features-plugin': 7.25.0(@babel/core@7.25.2) '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-validator-option': 7.24.8 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.25.3(@babel/core@7.25.2) - '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.25.0(@babel/core@7.25.2) - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.25.0(@babel/core@7.25.2) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.25.0(@babel/core@7.25.2) - '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.2) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.2) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.25.2) - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.25.2) - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-syntax-import-assertions': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-syntax-import-attributes': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.25.2) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.25.2) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.25.2) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.25.2) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.25.2) - '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.25.2) - '@babel/plugin-transform-arrow-functions': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-async-generator-functions': 7.25.0(@babel/core@7.25.2) - '@babel/plugin-transform-async-to-generator': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-block-scoped-functions': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-block-scoping': 7.25.0(@babel/core@7.25.2) - '@babel/plugin-transform-class-properties': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-class-static-block': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-classes': 7.25.0(@babel/core@7.25.2) - '@babel/plugin-transform-computed-properties': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-destructuring': 7.24.8(@babel/core@7.25.2) - '@babel/plugin-transform-dotall-regex': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-duplicate-keys': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.25.0(@babel/core@7.25.2) - '@babel/plugin-transform-dynamic-import': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-exponentiation-operator': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-export-namespace-from': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-for-of': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-function-name': 7.25.1(@babel/core@7.25.2) - '@babel/plugin-transform-json-strings': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-literals': 7.25.2(@babel/core@7.25.2) - '@babel/plugin-transform-logical-assignment-operators': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-member-expression-literals': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-modules-amd': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-modules-commonjs': 7.24.8(@babel/core@7.25.2) - '@babel/plugin-transform-modules-systemjs': 7.25.0(@babel/core@7.25.2) - '@babel/plugin-transform-modules-umd': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-named-capturing-groups-regex': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-new-target': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-nullish-coalescing-operator': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-numeric-separator': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-object-rest-spread': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-object-super': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-optional-catch-binding': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-optional-chaining': 7.24.8(@babel/core@7.25.2) - '@babel/plugin-transform-parameters': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-private-methods': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-private-property-in-object': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-property-literals': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-regenerator': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-reserved-words': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-shorthand-properties': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-spread': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-sticky-regex': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-template-literals': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-typeof-symbol': 7.24.8(@babel/core@7.25.2) - '@babel/plugin-transform-unicode-escapes': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-unicode-property-regex': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-unicode-regex': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-unicode-sets-regex': 7.24.7(@babel/core@7.25.2) - '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.25.2) - babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.25.2) - babel-plugin-polyfill-corejs3: 0.10.6(@babel/core@7.25.2) - babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.25.2) - core-js-compat: 3.38.0 - semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true - /@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.25.2): - resolution: {integrity: sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==} - peerDependencies: - '@babel/core': ^7.0.0-0 || ^8.0.0-0 <8.0.0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/types': 7.25.2 - esutils: 2.0.3 - dev: true - - /@babel/regjsgen@0.8.0: - resolution: {integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==} - dev: true - /@babel/runtime@7.25.0: resolution: {integrity: sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==} engines: {node: '>=6.9.0'} @@ -1916,8 +825,8 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@eslint-community/regexpp@4.10.1: - resolution: {integrity: sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==} + /@eslint-community/regexpp@4.10.0: + resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true @@ -1931,7 +840,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 - debug: 4.3.5 + debug: 4.3.4 espree: 9.6.1 globals: 13.24.0 ignore: 5.3.1 @@ -1951,10 +860,9 @@ packages: /@humanwhocodes/config-array@0.11.14: resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} - deprecated: Use @eslint/config-array instead dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.5 + debug: 4.3.4 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -1967,7 +875,6 @@ packages: /@humanwhocodes/object-schema@2.0.3: resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} - deprecated: Use @eslint/object-schema instead dev: true /@isaacs/cliui@8.0.2: @@ -2006,13 +913,6 @@ packages: engines: {node: '>=6.0.0'} dev: true - /@jridgewell/source-map@0.3.6: - resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} - dependencies: - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - dev: true - /@jridgewell/sourcemap-codec@1.5.0: resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} dev: true @@ -2084,27 +984,6 @@ packages: slash: 4.0.0 dev: true - /@rollup/plugin-babel@6.0.4(@babel/core@7.25.2)(rollup@4.20.0): - resolution: {integrity: sha512-YF7Y52kFdFT/xVSuVdjkV5ZdX/3YtmX0QulG+x0taQOtJdHYzVU61aSSkAgVJ7NOv6qPkIYiJSgSWWN/DM5sGw==} - engines: {node: '>=14.0.0'} - peerDependencies: - '@babel/core': ^7.0.0 - '@types/babel__core': ^7.1.9 - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - '@types/babel__core': - optional: true - rollup: - optional: true - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-module-imports': 7.24.7 - '@rollup/pluginutils': 5.1.0(rollup@4.20.0) - rollup: 4.20.0 - transitivePeerDependencies: - - supports-color - dev: true - /@rollup/plugin-node-resolve@15.2.3(rollup@4.20.0): resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} engines: {node: '>=14.0.0'} @@ -2137,21 +1016,6 @@ packages: rollup: 4.20.0 dev: true - /@rollup/plugin-terser@0.4.4(rollup@4.20.0): - resolution: {integrity: sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - rollup: 4.20.0 - serialize-javascript: 6.0.2 - smob: 1.5.0 - terser: 5.31.6 - dev: true - /@rollup/plugin-typescript@11.1.6(rollup@4.20.0)(typescript@5.5.4): resolution: {integrity: sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==} engines: {node: '>=14.0.0'} @@ -2665,22 +1529,16 @@ packages: tinyrainbow: 1.2.0 dev: true - /acorn-jsx@5.3.2(acorn@8.12.0): + /acorn-jsx@5.3.2(acorn@8.11.3): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - acorn: 8.12.0 + acorn: 8.11.3 dev: true - /acorn@8.12.0: - resolution: {integrity: sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: true - - /acorn@8.12.1: - resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} + /acorn@8.11.3: + resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} engines: {node: '>=0.4.0'} hasBin: true dev: true @@ -2857,42 +1715,6 @@ packages: possible-typed-array-names: 1.0.0 dev: true - /babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.25.2): - resolution: {integrity: sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q==} - peerDependencies: - '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - dependencies: - '@babel/compat-data': 7.25.2 - '@babel/core': 7.25.2 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.2) - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - dev: true - - /babel-plugin-polyfill-corejs3@0.10.6(@babel/core@7.25.2): - resolution: {integrity: sha512-b37+KR2i/khY5sKmWNVQAnitvquQbNdWy6lJdsr0kmquCKEEUgMKK4SboVM3HtfnZilfjr4MMQ7vY58FVWDtIA==} - peerDependencies: - '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.2) - core-js-compat: 3.38.0 - transitivePeerDependencies: - - supports-color - dev: true - - /babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.25.2): - resolution: {integrity: sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg==} - peerDependencies: - '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.2) - transitivePeerDependencies: - - supports-color - dev: true - /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: true @@ -2928,10 +1750,6 @@ packages: update-browserslist-db: 1.1.0(browserslist@4.23.3) dev: true - /buffer-from@1.1.2: - resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - dev: true - /builtin-modules@3.3.0: resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} engines: {node: '>=6'} @@ -3023,10 +1841,6 @@ packages: delayed-stream: 1.0.0 dev: true - /commander@2.20.3: - resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - dev: true - /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true @@ -3035,12 +1849,6 @@ packages: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} dev: true - /core-js-compat@3.38.0: - resolution: {integrity: sha512-75LAicdLa4OJVwFxFbQR3NdnZjNgX6ILpVcVzcC4T2smerB5lELMrJQQQoWV6TiuC/vlaFqgU2tKQx9w5s0e0A==} - dependencies: - browserslist: 4.23.3 - dev: true - /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -3107,8 +1915,8 @@ packages: ms: 2.1.3 dev: true - /debug@4.3.5: - resolution: {integrity: sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==} + /debug@4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} peerDependencies: supports-color: '*' @@ -3202,15 +2010,6 @@ packages: resolution: {integrity: sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==} dev: true - /downlevel-dts@0.11.0: - resolution: {integrity: sha512-vo835pntK7kzYStk7xUHDifiYJvXxVhUapt85uk2AI94gUUAQX9HNRtrcMHNSc3YHJUEHGbYIGsM99uIbgAtxw==} - hasBin: true - dependencies: - semver: 7.6.3 - shelljs: 0.8.5 - typescript: 5.6.0-dev.20240814 - dev: true - /eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true @@ -3636,7 +2435,7 @@ packages: hasBin: true dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@eslint-community/regexpp': 4.10.1 + '@eslint-community/regexpp': 4.10.0 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.57.0 '@humanwhocodes/config-array': 0.11.14 @@ -3646,7 +2445,7 @@ packages: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.5 + debug: 4.3.4 doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -3681,8 +2480,8 @@ packages: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - acorn: 8.12.0 - acorn-jsx: 5.3.2(acorn@8.12.0) + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) eslint-visitor-keys: 3.4.3 dev: true @@ -3928,7 +2727,6 @@ packages: /glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Glob versions prior to v9 are no longer supported dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 @@ -4110,7 +2908,6 @@ packages: /inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. dependencies: once: 1.4.0 wrappy: 1.0.2 @@ -4432,11 +3229,6 @@ packages: - utf-8-validate dev: true - /jsesc@0.5.0: - resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} - hasBin: true - dev: true - /jsesc@2.5.2: resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} engines: {node: '>=4'} @@ -4505,10 +3297,6 @@ packages: p-locate: 5.0.0 dev: true - /lodash.debounce@4.0.8: - resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} - dev: true - /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true @@ -4895,12 +3683,6 @@ packages: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true - /randombytes@2.1.0: - resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} - dependencies: - safe-buffer: 5.2.1 - dev: true - /react-dom@19.0.0-rc.0(react@19.0.0-rc.0): resolution: {integrity: sha512-MhgN2RMYFUkZekkFbsXg9ycwEGaMBzATpTNvGGvWNA9BZZEkdzIL4pv7iDuZKn48YoGARk8ydu4S+Ehd8Yrc4g==} peerDependencies: @@ -4921,6 +3703,7 @@ packages: /react@19.0.0-rc.0: resolution: {integrity: sha512-8nrDCl5uE54FHeKqKrEO0TS+10bT4cxutJGb2okiJc0FHMQ6I3FeItaqly/1nbijlhSO3HmAVyPIexIQQWYAtQ==} engines: {node: '>=0.10.0'} + dev: true /rechoir@0.6.2: resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==} @@ -4946,27 +3729,10 @@ packages: which-builtin-type: 1.1.4 dev: true - /regenerate-unicode-properties@10.1.1: - resolution: {integrity: sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==} - engines: {node: '>=4'} - dependencies: - regenerate: 1.4.2 - dev: true - - /regenerate@1.4.2: - resolution: {integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==} - dev: true - /regenerator-runtime@0.14.1: resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} dev: true - /regenerator-transform@0.15.2: - resolution: {integrity: sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==} - dependencies: - '@babel/runtime': 7.25.0 - dev: true - /regexp.prototype.flags@1.5.2: resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} engines: {node: '>= 0.4'} @@ -4977,25 +3743,6 @@ packages: set-function-name: 2.0.2 dev: true - /regexpu-core@5.3.2: - resolution: {integrity: sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==} - engines: {node: '>=4'} - dependencies: - '@babel/regjsgen': 0.8.0 - regenerate: 1.4.2 - regenerate-unicode-properties: 10.1.1 - regjsparser: 0.9.1 - unicode-match-property-ecmascript: 2.0.0 - unicode-match-property-value-ecmascript: 2.1.0 - dev: true - - /regjsparser@0.9.1: - resolution: {integrity: sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==} - hasBin: true - dependencies: - jsesc: 0.5.0 - dev: true - /requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} dev: true @@ -5034,7 +3781,6 @@ packages: /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true dependencies: glob: 7.2.3 @@ -5107,10 +3853,6 @@ packages: isarray: 2.0.5 dev: true - /safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - dev: true - /safe-regex-test@1.0.3: resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} engines: {node: '>= 0.4'} @@ -5146,12 +3888,6 @@ packages: hasBin: true dev: true - /serialize-javascript@6.0.2: - resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} - dependencies: - randombytes: 2.1.0 - dev: true - /set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} @@ -5243,27 +3979,11 @@ packages: engines: {node: '>=12'} dev: true - /smob@1.5.0: - resolution: {integrity: sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==} - dev: true - /source-map-js@1.2.0: resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} engines: {node: '>=0.10.0'} dev: true - /source-map-support@0.5.21: - resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} - dependencies: - buffer-from: 1.1.2 - source-map: 0.6.1 - dev: true - - /source-map@0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} - dev: true - /stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} dev: true @@ -5402,17 +4122,6 @@ packages: tslib: 2.6.3 dev: true - /terser@5.31.6: - resolution: {integrity: sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg==} - engines: {node: '>=10'} - hasBin: true - dependencies: - '@jridgewell/source-map': 0.3.6 - acorn: 8.12.1 - commander: 2.20.3 - source-map-support: 0.5.21 - dev: true - /test-exclude@7.0.1: resolution: {integrity: sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==} engines: {node: '>=18'} @@ -5563,12 +4272,6 @@ packages: hasBin: true dev: true - /typescript@5.6.0-dev.20240814: - resolution: {integrity: sha512-7N6qhxVbJ3E1LdEZ68/WbvZMwlXp9bErVUs2yNA7XaSVDkg+iAYPM24ba0VeGkpR105+e5gaGhAYShD274qBWQ==} - engines: {node: '>=14.17'} - hasBin: true - dev: true - /unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: @@ -5582,29 +4285,6 @@ packages: resolution: {integrity: sha512-5ruQbENj95yDYJNS3TvcaxPMshV7aizdv/hWYjGIKoANWKjhWNBsr2YEuYZKodQulB1b8l7ILOuDQep3afowQQ==} dev: true - /unicode-canonical-property-names-ecmascript@2.0.0: - resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} - engines: {node: '>=4'} - dev: true - - /unicode-match-property-ecmascript@2.0.0: - resolution: {integrity: sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==} - engines: {node: '>=4'} - dependencies: - unicode-canonical-property-names-ecmascript: 2.0.0 - unicode-property-aliases-ecmascript: 2.1.0 - dev: true - - /unicode-match-property-value-ecmascript@2.1.0: - resolution: {integrity: sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==} - engines: {node: '>=4'} - dev: true - - /unicode-property-aliases-ecmascript@2.1.0: - resolution: {integrity: sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==} - engines: {node: '>=4'} - dev: true - /universalify@0.2.0: resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} engines: {node: '>= 4.0.0'} @@ -5640,7 +4320,7 @@ packages: react: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: react: 19.0.0-rc.0 - dev: false + dev: true /vite-node@2.0.5(@types/node@22.3.0): resolution: {integrity: sha512-LdsW4pxj0Ot69FAoXZ1yTnA9bjGohr2yNBU7QKRxpz8ITSkhuDl6h3zS/tvgz4qrNjeRnvrWeXQ8ZF7Um4W00Q==} diff --git a/readme.md b/readme.md index 274a4bd8f7..137441ec3c 100644 --- a/readme.md +++ b/readme.md @@ -360,6 +360,8 @@ const useGrumpyStore = create(redux(reducer, initialState)) ## Redux devtools +Install the [Redux DevTools Chrome extension](https://chromewebstore.google.com/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd) to use the devtools middleware. + ```jsx import { devtools } from 'zustand/middleware' diff --git a/rollup.config.js b/rollup.config.js index dd77d24ab0..675bdf3edf 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,33 +1,25 @@ const path = require('path') const alias = require('@rollup/plugin-alias') -const babelPlugin = require('@rollup/plugin-babel') const resolve = require('@rollup/plugin-node-resolve') const replace = require('@rollup/plugin-replace') -const terser = require('@rollup/plugin-terser') const typescript = require('@rollup/plugin-typescript') const { default: esbuild } = require('rollup-plugin-esbuild') -const createBabelConfig = require('./babel.config.js') const extensions = ['.js', '.ts', '.tsx'] const { root } = path.parse(process.cwd()) -const entries = [{ find: /.*\/vanilla\.ts$/, replacement: 'zustand/vanilla' }] +const entries = [ + { find: /.*\/vanilla\/shallow\.ts$/, replacement: 'zustand/vanilla/shallow' }, + { find: /.*\/react\/shallow\.ts$/, replacement: 'zustand/react/shallow' }, + { find: /.*\/vanilla\.ts$/, replacement: 'zustand/vanilla' }, + { find: /.*\/react\.ts$/, replacement: 'zustand/react' }, +] function external(id) { return !id.startsWith('.') && !id.startsWith(root) } -function getBabelOptions(targets) { - return { - ...createBabelConfig({ env: (env) => env === 'build' }, targets), - extensions, - comments: false, - babelHelpers: 'bundled', - } -} - -function getEsbuild(env = 'development') { +function getEsbuild() { return esbuild({ - minify: env === 'production', target: 'es2018', supported: { 'import-meta': true }, tsconfig: path.resolve('./tsconfig.json'), @@ -68,7 +60,7 @@ function createESMConfig(input, output) { 'import.meta.env?.MODE': '(import.meta.env ? import.meta.env.MODE : undefined)', }), - // a workround for #829 + // a workaround for #829 'use-sync-external-store/shim/with-selector': 'use-sync-external-store/shim/with-selector.js', delimiters: ['\\b', '\\b(?!(\\.|/))'], @@ -79,23 +71,10 @@ function createESMConfig(input, output) { } } -function createCommonJSConfig(input, output, options) { +function createCommonJSConfig(input, output) { return { input, - output: { - file: `${output}.js`, - format: 'cjs', - esModule: false, - outro: options.addModuleExport - ? [ - `module.exports = ${options.addModuleExport.default};`, - ...Object.entries(options.addModuleExport) - .filter(([key]) => key !== 'default') - .map(([key, value]) => `module.exports.${key} = ${value};`), - `exports.default = module.exports;`, - ].join('\n') - : '', - }, + output: { file: output, format: 'cjs' }, external, plugins: [ alias({ entries: entries.filter((e) => !e.find.test(input)) }), @@ -105,65 +84,7 @@ function createCommonJSConfig(input, output, options) { delimiters: ['\\b', '\\b(?!(\\.|/))'], preventAssignment: true, }), - babelPlugin(getBabelOptions({ ie: 11 })), - ], - } -} - -function createUMDConfig(input, output, env) { - let name = 'zustand' - const fileName = output.slice('dist/umd/'.length) - const capitalize = (s) => s.slice(0, 1).toUpperCase() + s.slice(1) - if (fileName !== 'index') { - name += fileName.replace(/(\w+)\W*/g, (_, p) => capitalize(p)) - } - return { - input, - output: { - file: `${output}.${env}.js`, - format: 'umd', - name, - globals: { - react: 'React', - immer: 'immer', - // FIXME not yet supported - 'use-sync-external-store/shim/with-selector': - 'useSyncExternalStoreShimWithSelector', - 'zustand/vanilla': 'zustandVanilla', - }, - }, - external, - plugins: [ - alias({ entries: entries.filter((e) => !e.find.test(input)) }), - resolve({ extensions }), - replace({ - 'import.meta.env?.MODE': JSON.stringify(env), - delimiters: ['\\b', '\\b(?!(\\.|/))'], - preventAssignment: true, - }), - babelPlugin(getBabelOptions({ ie: 11 })), - ...(env === 'production' ? [terser()] : []), - ], - } -} - -function createSystemConfig(input, output, env) { - return { - input, - output: { - file: `${output}.${env}.js`, - format: 'system', - }, - external, - plugins: [ - alias({ entries: entries.filter((e) => !e.find.test(input)) }), - resolve({ extensions }), - replace({ - 'import.meta.env?.MODE': JSON.stringify(env), - delimiters: ['\\b', '\\b(?!(\\.|/))'], - preventAssignment: true, - }), - getEsbuild(env), + getEsbuild(), ], } } @@ -177,24 +98,8 @@ module.exports = function (args) { } return [ ...(c === 'index' ? [createDeclarationConfig(`src/${c}.ts`, 'dist')] : []), - createCommonJSConfig(`src/${c}.ts`, `dist/${c}`, { - addModuleExport: { - index: { - default: 'react', - create: 'create', - useStore: 'useStore', - createStore: 'vanilla.createStore', - }, - vanilla: { default: 'vanilla', createStore: 'createStore' }, - shallow: { default: 'shallow', shallow: 'shallow$1' }, - }[c], - }), - createESMConfig(`src/${c}.ts`, `dist/esm/${c}.js`), + createCommonJSConfig(`src/${c}.ts`, `dist/${c}.js`), createESMConfig(`src/${c}.ts`, `dist/esm/${c}.mjs`), - createUMDConfig(`src/${c}.ts`, `dist/umd/${c}`, 'development'), - createUMDConfig(`src/${c}.ts`, `dist/umd/${c}`, 'production'), - createSystemConfig(`src/${c}.ts`, `dist/system/${c}`, 'development'), - createSystemConfig(`src/${c}.ts`, `dist/system/${c}`, 'production'), ] } diff --git a/src/context.ts b/src/context.ts deleted file mode 100644 index 01db464c33..0000000000 --- a/src/context.ts +++ /dev/null @@ -1,102 +0,0 @@ -// import { -// createElement, -// createContext as reactCreateContext, -// useContext, -// useMemo, -// useRef, -// } from 'react' -// That doesnt work in ESM, because React libs are CJS only. -// The following is a workaround until ESM is supported. -// eslint-disable-next-line import/extensions -import ReactExports from 'react' -import type { ReactNode } from 'react' -import type { StoreApi } from 'zustand' -// eslint-disable-next-line import/extensions -import { useStoreWithEqualityFn } from 'zustand/traditional' - -const { - createElement, - createContext: reactCreateContext, - useContext, - useMemo, - useRef, -} = ReactExports - -type UseContextStore> = { - (): ExtractState - ( - selector: (state: ExtractState) => U, - equalityFn?: (a: U, b: U) => boolean, - ): U -} - -type ExtractState = S extends { getState: () => infer T } ? T : never - -type WithoutCallSignature = { [K in keyof T]: T[K] } - -/** - * @deprecated Use `createStore` and `useStore` for context usage - */ -function createContext>() { - if (import.meta.env?.MODE !== 'production') { - console.warn( - "[DEPRECATED] `context` will be removed in a future version. Instead use `import { createStore, useStore } from 'zustand'`. See: https://github.com/pmndrs/zustand/discussions/1180.", - ) - } - const ZustandContext = reactCreateContext(undefined) - - const Provider = ({ - createStore, - children, - }: { - createStore: () => S - children: ReactNode - }) => { - const storeRef = useRef() - - if (!storeRef.current) { - storeRef.current = createStore() - } - - return createElement( - ZustandContext.Provider, - { value: storeRef.current }, - children, - ) - } - - const useContextStore: UseContextStore = >( - selector?: (state: ExtractState) => StateSlice, - equalityFn?: (a: StateSlice, b: StateSlice) => boolean, - ) => { - const store = useContext(ZustandContext) - if (!store) { - throw new Error( - 'Seems like you have not used zustand provider as an ancestor.', - ) - } - return useStoreWithEqualityFn( - store, - selector as (state: ExtractState) => StateSlice, - equalityFn, - ) - } - - const useStoreApi = () => { - const store = useContext(ZustandContext) - if (!store) { - throw new Error( - 'Seems like you have not used zustand provider as an ancestor.', - ) - } - return useMemo>(() => ({ ...store }), [store]) - } - - return { - Provider, - useStore: useContextStore, - useStoreApi, - } -} - -export default createContext diff --git a/src/index.ts b/src/index.ts index bc6544c82f..27b7a4f91f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,2 @@ export * from './vanilla.ts' export * from './react.ts' -export { default } from './react.ts' diff --git a/src/middleware/devtools.ts b/src/middleware/devtools.ts index 1afd6e93b2..7acacfd922 100644 --- a/src/middleware/devtools.ts +++ b/src/middleware/devtools.ts @@ -49,13 +49,22 @@ type TakeTwo = T extends { length: 0 } type WithDevtools = Write> +type Action = + | string + | { + type: string + [x: string | number | symbol]: unknown + } type StoreDevtools = S extends { - setState: (...a: infer Sa) => infer Sr + setState: { + // capture both overloads of setState + (...a: infer Sa1): infer Sr1 + (...a: infer Sa2): infer Sr2 + } } ? { - setState( - ...a: [...a: TakeTwo, action?: A] - ): Sr + setState(...a: [...a: TakeTwo, action?: Action]): Sr1 + setState(...a: [...a: TakeTwo, action?: Action]): Sr2 } : never @@ -153,16 +162,11 @@ const devtoolsImpl: DevtoolsImpl = extensionConnector = (enabled ?? import.meta.env?.MODE !== 'production') && window.__REDUX_DEVTOOLS_EXTENSION__ - } catch (_e) { + } catch { // ignored } if (!extensionConnector) { - if (import.meta.env?.MODE !== 'production' && enabled) { - console.warn( - '[zustand devtools middleware] Please install/enable Redux devtools extension', - ) - } return fn(set, get, api) } @@ -170,8 +174,8 @@ const devtoolsImpl: DevtoolsImpl = extractConnectionInformation(store, extensionConnector, options) let isRecording = true - ;(api.setState as NamedSet) = (state, replace, nameOrAction) => { - const r = set(state, replace) + ;(api.setState as any) = ((state, replace, nameOrAction: Action) => { + const r = set(state, replace as any) if (!isRecording) return r const action: { type: string } = nameOrAction === undefined @@ -194,12 +198,12 @@ const devtoolsImpl: DevtoolsImpl = }, ) return r - } + }) as NamedSet const setStateFromDevtools: StoreApi['setState'] = (...a) => { const originalIsRecording = isRecording isRecording = false - set(...a) + set(...(a as Parameters)) isRecording = originalIsRecording } @@ -269,7 +273,7 @@ const devtoolsImpl: DevtoolsImpl = if (Object.keys(action.state as S).length !== 1) { console.error( ` - [zustand devtools middleware] Unsupported __setState action format. + [zustand devtools middleware] Unsupported __setState action format. When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(), and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } } `, diff --git a/src/middleware/immer.ts b/src/middleware/immer.ts index 33af18f5b1..7d692d760d 100644 --- a/src/middleware/immer.ts +++ b/src/middleware/immer.ts @@ -38,13 +38,21 @@ type StoreImmer = S extends { getState: () => infer T setState: infer SetState } - ? SetState extends (...a: infer A) => infer Sr + ? SetState extends { + (...a: infer A1): infer Sr1 + (...a: infer A2): infer Sr2 + } ? { setState( nextStateOrUpdater: T | Partial | ((state: Draft) => void), - shouldReplace?: boolean | undefined, - ...a: SkipTwo - ): Sr + shouldReplace?: false, + ...a: SkipTwo + ): Sr1 + setState( + nextStateOrUpdater: T | ((state: Draft) => void), + shouldReplace: true, + ...a: SkipTwo + ): Sr2 } : never : never @@ -61,7 +69,7 @@ const immerImpl: ImmerImpl = (initializer) => (set, get, store) => { typeof updater === 'function' ? produce(updater as any) : updater ) as ((s: T) => T) | T | Partial - return set(nextState as any, replace, ...a) + return set(nextState, replace as any, ...a) } return initializer(store.setState, get, store) diff --git a/src/middleware/persist.ts b/src/middleware/persist.ts index eea91877a6..6ec34d6c7f 100644 --- a/src/middleware/persist.ts +++ b/src/middleware/persist.ts @@ -35,7 +35,7 @@ export function createJSONStorage( let storage: StateStorage | undefined try { storage = getStorage() - } catch (_e) { + } catch { // prevent error if the storage is not defined (e.g. when server side rendering a page) return } @@ -66,34 +66,6 @@ export function createJSONStorage( export interface PersistOptions { /** Name of the storage (must be unique) */ name: string - /** - * @deprecated Use `storage` instead. - * A function returning a storage. - * The storage must fit `window.localStorage`'s api (or an async version of it). - * For example the storage could be `AsyncStorage` from React Native. - * - * @default () => localStorage - */ - getStorage?: () => StateStorage - /** - * @deprecated Use `storage` instead. - * Use a custom serializer. - * The returned string will be stored in the storage. - * - * @default JSON.stringify - */ - serialize?: (state: StorageValue) => string | Promise - /** - * @deprecated Use `storage` instead. - * Use a custom deserializer. - * Must return an object matching StorageValue - * - * @param str The storage's current value. - * @default JSON.parse - */ - deserialize?: ( - str: string, - ) => StorageValue | Promise> /** * Use a custom persist storage. * @@ -200,180 +172,7 @@ const toThenable = } } -const oldImpl: PersistImpl = (config, baseOptions) => (set, get, api) => { - type S = ReturnType - let options = { - getStorage: () => localStorage, - serialize: JSON.stringify as (state: StorageValue) => string, - deserialize: JSON.parse as (str: string) => StorageValue, - partialize: (state: S) => state, - version: 0, - merge: (persistedState: unknown, currentState: S) => ({ - ...currentState, - ...(persistedState as object), - }), - ...baseOptions, - } - - let hasHydrated = false - const hydrationListeners = new Set>() - const finishHydrationListeners = new Set>() - let storage: StateStorage | undefined - - try { - storage = options.getStorage() - } catch (_e) { - // prevent error if the storage is not defined (e.g. when server side rendering a page) - } - - if (!storage) { - return config( - (...args) => { - console.warn( - `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`, - ) - set(...args) - }, - get, - api, - ) - } - - const thenableSerialize = toThenable(options.serialize) - - const setItem = (): Thenable => { - const state = options.partialize({ ...get() }) - - let errorInSync: Error | undefined - const thenable = thenableSerialize({ state, version: options.version }) - .then((serializedValue) => - (storage as StateStorage).setItem(options.name, serializedValue), - ) - .catch((e) => { - errorInSync = e - }) - if (errorInSync) { - throw errorInSync - } - return thenable - } - - const savedSetState = api.setState - - api.setState = (state, replace) => { - savedSetState(state, replace) - void setItem() - } - - const configResult = config( - (...args) => { - set(...args) - void setItem() - }, - get, - api, - ) - - // a workaround to solve the issue of not storing rehydrated state in sync storage - // the set(state) value would be later overridden with initial state by create() - // to avoid this, we merge the state from localStorage into the initial state. - let stateFromStorage: S | undefined - - // rehydrate initial state with existing stored state - const hydrate = () => { - if (!storage) return - - hasHydrated = false - hydrationListeners.forEach((cb) => cb(get())) - - const postRehydrationCallback = - options.onRehydrateStorage?.(get()) || undefined - - // bind is used to avoid `TypeError: Illegal invocation` error - return toThenable(storage.getItem.bind(storage))(options.name) - .then((storageValue) => { - if (storageValue) { - return options.deserialize(storageValue) - } - }) - .then((deserializedStorageValue) => { - if (deserializedStorageValue) { - if ( - typeof deserializedStorageValue.version === 'number' && - deserializedStorageValue.version !== options.version - ) { - if (options.migrate) { - return options.migrate( - deserializedStorageValue.state, - deserializedStorageValue.version, - ) - } - console.error( - `State loaded from storage couldn't be migrated since no migrate function was provided`, - ) - } else { - return deserializedStorageValue.state - } - } - }) - .then((migratedState) => { - stateFromStorage = options.merge( - migratedState as S, - get() ?? configResult, - ) - - set(stateFromStorage as S, true) - return setItem() - }) - .then(() => { - postRehydrationCallback?.(stateFromStorage, undefined) - hasHydrated = true - finishHydrationListeners.forEach((cb) => cb(stateFromStorage as S)) - }) - .catch((e: Error) => { - postRehydrationCallback?.(undefined, e) - }) - } - - ;(api as StoreApi & StorePersist).persist = { - setOptions: (newOptions) => { - options = { - ...options, - ...newOptions, - } - - if (newOptions.getStorage) { - storage = newOptions.getStorage() - } - }, - clearStorage: () => { - storage?.removeItem(options.name) - }, - getOptions: () => options, - rehydrate: () => hydrate() as Promise, - hasHydrated: () => hasHydrated, - onHydrate: (cb) => { - hydrationListeners.add(cb) - - return () => { - hydrationListeners.delete(cb) - } - }, - onFinishHydration: (cb) => { - finishHydrationListeners.add(cb) - - return () => { - finishHydrationListeners.delete(cb) - } - }, - } - - hydrate() - - return stateFromStorage || configResult -} - -const newImpl: PersistImpl = (config, baseOptions) => (set, get, api) => { +const persistImpl: PersistImpl = (config, baseOptions) => (set, get, api) => { type S = ReturnType let options = { storage: createJSONStorage(() => localStorage), @@ -397,7 +196,7 @@ const newImpl: PersistImpl = (config, baseOptions) => (set, get, api) => { console.warn( `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`, ) - set(...args) + set(...(args as Parameters)) }, get, api, @@ -415,13 +214,13 @@ const newImpl: PersistImpl = (config, baseOptions) => (set, get, api) => { const savedSetState = api.setState api.setState = (state, replace) => { - savedSetState(state, replace) + savedSetState(state, replace as any) void setItem() } const configResult = config( (...args) => { - set(...args) + set(...(args as Parameters)) void setItem() }, get, @@ -550,22 +349,6 @@ const newImpl: PersistImpl = (config, baseOptions) => (set, get, api) => { return stateFromStorage || configResult } -const persistImpl: PersistImpl = (config, baseOptions) => { - if ( - 'getStorage' in baseOptions || - 'serialize' in baseOptions || - 'deserialize' in baseOptions - ) { - if (import.meta.env?.MODE !== 'production') { - console.warn( - '[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead.', - ) - } - return oldImpl(config, baseOptions) - } - return newImpl(config, baseOptions) -} - type Persist = < T, Mps extends [StoreMutatorIdentifier, unknown][] = [], diff --git a/src/react.ts b/src/react.ts index 4471c9ce81..4f13d6e99d 100644 --- a/src/react.ts +++ b/src/react.ts @@ -1,12 +1,8 @@ -// import { useDebugValue } from 'react' -// import { useSyncExternalStoreWithSelector } from 'use-sync-external-store/shim/with-selector' -// Those don't work in ESM, because React libs are CJS only. +// import { useDebugValue, useSyncExternalStore } from 'react' +// That doesn't work in ESM, because React libs are CJS only. // See: https://github.com/pmndrs/valtio/issues/452 // The following is a workaround until ESM is supported. -// eslint-disable-next-line import/extensions import ReactExports from 'react' -// eslint-disable-next-line import/extensions -import useSyncExternalStoreExports from 'use-sync-external-store/shim/with-selector' import { createStore } from './vanilla.ts' import type { Mutate, @@ -15,8 +11,7 @@ import type { StoreMutatorIdentifier, } from './vanilla.ts' -const { useDebugValue } = ReactExports -const { useSyncExternalStoreWithSelector } = useSyncExternalStoreExports +const { useDebugValue, useSyncExternalStore } = ReactExports type ExtractState = S extends { getState: () => infer T } ? T : never @@ -25,70 +20,32 @@ type ReadonlyStoreApi = Pick< 'getState' | 'getInitialState' | 'subscribe' > -type WithReact> = S & { - /** @deprecated please use api.getInitialState() */ - getServerState?: () => ExtractState -} - -let didWarnAboutEqualityFn = false - const identity = (arg: T): T => arg - -export function useStore>>( +export function useStore>( api: S, ): ExtractState -export function useStore>, U>( +export function useStore, U>( api: S, selector: (state: ExtractState) => U, ): U -/** - * @deprecated The usage with three arguments is deprecated. Use `useStoreWithEqualityFn` from 'zustand/traditional'. The usage with one or two arguments is not deprecated. - * https://github.com/pmndrs/zustand/discussions/1937 - */ -export function useStore>, U>( - api: S, - selector: (state: ExtractState) => U, - equalityFn: ((a: U, b: U) => boolean) | undefined, -): U - export function useStore( - api: WithReact>, + api: ReadonlyStoreApi, selector: (state: TState) => StateSlice = identity as any, - equalityFn?: (a: StateSlice, b: StateSlice) => boolean, ) { - if ( - import.meta.env?.MODE !== 'production' && - equalityFn && - !didWarnAboutEqualityFn - ) { - console.warn( - "[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937", - ) - didWarnAboutEqualityFn = true - } - const slice = useSyncExternalStoreWithSelector( + const slice = useSyncExternalStore( api.subscribe, - api.getState, - api.getServerState || api.getInitialState, - selector, - equalityFn, + () => selector(api.getState()), + () => selector(api.getInitialState()), ) useDebugValue(slice) return slice } -export type UseBoundStore>> = { +export type UseBoundStore> = { (): ExtractState (selector: (state: ExtractState) => U): U - /** - * @deprecated Use `createWithEqualityFn` from 'zustand/traditional' - */ - ( - selector: (state: ExtractState) => U, - equalityFn: (a: U, b: U) => boolean, - ): U } & S type Create = { @@ -98,26 +55,12 @@ type Create = { (): ( initializer: StateCreator, ) => UseBoundStore, Mos>> - /** - * @deprecated Use `useStore` hook to bind store - */ - >(store: S): UseBoundStore } const createImpl = (createState: StateCreator) => { - if ( - import.meta.env?.MODE !== 'production' && - typeof createState !== 'function' - ) { - console.warn( - "[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.", - ) - } - const api = - typeof createState === 'function' ? createStore(createState) : createState + const api = createStore(createState) - const useBoundStore: any = (selector?: any, equalityFn?: any) => - useStore(api, selector, equalityFn) + const useBoundStore: any = (selector?: any) => useStore(api, selector) Object.assign(useBoundStore, api) @@ -126,15 +69,3 @@ const createImpl = (createState: StateCreator) => { export const create = ((createState: StateCreator | undefined) => createState ? createImpl(createState) : createImpl) as Create - -/** - * @deprecated Use `import { create } from 'zustand'` - */ -export default ((createState: any) => { - if (import.meta.env?.MODE !== 'production') { - console.warn( - "[DEPRECATED] Default export is deprecated. Instead use `import { create } from 'zustand'`.", - ) - } - return create(createState) -}) as Create diff --git a/src/react/shallow.ts b/src/react/shallow.ts index 98e62daeec..a0c4b3f0e9 100644 --- a/src/react/shallow.ts +++ b/src/react/shallow.ts @@ -1,7 +1,6 @@ -// import { useDebugValue } from 'react' +// import { useRef } from 'react' // That doesnt work in ESM, because React libs are CJS only. // The following is a workaround until ESM is supported. -// eslint-disable-next-line import/extensions import ReactExports from 'react' import { shallow } from '../vanilla/shallow.ts' @@ -14,6 +13,8 @@ export function useShallow(selector: (state: S) => U): (state: S) => U { const next = selector(state) return shallow(prev.current, next) ? (prev.current as U) - : (prev.current = next) + : // It might not work with React Compiler + // eslint-disable-next-line react-compiler/react-compiler + (prev.current = next) } } diff --git a/src/shallow.ts b/src/shallow.ts index 09e3ba5b3b..2fb316beae 100644 --- a/src/shallow.ts +++ b/src/shallow.ts @@ -1,19 +1,2 @@ -import { shallow } from './vanilla/shallow.ts' - -// We will export this in v5 and remove default export -// export { shallow } from './vanilla/shallow.ts' -// export { useShallow } from './react/shallow.ts' - -/** - * @deprecated Use `import { shallow } from 'zustand/shallow'` - */ -export default ((objA, objB) => { - if (import.meta.env?.MODE !== 'production') { - console.warn( - "[DEPRECATED] Default export is deprecated. Instead use `import { shallow } from 'zustand/shallow'`.", - ) - } - return shallow(objA, objB) -}) as typeof shallow - -export { shallow } +export { shallow } from './vanilla/shallow.ts' +export { useShallow } from './react/shallow.ts' diff --git a/src/traditional.ts b/src/traditional.ts index 0d029bcc6c..e09a69fbbc 100644 --- a/src/traditional.ts +++ b/src/traditional.ts @@ -3,7 +3,6 @@ // Those don't work in ESM, because React libs are CJS only. // See: https://github.com/pmndrs/valtio/issues/452 // The following is a workaround until ESM is supported. -// eslint-disable-next-line import/extensions import ReactExports from 'react' // eslint-disable-next-line import/extensions import useSyncExternalStoreExports from 'use-sync-external-store/shim/with-selector' @@ -25,35 +24,27 @@ type ReadonlyStoreApi = Pick< 'getState' | 'getInitialState' | 'subscribe' > -type WithReact> = S & { - /** @deprecated please use api.getInitialState() */ - getServerState?: () => ExtractState -} - const identity = (arg: T): T => arg -export function useStoreWithEqualityFn< - S extends WithReact>, ->(api: S): ExtractState +export function useStoreWithEqualityFn>( + api: S, +): ExtractState -export function useStoreWithEqualityFn< - S extends WithReact>, - U, ->( +export function useStoreWithEqualityFn, U>( api: S, selector: (state: ExtractState) => U, equalityFn?: (a: U, b: U) => boolean, ): U export function useStoreWithEqualityFn( - api: WithReact>, + api: ReadonlyStoreApi, selector: (state: TState) => StateSlice = identity as any, equalityFn?: (a: StateSlice, b: StateSlice) => boolean, ) { const slice = useSyncExternalStoreWithSelector( api.subscribe, api.getState, - api.getServerState || api.getInitialState, + api.getInitialState, selector, equalityFn, ) @@ -61,9 +52,7 @@ export function useStoreWithEqualityFn( return slice } -export type UseBoundStoreWithEqualityFn< - S extends WithReact>, -> = { +export type UseBoundStoreWithEqualityFn> = { (): ExtractState ( selector: (state: ExtractState) => U, diff --git a/src/vanilla.ts b/src/vanilla.ts index cc15d06d80..656d640620 100644 --- a/src/vanilla.ts +++ b/src/vanilla.ts @@ -1,8 +1,9 @@ type SetStateInternal = { _( partial: T | Partial | { _(state: T): T | Partial }['_'], - replace?: boolean | undefined, + replace?: false, ): void + _(state: T | { _(state: T): T }['_'], replace: true): void }['_'] export interface StoreApi { @@ -10,10 +11,6 @@ export interface StoreApi { getState: () => T getInitialState: () => T subscribe: (listener: (state: T, prevState: T) => void) => () => void - /** - * @deprecated Use `unsubscribe` returned by `subscribe` - */ - destroy: () => void } type Get = K extends keyof T ? T[K] : F @@ -92,94 +89,10 @@ const createStoreImpl: CreateStoreImpl = (createState) => { return () => listeners.delete(listener) } - const destroy: StoreApi['destroy'] = () => { - if (import.meta.env?.MODE !== 'production') { - console.warn( - '[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected.', - ) - } - listeners.clear() - } - - const api = { setState, getState, getInitialState, subscribe, destroy } + const api = { setState, getState, getInitialState, subscribe } const initialState = (state = createState(setState, getState, api)) return api as any } export const createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl) as CreateStore - -/** - * @deprecated Use `import { createStore } from 'zustand/vanilla'` - */ -export default ((createState) => { - if (import.meta.env?.MODE !== 'production') { - console.warn( - "[DEPRECATED] Default export is deprecated. Instead use import { createStore } from 'zustand/vanilla'.", - ) - } - return createStore(createState) -}) as CreateStore - -// --------------------------------------------------------- - -/** - * @deprecated Use `unknown` instead of `State` - */ -export type State = unknown - -/** - * @deprecated Use `Partial | ((s: T) => Partial)` instead of `PartialState` - */ -export type PartialState = - | Partial - | ((state: T) => Partial) - -/** - * @deprecated Use `(s: T) => U` instead of `StateSelector` - */ -export type StateSelector = (state: T) => U - -/** - * @deprecated Use `(a: T, b: T) => boolean` instead of `EqualityChecker` - */ -export type EqualityChecker = (state: T, newState: T) => boolean - -/** - * @deprecated Use `(state: T, previousState: T) => void` instead of `StateListener` - */ -export type StateListener = (state: T, previousState: T) => void - -/** - * @deprecated Use `(slice: T, previousSlice: T) => void` instead of `StateSliceListener`. - */ -export type StateSliceListener = (slice: T, previousSlice: T) => void - -/** - * @deprecated Use `(listener: (state: T) => void) => void` instead of `Subscribe`. - */ -export type Subscribe = { - (listener: (state: T, previousState: T) => void): () => void -} - -/** - * @deprecated You might be looking for `StateCreator`, if not then - * use `StoreApi['setState']` instead of `SetState`. - */ -export type SetState = { - _( - partial: T | Partial | { _(state: T): T | Partial }['_'], - replace?: boolean | undefined, - ): void -}['_'] - -/** - * @deprecated You might be looking for `StateCreator`, if not then - * use `StoreApi['getState']` instead of `GetState`. - */ -export type GetState = () => T - -/** - * @deprecated Use `StoreApi['destroy']` instead of `Destroy`. - */ -export type Destroy = () => void diff --git a/src/vanilla/shallow.ts b/src/vanilla/shallow.ts index 54741366d9..84b1c42d2f 100644 --- a/src/vanilla/shallow.ts +++ b/src/vanilla/shallow.ts @@ -1,4 +1,22 @@ -export function shallow(objA: T, objB: T) { +const isIterable = (obj: object): obj is Iterable => + Symbol.iterator in obj + +const compareMapLike = ( + iterableA: Iterable<[unknown, unknown]>, + iterableB: Iterable<[unknown, unknown]>, +) => { + const mapA = iterableA instanceof Map ? iterableA : new Map(iterableA) + const mapB = iterableB instanceof Map ? iterableB : new Map(iterableB) + if (mapA.size !== mapB.size) return false + for (const [key, value] of mapA) { + if (!Object.is(value, mapB.get(key))) { + return false + } + } + return true +} + +export function shallow(objA: T, objB: T): boolean { if (Object.is(objA, objB)) { return true } @@ -11,26 +29,30 @@ export function shallow(objA: T, objB: T) { return false } - if (objA instanceof Map && objB instanceof Map) { - if (objA.size !== objB.size) return false - - for (const [key, value] of objA) { - if (!Object.is(value, objB.get(key))) { - return false - } + if (isIterable(objA) && isIterable(objB)) { + const iteratorA = objA[Symbol.iterator]() + const iteratorB = objB[Symbol.iterator]() + let nextA = iteratorA.next() + let nextB = iteratorB.next() + if ( + Array.isArray(nextA.value) && + Array.isArray(nextB.value) && + nextA.value.length === 2 && + nextB.value.length === 2 + ) { + return compareMapLike( + objA as Iterable<[unknown, unknown]>, + objB as Iterable<[unknown, unknown]>, + ) } - return true - } - - if (objA instanceof Set && objB instanceof Set) { - if (objA.size !== objB.size) return false - - for (const value of objA) { - if (!objB.has(value)) { + while (!nextA.done && !nextB.done) { + if (!Object.is(nextA.value, nextB.value)) { return false } + nextA = iteratorA.next() + nextB = iteratorB.next() } - return true + return !!nextA.done && !!nextB.done } const keysA = Object.keys(objA) @@ -39,7 +61,7 @@ export function shallow(objA: T, objB: T) { } for (const keyA of keysA) { if ( - !Object.prototype.hasOwnProperty.call(objB, keyA as string) || + !Object.hasOwn(objB, keyA as string) || !Object.is(objA[keyA as keyof T], objB[keyA as keyof T]) ) { return false diff --git a/tests/basic.test.tsx b/tests/basic.test.tsx index 0c34d4bcfa..0496b5ee9d 100644 --- a/tests/basic.test.tsx +++ b/tests/basic.test.tsx @@ -30,7 +30,6 @@ it('creates a store hook and api object', () => { [Function], [Function], { - "destroy": [Function], "getInitialState": [Function], "getState": [Function], "setState": [Function], @@ -473,23 +472,47 @@ it('can set the store without merging', () => { expect(getState()).toEqual({ b: 2 }) }) -it('can destroy the store', () => { - const { destroy, getState, setState, subscribe } = create(() => ({ - value: 1, - })) +it('only calls selectors when necessary with static selector', async () => { + type State = { a: number; b: number } + const useBoundStore = createWithEqualityFn(() => ({ a: 0, b: 0 })) + const { setState } = useBoundStore + let staticSelectorCallCount = 0 - subscribe(() => { - throw new Error('did not clear listener on destroy') - }) - destroy() + function staticSelector(s: State) { + staticSelectorCallCount++ + return s.a + } + + function Component() { + useBoundStore(staticSelector) + return ( + <> +
static: {staticSelectorCallCount}
+ + ) + } + + const { rerender, findByText } = render( + <> + + , + ) + await findByText('static: 1') + + rerender( + <> + + , + ) + await findByText('static: 1') - setState({ value: 2 }) - expect(getState().value).toEqual(2) + act(() => setState({ a: 1, b: 1 })) + await findByText('static: 2') }) -it('only calls selectors when necessary', async () => { +it('only calls selectors when necessary (traditional)', async () => { type State = { a: number; b: number } - const useBoundStore = create(() => ({ a: 0, b: 0 })) + const useBoundStore = createWithEqualityFn(() => ({ a: 0, b: 0 })) const { setState } = useBoundStore let inlineSelectorCallCount = 0 let staticSelectorCallCount = 0 @@ -695,3 +718,20 @@ it('works with non-object state', async () => { fireEvent.click(getByText('button')) await findByText('count: 2') }) + +it('works with "undefined" state', async () => { + const useUndefined = create(() => undefined) + + const Component = () => { + const str = useUndefined((v) => v || 'undefined') + return
str: {str}
+ } + + const { findByText } = render( + + + , + ) + + await findByText('str: undefined') +}) diff --git a/tests/context.test.tsx b/tests/context.test.tsx deleted file mode 100644 index 7a07e0e92e..0000000000 --- a/tests/context.test.tsx +++ /dev/null @@ -1,174 +0,0 @@ -import { - Component as ClassComponent, - StrictMode, - useCallback, - useEffect, - useState, -} from 'react' -import type { ReactNode } from 'react' -import { render } from '@testing-library/react' -import { afterEach, it, vi } from 'vitest' -import { create } from 'zustand' -import type { StoreApi } from 'zustand' -import createContext from 'zustand/context' -import { subscribeWithSelector } from 'zustand/middleware' - -const consoleError = console.error -afterEach(() => { - console.error = consoleError -}) - -type CounterState = { - count: number - inc: () => void -} - -it('creates and uses context store', async () => { - const { Provider, useStore } = createContext>() - - const createStore = () => - create((set) => ({ - count: 0, - inc: () => set((state) => ({ count: state.count + 1 })), - })) - - function Counter() { - const { count, inc } = useStore() - useEffect(inc, [inc]) - return
count: {count * 1}
- } - - const { findByText } = render( - <> - - - - , - ) - - await findByText('count: 1') -}) - -it('uses context store with selectors', async () => { - const { Provider, useStore } = createContext>() - - const createStore = () => - create((set) => ({ - count: 0, - inc: () => set((state) => ({ count: state.count + 1 })), - })) - - function Counter() { - const count = useStore((state) => state.count) - const inc = useStore((state) => state.inc) - useEffect(inc, [inc]) - return
count: {count * 1}
- } - - const { findByText } = render( - <> - - - - , - ) - - await findByText('count: 1') -}) - -it('uses context store api', async () => { - const createStore = () => - create()( - subscribeWithSelector((set) => ({ - count: 0, - inc: () => set((state) => ({ count: state.count + 1 })), - })), - ) - - type CustomStore = ReturnType - const { Provider, useStoreApi } = createContext() - - function Counter() { - const storeApi = useStoreApi() - const [count, setCount] = useState(0) - useEffect( - () => - storeApi.subscribe( - (state) => state.count, - () => setCount(storeApi.getState().count), - ), - [storeApi], - ) - useEffect(() => { - storeApi.setState({ count: storeApi.getState().count + 1 }) - }, [storeApi]) - useEffect(() => { - if (count === 1) { - storeApi.destroy() - storeApi.setState({ count: storeApi.getState().count + 1 }) - } - }, [storeApi, count]) - return
count: {count * 1}
- } - - const { findByText } = render( - <> - - - - , - ) - - await findByText('count: 1') -}) - -it('throws error when not using provider', async () => { - console.error = vi.fn() - - class ErrorBoundary extends ClassComponent< - { children?: ReactNode | undefined }, - { hasError: boolean } - > { - constructor(props: { children?: ReactNode | undefined }) { - super(props) - this.state = { hasError: false } - } - static getDerivedStateFromError() { - return { hasError: true } - } - render() { - return this.state.hasError ?
errored
: this.props.children - } - } - - const { useStore } = createContext>() - function Component() { - useStore() - return
no error
- } - - const { findByText } = render( - - - - - , - ) - await findByText('errored') -}) - -it('useCallback with useStore infers types correctly', async () => { - const { useStore } = createContext>() - function _Counter() { - const _x = useStore(useCallback((state) => state.count, [])) - expectAreTypesEqual().toBe(true) - } -}) - -const expectAreTypesEqual = () => ({ - toBe: ( - _: (() => T extends B ? 1 : 0) extends () => T extends A ? 1 : 0 - ? true - : false, - ) => {}, -}) diff --git a/tests/devtools.test.tsx b/tests/devtools.test.tsx index 84ca2b2d52..ccc856afbd 100644 --- a/tests/devtools.test.tsx +++ b/tests/devtools.test.tsx @@ -1,4 +1,5 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' +import type { Mock } from 'vitest' import { devtools, redux } from 'zustand/middleware' import { createStore } from 'zustand/vanilla' import type { StoreApi } from 'zustand/vanilla' @@ -17,12 +18,12 @@ type TupleOfEqualLength = number extends Arr['length'] type Connection = { subscribers: ((message: unknown) => void)[] api: { - subscribe: any - unsubscribe: any - send: any - init: any - error: any - dispatch?: any + subscribe: Mock + unsubscribe: Mock + send: Mock + init: Mock + error: Mock + dispatch?: Mock } } const namedConnections = new Map() @@ -150,25 +151,10 @@ describe('If there is no extension installed...', () => { }).not.toThrow() }) - it('does not warn if not enabled', async () => { + it('does not warn', async () => { createStore(devtools(() => ({ count: 0 }))) expect(console.warn).not.toBeCalled() }) - - it('[DEV-ONLY] warns if enabled in dev mode', async () => { - createStore(devtools(() => ({ count: 0 }), { enabled: true })) - expect(console.warn).toBeCalled() - }) - - it.skip('[PRD-ONLY] does not warn if not in dev env', async () => { - createStore(devtools(() => ({ count: 0 }))) - expect(console.warn).not.toBeCalled() - }) - - it.skip('[PRD-ONLY] does not warn if not in dev env even if enabled', async () => { - createStore(devtools(() => ({ count: 0 }), { enabled: true })) - expect(console.warn).not.toBeCalled() - }) }) describe('When state changes...', () => { @@ -690,7 +676,7 @@ it('preserves isRecording after setting from devtools', async () => { /* features: * [] if name is undefined - use multiple devtools connections. * [] if name and store is defined - use connection for specific 'name'. - * [] if two stores are coonected to one 'name' group and. + * [] if two stores are connected to one 'name' group and. * another connected to another 'name' group, then feature should work * [] check actions with this feature, for multiple stores that store prefixes are added - * [] - reset @@ -732,9 +718,7 @@ describe('when redux connection was called on multiple stores with `name` undefi }) describe('when `store` property was provided in `devtools` call in options', () => { - // FIXME: Run this test separately in CI, until we're able to test modules in isolation i.e. use jest.resetModule and re-import modules in each test - // Relevant issues https://github.com/nodejs/node/issues/35889 - it('[CI-MATRIX-1] should create single connection for all indernal calls of .connect and `store` is not passed to .connect', async () => { + it('should create single connection for all internal calls of .connect and `store` is not passed to .connect', async () => { const { devtools: newDevtools } = await import('zustand/middleware') const options1 = { store: 'store1123', foo: 'bar1' } @@ -755,9 +739,7 @@ describe('when redux connection was called on multiple stores with `name` undefi }) }) - // FIXME: Run this test separately in CI, until we're able to test modules in isolation i.e. use jest.resetModule and re-import modules in each test - // Relevant issues https://github.com/nodejs/node/issues/35889 - it('[CI-MATRIX-2] should call `.init` on single connection with combined states after each `create(devtools` call', async () => { + it('should call `.init` on single connection with combined states after each `create(devtools` call', async () => { const { devtools: newDevtools } = await import('zustand/middleware') const options1 = { store: 'store12' } @@ -851,9 +833,7 @@ describe('when redux connection was called on multiple stores with `name` provid }) }) - // FIXME: Run this test separately in CI, until we're able to test modules in isolation i.e. use jest.resetModule and re-import modules in each test - // Relevant issues https://github.com/nodejs/node/issues/35889 - it('[CI-MATRIX-3] should call `.init` on single connection with combined states after each `create(devtools` call', async () => { + it('should call `.init` on single connection with combined states after each `create(devtools` call', async () => { const { devtools: newDevtools } = await import('zustand/middleware') const connectionNameGroup1 = 'test1' const connectionNameGroup2 = 'test2' @@ -2364,9 +2344,7 @@ describe('when create devtools was called multiple times with `name` and `store` console.error = originalConsoleError }) - // FIXME: Run this test separately in CI, until we're able to test modules in isolation i.e. use jest.resetModule and re-import modules in each test - // Relevant issues https://github.com/nodejs/node/issues/35889 - it('[CI-MATRIX-4] does nothing even if there is `api.dispatch`, connections isolated from each other', async () => { + it('does nothing even if there is `api.dispatch`, connections isolated from each other', async () => { const { devtools: newDevtools } = await import('zustand/middleware') const name1 = 'name1' @@ -2414,9 +2392,7 @@ describe('when create devtools was called multiple times with `name` and `store` expect((api2 as any).dispatch).not.toBeCalled() }) - // FIXME: Run this test separately in CI, until we're able to test modules in isolation i.e. use jest.resetModule and re-import modules in each test - // Relevant issues https://github.com/nodejs/node/issues/35889 - it('[CI-MATRIX-5] dispatches with `api.dispatch` when `api.dispatchFromDevtools` is set to true, connections are isolated from each other', async () => { + it('dispatches with `api.dispatch` when `api.dispatchFromDevtools` is set to true, connections are isolated from each other', async () => { const { devtools: newDevtools } = await import('zustand/middleware') const name1 = 'name1' const name2 = 'name2' diff --git a/tests/ssr.test.tsx b/tests/ssr.test.tsx index 9285aa2abd..0343fd789c 100644 --- a/tests/ssr.test.tsx +++ b/tests/ssr.test.tsx @@ -19,11 +19,9 @@ const useBearStore = create((set) => ({ })) function Counter() { - const { bears, increasePopulation } = useBearStore( - ({ bears, increasePopulation }) => ({ - bears, - increasePopulation, - }), + const bears = useBearStore(({ bears }) => bears) + const increasePopulation = useBearStore( + ({ increasePopulation }) => increasePopulation, ) useEffect(() => { @@ -37,7 +35,10 @@ describe.skipIf(!React.version.startsWith('18'))( 'ssr behavior with react 18', () => { it('should handle different states between server and client correctly', async () => { - const { hydrateRoot }: any = await vi.importActual('react-dom/client') + const { hydrateRoot } = + await vi.importActual( + 'react-dom/client', + ) const markup = renderToString( Loading...}> @@ -69,7 +70,10 @@ describe.skipIf(!React.version.startsWith('18'))( bears: 0, })) - const { hydrateRoot }: any = await vi.importActual('react-dom/client') + const { hydrateRoot } = + await vi.importActual( + 'react-dom/client', + ) const Component = () => { const bears = useStore((state) => state.bears) diff --git a/tests/types.test.tsx b/tests/types.test.tsx index 0b8db94877..08c98a1265 100644 --- a/tests/types.test.tsx +++ b/tests/types.test.tsx @@ -79,7 +79,6 @@ it('can use exposed types', () => { _stateSelector: (state: ExampleState) => number, _storeApi: StoreApi, _subscribe: StoreApi['subscribe'], - _destroy: StoreApi['destroy'], _equalityFn: (a: ExampleState, b: ExampleState) => boolean, _stateCreator: StateCreator, _useBoundStore: UseBoundStore>, @@ -96,7 +95,6 @@ it('can use exposed types', () => { selector, storeApi, storeApi.subscribe, - storeApi.destroy, equalityFn, stateCreator, useBoundStore, @@ -114,9 +112,9 @@ it('should have correct (partial) types for setState', () => { const store = create((set) => ({ count: 0, - // @ts-expect-error we shouldn't be able to set count to undefined [LATEST-TS-ONLY] + // @ts-expect-error we shouldn't be able to set count to undefined a: () => set(() => ({ count: undefined })), - // @ts-expect-error we shouldn't be able to set count to undefined [LATEST-TS-ONLY] + // @ts-expect-error we shouldn't be able to set count to undefined b: () => set({ count: undefined }), c: () => set({ count: 1 }), })) @@ -132,9 +130,9 @@ it('should have correct (partial) types for setState', () => { store.setState({}) store.setState((previous) => previous) - // @ts-expect-error type undefined is not assignable to type number [LATEST-TS-ONLY] + // @ts-expect-error type undefined is not assignable to type number store.setState({ count: undefined }) - // @ts-expect-error type undefined is not assignable to type number [LATEST-TS-ONLY] + // @ts-expect-error type undefined is not assignable to type number store.setState((state) => ({ ...state, count: undefined })) }) diff --git a/tests/vanilla/basic.test.ts b/tests/vanilla/basic.test.ts index e586860473..787e95d1d9 100644 --- a/tests/vanilla/basic.test.ts +++ b/tests/vanilla/basic.test.ts @@ -22,7 +22,6 @@ it('create a store', () => { [Function], [Function], { - "destroy": [Function], "getInitialState": [Function], "getState": [Function], "setState": [Function], @@ -30,7 +29,6 @@ it('create a store', () => { }, ], "result": { - "destroy": [Function], "getInitialState": [Function], "getState": [Function], "setState": [Function], @@ -140,17 +138,3 @@ it('works with non-object state', () => { expect(store.getState()).toBe(2) }) - -it('can destroy the store', () => { - const { destroy, getState, setState, subscribe } = createStore(() => ({ - value: 1, - })) - - subscribe(() => { - throw new Error('did not clear listener on destroy') - }) - destroy() - - setState({ value: 2 }) - expect(getState().value).toEqual(2) -}) diff --git a/tests/vanilla/shallow.test.tsx b/tests/vanilla/shallow.test.tsx index 7587375ae7..07f0561ed5 100644 --- a/tests/vanilla/shallow.test.tsx +++ b/tests/vanilla/shallow.test.tsx @@ -91,6 +91,12 @@ describe('shallow', () => { expect(shallow(firstFnCompare, secondFnCompare)).toBe(false) }) + + it('compares URLSearchParams', () => { + const a = new URLSearchParams({ hello: 'world' }) + const b = new URLSearchParams({ zustand: 'shallow' }) + expect(shallow(a, b)).toBe(false) + }) }) describe('unsupported cases', () => {