chore(deps): update dependencies (#2680)

This commit is contained in:
Daishi Kato 2024-08-15 11:13:14 +09:00 committed by GitHub
parent dad36416dc
commit a00f3fa1ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 1477 additions and 1095 deletions

View File

@ -45,7 +45,11 @@
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-empty-function": "off",
@ -111,13 +115,14 @@
{
"files": ["tests/**/*.ts", "tests/**/*.tsx"],
"rules": {
"import/extensions": ["error", "never"]
"import/extensions": ["error", "never"],
"@typescript-eslint/no-unused-vars": "off"
}
},
{
"files": ["./*.js"],
"rules": {
"@typescript-eslint/no-var-requires": "off"
"@typescript-eslint/no-require-imports": "off"
}
}
]

View File

@ -34,8 +34,8 @@ jobs:
- 18.2.0
- 18.3.1
- 19.0.0-rc.0
- 19.0.0-rc-8971381549-20240625
- 0.0.0-experimental-8971381549-20240625
- 19.0.0-rc-49496d49-20240814
- 0.0.0-experimental-49496d49-20240814
devtools-skip:
- CI-MATRIX-NOSKIP
include:

View File

@ -162,11 +162,11 @@
"build:context": "rollup -c --config-context",
"postbuild": "pnpm patch-d-ts && pnpm copy && 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,json,ts}' '{src,tests}/**/*.{ts,tsx}'",
"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,json,ts}' '{src,tests}/**/*.{ts,tsx}'",
"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} && downlevel-dts dist dist/ts3.4 && 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;\"",
@ -203,15 +203,15 @@
"homepage": "https://github.com/pmndrs/zustand",
"packageManager": "pnpm@8.15.0",
"dependencies": {
"use-sync-external-store": "1.2.0"
"use-sync-external-store": "1.2.2"
},
"devDependencies": {
"@babel/core": "^7.24.7",
"@babel/core": "^7.25.2",
"@babel/plugin-external-helpers": "^7.24.7",
"@babel/plugin-transform-react-jsx": "^7.24.7",
"@babel/plugin-transform-react-jsx": "^7.25.2",
"@babel/plugin-transform-runtime": "^7.24.7",
"@babel/plugin-transform-typescript": "^7.24.7",
"@babel/preset-env": "^7.24.7",
"@babel/plugin-transform-typescript": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@redux-devtools/extension": "^3.3.0",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-babel": "^6.0.4",
@ -220,38 +220,38 @@
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.6",
"@testing-library/react": "^16.0.0",
"@types/node": "^20.14.9",
"@types/node": "^22.3.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/use-sync-external-store": "^0.0.6",
"@typescript-eslint/eslint-plugin": "^7.14.1",
"@typescript-eslint/parser": "^7.14.1",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/ui": "^1.6.0",
"@typescript-eslint/eslint-plugin": "^8.1.0",
"@typescript-eslint/parser": "^8.1.0",
"@vitest/coverage-v8": "^2.0.5",
"@vitest/ui": "^2.0.5",
"downlevel-dts": "^0.11.0",
"esbuild": "^0.21.5",
"esbuild": "^0.23.0",
"eslint": "8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.3",
"eslint-plugin-react-compiler": "0.0.0-experimental-0998c1e-20240625",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-compiler": "0.0.0-experimental-2eea4a6-20240814",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-vitest": "^0.5.4",
"immer": "^10.1.1",
"jsdom": "^24.1.0",
"jsdom": "^24.1.1",
"json": "^11.0.0",
"prettier": "^3.3.2",
"prettier": "^3.3.3",
"react": "19.0.0-rc.0",
"react-dom": "19.0.0-rc.0",
"redux": "^5.0.1",
"rollup": "^4.18.0",
"rollup": "^4.20.0",
"rollup-plugin-esbuild": "^6.1.1",
"shelljs": "^0.8.5",
"shx": "^0.3.4",
"typescript": "^5.5.2",
"vitest": "^1.6.0"
"typescript": "^5.5.4",
"vitest": "^2.0.5"
},
"peerDependencies": {
"@types/react": ">=16.8",

2482
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -153,7 +153,7 @@ const devtoolsImpl: DevtoolsImpl =
extensionConnector =
(enabled ?? import.meta.env?.MODE !== 'production') &&
window.__REDUX_DEVTOOLS_EXTENSION__
} catch (e) {
} catch (_e) {
// ignored
}

