@splitsoftware/splitio 10.23.2-rc.0 → 10.23.2-rc.2

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
+ 10.24.0 (October XX, 2023)
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
+ - Updated @splitsoftware/splitio-commons package to version 1.10.0 that includes vulnerability fixes, and adds the `defaultTreatment` property to the `SplitView` object.
4
+
1
5
  10.23.1 (September 22, 2023)
2
6
  - 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
7
 
@@ -1 +1 @@
1
- export var packageVersion = '10.23.2-rc.0';
1
+ export var packageVersion = '10.23.2-rc.2';
@@ -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.0';
4
+ exports.packageVersion = '10.23.2-rc.2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splitsoftware/splitio",
3
- "version": "10.23.2-rc.0",
3
+ "version": "10.23.2-rc.2",
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.9.2-rc.1",
43
+ "@splitsoftware/splitio-commons": "1.10.1-rc.0",
44
44
  "@types/google.analytics": "0.0.40",
45
45
  "@types/ioredis": "^4.28.0",
46
46
  "bloom-filters": "^3.0.0",
@@ -100,7 +100,7 @@
100
100
  "check:version": "cross-env NODE_ENV=test tape -r ./ts-node.register src/settings/__tests__/defaults.spec.js",
101
101
  "test-browser": "npm run test-browser-unit && npm run test-browser-e2e",
102
102
  "test-browser-unit": "cross-env NODE_ENV=test karma start karma/unit.karma.conf.js",
103
- "test-browser-e2e": "npm run test-browser-e2e-online && npm run test-browser-e2e-offline && npm run test-browser-e2e-destroy && npm run test-browser-e2e-errorCatching && npm run test-browser-e2e-push && npm run test-browser-e2e-gaIntegration",
103
+ "test-browser-e2e": "npm run test-browser-e2e-online && npm run test-browser-e2e-offline && npm run test-browser-e2e-destroy && npm run test-browser-e2e-errorCatching && npm run test-browser-e2e-push",
104
104
  "test-browser-e2e-online": "cross-env NODE_ENV=test karma start karma/e2e.online.karma.conf.js",
105
105
  "test-browser-e2e-offline": "cross-env NODE_ENV=test karma start karma/e2e.offline.karma.conf.js",
106
106
  "test-browser-e2e-destroy": "cross-env NODE_ENV=test karma start karma/e2e.destroy.karma.conf.js",
package/src/.DS_Store ADDED
Binary file
@@ -1 +1 @@
1
- export const packageVersion = '10.23.2-rc.0';
1
+ export const packageVersion = '10.23.2-rc.2';
Binary file
@@ -663,7 +663,12 @@ declare namespace SplitIO {
663
663
  */
664
664
  configs: {
665
665
  [treatmentName: string]: string
666
- }
666
+ },
667
+ /**
668
+ * The default treatment of the feature flag.
669
+ * @property {string} defaultTreatment
670
+ */
671
+ defaultTreatment: string,
667
672
  };
668
673
  /**
669
674
  * A promise that resolves to a feature flag view.
@@ -906,7 +911,7 @@ declare namespace SplitIO {
906
911
  *
907
912
  * @typedef {string} SplitFilterType
908
913
  */
909
- type SplitFilterType = 'byName' | 'byPrefix';
914
+ type SplitFilterType = 'bySet' | 'byName' | 'byPrefix';
910
915
  /**
911
916
  * Defines a feature flag filter, described by a type and list of values.
912
917
  */
