fix: ability to handle FDv1 flagValues shorthand map to FDv2FiledataInitializer#1811
Open
joker23 wants to merge 2 commits into
Open
fix: ability to handle FDv1 flagValues shorthand map to FDv2FiledataInitializer#1811joker23 wants to merge 2 commits into
flagValues shorthand map to FDv2FiledataInitializer#1811joker23 wants to merge 2 commits into
Conversation
FDv2FiledataInitializer
Contributor
|
@launchdarkly/js-sdk-common size report |
Contributor
|
@launchdarkly/js-client-sdk size report |
Contributor
|
@launchdarkly/js-client-sdk-common size report |
Contributor
|
@launchdarkly/browser size report |
…e-data-source-compat
joker23
marked this pull request as ready for review
July 21, 2026 14:05
flagValues shorthand map to FDv2FiledataInitializerflagValues shorthand map to FDv2FiledataInitializer
flagValues shorthand map to FDv2FiledataInitializerflagValues shorthand map to FDv2FiledataInitializer
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.
Note
Low Risk
Scoped additive change to local file data loading with documented semantic differences from FDv1 and thorough unit tests; no auth or network surface.
Overview
FDv2 file data initialization now accepts the FDv1-style
flagValuesmap ({ flagKey: variationValue }) in JSON/YAML files, converting each entry into a single-variation flag via sharedmakeFlagWithValue(now exported fromFileDataSource).flagValuesare merged with fullflagsandsegmentswhen combining multiple paths; later sources win for the same key (includingflagsvsflagValuesacross files). Shorthand-derived flags always use version 1—unlike FDv1 there is no version bump on value change, and duplicates are not rejected.Coverage adds tests for shorthand-only files, mixed keys in one file, multi-file merge, and cross-file override behavior.
Reviewed by Cursor Bugbot for commit 45fadbb. Bugbot is set up for automated code reviews on this repo. Configure here.