dva-core
Advanced tools
Comparing version 1.5.0-beta.2 to 1.6.0-beta.1
{ | ||
"name": "dva-core", | ||
"version": "1.5.0-beta.2", | ||
"version": "1.6.0-beta.1", | ||
"description": "The core lightweight library for dva, based on redux and redux-saga.", | ||
"main": "dist/index.js", | ||
"module": "dist/index.esm.js", | ||
"sideEffects": false, | ||
"repository": { | ||
@@ -32,3 +35,2 @@ "type": "git", | ||
"is-plain-object": "^2.0.3", | ||
"redux": "^3.7.1", | ||
"redux-saga": "^0.16.0", | ||
@@ -38,6 +40,6 @@ "warning": "^3.0.0" | ||
"peerDependencies": { | ||
"redux": "3.x" | ||
"redux": "4.x" | ||
}, | ||
"devDependencies": { | ||
"redux": "^4.0.0" | ||
"redux": "^4.0.1" | ||
}, | ||
@@ -44,0 +46,0 @@ "files": [ |
@@ -29,17 +29,11 @@ import { createStore, applyMiddleware, compose } from 'redux'; | ||
let devtools = () => noop => noop; | ||
if ( | ||
process.env.NODE_ENV !== 'production' && | ||
window.__REDUX_DEVTOOLS_EXTENSION__ | ||
) { | ||
devtools = window.__REDUX_DEVTOOLS_EXTENSION__; | ||
} | ||
const composeEnhancers = | ||
process.env.NODE_ENV !== "production" && | ||
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ | ||
? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ | ||
: compose; | ||
const enhancers = [ | ||
applyMiddleware(...middlewares), | ||
...extraEnhancers, | ||
devtools(window.__REDUX_DEVTOOLS_EXTENSION__OPTIONS), | ||
]; | ||
const enhancers = [applyMiddleware(...middlewares), ...extraEnhancers]; | ||
return createStore(reducers, initialState, compose(...enhancers)); | ||
return createStore(reducers, initialState, composeEnhancers(...enhancers)); | ||
} |
import invariant from 'invariant'; | ||
import * as sagaEffects from 'redux-saga/lib/effects'; | ||
import warning from 'warning'; | ||
import { | ||
takeEveryHelper as takeEvery, | ||
takeLatestHelper as takeLatest, | ||
throttleHelper as throttle, | ||
} from 'redux-saga/lib/internal/sagaHelpers'; | ||
effects as sagaEffects, | ||
takeEvery, | ||
takeLatest, | ||
throttle, | ||
} from 'redux-saga'; | ||
import { NAMESPACE_SEP } from './constants'; | ||
@@ -10,0 +10,0 @@ import prefixType from './prefixType'; |
import { combineReducers } from 'redux'; | ||
import createSagaMiddleware from 'redux-saga/lib/internal/middleware'; | ||
import createSagaMiddleware, * as saga from 'redux-saga'; | ||
import invariant from 'invariant'; | ||
@@ -15,4 +15,6 @@ import checkModel from './checkModel'; | ||
} from './subscription'; | ||
import { noop, findIndex } from './utils'; | ||
import * as utils from './utils'; | ||
const { noop, findIndex } = utils; | ||
// Internal model to update global state when do unmodel | ||
@@ -281,1 +283,4 @@ const dvaModel = { | ||
} | ||
export { saga }; | ||
export { utils }; |
@@ -5,3 +5,2 @@ export isPlainObject from 'is-plain-object'; | ||
export const returnSelf = m => m; | ||
// avoid es6 array.prototype.findIndex polyfill | ||
export const noop = () => {}; | ||
@@ -8,0 +7,0 @@ export const findIndex = (array, predicate) => { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
8
59603
17
1781
1
+ Addedredux@4.2.1(transitive)
- Removedredux@^3.7.1
- Removedlodash@4.17.21(transitive)
- Removedlodash-es@4.17.21(transitive)
- Removedredux@3.7.2(transitive)
- Removedsymbol-observable@1.2.0(transitive)