[FME-12059] SDK_UPDATE with metadata#461
Merged
ZamoraEmmanuel merged 24 commits intodevelopmentfrom Jan 28, 2026
Merged
Conversation
EmilianoSanchez
requested changes
Jan 7, 2026
Use initalCacheLad instead of isCacheValid
sdk_ready metadata
EmilianoSanchez
requested changes
Jan 22, 2026
EmilianoSanchez
requested changes
Jan 22, 2026
types/splitio.d.ts
Outdated
| * Metadata keys for SDK update events. | ||
| * Use the string literals directly: 'FLAGS_UPDATE' or 'SEGMENTS_UPDATE' | ||
| */ | ||
| type SdkUpdateMetadataKeys = { |
Contributor
There was a problem hiding this comment.
I would remove this type in order to simplify the Public API. This type is not used anywhere internally, and from the perspective of the TypeScript user, it doesn't seem very useful:
client.on(client.Event.SDK_UPDATE, (metadata) => {
if (metadata.type === 'FLAGS_UPDATED' as SplitIO.SdkUpdateMetadataKeys['FLAGS_UPDATE']) {
doSomethingForFlagsUpdated
}
});
vs
client.on(client.Event.SDK_UPDATE, (metadata) => {
if (metadata.type === 'FLAGS_UPDATED') {
doSomethingForFlagsUpdated
}
});
I would remove it for now and reconsider adding it or something else in the future.
Besides, we are using union types for similar string enum types (example SDKMode, StorageType, etc).
Contributor
Author
There was a problem hiding this comment.
what do you think about replacing it with something like
/**
* Metadata for the update event emitted when the SDK cache is updated with new data for flags or segments.
*/
type SdkUpdateMetadata = {
/**
* The type of update event.
*/
type: SdkUpdateMetadataKey
/**
* The names of the flags or segments that were updated.
*/
names: string[]
}
/**
* Metadata keys for SDK update events.
* Use the string literals directly: 'FLAGS_UPDATE' or 'SEGMENTS_UPDATE'
*/
type SdkUpdateMetadataKey = 'FLAGS_UPDATE' | 'SEGMENTS_UPDATE';[FME-12059] Update readiness promises with `SdkReadyMetadata` object
EmilianoSanchez
approved these changes
Jan 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JavaScript commons library
What did you accomplish?
How do we test the changes introduced in this PR?
Extra Notes