Skip to content

Allow PLUGGABLE storage in the Node.js async settings types - #527

Open
justin-masse wants to merge 1 commit into
splitio:developmentfrom
justin-masse:feat/node-pluggable-storage-types
Open

justin-masse wants to merge 1 commit into
splitio:developmentfrom
justin-masse:feat/node-pluggable-storage-types

Conversation

@justin-masse

@justin-masse justin-masse commented Oct 6, 2026 •

Copy link
Copy Markdown

What

Broadens NodeAsyncStorage to 'REDIS' | 'PLUGGABLE', allows consumer_partial in INodeAsyncSettings, and documents the wrapper option.

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. PluggableStorage describes itself as a "Pluggable storage factory for consumer server-side & client-side SplitFactory", builds its keys with KeyBuilderSS — the server-side key builder — and already branches on CONSUMER_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.

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
justin-masse requested a review from a team as a code owner October 6, 2026 15:50
@justin-masse justin-masse changed the title Allow PLUGGABLE storage in the Node.js async settings types Node.js pluggable storage: types, and document the key prefix composition Oct 6, 2026
@justin-masse
justin-masse force-pushed the feat/node-pluggable-storage-types branch from e77a74f to dcbc248 Compare October 6, 2026 16:21
@justin-masse justin-masse changed the title Node.js pluggable storage: types, and document the key prefix composition Allow PLUGGABLE storage in the Node.js async settings types Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant