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
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
1
1.6.0 (October XX, 2025)
2
+
- Added `client.getStatus()` method to retrieve the client readiness status properties (`isReady`, `isReadyFromCache`, etc).
2
3
- Added `client.whenReady()` and `client.whenReadyFromCache()` methods to replace the deprecated `client.ready()` method, which has an issue causing the returned promise to hang when using async/await syntax if it was rejected.
3
4
- Updated the SDK_READY_FROM_CACHE event to be emitted alongside the SDK_READY event if it hasn’t already been emitted.
4
5
- Updated @splitsoftware/splitio-commons package to version 2.8.0.
Copy file name to clipboardExpand all lines: src/__tests__/consumer/browser_consumer.spec.js
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -62,8 +62,8 @@ tape('Browser Consumer mode with pluggable storage', function (t) {
62
62
63
63
/** Evaluation, track and manager methods before SDK_READY */
64
64
65
-
assert.equal(client.__getStatus().isReadyFromCache,false,'SDK in consumer mode is not operational immediately');
66
-
assert.equal(client.__getStatus().isReady,false,'SDK in consumer mode is not operational immediately');
65
+
assert.equal(client.getStatus().isReadyFromCache,false,'SDK in consumer mode is not operational immediately');
66
+
assert.equal(client.getStatus().isReady,false,'SDK in consumer mode is not operational immediately');
67
67
68
68
client.getTreatment('UT_IN_SEGMENT').then(treatment=>assert.equal(treatment,'control','Evaluations using pluggable storage returns a promise that resolves to control if initiated before SDK_READY'));
69
69
otherClient.track('user','test.event',18).then(result=>assert.true(result,'Track calls returns a promise on consumer mode, that resolves to true if the wrapper push operation success to queue the event'));
@@ -218,8 +218,8 @@ tape('Browser Consumer mode with pluggable storage', function (t) {
218
218
219
219
assert.equal(typeofgetTreatmentResult.then,'function','GetTreatment calls should always return a promise on Consumer mode.');
220
220
assert.equal(awaitgetTreatmentResult,'control','Evaluations using pluggable storage should be control if initiated before SDK_READY.');
221
-
assert.equal(client.__getStatus().isReadyFromCache,false,'SDK in consumer mode is not operational immediately');
222
-
assert.equal(client.__getStatus().isReady,false,'SDK in consumer mode is not operational immediately');
221
+
assert.equal(client.getStatus().isReadyFromCache,false,'SDK in consumer mode is not operational immediately');
222
+
assert.equal(client.getStatus().isReady,false,'SDK in consumer mode is not operational immediately');
Copy file name to clipboardExpand all lines: src/__tests__/consumer/browser_consumer_partial.spec.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -98,8 +98,8 @@ tape('Browser Consumer Partial mode with pluggable storage', function (t) {
98
98
99
99
/** Evaluation, track and manager methods before SDK_READY */
100
100
101
-
assert.equal(client.__getStatus().isReadyFromCache,false,'SDK in consumer mode is not operational immediately');
102
-
assert.equal(client.__getStatus().isReady,false,'SDK in consumer mode is not operational immediately');
101
+
assert.equal(client.getStatus().isReadyFromCache,false,'SDK in consumer mode is not operational immediately');
102
+
assert.equal(client.getStatus().isReady,false,'SDK in consumer mode is not operational immediately');
103
103
104
104
client.getTreatment('UT_IN_SEGMENT').then(treatment=>assert.equal(treatment,'control','Evaluations using pluggable storage returns a promise that resolves to control if initiated before SDK_READY'));
105
105
otherClient.track('user','test.event',18).then(result=>assert.true(result,'Track calls returns a promise on consumer mode, that resolves to true if the wrapper push operation success to queue the event'));
@@ -261,8 +261,8 @@ tape('Browser Consumer Partial mode with pluggable storage', function (t) {
261
261
262
262
assert.equal(typeofgetTreatmentResult.then,'function','GetTreatment calls should always return a promise on Consumer mode.');
263
263
assert.equal(awaitgetTreatmentResult,'control','Evaluations using pluggable storage should be control if initiated before SDK_READY.');
264
-
assert.equal(client.__getStatus().isReadyFromCache,false,'SDK in consumer mode is not operational immediately');
265
-
assert.equal(client.__getStatus().isReady,false,'SDK in consumer mode is not operational immediately');
264
+
assert.equal(client.getStatus().isReadyFromCache,false,'SDK in consumer mode is not operational immediately');
265
+
assert.equal(client.getStatus().isReady,false,'SDK in consumer mode is not operational immediately');
Copy file name to clipboardExpand all lines: src/__tests__/offline/browser.spec.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -117,7 +117,7 @@ tape('Browser offline mode', function (assert) {
117
117
constsdkReadyFromCache=(client)=>()=>{
118
118
assert.equal(factory.settings.storage.type,'MEMORY','In localhost mode, storage must fallback to memory storage');
119
119
120
-
constclientStatus=client.__getStatus();
120
+
constclientStatus=client.getStatus();
121
121
assert.equal(clientStatus.isReadyFromCache,true,'If ready from cache, READY_FROM_CACHE status must be true');
122
122
assert.equal(clientStatus.isReady,configs[i].storage&&configs[i].storage.type==='LOCALSTORAGE' ? false : true,'When not using LOCALSTORAGE, READY status is set together with READY_FROM_CACHE');
0 commit comments