Skip to content

fix: ability to handle FDv1 flagValues shorthand map to FDv2FiledataInitializer#1811

Open
joker23 wants to merge 2 commits into
mainfrom
skz/sdk-2734/fdv2-file-data-source-compat
Open

fix: ability to handle FDv1 flagValues shorthand map to FDv2FiledataInitializer#1811
joker23 wants to merge 2 commits into
mainfrom
skz/sdk-2734/fdv2-file-data-source-compat

Conversation

@joker23

@joker23 joker23 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

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 flagValues map ({ flagKey: variationValue }) in JSON/YAML files, converting each entry into a single-variation flag via shared makeFlagWithValue (now exported from FileDataSource).

flagValues are merged with full flags and segments when combining multiple paths; later sources win for the same key (including flags vs flagValues across 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.

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 26360 bytes
Compressed size limit: 29000
Uncompressed size: 129188 bytes

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 32030 bytes
Compressed size limit: 34000
Uncompressed size: 114438 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 38887 bytes
Compressed size limit: 39000
Uncompressed size: 212703 bytes

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 179649 bytes
Compressed size limit: 200000
Uncompressed size: 831617 bytes

@joker23
joker23 marked this pull request as ready for review July 21, 2026 14:05
@joker23
joker23 requested a review from a team as a code owner July 21, 2026 14:05

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@joker23 joker23 changed the title feat: add ability to handle FDv1 flagValues shorthand map to FDv2FiledataInitializer fix:ability to handle FDv1 flagValues shorthand map to FDv2FiledataInitializer Jul 21, 2026
@joker23 joker23 changed the title fix:ability to handle FDv1 flagValues shorthand map to FDv2FiledataInitializer fix: ability to handle FDv1 flagValues shorthand map to FDv2FiledataInitializer Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant