Skip to content

Conversation

@joker23
Copy link
Contributor

@joker23 joker23 commented Dec 3, 2025

This commit will allow variation calls to use bootstrapped values during the client initialization process.

The bootstrap configuration will only be done once per client instance as we expect this fall back will only be active for a brief amount of time.


Note

Allow bootstrapped flag values to be used during initialization by reading bootstrap once in the browser client and seeding flags via a new protected setBootstrap in the shared client.

  • Browser (packages/sdk/browser/src/BrowserClient.ts):
    • Read bootstrap data in identifyResult (only once per instance) via readFlagsFromBootstrap and seed flags with setBootstrap before async identify completes; log on failure.
    • Add _bootstrapAttempted guard to prevent repeated bootstrapping.
  • Shared (packages/shared/sdk-client/src/LDClientImpl.ts):
    • Add protected setBootstrap(pristineContext, newFlags) to set context and seed flags in FlagManager.
    • Import ItemDescriptor for bootstrap flag descriptors.

Written by Cursor Bugbot for commit becc1fd. This will update automatically on new commits. Configure here.

This commit will allow variation calls to use bootstrapped values during the client initialization process.
@joker23 joker23 requested a review from a team as a code owner December 3, 2025 00:21
@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 22171 bytes
Compressed size limit: 25000
Uncompressed size: 76527 bytes

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 25394 bytes
Compressed size limit: 26000
Uncompressed size: 124693 bytes

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.

2 participants