mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
chore(deps): update dev dependencies (#2093)
* chore(deps): update dev dependencies * run prettier * fix tsconfig * fix workflow file
This commit is contained in:
parent
3cbd468fe5
commit
0504d4376a
4
.github/workflows/test-multiple-versions.yml
vendored
4
.github/workflows/test-multiple-versions.yml
vendored
@ -33,8 +33,8 @@ jobs:
|
||||
- 18.0.0
|
||||
- 18.1.0
|
||||
- 18.2.0
|
||||
- 18.3.0-canary-997f52fbb-20230803
|
||||
- 0.0.0-experimental-997f52fbb-20230803
|
||||
- 18.3.0-canary-d900fadbf-20230929
|
||||
- 0.0.0-experimental-d900fadbf-20230929
|
||||
devtools-skip:
|
||||
- CI-MATRIX-NOSKIP
|
||||
include:
|
||||
|
||||
2
.github/workflows/test-old-typescript.yml
vendored
2
.github/workflows/test-old-typescript.yml
vendored
@ -38,7 +38,7 @@ jobs:
|
||||
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": "nodenext",/"moduleResolution": "node",/' 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
|
||||
sed -i~ 's/"zustand\/\*": \["\.\/src\/\*\.ts"\]/"zustand\/*": [".\/dist\/*.d.ts"]/' tsconfig.json
|
||||
|
||||
@ -73,7 +73,7 @@ const { create: actualCreate, createStore: actualCreateStore } =
|
||||
export const storeResetFns = new Set<() => void>()
|
||||
|
||||
// when creating a store, we get its initial state, create a reset function and add it in the set
|
||||
export const create = (<T,>() => {
|
||||
export const create = (<T>() => {
|
||||
console.log('zustand create mock')
|
||||
|
||||
return (stateCreator: zustand.StateCreator<T>) => {
|
||||
@ -87,7 +87,7 @@ export const create = (<T,>() => {
|
||||
}) as typeof zustand.create
|
||||
|
||||
// when creating a store, we get its initial state, create a reset function and add it in the set
|
||||
export const createStore = (<T,>(stateCreator: zustand.StateCreator<T>) => {
|
||||
export const createStore = (<T>(stateCreator: zustand.StateCreator<T>) => {
|
||||
console.log('zustand createStore mock')
|
||||
|
||||
const store = actualCreateStore(stateCreator)
|
||||
@ -144,7 +144,7 @@ const { create: actualCreate, createStore: actualCreateStore } =
|
||||
export const storeResetFns = new Set<() => void>()
|
||||
|
||||
// when creating a store, we get its initial state, create a reset function and add it in the set
|
||||
export const create = (<T,>() => {
|
||||
export const create = (<T>() => {
|
||||
console.log('zustand create mock')
|
||||
|
||||
return (stateCreator: zustand.StateCreator<T>) => {
|
||||
@ -158,7 +158,7 @@ export const create = (<T,>() => {
|
||||
}) as typeof zustand.create
|
||||
|
||||
// when creating a store, we get its initial state, create a reset function and add it in the set
|
||||
export const createStore = (<T,>(stateCreator: zustand.StateCreator<T>) => {
|
||||
export const createStore = (<T>(stateCreator: zustand.StateCreator<T>) => {
|
||||
console.log('zustand createStore mock')
|
||||
|
||||
const store = actualCreateStore(stateCreator)
|
||||
|
||||
50
package.json
50
package.json
@ -144,50 +144,50 @@
|
||||
"use-sync-external-store": "1.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.22.9",
|
||||
"@babel/core": "^7.23.0",
|
||||
"@babel/plugin-external-helpers": "^7.22.5",
|
||||
"@babel/plugin-transform-react-jsx": "^7.22.5",
|
||||
"@babel/plugin-transform-runtime": "^7.22.9",
|
||||
"@babel/plugin-transform-typescript": "^7.22.9",
|
||||
"@babel/preset-env": "^7.22.9",
|
||||
"@babel/plugin-transform-react-jsx": "^7.22.15",
|
||||
"@babel/plugin-transform-runtime": "^7.22.15",
|
||||
"@babel/plugin-transform-typescript": "^7.22.15",
|
||||
"@babel/preset-env": "^7.22.20",
|
||||
"@redux-devtools/extension": "^3.2.5",
|
||||
"@rollup/plugin-alias": "^5.0.0",
|
||||
"@rollup/plugin-babel": "^6.0.3",
|
||||
"@rollup/plugin-node-resolve": "^15.1.0",
|
||||
"@rollup/plugin-node-resolve": "^15.2.1",
|
||||
"@rollup/plugin-replace": "^5.0.2",
|
||||
"@rollup/plugin-terser": "^0.4.3",
|
||||
"@rollup/plugin-typescript": "^11.1.2",
|
||||
"@rollup/plugin-typescript": "^11.1.4",
|
||||
"@testing-library/react": "^14.0.0",
|
||||
"@types/react": "^18.2.18",
|
||||
"@types/react-dom": "^18.2.7",
|
||||
"@types/use-sync-external-store": "^0.0.3",
|
||||
"@typescript-eslint/eslint-plugin": "^6.2.1",
|
||||
"@typescript-eslint/parser": "^6.2.1",
|
||||
"@types/react": "^18.2.24",
|
||||
"@types/react-dom": "^18.2.8",
|
||||
"@types/use-sync-external-store": "^0.0.4",
|
||||
"@typescript-eslint/eslint-plugin": "^6.7.3",
|
||||
"@typescript-eslint/parser": "^6.7.3",
|
||||
"@vitest/coverage-c8": "^0.33.0",
|
||||
"@vitest/ui": "^0.34.1",
|
||||
"concurrently": "^8.2.0",
|
||||
"@vitest/ui": "^0.34.6",
|
||||
"concurrently": "^8.2.1",
|
||||
"downlevel-dts": "^0.11.0",
|
||||
"esbuild": "^0.18.18",
|
||||
"eslint": "^8.46.0",
|
||||
"esbuild": "^0.19.4",
|
||||
"eslint": "^8.50.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-import-resolver-alias": "^1.1.2",
|
||||
"eslint-plugin-import": "^2.28.0",
|
||||
"eslint-plugin-import": "^2.28.1",
|
||||
"eslint-plugin-prettier": "^5.0.0",
|
||||
"eslint-plugin-react": "^7.33.1",
|
||||
"eslint-plugin-react": "^7.33.2",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"eslint-plugin-vitest": "^0.2.8",
|
||||
"immer": "^10.0.2",
|
||||
"eslint-plugin-vitest": "^0.3.1",
|
||||
"immer": "^10.0.3",
|
||||
"jsdom": "^22.1.0",
|
||||
"json": "^11.0.0",
|
||||
"prettier": "^3.0.1",
|
||||
"prettier": "^3.0.3",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"redux": "5.0.0-alpha.1",
|
||||
"rollup": "^3.27.2",
|
||||
"rollup-plugin-esbuild": "^5.0.0",
|
||||
"rollup": "^3.29.4",
|
||||
"rollup-plugin-esbuild": "^6.0.2",
|
||||
"shx": "^0.3.4",
|
||||
"typescript": "^5.1.6",
|
||||
"vitest": "^0.34.1"
|
||||
"typescript": "^5.2.2",
|
||||
"vitest": "^0.34.6"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"immer": ">=9.0",
|
||||
|
||||
@ -37,9 +37,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 } = await vi.importActual<
|
||||
typeof import('react-dom/client')
|
||||
>('react-dom/client')
|
||||
const { hydrateRoot } =
|
||||
await vi.importActual<typeof import('react-dom/client')>(
|
||||
'react-dom/client'
|
||||
)
|
||||
|
||||
const markup = renderToString(
|
||||
<React.Suspense fallback={<div>Loading...</div>}>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"jsx": "react-jsx",
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "nodenext",
|
||||
"moduleResolution": "bundler",
|
||||
"skipLibCheck": true /* FIXME remove this once redux fixes it */,
|
||||
"allowImportingTsExtensions": true,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user