react-redux-cache 0.16.0-rc.0 → 0.16.1-rc.0
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/createCache.js +17 -16
- package/package.json +2 -1
package/dist/createCache.js
CHANGED
|
@@ -24,26 +24,27 @@ const withTypenames = () => {
|
|
|
24
24
|
*/
|
|
25
25
|
return {
|
|
26
26
|
createCache: (partialCache) => {
|
|
27
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m
|
|
28
|
-
var _q, _r, _s, _t
|
|
27
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
28
|
+
var _o, _p, _q, _r, _s, _t;
|
|
29
29
|
const abortControllers = new WeakMap();
|
|
30
30
|
// provide all optional fields
|
|
31
31
|
(_a = partialCache.options) !== null && _a !== void 0 ? _a : (partialCache.options = {});
|
|
32
|
-
(_b = (
|
|
33
|
-
(_c = (
|
|
34
|
-
(_d = (
|
|
32
|
+
(_b = (_o = partialCache.options).logsEnabled) !== null && _b !== void 0 ? _b : (_o.logsEnabled = false);
|
|
33
|
+
(_c = (_p = partialCache.options).additionalValidation) !== null && _c !== void 0 ? _c : (_p.additionalValidation = utilsAndConstants_1.IS_DEV);
|
|
34
|
+
(_d = (_q = partialCache.options).deepComparisonEnabled) !== null && _d !== void 0 ? _d : (_q.deepComparisonEnabled = true);
|
|
35
35
|
(_e = partialCache.globals) !== null && _e !== void 0 ? _e : (partialCache.globals = {});
|
|
36
|
-
(_f = (
|
|
37
|
-
(_g = (
|
|
38
|
-
(_h = (
|
|
39
|
-
(_j = partialCache.storeHooks) !== null && _j !== void 0 ? _j : (partialCache.storeHooks = {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
(
|
|
46
|
-
(
|
|
36
|
+
(_f = (_r = partialCache.globals).queries) !== null && _f !== void 0 ? _f : (_r.queries = {});
|
|
37
|
+
(_g = (_s = partialCache.globals.queries).fetchPolicy) !== null && _g !== void 0 ? _g : (_s.fetchPolicy = utilsAndConstants_1.FetchPolicy.NoCacheOrExpired);
|
|
38
|
+
(_h = (_t = partialCache.globals.queries).skipFetch) !== null && _h !== void 0 ? _h : (_t.skipFetch = false);
|
|
39
|
+
(_j = partialCache.storeHooks) !== null && _j !== void 0 ? _j : (partialCache.storeHooks = {
|
|
40
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
41
|
+
useStore: require('react-redux').useStore,
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
43
|
+
useSelector: require('react-redux').useSelector,
|
|
44
|
+
});
|
|
45
|
+
(_k = partialCache.cacheStateSelector) !== null && _k !== void 0 ? _k : (partialCache.cacheStateSelector = (state) => state[cache.name]);
|
|
46
|
+
(_l = partialCache.mutations) !== null && _l !== void 0 ? _l : (partialCache.mutations = {});
|
|
47
|
+
(_m = partialCache.queries) !== null && _m !== void 0 ? _m : (partialCache.queries = {});
|
|
47
48
|
// @ts-expect-error private field for testing
|
|
48
49
|
partialCache.abortControllers = abortControllers;
|
|
49
50
|
const cache = partialCache;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "react-redux-cache",
|
|
3
3
|
"author": "Alexander Danilov",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "0.16.
|
|
5
|
+
"version": "0.16.1-rc.0",
|
|
6
6
|
"description": "Powerful data fetching and caching library that supports normalization, built on top of redux",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"build": "yarn clean && yarn lint && tsc && rm -rf dist/testing && rm -rf dist/__tests__",
|
|
14
14
|
"test": "node node_modules/jest/bin/jest.js",
|
|
15
15
|
"preminor-rc": "yarn build && npm version preminor --preid rc",
|
|
16
|
+
"prepatch-rc": "yarn build && npm version prepatch --preid rc",
|
|
16
17
|
"publish-rc": "npm publish --tag rc",
|
|
17
18
|
"prepublishOnly": "yarn build && yarn test"
|
|
18
19
|
},
|