View File

@ -35,7 +35,7 @@ export function createJSONStorage<S>(
let storage: StateStorage | undefined
try {
storage = getStorage()
} catch (e) {
} catch (_e) {
// prevent error if the storage is not defined (e.g. when server side rendering a page)
return
}
@ -222,7 +222,7 @@ const oldImpl: PersistImpl = (config, baseOptions) => (set, get, api) => {
try {
storage = options.getStorage()
} catch (e) {
} catch (_e) {
// prevent error if the storage is not defined (e.g. when server side rendering a page)
}

View File

@ -37,7 +37,7 @@ export type StateCreator<
store: Mutate<StoreApi<T>, Mis>,
) => U) & { $$storeMutators?: Mos }
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-interface
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-object-type
export interface StoreMutators<S, A> {}
export type StoreMutatorIdentifier = keyof StoreMutators<unknown, unknown>
@ -74,7 +74,7 @@ const createStoreImpl: CreateStoreImpl = (createState) => {
if (!Object.is(nextState, state)) {
const previousState = state
state =
replace ?? (typeof nextState !== 'object' || nextState === null)
(replace ?? (typeof nextState !== 'object' || nextState === null))
? (nextState as TState)
: Object.assign({}, state, nextState)
listeners.forEach((listener) => listener(state, previousState))

View File

@ -1,4 +1,7 @@
import { describe, it } from 'vitest'
/* eslint @typescript-eslint/no-unused-expressions: off */ // FIXME
/* eslint react-compiler/react-compiler: off */
import { describe, expect, it } from 'vitest'
import { create } from 'zustand'
import type { StoreApi } from 'zustand'
import {
@ -57,9 +60,10 @@ describe('counter state spec (single middleware)', () => {
}
TestComponent
const _testSubtyping: StoreApi<object> = createStore(
const testSubtyping: StoreApi<object> = createStore(
immer(() => ({ count: 0 })),
)
expect(testSubtyping).toBeDefined()
})
it('redux', () => {
@ -85,9 +89,10 @@ describe('counter state spec (single middleware)', () => {
}
TestComponent
const _testSubtyping: StoreApi<object> = createStore(
const testSubtyping: StoreApi<object> = createStore(
redux((x) => x, { count: 0 }),
)
expect(testSubtyping).toBeDefined()
})
it('devtools', () => {
@ -112,9 +117,10 @@ describe('counter state spec (single middleware)', () => {
}
TestComponent
const _testSubtyping: StoreApi<object> = createStore(
const testSubtyping: StoreApi<object> = createStore(
devtools(() => ({ count: 0 })),
)
expect(testSubtyping).toBeDefined()
})
it('subscribeWithSelector', () => {
@ -139,9 +145,10 @@ describe('counter state spec (single middleware)', () => {
}
TestComponent
const _testSubtyping: StoreApi<object> = createStore(
const testSubtyping: StoreApi<object> = createStore(
subscribeWithSelector(() => ({ count: 0 })),
)
expect(testSubtyping).toBeDefined()
})
it('combine', () => {
@ -161,9 +168,10 @@ describe('counter state spec (single middleware)', () => {
}
TestComponent
const _testSubtyping: StoreApi<object> = createStore(
const testSubtyping: StoreApi<object> = createStore(
combine({ count: 0 }, () => ({})),
)
expect(testSubtyping).toBeDefined()
})
it('persist', () => {
@ -188,9 +196,10 @@ describe('counter state spec (single middleware)', () => {
}
TestComponent
const _testSubtyping: StoreApi<object> = createStore(
const testSubtyping: StoreApi<object> = createStore(
persist(() => ({ count: 0 }), { name: 'prefix' }),
)
expect(testSubtyping).toBeDefined()
})
it('persist with partialize', () => {