mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
* prepare for the next major version * [v5] breaking: drop default exports (#2238) * fix: drop default exports for v5 * chore: remove default from cjs build * refactor: export shallow in v5 * fix: remove `addModuleExport` option for cjs. * [v5] breaking: drop deprecated features (#2235) * fix: remove deprecated v4 features * chore(build): remove context * docs(typescript): remove deprecated equals api * docs(persist): remove old persist api * chore: run yarn prettier on typescript docs * Discard changes to docs/guides/typescript.md * Discard changes to docs/integrations/persisting-store-data.md * Discard changes to tests/shallow.test.tsx * Discard changes to tests/vanilla/subscribe.test.tsx * [v5] breaking: make React 18 as minimal requirement (#2236) * fix: update package.json to require react 18+ * chore: update github actions to test on react 18+ * chore: remove devtools-skip hack from actions * chore(test): remove CI-SKIP from devtools tests * [v5] breaking: make use-sync-external-store an optional peer dependency (#2237) * chore: make use-sync-external-store optional peerDep * fix: use correct versions in package.json * [v5] breaking: require TypeScript 4.5 and update tests (#2257) * breaking(types): TS requirement * wip: latest only * wip: latest only 2 * drop ts <4.4 * wip: do not skip lib checkes * use latest node types * drop ts 4.4 * [v5]: drop "module" condition (#2270) * Update package json in order to remove module * Update rollup config in order to remove module config * Update patch esm script * Update package json to general exports and update node version (#2272) * [v5]: drop UMD/SystemJS builds (#2287) * Update rollup config in order to drop system js and umd builds * Update packages * Clean up files * Update rollup config * Update gh workflows * Minor fixes * Minor fixes * Minor fixes * Minor fixes * Testing * Minor changes * Minor fixes * remove `WithReact` type (#2300) * 5.0.0-alpha.0 * [v5]: do not depend on use-sync-external-store (#2301) * [v5]: do not depend on use-sync-external-store * memo get(server)snapshot * 5.0.0-alpha.1 * [v5]: refactor useMemoSelector (#2302) * [v5]: refactor useMemoSelector * add a test * Revert "[v5]: refactor useMemoSelector" This reverts commit b3c8b15586a270d12c335e566975021adf86c815. * Revert "Revert "[v5]: refactor useMemoSelector"" This reverts commit 3c47301d23e18dffb7d72df36595f83570d15d08. * [v5]: separate react entry point (#2303) * 5.0.0-alpha.2 * 5.0.0-alpha.3 * refactor: Switch to Object.hasOwn (#2365) * [v5] drop es5 (#2380) * update yarn lock * 5.0.0-alpha.4 * [v5]: follow React "standard" way with breaking behavioral change (#2395) * [v5]: follow React "standard" way with breaking behavioral change * add test * 5.0.0-alpha.5 * [v5] Rewrite shallow to support iterables (#2427) * [v5] fix rollup config for cjs (#2433) * 5.0.0-alpha.6 * no production build test * recover types that are dropped in #2462 * remove unused replacement * [v5] Remove Devtools warning (#2466) * chore: remove devtools extension warning * docs: add devtools link to readme * chore: remove unused test * chrome: remove unused tests * chore: remove unused test * Revert "chore: remove unused test" This reverts commit 0fa2a75f4936d960f703bf19e8f3505962cd628e. * update test name * update pnpm lock * fix merge main * add migration guide * fix typos * 5.0.0-beta.0 * update migration doc * fix merge main * fix merge main (prettier) * 5.0.0-beta.1 * fix(types)!: require complete state if `setState`'s `replace` flag is set (#2580) * fix(types): require complete state if `setState`'s `replace` flag is set * switch to variant 2 * fix type errors * update setState types for devtools and immer * make devtools setState non-generic * add migration guide * merge migration guides * run prettier * Update tests/middlewareTypes.test.tsx --------- Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com> Co-authored-by: daishi <daishi@axlight.com> * 5.0.0-beta.2 * move v5 migration doc * fix ci * missing commmit * remove unused rule exclusion * comment about react compiler * revert eslint config --------- Co-authored-by: Charles Kornoelje <33156025+charkour@users.noreply.github.com> Co-authored-by: Danilo Britto <dbritto.dev@gmail.com> Co-authored-by: Ekin Dursun <ekindursun@gmail.com> Co-authored-by: Simon Farshid <simon.farshid@outlook.com>
173 lines
5.7 KiB
JSON
173 lines
5.7 KiB
JSON
{
|
|
"name": "zustand",
|
|
"description": "🐻 Bear necessities for state management in React",
|
|
"private": true,
|
|
"type": "commonjs",
|
|
"version": "5.0.0-beta.2",
|
|
"publishConfig": {
|
|
"tag": "next"
|
|
},
|
|
"main": "./index.js",
|
|
"types": "./index.d.ts",
|
|
"typesVersions": {
|
|
">=4.5": {
|
|
"esm/*": [
|
|
"esm/*"
|
|
],
|
|
"*": [
|
|
"*"
|
|
]
|
|
},
|
|
"*": {
|
|
"esm/*": [
|
|
"ts_version_4.5_and_above_is_required.d.ts"
|
|
],
|
|
"*": [
|
|
"ts_version_4.5_and_above_is_required.d.ts"
|
|
]
|
|
}
|
|
},
|
|
"exports": {
|
|
"./package.json": "./package.json",
|
|
".": {
|
|
"import": {
|
|
"types": "./esm/index.d.mts",
|
|
"default": "./esm/index.mjs"
|
|
},
|
|
"default": {
|
|
"types": "./index.d.ts",
|
|
"default": "./index.js"
|
|
}
|
|
},
|
|
"./*": {
|
|
"import": {
|
|
"types": "./esm/*.d.mts",
|
|
"default": "./esm/*.mjs"
|
|
},
|
|
"default": {
|
|
"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",
|
|
"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:.*/'",
|
|
"test:format": "prettier '*.{js,json,md}' '{examples,src,tests,docs}/**/*.{js,jsx,ts,tsx,md,mdx}' --list-different",
|
|
"test:types": "tsc --noEmit",
|
|
"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} && 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.20.0"
|
|
},
|
|
"prettier": {
|
|
"semi": false,
|
|
"singleQuote": true
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/pmndrs/zustand.git"
|
|
},
|
|
"keywords": [
|
|
"react",
|
|
"state",
|
|
"manager",
|
|
"management",
|
|
"redux",
|
|
"store"
|
|
],
|
|
"author": "Paul Henschel",
|
|
"contributors": [
|
|
"Jeremy Holcomb (https://github.com/JeremyRH)",
|
|
"Daishi Kato (https://github.com/dai-shi)"
|
|
],
|
|
"license": "MIT",
|
|
"bugs": {
|
|
"url": "https://github.com/pmndrs/zustand/issues"
|
|
},
|
|
"homepage": "https://github.com/pmndrs/zustand",
|
|
"packageManager": "pnpm@8.15.0",
|
|
"devDependencies": {
|
|
"@redux-devtools/extension": "^3.3.0",
|
|
"@rollup/plugin-alias": "^5.1.0",
|
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
"@rollup/plugin-replace": "^5.0.7",
|
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
"@testing-library/react": "^16.0.0",
|
|
"@types/node": "^22.3.0",
|
|
"@types/react": "^18.3.3",
|
|
"@types/react-dom": "^18.3.0",
|
|
"@types/use-sync-external-store": "^0.0.6",
|
|
"@typescript-eslint/eslint-plugin": "^8.1.0",
|
|
"@typescript-eslint/parser": "^8.1.0",
|
|
"@vitest/coverage-v8": "^2.0.5",
|
|
"@vitest/ui": "^2.0.5",
|
|
"esbuild": "^0.23.0",
|
|
"eslint": "8.57.0",
|
|
"eslint-config-prettier": "^9.1.0",
|
|
"eslint-import-resolver-alias": "^1.1.2",
|
|
"eslint-plugin-import": "^2.29.1",
|
|
"eslint-plugin-prettier": "^5.2.1",
|
|
"eslint-plugin-react": "^7.35.0",
|
|
"eslint-plugin-react-compiler": "0.0.0-experimental-2eea4a6-20240814",
|
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
"eslint-plugin-vitest": "^0.5.4",
|
|
"immer": "^10.1.1",
|
|
"jsdom": "^24.1.1",
|
|
"json": "^11.0.0",
|
|
"prettier": "^3.3.3",
|
|
"react": "19.0.0-rc.0",
|
|
"react-dom": "19.0.0-rc.0",
|
|
"redux": "^5.0.1",
|
|
"rollup": "^4.20.0",
|
|
"rollup-plugin-esbuild": "^6.1.1",
|
|
"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": ">=18.0.0",
|
|
"immer": ">=9.0.6",
|
|
"react": ">=18.0.0",
|
|
"use-sync-external-store": ">=1.2.0"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"@types/react": {
|
|
"optional": true
|
|
},
|
|
"immer": {
|
|
"optional": true
|
|
},
|
|
"react": {
|
|
"optional": true
|
|
},
|
|
"use-sync-external-store": {
|
|
"optional": true
|
|
}
|
|
}
|
|
}
|