Repository navigation
fix: Make TestData valueForAll return its value when targeting is off - #2177
Merged
Merged
Conversation
Generated-by: termag
Contributor
|
@launchdarkly/js-client-sdk size report |
Contributor
|
@launchdarkly/js-sdk-common size report |
Contributor
|
@launchdarkly/js-client-sdk-common size report |
joker23
approved these changes
Nov 6, 2026
Merged
joker23
pushed a commit
that referenced
this pull request
Nov 6, 2026
🤖 I have created a release *beep* *boop* --- <details><summary>akamai-edgeworker-sdk-common: 2.0.49</summary> ## [2.0.49](akamai-edgeworker-sdk-common-v2.0.48...akamai-edgeworker-sdk-common-v2.0.49) (2026-11-06) ### Bug Fixes * **akamai-edgeworker-sdk:** reduce bundles with dual ESM and CJS output ([#2171](#2171)) ([1504e6c](1504e6c)) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-server-sdk-common bumped from ^2.26.3 to ^2.26.4 </details> <details><summary>akamai-server-base-sdk: 3.0.50</summary> ## [3.0.50](akamai-server-base-sdk-v3.0.49...akamai-server-base-sdk-v3.0.50) (2026-11-06) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/akamai-edgeworker-sdk-common bumped from ^2.0.48 to ^2.0.49 </details> <details><summary>akamai-server-edgekv-sdk: 1.4.52</summary> ## [1.4.52](akamai-server-edgekv-sdk-v1.4.51...akamai-server-edgekv-sdk-v1.4.52) (2026-11-06) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/akamai-edgeworker-sdk-common bumped from ^2.0.48 to ^2.0.49 * @launchdarkly/js-server-sdk-common bumped from ^2.26.3 to ^2.26.4 </details> <details><summary>client-testing-plugin: 1.0.31</summary> ## [1.0.31](client-testing-plugin-v1.0.30...client-testing-plugin-v1.0.31) (2026-11-06) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-client-sdk-common bumped from 1.35.1 to 1.35.2 * devDependencies * @launchdarkly/js-client-sdk bumped from 4.14.1 to 4.14.2 * @launchdarkly/react-sdk bumped from 4.2.1 to 4.2.2 * peerDependencies * @launchdarkly/js-client-sdk bumped from ^4.9.1 to ^4.14.2 * @launchdarkly/react-sdk bumped from ^4.1.4 to ^4.2.2 </details> <details><summary>cloudflare-server-sdk: 2.7.51</summary> ## [2.7.51](cloudflare-server-sdk-v2.7.50...cloudflare-server-sdk-v2.7.51) (2026-11-06) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-server-sdk-common-edge bumped from 2.6.46 to 2.6.47 </details> <details><summary>eventsource: 0.2.4</summary> ## [0.2.4](eventsource-v0.2.3...eventsource-v0.2.4) (2026-11-06) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/js-sdk-common bumped from 2.32.1 to 2.32.2 </details> <details><summary>fastly-server-sdk: 0.2.41</summary> ## [0.2.41](fastly-server-sdk-v0.2.40...fastly-server-sdk-v0.2.41) (2026-11-06) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-server-sdk-common bumped from 2.26.3 to 2.26.4 </details> <details><summary>jest: 1.0.41</summary> ## [1.0.41](jest-v1.0.40...jest-v1.0.41) (2026-11-06) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/react-native-client-sdk bumped from ~10.23.3 to ~10.23.4 </details> <details><summary>js-client-sdk: 4.14.2</summary> ## [4.14.2](js-client-sdk-v4.14.1...js-client-sdk-v4.14.2) (2026-11-06) ### Bug Fixes * Keep JSDoc in sdk-client declarations and show inherited LDClient docs ([#2181](#2181)) ([09b5f99](09b5f99)) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-client-sdk-common bumped from 1.35.1 to 1.35.2 * optionalDependencies * @launchdarkly/eventsource bumped from 0.2.3 to 0.2.4 </details> <details><summary>js-client-sdk-common: 1.35.2</summary> ## [1.35.2](js-client-sdk-common-v1.35.1...js-client-sdk-common-v1.35.2) (2026-11-06) ### Bug Fixes * Keep JSDoc in sdk-client declarations and show inherited LDClient docs ([#2181](#2181)) ([09b5f99](09b5f99)) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-sdk-common bumped from 2.32.1 to 2.32.2 </details> <details><summary>js-sdk-common: 2.32.2</summary> ## [2.32.2](js-sdk-common-v2.32.1...js-sdk-common-v2.32.2) (2026-11-06) ### Bug Fixes * Handle flag keys that are names of built-in object members ([#2170](#2170)) ([4a18699](4a18699)) </details> <details><summary>js-server-sdk-common: 2.26.4</summary> ## [2.26.4](js-server-sdk-common-v2.26.3...js-server-sdk-common-v2.26.4) (2026-11-06) ### Bug Fixes * Avoid querying a persistent store on every evaluation of an unknown flag ([#2169](#2169)) ([da1cd35](da1cd35)) * Handle flag keys that are names of built-in object members ([#2170](#2170)) ([4a18699](4a18699)) * Keep a flag named __proto__ in file data, change events and persistent store reads ([#2174](#2174)) ([1ffb29b](1ffb29b)) * Make TestData valueForAll return its value when targeting is off ([#2177](#2177)) ([fc8c1f6](fc8c1f6)) * Prevent TestData from throwing for a flag named constructor or toString ([#2173](#2173)) ([4e58d1d](4e58d1d)) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-sdk-common bumped from 2.32.1 to 2.32.2 </details> <details><summary>js-server-sdk-common-edge: 2.6.47</summary> ## [2.6.47](js-server-sdk-common-edge-v2.6.46...js-server-sdk-common-edge-v2.6.47) (2026-11-06) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-server-sdk-common bumped from 2.26.3 to 2.26.4 </details> <details><summary>node-client-sdk: 4.4.3</summary> ## [4.4.3](node-client-sdk-v4.4.2...node-client-sdk-v4.4.3) (2026-11-06) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/eventsource bumped from 0.2.3 to 0.2.4 * @launchdarkly/js-client-sdk-common bumped from 1.35.1 to 1.35.2 </details> <details><summary>node-server-sdk: 9.16.4</summary> ## [9.16.4](node-server-sdk-v9.16.3...node-server-sdk-v9.16.4) (2026-11-06) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/eventsource bumped from 0.2.3 to 0.2.4 * @launchdarkly/js-server-sdk-common bumped from 2.26.3 to 2.26.4 </details> <details><summary>node-server-sdk-dynamodb: 6.4.7</summary> ## [6.4.7](node-server-sdk-dynamodb-v6.4.6...node-server-sdk-dynamodb-v6.4.7) (2026-11-06) ### Bug Fixes * Avoid querying a persistent store on every evaluation of an unknown flag ([#2169](#2169)) ([da1cd35](da1cd35)) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/node-server-sdk bumped from 9.16.3 to 9.16.4 * peerDependencies * @launchdarkly/node-server-sdk bumped from >=9.14.1 to >=9.16.4 </details> <details><summary>node-server-sdk-otel: 1.3.43</summary> ## [1.3.43](node-server-sdk-otel-v1.3.42...node-server-sdk-otel-v1.3.43) (2026-11-06) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/node-server-sdk bumped from 9.16.3 to 9.16.4 * peerDependencies * @launchdarkly/node-server-sdk bumped from >=9.11.3 to >=9.16.4 </details> <details><summary>node-server-sdk-redis: 4.4.7</summary> ## [4.4.7](node-server-sdk-redis-v4.4.6...node-server-sdk-redis-v4.4.7) (2026-11-06) ### Bug Fixes * Avoid querying a persistent store on every evaluation of an unknown flag ([#2169](#2169)) ([da1cd35](da1cd35)) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/node-server-sdk bumped from 9.16.3 to 9.16.4 * peerDependencies * @launchdarkly/node-server-sdk bumped from >=9.14.1 to >=9.16.4 </details> <details><summary>openfeature-cloudflare-server: 1.2.0</summary> ## [1.2.0](openfeature-cloudflare-server-v1.1.3...openfeature-cloudflare-server-v1.2.0) (2026-11-06) ### Features * Add an initialization timeout option to the OpenFeature Cloudflare provider ([#2182](#2182)) ([ba6ee3a](ba6ee3a)) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/openfeature-js-server-common bumped from 2.2.2 to 2.2.3 * devDependencies * @launchdarkly/cloudflare-server-sdk bumped from 2.7.50 to 2.7.51 * peerDependencies * @launchdarkly/cloudflare-server-sdk bumped from ^2.7.0 to ^2.7.51 </details> <details><summary>openfeature-js-server-common: 2.2.3</summary> ## [2.2.3](openfeature-js-server-common-v2.2.2...openfeature-js-server-common-v2.2.3) (2026-11-06) ### Bug Fixes * Align OpenFeature context conversion log levels with the provider spec ([#2183](#2183)) ([c356b22](c356b22)) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-sdk-common bumped from 2.32.1 to 2.32.2 </details> <details><summary>openfeature-node-server: 2.1.7</summary> ## [2.1.7](openfeature-node-server-v2.1.6...openfeature-node-server-v2.1.7) (2026-11-06) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/openfeature-js-server-common bumped from 2.2.2 to 2.2.3 * devDependencies * @launchdarkly/node-server-sdk bumped from 9.16.3 to 9.16.4 * peerDependencies * @launchdarkly/node-server-sdk bumped from ^9.0.0 to ^9.16.4 </details> <details><summary>react-native-client-sdk: 10.23.4</summary> ## [10.23.4](react-native-client-sdk-v10.23.3...react-native-client-sdk-v10.23.4) (2026-11-06) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-client-sdk-common bumped from 1.35.1 to 1.35.2 </details> <details><summary>react-sdk: 4.2.2</summary> ## [4.2.2](react-sdk-v4.2.1...react-sdk-v4.2.2) (2026-11-06) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-client-sdk bumped from 4.14.1 to 4.14.2 * @launchdarkly/js-server-sdk-common bumped from 2.26.3 to 2.26.4 </details> <details><summary>server-sdk-ai: 2.0.20</summary> ## [2.0.20](server-sdk-ai-v2.0.19...server-sdk-ai-v2.0.20) (2026-11-06) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/js-server-sdk-common bumped from 2.26.3 to 2.26.4 * peerDependencies * @launchdarkly/js-server-sdk-common bumped from ^2.0.0 to ^2.26.4 </details> <details><summary>server-sdk-ai-langchain: 0.8.31</summary> ## [0.8.31](server-sdk-ai-langchain-v0.8.30...server-sdk-ai-langchain-v0.8.31) (2026-11-06) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/server-sdk-ai bumped from ^2.0.19 to ^2.0.20 * peerDependencies * @launchdarkly/server-sdk-ai bumped from ^1.1.1 || ^2.0.0 to ^2.0.20 </details> <details><summary>server-sdk-ai-openai: 0.7.31</summary> ## [0.7.31](server-sdk-ai-openai-v0.7.30...server-sdk-ai-openai-v0.7.31) (2026-11-06) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/js-server-sdk-common bumped from 2.26.3 to 2.26.4 * @launchdarkly/server-sdk-ai bumped from ^2.0.19 to ^2.0.20 * peerDependencies * @launchdarkly/server-sdk-ai bumped from ^1.1.1 || ^2.0.0 to ^2.0.20 </details> <details><summary>server-sdk-ai-vercel: 0.7.31</summary> ## [0.7.31](server-sdk-ai-vercel-v0.7.30...server-sdk-ai-vercel-v0.7.31) (2026-11-06) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/server-sdk-ai bumped from ^2.0.19 to ^2.0.20 * peerDependencies * @launchdarkly/server-sdk-ai bumped from ^1.1.1 || ^2.0.0 to ^2.0.20 </details> <details><summary>shopify-oxygen-sdk: 0.2.6</summary> ## [0.2.6](shopify-oxygen-sdk-v0.2.5...shopify-oxygen-sdk-v0.2.6) (2026-11-06) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-server-sdk-common bumped from 2.26.3 to 2.26.4 </details> <details><summary>vercel-server-sdk: 1.3.74</summary> ## [1.3.74](vercel-server-sdk-v1.3.73...vercel-server-sdk-v1.3.74) (2026-11-06) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-server-sdk-common-edge bumped from 2.6.46 to 2.6.47 </details> <details><summary>vue-client-sdk: 3.0.11</summary> ## [3.0.11](vue-client-sdk-v3.0.10...vue-client-sdk-v3.0.11) (2026-11-06) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-client-sdk bumped from 4.14.1 to 4.14.2 </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Overview** > Cuts the Release Please rollout that bumps every published workspace package, refreshes `.release-please-manifest.json`, and backfills changelog entries with the new semver tags. > > Functional follow-ups ride along in the version drift: `js-sdk-common`/`js-server-sdk-common` pick up the flag-key edge-case fixes, persistent-store short-circuit, and TestData corrections called out in their notes; `openfeature-cloudflare-server` graduates to `1.2.0` with an explicit initialization timeout knob wired through `LaunchDarklyProvider`, while the Akamai common SDK emits slimmer dual ESM/CJS bundles. Client surfaces (`js-client-sdk`, React/Vue/React Native wrappers, testing plugin, etc.) absorb the refreshed common packages so generated typings keep inherited JSDoc. > > Everywhere else is mechanical—AI provider peers now pin `@launchdarkly/server-sdk-ai` `^2.0.20`, Cloudflare/Fastly/Vercel edge SDKs advance `js-server-sdk-common-edge`, Redis/Dynamo/OTEL integrations raise their `node-server-sdk` floor, and sample apps mirror the new dependency graph. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 52dbf7b. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TestDataFlagBuilder.valueForAllin the server SDK replaced the flag's variations with the single value and calledvariationForAll(0), which leaves the off variation unchanged. A new test flag is a boolean flag with off variation 1, so the built flag hadvariations: [value]andoffVariation: 1. That index is out of range, so the flag failed to evaluate (malformed flag) when targeting was off. The method is documented to return the value whether targeting is on or off.valueForAllnow also sets the off variation to 0.variationForAllis unchanged; it still leaves the off variation alone, as documented.The new tests check that the built off variation is 0 with targeting on and off, and that the client evaluates a
valueForAllflag with targeting off to the value with anOFFreason.This matches the Ruby fix in launchdarkly/ruby-server-sdk#489.
Opened from termag
Note
Overview
Fixes TestData
valueForAllso flags evaluate correctly when targeting is off. Previously it collapsed the flag to a single variation and set fallthrough to index 0 but left the default off variation at index 1, which is out of range and produced malformed flag errors instead of the configured value.valueForAllnow also sets off variation to0, matching its documented behavior (same value on or off).variationForAllis unchanged and still does not alter the off variation.New tests cover the built flag shape and LDClient evaluation with targeting off (
OFFreason and the expected value).Reviewed by Cursor Bugbot for commit 6f2c0bb. Bugbot is set up for automated code reviews on this repo. Configure here.