chore(deps): update dev dependencies (#2217)

* chore(deps): update dev dependencies

* more typescript versions

* downgrade vite 4.5.0
This commit is contained in:
Daishi Kato 2023-11-28 09:24:30 +09:00 committed by GitHub
parent 949b505a4b
commit 15635ab789
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 917 additions and 963 deletions

View File

@ -33,8 +33,8 @@ jobs:
- 18.0.0 - 18.0.0
- 18.1.0 - 18.1.0
- 18.2.0 - 18.2.0
- 18.3.0-canary-0c6348758-20231030 - 18.3.0-canary-6c7b41da3-20231123
- 0.0.0-experimental-0c6348758-20231030 - 0.0.0-experimental-6c7b41da3-20231123
devtools-skip: devtools-skip:
- CI-MATRIX-NOSKIP - CI-MATRIX-NOSKIP
include: include:

View File

@ -13,6 +13,8 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
typescript: typescript:
- 5.3.2
- 5.2.2
- 5.1.6 - 5.1.6
- 5.0.4 - 5.0.4
- 4.9.5 - 4.9.5

View File

@ -205,49 +205,49 @@
"use-sync-external-store": "1.2.0" "use-sync-external-store": "1.2.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.23.2", "@babel/core": "^7.23.3",
"@babel/plugin-external-helpers": "^7.22.5", "@babel/plugin-external-helpers": "^7.23.3",
"@babel/plugin-transform-react-jsx": "^7.22.15", "@babel/plugin-transform-react-jsx": "^7.23.4",
"@babel/plugin-transform-runtime": "^7.23.2", "@babel/plugin-transform-runtime": "^7.23.4",
"@babel/plugin-transform-typescript": "^7.22.15", "@babel/plugin-transform-typescript": "^7.23.4",
"@babel/preset-env": "^7.23.2", "@babel/preset-env": "^7.23.3",
"@redux-devtools/extension": "^3.2.5", "@redux-devtools/extension": "^3.2.6",
"@rollup/plugin-alias": "^5.0.1", "@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-babel": "^6.0.4", "@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.5", "@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.5", "@rollup/plugin-typescript": "^11.1.5",
"@testing-library/react": "^14.0.0", "@testing-library/react": "^14.1.2",
"@types/react": "^18.2.33", "@types/react": "^18.2.39",
"@types/react-dom": "^18.2.14", "@types/react-dom": "^18.2.17",
"@types/use-sync-external-store": "^0.0.5", "@types/use-sync-external-store": "^0.0.6",
"@typescript-eslint/eslint-plugin": "^6.9.1", "@typescript-eslint/eslint-plugin": "^6.13.0",
"@typescript-eslint/parser": "^6.9.1", "@typescript-eslint/parser": "^6.13.0",
"@vitest/coverage-c8": "^0.33.0", "@vitest/coverage-v8": "^0.34.6",
"@vitest/ui": "^0.34.6", "@vitest/ui": "^0.34.6",
"concurrently": "^8.2.2", "concurrently": "^8.2.2",
"downlevel-dts": "^0.11.0", "downlevel-dts": "^0.11.0",
"esbuild": "^0.19.5", "esbuild": "^0.19.8",
"eslint": "^8.52.0", "eslint": "^8.54.0",
"eslint-config-prettier": "^9.0.0", "eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-alias": "^1.1.2", "eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.29.0", "eslint-plugin-import": "^2.29.0",
"eslint-plugin-prettier": "^5.0.1", "eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react": "^7.33.2", "eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-vitest": "^0.3.8", "eslint-plugin-vitest": "^0.3.10",
"immer": "^10.0.3", "immer": "^10.0.3",
"jsdom": "^22.1.0", "jsdom": "^23.0.0",
"json": "^11.0.0", "json": "^11.0.0",
"prettier": "^3.0.3", "prettier": "^3.1.0",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"redux": "5.0.0-alpha.1", "redux": "5.0.0-alpha.1",
"rollup": "^4.2.0", "rollup": "^4.6.0",
"rollup-plugin-esbuild": "^6.1.0", "rollup-plugin-esbuild": "^6.1.0",
"shx": "^0.3.4", "shx": "^0.3.4",
"typescript": "^5.2.2", "typescript": "^5.3.2",
"vitest": "^0.34.6" "vitest": "^0.34.6"
}, },
"peerDependencies": { "peerDependencies": {
@ -265,5 +265,8 @@
"react": { "react": {
"optional": true "optional": true
} }
},
"resolutions": {
"vite": "4.5.0"
} }
} }

View File

