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
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,6 @@
1
+
11.7.1 (October 8, 2025)
2
+
- Bugfix - Updated @splitsoftware/splitio-commons package to version 2.7.1, which fixes the `debug` option to support log levels when the `logger` option is used.
3
+
1
4
11.7.0 (October 7, 2025)
2
5
- Added support for custom loggers: added `logger` configuration option and `factory.Logger.setLogger` method to allow the SDK to use a custom logger.
3
6
- Updated @splitsoftware/splitio-commons package to version 2.7.0.
t.true(Date.now()-startTime>=850,'It should reject ready promise before syncing memberships data with the cloud.');
315
315
t.equal(client3.getTreatment('always_on'),'control','It should not evaluate treatments with memberships data from cache.');
316
316
});
@@ -359,7 +359,7 @@ export default function (fetchMock, assert) {
359
359
t.true(client.__getStatus().isReady,'Client should emit SDK_READY_FROM_CACHE alongside SDK_READY, because clearOnInit is true');
360
360
});
361
361
362
-
awaitclient.ready();
362
+
awaitclient.whenReady();
363
363
364
364
t.true(console.log.calledWithMatch('clearOnInit was set and cache was not cleared in the last 24 hours. Cleaning up cache'),'It should log a message about cleaning up cache');
@@ -301,6 +309,9 @@ export default function (fetchMock, assert) {
301
309
type: 'LOCALSTORAGE',
302
310
prefix: 'readyFromCache_3'
303
311
},
312
+
sync: {
313
+
impressionsMode: 'DEBUG'
314
+
},
304
315
startup: {
305
316
readyTimeout: 0.85
306
317
},
@@ -320,6 +331,8 @@ export default function (fetchMock, assert) {
320
331
321
332
client.on(client.Event.SDK_READY_FROM_CACHE,()=>{
322
333
t.true(Date.now()-startTime<400,'It should emit SDK_READY_FROM_CACHE on every client if there was data in the cache and we subscribe on time. Should be considerably faster than actual readiness from the cloud.');
334
+
t.false(client.__getStatus().isReady,'It should not be ready yet');
335
+
323
336
t.equal(client.getTreatment('always_on'),'off','It should evaluate treatments with data from cache instead of control due to Input Validation');
324
337
325
338
constclient4=splitio.client('nicolas4@split.io');
@@ -342,20 +355,27 @@ export default function (fetchMock, assert) {
342
355
t.true(Date.now()-startTime>=400,'It should emit SDK_READY too but after syncing with the cloud.');
343
356
t.equal(client.getTreatment('always_on'),'on','It should evaluate treatments with updated data after syncing with the cloud.');
344
357
});
345
-
client.ready().then(()=>{
358
+
client.whenReadyFromCache().then((isReady)=>{
359
+
t.false(isReady,'It should be ready from cache before ready (syncing with the cloud).');
360
+
t.true(Date.now()-startTime<50,'It should resolve ready from cache promise almost immediately.');
361
+
});
362
+
client.whenReady().then(()=>{
346
363
t.true(Date.now()-startTime>=400,'It should resolve ready promise after syncing with the cloud.');
347
364
t.equal(client.getTreatment('always_on'),'on','It should evaluate treatments with updated data after syncing with the cloud.');
348
365
});
349
366
client2.on(client2.Event.SDK_READY,()=>{
350
367
t.true(Date.now()-startTime>=700,'It should emit SDK_READY too but after syncing with the cloud.');
351
368
t.equal(client2.getTreatment('always_on'),'on','It should evaluate treatments with updated data after syncing with the cloud.');
352
369
});
353
-
client2.ready().then(()=>{
370
+
client2.whenReadyFromCache().then((isReady)=>{
371
+
t.false(isReady,'It should be ready from cache before ready (syncing with the cloud).');
372
+
});
373
+
client2.whenReady().then(()=>{
354
374
t.true(Date.now()-startTime>=700,'It should resolve ready promise after syncing with the cloud.');
355
375
t.equal(client2.getTreatment('always_on'),'on','It should evaluate treatments with updated data after syncing with the cloud.');
356
376
});
357
377
client3.on(client3.Event.SDK_READY,()=>{
358
-
client3.ready().then(()=>{
378
+
client3.whenReady().then(()=>{
359
379
t.true(Date.now()-startTime>=1000,'It should resolve ready promise after syncing with the cloud.');
360
380
t.equal(client3.getTreatment('always_on'),'on','It should evaluate treatments with updated data after syncing with the cloud.');
361
381
@@ -370,7 +390,7 @@ export default function (fetchMock, assert) {
370
390
t.equal(client3.getTreatment('always_on'),'on','It should evaluate treatments with updated data after syncing with the cloud.');
t.true(Date.now()-startTime>=850,'It should reject ready promise before syncing memberships data with the cloud.');
487
511
t.equal(client3.getTreatment('always_on'),'control','It should not evaluate treatments with memberships data from cache.');
488
512
});
@@ -898,7 +922,7 @@ export default function (fetchMock, assert) {
898
922
t.true(client.__getStatus().isReady,'Client should emit SDK_READY_FROM_CACHE alongside SDK_READY, because clearOnInit is true');
899
923
});
900
924
901
-
awaitclient.ready();
925
+
awaitclient.whenReady();
902
926
903
927
t.true(console.log.calledWithMatch('clearOnInit was set and cache was not cleared in the last 24 hours. Cleaning up cache'),'It should log a message about cleaning up cache');
0 commit comments