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
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
2.8.0 (October XX, 2025)
2
-
- Added `client.whenReady()` and `client.whenReadyFromCache()` methods to replace the deprecated `client.ready()` method, which had an issue causing the returned promise to hang when using async/await syntax if it was rejected.
2
+
- 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
3
- Updated the SDK_READY_FROM_CACHE event to be emitted alongside the SDK_READY event if it hasn’t already been emitted.
expect(sdkReadyResolvePromiseCall[0]).toBe(SDK_READY);// A one time only subscription is on the SDK_READY event, for resolving the full blown ready promise and to check for callbacks warning.
71
-
expect(sdkReadyRejectPromiseCall[0]).toBe(SDK_READY_TIMED_OUT);// A one time only subscription is also on the SDK_READY_TIMED_OUT event, for rejecting the full blown ready promise.
72
-
expect(sdkReadyFromCacheListenersCheckCall[0]).toBe(SDK_READY_FROM_CACHE);// A one time only subscription is on the SDK_READY_FROM_CACHE event, to log the event and update internal state.
74
+
expect(sdkReadyResolvePromiseCall[0]).toBe(SDK_READY);// A one time only subscription is on the SDK_READY event
75
+
expect(sdkReadyRejectPromiseCall[0]).toBe(SDK_READY_TIMED_OUT);// A one time only subscription is also on the SDK_READY_TIMED_OUT event
76
+
expect(sdkReadyFromCacheListenersCheckCall[0]).toBe(SDK_READY_FROM_CACHE);// A one time only subscription is on the SDK_READY_FROM_CACHE event
73
77
74
78
expect(gateMock.on).toBeCalledTimes(2);// It should also add two persistent listeners
expect(loggerMock.warn).toBeCalledTimes(1);// If the SDK_READY event fires and we have no callbacks for it (neither event nor ready promise) we get a warning.
105
+
expect(loggerMock.warn).toBeCalledTimes(1);// If the SDK_READY event fires and we have no callbacks for it (neither event nor whenReady promise) we get a warning.
102
106
expect(loggerMock.warn).toBeCalledWith(CLIENT_NO_LISTENER);// Telling us there were no listeners and evaluations before this point may have been incorrect.
103
107
104
108
expect(loggerMock.info).toBeCalledTimes(1);// If the SDK_READY event fires, we get a info message.
expect(loggerMock.warn).toBeCalledWith(CLIENT_NO_LISTENER);// We should get a warning if the SDK get's ready before calling the whenReady method or attaching a listener to the ready event
constTIMEOUT_ERROR=newError('Split SDK has emitted SDK_READY_TIMED_OUT event.');
12
+
constTIMEOUT_ERROR=newError(SDK_READY_TIMED_OUT);
13
13
14
14
/**
15
15
* SdkReadinessManager factory, which provides the public status API of SDK clients and manager: ready promise, readiness event emitter and constants (SDK_READY, etc).
@@ -98,7 +98,7 @@ export function sdkReadinessManagerFactory(
0 commit comments