@splitsoftware/splitio-commons 3.1.1-rc.2 → 3.1.1-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,4 +1,4 @@
1
- 3.2.0 (August 10, 2026)
1
+ 3.2.0 (August 28, 2026)
2
2
  - Added support for AI configs.
3
3
  - Removed Configs SDK-related types and modules and moved them to the Configs SDK repository.
4
4
 
@@ -133,10 +133,10 @@ function clientFactory(params) {
133
133
  time: Date.now(),
134
134
  bucketingKey: bucketingKey,
135
135
  label: label,
136
- changeNumber: definition.changeNumber,
136
+ changeNumber: definition === null || definition === void 0 ? void 0 : definition.changeNumber,
137
137
  properties: stringify(options.properties)
138
138
  },
139
- disabled: options.impressionsDisabled || definition.impressionsDisabled
139
+ disabled: options.impressionsDisabled || (definition === null || definition === void 0 ? void 0 : definition.impressionsDisabled)
140
140
  });
141
141
  }
142
142
  if (withConfig) {
@@ -129,10 +129,10 @@ export function clientFactory(params) {
129
129
  time: Date.now(),
130
130
  bucketingKey: bucketingKey,
131
131
  label: label,
132
- changeNumber: definition.changeNumber,
132
+ changeNumber: definition === null || definition === void 0 ? void 0 : definition.changeNumber,
133
133
  properties: stringify(options.properties)
134
134
  },
135
- disabled: options.impressionsDisabled || definition.impressionsDisabled
135
+ disabled: options.impressionsDisabled || (definition === null || definition === void 0 ? void 0 : definition.impressionsDisabled)
136
136
  });
137
137
  }
138
138
  if (withConfig) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splitsoftware/splitio-commons",
3
- "version": "3.1.1-rc.2",
3
+ "version": "3.1.1-rc.3",
4
4
  "description": "Split JavaScript SDK common components",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
@@ -161,10 +161,10 @@ export function clientFactory(params: ISdkFactoryContext): SplitIO.IClient | Spl
161
161
  time: Date.now(),
162
162
  bucketingKey,
163
163
  label,
164
- changeNumber: definition!.changeNumber,
164
+ changeNumber: definition?.changeNumber,
165
165
  properties: stringify(options.properties)
166
166
  }, // @ts-expect-error impressionsDisabled is not exposed in the public typings yet.
167
- disabled: options.impressionsDisabled || definition!.impressionsDisabled
167
+ disabled: options.impressionsDisabled || definition?.impressionsDisabled
168
168
  });
169
169
  }
170
170
 
@@ -15,7 +15,7 @@ type ImpressionPayload = {
15
15
  /** Timestamp */
16
16
  m: number;
17
17
  /** Change number */
18
- c: number;
18
+ c?: number;
19
19
  /** Rule label */
20
20
  r?: string;
21
21
  /** Previous time */
@@ -1031,9 +1031,10 @@ declare namespace SplitIO {
1031
1031
  */
1032
1032
  label: string;
1033
1033
  /**
1034
- * Version of the feature flag
1034
+ * Version of the feature flag.
1035
+ * Undefined if the feature flag was not found, for example, if the label is 'not ready', 'exception' or 'definition not found'.
1035
1036
  */
1036
- changeNumber: number;
1037
+ changeNumber?: number;
1037
1038
  /**
1038
1039
  * Previous time
1039
1040
  */