isomorfeus-redux 4.2.0 → 22.9.0.rc1
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.
- checksums.yaml +4 -4
- data/README.md +176 -0
- data/lib/app_state.rb +25 -0
- data/lib/isomorfeus/browser_store_api.rb +0 -16
- data/lib/isomorfeus/redux/config.rb +97 -14
- data/lib/isomorfeus/redux/handler.rb +35 -0
- data/lib/isomorfeus/redux/version.rb +5 -0
- data/lib/isomorfeus/redux_imports.rb +14 -0
- data/lib/{redux/reducers.rb → isomorfeus/redux_reducers.rb} +15 -13
- data/lib/isomorfeus-redux.rb +18 -30
- data/lib/local_store.rb +27 -30
- data/lib/redux/store.rb +156 -120
- data/lib/session_store.rb +28 -30
- metadata +24 -247
- data/lib/app_store.rb +0 -42
- data/lib/isomorfeus/core_ext/hash/deep_merge.rb +0 -34
- data/lib/isomorfeus/core_ext/kernel.rb +0 -30
- data/lib/isomorfeus/execution_environment.rb +0 -67
- data/lib/isomorfeus/redux/imports.rb +0 -17
- data/lib/redux/version.rb +0 -3
- data/lib/redux.rb +0 -118
- data/node_modules/.package-lock.json +0 -31
- data/node_modules/@babel/runtime/LICENSE +0 -22
- data/node_modules/@babel/runtime/README.md +0 -19
- data/node_modules/@babel/runtime/helpers/AsyncGenerator.js +0 -99
- data/node_modules/@babel/runtime/helpers/AwaitValue.js +0 -6
- data/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js +0 -31
- data/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +0 -12
- data/node_modules/@babel/runtime/helpers/arrayWithHoles.js +0 -6
- data/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +0 -8
- data/node_modules/@babel/runtime/helpers/assertThisInitialized.js +0 -10
- data/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js +0 -57
- data/node_modules/@babel/runtime/helpers/asyncIterator.js +0 -16
- data/node_modules/@babel/runtime/helpers/asyncToGenerator.js +0 -38
- data/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js +0 -8
- data/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js +0 -8
- data/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +0 -23
- data/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +0 -10
- data/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +0 -14
- data/node_modules/@babel/runtime/helpers/classCallCheck.js +0 -8
- data/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +0 -8
- data/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +0 -8
- data/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +0 -10
- data/node_modules/@babel/runtime/helpers/classNameTDZError.js +0 -6
- data/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +0 -11
- data/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +0 -11
- data/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js +0 -9
- data/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js +0 -10
- data/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js +0 -8
- data/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +0 -12
- data/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +0 -10
- data/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js +0 -9
- data/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +0 -6
- data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +0 -14
- data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +0 -14
- data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +0 -15
- data/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js +0 -9
- data/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +0 -6
- data/node_modules/@babel/runtime/helpers/construct.js +0 -26
- data/node_modules/@babel/runtime/helpers/createClass.js +0 -18
- data/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +0 -61
- data/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js +0 -25
- data/node_modules/@babel/runtime/helpers/createSuper.js +0 -25
- data/node_modules/@babel/runtime/helpers/decorate.js +0 -401
- data/node_modules/@babel/runtime/helpers/defaults.js +0 -17
- data/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +0 -25
- data/node_modules/@babel/runtime/helpers/defineProperty.js +0 -17
- data/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js +0 -95
- data/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js +0 -28
- data/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -9
- data/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +0 -4
- data/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js +0 -54
- data/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +0 -13
- data/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +0 -35
- data/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js +0 -4
- data/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js +0 -5
- data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +0 -20
- data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +0 -11
- data/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +0 -5
- data/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +0 -5
- data/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +0 -5
- data/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +0 -6
- data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +0 -6
- data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js +0 -5
- data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js +0 -4
- data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js +0 -5
- data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +0 -8
- data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +0 -8
- data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +0 -9
- data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js +0 -5
- data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/construct.js +0 -18
- data/node_modules/@babel/runtime/helpers/esm/createClass.js +0 -15
- data/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +0 -57
- data/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js +0 -21
- data/node_modules/@babel/runtime/helpers/esm/createSuper.js +0 -19
- data/node_modules/@babel/runtime/helpers/esm/decorate.js +0 -396
- data/node_modules/@babel/runtime/helpers/esm/defaults.js +0 -14
- data/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +0 -22
- data/node_modules/@babel/runtime/helpers/esm/defineProperty.js +0 -14
- data/node_modules/@babel/runtime/helpers/esm/extends.js +0 -17
- data/node_modules/@babel/runtime/helpers/esm/get.js +0 -20
- data/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -6
- data/node_modules/@babel/runtime/helpers/esm/inherits.js +0 -15
- data/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +0 -6
- data/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js +0 -9
- data/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/instanceof.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js +0 -5
- data/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +0 -51
- data/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +0 -12
- data/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +0 -29
- data/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js +0 -14
- data/node_modules/@babel/runtime/helpers/esm/jsx.js +0 -46
- data/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js +0 -9
- data/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js +0 -5
- data/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/objectSpread.js +0 -19
- data/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +0 -39
- data/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +0 -19
- data/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -14
- data/node_modules/@babel/runtime/helpers/esm/package.json +0 -3
- data/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +0 -11
- data/node_modules/@babel/runtime/helpers/esm/readOnlyError.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/set.js +0 -51
- data/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -8
- data/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/slicedToArrayLoose.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/superPropBase.js +0 -9
- data/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +0 -11
- data/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js +0 -8
- data/node_modules/@babel/runtime/helpers/esm/tdz.js +0 -3
- data/node_modules/@babel/runtime/helpers/esm/temporalRef.js +0 -5
- data/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js +0 -1
- data/node_modules/@babel/runtime/helpers/esm/toArray.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +0 -7
- data/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -13
- data/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +0 -6
- data/node_modules/@babel/runtime/helpers/esm/typeof.js +0 -15
- data/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -9
- data/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +0 -6
- data/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +0 -37
- data/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +0 -65
- data/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js +0 -3
- data/node_modules/@babel/runtime/helpers/extends.js +0 -21
- data/node_modules/@babel/runtime/helpers/get.js +0 -27
- data/node_modules/@babel/runtime/helpers/getPrototypeOf.js +0 -10
- data/node_modules/@babel/runtime/helpers/inherits.js +0 -19
- data/node_modules/@babel/runtime/helpers/inheritsLoose.js +0 -10
- data/node_modules/@babel/runtime/helpers/initializerDefineProperty.js +0 -12
- data/node_modules/@babel/runtime/helpers/initializerWarningHelper.js +0 -6
- data/node_modules/@babel/runtime/helpers/instanceof.js +0 -10
- data/node_modules/@babel/runtime/helpers/interopRequireDefault.js +0 -8
- data/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +0 -54
- data/node_modules/@babel/runtime/helpers/isNativeFunction.js +0 -6
- data/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js +0 -15
- data/node_modules/@babel/runtime/helpers/iterableToArray.js +0 -6
- data/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +0 -32
- data/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js +0 -17
- data/node_modules/@babel/runtime/helpers/jsx.js +0 -50
- data/node_modules/@babel/runtime/helpers/maybeArrayLike.js +0 -13
- data/node_modules/@babel/runtime/helpers/newArrowCheck.js +0 -8
- data/node_modules/@babel/runtime/helpers/nonIterableRest.js +0 -6
- data/node_modules/@babel/runtime/helpers/nonIterableSpread.js +0 -6
- data/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js +0 -6
- data/node_modules/@babel/runtime/helpers/objectSpread.js +0 -23
- data/node_modules/@babel/runtime/helpers/objectSpread2.js +0 -42
- data/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +0 -23
- data/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +0 -17
- data/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +0 -16
- data/node_modules/@babel/runtime/helpers/readOnlyError.js +0 -6
- data/node_modules/@babel/runtime/helpers/set.js +0 -55
- data/node_modules/@babel/runtime/helpers/setPrototypeOf.js +0 -12
- data/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js +0 -10
- data/node_modules/@babel/runtime/helpers/slicedToArray.js +0 -14
- data/node_modules/@babel/runtime/helpers/slicedToArrayLoose.js +0 -14
- data/node_modules/@babel/runtime/helpers/superPropBase.js +0 -13
- data/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js +0 -14
- data/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js +0 -11
- data/node_modules/@babel/runtime/helpers/tdz.js +0 -6
- data/node_modules/@babel/runtime/helpers/temporalRef.js +0 -10
- data/node_modules/@babel/runtime/helpers/temporalUndefined.js +0 -4
- data/node_modules/@babel/runtime/helpers/toArray.js +0 -14
- data/node_modules/@babel/runtime/helpers/toConsumableArray.js +0 -14
- data/node_modules/@babel/runtime/helpers/toPrimitive.js +0 -17
- data/node_modules/@babel/runtime/helpers/toPropertyKey.js +0 -11
- data/node_modules/@babel/runtime/helpers/typeof.js +0 -22
- data/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +0 -13
- data/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +0 -10
- data/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +0 -45
- data/node_modules/@babel/runtime/helpers/wrapRegExp.js +0 -72
- data/node_modules/@babel/runtime/helpers/writeOnlyError.js +0 -6
- data/node_modules/@babel/runtime/package.json +0 -848
- data/node_modules/@babel/runtime/regenerator/index.js +0 -1
- data/node_modules/redux/LICENSE.md +0 -21
- data/node_modules/redux/README.md +0 -322
- data/node_modules/redux/dist/redux.js +0 -768
- data/node_modules/redux/dist/redux.min.js +0 -1
- data/node_modules/redux/es/redux.js +0 -716
- data/node_modules/redux/es/redux.mjs +0 -1
- data/node_modules/redux/index.d.ts +0 -776
- data/node_modules/redux/lib/redux.js +0 -730
- data/node_modules/redux/package.json +0 -108
- data/node_modules/redux/src/applyMiddleware.js +0 -41
- data/node_modules/redux/src/bindActionCreators.js +0 -52
- data/node_modules/redux/src/combineReducers.js +0 -175
- data/node_modules/redux/src/compose.js +0 -22
- data/node_modules/redux/src/createStore.js +0 -347
- data/node_modules/redux/src/index.js +0 -37
- data/node_modules/redux/src/utils/actionTypes.js +0 -17
- data/node_modules/redux/src/utils/formatProdErrorMessage.js +0 -15
- data/node_modules/redux/src/utils/isPlainObject.js +0 -14
- data/node_modules/redux/src/utils/kindOf.js +0 -70
- data/node_modules/redux/src/utils/symbol-observable.js +0 -3
- data/node_modules/redux/src/utils/warning.js +0 -19
- data/node_modules/regenerator-runtime/LICENSE +0 -21
- data/node_modules/regenerator-runtime/README.md +0 -31
- data/node_modules/regenerator-runtime/package.json +0 -19
- data/node_modules/regenerator-runtime/path.js +0 -11
- data/node_modules/regenerator-runtime/runtime.js +0 -754
- data/package.json +0 -6
@@ -1,108 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "redux",
|
3
|
-
"version": "4.2.0",
|
4
|
-
"description": "Predictable state container for JavaScript apps",
|
5
|
-
"license": "MIT",
|
6
|
-
"homepage": "http://redux.js.org",
|
7
|
-
"repository": "github:reduxjs/redux",
|
8
|
-
"bugs": "https://github.com/reduxjs/redux/issues",
|
9
|
-
"keywords": [
|
10
|
-
"redux",
|
11
|
-
"reducer",
|
12
|
-
"state",
|
13
|
-
"predictable",
|
14
|
-
"functional",
|
15
|
-
"immutable",
|
16
|
-
"hot",
|
17
|
-
"live",
|
18
|
-
"replay",
|
19
|
-
"flux",
|
20
|
-
"elm"
|
21
|
-
],
|
22
|
-
"authors": [
|
23
|
-
"Dan Abramov <dan.abramov@me.com> (https://github.com/gaearon)",
|
24
|
-
"Andrew Clark <acdlite@me.com> (https://github.com/acdlite)"
|
25
|
-
],
|
26
|
-
"main": "lib/redux.js",
|
27
|
-
"unpkg": "dist/redux.js",
|
28
|
-
"module": "es/redux.js",
|
29
|
-
"typings": "./index.d.ts",
|
30
|
-
"files": [
|
31
|
-
"dist",
|
32
|
-
"lib",
|
33
|
-
"es",
|
34
|
-
"src",
|
35
|
-
"index.d.ts"
|
36
|
-
],
|
37
|
-
"scripts": {
|
38
|
-
"clean": "rimraf lib dist es coverage",
|
39
|
-
"format": "prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"",
|
40
|
-
"format:check": "prettier --list-different \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"",
|
41
|
-
"lint": "eslint src test",
|
42
|
-
"test": "jest",
|
43
|
-
"test:watch": "npm test -- --watch",
|
44
|
-
"test:cov": "npm test -- --coverage",
|
45
|
-
"build": "rollup -c",
|
46
|
-
"pretest": "npm run build",
|
47
|
-
"prepublishOnly": "npm run clean && npm run format:check && npm run lint && npm test",
|
48
|
-
"examples:lint": "eslint examples",
|
49
|
-
"examples:test": "cross-env CI=true babel-node examples/testAll.js"
|
50
|
-
},
|
51
|
-
"dependencies": {
|
52
|
-
"@babel/runtime": "^7.9.2"
|
53
|
-
},
|
54
|
-
"devDependencies": {
|
55
|
-
"@babel/cli": "^7.8.4",
|
56
|
-
"@babel/core": "^7.9.0",
|
57
|
-
"@babel/node": "^7.8.7",
|
58
|
-
"@babel/plugin-external-helpers": "^7.8.3",
|
59
|
-
"@babel/plugin-proposal-object-rest-spread": "^7.9.5",
|
60
|
-
"@babel/plugin-transform-runtime": "^7.9.0",
|
61
|
-
"@babel/preset-env": "^7.9.5",
|
62
|
-
"@babel/preset-flow": "^7.9.0",
|
63
|
-
"@babel/preset-typescript": "^7.9.0",
|
64
|
-
"@babel/register": "^7.9.0",
|
65
|
-
"@rollup/plugin-babel": "^5.3.0",
|
66
|
-
"@rollup/plugin-node-resolve": "^7.1.3",
|
67
|
-
"@rollup/plugin-replace": "^2.3.2",
|
68
|
-
"@types/jest": "^25.2.1",
|
69
|
-
"@types/node": "^13.13.4",
|
70
|
-
"@typescript-eslint/eslint-plugin": "^2.29.0",
|
71
|
-
"@typescript-eslint/parser": "^2.29.0",
|
72
|
-
"babel-eslint": "^10.1.0",
|
73
|
-
"babel-jest": "^25.4.0",
|
74
|
-
"cross-env": "^7.0.2",
|
75
|
-
"eslint": "^6.8.0",
|
76
|
-
"eslint-config-react-app": "^5.2.1",
|
77
|
-
"eslint-import-resolver-typescript": "^2.0.0",
|
78
|
-
"eslint-plugin-flowtype": "^4.7.0",
|
79
|
-
"eslint-plugin-import": "^2.20.2",
|
80
|
-
"eslint-plugin-jsx-a11y": "^6.2.3",
|
81
|
-
"eslint-plugin-react": "^7.19.0",
|
82
|
-
"eslint-plugin-react-hooks": "^3.0.0",
|
83
|
-
"glob": "^7.1.6",
|
84
|
-
"jest": "^25.4.0",
|
85
|
-
"prettier": "^2.0.5",
|
86
|
-
"rimraf": "^3.0.2",
|
87
|
-
"rollup": "^2.7.2",
|
88
|
-
"rollup-plugin-terser": "^5.3.0",
|
89
|
-
"rollup-plugin-typescript2": "^0.27.0",
|
90
|
-
"rxjs": "^6.5.5",
|
91
|
-
"typescript": "^3.8.3",
|
92
|
-
"typings-tester": "^0.3.2"
|
93
|
-
},
|
94
|
-
"npmName": "redux",
|
95
|
-
"npmFileMap": [
|
96
|
-
{
|
97
|
-
"basePath": "/dist/",
|
98
|
-
"files": [
|
99
|
-
"*.js"
|
100
|
-
]
|
101
|
-
}
|
102
|
-
],
|
103
|
-
"jest": {
|
104
|
-
"testRegex": "(/test/.*\\.spec\\.[tj]s)$",
|
105
|
-
"coverageProvider": "v8"
|
106
|
-
},
|
107
|
-
"sideEffects": false
|
108
|
-
}
|
@@ -1,41 +0,0 @@
|
|
1
|
-
import compose from './compose'
|
2
|
-
|
3
|
-
/**
|
4
|
-
* Creates a store enhancer that applies middleware to the dispatch method
|
5
|
-
* of the Redux store. This is handy for a variety of tasks, such as expressing
|
6
|
-
* asynchronous actions in a concise manner, or logging every action payload.
|
7
|
-
*
|
8
|
-
* See `redux-thunk` package as an example of the Redux middleware.
|
9
|
-
*
|
10
|
-
* Because middleware is potentially asynchronous, this should be the first
|
11
|
-
* store enhancer in the composition chain.
|
12
|
-
*
|
13
|
-
* Note that each middleware will be given the `dispatch` and `getState` functions
|
14
|
-
* as named arguments.
|
15
|
-
*
|
16
|
-
* @param {...Function} middlewares The middleware chain to be applied.
|
17
|
-
* @returns {Function} A store enhancer applying the middleware.
|
18
|
-
*/
|
19
|
-
export default function applyMiddleware(...middlewares) {
|
20
|
-
return (createStore) => (...args) => {
|
21
|
-
const store = createStore(...args)
|
22
|
-
let dispatch = () => {
|
23
|
-
throw new Error(
|
24
|
-
'Dispatching while constructing your middleware is not allowed. ' +
|
25
|
-
'Other middleware would not be applied to this dispatch.'
|
26
|
-
)
|
27
|
-
}
|
28
|
-
|
29
|
-
const middlewareAPI = {
|
30
|
-
getState: store.getState,
|
31
|
-
dispatch: (...args) => dispatch(...args),
|
32
|
-
}
|
33
|
-
const chain = middlewares.map((middleware) => middleware(middlewareAPI))
|
34
|
-
dispatch = compose(...chain)(store.dispatch)
|
35
|
-
|
36
|
-
return {
|
37
|
-
...store,
|
38
|
-
dispatch,
|
39
|
-
}
|
40
|
-
}
|
41
|
-
}
|
@@ -1,52 +0,0 @@
|
|
1
|
-
import { kindOf } from './utils/kindOf'
|
2
|
-
|
3
|
-
function bindActionCreator(actionCreator, dispatch) {
|
4
|
-
return function () {
|
5
|
-
return dispatch(actionCreator.apply(this, arguments))
|
6
|
-
}
|
7
|
-
}
|
8
|
-
|
9
|
-
/**
|
10
|
-
* Turns an object whose values are action creators, into an object with the
|
11
|
-
* same keys, but with every function wrapped into a `dispatch` call so they
|
12
|
-
* may be invoked directly. This is just a convenience method, as you can call
|
13
|
-
* `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
|
14
|
-
*
|
15
|
-
* For convenience, you can also pass an action creator as the first argument,
|
16
|
-
* and get a dispatch wrapped function in return.
|
17
|
-
*
|
18
|
-
* @param {Function|Object} actionCreators An object whose values are action
|
19
|
-
* creator functions. One handy way to obtain it is to use ES6 `import * as`
|
20
|
-
* syntax. You may also pass a single function.
|
21
|
-
*
|
22
|
-
* @param {Function} dispatch The `dispatch` function available on your Redux
|
23
|
-
* store.
|
24
|
-
*
|
25
|
-
* @returns {Function|Object} The object mimicking the original object, but with
|
26
|
-
* every action creator wrapped into the `dispatch` call. If you passed a
|
27
|
-
* function as `actionCreators`, the return value will also be a single
|
28
|
-
* function.
|
29
|
-
*/
|
30
|
-
export default function bindActionCreators(actionCreators, dispatch) {
|
31
|
-
if (typeof actionCreators === 'function') {
|
32
|
-
return bindActionCreator(actionCreators, dispatch)
|
33
|
-
}
|
34
|
-
|
35
|
-
if (typeof actionCreators !== 'object' || actionCreators === null) {
|
36
|
-
throw new Error(
|
37
|
-
`bindActionCreators expected an object or a function, but instead received: '${kindOf(
|
38
|
-
actionCreators
|
39
|
-
)}'. ` +
|
40
|
-
`Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?`
|
41
|
-
)
|
42
|
-
}
|
43
|
-
|
44
|
-
const boundActionCreators = {}
|
45
|
-
for (const key in actionCreators) {
|
46
|
-
const actionCreator = actionCreators[key]
|
47
|
-
if (typeof actionCreator === 'function') {
|
48
|
-
boundActionCreators[key] = bindActionCreator(actionCreator, dispatch)
|
49
|
-
}
|
50
|
-
}
|
51
|
-
return boundActionCreators
|
52
|
-
}
|
@@ -1,175 +0,0 @@
|
|
1
|
-
import ActionTypes from './utils/actionTypes'
|
2
|
-
import warning from './utils/warning'
|
3
|
-
import isPlainObject from './utils/isPlainObject'
|
4
|
-
import { kindOf } from './utils/kindOf'
|
5
|
-
|
6
|
-
function getUnexpectedStateShapeWarningMessage(
|
7
|
-
inputState,
|
8
|
-
reducers,
|
9
|
-
action,
|
10
|
-
unexpectedKeyCache
|
11
|
-
) {
|
12
|
-
const reducerKeys = Object.keys(reducers)
|
13
|
-
const argumentName =
|
14
|
-
action && action.type === ActionTypes.INIT
|
15
|
-
? 'preloadedState argument passed to createStore'
|
16
|
-
: 'previous state received by the reducer'
|
17
|
-
|
18
|
-
if (reducerKeys.length === 0) {
|
19
|
-
return (
|
20
|
-
'Store does not have a valid reducer. Make sure the argument passed ' +
|
21
|
-
'to combineReducers is an object whose values are reducers.'
|
22
|
-
)
|
23
|
-
}
|
24
|
-
|
25
|
-
if (!isPlainObject(inputState)) {
|
26
|
-
return (
|
27
|
-
`The ${argumentName} has unexpected type of "${kindOf(
|
28
|
-
inputState
|
29
|
-
)}". Expected argument to be an object with the following ` +
|
30
|
-
`keys: "${reducerKeys.join('", "')}"`
|
31
|
-
)
|
32
|
-
}
|
33
|
-
|
34
|
-
const unexpectedKeys = Object.keys(inputState).filter(
|
35
|
-
(key) => !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]
|
36
|
-
)
|
37
|
-
|
38
|
-
unexpectedKeys.forEach((key) => {
|
39
|
-
unexpectedKeyCache[key] = true
|
40
|
-
})
|
41
|
-
|
42
|
-
if (action && action.type === ActionTypes.REPLACE) return
|
43
|
-
|
44
|
-
if (unexpectedKeys.length > 0) {
|
45
|
-
return (
|
46
|
-
`Unexpected ${unexpectedKeys.length > 1 ? 'keys' : 'key'} ` +
|
47
|
-
`"${unexpectedKeys.join('", "')}" found in ${argumentName}. ` +
|
48
|
-
`Expected to find one of the known reducer keys instead: ` +
|
49
|
-
`"${reducerKeys.join('", "')}". Unexpected keys will be ignored.`
|
50
|
-
)
|
51
|
-
}
|
52
|
-
}
|
53
|
-
|
54
|
-
function assertReducerShape(reducers) {
|
55
|
-
Object.keys(reducers).forEach((key) => {
|
56
|
-
const reducer = reducers[key]
|
57
|
-
const initialState = reducer(undefined, { type: ActionTypes.INIT })
|
58
|
-
|
59
|
-
if (typeof initialState === 'undefined') {
|
60
|
-
throw new Error(
|
61
|
-
`The slice reducer for key "${key}" returned undefined during initialization. ` +
|
62
|
-
`If the state passed to the reducer is undefined, you must ` +
|
63
|
-
`explicitly return the initial state. The initial state may ` +
|
64
|
-
`not be undefined. If you don't want to set a value for this reducer, ` +
|
65
|
-
`you can use null instead of undefined.`
|
66
|
-
)
|
67
|
-
}
|
68
|
-
|
69
|
-
if (
|
70
|
-
typeof reducer(undefined, {
|
71
|
-
type: ActionTypes.PROBE_UNKNOWN_ACTION(),
|
72
|
-
}) === 'undefined'
|
73
|
-
) {
|
74
|
-
throw new Error(
|
75
|
-
`The slice reducer for key "${key}" returned undefined when probed with a random type. ` +
|
76
|
-
`Don't try to handle '${ActionTypes.INIT}' or other actions in "redux/*" ` +
|
77
|
-
`namespace. They are considered private. Instead, you must return the ` +
|
78
|
-
`current state for any unknown actions, unless it is undefined, ` +
|
79
|
-
`in which case you must return the initial state, regardless of the ` +
|
80
|
-
`action type. The initial state may not be undefined, but can be null.`
|
81
|
-
)
|
82
|
-
}
|
83
|
-
})
|
84
|
-
}
|
85
|
-
|
86
|
-
/**
|
87
|
-
* Turns an object whose values are different reducer functions, into a single
|
88
|
-
* reducer function. It will call every child reducer, and gather their results
|
89
|
-
* into a single state object, whose keys correspond to the keys of the passed
|
90
|
-
* reducer functions.
|
91
|
-
*
|
92
|
-
* @param {Object} reducers An object whose values correspond to different
|
93
|
-
* reducer functions that need to be combined into one. One handy way to obtain
|
94
|
-
* it is to use ES6 `import * as reducers` syntax. The reducers may never return
|
95
|
-
* undefined for any action. Instead, they should return their initial state
|
96
|
-
* if the state passed to them was undefined, and the current state for any
|
97
|
-
* unrecognized action.
|
98
|
-
*
|
99
|
-
* @returns {Function} A reducer function that invokes every reducer inside the
|
100
|
-
* passed object, and builds a state object with the same shape.
|
101
|
-
*/
|
102
|
-
export default function combineReducers(reducers) {
|
103
|
-
const reducerKeys = Object.keys(reducers)
|
104
|
-
const finalReducers = {}
|
105
|
-
for (let i = 0; i < reducerKeys.length; i++) {
|
106
|
-
const key = reducerKeys[i]
|
107
|
-
|
108
|
-
if (process.env.NODE_ENV !== 'production') {
|
109
|
-
if (typeof reducers[key] === 'undefined') {
|
110
|
-
warning(`No reducer provided for key "${key}"`)
|
111
|
-
}
|
112
|
-
}
|
113
|
-
|
114
|
-
if (typeof reducers[key] === 'function') {
|
115
|
-
finalReducers[key] = reducers[key]
|
116
|
-
}
|
117
|
-
}
|
118
|
-
const finalReducerKeys = Object.keys(finalReducers)
|
119
|
-
|
120
|
-
// This is used to make sure we don't warn about the same
|
121
|
-
// keys multiple times.
|
122
|
-
let unexpectedKeyCache
|
123
|
-
if (process.env.NODE_ENV !== 'production') {
|
124
|
-
unexpectedKeyCache = {}
|
125
|
-
}
|
126
|
-
|
127
|
-
let shapeAssertionError
|
128
|
-
try {
|
129
|
-
assertReducerShape(finalReducers)
|
130
|
-
} catch (e) {
|
131
|
-
shapeAssertionError = e
|
132
|
-
}
|
133
|
-
|
134
|
-
return function combination(state = {}, action) {
|
135
|
-
if (shapeAssertionError) {
|
136
|
-
throw shapeAssertionError
|
137
|
-
}
|
138
|
-
|
139
|
-
if (process.env.NODE_ENV !== 'production') {
|
140
|
-
const warningMessage = getUnexpectedStateShapeWarningMessage(
|
141
|
-
state,
|
142
|
-
finalReducers,
|
143
|
-
action,
|
144
|
-
unexpectedKeyCache
|
145
|
-
)
|
146
|
-
if (warningMessage) {
|
147
|
-
warning(warningMessage)
|
148
|
-
}
|
149
|
-
}
|
150
|
-
|
151
|
-
let hasChanged = false
|
152
|
-
const nextState = {}
|
153
|
-
for (let i = 0; i < finalReducerKeys.length; i++) {
|
154
|
-
const key = finalReducerKeys[i]
|
155
|
-
const reducer = finalReducers[key]
|
156
|
-
const previousStateForKey = state[key]
|
157
|
-
const nextStateForKey = reducer(previousStateForKey, action)
|
158
|
-
if (typeof nextStateForKey === 'undefined') {
|
159
|
-
const actionType = action && action.type
|
160
|
-
throw new Error(
|
161
|
-
`When called with an action of type ${
|
162
|
-
actionType ? `"${String(actionType)}"` : '(unknown type)'
|
163
|
-
}, the slice reducer for key "${key}" returned undefined. ` +
|
164
|
-
`To ignore an action, you must explicitly return the previous state. ` +
|
165
|
-
`If you want this reducer to hold no value, you can return null instead of undefined.`
|
166
|
-
)
|
167
|
-
}
|
168
|
-
nextState[key] = nextStateForKey
|
169
|
-
hasChanged = hasChanged || nextStateForKey !== previousStateForKey
|
170
|
-
}
|
171
|
-
hasChanged =
|
172
|
-
hasChanged || finalReducerKeys.length !== Object.keys(state).length
|
173
|
-
return hasChanged ? nextState : state
|
174
|
-
}
|
175
|
-
}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Composes single-argument functions from right to left. The rightmost
|
3
|
-
* function can take multiple arguments as it provides the signature for
|
4
|
-
* the resulting composite function.
|
5
|
-
*
|
6
|
-
* @param {...Function} funcs The functions to compose.
|
7
|
-
* @returns {Function} A function obtained by composing the argument functions
|
8
|
-
* from right to left. For example, compose(f, g, h) is identical to doing
|
9
|
-
* (...args) => f(g(h(...args))).
|
10
|
-
*/
|
11
|
-
|
12
|
-
export default function compose(...funcs) {
|
13
|
-
if (funcs.length === 0) {
|
14
|
-
return (arg) => arg
|
15
|
-
}
|
16
|
-
|
17
|
-
if (funcs.length === 1) {
|
18
|
-
return funcs[0]
|
19
|
-
}
|
20
|
-
|
21
|
-
return funcs.reduce((a, b) => (...args) => a(b(...args)))
|
22
|
-
}
|