From 1e2ab662cbfee28a7d3a601cc5925e3288da5e77 Mon Sep 17 00:00:00 2001 From: Hill Date: Sun, 17 Mar 2024 17:14:12 +0800 Subject: [PATCH] improve reshow-flux-base type --- packages/reshow-flux-base/package.json | 2 +- .../src/__tests__/createReducerTest.js | 26 ++- .../reshow-flux-base/src/createReducer.js | 29 ++-- packages/reshow-flux-base/src/index.js | 2 +- packages/reshow-flux-base/src/type.js | 30 ++-- .../reshow-flux-base/types/createReducer.d.ts | 24 +-- packages/reshow-flux-base/types/index.d.ts | 2 +- packages/reshow-flux-base/types/type.d.ts | 38 +++-- packages/reshow-flux/package.json | 2 +- .../src/__tests__/useConnectUnmountTest.js | 2 +- .../reshow-flux/src/__tests__/useStoreTest.js | 2 +- packages/reshow-flux/src/useImmutable.js | 2 +- .../reshow-flux/types/ImmutableStore.d.ts | 2 +- packages/reshow-flux/types/useImmutable.d.ts | 4 +- packages/reshow-flux/yarn.lock | 157 ++++++++++-------- 15 files changed, 187 insertions(+), 137 deletions(-) diff --git a/packages/reshow-flux-base/package.json b/packages/reshow-flux-base/package.json index 788740e9..661d14b8 100644 --- a/packages/reshow-flux-base/package.json +++ b/packages/reshow-flux-base/package.json @@ -1,5 +1,5 @@ { - "version": "0.17.48", + "version": "0.18.2", "name": "reshow-flux-base", "repository": { "type": "git", diff --git a/packages/reshow-flux-base/src/__tests__/createReducerTest.js b/packages/reshow-flux-base/src/__tests__/createReducerTest.js index ab806b49..2fa2765a 100644 --- a/packages/reshow-flux-base/src/__tests__/createReducerTest.js +++ b/packages/reshow-flux-base/src/__tests__/createReducerTest.js @@ -4,8 +4,9 @@ */ import { expect } from "chai"; -import sinon from "sinon"; +import * as sinon from "sinon"; import createReducer from "../createReducer"; +import { ActionObject } from "../type"; describe("Test createReducer", () => { let reducer; @@ -50,6 +51,29 @@ describe("Test createReducer", () => { }); }); + describe("Test dispatch more type", () => { + it("dispatch with number also could include string", () => { + const [store, dispatch] = createReducer( + (_state, /**@type number*/ action) => ({ foo: action }), + { foo: 1 } + ); + expect(store.getState()).to.deep.equal({ foo: 1 }); + dispatch(""); + expect(store.getState()).to.deep.equal({ foo: { type: "" } }); + }); + it("dispatch with string", () => { + const [store, dispatch] = createReducer( + (_state, /**@type ActionObject*/ action) => { + return { foo: action.type }; + }, + { foo: "bar" } + ); + expect(store.getState()).to.deep.equal({ foo: "bar" }); + dispatch(""); + expect(store.getState()).to.deep.equal({ foo: "" }); + }); + }); + it("Emit with custom event", (done) => { const [store, dispatch] = reducer; const callback = sinon.spy(); diff --git a/packages/reshow-flux-base/src/createReducer.js b/packages/reshow-flux-base/src/createReducer.js index 2b271618..f790fe0d 100644 --- a/packages/reshow-flux-base/src/createReducer.js +++ b/packages/reshow-flux-base/src/createReducer.js @@ -2,7 +2,7 @@ import callfunc from "call-func"; import { UNDEFINED, T_UNDEFINED, STRING, NEW_OBJ } from "reshow-constant"; -import { StoreObject, Emiter } from "./type"; +import { StoreObject, Emiter, ActionObject } from "./type"; /** * @template StateType @@ -12,7 +12,7 @@ import { StoreObject, Emiter } from "./type"; /** * @template ActionType - * @typedef {import('./type').RefineAction} RefineAction + * @typedef {import('./type').RefinedAction} RefinedAction */ /** @@ -22,6 +22,7 @@ import { StoreObject, Emiter } from "./type"; /** * @template StateType * @template ActionType + * * @callback DispatchCallback * @param {StateType} State * @returns {ActionType} @@ -30,7 +31,7 @@ import { StoreObject, Emiter } from "./type"; /** * @template StateType * @template ActionType - * @typedef {ActionType|DispatchCallback} DispatchAction + * @typedef {string|ActionType|DispatchCallback} DispatchAction */ /** @@ -78,10 +79,11 @@ const getMitt = () => { * * @template StateType * @template ActionType + * * @param {DispatchAction} action * @param {Payload} [params] * @param {StateType} [prevState] - * @returns {RefineAction} lazy actions + * @returns {ActionObject|ActionType} lazy actions */ export const refineAction = (action, params, prevState) => { let nextAction = NEW_OBJ(); @@ -103,9 +105,10 @@ export const refineAction = (action, params, prevState) => { /** * @template StateType * @template ActionType + * * @callback ReducerType - * @param {StateType} StateArg - * @param {RefineAction} ActionArg + * @param {StateType} ReducerState + * @param {ActionType} ReducerAction * @returns {StateType} */ @@ -117,7 +120,8 @@ export const refineAction = (action, params, prevState) => { /** * @template StateType * @template ActionType - * @callback DispatchType + * + * @callback DispatchFunction * @param {DispatchAction} action * @param {Payload} [actionParams] * @returns {StateType} endingState @@ -126,27 +130,28 @@ export const refineAction = (action, params, prevState) => { /** * @template StateType * @template ActionType + * * @param {ReducerType} reducer * @param {InitStateType} [initState] - * @returns {[StoreObject, DispatchType]} + * @returns {[StoreObject, DispatchFunction]} */ const createReducer = (reducer, initState) => { const state = { current: callfunc(initState) }; const mitt = getMitt(); /** - * @type {DispatchType} + * @type {DispatchFunction} */ const dispatch = (action, actionParams) => { const startingState = state.current; - const thisAction = refineAction(action, actionParams, startingState); - const endingState = reducer(startingState, thisAction); + const refinedAction = refineAction(action, actionParams, startingState); + const endingState = reducer(startingState, /**@type any*/ (refinedAction)); if (endingState === T_UNDEFINED) { console.trace(); throw `reducer() return ${UNDEFINED}.`; } if (startingState !== endingState) { state.current = endingState; - mitt.emit(endingState, thisAction, startingState); + mitt.emit(endingState, refinedAction, startingState); } return endingState; }; diff --git a/packages/reshow-flux-base/src/index.js b/packages/reshow-flux-base/src/index.js index 246126db..3298c983 100644 --- a/packages/reshow-flux-base/src/index.js +++ b/packages/reshow-flux-base/src/index.js @@ -14,7 +14,7 @@ /** * @template StateType * @template ActionType - * @typedef {import("./createReducer").DispatchType} DispatchType + * @typedef {import("./createReducer").DispatchFunction} DispatchFunction */ export { default as createReducer, refineAction } from "./createReducer"; diff --git a/packages/reshow-flux-base/src/type.js b/packages/reshow-flux-base/src/type.js index f4a48ea4..ac8c5276 100644 --- a/packages/reshow-flux-base/src/type.js +++ b/packages/reshow-flux-base/src/type.js @@ -12,27 +12,38 @@ * @interface */ export class ActionObject { - /** @type {string|SAFE_UNDEFINED=} */ + /** @type {string} */ type; - /** @type {Payload=} */ + /** @type {?Payload=} */ params; } /** - * @template [ActionType=ActionObject] - * @typedef {ActionType} RefineAction + * @template [ActionType = ActionObject] + * @typedef {ActionType|ActionObject} RefinedAction */ /** * @template StateType * @template ActionType + * * @callback FluxHandler * @param {StateType} NextState - * @param {RefineAction} Action + * @param {RefinedAction} Action * @param {StateType} PrevState * @returns{any} */ +/** + * @template StateType + * @template ActionType + * + * @callback EmitterEmitCall + * @param {StateType} state + * @param {RefinedAction} action + * @param {StateType} prevState + */ + /** * @template StateType * @template ActionType @@ -56,15 +67,6 @@ export class ActionObject { * @returns {FluxHandler[]} */ -/** - * @template StateType - * @template ActionType - * @callback EmitterEmitCall - * @param {StateType} state - * @param {RefineAction} action - * @param {StateType} prevState - */ - /** * @template StateType * @template ActionType diff --git a/packages/reshow-flux-base/types/createReducer.d.ts b/packages/reshow-flux-base/types/createReducer.d.ts index 240ad989..340392e3 100644 --- a/packages/reshow-flux-base/types/createReducer.d.ts +++ b/packages/reshow-flux-base/types/createReducer.d.ts @@ -1,19 +1,21 @@ -export function refineAction(action: DispatchAction, params?: Payload, prevState?: StateType): ActionType; +export function refineAction(action: DispatchAction, params?: Payload, prevState?: StateType): ActionObject | ActionType; export default createReducer; export type FluxHandler = import('./type').FluxHandler; -export type RefineAction = import('./type').RefineAction; +export type RefinedAction = import('./type').RefinedAction; export type Payload = import('./type').Payload; export type DispatchCallback = (State: StateType) => ActionType; -export type DispatchAction = ActionType | DispatchCallback; -export type ReducerType = (StateArg: StateType, ActionArg: RefineAction) => StateType; +export type DispatchAction = string | ActionType | DispatchCallback; +export type ReducerType = (ReducerState: StateType, ReducerAction: ActionType) => StateType; export type InitStateType = StateType | (() => StateType); -export type DispatchType = (action: DispatchAction, actionParams?: Payload) => StateType; +export type DispatchFunction = (action: DispatchAction, actionParams?: Payload) => StateType; +import { ActionObject } from "./type"; /** * @template StateType * @template ActionType + * * @callback ReducerType - * @param {StateType} StateArg - * @param {RefineAction} ActionArg + * @param {StateType} ReducerState + * @param {ActionType} ReducerAction * @returns {StateType} */ /** @@ -23,7 +25,8 @@ export type DispatchType = (action: DispatchAction} action * @param {Payload} [actionParams] * @returns {StateType} endingState @@ -31,9 +34,10 @@ export type DispatchType = (action: DispatchAction} reducer * @param {InitStateType} [initState] - * @returns {[StoreObject, DispatchType]} + * @returns {[StoreObject, DispatchFunction]} */ -declare function createReducer(reducer: ReducerType, initState?: InitStateType): [StoreObject, DispatchType]; +declare function createReducer(reducer: ReducerType, initState?: InitStateType): [StoreObject, DispatchFunction]; import { StoreObject } from "./type"; diff --git a/packages/reshow-flux-base/types/index.d.ts b/packages/reshow-flux-base/types/index.d.ts index f9632c9f..ec5306fe 100644 --- a/packages/reshow-flux-base/types/index.d.ts +++ b/packages/reshow-flux-base/types/index.d.ts @@ -1,6 +1,6 @@ export { default as SimpleMap } from "./SimpleMap"; export type InitStateType = import("./createReducer").InitStateType; export type ReducerType = import("./createReducer").ReducerType; -export type DispatchType = import("./createReducer").DispatchType; +export type DispatchFunction = import("./createReducer").DispatchFunction; export { default as createReducer, refineAction } from "./createReducer"; export { StoreObject, ActionObject } from "./type"; diff --git a/packages/reshow-flux-base/types/type.d.ts b/packages/reshow-flux-base/types/type.d.ts index a8621383..775dda22 100644 --- a/packages/reshow-flux-base/types/type.d.ts +++ b/packages/reshow-flux-base/types/type.d.ts @@ -8,24 +8,34 @@ * @interface */ export class ActionObject { - /** @type {string|SAFE_UNDEFINED=} */ - type: (string | SAFE_UNDEFINED) | undefined; - /** @type {Payload=} */ - params: Payload | undefined; + /** @type {string} */ + type: string; + /** @type {?Payload=} */ + params: (Payload | null) | undefined; } /** - * @template [ActionType=ActionObject] - * @typedef {ActionType} RefineAction + * @template [ActionType = ActionObject] + * @typedef {ActionType|ActionObject} RefinedAction */ /** * @template StateType * @template ActionType + * * @callback FluxHandler * @param {StateType} NextState - * @param {RefineAction} Action + * @param {RefinedAction} Action * @param {StateType} PrevState * @returns{any} */ +/** + * @template StateType + * @template ActionType + * + * @callback EmitterEmitCall + * @param {StateType} state + * @param {RefinedAction} action + * @param {StateType} prevState + */ /** * @template StateType * @template ActionType @@ -46,14 +56,6 @@ export class ActionObject { * @param {FluxHandler} handler * @returns {FluxHandler[]} */ -/** - * @template StateType - * @template ActionType - * @callback EmitterEmitCall - * @param {StateType} state - * @param {RefineAction} action - * @param {StateType} prevState - */ /** * @template StateType * @template ActionType @@ -88,9 +90,9 @@ export type Payload = { [x: string]: any; }; export type SAFE_UNDEFINED = import("reshow-constant").SAFE_UNDEFINED; -export type RefineAction = ActionType; -export type FluxHandler = (NextState: StateType, Action: RefineAction, PrevState: StateType) => any; +export type RefinedAction = ActionType | ActionObject; +export type FluxHandler = (NextState: StateType, Action: RefinedAction, PrevState: StateType) => any; +export type EmitterEmitCall = (state: StateType, action: RefinedAction, prevState: StateType) => any; export type EmitterResetCall = () => FluxHandler[]; export type EmitterAddCall = (handler: FluxHandler) => number; export type EmitterRemoveCall = (handler: FluxHandler) => FluxHandler[]; -export type EmitterEmitCall = (state: StateType, action: RefineAction, prevState: StateType) => any; diff --git a/packages/reshow-flux/package.json b/packages/reshow-flux/package.json index 7c4caa1c..1bcaabd8 100644 --- a/packages/reshow-flux/package.json +++ b/packages/reshow-flux/package.json @@ -1,5 +1,5 @@ { - "version": "0.18.0", + "version": "0.18.2", "name": "reshow-flux", "repository": { "type": "git", diff --git a/packages/reshow-flux/src/__tests__/useConnectUnmountTest.js b/packages/reshow-flux/src/__tests__/useConnectUnmountTest.js index 83e4d5c3..8f28943a 100644 --- a/packages/reshow-flux/src/__tests__/useConnectUnmountTest.js +++ b/packages/reshow-flux/src/__tests__/useConnectUnmountTest.js @@ -4,7 +4,7 @@ const { PureComponent } = React; import { expect } from "chai"; import { render, act } from "reshow-unit"; -import sinon from "sinon"; +import * as sinon from "sinon"; import { createReducer } from "reshow-flux-base"; import useConnect from "../useConnect"; diff --git a/packages/reshow-flux/src/__tests__/useStoreTest.js b/packages/reshow-flux/src/__tests__/useStoreTest.js index cf8b01fc..71af3ba3 100644 --- a/packages/reshow-flux/src/__tests__/useStoreTest.js +++ b/packages/reshow-flux/src/__tests__/useStoreTest.js @@ -1,10 +1,10 @@ // @ts-check import * as React from "react"; +import * as sinon from "sinon"; import { expect } from "chai"; import { act, render, waitFor } from "reshow-unit"; import { createReducer } from "reshow-flux-base"; -import sinon from "sinon"; import useStore from "../useStore"; import ImmutableStore from "../ImmutableStore"; diff --git a/packages/reshow-flux/src/useImmutable.js b/packages/reshow-flux/src/useImmutable.js index 35e5a2ec..699b084d 100644 --- a/packages/reshow-flux/src/useImmutable.js +++ b/packages/reshow-flux/src/useImmutable.js @@ -23,7 +23,7 @@ import { ActionObject } from "reshow-flux-base"; * * @template [StateType=StateMap] * @param {InitStateType} [initialState] - * @returns {[StateMap, import("reshow-flux-base").DispatchType]} + * @returns {[StateMap, import("reshow-flux-base").DispatchFunction]} */ const useImmutable = (initialState) => { const lastReduce = useRef(/** @type any */ (null)); diff --git a/packages/reshow-flux/types/ImmutableStore.d.ts b/packages/reshow-flux/types/ImmutableStore.d.ts index 2fb3bc5d..9c2e2248 100644 --- a/packages/reshow-flux/types/ImmutableStore.d.ts +++ b/packages/reshow-flux/types/ImmutableStore.d.ts @@ -47,7 +47,7 @@ export type forEachCb = (Value: any, Key: any) => any; * * @returns {[ImmutableStoreObject, dispatch]} */ -declare function ImmutableStore(reducer?: ReducerTypeWithMap, initState?: import("reshow-flux-base").InitStateType): [ImmutableStoreObject, import("reshow-flux-base/types/createReducer").DispatchType]; +declare function ImmutableStore(reducer?: ReducerTypeWithMap, initState?: import("reshow-flux-base").InitStateType): [ImmutableStoreObject, import("reshow-flux-base/types/createReducer").DispatchFunction]; import { is as equal } from "immutable"; /** * @param {MaybeMapType} maybeMap diff --git a/packages/reshow-flux/types/useImmutable.d.ts b/packages/reshow-flux/types/useImmutable.d.ts index 45e88041..ec33fa57 100644 --- a/packages/reshow-flux/types/useImmutable.d.ts +++ b/packages/reshow-flux/types/useImmutable.d.ts @@ -17,8 +17,8 @@ export type InitStateType = import("reshow-flux-base").InitStateType< * * @template [StateType=StateMap] * @param {InitStateType} [initialState] - * @returns {[StateMap, import("reshow-flux-base").DispatchType]} + * @returns {[StateMap, import("reshow-flux-base").DispatchFunction]} */ -declare function useImmutable(initialState?: InitStateType): [StateMap, import("reshow-flux-base").DispatchType]; +declare function useImmutable(initialState?: InitStateType): [StateMap, import("reshow-flux-base").DispatchFunction]; import { StateMap } from "./ImmutableStore"; import { ActionObject } from "reshow-flux-base"; diff --git a/packages/reshow-flux/yarn.lock b/packages/reshow-flux/yarn.lock index 306604d6..b608b757 100644 --- a/packages/reshow-flux/yarn.lock +++ b/packages/reshow-flux/yarn.lock @@ -500,16 +500,16 @@ integrity sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng== "@types/react-dom@^18.0.0": - version "18.2.20" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.20.tgz#cbdf7abb3cc2377980bb1294bc51375016a8320f" - integrity sha512-HXN/biJY8nv20Cn9ZbCFq3liERd4CozVZmKbaiZ9KiKTrWqsP7eoGDO6OOGvJQwoVFuiXaiJ7nBBjiFFbRmQMQ== + version "18.2.22" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.22.tgz#d332febf0815403de6da8a97e5fe282cbe609bae" + integrity sha512-fHkBXPeNtfvri6gdsMYyW+dW7RXFo6Ad09nLFK0VQWR7yGLai/Cyvyj696gbwYvBnhGtevUG9cET0pmUbMtoPQ== dependencies: "@types/react" "*" "@types/react@*": - version "18.2.63" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.63.tgz#4637c56146ad90f96d0583171edab953f7e6fe57" - integrity sha512-ppaqODhs15PYL2nGUOaOu2RSCCB4Difu4UFrP4I3NHLloXC/ESQzQMi9nvjfT1+rudd0d2L3fQPJxRSey+rGlQ== + version "18.2.66" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.66.tgz#d2eafc8c4e70939c5432221adb23d32d76bfe451" + integrity sha512-OYTmMI4UigXeFMF/j4uv0lBBEbongSgptPrHBxqME44h9+yNov+oL6Z3ocJKo0WyXR84sQUNeyIp9MRfckvZpg== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -520,6 +520,18 @@ resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.8.tgz#ce5ace04cfeabe7ef87c0091e50752e36707deff" integrity sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A== +"@types/sinon@^17.0.3": + version "17.0.3" + resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-17.0.3.tgz#9aa7e62f0a323b9ead177ed23a36ea757141a5fa" + integrity sha512-j3uovdn8ewky9kRBG19bOwaZbexJu/XjtkHyjvUgt4xfPFz18dcORIMqnYh66Fx3Powhcr85NT5+er3+oViapw== + dependencies: + "@types/sinonjs__fake-timers" "*" + +"@types/sinonjs__fake-timers@*": + version "8.1.5" + resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.5.tgz#5fd3592ff10c1e9695d377020c033116cc2889f2" + integrity sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ== + "@typescript-eslint/parser@^5.10.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7" @@ -711,9 +723,9 @@ array-union@^2.1.0: integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== array.dedup@*: - version "0.3.1" - resolved "https://registry.yarnpkg.com/array.dedup/-/array.dedup-0.3.1.tgz#5d7c26492f757fe0cb4f072a130f67dbb0970591" - integrity sha512-irjaW6f0ttHOHLNtH1lApHmHVQqilTpsplfqLO9pZBhQRasrL1cetBdnIbGR+Zme47rDhlEWSAGtsVZYy1qrBw== + version "0.3.2" + resolved "https://registry.yarnpkg.com/array.dedup/-/array.dedup-0.3.2.tgz#f8365f86f039b2fbefa2c98532f85f6a8b249234" + integrity sha512-O8YKfORDrsh2rIS3vIerHLH2ZBDl2cXsxBtxclEhAdCxXgL5qBzboBMb8k5Ig04gKPZQP9OvCTYdE4KsUrugJA== array.merge@*: version "0.2.1" @@ -738,7 +750,7 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== -available-typed-arrays@^1.0.6: +available-typed-arrays@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== @@ -751,9 +763,9 @@ balanced-match@^1.0.0: integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + version "2.3.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" + integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== boolify@^1.0.1: version "1.0.1" @@ -845,9 +857,9 @@ camelcase@^6.0.0, camelcase@^6.3.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001587: - version "1.0.30001594" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001594.tgz#bea552414cd52c2d0c985ed9206314a696e685f5" - integrity sha512-VblSX6nYqyJVs8DKFMldE2IVCJjZ225LW00ydtUWwh5hk9IfkTOffO6r8gJNsH0qqqeAF8KrbMYA2VEwTlGW5g== + version "1.0.30001597" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001597.tgz#8be94a8c1d679de23b22fbd944232aa1321639e6" + integrity sha512-7LjJvmQU6Sj7bL0j5b5WY/3n7utXUJvAe1lxhsHDbLmwX9mdL86Yjtr+5SRCyf8qME4M7pU2hswj0FpyBVCv9w== chai@^4.x: version "4.4.1" @@ -1136,7 +1148,7 @@ default-require-extensions@^3.0.0: dependencies: strip-bom "^4.0.0" -define-data-property@^1.0.1, define-data-property@^1.1.2, define-data-property@^1.1.4: +define-data-property@^1.0.1, define-data-property@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== @@ -1194,9 +1206,9 @@ dom-accessibility-api@^0.5.9: integrity sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg== electron-to-chromium@^1.4.668: - version "1.4.693" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.693.tgz#001bb5dcb57ba404366ec39e1957d11886fc8a93" - integrity sha512-/if4Ueg0GUQlhCrW2ZlXwDAm40ipuKo+OgeHInlL8sbjt+hzISxZK949fZeJaVsheamrzANXvw1zQTvbxTvSHw== + version "1.4.707" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.707.tgz#77904f87432b8b50b8b8b654ba3940d2bef48d63" + integrity sha512-qRq74Mo7ChePOU6GHdfAJ0NREXU8vQTlVlfWz3wNygFay6xrd/fY2J7oGHwrhFeU30OVctGLdTh/FcnokTWpng== emoji-regex@^7.0.1: version "7.0.3" @@ -1522,7 +1534,7 @@ get-func-name@^2.0.1, get-func-name@^2.0.2: resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== -get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: +get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2, get-intrinsic@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== @@ -1548,9 +1560,9 @@ get-package-type@^0.1.0: integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== get-random-id@*: - version "0.3.6" - resolved "https://registry.yarnpkg.com/get-random-id/-/get-random-id-0.3.6.tgz#9afbe593f943d5e107b79603331833a0967ef1c5" - integrity sha512-CZm4e1dLvJJfG/DzMvAxVLGEtL/DkR9bQawyC4kaaWWLmBgW9CO6aFo8H8/FMegJqCB3fcPxPuBWrrq79cO38Q== + version "0.4.0" + resolved "https://registry.yarnpkg.com/get-random-id/-/get-random-id-0.4.0.tgz#6a17fcdcac23d4a88ed0e307460936f4f22f5ae7" + integrity sha512-pSLn6Jzo52PqFzLQfd4PLwQ98JOhw1gwazUoYO5sfRFZc2xkGtBMizK04bGcUftBzUTj4Xa2W3FB5bvznn8tyA== dependencies: call-func "*" @@ -1670,7 +1682,7 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.1, has-property-descriptors@^1.0.2: +has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== @@ -1687,7 +1699,7 @@ has-symbols@^1.0.2, has-symbols@^1.0.3: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== -has-tostringtag@^1.0.0, has-tostringtag@^1.0.1: +has-tostringtag@^1.0.0, has-tostringtag@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== @@ -1703,9 +1715,9 @@ hasha@^5.0.0: type-fest "^0.8.0" hasown@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.1.tgz#26f48f039de2c0f8d3356c223fb8d50253519faa" - integrity sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA== + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== dependencies: function-bind "^1.1.2" @@ -1876,10 +1888,10 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" -is-map@^2.0.1, is-map@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" - integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== +is-map@^2.0.2, is-map@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.3.tgz#ede96b7fe1e270b3c4465e3a465658764926d62e" + integrity sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw== is-number-object@^1.0.4: version "1.0.7" @@ -1916,10 +1928,10 @@ is-regex@^1.1.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-set@^2.0.1, is-set@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec" - integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g== +is-set@^2.0.2, is-set@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.3.tgz#8ab209ea424608141372ded6e0cb200ef1d9d01d" + integrity sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg== is-shared-array-buffer@^1.0.2: version "1.0.3" @@ -1957,18 +1969,18 @@ is-unicode-supported@^0.1.0: resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== -is-weakmap@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2" - integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA== - -is-weakset@^2.0.1: +is-weakmap@^2.0.2: version "2.0.2" - resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.2.tgz#4569d67a747a1ce5a994dfd4ef6dcea76e7c0a1d" - integrity sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg== + resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.2.tgz#bf72615d649dfe5f699079c54b83e47d1ae19cfd" + integrity sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w== + +is-weakset@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.3.tgz#e801519df8c0c43e12ff2834eead84ec9e624007" + integrity sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ== dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" + call-bind "^1.0.7" + get-intrinsic "^1.2.4" is-windows@^1.0.2: version "1.0.2" @@ -2845,9 +2857,9 @@ reshow-constant@*: integrity sha512-rFcJmDbvDEkaE9T2zHkgRvbjQ3iXPSpBqqwmjvpASuzZyWXTEs9nSLx9e8WxI2eHBlluoA3ybnzr/zBmAOrpOg== reshow-flux-base@*: - version "0.17.48" - resolved "https://registry.yarnpkg.com/reshow-flux-base/-/reshow-flux-base-0.17.48.tgz#5c786ce8c5b716807e5286f2e2840571fc46300d" - integrity sha512-8Qn4UZtOk9C44+YXsehIbWLVjrQ0NllpPPXYptXruUaFBofLN1Jqk2DICeh6zC93RWtzNt3rLivol5jSyPw5tA== + version "0.18.1" + resolved "https://registry.yarnpkg.com/reshow-flux-base/-/reshow-flux-base-0.18.1.tgz#b95d57fb2707b0b5f96de470a94e152dc99ed316" + integrity sha512-Jf2EsK3Ut+ksmgKgnScyogO10zf/RUXojTTrM7KnvT7kg6HYpkPGWLiCTJC1UOPNuXzv0mykCxHAEaQAe+pbYw== dependencies: call-func "*" get-object-value "*" @@ -2872,11 +2884,12 @@ reshow-runtime@*: reshow-constant "*" reshow-unit-dom@*: - version "0.4.2" - resolved "https://registry.yarnpkg.com/reshow-unit-dom/-/reshow-unit-dom-0.4.2.tgz#a63700aae55b4a00e401005fa57766dac88e7a0d" - integrity sha512-SWBqNxnMIMCu22QgTQh3o9s35WTp+HiOhRNkOOE96K6I56ctmszDewkY/sr/Y6R8KzbpbzOZAS/tF87mDg1Ddg== + version "0.4.5" + resolved "https://registry.yarnpkg.com/reshow-unit-dom/-/reshow-unit-dom-0.4.5.tgz#a4eebfb7fec790b904bff3b6dd896de25a35cf37" + integrity sha512-FnsIPb4RVCIa6tI1uFqpbk1F4kOVIZWCMYg5UM5+vFR19vRVCkIArj7BRV3k10AVjim8ux/oKTmCxg8Zvk+E6Q== dependencies: "@types/mocha" "*" + "@types/sinon" "^17.0.3" chai "^4.x" global-jsdom "24.0.0" jsdom "24.0.0" @@ -3008,16 +3021,16 @@ set-blocking@^2.0.0: integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== set-function-length@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.1.tgz#47cc5945f2c771e2cf261c6737cf9684a2a5e425" - integrity sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g== + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== dependencies: - define-data-property "^1.1.2" + define-data-property "^1.1.4" es-errors "^1.3.0" function-bind "^1.1.2" - get-intrinsic "^1.2.3" + get-intrinsic "^1.2.4" gopd "^1.0.1" - has-property-descriptors "^1.0.1" + has-property-descriptors "^1.0.2" set-function-name@^2.0.1: version "2.0.2" @@ -3376,14 +3389,14 @@ which-boxed-primitive@^1.0.2: is-symbol "^1.0.3" which-collection@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.1.tgz#70eab71ebbbd2aefaf32f917082fc62cdcb70906" - integrity sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A== + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.2.tgz#627ef76243920a107e7ce8e96191debe4b16c2a0" + integrity sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw== dependencies: - is-map "^2.0.1" - is-set "^2.0.1" - is-weakmap "^2.0.1" - is-weakset "^2.0.1" + is-map "^2.0.3" + is-set "^2.0.3" + is-weakmap "^2.0.2" + is-weakset "^2.0.3" which-module@^2.0.0: version "2.0.1" @@ -3391,15 +3404,15 @@ which-module@^2.0.0: integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== which-typed-array@^1.1.13: - version "1.1.14" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.14.tgz#1f78a111aee1e131ca66164d8bdc3ab062c95a06" - integrity sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg== + version "1.1.15" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" + integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== dependencies: - available-typed-arrays "^1.0.6" - call-bind "^1.0.5" + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" for-each "^0.3.3" gopd "^1.0.1" - has-tostringtag "^1.0.1" + has-tostringtag "^1.0.2" which@2.0.2, which@^2.0.1: version "2.0.2"