You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGES.txt
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,16 @@
1
+
0.13.0 (December XX, 2023)
2
+
- Added support for Flag Sets in "consumer" and "partial consumer" modes (pluggable storage).
3
+
- Updated @splitsoftware/splitio-commons package to version 1.12.0 that includes flag sets support for "consumer" and "partial consumer" modes.
4
+
1
5
0.12.0 (November 3, 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):
6
+
- 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
7
- Added new variations of the get treatment methods to support evaluating flags in given flag set/s.
4
8
- getTreatmentsByFlagSet and getTreatmentsByFlagSets
5
9
- getTreatmentsWithConfigByFlagSets and getTreatmentsWithConfigByFlagSets
6
10
- 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
11
- 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
12
- 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.
13
+
- Updated @splitsoftware/splitio-commons package to version 1.11.0.
10
14
11
15
0.11.0 (October 31, 2023)
12
16
- 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).
assert.equal(typeofgetTreatmentResult.then,'function','GetTreatment calls should always return a promise on Consumer mode.');
72
-
assert.equal(awaitgetTreatmentResult,'control','Evaluations using pluggable storage should be control if initiated before SDK_READY.');
73
73
assert.equal(client.__getStatus().isReadyFromCache,false,'SDK in consumer mode is not operational inmediatelly');
74
74
assert.equal(client.__getStatus().isReady,false,'SDK in consumer mode is not operational inmediatelly');
75
+
assert.equal(typeofgetTreatmentResult.then,'function','GetTreatment calls should always return a promise on Consumer mode.');
76
+
assert.equal(awaitgetTreatmentResult,'control','Evaluations using pluggable storage should be control if initiated before SDK_READY.');
77
+
assert.deepEqual(awaitgetTreatmentsWithConfigByFlagSetsResult,{},'Flag sets evaluations using pluggable storage should be empty if initiated before SDK_READY.');
assert.equal(typeoftrackResult.then,'function','Track calls should always return a promise on Consumer mode.');
@@ -132,13 +135,23 @@ tape('Browser Consumer mode with pluggable storage', function (t) {
132
135
assert.true(awaitclient.track('user','test.event',18),'If the event was succesfully queued the promise will resolve to true');
133
136
assert.false(awaitclient.track(),'If the event was NOT succesfully queued the promise will resolve to false');
134
137
138
+
// Evaluations with flag sets
139
+
assert.deepEqual(awaitclient.getTreatmentsByFlagSet('set_a'),{with_set_a: 'on',with_sets_a_b: 'on'},'Evaluations with getTreatmentsByFlagSet should be correct.');
140
+
assert.deepEqual(awaitclient.getTreatmentsByFlagSets(['set_a','set_b']),{with_set_a: 'on',with_set_b: 'on',with_sets_a_b: 'on'},'Evaluations with getTreatmentsByFlagSets should be correct.');
141
+
assert.deepEqual(awaitclient.getTreatmentsWithConfigByFlagSet('set_b'),{with_set_b: {treatment: 'on',config: '{}'},with_sets_a_b: {treatment: 'on',config: null}},'Evaluations with getTreatmentsWithConfigByFlagSet should be correct.');
142
+
assert.deepEqual(awaitclient.getTreatmentsWithConfigByFlagSets(['set_a','set_b']),{with_set_a: {treatment: 'on',config: null},with_set_b: {treatment: 'on',config: '{}'},with_sets_a_b: {treatment: 'on',config: null}},'Evaluations with getTreatmentsWithConfigByFlagSets should be correct.');
143
+
144
+
assert.deepEqual(awaitclient.getTreatmentsByFlagSet(),{},'Evaluations without flag set should be empty.');
145
+
assert.deepEqual(awaitclient.getTreatmentsByFlagSets([]),{},'Evaluations without flag sets should be empty.');
146
+
assert.deepEqual(awaitclient.getTreatmentsByFlagSets(['non_existent_set']),{},'Evaluations with non existent flag sets should be empty.');
147
+
135
148
// Manager methods
136
149
constsplitNames=awaitmanager.names();
137
-
assert.equal(splitNames.length,25,'manager `names` method returns the list of split names asynchronously');
150
+
assert.equal(splitNames.length,28,'manager `names` method returns the list of split names asynchronously');
138
151
assert.equal(splitNames.indexOf(expectedSplitName)>-1,true,'list of split names should contain expected splits');
139
152
assert.deepEqual(awaitmanager.split(expectedSplitName),expectedSplitView,'manager `split` method returns the split view of the given split name asynchronously');
140
153
constsplitViews=awaitmanager.splits();
141
-
assert.equal(splitViews.length,25,'manager `splits` method returns the list of split views asynchronously');
154
+
assert.equal(splitViews.length,28,'manager `splits` method returns the list of split views asynchronously');
142
155
assert.deepEqual(splitViews.find(splitView=>splitView.name===expectedSplitName),expectedSplitView,'manager `split` method returns the split view of the given split name asynchronously');
143
156
144
157
// New shared client created
@@ -160,7 +173,7 @@ tape('Browser Consumer mode with pluggable storage', function (t) {
assert.equal(trackedImpressions.length,TOTAL_RAW_IMPRESSIONS,'Tracked impressions should be present in the external storage');
176
+
assert.equal(trackedImpressions.length,TOTAL_RAW_IMPRESSIONS+TOTAL_RAW_IMPRESSIONS_IN_EVALUATIONS_WITH_FLAGSETS,'Tracked impressions should be present in the external storage');
164
177
assert.equal(trackedEvents.length,TOTAL_EVENTS,'Tracked events should be present in the external storage');
165
178
166
179
// Validate stored telemetry
@@ -173,7 +186,7 @@ tape('Browser Consumer mode with pluggable storage', function (t) {
173
186
174
187
// Assert impressionsListener
175
188
setTimeout(()=>{
176
-
assert.equal(impressions.length,TOTAL_RAW_IMPRESSIONS,'Each evaluation has its corresponting impression');
189
+
assert.equal(impressions.length,TOTAL_RAW_IMPRESSIONS+TOTAL_RAW_IMPRESSIONS_IN_EVALUATIONS_WITH_FLAGSETS,'Each evaluation has its corresponting impression');
177
190
assert.equal(impressions[0].impression.label,SDK_NOT_READY,'The first impression is control with label "sdk not ready"');
assert.equal(typeofgetTreatmentResult.then,'function','GetTreatment calls should always return a promise on Consumer mode.');
98
-
assert.equal(awaitgetTreatmentResult,'control','Evaluations using pluggable storage should be control if initiated before SDK_READY.');
99
100
assert.equal(client.__getStatus().isReadyFromCache,false,'SDK in consumer mode is not operational inmediatelly');
100
101
assert.equal(client.__getStatus().isReady,false,'SDK in consumer mode is not operational inmediatelly');
102
+
assert.equal(typeofgetTreatmentResult.then,'function','GetTreatment calls should always return a promise on Consumer mode.');
103
+
assert.equal(awaitgetTreatmentResult,'control','Evaluations using pluggable storage should be control if initiated before SDK_READY.');
104
+
assert.deepEqual(awaitgetTreatmentsWithConfigByFlagSetsResult,{},'Flag sets evaluations using pluggable storage should be empty if initiated before SDK_READY.');
assert.equal(typeoftrackResult.then,'function','Track calls should always return a promise on Consumer mode.');
@@ -157,13 +161,23 @@ tape('Browser Consumer Partial mode with pluggable storage', function (t) {
157
161
assert.true(awaitclient.track('user','test.event',18),'If the event was succesfully queued the promise will resolve to true');
158
162
assert.false(awaitclient.track(),'If the event was NOT succesfully queued the promise will resolve to false');
159
163
164
+
// Evaluations with flag sets
165
+
assert.deepEqual(awaitclient.getTreatmentsByFlagSet('set_a'),{with_set_a: 'on',with_sets_a_b: 'on'},'Evaluations with getTreatmentsByFlagSet should be correct.');
166
+
assert.deepEqual(awaitclient.getTreatmentsByFlagSets(['set_a','set_b']),{with_set_a: 'on',with_set_b: 'on',with_sets_a_b: 'on'},'Evaluations with getTreatmentsByFlagSets should be correct.');
167
+
assert.deepEqual(awaitclient.getTreatmentsWithConfigByFlagSet('set_b'),{with_set_b: {treatment: 'on',config: '{}'},with_sets_a_b: {treatment: 'on',config: null}},'Evaluations with getTreatmentsWithConfigByFlagSet should be correct.');
168
+
assert.deepEqual(awaitclient.getTreatmentsWithConfigByFlagSets(['set_a','set_b']),{with_set_a: {treatment: 'on',config: null},with_set_b: {treatment: 'on',config: '{}'},with_sets_a_b: {treatment: 'on',config: null}},'Evaluations with getTreatmentsWithConfigByFlagSets should be correct.');
169
+
170
+
assert.deepEqual(awaitclient.getTreatmentsByFlagSet(),{},'Evaluations without flag set should be empty.');
171
+
assert.deepEqual(awaitclient.getTreatmentsByFlagSets([]),{},'Evaluations without flag sets should be empty.');
172
+
assert.deepEqual(awaitclient.getTreatmentsByFlagSets(['non_existent_set']),{},'Evaluations with non existent flag sets should be empty.');
173
+
160
174
// Manager methods
161
175
constsplitNames=awaitmanager.names();
162
-
assert.equal(splitNames.length,25,'manager `names` method returns the list of split names asynchronously');
176
+
assert.equal(splitNames.length,28,'manager `names` method returns the list of split names asynchronously');
163
177
assert.equal(splitNames.indexOf(expectedSplitName)>-1,true,'list of split names should contain expected splits');
164
178
assert.deepEqual(awaitmanager.split(expectedSplitName),expectedSplitView,'manager `split` method returns the split view of the given split name asynchronously');
165
179
constsplitViews=awaitmanager.splits();
166
-
assert.equal(splitViews.length,25,'manager `splits` method returns the list of split views asynchronously');
180
+
assert.equal(splitViews.length,28,'manager `splits` method returns the list of split views asynchronously');
167
181
assert.deepEqual(splitViews.find(splitView=>splitView.name===expectedSplitName),expectedSplitView,'manager `split` method returns the split view of the given split name asynchronously');
168
182
169
183
// New shared client created
@@ -187,7 +201,7 @@ tape('Browser Consumer Partial mode with pluggable storage', function (t) {
187
201
188
202
// Assert impressionsListener
189
203
setTimeout(()=>{
190
-
assert.equal(impressions.length,TOTAL_RAW_IMPRESSIONS,'Each evaluation has its corresponting impression');
204
+
assert.equal(impressions.length,TOTAL_RAW_IMPRESSIONS+TOTAL_RAW_IMPRESSIONS_IN_EVALUATIONS_WITH_FLAGSETS,'Each evaluation has its corresponting impression');
191
205
assert.equal(impressions[0].impression.label,SDK_NOT_READY,'The first impression is control with label "sdk not ready"');
192
206
193
207
assert.end();
@@ -342,6 +356,9 @@ tape('Browser Consumer Partial mode with pluggable storage', function (t) {
342
356
});
343
357
344
358
t.test('Wrapper connection error timeouts the SDK immediately',(assert)=>{
0 commit comments