You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4e920f7
Browse filesBrowse the repository at this point in the historyBrowse files
Keep secret flags out of browser data returned by `getFlagsForBootstrap()`, including bound clients. Server-side reads still work, including public flags that depend on secret flags. Remove dependency names from error details sent to the browser.
Adopt protocol-v2, adding support for multivariate and JSON flags in Browser, React and Vue.
8
+
9
+
- Browser `getFlag()` and React `useFlag()` return direct values instead of flag wrappers. Vue `useFlag()` returns a ref to the direct value. Replace `.isEnabled` and `.config` access with direct values, using `.value` for Vue refs in script.
10
+
- Reads without a default return Booleans, using `false` when unavailable. Pass a positional default to read strings, numbers, arrays, or objects, with TypeScript inferring the return type. Missing values or values of a different top-level type use the default. Pass `null` to accept any JSON value, including null. Nested payload schemas are not validated at runtime.
11
+
- React and Vue's optional `Flags` registration checks non-null defaults against each flag's value type, including React Suspense reads. Named-interface and readonly defaults are supported across Browser, React and Vue without losing their inferred value types.
12
+
- React `useFlag()` never suspends. Replace `useFlag(key, { suspense: true })` with `useFlagSuspense(key)` to wait for initialization. Use `useIsLoading()` for loading state; existing provider and `useOptInFlags` Suspense options continue to control opt-in loading only.
13
+
- Flag reads automatically record checks. Replace flag-level `.track()` and `.requestFeedback()` calls with the client's separate methods or the framework's tracking and feedback hooks/composables.
14
+
- Browser `getFlags()` returns a record of direct values; unavailable flags may be `undefined`. Use `getFlagResults()` for diagnostic access without recording checks.
15
+
- Bootstrap data must come from Node SDK v2 and be consumed by matching v2 SDKs. Legacy v1 payloads are incompatible. Replace the Browser client's `bootstrappedFlags` option with `bootstrappedState` and pass the complete bootstrap payload.
16
+
- Overrides accept direct JSON values: `undefined` clears an override, while `null` is a value. Saved v1 caches and overrides are not reused.
17
+
- Bootstrapped clients load opt-in metadata when requested, without replacing server-provided flag values. Successful opt-in changes update both membership and flag values.
18
+
19
+
The OpenFeature Browser provider continues to use Browser SDK v1. Legacy remote configuration is not automatically converted into multivariate flag values.
Fix app discovery for users who belong to multiple organizations. `reflag apps list` shows each app's organization, `reflag init` lets you choose an organization, and existing configs resolve their `appId` without requiring an `orgId`. Use `orgId` or `--org-id` to restrict the CLI to one organization. API keys remain scoped to their app.
Replace workspace-only dependency ranges with registry-compatible versions so the published SDKs can be installed outside the monorepo. Keep local workspace linking and the existing v1 OpenFeature dependencies unchanged.
Allow ES modules to import the Node.js OpenFeature provider through its existing CommonJS build. CommonJS imports and TypeScript declarations are unchanged.
Adopt protocol-v2, adding support for multivariate and JSON flags in React Native.
6
+
7
+
-`useFlag()` returns direct values instead of flag wrappers. Reads without a default return Booleans, using `false` when unavailable. Replace `.isEnabled` and `.config` access with direct values.
8
+
- Pass a positional default to read strings, numbers, arrays, or objects, with TypeScript inferring the return type. Missing values or values of a different top-level type use the default. Pass `null` to accept any JSON value, including null. Nested payload schemas are not validated at runtime.
9
+
-`useFlag()` never suspends. Replace `useFlag(key, { suspense: true })` with `useFlagSuspense(key)` to wait for initialization, and use `useIsLoading()` for loading state.
10
+
- Flag reads automatically record checks. Replace flag-level tracking and feedback methods with `useTrack()` and `useSendFeedback()`, using your own Native feedback UI.
11
+
- Optional flag typing uses React's `Flags` registration in `@reflag/react-sdk`. Non-null defaults are checked against each registered flag's value type, and named-interface and readonly defaults are supported. Regenerate legacy wrapper-shaped declarations before upgrading.
12
+
- Bootstrap data must come from Node SDK v2. Pass the complete payload to `ReflagBootstrappedProvider`; legacy v1 payloads are incompatible.
13
+
- AsyncStorage persistence, native live updates and custom storage/SSE adapters remain supported. Live updates are enabled by default; the web toolbar and automatic feedback UI are disabled by default.
14
+
- Offline fallbacks accept direct JSON value maps. Arrays of enabled Boolean flag keys remain supported.
15
+
- Requires React 17 or later, compatible with your React Native runtime, and matching v2 React/Browser SDKs.
16
+
17
+
Legacy wrapper and remote-config types are removed. Legacy remote configuration is not automatically converted into multivariate flag values.
Move the CLI to the v2 management flag API and generate direct-value declarations from current production-environment multivariate variants instead of legacy config wrappers. Add Vue generation, JSON-safe empty-shape inference and property escaping, and update generated coding-agent instructions for the v2 APIs. The CLI update requires compatible management endpoints and SDK v2; SDK v1 applications must retain the CLI 1.x generator.
0 commit comments