@splitsoftware/splitio-browserjs 0.9.3-rc.0 → 0.9.3-rc.1

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,7 @@
1
+ 0.9.3 (March 20, 2023)
2
+ - Updated @splitsoftware/splitio-commons package to version 1.8.1 that includes minor improvements.
3
+ - Updated some transitive dependencies for vulnerability fixes.
4
+
1
5
  0.9.2 (December 16, 2022)
2
6
  - Updated some transitive dependencies for vulnerability fixes.
3
7
  - Bugfixing - Upgrade @splitsoftware/splitio-commons package to version 1.7.3 which includes a memory leak fix for localhost mode (Related to issue https://github.com/splitio/javascript-commons/issues/181) among other improvements.
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright © 2022 Split Software, Inc.
1
+ Copyright © 2023 Split Software, Inc.
2
2
 
3
3
  Licensed under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Split JavaScript SDK for Browsers
2
2
 
3
- [![npm version](https://badge.fury.io/js/%40splitsoftware%2Fsplitio-browserjs.svg)](https://badge.fury.io/js/%40splitsoftware%2Fsplitio) [![Build Status](https://github.com/splitio/javascript-browser-client/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/splitio/javascript-browser-client/actions/workflows/ci-cd.yml)
3
+ [![npm version](https://badge.fury.io/js/%40splitsoftware%2Fsplitio-browserjs.svg)](https://badge.fury.io/js/%40splitsoftware%2Fsplitio-browserjs) [![Build Status](https://github.com/splitio/javascript-browser-client/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/splitio/javascript-browser-client/actions/workflows/ci-cd.yml)
4
4
 
5
5
  ## Overview
6
6
  This SDK is designed to work with Split, the platform for controlled rollouts, which serves features to your users via a Split feature flag to manage your complete customer experience.
@@ -63,11 +63,12 @@ Split has built and maintains SDKs for:
63
63
 
64
64
  * .NET [Github](https://github.com/splitio/dotnet-client) [Docs](https://help.split.io/hc/en-us/articles/360020240172--NET-SDK)
65
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)
66
67
  * GO [Github](https://github.com/splitio/go-client) [Docs](https://help.split.io/hc/en-us/articles/360020093652-Go-SDK)
67
68
  * iOS [Github](https://github.com/splitio/ios-client) [Docs](https://help.split.io/hc/en-us/articles/360020401491-iOS-SDK)
68
69
  * Java [Github](https://github.com/splitio/java-client) [Docs](https://help.split.io/hc/en-us/articles/360020405151-Java-SDK)
69
- * Javascript [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK)
70
- * Javascript for Browser [Github](https://github.com/splitio/javascript-browser-client) [Docs](https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK)
70
+ * JavaScript [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK)
71
+ * JavaScript for Browser [Github](https://github.com/splitio/javascript-browser-client) [Docs](https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK)
71
72
  * Node [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK)
72
73
  * PHP [Github](https://github.com/splitio/php-client) [Docs](https://help.split.io/hc/en-us/articles/360020350372-PHP-SDK)
73
74
  * Python [Github](https://github.com/splitio/python-client) [Docs](https://help.split.io/hc/en-us/articles/360020359652-Python-SDK)
package/cjs/full/umd.js CHANGED
@@ -1,15 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  // @ts-nocheck
4
- var index_1 = require("./index");
4
+ var splitFactory_1 = require("./splitFactory");
5
+ var index_1 = require("@splitsoftware/splitio-commons/cjs/storages/inLocalStorage/index");
6
+ var GoogleAnalyticsToSplit_1 = require("@splitsoftware/splitio-commons/cjs/integrations/ga/GoogleAnalyticsToSplit");
7
+ var SplitToGoogleAnalytics_1 = require("@splitsoftware/splitio-commons/cjs/integrations/ga/SplitToGoogleAnalytics");
8
+ var ErrorLogger_1 = require("@splitsoftware/splitio-commons/cjs/logger/browser/ErrorLogger");
9
+ var WarnLogger_1 = require("@splitsoftware/splitio-commons/cjs/logger/browser/WarnLogger");
10
+ var InfoLogger_1 = require("@splitsoftware/splitio-commons/cjs/logger/browser/InfoLogger");
11
+ var DebugLogger_1 = require("@splitsoftware/splitio-commons/cjs/logger/browser/DebugLogger");
5
12
  // Include all pluggable modules as properties to expose at the global `splitio` object
6
- index_1.SplitFactory.SplitFactory = index_1.SplitFactory;
7
- index_1.SplitFactory.InLocalStorage = index_1.InLocalStorage;
8
- index_1.SplitFactory.GoogleAnalyticsToSplit = index_1.GoogleAnalyticsToSplit;
9
- index_1.SplitFactory.SplitToGoogleAnalytics = index_1.SplitToGoogleAnalytics;
10
- index_1.SplitFactory.ErrorLogger = index_1.ErrorLogger;
11
- index_1.SplitFactory.WarnLogger = index_1.WarnLogger;
12
- index_1.SplitFactory.InfoLogger = index_1.InfoLogger;
13
- index_1.SplitFactory.DebugLogger = index_1.DebugLogger;
13
+ splitFactory_1.SplitFactory.SplitFactory = splitFactory_1.SplitFactory;
14
+ splitFactory_1.SplitFactory.InLocalStorage = index_1.InLocalStorage;
15
+ splitFactory_1.SplitFactory.GoogleAnalyticsToSplit = GoogleAnalyticsToSplit_1.GoogleAnalyticsToSplit;
16
+ splitFactory_1.SplitFactory.SplitToGoogleAnalytics = SplitToGoogleAnalytics_1.SplitToGoogleAnalytics;
17
+ splitFactory_1.SplitFactory.ErrorLogger = ErrorLogger_1.ErrorLogger;
18
+ splitFactory_1.SplitFactory.WarnLogger = WarnLogger_1.WarnLogger;
19
+ splitFactory_1.SplitFactory.InfoLogger = InfoLogger_1.InfoLogger;
20
+ splitFactory_1.SplitFactory.DebugLogger = DebugLogger_1.DebugLogger;
14
21
  // eslint-disable-next-line import/no-default-export
15
- exports.default = index_1.SplitFactory;
22
+ exports.default = splitFactory_1.SplitFactory;
@@ -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 = '0.9.3-rc.0';
6
+ var packageVersion = '0.9.3-rc.1';
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'.
package/esm/full/umd.js CHANGED
@@ -1,5 +1,12 @@
1
1
  // @ts-nocheck
2
- import { SplitFactory, InLocalStorage, GoogleAnalyticsToSplit, SplitToGoogleAnalytics, ErrorLogger, WarnLogger, InfoLogger, DebugLogger } from './index';
2
+ import { SplitFactory } from './splitFactory';
3
+ import { InLocalStorage } from '@splitsoftware/splitio-commons/esm/storages/inLocalStorage/index';
4
+ import { GoogleAnalyticsToSplit } from '@splitsoftware/splitio-commons/esm/integrations/ga/GoogleAnalyticsToSplit';
5
+ import { SplitToGoogleAnalytics } from '@splitsoftware/splitio-commons/esm/integrations/ga/SplitToGoogleAnalytics';
6
+ import { ErrorLogger } from '@splitsoftware/splitio-commons/esm/logger/browser/ErrorLogger';
7
+ import { WarnLogger } from '@splitsoftware/splitio-commons/esm/logger/browser/WarnLogger';
8
+ import { InfoLogger } from '@splitsoftware/splitio-commons/esm/logger/browser/InfoLogger';
9
+ import { DebugLogger } from '@splitsoftware/splitio-commons/esm/logger/browser/DebugLogger';
3
10
  // Include all pluggable modules as properties to expose at the global `splitio` object
4
11
  SplitFactory.SplitFactory = SplitFactory;
5
12
  SplitFactory.InLocalStorage = InLocalStorage;
@@ -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 = '0.9.3-rc.0';
3
+ var packageVersion = '0.9.3-rc.1';
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,7 +1,7 @@
1
1
  {
2
2
  "name": "@splitsoftware/splitio-browserjs",
3
- "version": "0.9.3-rc.0",
4
- "description": "Split SDK for Javascript on Browser",
3
+ "version": "0.9.3-rc.1",
4
+ "description": "Split SDK for JavaScript on Browser",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
7
7
  "types": "types",
@@ -64,13 +64,14 @@
64
64
  "bugs": "https://github.com/splitio/javascript-browser-client/issues",
65
65
  "homepage": "https://github.com/splitio/javascript-browser-client#readme",
66
66
  "dependencies": {
67
- "@splitsoftware/splitio-commons": "1.8.0",
67
+ "@splitsoftware/splitio-commons": "1.8.1",
68
68
  "@types/google.analytics": "0.0.40"
69
69
  },
70
70
  "devDependencies": {
71
- "@rollup/plugin-commonjs": "^13.0.0",
72
- "@rollup/plugin-json": "^4.1.0",
73
- "@rollup/plugin-node-resolve": "^8.0.1",
71
+ "@rollup/plugin-commonjs": "^24.0.1",
72
+ "@rollup/plugin-json": "^6.0.0",
73
+ "@rollup/plugin-node-resolve": "^13.0.6",
74
+ "@rollup/plugin-terser": "^0.4.0",
74
75
  "@types/jest": "^27.0.2",
75
76
  "@types/node-fetch": "^2.5.7",
76
77
  "@typescript-eslint/eslint-plugin": "^4.14.1",
@@ -80,18 +81,18 @@
80
81
  "eslint-plugin-import": "^2.25.4",
81
82
  "fetch-mock": "^9.11.0",
82
83
  "jest": "^27.2.3",
83
- "karma": "^6.4.0",
84
+ "karma": "^6.4.1",
84
85
  "karma-chrome-launcher": "^3.1.1",
85
86
  "karma-rollup-preprocessor": "^7.0.8",
86
87
  "karma-tap": "^4.2.0",
88
+ "puppeteer": "^3.3.0",
87
89
  "replace": "^1.2.1",
88
90
  "rimraf": "^3.0.2",
89
- "rollup": "^2.35.1",
90
- "rollup-plugin-node-polyfills": "^0.2.1",
91
+ "rollup": "^2.79.1",
92
+ "rollup-plugin-polyfill-node": "^0.12.0",
91
93
  "rollup-plugin-string": "^3.0.0",
92
- "rollup-plugin-terser": "^7.0.2",
93
- "rollup-plugin-ts": "^1.4.7",
94
- "rollup-plugin-visualizer": "^4.2.0",
94
+ "rollup-plugin-ts": "^3.2.0",
95
+ "rollup-plugin-visualizer": "^5.9.0",
95
96
  "sinon": "^9.2.2",
96
97
  "tape": "4.13.2",
97
98
  "tape-catch": "1.0.6",
package/src/full/umd.ts CHANGED
@@ -1,5 +1,12 @@
1
1
  // @ts-nocheck
2
- import { SplitFactory, InLocalStorage, GoogleAnalyticsToSplit, SplitToGoogleAnalytics, ErrorLogger, WarnLogger, InfoLogger, DebugLogger } from './index';
2
+ import { SplitFactory } from './splitFactory';
3
+ import { InLocalStorage } from '@splitsoftware/splitio-commons/src/storages/inLocalStorage/index';
4
+ import { GoogleAnalyticsToSplit } from '@splitsoftware/splitio-commons/src/integrations/ga/GoogleAnalyticsToSplit';
5
+ import { SplitToGoogleAnalytics } from '@splitsoftware/splitio-commons/src/integrations/ga/SplitToGoogleAnalytics';
6
+ import { ErrorLogger } from '@splitsoftware/splitio-commons/src/logger/browser/ErrorLogger';
7
+ import { WarnLogger } from '@splitsoftware/splitio-commons/src/logger/browser/WarnLogger';
8
+ import { InfoLogger } from '@splitsoftware/splitio-commons/src/logger/browser/InfoLogger';
9
+ import { DebugLogger } from '@splitsoftware/splitio-commons/src/logger/browser/DebugLogger';
3
10
 
4
11
  // Include all pluggable modules as properties to expose at the global `splitio` object
5
12
  SplitFactory.SplitFactory = SplitFactory;
@@ -2,7 +2,7 @@ import { LogLevels, isLogLevelString } from '@splitsoftware/splitio-commons/src/
2
2
  import { ConsentStatus, LogLevel } from '@splitsoftware/splitio-commons/src/types';
3
3
  import { CONSENT_GRANTED } from '@splitsoftware/splitio-commons/src/utils/constants';
4
4
 
5
- const packageVersion = '0.9.3-rc.0';
5
+ const packageVersion = '0.9.3-rc.1';
6
6
 
7
7
  /**
8
8
  * In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.
@@ -1,4 +1,4 @@
1
- // Declaration file for Javascript Browser Split Software SDK
1
+ // Declaration file for JavaScript Browser Split Software SDK
2
2
  // Project: http://www.split.io/
3
3
  // Definitions by: Nico Zelaya <https://github.com/NicoZelaya/>
4
4
 
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Declaration file for Javascript Browser Split Software SDK
1
+ // Declaration file for JavaScript Browser Split Software SDK
2
2
  // Project: http://www.split.io/
3
3
  // Definitions by: Nico Zelaya <https://github.com/NicoZelaya/>
4
4
 
@@ -1,4 +1,4 @@
1
- // Type definitions for Javascript Browser Split Software SDK
1
+ // Type definitions for JavaScript Browser Split Software SDK
2
2
  // Project: http://www.split.io/
3
3
  // Definitions by: Nico Zelaya <https://github.com/NicoZelaya/>
4
4
 
@@ -296,15 +296,14 @@ interface IStatusInterface extends IEventEmitter {
296
296
  */
297
297
  interface IBasicClient extends IStatusInterface {
298
298
  /**
299
- * Flush data
300
- * @function flush
301
- * @return {Promise<void>}
302
- */
303
- flush(): Promise<void>
304
- /**
305
- * Destroy the client instance.
299
+ * Destroys the client instance.
300
+ *
301
+ * In 'standalone' and 'partial consumer' modes, this method will flush any pending impressions and events.
302
+ * In 'standalone' mode, it also stops the synchronization of feature flag definitions with the backend.
303
+ * In 'consumer' and 'partial consumer' modes, this method also disconnects the SDK from the Pluggable storage.
304
+ *
306
305
  * @function destroy
307
- * @returns {Promise<void>}
306
+ * @returns {Promise<void>} A promise that will be resolved once the client is destroyed.
308
307
  */
309
308
  destroy(): Promise<void>
310
309
  }
@@ -547,7 +546,7 @@ declare namespace SplitIO {
547
546
  /**
548
547
  * Optional prefix to prevent any kind of data collision when having multiple factories using the same storage type.
549
548
  * @property {string} prefix
550
- * @default SPLITIO
549
+ * @default 'SPLITIO'
551
550
  */
552
551
  prefix?: string
553
552
  }
@@ -571,7 +570,7 @@ declare namespace SplitIO {
571
570
  /**
572
571
  * Optional prefix to prevent any kind of data collision when having multiple factories using the same storage wrapper.
573
572
  * @property {string} prefix
574
- * @default SPLITIO
573
+ * @default 'SPLITIO'
575
574
  */
576
575
  prefix?: string,
577
576
  /**
@@ -902,7 +901,7 @@ declare namespace SplitIO {
902
901
  * For "localhost" mode, use "localhost" as authorizationKey.
903
902
  *
904
903
  * @property {'standalone'} mode
905
- * @default standalone
904
+ * @default 'standalone'
906
905
  */
907
906
  mode?: 'standalone',
908
907
  /**