@@ -1423,7 +1428,7 @@ declare namespace SplitIO {
1423
1428
  * @param {string} key - The string key representing the consumer.
1424
1429
  * @param {string} flagSet - The flag set name we want to get the treatments.
1425
1430
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1426
- * @returns {Treatments} The map with all the TreatmentWithConfig objects
1431
+ * @returns {Treatments} The map with all the Treatments objects
1427
1432
  */
1428
1433
  getTreatmentsByFlagSet(key: SplitKey, flagSet: string, attributes?: Attributes): Treatments,
1429
1434
  /**
@@ -1431,16 +1436,16 @@ declare namespace SplitIO {
1431
1436
  * @function getTreatmentsByFlagSet
1432
1437
  * @param {string} flagSet - The flag set name we want to get the treatments.
1433
1438
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1434
- * @returns {Treatments} The map with all the TreatmentWithConfig objects
1439
+ * @returns {Treatments} The map with all the Treatments objects
1435
1440
  */
1436
1441
  getTreatmentsByFlagSet(flagSet: string, attributes?: Attributes): Treatments,
1437
1442
  /**
1438
- * 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.
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 set.
1439
1444
  * @function getTreatmentsWithConfigByFlagSet
1440
1445
  * @param {string} key - The string key representing the consumer.
1441
1446
  * @param {string} flagSet - The flag set name we want to get the treatments.
1442
1447
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1443
- * @returns {Treatments} The map with all the TreatmentWithConfig objects
1448
+ * @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
1444
1449
  */
1445
1450
  getTreatmentsWithConfigByFlagSet(key: SplitKey, flagSet: string, attributes?: Attributes): TreatmentsWithConfig,
1446
1451
  /**
@@ -1448,7 +1453,7 @@ declare namespace SplitIO {
1448
1453
  * @function getTreatmentsWithConfigByFlagSet
1449
1454
  * @param {string} flagSet - The flag set name we want to get the treatments.
1450
1455
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1451
- * @returns {Treatments} The map with all the TreatmentWithConfig objects
1456
+ * @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
1452
1457
  */
1453
1458
  getTreatmentsWithConfigByFlagSet(flagSet: string, attributes?: Attributes): TreatmentsWithConfig,
1454
1459
  /**
@@ -1457,7 +1462,7 @@ declare namespace SplitIO {
1457
1462
  * @param {string} key - The string key representing the consumer.
1458
1463
  * @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
1459
1464
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1460
- * @returns {Treatments} The map with all the TreatmentWithConfig objects
1465
+ * @returns {Treatments} The map with all the Treatments objects
1461
1466
  */
1462
1467
  getTreatmentsByFlagSets(key: SplitKey, flagSets: string[], attributes?: Attributes): Treatments,
1463
1468
  /**
@@ -1465,7 +1470,7 @@ declare namespace SplitIO {
1465
1470
  * @function getTreatmentsByFlagSets
1466
1471
  * @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
1467
1472
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1468
- * @returns {Treatments} The map with all the TreatmentWithConfig objects
1473
+ * @returns {Treatments} The map with all the Treatments objects
1469
1474
  */
1470
1475
  getTreatmentsByFlagSets(flagSets: string[], attributes?: Attributes): Treatments,
1471
1476
  /**
@@ -1474,7 +1479,7 @@ declare namespace SplitIO {
1474
1479
  * @param {string} key - The string key representing the consumer.
1475
1480
  * @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
1476
1481
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1477
- * @returns {Treatments} The map with all the TreatmentWithConfig objects
1482
+ * @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
1478
1483
  */
1479
1484
  getTreatmentsWithConfigByFlagSets(key: SplitKey, flagSets: string[], attributes?: Attributes): TreatmentsWithConfig,
1480
1485
  /**
@@ -1482,7 +1487,7 @@ declare namespace SplitIO {
1482
1487
  * @function getTreatmentsWithConfigByFlagSets
1483
1488
  * @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
1484
1489
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1485
- * @returns {Treatments} The map with all the TreatmentWithConfig objects
1490
+ * @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
1486
1491
  */
1487
1492
  getTreatmentsWithConfigByFlagSets(flagSets: string[], attributes?: Attributes): TreatmentsWithConfig,
1488
1493
  /**
@@ -1615,6 +1620,46 @@ declare namespace SplitIO {
1615
1620
  * @returns {AsyncTreatmentsWithConfig} TreatmentsWithConfig promise that resolves to the map of TreatmentsWithConfig objects.
1616
1621
  */
1617
1622
  getTreatmentsWithConfig(key: SplitKey, featureFlagNames: string[], attributes?: Attributes): AsyncTreatmentsWithConfig,
1623
+ /**
1624
+ * Returns a Treatments value, which is an object map with the treatments for the feature flags related to the given flag set.
1625
+ * For usage on NodeJS as we don't have only one key.
1626
+ * @function getTreatmentsByFlagSet
1627
+ * @param {string} key - The string key representing the consumer.
1628
+ * @param {string} flagSet - The flag set name we want to get the treatments.
1629
+ * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1630
+ * @returns {AsyncTreatments} Treatments promise that resolves to the treatments object map.
1631
+ */
1632
+ getTreatmentsByFlagSet(key: SplitKey, flagSet: string, attributes?: Attributes): AsyncTreatments,
1633
+ /**
1634
+ * 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.
1635
+ * For usage on NodeJS as we don't have only one key.
1636
+ * @function getTreatmentsWithConfigByFlagSet
1637
+ * @param {string} flagSet - The flag set name we want to get the treatments.
1638
+ * @param {string} key - The string key representing the consumer.
1639
+ * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1640
+ * @returns {AsyncTreatmentsWithConfig} TreatmentsWithConfig promise that resolves to the TreatmentsWithConfig object.
1641
+ */
1642
+ getTreatmentsWithConfigByFlagSet(key: SplitKey, flagSet: string, attributes?: Attributes): AsyncTreatmentsWithConfig,
1643
+ /**
1644
+ * 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.
1645
+ * For usage on NodeJS as we don't have only one key.
1646
+ * @function getTreatmentsByFlagSets
1647
+ * @param {string} key - The string key representing the consumer.
1648
+ * @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
1649
+ * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1650
+ * @returns {AsyncTreatments} Treatments promise that resolves to the treatments object map.
1651
+ */
1652
+ getTreatmentsByFlagSets(key: SplitKey, flagSets: string[], attributes?: Attributes): AsyncTreatments,
1653
+ /**
1654
+ * 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.
1655
+ * For usage on NodeJS as we don't have only one key.
1656
+ * @function getTreatmentsWithConfigByFlagSets
1657
+ * @param {string} key - The string key representing the consumer.
1658
+ * @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
1659
+ * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1660
+ * @returns {AsyncTreatmentsWithConfig} TreatmentsWithConfig promise that resolves to the TreatmentsWithConfig object.
1661
+ */
1662
+ getTreatmentsWithConfigByFlagSets(key: SplitKey, flagSets: string[], attributes?: Attributes): AsyncTreatmentsWithConfig,
1618
1663
  /**
1619
1664
  * 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).
1620
1665
  * @function track