@splitsoftware/splitio-browserjs 0.10.2-rc.2 → 0.11.1-rc.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,14 @@
1
- 0.10.2 (October XX, 2023)
1
+ 0.12.0 (November 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
+ - Added `sets` property to the `SplitView` object returned by the `split` and `splits` methods of the SDK manager to expose flag sets on flag views.
9
+ - Updated @splitsoftware/splitio-commons package to version 1.11.0.
10
+
11
+ 0.11.0 (October 31, 2023)
2
12
  - 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
13
  - Updated @splitsoftware/splitio-commons package to version 1.10.0 that includes vulnerability fixes, and adds the `defaultTreatment` property to the `SplitView` object.
4
14
 
@@ -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.1-rc.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.1-rc.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.1-rc.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.1-rc.3",
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.1-rc.0';
6
6
 
7
7
  /**
8
8
  * In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.
@@ -499,6 +499,11 @@ declare namespace SplitIO {
499
499
  configs: {
500
500
  [treatmentName: string]: string
501
501
  },
502
+ /**
503
+ * List of sets of the feature flag.
504
+ * @property {string[]} sets
505
+ */
506
+ sets: string[],
502
507
  /**
503
508
  * The default treatment of the feature flag.
504
509
  * @property {string} defaultTreatment
@@ -801,7 +806,7 @@ declare namespace SplitIO {
801
806
  *
802
807
  * @typedef {string} SplitFilterType
803
808
  */
804
- type SplitFilterType = 'byName' | 'byPrefix';
809
+ type SplitFilterType = 'bySet' | 'byName' | 'byPrefix';
805
810
  /**
806
811
  * Defines a feature flag filter, described by a type and list of values.
807
812
  */
@@ -1228,7 +1233,7 @@ declare namespace SplitIO {
1228
1233
  */
1229
1234
  getTreatmentsByFlagSet(key: SplitKey, flagSet: string, attributes?: Attributes): Treatments,
1230
1235
  /**
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.
1236
+ * 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.
1232
1237
  * @function getTreatmentsWithConfigByFlagSet
1233
1238
  * @param {string} key - The string key representing the consumer.
1234
1239
  * @param {string} flagSet - The flag set name we want to get the treatments.
@@ -1325,7 +1330,7 @@ declare namespace SplitIO {
1325
1330
  */
1326
1331
  getTreatmentsByFlagSet(key: SplitKey, flagSet: string, attributes?: Attributes): AsyncTreatments,
1327
1332
  /**
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.
1333
+ * 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.
1329
1334
  * For usage on NodeJS as we don't have only one key.
1330
1335
  * @function getTreatmentsWithConfigByFlagSet
1331
1336
  * @param {string} key - The string key representing the consumer.
@@ -1523,7 +1528,7 @@ declare namespace SplitIO {
1523
1528
  * @function getTreatmentsWithConfig
1524
1529
  * @param {Array<string>} featureFlagNames - An array of the feature flag names we want to get the treatments.
1525
1530
  * @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.
1531
+ * @returns {AsyncTreatmentsWithConfig} TreatmentsWithConfig promise that resolves to the TreatmentsWithConfig object.
1527
1532
  */
1528
1533
  getTreatmentsWithConfig(featureFlagNames: string[], attributes?: Attributes): AsyncTreatmentsWithConfig,
1529
1534
  /**
@@ -1539,7 +1544,7 @@ declare namespace SplitIO {
1539
1544
  * @function getTreatmentsWithConfigByFlagSet
1540
1545
  * @param {string} flagSet - The flag set name we want to get the treatments.
1541
1546
  * @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.
1547
+ * @returns {AsyncTreatmentsWithConfig} TreatmentsWithConfig promise that resolves to the TreatmentsWithConfig object.
1543
1548
  */
1544
1549
  getTreatmentsWithConfigByFlagSet(flagSet: string, attributes?: Attributes): AsyncTreatmentsWithConfig,
1545
1550
  /**
@@ -1555,7 +1560,7 @@ declare namespace SplitIO {
1555
1560
  * @function getTreatmentsWithConfigByFlagSets
1556
1561
  * @param {Array<string>} flagSets - An array of the flag set names we want to get the treatments.
1557
1562
  * @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.
1563
+ * @returns {AsyncTreatmentsWithConfig} TreatmentsWithConfig promise that resolves to the TreatmentsWithConfig object.
1559
1564
  */
1560
1565
  getTreatmentsWithConfigByFlagSets(flagSets: string[], attributes?: Attributes): AsyncTreatmentsWithConfig,
1561
1566
  /**