@splitsoftware/splitio 10.23.1-rc.1 → 10.23.1-rc.3

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,6 @@
1
+ 10.23.1 (September 22, 2023)
2
+ - Updated @splitsoftware/splitio-commons package to version 1.9.1. This update removes the handler for 'unload' DOM events, that can prevent browsers from being able to put pages in the back/forward cache for faster back and forward loads (Related to issue https://github.com/splitio/javascript-client/issues/759).
3
+
1
4
  10.23.0 (July 18, 2023)
2
5
  - Updated @splitsoftware/splitio-commons package to version 1.9.0 that includes minor improvements:
3
6
  - Updated streaming architecture implementation to apply feature flag updates from the notification received which is now enhanced, improving efficiency and reliability of the whole update system.
@@ -5,7 +8,7 @@
5
8
  10.22.6 (July 6, 2023)
6
9
  - Updated some transitive dependencies for vulnerability fixes.
7
10
  - Updated @splitsoftware/splitio-commons package to version 1.8.3 that includes the following bug fix:
8
- - Bugfix - The `destroy` method has been updated to immediately flag the SDK client as destroyed, to prevent access to the storage when `getTreatment` and `track` methods are called after the SDK is destroyed.
11
+ - Bugfixing - The `destroy` method has been updated to immediately flag the SDK client as destroyed, to prevent access to the storage when `getTreatment` and `track` methods are called after the SDK is destroyed.
9
12
 
10
13
  10.22.5 (May 15, 2023)
11
14
  - Updated @splitsoftware/splitio-commons package to version 1.8.2 that includes minor improvements.
@@ -21,13 +21,23 @@ export function SplitSuite(config, __updateModules) {
21
21
  if (settings.mode !== STANDALONE_MODE)
22
22
  return sdk;
23
23
  // Setup RUM Agent
24
- SplitRumAgent.__getConfig().log = settings.log;
24
+ var agentConfig = SplitRumAgent.__getConfig();
25
+ if (agentConfig.a) {
26
+ settings.log.warn('RUM Agent already setup. The new Suite instance will reset the RUM Agent configuration.');
27
+ }
28
+ agentConfig.log = settings.log;
29
+ SplitRumAgent.removeIdentities(); // reset identities for new Suite
25
30
  SplitRumAgent.setup(settings.core.authorizationKey, objectAssign({
26
31
  url: settings.urls.events,
27
- pushRate: settings.scheduler.eventsPushRate,
28
- queueSize: settings.scheduler.eventsQueueSize
32
+ userConsent: settings.userConsent
29
33
  }, settings.rumAgent));
30
34
  var clients = new _Set();
35
+ // Override UserConsent.setStatus to update RUM Agent consent
36
+ var originalSetStatus = sdk.UserConsent.setStatus;
37
+ sdk.UserConsent.setStatus = function (newStatus) {
38
+ SplitRumAgent.setUserConsent(newStatus);
39
+ return originalSetStatus.apply(this, arguments);
40
+ };
31
41
  // Create Suite instance extending SDK
32
42
  return objectAssign({}, sdk, {
33
43
  client: function () {
@@ -46,6 +46,7 @@ function ProcessEmitWarning(warning) {
46
46
  if (console && console.warn)
47
47
  console.warn(warning);
48
48
  }
49
+ // eslint-disable-next-line compat/compat
49
50
  var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
50
51
  return value !== value;
51
52
  };
@@ -1 +1 @@
1
- export var packageVersion = '10.23.1-rc.1';
1
+ export var packageVersion = '10.23.1-rc.3';
@@ -24,13 +24,23 @@ function SplitSuite(config, __updateModules) {
24
24
  if (settings.mode !== constants_1.STANDALONE_MODE)
25
25
  return sdk;
26
26
  // Setup RUM Agent
27
- browser_rum_agent_1.SplitRumAgent.__getConfig().log = settings.log;
27
+ var agentConfig = browser_rum_agent_1.SplitRumAgent.__getConfig();
28
+ if (agentConfig.a) {
29
+ settings.log.warn('RUM Agent already setup. The new Suite instance will reset the RUM Agent configuration.');
30
+ }
31
+ agentConfig.log = settings.log;
32
+ browser_rum_agent_1.SplitRumAgent.removeIdentities(); // reset identities for new Suite
28
33
  browser_rum_agent_1.SplitRumAgent.setup(settings.core.authorizationKey, (0, objectAssign_1.objectAssign)({
29
34
  url: settings.urls.events,
30
- pushRate: settings.scheduler.eventsPushRate,
31
- queueSize: settings.scheduler.eventsQueueSize
35
+ userConsent: settings.userConsent
32
36
  }, settings.rumAgent));
33
37
  var clients = new sets_1._Set();
38
+ // Override UserConsent.setStatus to update RUM Agent consent
39
+ var originalSetStatus = sdk.UserConsent.setStatus;
40
+ sdk.UserConsent.setStatus = function (newStatus) {
41
+ browser_rum_agent_1.SplitRumAgent.setUserConsent(newStatus);
42
+ return originalSetStatus.apply(this, arguments);
43
+ };
34
44
  // Create Suite instance extending SDK
35
45
  return (0, objectAssign_1.objectAssign)({}, sdk, {
36
46
  client: function () {
@@ -49,6 +49,7 @@ function ProcessEmitWarning(warning) {
49
49
  if (console && console.warn)
50
50
  console.warn(warning);
51
51
  }
52
+ // eslint-disable-next-line compat/compat
52
53
  var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
53
54
  return value !== value;
54
55
  };
@@ -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 = '10.23.1-rc.1';
4
+ exports.packageVersion = '10.23.1-rc.3';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splitsoftware/splitio",
3
- "version": "10.23.1-rc.1",
3
+ "version": "10.23.1-rc.3",
4
4
  "description": "Split SDK",
5
5
  "files": [
6
6
  "README.md",
@@ -41,8 +41,8 @@
41
41
  "node": ">=6"
42
42
  },
43
43
  "dependencies": {
44
- "@splitsoftware/browser-rum-agent": "0.3.0",
45
- "@splitsoftware/splitio-commons": "1.9.1-rc.0",
44
+ "@splitsoftware/browser-rum-agent": "0.3.2-rc.0",
45
+ "@splitsoftware/splitio-commons": "1.9.2-rc.2",
46
46
  "@types/google.analytics": "0.0.40",
47
47
  "@types/ioredis": "^4.28.0",
48
48
  "bloom-filters": "^3.0.0",
@@ -60,8 +60,8 @@
60
60
  "copyfiles": "^2.4.1",
61
61
  "cross-env": "^7.0.3",
62
62
  "csv-streamify": "4.0.0",
63
- "eslint": "^8.0.1",
64
- "eslint-plugin-compat": "^4.1.4",
63
+ "eslint": "^8.48.0",
64
+ "eslint-plugin-compat": "^4.2.0",
65
65
  "eslint-plugin-import": "^2.25.4",
66
66
  "fetch-mock": "^9.11.0",
67
67
  "karma": "^6.3.16",
@@ -25,15 +25,26 @@ export function SplitSuite(config, __updateModules) {
25
25
  if (settings.mode !== STANDALONE_MODE) return sdk;
26
26
 
27
27
  // Setup RUM Agent
28
- SplitRumAgent.__getConfig().log = settings.log;
28
+ const agentConfig = SplitRumAgent.__getConfig();
29
+ if (agentConfig.a) {
30
+ settings.log.warn('RUM Agent already setup. The new Suite instance will reset the RUM Agent configuration.');
31
+ }
32
+ agentConfig.log = settings.log;
33
+ SplitRumAgent.removeIdentities(); // reset identities for new Suite
29
34
  SplitRumAgent.setup(settings.core.authorizationKey, objectAssign({
30
35
  url: settings.urls.events,
31
- pushRate: settings.scheduler.eventsPushRate,
32
- queueSize: settings.scheduler.eventsQueueSize
36
+ userConsent: settings.userConsent
33
37
  }, settings.rumAgent));
34
38
 
35
39
  const clients = new _Set();
36
40
 
41
+ // Override UserConsent.setStatus to update RUM Agent consent
42
+ const originalSetStatus = sdk.UserConsent.setStatus;
43
+ sdk.UserConsent.setStatus = function (newStatus) {
44
+ SplitRumAgent.setUserConsent(newStatus);
45
+ return originalSetStatus.apply(this, arguments);
46
+ };
47
+
37
48
  // Create Suite instance extending SDK
38
49
  return objectAssign({}, sdk, {
39
50
  client() {
@@ -48,6 +48,7 @@ function ProcessEmitWarning(warning) {
48
48
  if (console && console.warn) console.warn(warning);
49
49
  }
50
50
 
51
+ // eslint-disable-next-line compat/compat
51
52
  var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
52
53
  return value !== value;
53
54
  };
@@ -1 +1 @@
1
- export const packageVersion = '10.23.1-rc.1';
1
+ export const packageVersion = '10.23.1-rc.3';
@@ -190,8 +190,14 @@ interface IUserConsentAPI {
190
190
  */
191
191
  interface ISharedSettings {
192
192
  /**
193
- * Whether the logger should be enabled or disabled by default.
194
- * @property {Boolean} debug
193
+ * Boolean value to indicate whether the logger should be enabled or disabled, or a log level string.
194
+ *
195
+ * Examples:
196
+ * ```javascript
197
+ * config.debug = true
198
+ * config.debug = 'WARN'
199
+ * ```
200
+ * @property {boolean | LogLevel} debug
195
201
  * @default false
196
202
  */
197
203
  debug?: boolean | LogLevel,