Repository navigation
Allow PLUGGABLE storage in the Node.js async settings types - #527
Open
justin-masse wants to merge 1 commit into
Open
justin-masse wants to merge 1 commit into
justin-masse wants to merge 1 commit into
Conversation
The pluggable storage implementation in this package describes itself as a "Pluggable storage factory for consumer server-side & client-side SplitFactory", builds keys with KeyBuilderSS, and branches on CONSUMER_PARTIAL_MODE — but NodeAsyncStorage is typed as 'REDIS' only, and INodeAsyncSettings allows mode 'consumer' alone. Broadens both, and documents the wrapper option. Companion to splitio/javascript-client#954, which adds the runtime support; without this a TypeScript user cannot express the configuration that PR enables. Left the storage options as one object rather than splitting it into a discriminated union of Redis options and a wrapper, to keep the diff small. Happy to make it a union if you would rather the two be mutually exclusive at the type level.
justin-masse
force-pushed
the
feat/node-pluggable-storage-types
branch
from
October 6, 2026 16:21
e77a74f to
dcbc248
Compare
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.
What
Broadens
NodeAsyncStorageto'REDIS' | 'PLUGGABLE', allowsconsumer_partialinINodeAsyncSettings, and documents thewrapperoption.Why
Companion to splitio/javascript-client#954, which adds the runtime support. Without this change a TypeScript user can't express the configuration that PR enables.
The implementation in this package already supports it.
PluggableStoragedescribes itself as a "Pluggable storage factory for consumer server-side & client-side SplitFactory", builds its keys withKeyBuilderSS— the server-side key builder — and already branches onCONSUMER_PARTIAL_MODE. Only the Node-facing types say otherwise.Note on shape
I left the storage options as a single object rather than splitting it into a discriminated union of Redis connection options and a wrapper, to keep the diff small. A union would type it more precisely, since the two are mutually exclusive — happy to do that instead if you'd prefer.
How did you test this code?
tsc --noEmit— no errors attributable to this change.eslint src types --ext .js,.ts— clean.