@splitsoftware/splitio-commons 2.5.0-rc.1 → 2.5.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
- 2.5.0 (September 9, 2025)
1
+ 2.5.0 (September 10, 2025)
2
2
  - Added `factory.getRolloutPlan()` method for standalone server-side SDKs, which returns the rollout plan snapshot from the storage.
3
3
  - Added `initialRolloutPlan` configuration option for standalone client-side SDKs, which allows preloading the SDK storage with a snapshot of the rollout plan.
4
4
 
@@ -10,7 +10,7 @@ function getRolloutPlan(log, storage, options) {
10
10
  if (options === void 0) { options = {}; }
11
11
  var keys = options.keys, exposeSegments = options.exposeSegments;
12
12
  var splits = storage.splits, segments = storage.segments, rbSegments = storage.rbSegments;
13
- log.debug("storage: get feature flags" + (keys ? ", and memberships for keys " + keys : '') + (exposeSegments ? ', and segments' : ''));
13
+ log.debug("storage: get feature flags" + (keys ? ", and memberships for keys: " + keys : '') + (exposeSegments ? ', and segments' : ''));
14
14
  return {
15
15
  splitChanges: {
16
16
  ff: {
@@ -7,7 +7,7 @@ export function getRolloutPlan(log, storage, options) {
7
7
  if (options === void 0) { options = {}; }
8
8
  var keys = options.keys, exposeSegments = options.exposeSegments;
9
9
  var splits = storage.splits, segments = storage.segments, rbSegments = storage.rbSegments;
10
- log.debug("storage: get feature flags" + (keys ? ", and memberships for keys " + keys : '') + (exposeSegments ? ', and segments' : ''));
10
+ log.debug("storage: get feature flags" + (keys ? ", and memberships for keys: " + keys : '') + (exposeSegments ? ', and segments' : ''));
11
11
  return {
12
12
  splitChanges: {
13
13
  ff: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splitsoftware/splitio-commons",
3
- "version": "2.5.0-rc.1",
3
+ "version": "2.5.0",
4
4
  "description": "Split JavaScript SDK common components",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
@@ -14,7 +14,7 @@ export function getRolloutPlan(log: ILogger, storage: IStorageSync, options: Spl
14
14
  const { keys, exposeSegments } = options;
15
15
  const { splits, segments, rbSegments } = storage;
16
16
 
17
- log.debug(`storage: get feature flags${keys ? `, and memberships for keys ${keys}` : ''}${exposeSegments ? ', and segments' : ''}`);
17
+ log.debug(`storage: get feature flags${keys ? `, and memberships for keys: ${keys}` : ''}${exposeSegments ? ', and segments' : ''}`);
18
18
 
19
19
  return {
20
20
  splitChanges: {
@@ -1594,7 +1594,14 @@ declare namespace SplitIO {
1594
1594
  /**
1595
1595
  * Returns the current snapshot of the SDK rollout plan in cache.
1596
1596
  *
1597
- * @param keys - Optional list of keys to generate the rollout plan snapshot with the memberships of the given keys, rather than the complete segments data.
1597
+ * Wait for the SDK client to be ready before calling this method.
1598
+ *
1599
+ * ```js
1600
+ * await factory.client().ready();
1601
+ * const rolloutPlan = factory.getRolloutPlan();
1602
+ * ```
1603
+ *
1604
+ * @param options - An object of type RolloutPlanOptions for advanced options.
1598
1605
  * @returns The current snapshot of the SDK rollout plan.
1599
1606
  */
1600
1607
  getRolloutPlan(options?: RolloutPlanOptions): RolloutPlan;