Socket
Socket
Sign inDemoInstall

dva-core

Package Overview
Dependencies
15
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.5.0-beta.2 to 1.6.0-beta.1

dist/index.js

10

package.json
{
"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": [

20

src/createStore.js

@@ -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) => {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc