Skip to content

Commit ad516d7

Browse files
committed
docs: simplify Node v2 release notes
Focus the protocol-v2 Changeset on developer-facing API and migration changes. Fold registered-default typing into the major release note and remove the separate patch Changeset.
1 parent 0809be2 commit ad516d7

2 files changed

Lines changed: 12 additions & 16 deletions

File tree

‎.changeset/node-sdk-collection-values.md‎

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33
"@reflag/openfeature-node-provider": patch
44
---
55

6-
Adopt evaluator v2 and the complete `GET /flags` collection protocol in the Node SDK.
6+
Adopt protocol-v2, adding support for multivariate and JSON flags.
77

8-
- `getFlag(context, key)` and bound `getFlag(key)` are direct Boolean reads with an implicit `false` default. Positional defaults infer the value type, widening literals, without generated declarations. Non-null defaults require the same top-level JSON category; missing/mismatched values use the default without authored-selection metadata. An explicit `null` default accepts arbitrary JSON, including authored null. Nested payload schemas are not validated. There is no flag wrapper, `.isEnabled`, `.config`, or flag `.track()` method. Batch `getFlags()` keeps raw JSON/`undefined` values. Ordinary client `track()` APIs remain separate.
9-
- Singular remote reads share the default contract. Root `getFlagRemote(key, defaultValue, userId?, companyId?, context?)` puts the default second, moving old positional IDs one place right; pass `undefined` for a Boolean read with IDs. Bound `getFlagRemote(key, defaultValue?)` needs no explicit IDs.
10-
- Reads immediately register checks for requested roots. Checks carry the selected variant key as `evalResult`, `sourceVersionId`, and the snapshot `flagStateVersion`. Boolean values send the keys `"true"` / `"false"`. Equal-valued variants and dependency-only version changes retain their distinct identities. Delivery remains buffered and rate-limited.
11-
- Prepare complete flags/segments snapshots before atomically accepting them. Evaluate references recursively without dependency-result caching.
12-
- Persist full graphs and snapshot versions in version-2 fallback snapshots. V1 snapshots are not converted. Built-in storage uses separate versioned keys/files so V1 and V2 clients cannot overwrite one another's snapshots. Local overrides and value-only fallbacks do not fabricate authored variant selections.
13-
- Bootstrap state contains v2 selection results and context/version metadata, without registering browser checks. Existing v1 browser bootstrap consumers require a separate migration; this is not a backwards-compatible bootstrap shape.
14-
- Preserve sync modes, ordinary tracking, bound contexts, and post-evaluation override layering. Update the Express example to consume direct values.
8+
- `getFlag(context, key)` and bound `getFlag(key)` return direct values instead of flag wrappers. Reads without a default return Booleans, using `false` when unavailable. Replace `.isEnabled` and `.config` access with direct values.
9+
- Pass a positional default to read strings, numbers, arrays, or objects. TypeScript infers the return type from the default without generated declarations. 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.
10+
- With optional `Flags` registration, TypeScript checks non-null defaults against each flag's value type for local, remote, and bound reads. Named-interface and readonly defaults are supported.
11+
- Flag reads automatically record checks. Replace flag-level `.track()` calls with the client's separate `track()` API.
12+
- `getFlags()` and `getFlagsRemote()` return records of direct values; unavailable flags may be `undefined`.
13+
- `getFlagRemote(key, defaultValue, userId?, companyId?, context?)` now takes the default second, shifting existing user/company arguments one position to the right. Pass `undefined` for a Boolean read with explicit IDs. Bound clients use `getFlagRemote(key, defaultValue?)`.
14+
- `getFlagDefinitions()` returns `{ flags, segments }` instead of an array.
15+
- Saved fallback snapshots use a new format; v1 snapshots are not migrated automatically. Regenerate saved snapshots when upgrading. Built-in storage keeps v1 and v2 snapshots separate.
16+
- `getFlagsForBootstrap()` produces protocol-v2 state. Upgrade Browser/framework consumers to compatible v2 SDKs before using this state; v1 bootstrap consumers are incompatible.
17+
- Existing synchronization modes, bound contexts, and local overrides remain supported. Overrides and static fallbacks accept direct JSON values.
1518

16-
The existing OpenFeature provider and v1 React bootstrap demo remain explicitly pinned to published Node SDK v1 through an npm alias. This prevents automatic workspace dependency upgrades from silently breaking their wrapper/bootstrap contracts; migrating those consumers to multivariate values is separate work.
17-
18-
This release requires the collection-capable evaluator and compatible `/flags` and variant-key check ingestion. It does not migrate legacy remote config into multivariate flag values.
19+
The OpenFeature Node provider continues to use Node SDK v1. Legacy remote configuration is not automatically converted into multivariate flag values.

‎.changeset/node-sdk-registered-defaults.md‎

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

0 commit comments

Comments
 (0)