@splitsoftware/splitio-redux
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -0,1 +1,5 @@ | ||
1.3.1 (April 29, 2021) | ||
- Updated dependencies to fix vulnerabilities. | ||
- Updated Split's SDK dependency to fix vulnerabilities. | ||
1.3.0 (December 9, 2020) | ||
@@ -2,0 +6,0 @@ - Added a new parameter to `getTreatments` actions creator: `evalOnReadyFromCache` to evaluate splits when the SDK_READY_FROM_CACHE event is emitted. Learn more in our Redux SDK documentation. |
// Default value for the key where the Split piece of state is expected to be mounted. | ||
export const DEFAULT_SPLIT_STATE_SLICE = 'splitio'; | ||
export const VERSION = 'redux-' + '1.3.0'; | ||
export const VERSION = 'redux-' + '1.3.1'; | ||
// Treatments | ||
@@ -5,0 +5,0 @@ export const ON = 'on'; |
@@ -13,3 +13,3 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
import { connect } from 'react-redux'; | ||
import * as React from 'react'; | ||
import { createElement } from 'react'; | ||
import { selectTreatmentValue, defaultGetSplitState } from '../selectors'; | ||
@@ -36,3 +36,3 @@ import { ON } from '../constants'; | ||
var { isFeatureOn } = _a, props = __rest(_a, ["isFeatureOn"]); | ||
return isFeatureOn ? (React.createElement(ComponentOn, props)) : (React.createElement(ComponentDefault, props)); | ||
return isFeatureOn ? (createElement(ComponentOn, props)) : (createElement(ComponentDefault, props)); | ||
}; | ||
@@ -39,0 +39,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.addTreatments = exports.splitDestroy = exports.splitTimedout = exports.splitUpdateWithEvaluations = exports.splitUpdate = exports.splitReadyFromCacheWithEvaluations = exports.splitReadyFromCache = exports.splitReadyWithEvaluations = exports.splitReady = void 0; | ||
/** | ||
@@ -4,0 +5,0 @@ * Common action creators for browser and node. |
@@ -14,2 +14,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.destroySplitSdk = exports.getClient = exports.getTreatments = exports.initSplitSdk = exports.splitSdk = void 0; | ||
var splitio_1 = require("@splitsoftware/splitio"); | ||
@@ -16,0 +17,0 @@ var actions_1 = require("./actions"); |
@@ -7,3 +7,3 @@ export declare const DEFAULT_SPLIT_STATE_SLICE = "splitio"; | ||
export declare const CONTROL_WITH_CONFIG: SplitIO.TreatmentWithConfig; | ||
export declare const getControlTreatmentsWithConfig: (splitNames: string[]) => import("@splitsoftware/splitio/types/splitio").TreatmentsWithConfig; | ||
export declare const getControlTreatmentsWithConfig: (splitNames: string[]) => SplitIO.TreatmentsWithConfig; | ||
export declare const SPLIT_READY = "SPLIT_READY"; | ||
@@ -10,0 +10,0 @@ export declare const SPLIT_READY_WITH_EVALUATIONS = "SPLIT_READY_WITH_EVALUATIONS"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ERROR_SELECTOR_NO_SPLITSTATE = exports.ERROR_MANAGER_NO_INITSPLITSDK = exports.ERROR_TRACK_NO_INITSPLITSDK = exports.ERROR_DESTROY_NO_INITSPLITSDK = exports.ERROR_GETT_NO_INITSPLITSDK = exports.ADD_TREATMENTS = exports.SPLIT_DESTROY = exports.SPLIT_TIMEDOUT = exports.SPLIT_UPDATE_WITH_EVALUATIONS = exports.SPLIT_UPDATE = exports.SPLIT_READY_FROM_CACHE_WITH_EVALUATIONS = exports.SPLIT_READY_FROM_CACHE = exports.SPLIT_READY_WITH_EVALUATIONS = exports.SPLIT_READY = exports.getControlTreatmentsWithConfig = exports.CONTROL_WITH_CONFIG = exports.CONTROL = exports.OFF = exports.ON = exports.VERSION = exports.DEFAULT_SPLIT_STATE_SLICE = void 0; | ||
// Default value for the key where the Split piece of state is expected to be mounted. | ||
exports.DEFAULT_SPLIT_STATE_SLICE = 'splitio'; | ||
exports.VERSION = 'redux-' + '1.3.0'; | ||
exports.VERSION = 'redux-' + '1.3.1'; | ||
// Treatments | ||
@@ -14,3 +15,3 @@ exports.ON = 'on'; | ||
}; | ||
exports.getControlTreatmentsWithConfig = function (splitNames) { | ||
var getControlTreatmentsWithConfig = function (splitNames) { | ||
return splitNames.reduce(function (pValue, cValue) { | ||
@@ -21,2 +22,3 @@ pValue[cValue] = exports.CONTROL_WITH_CONFIG; | ||
}; | ||
exports.getControlTreatmentsWithConfig = getControlTreatmentsWithConfig; | ||
// Action types | ||
@@ -23,0 +25,0 @@ exports.SPLIT_READY = 'SPLIT_READY'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getSplits = exports.getSplit = exports.getSplitNames = exports.track = void 0; | ||
var asyncActions_1 = require("./asyncActions"); | ||
@@ -4,0 +5,0 @@ var constants_1 = require("./constants"); |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.mapIsFeatureOnToProps = exports.mapTreatmentToProps = exports.connectToggler = exports.connectSplit = exports.selectTreatmentWithConfig = exports.selectTreatmentValue = exports.getSplits = exports.getSplit = exports.getSplitNames = exports.track = exports.splitSdk = exports.destroySplitSdk = exports.getTreatments = exports.initSplitSdk = exports.splitReducer = void 0; | ||
// For Redux | ||
var reducer_1 = require("./reducer"); | ||
exports.splitReducer = reducer_1.default; | ||
Object.defineProperty(exports, "splitReducer", { enumerable: true, get: function () { return __importDefault(reducer_1).default; } }); | ||
var asyncActions_1 = require("./asyncActions"); | ||
exports.initSplitSdk = asyncActions_1.initSplitSdk; | ||
exports.getTreatments = asyncActions_1.getTreatments; | ||
exports.destroySplitSdk = asyncActions_1.destroySplitSdk; | ||
exports.splitSdk = asyncActions_1.splitSdk; | ||
Object.defineProperty(exports, "initSplitSdk", { enumerable: true, get: function () { return asyncActions_1.initSplitSdk; } }); | ||
Object.defineProperty(exports, "getTreatments", { enumerable: true, get: function () { return asyncActions_1.getTreatments; } }); | ||
Object.defineProperty(exports, "destroySplitSdk", { enumerable: true, get: function () { return asyncActions_1.destroySplitSdk; } }); | ||
Object.defineProperty(exports, "splitSdk", { enumerable: true, get: function () { return asyncActions_1.splitSdk; } }); | ||
var helpers_1 = require("./helpers"); | ||
exports.track = helpers_1.track; | ||
exports.getSplitNames = helpers_1.getSplitNames; | ||
exports.getSplit = helpers_1.getSplit; | ||
exports.getSplits = helpers_1.getSplits; | ||
Object.defineProperty(exports, "track", { enumerable: true, get: function () { return helpers_1.track; } }); | ||
Object.defineProperty(exports, "getSplitNames", { enumerable: true, get: function () { return helpers_1.getSplitNames; } }); | ||
Object.defineProperty(exports, "getSplit", { enumerable: true, get: function () { return helpers_1.getSplit; } }); | ||
Object.defineProperty(exports, "getSplits", { enumerable: true, get: function () { return helpers_1.getSplits; } }); | ||
var selectors_1 = require("./selectors"); | ||
exports.selectTreatmentValue = selectors_1.selectTreatmentValue; | ||
exports.selectTreatmentWithConfig = selectors_1.selectTreatmentWithConfig; | ||
Object.defineProperty(exports, "selectTreatmentValue", { enumerable: true, get: function () { return selectors_1.selectTreatmentValue; } }); | ||
Object.defineProperty(exports, "selectTreatmentWithConfig", { enumerable: true, get: function () { return selectors_1.selectTreatmentWithConfig; } }); | ||
// For React-redux | ||
var connectSplit_1 = require("./react-redux/connectSplit"); | ||
exports.connectSplit = connectSplit_1.default; | ||
Object.defineProperty(exports, "connectSplit", { enumerable: true, get: function () { return __importDefault(connectSplit_1).default; } }); | ||
var connectToggler_1 = require("./react-redux/connectToggler"); | ||
exports.connectToggler = connectToggler_1.connectToggler; | ||
exports.mapTreatmentToProps = connectToggler_1.mapTreatmentToProps; | ||
exports.mapIsFeatureOnToProps = connectToggler_1.mapIsFeatureOnToProps; | ||
Object.defineProperty(exports, "connectToggler", { enumerable: true, get: function () { return connectToggler_1.connectToggler; } }); | ||
Object.defineProperty(exports, "mapTreatmentToProps", { enumerable: true, get: function () { return connectToggler_1.mapTreatmentToProps; } }); | ||
Object.defineProperty(exports, "mapIsFeatureOnToProps", { enumerable: true, get: function () { return connectToggler_1.mapIsFeatureOnToProps; } }); |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
/// <reference types="react" /> | ||
import { IGetSplitState } from '../types'; | ||
@@ -36,4 +36,4 @@ /** | ||
*/ | ||
export declare function connectToggler(splitName: string, key?: SplitIO.SplitKey, getSplitState?: IGetSplitState): (ComponentOn: React.ComponentType<{}>, ComponentDefault?: React.ComponentType<{}>) => import("react-redux").ConnectedComponent<({ isFeatureOn, ...props }: { | ||
export declare function connectToggler(splitName: string, key?: SplitIO.SplitKey, getSplitState?: IGetSplitState): (ComponentOn: React.ComponentType, ComponentDefault?: React.ComponentType) => import("react-redux").ConnectedComponent<({ isFeatureOn, ...props }: { | ||
isFeatureOn: boolean; | ||
}) => React.ReactElement<{}, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)>) | (new (props: any) => React.Component<any, any, any>)>, any>; | ||
}) => import("react").ReactElement<{}, string | import("react").JSXElementConstructor<any>>, any>; |
@@ -24,12 +24,6 @@ "use strict"; | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.connectToggler = exports.mapTreatmentToProps = exports.mapIsFeatureOnToProps = void 0; | ||
var react_redux_1 = require("react-redux"); | ||
var React = __importStar(require("react")); | ||
var react_1 = require("react"); | ||
var selectors_1 = require("../selectors"); | ||
@@ -58,3 +52,3 @@ var constants_1 = require("../constants"); | ||
var isFeatureOn = _a.isFeatureOn, props = __rest(_a, ["isFeatureOn"]); | ||
return isFeatureOn ? (React.createElement(ComponentOn, props)) : (React.createElement(ComponentDefault, props)); | ||
return isFeatureOn ? (react_1.createElement(ComponentOn, props)) : (react_1.createElement(ComponentDefault, props)); | ||
}; | ||
@@ -61,0 +55,0 @@ }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.selectTreatmentWithConfig = exports.selectTreatmentValue = exports.defaultGetSplitState = exports.getStateSlice = void 0; | ||
var constants_1 = require("./constants"); | ||
exports.getStateSlice = function (sliceName) { return function (state) { return state[sliceName]; }; }; | ||
var getStateSlice = function (sliceName) { return function (state) { return state[sliceName]; }; }; | ||
exports.getStateSlice = getStateSlice; | ||
exports.defaultGetSplitState = exports.getStateSlice(constants_1.DEFAULT_SPLIT_STATE_SLICE); | ||
@@ -6,0 +8,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getIsDestroyed = exports.getHasTimedout = exports.getIsOperational = exports.getIsReadyFromCache = exports.getIsReady = exports.matching = exports.isObject = void 0; | ||
/** | ||
@@ -4,0 +5,0 @@ * Validates if a value is an object. |
{ | ||
"name": "@splitsoftware/splitio-redux", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "A library to easily use Split JS SDK with Redux and React Redux", | ||
@@ -57,3 +57,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@splitsoftware/splitio": "^10.15.2" | ||
"@splitsoftware/splitio": "^10.15.5" | ||
}, | ||
@@ -63,3 +63,3 @@ "devDependencies": { | ||
"@types/enzyme-adapter-react-16": "^1.0.5", | ||
"@types/jest": "^24.0.23", | ||
"@types/jest": "^26.0.10", | ||
"@types/react": "^16.9.11", | ||
@@ -72,3 +72,3 @@ "@types/react-redux": "^7.1.5", | ||
"husky": "^3.1.0", | ||
"jest": "^24.9.0", | ||
"jest": "^26.6.3", | ||
"react": "^16.12.0", | ||
@@ -82,5 +82,5 @@ "react-dom": "^16.12.0", | ||
"rimraf": "^3.0.0", | ||
"ts-jest": "^24.2.0", | ||
"ts-jest": "^26.3.0", | ||
"tslint": "^5.20.1", | ||
"typescript": "^3.7.2" | ||
"typescript": "^4.0.2" | ||
}, | ||
@@ -87,0 +87,0 @@ "peerDependencies": { |
@@ -93,3 +93,3 @@ # Split SDK for Redux | ||
* .NET [Github](https://github.com/splitio/.net-core-client) [Docs](https://help.split.io/hc/en-us/articles/360020240172--NET-SDK) | ||
* .NET [Github](https://github.com/splitio/dotnet-client) [Docs](https://help.split.io/hc/en-us/articles/360020240172--NET-SDK) | ||
* Android [Github](https://github.com/splitio/android-client) [Docs](https://help.split.io/hc/en-us/articles/360020343291-Android-SDK) | ||
@@ -101,2 +101,3 @@ * GO [Github](https://github.com/splitio/go-client) [Docs](https://help.split.io/hc/en-us/articles/360020093652-Go-SDK) | ||
* Node [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK) | ||
* Javascript for Browser [Github](https://github.com/splitio/javascript-browser-client) [Docs](https://help.split.io/hc/en-us/articles/360058730852) | ||
* PHP [Github](https://github.com/splitio/php-client) [Docs](https://help.split.io/hc/en-us/articles/360020350372-PHP-SDK) | ||
@@ -103,0 +104,0 @@ * Python [Github](https://github.com/splitio/python-client) [Docs](https://help.split.io/hc/en-us/articles/360020359652-Python-SDK) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
101954
1944
112
1