@ -30,22 +30,22 @@ type Write<T, U> = Omit<T, keyof U> & U
type TakeTwo<T> = T extends { length: 0 } type TakeTwo<T> = T extends { length: 0 }
? [undefined, undefined] ? [undefined, undefined]
: T extends { length: 1 } : T extends { length: 1 }
? [...a0: Cast<T, unknown[]>, a1: undefined] ? [...a0: Cast<T, unknown[]>, a1: undefined]
: T extends { length: 0 | 1 } : T extends { length: 0 | 1 }
? [...a0: Cast<T, unknown[]>, a1: undefined] ? [...a0: Cast<T, unknown[]>, a1: undefined]
: T extends { length: 2 } : T extends { length: 2 }
? T ? T
: T extends { length: 1 | 2 } : T extends { length: 1 | 2 }
? T ? T
: T extends { length: 0 | 1 | 2 } : T extends { length: 0 | 1 | 2 }
? T ? T
: T extends [infer A0, infer A1, ...unknown[]] : T extends [infer A0, infer A1, ...unknown[]]
? [A0, A1] ? [A0, A1]
: T extends [infer A0, (infer A1)?, ...unknown[]] : T extends [infer A0, (infer A1)?, ...unknown[]]
? [A0, A1?] ? [A0, A1?]
: T extends [(infer A0)?, (infer A1)?, ...unknown[]] : T extends [(infer A0)?, (infer A1)?, ...unknown[]]
? [A0?, A1?] ? [A0?, A1?]
: never : never
type WithDevtools<S> = Write<S, StoreDevtools<S>> type WithDevtools<S> = Write<S, StoreDevtools<S>>
@ -53,7 +53,7 @@ type StoreDevtools<S> = S extends {
setState: (...a: infer Sa) => infer Sr setState: (...a: infer Sa) => infer Sr
} }
? { ? {
setState<A extends string | { type: unknown }>( setState<A extends string | { type: string }>(
...a: [...a: TakeTwo<Sa>, action?: A] ...a: [...a: TakeTwo<Sa>, action?: A]
): Sr ): Sr
} }
@ -173,12 +173,12 @@ const devtoolsImpl: DevtoolsImpl =
;(api.setState as NamedSet<S>) = (state, replace, nameOrAction) => { ;(api.setState as NamedSet<S>) = (state, replace, nameOrAction) => {
const r = set(state, replace) const r = set(state, replace)
if (!isRecording) return r if (!isRecording) return r
const action: { type: unknown } = const action: { type: string } =
nameOrAction === undefined nameOrAction === undefined
? { type: anonymousActionType || 'anonymous' } ? { type: anonymousActionType || 'anonymous' }
: typeof nameOrAction === 'string' : typeof nameOrAction === 'string'
? { type: nameOrAction } ? { type: nameOrAction }
: nameOrAction : nameOrAction
if (store === undefined) { if (store === undefined) {
connection?.send(action, get()) connection?.send(action, get())
return r return r

View File

@ -21,16 +21,16 @@ type Write<T, U> = Omit<T, keyof U> & U
type SkipTwo<T> = T extends { length: 0 } type SkipTwo<T> = T extends { length: 0 }
? [] ? []
: T extends { length: 1 } : T extends { length: 1 }
? [] ? []
: T extends { length: 0 | 1 } : T extends { length: 0 | 1 }
? [] ? []
: T extends [unknown, unknown, ...infer A] : T extends [unknown, unknown, ...infer A]
? A ? A
: T extends [unknown, unknown?, ...infer A] : T extends [unknown, unknown?, ...infer A]
? A ? A
: T extends [unknown?, unknown?, ...infer A] : T extends [unknown?, unknown?, ...infer A]
? A ? A
: never : never
type WithImmer<S> = Write<S, StoreImmer<S>> type WithImmer<S> = Write<S, StoreImmer<S>>

View File

@ -3,7 +3,7 @@ import type { NamedSet } from './devtools.ts'
type Write<T, U> = Omit<T, keyof U> & U type Write<T, U> = Omit<T, keyof U> & U
type Action = { type: unknown } type Action = { type: string }
type StoreRedux<A> = { type StoreRedux<A> = {
dispatch: (a: A) => A dispatch: (a: A) => A

View File

@ -20,10 +20,10 @@ type Get<T, K, F> = K extends keyof T ? T[K] : F
export type Mutate<S, Ms> = number extends Ms['length' & keyof Ms] export type Mutate<S, Ms> = number extends Ms['length' & keyof Ms]
? S ? S
: Ms extends [] : Ms extends []
? S ? S
: Ms extends [[infer Mi, infer Ma], ...infer Mrs] : Ms extends [[infer Mi, infer Ma], ...infer Mrs]
? Mutate<StoreMutators<S, Ma>[Mi & StoreMutatorIdentifier], Mrs> ? Mutate<StoreMutators<S, Ma>[Mi & StoreMutatorIdentifier], Mrs>
: never : never
export type StateCreator< export type StateCreator<
T, T,

1757
yarn.lock

File diff suppressed because it is too large Load Diff