mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
173 lines
5.8 KiB
JSON
173 lines
5.8 KiB
JSON
{
|
|
"name": "zustand",
|
|
"description": "🐻 Bear necessities for state management in React",
|
|
"private": true,
|
|
"type": "commonjs",
|
|
"version": "5.0.2",
|
|
"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.1",
|
|
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
"@rollup/plugin-replace": "^6.0.1",
|
|
"@rollup/plugin-typescript": "^12.1.1",
|
|
"@testing-library/jest-dom": "^6.6.3",
|
|
"@testing-library/react": "^16.0.1",
|
|
"@types/node": "^22.10.1",
|
|
"@types/react": "^18.3.12",
|
|
"@types/react-dom": "^18.3.1",
|
|
"@types/use-sync-external-store": "^0.0.6",
|
|
"@typescript-eslint/eslint-plugin": "^8.17.0",
|
|
"@typescript-eslint/parser": "^8.17.0",
|
|
"@vitest/coverage-v8": "^2.1.8",
|
|
"@vitest/eslint-plugin": "^1.1.14",
|
|
"@vitest/ui": "^2.1.8",
|
|
"esbuild": "^0.24.0",
|
|
"eslint": "8.57.0",
|
|
"eslint-config-prettier": "^9.1.0",
|
|
"eslint-import-resolver-alias": "^1.1.2",
|
|
"eslint-plugin-import": "^2.31.0",
|
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
"eslint-plugin-prettier": "^5.2.1",
|
|
"eslint-plugin-react": "^7.37.2",
|
|
"eslint-plugin-react-compiler": "19.0.0-beta-df7b47d-20241124",
|
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
"eslint-plugin-testing-library": "^7.0.0",
|
|
"immer": "^10.1.1",
|
|
"jsdom": "^25.0.1",
|
|
"json": "^11.0.0",
|
|
"prettier": "^3.4.2",
|
|
"react": "19.0.0-rc.1",
|
|
"react-dom": "19.0.0-rc.1",
|
|
"redux": "^5.0.1",
|
|
"rollup": "^4.28.0",
|
|
"rollup-plugin-esbuild": "^6.1.1",
|
|
"shelljs": "^0.8.5",
|
|
"shx": "^0.3.4",
|
|
"typescript": "^5.7.2",
|
|
"use-sync-external-store": "^1.2.2",
|
|
"vitest": "^2.1.8"
|
|
},
|
|
"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
|
|
}
|
|
}
|
|
}
|