@splitsoftware/splitio 11.4.2-rc.2 → 11.5.0-rc.0

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.
package/CHANGES.txt CHANGED
@@ -1,5 +1,6 @@
1
1
  11.5.0 (August XX, 2025)
2
- - Added `storage.wrapper` configuration option to allow the SDK to use a custom storage wrapper for the storage type `LOCALSTORAGE`. Default value is `window.localStorage`.
2
+ - Added `factory.getCache()` method for standalone server-side SDKs, which returns the rollout plan snapshot from the storage.
3
+ - Added `preloadedData` configuration option for standalone client-side SDKs, which allows preloading the SDK storage with a snapshot of the rollout plan.
3
4
 
4
5
  11.4.1 (June 3, 2025)
5
6
  - Updated @splitsoftware/splitio-commons package to version 2.4.1, which improves the Proxy fallback to flag spec version 1.2 by handling the case when the Proxy does not return an end-of-stream marker in 400 status code responses.
@@ -13,7 +14,7 @@
13
14
  - Updated @splitsoftware/splitio-commons package to version 2.3.0, which optimizes the Redis storage to:
14
15
  - Avoid lazy require of the `ioredis` dependency when the SDK is initialized, and
15
16
  - Flag the SDK as ready from cache immediately to allow queueing feature flag evaluations before SDK_READY event is emitted.
16
- - Bugfix - Enhanced HTTP client module to implement timeouts for failing requests that might otherwise remain pending indefinitely on some Fetch API implementations, pausing the SDK synchronization process.
17
+ - Bugfix - Enhanced HTTP client module to implement timeouts for failing requests that might otherwise remain pending indefinitely on some Fetch API implementations.
17
18
 
18
19
  11.2.0 (March 28, 2025)
19
20
  - Added a 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 impressions sent to Split backend. Read more in our docs.
@@ -54,15 +55,6 @@
54
55
  - Removed the deprecated `GOOGLE_ANALYTICS_TO_SPLIT` and `SPLIT_TO_GOOGLE_ANALYTICS` integrations. The `integrations` configuration option has been removed from the SDK factory configuration, along with the associated interfaces in the TypeScript definitions.
55
56
  - Removed the `core.trafficType` configuration option (`SplitIO.IBrowserSettings['core']['trafficType]`) and the `trafficType` parameter from the SDK `client()` method in Browser (`SplitIO.IBrowserSDK['client']`). As a result, traffic types can no longer be bound to SDK clients, and the traffic type must be provided in the `track` method.
56
57
 
57
- 10.28.1 (July 25, 2025)
58
- - Updated @splitsoftware/splitio-commons package to version 1.17.1 that includes some vulnerability and bug fixes.
59
- - Updated the Redis storage to avoid lazy require of the `ioredis` dependency when the SDK is initialized.
60
- - Bugfix - Enhanced HTTP client module to implement timeouts for failing requests that might otherwise remain pending indefinitely on some Fetch API implementations, pausing the SDK synchronization process.
61
- - Bugfix - Properly handle rejected promises when using targeting rules with segment matchers in consumer modes (e.g., Redis and Pluggable storages).
62
- - Bugfix - Sanitize the `SplitSDKMachineName` header value to avoid exceptions on HTTP/S requests when it contains non ISO-8859-1 characters (Related to issue https://github.com/splitio/javascript-client/issues/847).
63
- - Bugfix - Fixed an issue with the SDK_UPDATE event on server-side, where it was not being emitted if there was an empty segment and the SDK received a feature flag update notification.
64
- - Bugfix - Fixed an issue with the server-side polling manager that caused dangling timers when the SDK was destroyed before it was ready.
65
-
66
58
  10.28.0 (September 6, 2024)
67
59
  - Updated @splitsoftware/splitio-commons package to version 1.17.0 that includes minor updates:
68
60
  - Added `sync.requestOptions.getHeaderOverrides` configuration option to enhance SDK HTTP request Headers for Authorization Frameworks.
@@ -7,6 +7,7 @@ var pushManager_1 = require("@splitsoftware/splitio-commons/cjs/sync/streaming/p
7
7
  var pollingManagerSS_1 = require("@splitsoftware/splitio-commons/cjs/sync/polling/pollingManagerSS");
8
8
  var inRedis_1 = require("@splitsoftware/splitio-commons/cjs/storages/inRedis");
9
9
  var InMemoryStorage_1 = require("@splitsoftware/splitio-commons/cjs/storages/inMemory/InMemoryStorage");
10
+ var dataLoader_1 = require("@splitsoftware/splitio-commons/cjs/storages/dataLoader");
10
11
  var sdkManager_1 = require("@splitsoftware/splitio-commons/cjs/sdkManager");
11
12
  var sdkClientMethod_1 = require("@splitsoftware/splitio-commons/cjs/sdkClient/sdkClientMethod");
12
13
  var impressionObserverSS_1 = require("@splitsoftware/splitio-commons/cjs/trackers/impressionObserver/impressionObserverSS");
@@ -37,7 +38,16 @@ function getModules(settings) {
37
38
  sdkClientMethodFactory: sdkClientMethod_1.sdkClientMethodFactory,
38
39
  SignalListener: platform_1.SignalListener,
39
40
  impressionsObserverFactory: impressionObserverSS_1.impressionObserverSSFactory,
40
- filterAdapterFactory: bloomFilter_1.bloomFilterFactory
41
+ filterAdapterFactory: bloomFilter_1.bloomFilterFactory,
42
+ extraProps: function (params) {
43
+ if (params.settings.mode !== constants_1.CONSUMER_MODE) {
44
+ return {
45
+ getCache: function (userKeys) {
46
+ return (0, dataLoader_1.getCache)(params.settings.log, params.storage, userKeys);
47
+ }
48
+ };
49
+ }
50
+ }
41
51
  };
42
52
  switch (settings.mode) {
43
53
  case constants_1.LOCALHOST_MODE:
@@ -7,7 +7,7 @@ that accepts a custom agent.
7
7
 
8
8
  The MIT License
9
9
 
10
- Copyright (c) EventSource GitHub organization
10
+ Copyright (c) EventSource GitHub organisation
11
11
 
12
12
  Permission is hereby granted, free of charge, to any person obtaining
13
13
  a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.packageVersion = void 0;
4
- exports.packageVersion = '11.4.2-rc.2';
4
+ exports.packageVersion = '11.5.0-rc.0';
@@ -5,7 +5,7 @@ var isLocalStorageAvailable_1 = require("@splitsoftware/splitio-commons/cjs/util
5
5
  var constants_1 = require("@splitsoftware/splitio-commons/cjs/utils/constants");
6
6
  var STORAGE_LOCALSTORAGE = 'LOCALSTORAGE';
7
7
  function validateStorage(settings) {
8
- 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, wrapper = _b.wrapper;
8
+ 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;
9
9
  var __originalType;
10
10
  var fallbackToMemory = function () {
11
11
  __originalType = type;
@@ -29,7 +29,6 @@ function validateStorage(settings) {
29
29
  prefix: prefix,
30
30
  expirationDays: expirationDays,
31
31
  clearOnInit: clearOnInit,
32
- wrapper: wrapper,
33
32
  __originalType: __originalType
34
33
  };
35
34
  }
@@ -4,6 +4,7 @@ import { pushManagerFactory } from '@splitsoftware/splitio-commons/esm/sync/stre
4
4
  import { pollingManagerSSFactory } from '@splitsoftware/splitio-commons/esm/sync/polling/pollingManagerSS';
5
5
  import { InRedisStorage } from '@splitsoftware/splitio-commons/esm/storages/inRedis';
6
6
  import { InMemoryStorageFactory } from '@splitsoftware/splitio-commons/esm/storages/inMemory/InMemoryStorage';
7
+ import { getCache } from '@splitsoftware/splitio-commons/esm/storages/dataLoader';
7
8
  import { sdkManagerFactory } from '@splitsoftware/splitio-commons/esm/sdkManager';
8
9
  import { sdkClientMethodFactory } from '@splitsoftware/splitio-commons/esm/sdkClient/sdkClientMethod';
9
10
  import { impressionObserverSSFactory } from '@splitsoftware/splitio-commons/esm/trackers/impressionObserver/impressionObserverSS';
@@ -34,7 +35,16 @@ function getModules(settings) {
34
35
  sdkClientMethodFactory: sdkClientMethodFactory,
35
36
  SignalListener: SignalListener,
36
37
  impressionsObserverFactory: impressionObserverSSFactory,
37
- filterAdapterFactory: bloomFilterFactory
38
+ filterAdapterFactory: bloomFilterFactory,
39
+ extraProps: function (params) {
40
+ if (params.settings.mode !== CONSUMER_MODE) {
41
+ return {
42
+ getCache: function (userKeys) {
43
+ return getCache(params.settings.log, params.storage, userKeys);
44
+ }
45
+ };
46
+ }
47
+ }
38
48
  };
39
49
  switch (settings.mode) {
40
50
  case LOCALHOST_MODE:
@@ -7,7 +7,7 @@ that accepts a custom agent.
7
7
 
8
8
  The MIT License
9
9
 
10
- Copyright (c) EventSource GitHub organization
10
+ Copyright (c) EventSource GitHub organisation
11
11
 
12
12
  Permission is hereby granted, free of charge, to any person obtaining
13
13
  a copy of this software and associated documentation files (the
@@ -1 +1 @@
1
- export var packageVersion = '11.4.2-rc.2';
1
+ export var packageVersion = '11.5.0-rc.0';
@@ -2,7 +2,7 @@ import { isLocalStorageAvailable } from '@splitsoftware/splitio-commons/esm/util
2
2
  import { LOCALHOST_MODE, STORAGE_MEMORY } from '@splitsoftware/splitio-commons/esm/utils/constants';
3
3
  var STORAGE_LOCALSTORAGE = 'LOCALSTORAGE';
4
4
  export function validateStorage(settings) {
5
- 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, wrapper = _b.wrapper;
5
+ 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;
6
6
  var __originalType;
7
7
  var fallbackToMemory = function () {
8
8
  __originalType = type;
@@ -26,7 +26,6 @@ export function validateStorage(settings) {
26
26
  prefix: prefix,
27
27
  expirationDays: expirationDays,
28
28
  clearOnInit: clearOnInit,
29
- wrapper: wrapper,
30
29
  __originalType: __originalType
31
30
  };
32
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splitsoftware/splitio",
3
- "version": "11.4.2-rc.2",
3
+ "version": "11.5.0-rc.0",
4
4
  "description": "Split SDK",
5
5
  "files": [
6
6
  "README.md",
@@ -38,7 +38,7 @@
38
38
  "node": ">=14.0.0"
39
39
  },
40
40
  "dependencies": {
41
- "@splitsoftware/splitio-commons": "2.4.2-rc.2",
41
+ "@splitsoftware/splitio-commons": "2.5.0-rc.0",
42
42
  "bloom-filters": "^3.0.4",
43
43
  "ioredis": "^4.28.0",
44
44
  "js-yaml": "^3.13.1",
@@ -4,6 +4,7 @@ import { pushManagerFactory } from '@splitsoftware/splitio-commons/src/sync/stre
4
4
  import { pollingManagerSSFactory } from '@splitsoftware/splitio-commons/src/sync/polling/pollingManagerSS';
5
5
  import { InRedisStorage } from '@splitsoftware/splitio-commons/src/storages/inRedis';
6
6
  import { InMemoryStorageFactory } from '@splitsoftware/splitio-commons/src/storages/inMemory/InMemoryStorage';
7
+ import { getCache } from '@splitsoftware/splitio-commons/src/storages/dataLoader';
7
8
  import { sdkManagerFactory } from '@splitsoftware/splitio-commons/src/sdkManager';
8
9
  import { sdkClientMethodFactory } from '@splitsoftware/splitio-commons/src/sdkClient/sdkClientMethod';
9
10
  import { impressionObserverSSFactory } from '@splitsoftware/splitio-commons/src/trackers/impressionObserver/impressionObserverSS';
@@ -48,7 +49,17 @@ function getModules(settings) {
48
49
 
49
50
  impressionsObserverFactory: impressionObserverSSFactory,
50
51
 
51
- filterAdapterFactory: bloomFilterFactory
52
+ filterAdapterFactory: bloomFilterFactory,
53
+
54
+ extraProps: (params) => {
55
+ if (params.settings.mode !== CONSUMER_MODE) {
56
+ return {
57
+ getCache(userKeys) {
58
+ return getCache(params.settings.log, params.storage, userKeys);
59
+ }
60
+ };
61
+ }
62
+ }
52
63
  };
53
64
 
54
65
  switch (settings.mode) {
@@ -6,7 +6,7 @@ that accepts a custom agent.
6
6
 
7
7
  The MIT License
8
8
 
9
- Copyright (c) EventSource GitHub organization
9
+ Copyright (c) EventSource GitHub organisation
10
10
 
11
11
  Permission is hereby granted, free of charge, to any person obtaining
12
12
  a copy of this software and associated documentation files (the
@@ -1 +1 @@
1
- export const packageVersion = '11.4.2-rc.2';
1
+ export const packageVersion = '11.5.0-rc.0';
@@ -12,8 +12,7 @@ export function validateStorage(settings) {
12
12
  options = {},
13
13
  prefix,
14
14
  expirationDays,
15
- clearOnInit,
16
- wrapper
15
+ clearOnInit
17
16
  } = { type: STORAGE_MEMORY },
18
17
  } = settings;
19
18
  let __originalType;
@@ -43,7 +42,6 @@ export function validateStorage(settings) {
43
42
  prefix,
44
43
  expirationDays,
45
44
  clearOnInit,
46
- wrapper,
47
45
  __originalType
48
46
  };
49
47
  }