@splitsoftware/splitio-browserjs 0.10.2-rc.2 → 0.11.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,4 +1,4 @@
1
- 0.10.2 (October XX, 2023)
1
+ 0.11.0 (October 31, 2023)
2
2
  - Added `defaultTreatment` property to the `SplitView` object returned by the `split` and `splits` methods of the SDK manager (Related to issue https://github.com/splitio/javascript-commons/issues/225).
3
3
  - Updated @splitsoftware/splitio-commons package to version 1.10.0 that includes vulnerability fixes, and adds the `defaultTreatment` property to the `SplitView` object.
4
4
 
@@ -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.10.2-rc.2';
6
+ var packageVersion = '0.11.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 = '0.10.2-rc.2';
3
+ var packageVersion = '0.11.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": "0.10.2-rc.2",
3
+ "version": "0.11.0",
4
4
  "description": "Split SDK for JavaScript on Browser",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
@@ -64,7 +64,7 @@
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.10.1-rc.0",
67
+ "@splitsoftware/splitio-commons": "1.10.0",
68
68
  "@types/google.analytics": "0.0.40",
69
69
  "unfetch": "^4.2.0"
70
70
  },
@@ -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.10.2-rc.2';
5
+ const packageVersion = '0.11.0';
6
6
 
7
7
  /**
8
8
  * In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.
@@ -1218,42 +1218,6 @@ declare namespace SplitIO {
1218
1218
  * @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
1219
1219
  */
1220
1220
  getTreatmentsWithConfig(key: SplitKey, featureFlagNames: string[], attributes?: Attributes): TreatmentsWithConfig,
1221
- /**
1222
- * Returns a Treatments value, which is an object map with the treatments for the feature flags related to the given flag set.
1223
- * @function getTreatmentsByFlagSet
1224
- * @param {string} key - The string key representing the consumer.
1225
- * @param {string} flagSet - The flag set name we want to get the treatments.
1226
- * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1227
- * @returns {Treatments} The map with all the Treatment objects
1228
- */
1229
- getTreatmentsByFlagSet(key: SplitKey, flagSet: string, attributes?: Attributes): Treatments,
1230
- /**
1231
- * Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the feature flags related to the given flag sets.
1232
- * @function getTreatmentsWithConfigByFlagSet
1233
- * @param {string} key - The string key representing the consumer.
1234
- * @param {string} flagSet - The flag set name we want to get the treatments.
1235
- * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1236
- * @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
1237
- */
1238
- getTreatmentsWithConfigByFlagSet(key: SplitKey, flagSet: string, attributes?: Attributes): TreatmentsWithConfig,
1239
- /**
1240
- * Returns a Treatments value, which is an object with both treatment and config string for to the feature flags related to the given flag sets.
1241
- * @function getTreatmentsByFlagSets
1242
- * @param {string} key - The string key representing the consumer.
1243
- * @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
1244
- * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1245
- * @returns {Treatments} The map with all the Treatment objects
1246
- */
1247
- getTreatmentsByFlagSets(key: SplitKey, flagSets: string[], attributes?: Attributes): Treatments,
1248
- /**
1249
- * Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the feature flags related to the given flag sets.
1250
- * @function getTreatmentsWithConfigByFlagSets
1251
- * @param {string} key - The string key representing the consumer.
1252
- * @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
1253
- * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1254
- * @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
1255
- */
1256
- getTreatmentsWithConfigByFlagSets(key: SplitKey, flagSets: string[], attributes?: Attributes): TreatmentsWithConfig,
1257
1221
  /**
1258
1222
  * Tracks an event to be fed to the results product on Split user interface.
1259
1223
  * @function track
@@ -1314,46 +1278,6 @@ declare namespace SplitIO {
1314
1278
  * @returns {AsyncTreatmentsWithConfig} TreatmentsWithConfig promise that resolves to the map of TreatmentsWithConfig objects.
1315
1279
  */
1316
1280
  getTreatmentsWithConfig(key: SplitKey, featureFlagNames: string[], attributes?: Attributes): AsyncTreatmentsWithConfig,
1317
- /**
1318
- * Returns a Treatments value, which is an object map with the treatments for the feature flags related to the given flag set.
1319
- * For usage on NodeJS as we don't have only one key.
1320
- * @function getTreatmentsByFlagSet
1321
- * @param {string} key - The string key representing the consumer.
1322
- * @param {string} flagSet - The flag set name we want to get the treatments.
1323
- * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1324
- * @returns {AsyncTreatments} Treatments promise that resolves to the treatments object map.
1325
- */
1326
- getTreatmentsByFlagSet(key: SplitKey, flagSet: string, attributes?: Attributes): AsyncTreatments,
1327
- /**
1328
- * Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the feature flags related to the given flag sets.
1329
- * For usage on NodeJS as we don't have only one key.
1330
- * @function getTreatmentsWithConfigByFlagSet
1331
- * @param {string} key - The string key representing the consumer.
1332
- * @param {string} flagSet - The flag set name we want to get the treatments.
1333
- * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1334
- * @returns {AsyncTreatmentsWithConfig} TreatmentsWithConfig promise that resolves to the map of TreatmentsWithConfig objects.
1335
- */
1336
- getTreatmentsWithConfigByFlagSet(key: SplitKey, flagSet: string, attributes?: Attributes): AsyncTreatmentWithConfig,
1337
- /**
1338
- * Returns a Treatments value, which is an object with both treatment and config string for to the feature flags related to the given flag sets.
1339
- * For usage on NodeJS as we don't have only one key.
1340
- * @function getTreatmentsByFlagSets
1341
- * @param {string} key - The string key representing the consumer.
1342
- * @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
1343
- * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1344
- * @returns {AsyncTreatments} Treatments promise that resolves to the treatments object map.
1345
- */
1346
- getTreatmentsByFlagSets(key: SplitKey, flagSets: string[], attributes?: Attributes): AsyncTreatments,
1347
- /**
1348
- * Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the feature flags related to the given flag sets.
1349
- * For usage on NodeJS as we don't have only one key.
1350
- * @function getTreatmentsWithConfigByFlagSets
1351
- * @param {string} key - The string key representing the consumer.
1352
- * @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
1353
- * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1354
- * @returns {AsyncTreatmentsWithConfig} TreatmentsWithConfig promise that resolves to the map of TreatmentsWithConfig objects.
1355
- */
1356
- getTreatmentsWithConfigByFlagSets(key: SplitKey, flagSets: string[], attributes?: Attributes): AsyncTreatmentWithConfig,
1357
1281
  /**
1358
1282
  * Tracks an event to be fed to the results product on Split user interface, and returns a promise to signal when the event was successfully queued (or not).
1359
1283
  * @function track
@@ -1404,38 +1328,6 @@ declare namespace SplitIO {
1404
1328
  * @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
1405
1329
  */
1406
1330
  getTreatmentsWithConfig(featureFlagNames: string[], attributes?: Attributes): TreatmentsWithConfig,
1407
- /**
1408
- * Returns a Treatments value, which is an object map with the treatments for the feature flags related to the given flag set.
1409
- * @function getTreatmentsByFlagSet
1410
- * @param {string} flagSet - The flag set name we want to get the treatments.
1411
- * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1412
- * @returns {Treatments} The map with all the Treatments objects
1413
- */
1414
- getTreatmentsByFlagSet(flagSet: string, attributes?: Attributes): Treatments,
1415
- /**
1416
- * Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the feature flags related to the given flag set.
1417
- * @function getTreatmentsWithConfigByFlagSet
1418
- * @param {string} flagSet - The flag set name we want to get the treatments.
1419
- * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1420
- * @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
1421
- */
1422
- getTreatmentsWithConfigByFlagSet(flagSet: string, attributes?: Attributes): TreatmentsWithConfig,
1423
- /**
1424
- * Returns a Returns a Treatments value, which is an object with both treatment and config string for to the feature flags related to the given flag sets.
1425
- * @function getTreatmentsByFlagSets
1426
- * @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
1427
- * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1428
- * @returns {Treatments} The map with all the Treatments objects
1429
- */
1430
- getTreatmentsByFlagSets(flagSets: string[], attributes?: Attributes): Treatments,
1431
- /**
1432
- * Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the feature flags related to the given flag sets.
1433
- * @function getTreatmentsWithConfigByFlagSets
1434
- * @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
1435
- * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1436
- * @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
1437
- */
1438
- getTreatmentsWithConfigByFlagSets(flagSets: string[], attributes?: Attributes): TreatmentsWithConfig,
1439
1331
  /**
1440
1332
  * Tracks an event to be fed to the results product on Split user interface.
1441
1333
  * @function track
@@ -1523,41 +1415,9 @@ declare namespace SplitIO {
1523
1415
  * @function getTreatmentsWithConfig
1524
1416
  * @param {Array<string>} featureFlagNames - An array of the feature flag names we want to get the treatments.
1525
1417
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1526
- * @returns {AsyncTreatmentWithConfig} TreatmentWithConfig promise that resolves to the TreatmentWithConfig object.
1418
+ * @returns {TreatmentsWithConfig} TreatmentsWithConfig promise that resolves to the map of TreatmentsWithConfig objects.
1527
1419
  */
1528
1420
  getTreatmentsWithConfig(featureFlagNames: string[], attributes?: Attributes): AsyncTreatmentsWithConfig,
1529
- /**
1530
- * Returns a Treatments value, which is an object map with the treatments for the feature flags related to the given flag set.
1531
- * @function getTreatmentsByFlagSet
1532
- * @param {string} flagSet - The flag set name we want to get the treatments.
1533
- * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1534
- * @returns {AsyncTreatments} Treatments promise that resolves to the treatments object map.
1535
- */
1536
- getTreatmentsByFlagSet(flagSet: string, attributes?: Attributes): AsyncTreatments,
1537
- /**
1538
- * Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the feature flags related to the given flag set.
1539
- * @function getTreatmentsWithConfigByFlagSet
1540
- * @param {string} flagSet - The flag set name we want to get the treatments.
1541
- * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1542
- * @returns {AsyncTreatmentWithConfig} TreatmentWithConfig promise that resolves to the TreatmentWithConfig object.
1543
- */
1544
- getTreatmentsWithConfigByFlagSet(flagSet: string, attributes?: Attributes): AsyncTreatmentsWithConfig,
1545
- /**
1546
- * Returns a Returns a Treatments value, which is an object with both treatment and config string for to the feature flags related to the given flag sets.
1547
- * @function getTreatmentsByFlagSets
1548
- * @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
1549
- * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1550
- * @returns {AsyncTreatments} Treatments promise that resolves to the treatments object map.
1551
- */
1552
- getTreatmentsByFlagSets(flagSets: string[], attributes?: Attributes): AsyncTreatments,
1553
- /**
1554
- * Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the feature flags related to the given flag sets.
1555
- * @function getTreatmentsWithConfigByFlagSets
1556
- * @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
1557
- * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1558
- * @returns {AsyncTreatmentWithConfig} TreatmentWithConfig promise that resolves to the TreatmentWithConfig object.
1559
- */
1560
- getTreatmentsWithConfigByFlagSets(flagSets: string[], attributes?: Attributes): AsyncTreatmentsWithConfig,
1561
1421
  /**
1562
1422
  * Tracks an event to be fed to the results product on Split user interface, and returns a promise to signal when the event was successfully queued (or not).
1563
1423
  * @function track