reactish-state 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/_virtual/rolldown_runtime.cjs +31 -0
- package/dist/cjs/index.cjs +14 -16
- package/dist/cjs/middleware/applyMiddleware.cjs +7 -6
- package/dist/cjs/middleware/immer.cjs +6 -6
- package/dist/cjs/middleware/index.cjs +7 -9
- package/dist/cjs/middleware/persist.cjs +29 -37
- package/dist/cjs/middleware/reduxDevtools.cjs +23 -32
- package/dist/cjs/plugin/applyPlugin.cjs +5 -2
- package/dist/cjs/plugin/index.cjs +5 -7
- package/dist/cjs/plugin/reduxDevtools.cjs +19 -24
- package/dist/cjs/react/shim.cjs +14 -4
- package/dist/cjs/react/useSelector.cjs +26 -23
- package/dist/cjs/react/useSnapshot.cjs +9 -10
- package/dist/cjs/shim/index.cjs +3 -5
- package/dist/cjs/shim/reactShim.cjs +6 -4
- package/dist/cjs/utils.cjs +10 -9
- package/dist/cjs/vanilla/selector.cjs +27 -26
- package/dist/cjs/vanilla/state.cjs +35 -33
- package/dist/esm/index.mjs +7 -5
- package/dist/esm/middleware/applyMiddleware.mjs +6 -6
- package/dist/esm/middleware/immer.mjs +5 -5
- package/dist/esm/middleware/index.mjs +5 -3
- package/dist/esm/middleware/persist.mjs +28 -37
- package/dist/esm/middleware/reduxDevtools.mjs +22 -32
- package/dist/esm/plugin/applyPlugin.mjs +4 -2
- package/dist/esm/plugin/index.mjs +4 -2
- package/dist/esm/plugin/reduxDevtools.mjs +18 -24
- package/dist/esm/react/shim.mjs +5 -3
- package/dist/esm/react/useSelector.mjs +25 -23
- package/dist/esm/react/useSnapshot.mjs +9 -10
- package/dist/esm/shim/index.mjs +3 -1
- package/dist/esm/shim/reactShim.mjs +4 -2
- package/dist/esm/utils.mjs +9 -9
- package/dist/esm/vanilla/selector.mjs +26 -25
- package/dist/esm/vanilla/state.mjs +34 -33
- package/package.json +32 -36
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
set
|
|
1
|
+
//#region src/middleware/applyMiddleware.ts
|
|
2
|
+
const applyMiddleware = (middlewares, { fromRight } = {}) => (api) => middlewares[fromRight ? "reduceRight" : "reduce"]((set, middleware) => middleware ? middleware({
|
|
3
|
+
...api,
|
|
4
|
+
set
|
|
6
5
|
}) : set, api.set);
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
//#endregion
|
|
8
|
+
export { applyMiddleware };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { produce } from
|
|
1
|
+
import { produce } from "immer";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}) => (value, context) => set(typeof value === 'function' ? produce(value) : value, context);
|
|
3
|
+
//#region src/middleware/immer.ts
|
|
4
|
+
const immer = ({ set }) => (value, context) => set(typeof value === "function" ? produce(value) : value, context);
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
//#endregion
|
|
7
|
+
export { immer };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { applyMiddleware } from "./applyMiddleware.mjs";
|
|
2
|
+
import { persist } from "./persist.mjs";
|
|
3
|
+
import { reduxDevtools } from "./reduxDevtools.mjs";
|
|
4
|
+
|
|
5
|
+
export { applyMiddleware, persist, reduxDevtools };
|
|
@@ -1,39 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
try {
|
|
28
|
-
const value = getStorage().getItem(key);
|
|
29
|
-
value != null && set(value !== 'undefined' ? JSON.parse(value) : undefined, `HYDRATE_${key}`);
|
|
30
|
-
} catch (_unused2) {
|
|
31
|
-
/* continue regardless of error */
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
states.length = 0;
|
|
35
|
-
}
|
|
36
|
-
};
|
|
1
|
+
//#region src/middleware/persist.ts
|
|
2
|
+
const persist = ({ prefix, getStorage = () => localStorage } = {}) => {
|
|
3
|
+
const states = [];
|
|
4
|
+
return {
|
|
5
|
+
middleware: ({ set, get, meta }) => {
|
|
6
|
+
let key = meta()?.key;
|
|
7
|
+
if (!key) throw new Error("[reactish-state] state should be provided with a string `key` in the config object when the `persist` middleware is used.");
|
|
8
|
+
if (prefix) key = prefix + key;
|
|
9
|
+
states.push([key, set]);
|
|
10
|
+
return (...args) => {
|
|
11
|
+
set(...args);
|
|
12
|
+
try {
|
|
13
|
+
getStorage().setItem(key, JSON.stringify(get()));
|
|
14
|
+
} catch {}
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
hydrate: () => {
|
|
18
|
+
states.forEach(([key, set]) => {
|
|
19
|
+
try {
|
|
20
|
+
const value = getStorage().getItem(key);
|
|
21
|
+
if (value != null) set(value !== "undefined" ? JSON.parse(value) : void 0, `HYDRATE_${key}`);
|
|
22
|
+
} catch {}
|
|
23
|
+
});
|
|
24
|
+
states.length = 0;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
37
27
|
};
|
|
38
28
|
|
|
39
|
-
|
|
29
|
+
//#endregion
|
|
30
|
+
export { persist };
|
|
@@ -1,34 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return (value, action) => {
|
|
22
|
-
set(value, action);
|
|
23
|
-
mergedState[key] = get();
|
|
24
|
-
devtools.send(typeof action === 'string' ? {
|
|
25
|
-
type: action
|
|
26
|
-
} : action || {
|
|
27
|
-
type: `SET_${key}`,
|
|
28
|
-
value
|
|
29
|
-
}, mergedState);
|
|
30
|
-
};
|
|
31
|
-
};
|
|
1
|
+
//#region src/middleware/reduxDevtools.ts
|
|
2
|
+
const reduxDevtools = ({ name } = {}) => {
|
|
3
|
+
let devtoolsExt;
|
|
4
|
+
if (typeof window === "undefined" || !(devtoolsExt = window.__REDUX_DEVTOOLS_EXTENSION__)) return;
|
|
5
|
+
const devtools = devtoolsExt.connect({ name });
|
|
6
|
+
const mergedState = {};
|
|
7
|
+
return ({ set, get, meta }) => {
|
|
8
|
+
const key = meta()?.key;
|
|
9
|
+
if (!key) throw new Error("[reactish-state] state should be provided with a string `key` in the config object when the `reduxDevtools` middleware is used.");
|
|
10
|
+
mergedState[key] = get();
|
|
11
|
+
devtools.init(mergedState);
|
|
12
|
+
return (value, action) => {
|
|
13
|
+
set(value, action);
|
|
14
|
+
mergedState[key] = get();
|
|
15
|
+
devtools.send(typeof action === "string" ? { type: action } : action || {
|
|
16
|
+
type: `SET_${key}`,
|
|
17
|
+
value
|
|
18
|
+
}, mergedState);
|
|
19
|
+
};
|
|
20
|
+
};
|
|
32
21
|
};
|
|
33
22
|
|
|
34
|
-
|
|
23
|
+
//#endregion
|
|
24
|
+
export { reduxDevtools };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/plugin/applyPlugin.ts
|
|
2
|
+
const applyPlugin = (plugins) => (selector) => plugins.forEach((plugin) => plugin?.(selector));
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
//#endregion
|
|
5
|
+
export { applyPlugin };
|
|
@@ -1,26 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const updateState = () => {
|
|
18
|
-
mergedState[key] = get();
|
|
19
|
-
devtools.init(mergedState);
|
|
20
|
-
};
|
|
21
|
-
updateState();
|
|
22
|
-
subscribe(updateState);
|
|
23
|
-
};
|
|
1
|
+
//#region src/plugin/reduxDevtools.ts
|
|
2
|
+
const reduxDevtools = ({ name } = {}) => {
|
|
3
|
+
let devtoolsExt;
|
|
4
|
+
if (typeof window === "undefined" || !(devtoolsExt = window.__REDUX_DEVTOOLS_EXTENSION__)) return;
|
|
5
|
+
const devtools = devtoolsExt.connect({ name });
|
|
6
|
+
const mergedState = {};
|
|
7
|
+
return ({ get, subscribe, meta }) => {
|
|
8
|
+
const key = meta()?.key;
|
|
9
|
+
if (!key) throw new Error("[reactish-state] selector should be provided with a string `key` in the config object when the `reduxDevtools` plugin is used.");
|
|
10
|
+
const updateState = () => {
|
|
11
|
+
mergedState[key] = get();
|
|
12
|
+
devtools.init(mergedState);
|
|
13
|
+
};
|
|
14
|
+
updateState();
|
|
15
|
+
subscribe(updateState);
|
|
16
|
+
};
|
|
24
17
|
};
|
|
25
18
|
|
|
26
|
-
|
|
19
|
+
//#endregion
|
|
20
|
+
export { reduxDevtools };
|
package/dist/esm/react/shim.mjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from "react";
|
|
2
2
|
|
|
3
|
+
//#region src/react/shim.ts
|
|
3
4
|
let useSyncExternalStore = React.useSyncExternalStore;
|
|
4
5
|
const setReactShim = ([shim]) => {
|
|
5
|
-
|
|
6
|
+
useSyncExternalStore = shim;
|
|
6
7
|
};
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
//#endregion
|
|
10
|
+
export { setReactShim, useSyncExternalStore };
|
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
import { createSubscriber, getSelectorValues, isEqual } from '../utils.mjs';
|
|
3
|
-
import { useSnapshot } from './useSnapshot.mjs';
|
|
1
|
+
'use client';
|
|
4
2
|
|
|
3
|
+
import { createSubscriber, getSelectorValues, isEqual } from "../utils.mjs";
|
|
4
|
+
import { useSnapshot } from "./useSnapshot.mjs";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
|
|
7
|
+
//#region src/react/useSelector.ts
|
|
5
8
|
const useSelector = (selectorParamFactory, deps) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
subscribe: context[1]
|
|
24
|
-
});
|
|
9
|
+
const items = selectorParamFactory();
|
|
10
|
+
const cutoff = items.length - 1;
|
|
11
|
+
const selectorFunc = items[cutoff];
|
|
12
|
+
items.length = cutoff;
|
|
13
|
+
const [context] = useState(() => [, createSubscriber(items)]);
|
|
14
|
+
return useSnapshot({
|
|
15
|
+
get: () => {
|
|
16
|
+
const [cache] = context;
|
|
17
|
+
const selectorValues = getSelectorValues(items);
|
|
18
|
+
const args = selectorValues.concat(deps || selectorFunc);
|
|
19
|
+
if (cache && isEqual(args, cache[0])) return cache[1];
|
|
20
|
+
const value = selectorFunc(...selectorValues);
|
|
21
|
+
context[0] = [args, value];
|
|
22
|
+
return value;
|
|
23
|
+
},
|
|
24
|
+
subscribe: context[1]
|
|
25
|
+
});
|
|
25
26
|
};
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
//#endregion
|
|
29
|
+
export { useSelector };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
return useSyncExternalStore(subscribe, get, get);
|
|
3
|
+
import { useSyncExternalStore } from "./shim.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/react/useSnapshot.ts
|
|
6
|
+
const useSnapshot = ({ subscribe, get }) => {
|
|
7
|
+
if (!useSyncExternalStore) throw new Error("[reactish-state] Shim setup is required for React 16/17. See: https://github.com/szhsin/reactish-state/tree/master?tab=readme-ov-file#react-1617-setup");
|
|
8
|
+
return useSyncExternalStore(subscribe, get, get);
|
|
11
9
|
};
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
//#endregion
|
|
12
|
+
export { useSnapshot };
|
package/dist/esm/shim/index.mjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { useSyncExternalStore } from
|
|
1
|
+
import { useSyncExternalStore } from "use-sync-external-store/shim/index.js";
|
|
2
2
|
|
|
3
|
+
//#region src/shim/reactShim.ts
|
|
3
4
|
const reactShim = [useSyncExternalStore];
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
//#endregion
|
|
7
|
+
export { reactShim };
|
package/dist/esm/utils.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
//#region src/utils.ts
|
|
1
2
|
const isEqual = (args1, args2) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
return true;
|
|
3
|
+
for (let i = 0; i < args1.length; i++) if (!Object.is(args1[i], args2[i])) return false;
|
|
4
|
+
return true;
|
|
6
5
|
};
|
|
7
|
-
const createSubscriber = items => listener => {
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
const createSubscriber = (items) => (listener) => {
|
|
7
|
+
const unsubscribers = items.map((item) => item.subscribe(listener));
|
|
8
|
+
return () => unsubscribers.forEach((unsubscribe) => unsubscribe());
|
|
10
9
|
};
|
|
11
|
-
const getSelectorValues = items => items.map(item => item.get());
|
|
10
|
+
const getSelectorValues = (items) => items.map((item) => item.get());
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
//#endregion
|
|
13
|
+
export { createSubscriber, getSelectorValues, isEqual };
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { createSubscriber, getSelectorValues, isEqual } from
|
|
1
|
+
import { createSubscriber, getSelectorValues, isEqual } from "../utils.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
const selector =
|
|
3
|
+
//#region src/vanilla/selector.ts
|
|
4
|
+
const selectorBuilder = (plugin) => ((...items) => {
|
|
5
|
+
const length = items.length;
|
|
6
|
+
const cutoff = typeof items[length - 1] === "function" ? length - 1 : length - 2;
|
|
7
|
+
const selectorFunc = items[cutoff];
|
|
8
|
+
const metadata = items[cutoff + 1];
|
|
9
|
+
items.length = cutoff;
|
|
10
|
+
let cache;
|
|
11
|
+
const selector$1 = {
|
|
12
|
+
get: () => {
|
|
13
|
+
const args = getSelectorValues(items);
|
|
14
|
+
if (cache && isEqual(args, cache[0])) return cache[1];
|
|
15
|
+
const value = selectorFunc(...args);
|
|
16
|
+
cache = [args, value];
|
|
17
|
+
return value;
|
|
18
|
+
},
|
|
19
|
+
subscribe: createSubscriber(items),
|
|
20
|
+
meta: () => metadata
|
|
21
|
+
};
|
|
22
|
+
plugin?.(selector$1);
|
|
23
|
+
return selector$1;
|
|
24
|
+
});
|
|
25
|
+
const selector = selectorBuilder();
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
//#endregion
|
|
28
|
+
export { selector, selectorBuilder };
|
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
32
|
-
const state =
|
|
1
|
+
//#region src/vanilla/state.ts
|
|
2
|
+
const stateBuilder = (middleware) => ((initialValue, actionBuilder, metadata) => {
|
|
3
|
+
let value = initialValue;
|
|
4
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
5
|
+
const get = () => value;
|
|
6
|
+
const readonlyState = {
|
|
7
|
+
get,
|
|
8
|
+
meta: () => metadata,
|
|
9
|
+
subscribe: (listener) => {
|
|
10
|
+
listeners.add(listener);
|
|
11
|
+
return () => listeners.delete(listener);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
let set = (newValue) => {
|
|
15
|
+
const nextValue = typeof newValue === "function" ? newValue(value) : newValue;
|
|
16
|
+
if (!Object.is(value, nextValue)) {
|
|
17
|
+
const prevValue = value;
|
|
18
|
+
value = nextValue;
|
|
19
|
+
listeners.forEach((listener) => listener(nextValue, prevValue));
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
if (middleware) set = middleware({
|
|
23
|
+
...readonlyState,
|
|
24
|
+
set
|
|
25
|
+
});
|
|
26
|
+
return {
|
|
27
|
+
...actionBuilder?.(set, get),
|
|
28
|
+
...readonlyState,
|
|
29
|
+
set
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
const state = stateBuilder();
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
//#endregion
|
|
35
|
+
export { state, stateBuilder };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reactish-state",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Simple, decentralized (atomic) state management for React.",
|
|
5
5
|
"author": "Zheng Song",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,19 +27,19 @@
|
|
|
27
27
|
"redux"
|
|
28
28
|
],
|
|
29
29
|
"scripts": {
|
|
30
|
-
"start": "run-p watch \"
|
|
31
|
-
"bundle": "
|
|
32
|
-
"watch": "
|
|
30
|
+
"start": "run-p watch \"tc -- --watch\"",
|
|
31
|
+
"bundle": "rolldown -c",
|
|
32
|
+
"watch": "rolldown -w -c",
|
|
33
33
|
"clean": "rm -Rf dist types",
|
|
34
|
-
"
|
|
34
|
+
"tc": "tsc",
|
|
35
35
|
"prepare": "rm -Rf types/__tests__",
|
|
36
|
-
"lint": "
|
|
37
|
-
"lint:
|
|
36
|
+
"lint": "oxlint --type-aware .",
|
|
37
|
+
"lint:es": "eslint .",
|
|
38
38
|
"pret": "prettier -c .",
|
|
39
39
|
"pret:fix": "prettier -w .",
|
|
40
|
-
"build": "run-s pret clean
|
|
41
|
-
"test": "
|
|
42
|
-
"test:watch": "
|
|
40
|
+
"build": "run-s pret clean tc lint lint:es bundle",
|
|
41
|
+
"test": "vitest run",
|
|
42
|
+
"test:watch": "vitest",
|
|
43
43
|
"eg": "npm run dev --prefix examples"
|
|
44
44
|
},
|
|
45
45
|
"exports": {
|
|
@@ -80,40 +80,36 @@
|
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"use-sync-external-store": "^1.
|
|
83
|
+
"use-sync-external-store": "^1.6.0"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"@babel/core": "^7.28.4",
|
|
87
|
-
"@babel/preset-env": "^7.28.3",
|
|
88
|
-
"@babel/preset-react": "^7.27.1",
|
|
89
|
-
"@babel/preset-typescript": "^7.27.1",
|
|
90
86
|
"@redux-devtools/extension": "^3.3.0",
|
|
91
|
-
"@
|
|
92
|
-
"@
|
|
93
|
-
"@
|
|
94
|
-
"@
|
|
95
|
-
"@testing-library/react": "^16.3.0",
|
|
96
|
-
"@types/jest": "^30.0.0",
|
|
97
|
-
"@types/react": "^19.1.12",
|
|
87
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
88
|
+
"@testing-library/react": "^16.3.1",
|
|
89
|
+
"@types/node": "^25.0.3",
|
|
90
|
+
"@types/react": "^19.2.7",
|
|
98
91
|
"@types/use-sync-external-store": "^1.5.0",
|
|
99
|
-
"
|
|
92
|
+
"@vitest/coverage-istanbul": "^4.0.16",
|
|
93
|
+
"@vitest/eslint-plugin": "^1.6.4",
|
|
100
94
|
"deplift": "^1.0.1",
|
|
101
|
-
"eslint": "^9.
|
|
95
|
+
"eslint": "^9.39.2",
|
|
102
96
|
"eslint-config-prettier": "^10.1.8",
|
|
103
|
-
"eslint-plugin-jest": "^29.0.1",
|
|
104
97
|
"eslint-plugin-react": "^7.37.5",
|
|
105
|
-
"eslint-plugin-react-hooks": "^
|
|
98
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
106
99
|
"eslint-plugin-react-hooks-addons": "^0.5.0",
|
|
107
|
-
"globals": "^16.
|
|
108
|
-
"immer": "^
|
|
109
|
-
"
|
|
110
|
-
"jest-environment-jsdom": "^30.1.2",
|
|
100
|
+
"globals": "^16.5.0",
|
|
101
|
+
"immer": "^11.1.0",
|
|
102
|
+
"jsdom": "^27.4.0",
|
|
111
103
|
"npm-run-all": "^4.1.5",
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
104
|
+
"oxlint": "^1.35.0",
|
|
105
|
+
"oxlint-tsgolint": "^0.10.0",
|
|
106
|
+
"prettier": "^3.7.4",
|
|
107
|
+
"react": "^19.2.3",
|
|
108
|
+
"react-dom": "^19.2.3",
|
|
109
|
+
"rolldown": "^1.0.0-beta.57",
|
|
110
|
+
"rollup-plugin-add-directive": "^1.0.0",
|
|
111
|
+
"typescript": "^5.9.3",
|
|
112
|
+
"typescript-eslint": "^8.50.1",
|
|
113
|
+
"vitest": "^4.0.16"
|
|
118
114
|
}
|
|
119
115
|
}
|