@splitsoftware/splitio
Advanced tools
11.2.0 (March 28, 2025) | ||
- Added new optional argument to the client `getTreatment` methods to allow passing additional evaluation options, such as a map of properties to append to the generated impression object sent to Split's backend. Read more in our docs. | ||
- Added two new configuration options for the SDK's `LOCALSTORAGE` storage type to control the behavior of the persisted rollout plan cache in the browser: | ||
- `storage.expirationDays` to specify the validity period of the rollout plan cache in days. | ||
- `storage.clearOnInit` to clear the rollout plan cache on SDK initialization. | ||
- Updated SDK_READY_FROM_CACHE event when using the `LOCALSTORAGE` storage type to be emitted alongside the SDK_READY event if it has not already been emitted. | ||
@@ -4,0 +8,0 @@ 11.1.0 (January 17, 2025) |
@@ -23,6 +23,6 @@ "use strict"; | ||
return settings.storage.type === constants_1.STORAGE_LOCALSTORAGE ? | ||
(0, inLocalStorage_1.InLocalStorage)(settings.storage) | ||
: settings.storage.__originalType === constants_1.STORAGE_LOCALSTORAGE ? | ||
storageCS_1.__InLocalStorageMockFactory | ||
: InMemoryStorageCS_1.InMemoryStorageCSFactory; | ||
(0, inLocalStorage_1.InLocalStorage)(settings.storage) : | ||
settings.storage.__originalType === constants_1.STORAGE_LOCALSTORAGE ? | ||
storageCS_1.__InLocalStorageMockFactory : | ||
InMemoryStorageCS_1.InMemoryStorageCSFactory; | ||
} | ||
@@ -29,0 +29,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.packageVersion = void 0; | ||
exports.packageVersion = '11.1.1-rc.0'; | ||
exports.packageVersion = '11.1.1-rc.1'; |
@@ -8,3 +8,3 @@ "use strict"; | ||
function validateStorage(settings) { | ||
var log = settings.log, mode = settings.mode, _a = settings.storage, _b = _a === void 0 ? { type: constants_1.STORAGE_MEMORY } : _a, type = _b.type, _c = _b.options, options = _c === void 0 ? {} : _c, prefix = _b.prefix; | ||
var log = settings.log, mode = settings.mode, _a = settings.storage, _b = _a === void 0 ? { type: constants_1.STORAGE_MEMORY } : _a, type = _b.type, _c = _b.options, options = _c === void 0 ? {} : _c, prefix = _b.prefix, expirationDays = _b.expirationDays, clearOnInit = _b.clearOnInit; | ||
var __originalType; | ||
@@ -31,2 +31,4 @@ var fallbackToMemory = function () { | ||
prefix: prefix, | ||
expirationDays: expirationDays, | ||
clearOnInit: clearOnInit, | ||
__originalType: __originalType | ||
@@ -33,0 +35,0 @@ }; |
@@ -20,6 +20,6 @@ import { splitApiFactory } from '@splitsoftware/splitio-commons/esm/services/splitApi'; | ||
return settings.storage.type === STORAGE_LOCALSTORAGE ? | ||
InLocalStorage(settings.storage) | ||
: settings.storage.__originalType === STORAGE_LOCALSTORAGE ? | ||
__InLocalStorageMockFactory | ||
: InMemoryStorageCSFactory; | ||
InLocalStorage(settings.storage) : | ||
settings.storage.__originalType === STORAGE_LOCALSTORAGE ? | ||
__InLocalStorageMockFactory : | ||
InMemoryStorageCSFactory; | ||
} | ||
@@ -26,0 +26,0 @@ /** |
@@ -1,1 +0,1 @@ | ||
export var packageVersion = '11.1.1-rc.0'; | ||
export var packageVersion = '11.1.1-rc.1'; |
@@ -5,3 +5,3 @@ import { isLocalStorageAvailable } from '@splitsoftware/splitio-commons/esm/utils/env/isLocalStorageAvailable'; | ||
export function validateStorage(settings) { | ||
var log = settings.log, mode = settings.mode, _a = settings.storage, _b = _a === void 0 ? { type: STORAGE_MEMORY } : _a, type = _b.type, _c = _b.options, options = _c === void 0 ? {} : _c, prefix = _b.prefix; | ||
var log = settings.log, mode = settings.mode, _a = settings.storage, _b = _a === void 0 ? { type: STORAGE_MEMORY } : _a, type = _b.type, _c = _b.options, options = _c === void 0 ? {} : _c, prefix = _b.prefix, expirationDays = _b.expirationDays, clearOnInit = _b.clearOnInit; | ||
var __originalType; | ||
@@ -28,4 +28,6 @@ var fallbackToMemory = function () { | ||
prefix: prefix, | ||
expirationDays: expirationDays, | ||
clearOnInit: clearOnInit, | ||
__originalType: __originalType | ||
}; | ||
} |
{ | ||
"name": "@splitsoftware/splitio", | ||
"version": "11.1.1-rc.0", | ||
"version": "11.1.1-rc.1", | ||
"description": "Split SDK", | ||
@@ -41,3 +41,3 @@ "files": [ | ||
"dependencies": { | ||
"@splitsoftware/splitio-commons": "2.1.1-rc.1", | ||
"@splitsoftware/splitio-commons": "2.1.1-rc.2", | ||
"bloom-filters": "^3.0.4", | ||
@@ -44,0 +44,0 @@ "ioredis": "^4.28.0", |
@@ -23,6 +23,6 @@ import { splitApiFactory } from '@splitsoftware/splitio-commons/src/services/splitApi'; | ||
return settings.storage.type === STORAGE_LOCALSTORAGE ? | ||
InLocalStorage(settings.storage) | ||
: settings.storage.__originalType === STORAGE_LOCALSTORAGE ? | ||
__InLocalStorageMockFactory | ||
: InMemoryStorageCSFactory; | ||
InLocalStorage(settings.storage) : | ||
settings.storage.__originalType === STORAGE_LOCALSTORAGE ? | ||
__InLocalStorageMockFactory : | ||
InMemoryStorageCSFactory; | ||
} | ||
@@ -29,0 +29,0 @@ |
@@ -1,1 +0,1 @@ | ||
export const packageVersion = '11.1.1-rc.0'; | ||
export const packageVersion = '11.1.1-rc.1'; |
@@ -13,3 +13,5 @@ import { isLocalStorageAvailable } from '@splitsoftware/splitio-commons/src/utils/env/isLocalStorageAvailable'; | ||
options = {}, | ||
prefix | ||
prefix, | ||
expirationDays, | ||
clearOnInit | ||
} = { type: STORAGE_MEMORY }, | ||
@@ -42,4 +44,6 @@ } = settings; | ||
prefix, | ||
expirationDays, | ||
clearOnInit, | ||
__originalType | ||
}; | ||
} |
264966
0.32%4827
0.17%