@splitsoftware/splitio 10.23.2-rc.1 → 10.23.2-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,6 +1,13 @@
1
1
  10.24.0 (October XX, 2023)
2
+ - Added support for Flag Sets on the SDK, which enables grouping feature flags and interacting with the group rather than individually (more details in our documentation):
3
+ - Added new variations of the get treatment methods to support evaluating flags in given flag set/s.
4
+ - getTreatmentsByFlagSet and getTreatmentsByFlagSets
5
+ - getTreatmentsWithConfigByFlagSets and getTreatmentsWithConfigByFlagSets
6
+ - Added a new optional Split Filter configuration option. This allows the SDK and Split services to only synchronize the flags in the specified flag sets, avoiding unused or unwanted flags from being synced on the SDK instance, bringing all the benefits from a reduced payload.
7
+ - Note: Only applicable when the SDK is in charge of the rollout data synchronization. When not applicable, the SDK will log a warning on init.
8
+ - Updated the following SDK manager methods to expose flag sets on flag views.
2
9
  - 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
- - Updated @splitsoftware/splitio-commons package to version 1.10.0 that includes vulnerability fixes, and adds the `defaultTreatment` property to the `SplitView` object.
10
+ - Updated @splitsoftware/splitio-commons package to version 1.11.0 that includes vulnerability fixes, and adds the `defaultTreatment` property to the `SplitView` object.
4
11
 
5
12
  10.23.1 (September 22, 2023)
6
13
  - 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).
@@ -1 +1 @@
1
- export var packageVersion = '10.23.2-rc.1';
1
+ export var packageVersion = '10.23.2-rc.3';
@@ -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.2-rc.1';
4
+ exports.packageVersion = '10.23.2-rc.3';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splitsoftware/splitio",
3
- "version": "10.23.2-rc.1",
3
+ "version": "10.23.2-rc.3",
4
4
  "description": "Split SDK",
5
5
  "files": [
6
6
  "README.md",
@@ -40,7 +40,7 @@
40
40
  "node": ">=6"
41
41
  },
