Skip to content

Commit

Permalink
chore: make use-sync-external-store optional peerDep
Browse files Browse the repository at this point in the history
  • Loading branch information
charkour committed Dec 9, 2023
1 parent 39928ef commit 47818ae
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,6 @@
"url": "https://github.com/pmndrs/zustand/issues"
},
"homepage": "https://github.com/pmndrs/zustand",
"dependencies": {
"use-sync-external-store": "1.2.0"
},
"devDependencies": {
"@babel/core": "^7.23.3",
"@babel/plugin-external-helpers": "^7.23.3",
Expand Down Expand Up @@ -251,22 +248,27 @@
"rollup-plugin-esbuild": "^6.1.0",
"shx": "^0.3.4",
"typescript": "^5.3.2",
"use-sync-external-store": "^1.2.0",
"vitest": "^0.34.6"
},
"peerDependencies": {
"immer": ">=9.0",
"@types/react": ">=16.8",
"react": ">=16.8"
"immer": ">=9.0",
"react": ">=16.8",
"use-sync-external-store": ">=1.2.0"
},
"peerDependenciesMeta": {
"immer": {
"@types/react": {
"optional": true
},
"@types/react": {
"immer": {
"optional": true
},
"react": {
"optional": true
},
"use-sync-external-store": {
"optional": true
}
},
"resolutions": {
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,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(?!(\\.|/))'],
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4797,7 +4797,7 @@ url-parse@^1.5.3:
querystringify "^2.1.1"
requires-port "^1.0.0"

use-sync-external-store@1.2.0:
use-sync-external-store@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a"
integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==
Expand Down

0 comments on commit 47818ae

Please sign in to comment.