Skip to content

Commit d9237c8

Browse files
Version Packages
1 parent 55bebb4 commit d9237c8

16 files changed

Lines changed: 272 additions & 67 deletions

File tree

‎.changeset/bright-cobras-help.md‎

Lines changed: 0 additions & 47 deletions
This file was deleted.

‎packages/browser-sdk/CHANGELOG.md‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# @reflag/browser-sdk
2+
3+
## 1.5.0
4+
5+
### Minor Changes
6+
7+
- 55bebb4: Add live flag updates to the client-facing SDKs.
8+
9+
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.
10+
11+
The Node SDK's `getFlagsForBootstrap()` output now includes `flagStateVersion` when the Node SDK has received a flag-state version from Reflag:
12+
13+
```ts
14+
type BootstrappedState = {
15+
context: ReflagContext;
16+
flags: RawFlags;
17+
flagStateVersion?: number;
18+
};
19+
```
20+
21+
`flagStateVersion` lets bootstrapped clients avoid redundant refreshes immediately after hydration, ignore stale bootstrapped payloads, and request the newest flag state after a live update.
22+
23+
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:
24+
25+
```tsx
26+
const bootstrappedState = serverClient.getFlagsForBootstrap(context);
27+
28+
const client = new ReflagClient({
29+
publishableKey,
30+
bootstrappedState,
31+
});
32+
33+
<ReflagBootstrappedProvider
34+
publishableKey={publishableKey}
35+
flags={bootstrappedState}
36+
>
37+
{children}
38+
</ReflagBootstrappedProvider>;
39+
```
40+
41+
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.
42+
43+
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.
44+
45+
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.

‎packages/browser-sdk/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@reflag/browser-sdk",
3-
"version": "1.4.7",
3+
"version": "1.5.0",
44
"license": "MIT",
55
"repository": {
66
"type": "git",

‎packages/node-sdk/CHANGELOG.md‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,49 @@
11
# @reflag/node-sdk
22

3+
## 1.7.0
4+
5+
### Minor Changes
6+
7+
- 55bebb4: Add live flag updates to the client-facing SDKs.
8+
9+
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.
10+
11+
The Node SDK's `getFlagsForBootstrap()` output now includes `flagStateVersion` when the Node SDK has received a flag-state version from Reflag:
12+
13+
```ts
14+
type BootstrappedState = {
15+
context: ReflagContext;
16+
flags: RawFlags;
17+
flagStateVersion?: number;
18+
};
19+
```
20+
21+
`flagStateVersion` lets bootstrapped clients avoid redundant refreshes immediately after hydration, ignore stale bootstrapped payloads, and request the newest flag state after a live update.
22+
23+
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:
24+
25+
```tsx
26+
const bootstrappedState = serverClient.getFlagsForBootstrap(context);
27+
28+
const client = new ReflagClient({
29+
publishableKey,
30+
bootstrappedState,
31+
});
32+
33+
<ReflagBootstrappedProvider
34+
publishableKey={publishableKey}
35+
flags={bootstrappedState}
36+
>
37+
{children}
38+
</ReflagBootstrappedProvider>;
39+
```
40+
41+
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.
42+
43+
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.
44+
45+
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.
46+
347
## 1.6.0
448

549
### Minor Changes

‎packages/node-sdk/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@reflag/node-sdk",
3-
"version": "1.6.0",
3+
"version": "1.7.0",
44
"license": "MIT",
55
"repository": {
66
"type": "git",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# @reflag/openfeature-browser-provider
2+
3+
## 1.3.6
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [55bebb4]
8+
- @reflag/browser-sdk@1.5.0

‎packages/openfeature-browser-provider/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@reflag/openfeature-browser-provider",
3-
"version": "1.3.5",
3+
"version": "1.3.6",
44
"license": "MIT",
55
"repository": {
66
"type": "git",
@@ -36,7 +36,7 @@
3636
"fmt:fix": "oxfmt --write ."
3737
},
3838
"dependencies": {
39-
"@reflag/browser-sdk": "1.4.7"
39+
"@reflag/browser-sdk": "1.5.0"
4040
},
4141
"devDependencies": {
4242
"@openfeature/core": "1.5.0",

‎packages/openfeature-node-provider/CHANGELOG.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @reflag/openfeature-node-provider
22

3+
## 1.2.1
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [55bebb4]
8+
- @reflag/node-sdk@1.7.0
9+
310
## 1.2.0
411

512
### Minor Changes

‎packages/openfeature-node-provider/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@reflag/openfeature-node-provider",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"license": "MIT",
55
"repository": {
66
"type": "git",
@@ -36,7 +36,7 @@
3636
"fmt:fix": "oxfmt --write ."
3737
},
3838
"dependencies": {
39-
"@reflag/node-sdk": "1.6.0"
39+
"@reflag/node-sdk": "1.7.0"
4040
},
4141
"devDependencies": {
4242
"@babel/core": "~7.24.7",

‎packages/react-native-sdk/CHANGELOG.md‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,54 @@
11
# @reflag/react-native-sdk
22

3+
## 0.2.0
4+
5+
### Minor Changes
6+
7+
- 55bebb4: Add live flag updates to the client-facing SDKs.
8+
9+
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.
10+
11+
The Node SDK's `getFlagsForBootstrap()` output now includes `flagStateVersion` when the Node SDK has received a flag-state version from Reflag:
12+
13+
```ts
14+
type BootstrappedState = {
15+
context: ReflagContext;
16+
flags: RawFlags;
17+
flagStateVersion?: number;
18+
};
19+
```
20+
21+
`flagStateVersion` lets bootstrapped clients avoid redundant refreshes immediately after hydration, ignore stale bootstrapped payloads, and request the newest flag state after a live update.
22+
23+
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:
24+
25+
```tsx
26+
const bootstrappedState = serverClient.getFlagsForBootstrap(context);
27+
28+
const client = new ReflagClient({
29+
publishableKey,
30+
bootstrappedState,
31+
});
32+
33+
<ReflagBootstrappedProvider
34+
publishableKey={publishableKey}
35+
flags={bootstrappedState}
36+
>
37+
{children}
38+
</ReflagBootstrappedProvider>;
39+
```
40+
41+
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.
42+
43+
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.
44+
45+
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.
46+
47+
### Patch Changes
48+
49+
- Updated dependencies [55bebb4]
50+
- @reflag/react-sdk@1.5.0
51+
352
## 0.1.5
453

554
### Patch Changes

0 commit comments

Comments
 (0)