42
42
  "dependencies": {
43
- "@splitsoftware/splitio-commons": "1.10.1-rc.0",
43
+ "@splitsoftware/splitio-commons": "1.10.1-rc.3",
44
44
  "@types/google.analytics": "0.0.40",
45
45
  "@types/ioredis": "^4.28.0",
46
46
  "bloom-filters": "^3.0.0",
@@ -1 +1 @@
1
- export const packageVersion = '10.23.2-rc.1';
1
+ export const packageVersion = '10.23.2-rc.3';
@@ -664,6 +664,11 @@ declare namespace SplitIO {
664
664
  configs: {
665
665
  [treatmentName: string]: string
666
666
  },
667
+ /**
668
+ * List of sets of the feature flag.
669
+ * @property {string[]} sets
670
+ */
671
+ sets?: string[],
667
672
  /**
668
673
  * The default treatment of the feature flag.
669
674
  * @property {string} defaultTreatment
@@ -911,7 +916,7 @@ declare namespace SplitIO {
911
916
  *
912
917
  * @typedef {string} SplitFilterType
913
918
  */
914
- type SplitFilterType = 'byName' | 'byPrefix';
919
+ type SplitFilterType = 'bySet' | 'byName' | 'byPrefix';
915
920
  /**
916
921
  * Defines a feature flag filter, described by a type and list of values.
917
922
  */
@@ -1428,7 +1433,7 @@ declare namespace SplitIO {
1428
1433
  * @param {string} key - The string key representing the consumer.
1429
1434
  * @param {string} flagSet - The flag set name we want to get the treatments.
1430
1435
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1431
- * @returns {Treatments} The map with all the TreatmentWithConfig objects
1436
+ * @returns {Treatments} The map with all the Treatments objects
1432
1437
  */
1433
1438
  getTreatmentsByFlagSet(key: SplitKey, flagSet: string, attributes?: Attributes): Treatments,
1434
1439
  /**
@@ -1436,16 +1441,16 @@ declare namespace SplitIO {
1436
1441
  * @function getTreatmentsByFlagSet
1437
1442
  * @param {string} flagSet - The flag set name we want to get the treatments.
1438
1443
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1439
- * @returns {Treatments} The map with all the TreatmentWithConfig objects
1444
+ * @returns {Treatments} The map with all the Treatments objects
1440
1445
  */
1441
1446
  getTreatmentsByFlagSet(flagSet: string, attributes?: Attributes): Treatments,
1442
1447
  /**
1443
- * 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.
1448
+ * 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.
1444
1449
  * @function getTreatmentsWithConfigByFlagSet
1445
1450
  * @param {string} key - The string key representing the consumer.
1446
1451
  * @param {string} flagSet - The flag set name we want to get the treatments.
1447
1452
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1448
- * @returns {Treatments} The map with all the TreatmentWithConfig objects
1453
+ * @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
1449
1454
  */
1450
1455
  getTreatmentsWithConfigByFlagSet(key: SplitKey, flagSet: string, attributes?: Attributes): TreatmentsWithConfig,
1451
1456
  /**
@@ -1453,7 +1458,7 @@ declare namespace SplitIO {
1453
1458
  * @function getTreatmentsWithConfigByFlagSet
1454
1459
  * @param {string} flagSet - The flag set name we want to get the treatments.
1455
1460
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1456
- * @returns {Treatments} The map with all the TreatmentWithConfig objects
1461
+ * @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
1457
1462
  */
1458
1463
  getTreatmentsWithConfigByFlagSet(flagSet: string, attributes?: Attributes): TreatmentsWithConfig,
1459
1464
  /**
@@ -1462,7 +1467,7 @@ declare namespace SplitIO {
1462
1467
  * @param {string} key - The string key representing the consumer.
1463
1468
  * @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
1464
1469
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1465
- * @returns {Treatments} The map with all the TreatmentWithConfig objects
1470
+ * @returns {Treatments} The map with all the Treatments objects
1466
1471
  */
1467
1472
  getTreatmentsByFlagSets(key: SplitKey, flagSets: string[], attributes?: Attributes): Treatments,
1468
1473
  /**
@@ -1470,7 +1475,7 @@ declare namespace SplitIO {
1470
1475
  * @function getTreatmentsByFlagSets
1471
1476
  * @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
1472
1477
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1473
- * @returns {Treatments} The map with all the TreatmentWithConfig objects
1478
+ * @returns {Treatments} The map with all the Treatments objects
1474
1479
  */
1475
1480
  getTreatmentsByFlagSets(flagSets: string[], attributes?: Attributes): Treatments,
1476
1481
  /**
@@ -1479,7 +1484,7 @@ declare namespace SplitIO {
1479
1484
  * @param {string} key - The string key representing the consumer.
1480
1485
  * @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
1481
1486
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1482
- * @returns {Treatments} The map with all the TreatmentWithConfig objects
1487
+ * @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
1483
1488
  */
1484
1489
  getTreatmentsWithConfigByFlagSets(key: SplitKey, flagSets: string[], attributes?: Attributes): TreatmentsWithConfig,
1485
1490
  /**
@@ -1487,7 +1492,7 @@ declare namespace SplitIO {
1487
1492
  * @function getTreatmentsWithConfigByFlagSets
1488
1493
  * @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
1489
1494
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1490
- * @returns {Treatments} The map with all the TreatmentWithConfig objects
1495
+ * @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
1491
1496
  */
1492
1497
  getTreatmentsWithConfigByFlagSets(flagSets: string[], attributes?: Attributes): TreatmentsWithConfig,
1493
1498
  /**
@@ -1620,6 +1625,46 @@ declare namespace SplitIO {
1620
1625
  * @returns {AsyncTreatmentsWithConfig} TreatmentsWithConfig promise that resolves to the map of TreatmentsWithConfig objects.
1621
1626
  */
1622
1627
  getTreatmentsWithConfig(key: SplitKey, featureFlagNames: string[], attributes?: Attributes): AsyncTreatmentsWithConfig,
1628
+ /**
1629
+ * Returns a Treatments value, which is an object map with the treatments for the feature flags related to the given flag set.
1630
+ * For usage on NodeJS as we don't have only one key.
1631
+ * @function getTreatmentsByFlagSet
1632
+ * @param {string} key - The string key representing the consumer.
1633
+ * @param {string} flagSet - The flag set name we want to get the treatments.
1634
+ * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1635
+ * @returns {AsyncTreatments} Treatments promise that resolves to the treatments object map.
1636
+ */
1637
+ getTreatmentsByFlagSet(key: SplitKey, flagSet: string, attributes?: Attributes): AsyncTreatments,
1638
+ /**
1639
+ * 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.
1640
+ * For usage on NodeJS as we don't have only one key.
1641
+ * @function getTreatmentsWithConfigByFlagSet
1642
+ * @param {string} flagSet - The flag set name we want to get the treatments.
1643
+ * @param {string} key - The string key representing the consumer.
1644
+ * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1645
+ * @returns {AsyncTreatmentsWithConfig} TreatmentsWithConfig promise that resolves to the TreatmentsWithConfig object.
1646
+ */
1647
+ getTreatmentsWithConfigByFlagSet(key: SplitKey, flagSet: string, attributes?: Attributes): AsyncTreatmentsWithConfig,
1648
+ /**
1649
+ * 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.
1650
+ * For usage on NodeJS as we don't have only one key.
1651
+ * @function getTreatmentsByFlagSets
1652
+ * @param {string} key - The string key representing the consumer.
1653
+ * @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
1654
+ * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1655
+ * @returns {AsyncTreatments} Treatments promise that resolves to the treatments object map.
1656
+ */
1657
+ getTreatmentsByFlagSets(key: SplitKey, flagSets: string[], attributes?: Attributes): AsyncTreatments,
1658
+ /**
1659
+ * 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.
1660
+ * For usage on NodeJS as we don't have only one key.
1661
+ * @function getTreatmentsWithConfigByFlagSets
1662
+ * @param {string} key - The string key representing the consumer.
1663
+ * @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
1664
+ * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1665
+ * @returns {AsyncTreatmentsWithConfig} TreatmentsWithConfig promise that resolves to the TreatmentsWithConfig object.
1666
+ */
1667
+ getTreatmentsWithConfigByFlagSets(key: SplitKey, flagSets: string[], attributes?: Attributes): AsyncTreatmentsWithConfig,
1623
1668
  /**
1624
1669
  * 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).
1625
1670
  * @function track