From 456a99f1524f61aa379241fd7c511d678af22fae Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Wed, 27 May 2026 13:52:14 +0200 Subject: [PATCH 1/4] docs(changesets): split live update release notes --- .changeset/bright-cobras-help.md | 47 ------------------- .changeset/browser-live-flag-updates.md | 9 ++++ .../node-bootstrap-flag-state-version.md | 17 +++++++ .changeset/react-live-flag-updates.md | 11 +++++ .changeset/react-native-live-flag-updates.md | 9 ++++ .changeset/vue-live-flag-updates.md | 11 +++++ 6 files changed, 57 insertions(+), 47 deletions(-) delete mode 100644 .changeset/bright-cobras-help.md create mode 100644 .changeset/browser-live-flag-updates.md create mode 100644 .changeset/node-bootstrap-flag-state-version.md create mode 100644 .changeset/react-live-flag-updates.md create mode 100644 .changeset/react-native-live-flag-updates.md create mode 100644 .changeset/vue-live-flag-updates.md diff --git a/.changeset/bright-cobras-help.md b/.changeset/bright-cobras-help.md deleted file mode 100644 index 23fa2b098..000000000 --- a/.changeset/bright-cobras-help.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -"@reflag/browser-sdk": minor -"@reflag/node-sdk": minor -"@reflag/react-sdk": minor -"@reflag/react-native-sdk": minor -"@reflag/vue-sdk": minor ---- - -Add live flag updates to the client-facing SDKs. - -The browser SDK now supports `enableLiveFlagUpdates`, which subscribes to Reflag's SSE endpoint and refreshes flags automatically when they change. The browser SDK keeps this disabled by default, while the React, React Native, and Vue SDKs enable it by default. - -The Node SDK's `getFlagsForBootstrap()` output now includes `flagStateVersion` when the Node SDK has received a flag-state version from Reflag: - -```ts -type BootstrappedState = { - context: ReflagContext; - flags: RawFlags; - flagStateVersion?: number; -}; -``` - -`flagStateVersion` lets bootstrapped clients avoid redundant refreshes immediately after hydration, ignore stale bootstrapped payloads, and request the newest flag state after a live update. - -The browser SDK accepts this object through `bootstrappedState`. React, React Native, and Vue keep their existing `flags` prop on bootstrapped providers, and that prop now accepts the same full object: - -```tsx -const bootstrappedState = serverClient.getFlagsForBootstrap(context); - -const client = new ReflagClient({ - publishableKey, - bootstrappedState, -}); - - - {children} -; -``` - -This is backwards compatible for initial rendering: existing bootstrapped payloads shaped as `{ context, flags }` still initialize the SDK, and the React, React Native, and Vue provider prop name has not changed. Live flag updates after bootstrapping require `flagStateVersion`; if it is missing, the client will warn and disable live updates for that client. - -Browser-facing SDKs now use `apiBaseUrl` for SSE by default, which points to `https://front.reflag.com` unless overridden. Live flag updates and feedback notifications now share `https://front.reflag.com`, so default CSP setups only need to allow `connect-src https://front.reflag.com` instead of `https://livemessaging.bucket.co`. `sseBaseUrl` remains available as an override if you need a separate SSE host. - -The Node SDK now uses Reflag's server push SSE endpoint (`GET https://front.reflag.com/sse/server`) for live flag definition updates instead of `https://pubsub.reflag.com`. If you override `flagsPushUrl`, the SDK will open that URL with the same authenticated streaming GET behavior. diff --git a/.changeset/browser-live-flag-updates.md b/.changeset/browser-live-flag-updates.md new file mode 100644 index 000000000..752343130 --- /dev/null +++ b/.changeset/browser-live-flag-updates.md @@ -0,0 +1,9 @@ +--- +"@reflag/browser-sdk": minor +--- + +Add `enableLiveFlagUpdates` support. When enabled, the browser SDK subscribes to Reflag SSE and refreshes flags automatically when they change. The browser SDK keeps live flag updates disabled by default. + +The browser SDK now accepts `bootstrappedState` with `{ context, flags, flagStateVersion? }`. `flagStateVersion` lets bootstrapped clients avoid redundant refreshes immediately after hydration, ignore stale bootstrapped payloads, and request the newest flag state after a live update. Existing `bootstrappedFlags` usage still works for initial rendering, but live updates after bootstrapping require `flagStateVersion`; if it is missing, the client warns and disables live updates for that client. + +Browser SSE now uses `apiBaseUrl` by default, which points to `https://front.reflag.com` unless overridden. Live flag updates and feedback notifications now share `https://front.reflag.com`, so default CSP setups only need to allow `connect-src https://front.reflag.com` instead of `https://livemessaging.bucket.co`. `sseBaseUrl` remains available as an override if you need a separate SSE host. diff --git a/.changeset/node-bootstrap-flag-state-version.md b/.changeset/node-bootstrap-flag-state-version.md new file mode 100644 index 000000000..7fe44f7cf --- /dev/null +++ b/.changeset/node-bootstrap-flag-state-version.md @@ -0,0 +1,17 @@ +--- +"@reflag/node-sdk": minor +--- + +`getFlagsForBootstrap()` now includes `flagStateVersion` when the Node SDK has received a flag-state version from Reflag: + +```ts +type BootstrappedFlags = { + context: Context; + flags: RawFlags; + flagStateVersion?: number; +}; +``` + +Client SDKs use `flagStateVersion` to keep live flag updates working after bootstrapping. It lets bootstrapped clients avoid redundant refreshes immediately after hydration, ignore stale bootstrapped payloads, and request the newest flag state after a live update. + +The Node SDK now uses Reflag's server push SSE endpoint (`GET https://front.reflag.com/sse/server`) for live flag definition updates instead of `https://pubsub.reflag.com`. If you override `flagsPushUrl`, the SDK opens that URL with the same authenticated streaming GET behavior. diff --git a/.changeset/react-live-flag-updates.md b/.changeset/react-live-flag-updates.md new file mode 100644 index 000000000..a726f20f8 --- /dev/null +++ b/.changeset/react-live-flag-updates.md @@ -0,0 +1,11 @@ +--- +"@reflag/react-sdk": minor +--- + +Live flag updates are now enabled by default. The React SDK subscribes to Reflag SSE through the browser SDK and refreshes flags automatically when they change. + +`ReflagBootstrappedProvider` keeps its existing `flags` prop, and that prop now accepts the full object returned by `@reflag/node-sdk`'s `getFlagsForBootstrap()`: `{ context, flags, flagStateVersion? }`. + +This is backwards compatible for initial rendering: existing bootstrapped payloads shaped as `{ context, flags }` still initialize the SDK. Live flag updates after bootstrapping require `flagStateVersion`; if it is missing, the client warns and disables live updates for that bootstrapped client. + +Live flag updates and feedback notifications now use `https://front.reflag.com` by default, so default CSP setups only need to allow `connect-src https://front.reflag.com` instead of `https://livemessaging.bucket.co`. diff --git a/.changeset/react-native-live-flag-updates.md b/.changeset/react-native-live-flag-updates.md new file mode 100644 index 000000000..86e1ebb17 --- /dev/null +++ b/.changeset/react-native-live-flag-updates.md @@ -0,0 +1,9 @@ +--- +"@reflag/react-native-sdk": minor +--- + +Live flag updates are now enabled by default and work out of the box using the built-in `react-native-sse` transport. Apps no longer need to provide a global `EventSource` shim for Reflag live updates. + +`ReflagBootstrappedProvider` keeps its existing `flags` prop, and that prop now accepts the full object returned by `@reflag/node-sdk`'s `getFlagsForBootstrap()`: `{ context, flags, flagStateVersion? }`. + +This is backwards compatible for initial rendering: existing bootstrapped payloads shaped as `{ context, flags }` still initialize the SDK. Live flag updates after bootstrapping require `flagStateVersion`; if it is missing, the client warns and disables live updates for that bootstrapped client. diff --git a/.changeset/vue-live-flag-updates.md b/.changeset/vue-live-flag-updates.md new file mode 100644 index 000000000..a204a8230 --- /dev/null +++ b/.changeset/vue-live-flag-updates.md @@ -0,0 +1,11 @@ +--- +"@reflag/vue-sdk": minor +--- + +Live flag updates are now enabled by default. The Vue SDK subscribes to Reflag SSE through the browser SDK and refreshes flags automatically when they change. + +`ReflagBootstrappedProvider` keeps its existing `flags` prop, and that prop now accepts the full object returned by `@reflag/node-sdk`'s `getFlagsForBootstrap()`: `{ context, flags, flagStateVersion? }`. + +This is backwards compatible for initial rendering: existing bootstrapped payloads shaped as `{ context, flags }` still initialize the SDK. Live flag updates after bootstrapping require `flagStateVersion`; if it is missing, the client warns and disables live updates for that bootstrapped client. + +Live flag updates and feedback notifications now use `https://front.reflag.com` by default, so default CSP setups only need to allow `connect-src https://front.reflag.com` instead of `https://livemessaging.bucket.co`. From 34db593f8dcbfb6ced398492a4468e223c3ee3b7 Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Wed, 27 May 2026 15:24:02 +0200 Subject: [PATCH 2/4] docs(changesets): note live update config defaults --- .changeset/react-live-flag-updates.md | 2 +- .changeset/react-native-live-flag-updates.md | 2 +- .changeset/vue-live-flag-updates.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.changeset/react-live-flag-updates.md b/.changeset/react-live-flag-updates.md index a726f20f8..15f3fc0aa 100644 --- a/.changeset/react-live-flag-updates.md +++ b/.changeset/react-live-flag-updates.md @@ -2,7 +2,7 @@ "@reflag/react-sdk": minor --- -Live flag updates are now enabled by default. The React SDK subscribes to Reflag SSE through the browser SDK and refreshes flags automatically when they change. +The React SDK now includes an `enableLiveFlagUpdates` config option, which defaults to `true`. When enabled, the SDK subscribes to Reflag SSE through the browser SDK and refreshes flags automatically when they change. `ReflagBootstrappedProvider` keeps its existing `flags` prop, and that prop now accepts the full object returned by `@reflag/node-sdk`'s `getFlagsForBootstrap()`: `{ context, flags, flagStateVersion? }`. diff --git a/.changeset/react-native-live-flag-updates.md b/.changeset/react-native-live-flag-updates.md index 86e1ebb17..06917fa2f 100644 --- a/.changeset/react-native-live-flag-updates.md +++ b/.changeset/react-native-live-flag-updates.md @@ -2,7 +2,7 @@ "@reflag/react-native-sdk": minor --- -Live flag updates are now enabled by default and work out of the box using the built-in `react-native-sse` transport. Apps no longer need to provide a global `EventSource` shim for Reflag live updates. +The React Native SDK now includes an `enableLiveFlagUpdates` config option, which defaults to `true`. When enabled, live flag updates work out of the box using the built-in `react-native-sse` transport. `ReflagBootstrappedProvider` keeps its existing `flags` prop, and that prop now accepts the full object returned by `@reflag/node-sdk`'s `getFlagsForBootstrap()`: `{ context, flags, flagStateVersion? }`. diff --git a/.changeset/vue-live-flag-updates.md b/.changeset/vue-live-flag-updates.md index a204a8230..99dd8a696 100644 --- a/.changeset/vue-live-flag-updates.md +++ b/.changeset/vue-live-flag-updates.md @@ -2,7 +2,7 @@ "@reflag/vue-sdk": minor --- -Live flag updates are now enabled by default. The Vue SDK subscribes to Reflag SSE through the browser SDK and refreshes flags automatically when they change. +The Vue SDK now includes an `enableLiveFlagUpdates` config option, which defaults to `true`. When enabled, the SDK subscribes to Reflag SSE through the browser SDK and refreshes flags automatically when they change. `ReflagBootstrappedProvider` keeps its existing `flags` prop, and that prop now accepts the full object returned by `@reflag/node-sdk`'s `getFlagsForBootstrap()`: `{ context, flags, flagStateVersion? }`. From 48115ee224a87a55f678b969e51dc21e9d8483a8 Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Wed, 27 May 2026 20:34:56 +0200 Subject: [PATCH 3/4] fix changelog --- .changeset/react-live-flag-updates.md | 2 +- .changeset/vue-live-flag-updates.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.changeset/react-live-flag-updates.md b/.changeset/react-live-flag-updates.md index 15f3fc0aa..4fa5c7ea9 100644 --- a/.changeset/react-live-flag-updates.md +++ b/.changeset/react-live-flag-updates.md @@ -2,7 +2,7 @@ "@reflag/react-sdk": minor --- -The React SDK now includes an `enableLiveFlagUpdates` config option, which defaults to `true`. When enabled, the SDK subscribes to Reflag SSE through the browser SDK and refreshes flags automatically when they change. +The React SDK now includes an `enableLiveFlagUpdates` config option, which defaults to `true`. When enabled, the SDK refreshes flags automatically when they change. `ReflagBootstrappedProvider` keeps its existing `flags` prop, and that prop now accepts the full object returned by `@reflag/node-sdk`'s `getFlagsForBootstrap()`: `{ context, flags, flagStateVersion? }`. diff --git a/.changeset/vue-live-flag-updates.md b/.changeset/vue-live-flag-updates.md index 99dd8a696..14fd3205b 100644 --- a/.changeset/vue-live-flag-updates.md +++ b/.changeset/vue-live-flag-updates.md @@ -2,7 +2,7 @@ "@reflag/vue-sdk": minor --- -The Vue SDK now includes an `enableLiveFlagUpdates` config option, which defaults to `true`. When enabled, the SDK subscribes to Reflag SSE through the browser SDK and refreshes flags automatically when they change. +The Vue SDK now includes an `enableLiveFlagUpdates` config option, which defaults to `true`. When enabled, the SDK refreshes flags automatically when they change. `ReflagBootstrappedProvider` keeps its existing `flags` prop, and that prop now accepts the full object returned by `@reflag/node-sdk`'s `getFlagsForBootstrap()`: `{ context, flags, flagStateVersion? }`. From a321ae750903b7d3a2d96b74a1db759221dc9e40 Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Wed, 27 May 2026 20:39:36 +0200 Subject: [PATCH 4/4] another changelog fix --- .changeset/browser-live-flag-updates.md | 2 +- .changeset/react-live-flag-updates.md | 2 +- .changeset/react-native-live-flag-updates.md | 2 +- .changeset/vue-live-flag-updates.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.changeset/browser-live-flag-updates.md b/.changeset/browser-live-flag-updates.md index 752343130..65a75ad2e 100644 --- a/.changeset/browser-live-flag-updates.md +++ b/.changeset/browser-live-flag-updates.md @@ -2,7 +2,7 @@ "@reflag/browser-sdk": minor --- -Add `enableLiveFlagUpdates` support. When enabled, the browser SDK subscribes to Reflag SSE and refreshes flags automatically when they change. The browser SDK keeps live flag updates disabled by default. +Add `enableLiveFlagUpdates` support. When enabled, the browser SDK subscribes to live flag changes from the Reflag servers. The browser SDK keeps live flag updates disabled by default. The browser SDK now accepts `bootstrappedState` with `{ context, flags, flagStateVersion? }`. `flagStateVersion` lets bootstrapped clients avoid redundant refreshes immediately after hydration, ignore stale bootstrapped payloads, and request the newest flag state after a live update. Existing `bootstrappedFlags` usage still works for initial rendering, but live updates after bootstrapping require `flagStateVersion`; if it is missing, the client warns and disables live updates for that client. diff --git a/.changeset/react-live-flag-updates.md b/.changeset/react-live-flag-updates.md index 4fa5c7ea9..08448eb24 100644 --- a/.changeset/react-live-flag-updates.md +++ b/.changeset/react-live-flag-updates.md @@ -2,7 +2,7 @@ "@reflag/react-sdk": minor --- -The React SDK now includes an `enableLiveFlagUpdates` config option, which defaults to `true`. When enabled, the SDK refreshes flags automatically when they change. +The React SDK now includes an `enableLiveFlagUpdates` config option, which defaults to `true`. When enabled, the SDK subscribes to live flag changes from the Reflag servers. `ReflagBootstrappedProvider` keeps its existing `flags` prop, and that prop now accepts the full object returned by `@reflag/node-sdk`'s `getFlagsForBootstrap()`: `{ context, flags, flagStateVersion? }`. diff --git a/.changeset/react-native-live-flag-updates.md b/.changeset/react-native-live-flag-updates.md index 06917fa2f..f3f29246b 100644 --- a/.changeset/react-native-live-flag-updates.md +++ b/.changeset/react-native-live-flag-updates.md @@ -2,7 +2,7 @@ "@reflag/react-native-sdk": minor --- -The React Native SDK now includes an `enableLiveFlagUpdates` config option, which defaults to `true`. When enabled, live flag updates work out of the box using the built-in `react-native-sse` transport. +The React Native SDK now includes an `enableLiveFlagUpdates` config option, which defaults to `true`. When enabled, the SDK subscribes to live flag changes from the Reflag servers. `ReflagBootstrappedProvider` keeps its existing `flags` prop, and that prop now accepts the full object returned by `@reflag/node-sdk`'s `getFlagsForBootstrap()`: `{ context, flags, flagStateVersion? }`. diff --git a/.changeset/vue-live-flag-updates.md b/.changeset/vue-live-flag-updates.md index 14fd3205b..96af2ffdc 100644 --- a/.changeset/vue-live-flag-updates.md +++ b/.changeset/vue-live-flag-updates.md @@ -2,7 +2,7 @@ "@reflag/vue-sdk": minor --- -The Vue SDK now includes an `enableLiveFlagUpdates` config option, which defaults to `true`. When enabled, the SDK refreshes flags automatically when they change. +The Vue SDK now includes an `enableLiveFlagUpdates` config option, which defaults to `true`. When enabled, the SDK subscribes to live flag changes from the Reflag servers. `ReflagBootstrappedProvider` keeps its existing `flags` prop, and that prop now accepts the full object returned by `@reflag/node-sdk`'s `getFlagsForBootstrap()`: `{ context, flags, flagStateVersion? }`.