@splitsoftware/splitio-browserjs 1.3.1 → 1.4.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,3 +1,8 @@
1
+ 1.4.0 (September 18, 2025)
2
+ - Added the `wrapper` option to the SDK's `InLocalStorage` module, to allow passing a custom storage for persisting the SDK rollout plan. The default is `window.localStorage`.
3
+ - Added the `initialRolloutPlan` configuration option for the SDK in standalone mode, to allow preloading the SDK storage with a snapshot of the rollout plan.
4
+ - Updated @splitsoftware/splitio-commons package to version 2.6.0.
5
+
1
6
  1.3.1 (June 24, 2025)
2
7
  - 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.
3
8
 
package/README.md CHANGED
@@ -61,24 +61,24 @@ To learn more about Split, contact hello@split.io, or get started with feature f
61
61
 
62
62
  Split has built and maintains SDKs for:
63
63
 
64
- * .NET [Github](https://github.com/splitio/dotnet-client) [Docs](https://help.split.io/hc/en-us/articles/360020240172--NET-SDK)
65
- * Android [Github](https://github.com/splitio/android-client) [Docs](https://help.split.io/hc/en-us/articles/360020343291-Android-SDK)
66
- * Angular [Github](https://github.com/splitio/angular-sdk-plugin) [Docs](https://help.split.io/hc/en-us/articles/6495326064397-Angular-utilities)
67
- * Elixir thin-client [Github](https://github.com/splitio/elixir-thin-client) [Docs](https://help.split.io/hc/en-us/articles/26988707417869-Elixir-Thin-Client-SDK)
68
- * Flutter [Github](https://github.com/splitio/flutter-sdk-plugin) [Docs](https://help.split.io/hc/en-us/articles/8096158017165-Flutter-plugin)
69
- * GO [Github](https://github.com/splitio/go-client) [Docs](https://help.split.io/hc/en-us/articles/360020093652-Go-SDK)
70
- * iOS [Github](https://github.com/splitio/ios-client) [Docs](https://help.split.io/hc/en-us/articles/360020401491-iOS-SDK)
71
- * Java [Github](https://github.com/splitio/java-client) [Docs](https://help.split.io/hc/en-us/articles/360020405151-Java-SDK)
72
- * JavaScript [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK)
73
- * JavaScript for Browser [Github](https://github.com/splitio/javascript-browser-client) [Docs](https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK)
74
- * Node.js [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK)
75
- * PHP [Github](https://github.com/splitio/php-client) [Docs](https://help.split.io/hc/en-us/articles/360020350372-PHP-SDK)
76
- * PHP thin-client [Github](https://github.com/splitio/php-thin-client) [Docs](https://help.split.io/hc/en-us/articles/18305128673933-PHP-Thin-Client-SDK)
77
- * Python [Github](https://github.com/splitio/python-client) [Docs](https://help.split.io/hc/en-us/articles/360020359652-Python-SDK)
78
- * React [Github](https://github.com/splitio/react-client) [Docs](https://help.split.io/hc/en-us/articles/360038825091-React-SDK)
79
- * React Native [Github](https://github.com/splitio/react-native-client) [Docs](https://help.split.io/hc/en-us/articles/4406066357901-React-Native-SDK)
80
- * Redux [Github](https://github.com/splitio/redux-client) [Docs](https://help.split.io/hc/en-us/articles/360038851551-Redux-SDK)
81
- * Ruby [Github](https://github.com/splitio/ruby-client) [Docs](https://help.split.io/hc/en-us/articles/360020673251-Ruby-SDK)
64
+ * .NET [Github](https://github.com/splitio/dotnet-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/server-side-sdks/net-sdk/)
65
+ * Android [Github](https://github.com/splitio/android-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/android-sdk/)
66
+ * Angular [Github](https://github.com/splitio/angular-sdk-plugin) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/angular-utilities/)
67
+ * Elixir thin-client [Github](https://github.com/splitio/elixir-thin-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/server-side-sdks/elixir-thin-client-sdk/)
68
+ * Flutter [Github](https://github.com/splitio/flutter-sdk-plugin) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/flutter-plugin/)
69
+ * GO [Github](https://github.com/splitio/go-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/server-side-sdks/go-sdk/)
70
+ * iOS [Github](https://github.com/splitio/ios-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/ios-sdk/)
71
+ * Java [Github](https://github.com/splitio/java-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/server-side-sdks/java-sdk/)
72
+ * JavaScript [Github](https://github.com/splitio/javascript-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/javascript-sdk/)
73
+ * JavaScript for Browser [Github](https://github.com/splitio/javascript-browser-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/browser-sdk/)
74
+ * Node.js [Github](https://github.com/splitio/javascript-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/server-side-sdks/nodejs-sdk/)
75
+ * PHP [Github](https://github.com/splitio/php-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/server-side-sdks/php-sdk/)
76
+ * PHP thin-client [Github](https://github.com/splitio/php-thin-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/server-side-sdks/php-thin-client-sdk/)
77
+ * Python [Github](https://github.com/splitio/python-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/server-side-sdks/python-sdk/)
78
+ * React [Github](https://github.com/splitio/react-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/react-sdk/)
79
+ * React Native [Github](https://github.com/splitio/react-native-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/react-native-sdk/)
80
+ * Redux [Github](https://github.com/splitio/redux-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/redux-sdk/)
81
+ * Ruby [Github](https://github.com/splitio/ruby-client) [Docs](https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/server-side-sdks/ruby-sdk/)
82
82
 
83
83
  For a comprehensive list of open source projects visit our [Github page](https://github.com/splitio?utf8=%E2%9C%93&query=%20only%3Apublic%20).
84
84
 
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.defaults = void 0;
4
4
  var index_1 = require("@splitsoftware/splitio-commons/cjs/logger/index");
5
5
  var constants_1 = require("@splitsoftware/splitio-commons/cjs/utils/constants");
6
- var packageVersion = '1.3.1';
6
+ var packageVersion = '1.4.0';
7
7
  /**
8
8
  * In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.
9
9
  * Acceptable values are: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'NONE'.
@@ -1,6 +1,6 @@
1
1
  import { LogLevels, isLogLevelString } from '@splitsoftware/splitio-commons/esm/logger/index';
2
2
  import { CONSENT_GRANTED } from '@splitsoftware/splitio-commons/esm/utils/constants';
3
- var packageVersion = '1.3.1';
3
+ var packageVersion = '1.4.0';
4
4
  /**
5
5
  * In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.
6
6
  * Acceptable values are: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'NONE'.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splitsoftware/splitio-browserjs",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "description": "Split SDK for JavaScript on Browser",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
@@ -59,7 +59,7 @@
59
59
  "bugs": "https://github.com/splitio/javascript-browser-client/issues",
60
60
  "homepage": "https://github.com/splitio/javascript-browser-client#readme",
61
61
  "dependencies": {
62
- "@splitsoftware/splitio-commons": "2.4.1",
62
+ "@splitsoftware/splitio-commons": "2.6.0",
63
63
  "tslib": "^2.3.1",
64
64
  "unfetch": "^4.2.0"
65
65
  },
@@ -2,7 +2,7 @@ import type SplitIO from '@splitsoftware/splitio-commons/types/splitio';
2
2
  import { LogLevels, isLogLevelString } from '@splitsoftware/splitio-commons/src/logger/index';
3
3
  import { CONSENT_GRANTED } from '@splitsoftware/splitio-commons/src/utils/constants';
4
4
 
5
- const packageVersion = '1.3.1';
5
+ const packageVersion = '1.4.0';
6
6
 
7
7
  /**
8
8
  * In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.
@@ -10,10 +10,10 @@ declare module JsSdk {
10
10
  /**
11
11
  * Full version of the Split.io SDK factory function.
12
12
  *
13
- * Unlike the default version, it includes a `fetch` polyfill to support old browsers @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#language-support}.
13
+ * Unlike the default version, it includes a `fetch` polyfill to support old browsers @see {@link https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/browser-sdk/#language-support}.
14
14
  *
15
15
  * The settings parameter should be an object that complies with the SplitIO.IClientSideSettings or SplitIO.IClientSideAsyncSettings interfaces.
16
- * For more information read the corresponding article: @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#configuration}
16
+ * For more information read the corresponding article: @see {@link https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/browser-sdk/#configuration}
17
17
  */
18
18
  export function SplitFactory(settings: SplitIO.IClientSideSettings): SplitIO.IBrowserSDK;
19
19
  export function SplitFactory(settings: SplitIO.IClientSideAsyncSettings): SplitIO.IBrowserAsyncSDK;
@@ -21,42 +21,42 @@ declare module JsSdk {
21
21
  /**
22
22
  * Persistent storage based on the LocalStorage Web API for browsers.
23
23
  *
24
- * @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#storage}
24
+ * @see {@link https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/browser-sdk/#storage}
25
25
  */
26
26
  export function InLocalStorage(options?: SplitIO.InLocalStorageOptions): SplitIO.StorageSyncFactory;
27
27
 
28
28
  /**
29
29
  * Pluggable storage to use the SDK in consumer mode.
30
30
  *
31
- * @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#sharing-state-with-a-pluggable-storage}
31
+ * @see {@link https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/browser-sdk/#sharing-state-with-a-pluggable-storage}
32
32
  */
33
33
  export function PluggableStorage(options: SplitIO.PluggableStorageOptions): SplitIO.StorageAsyncFactory;
34
34
 
35
35
  /**
36
36
  * Creates a logger instance that enables descriptive log messages with DEBUG log level when passed in the factory settings.
37
37
  *
38
- * @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#logging}
38
+ * @see {@link https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/browser-sdk/#logging}
39
39
  */
40
40
  export function DebugLogger(): SplitIO.ILogger;
41
41
 
42
42
  /**
43
43
  * Creates a logger instance that enables descriptive log messages with INFO log level when passed in the factory settings.
44
44
  *
45
- * @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#logging}
45
+ * @see {@link https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/browser-sdk/#logging}
46
46
  */
47
47
  export function InfoLogger(): SplitIO.ILogger;
48
48
 
49
49
  /**
50
50
  * Creates a logger instance that enables descriptive log messages with WARN log level when passed in the factory settings.
51
51
  *
52
- * @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#logging}
52
+ * @see {@link https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/browser-sdk/#logging}
53
53
  */
54
54
  export function WarnLogger(): SplitIO.ILogger;
55
55
 
56
56
  /**
57
57
  * Creates a logger instance that enables descriptive log messages with ERROR log level when passed in the factory settings.
58
58
  *
59
- * @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#logging}
59
+ * @see {@link https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/browser-sdk/#logging}
60
60
  */
61
61
  export function ErrorLogger(): SplitIO.ILogger;
62
62
  }
package/types/index.d.ts CHANGED
@@ -11,50 +11,50 @@ declare module JsSdk {
11
11
  * Split.io SDK factory function.
12
12
  *
13
13
  * The settings parameter should be an object that complies with the SplitIO.IClientSideSettings or SplitIO.IClientSideAsyncSettings interfaces.
14
- * For more information read the corresponding article: @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#configuration}
14
+ * For more information read the corresponding article: @see {@link https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/browser-sdk/#configuration}
15
15
  */
16
16
  export function SplitFactory(settings: SplitIO.IClientSideSettings): SplitIO.IBrowserSDK;
17
17
  export function SplitFactory(settings: SplitIO.IClientSideAsyncSettings): SplitIO.IBrowserAsyncSDK;
18
18
 
19
19
  /**
20
- * Persistent storage based on the LocalStorage Web API for browsers.
20
+ * Persistent storage. By default, it uses the browser's LocalStorage API if available.
21
21
  *
22
- * @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#storage}
22
+ * @see {@link https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/browser-sdk/#configuring-persistent-cache-for-the-sdk}
23
23
  */
24
24
  export function InLocalStorage(options?: SplitIO.InLocalStorageOptions): SplitIO.StorageSyncFactory;
25
25
 
26
26
  /**
27
27
  * Pluggable storage to use the SDK in consumer mode.
28
28
  *
29
- * @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#sharing-state-with-a-pluggable-storage}
29
+ * @see {@link https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/browser-sdk/#sharing-state-with-a-pluggable-storage}
30
30
  */
31
31
  export function PluggableStorage(options: SplitIO.PluggableStorageOptions): SplitIO.StorageAsyncFactory;
32
32
 
33
33
  /**
34
34
  * Creates a logger instance that enables descriptive log messages with DEBUG log level when passed in the factory settings.
35
35
  *
36
- * @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#logging}
36
+ * @see {@link https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/browser-sdk/#logging}
37
37
  */
38
38
  export function DebugLogger(): SplitIO.ILogger;
39
39
 
40
40
  /**
41
41
  * Creates a logger instance that enables descriptive log messages with INFO log level when passed in the factory settings.
42
42
  *
43
- * @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#logging}
43
+ * @see {@link https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/browser-sdk/#logging}
44
44
  */
45
45
  export function InfoLogger(): SplitIO.ILogger;
46
46
 
47
47
  /**
48
48
  * Creates a logger instance that enables descriptive log messages with WARN log level when passed in the factory settings.
49
49
  *
50
- * @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#logging}
50
+ * @see {@link https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/browser-sdk/#logging}
51
51
  */
52
52
  export function WarnLogger(): SplitIO.ILogger;
53
53
 
54
54
  /**
55
55
  * Creates a logger instance that enables descriptive log messages with ERROR log level when passed in the factory settings.
56
56
  *
57
- * @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#logging}
57
+ * @see {@link https://developer.harness.io/docs/feature-management-experimentation/sdks-and-infrastructure/client-side-sdks/browser-sdk/#logging}
58
58
  */
59
59
  export function ErrorLogger(): SplitIO.ILogger;
60
60
  }