Skip to content

Commit

Permalink
chore(deps): update dev dependencies (pmndrs#1965)
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi authored Aug 1, 2023
1 parent a2ad770 commit 5777a65
Show file tree
Hide file tree
Showing 15 changed files with 955 additions and 815 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"import/extensions": ["error", "always"],
"import/no-unresolved": ["error", { "commonjs": true, "amd": true }],
"import/export": "error",
"@typescript-eslint/no-duplicate-imports": ["error"],
"import/no-duplicates": ["error"],
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-multiple-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
- 18.0.0
- 18.1.0
- 18.2.0
- 18.3.0-canary-53ac21937-20230703
- 0.0.0-experimental-53ac21937-20230703
- 18.3.0-canary-493f72b0a-20230727
- 0.0.0-experimental-493f72b0a-20230727
devtools-skip:
- CI-MATRIX-NOSKIP
include:
Expand Down
10 changes: 5 additions & 5 deletions docs/guides/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ declare const withError: {
<E>(): <T>(
p: Promise<T>
) => Promise<[error: undefined, value: T] | [error: E, value: undefined]>
<T, E>(p: Promise<T>): Promise<
[error: undefined, value: T] | [error: E, value: undefined]
>
<T, E>(
p: Promise<T>
): Promise<[error: undefined, value: T] | [error: E, value: undefined]>
}
declare const doSomething: () => Promise<string>
interface Foo {
Expand Down Expand Up @@ -239,7 +239,7 @@ import { create, State, StateCreator, StoreMutatorIdentifier } from 'zustand'
type Logger = <
T extends State,
Mps extends [StoreMutatorIdentifier, unknown][] = [],
Mcs extends [StoreMutatorIdentifier, unknown][] = []
Mcs extends [StoreMutatorIdentifier, unknown][] = [],
>(
f: StateCreator<T, Mps, Mcs>,
name?: string
Expand Down Expand Up @@ -292,7 +292,7 @@ type Foo = <
T extends State,
A,
Mps extends [StoreMutatorIdentifier, unknown][] = [],
Mcs extends [StoreMutatorIdentifier, unknown][] = []
Mcs extends [StoreMutatorIdentifier, unknown][] = [],
>(
f: StateCreator<T, [...Mps, ['foo', A]], Mcs>,
bar: A
Expand Down
40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@
"use-sync-external-store": "1.2.0"
},
"devDependencies": {
"@babel/core": "^7.22.6",
"@babel/core": "^7.22.9",
"@babel/plugin-external-helpers": "^7.22.5",
"@babel/plugin-transform-react-jsx": "^7.22.5",
"@babel/plugin-transform-runtime": "^7.22.6",
"@babel/plugin-transform-typescript": "^7.22.5",
"@babel/preset-env": "^7.22.6",
"@babel/plugin-transform-runtime": "^7.22.9",
"@babel/plugin-transform-typescript": "^7.22.9",
"@babel/preset-env": "^7.22.9",
"@redux-devtools/extension": "^3.2.5",
"@rollup/plugin-alias": "^5.0.0",
"@rollup/plugin-babel": "^6.0.3",
Expand All @@ -158,36 +158,36 @@
"@rollup/plugin-terser": "^0.4.3",
"@rollup/plugin-typescript": "^11.1.2",
"@testing-library/react": "^14.0.0",
"@types/react": "^18.2.14",
"@types/react-dom": "^18.2.6",
"@types/react": "^18.2.18",
"@types/react-dom": "^18.2.7",
"@types/use-sync-external-store": "^0.0.3",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.61.0",
"@vitest/coverage-c8": "^0.32.4",
"@vitest/ui": "^0.32.4",
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"@vitest/coverage-c8": "^0.33.0",
"@vitest/ui": "^0.33.0",
"concurrently": "^8.2.0",
"downlevel-dts": "^0.11.0",
"esbuild": "^0.18.11",
"eslint": "^8.44.0",
"eslint-config-prettier": "^8.8.0",
"esbuild": "^0.18.17",
"eslint": "^8.46.0",
"eslint-config-prettier": "^8.9.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.33.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-vitest": "^0.2.6",
"eslint-plugin-vitest": "^0.2.8",
"immer": "^10.0.2",
"jsdom": "^22.1.0",
"json": "^11.0.0",
"prettier": "^2.8.8",
"prettier": "^3.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redux": "5.0.0-alpha.1",
"rollup": "^3.26.0",
"rollup": "^3.27.0",
"rollup-plugin-esbuild": "^5.0.0",
"shx": "^0.3.4",
"typescript": "^5.1.6",
"vitest": "^0.32.4"
"vitest": "^0.33.0"
},
"peerDependencies": {
"immer": ">=9.0",
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/combine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type Combine = <
T extends object,
U extends object,
Mps extends [StoreMutatorIdentifier, unknown][] = [],
Mcs extends [StoreMutatorIdentifier, unknown][] = []
Mcs extends [StoreMutatorIdentifier, unknown][] = [],
>(
initialState: T,
additionalStateCreator: StateCreator<T, Mps, Mcs, U>
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/devtools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export interface DevtoolsOptions extends Config {
type Devtools = <
T,
Mps extends [StoreMutatorIdentifier, unknown][] = [],
Mcs extends [StoreMutatorIdentifier, unknown][] = []
Mcs extends [StoreMutatorIdentifier, unknown][] = [],
>(
initializer: StateCreator<T, [...Mps, ['zustand/devtools', never]], Mcs>,
devtoolsOptions?: DevtoolsOptions
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/immer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { StateCreator, StoreMutatorIdentifier } from '../vanilla.ts'
type Immer = <
T,
Mps extends [StoreMutatorIdentifier, unknown][] = [],
Mcs extends [StoreMutatorIdentifier, unknown][] = []
Mcs extends [StoreMutatorIdentifier, unknown][] = [],
>(
initializer: StateCreator<T, [...Mps, ['zustand/immer', never]], Mcs>
) => StateCreator<T, Mps, [['zustand/immer', never], ...Mcs]>
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/persist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ type Persist = <
T,
Mps extends [StoreMutatorIdentifier, unknown][] = [],
Mcs extends [StoreMutatorIdentifier, unknown][] = [],
U = T
U = T,
>(
initializer: StateCreator<T, [...Mps, ['zustand/persist', unknown]], Mcs>,
options: PersistOptions<T, U>
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/redux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type WithRedux<S, A> = Write<S, StoreRedux<A>>
type Redux = <
T,
A extends Action,
Cms extends [StoreMutatorIdentifier, unknown][] = []
Cms extends [StoreMutatorIdentifier, unknown][] = [],
>(
reducer: (state: T, action: A) => T,
initialState: T
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/subscribeWithSelector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { StateCreator, StoreMutatorIdentifier } from '../vanilla.ts'
type SubscribeWithSelector = <
T,
Mps extends [StoreMutatorIdentifier, unknown][] = [],
Mcs extends [StoreMutatorIdentifier, unknown][] = []
Mcs extends [StoreMutatorIdentifier, unknown][] = [],
>(
initializer: StateCreator<
T,
Expand Down
4 changes: 2 additions & 2 deletions src/traditional.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function useStoreWithEqualityFn<S extends WithReact<StoreApi<unknown>>>(

export function useStoreWithEqualityFn<
S extends WithReact<StoreApi<unknown>>,
U
U,
>(
api: S,
selector: (state: ExtractState<S>) => U,
Expand All @@ -53,7 +53,7 @@ export function useStoreWithEqualityFn<TState, StateSlice>(
}

export type UseBoundStoreWithEqualityFn<
S extends WithReact<ReadonlyStoreApi<unknown>>
S extends WithReact<ReadonlyStoreApi<unknown>>,
> = {
(): ExtractState<S>
<U>(
Expand Down
4 changes: 2 additions & 2 deletions src/vanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export type StateCreator<
T,
Mis extends [StoreMutatorIdentifier, unknown][] = [],
Mos extends [StoreMutatorIdentifier, unknown][] = [],
U = T
U = T,
> = ((
setState: Get<Mutate<StoreApi<T>, Mis>, 'setState', never>,
getState: Get<Mutate<StoreApi<T>, Mis>, 'getState', never>,
Expand All @@ -52,7 +52,7 @@ type CreateStore = {

type CreateStoreImpl = <
T,
Mos extends [StoreMutatorIdentifier, unknown][] = []
Mos extends [StoreMutatorIdentifier, unknown][] = [],
>(
initializer: StateCreator<T, [], Mos>
) => Mutate<StoreApi<T>, Mos>
Expand Down
2 changes: 1 addition & 1 deletion tests/devtools.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { StoreApi, createStore } from 'zustand/vanilla'
type TupleOfEqualLengthH<
Arr extends unknown[],
T,
Acc extends T[]
Acc extends T[],
> = Arr extends [unknown, ...infer Rest]
? TupleOfEqualLengthH<Rest, T, [T, ...Acc]>
: Acc
Expand Down
4 changes: 2 additions & 2 deletions tests/middlewareTypes.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ describe('more complex state spec with subscribeWithSelector', () => {
() =>
({
foo: 1,
} as MyState) // NOTE: Asserting the entire state works too.
}) as MyState // NOTE: Asserting the entire state works too.
)
)
const TestComponent = () => {
Expand Down Expand Up @@ -624,7 +624,7 @@ describe('create with explicitly annotated mutators', () => {
CounterState,
[
['zustand/subscribeWithSelector', never],
['zustand/persist', CounterState]
['zustand/persist', CounterState],
]
>(
subscribeWithSelector(
Expand Down
Loading

0 comments on commit 5777a65

Please sign in to comment.