refactor!: remove legacy Confidence API and replace React integration - #462
Draft
andreas-karlsson wants to merge 2 commits into
Draft
andreas-karlsson wants to merge 2 commits into
andreas-karlsson wants to merge 2 commits into
Conversation
This branch has not been deployed
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
Remove the stateful
ConfidenceAPI and its implementation. The SDK now exposes the statelessConfidenceClient, pureFlagBundleevaluation, evaluation-context/logger types, and browser flag-evaluation reporting. The OpenFeature providers continue to use the thin client.Delete the legacy resolver/event engines, cache and observer infrastructure, automatic trackers, telemetry code/proto, and associated tests. Replace the legacy React integration with bundle-based
ConfidenceProvider,useFlag, anduseFlagDetails. Keep fetching and exposure transport application-owned: the same hooks accept thin-client callbacks or server actions. Retire the old server entry point and Next.js development patch.Migrate the Node ESM/CommonJS and React 18/19 examples, update public API reports and migration documentation, and restore React to builds, release automation, package verification, and hook linting. Align the shared bundle reason/error vocabulary with the local resolver; switching that separate repository's React imports is follow-up work. Tokens remain backend-specific.
Compatibility and release
This PR is stacked on #461; its base is
migrate-to-stateless-clientso the diff shows the legacy API removal and React replacement.Target SDK
0.5.0and React0.3.0, with explicit release versions. This preserves the0.4compatibility boundary for the legacy React package from #461. Providers support>=0.4.0 <0.6.0because their thin-client API remains compatible. React0.3requires SDK>=0.5.0 <0.6.0; legacy React consumers must migrate to the bundle/provider API before adopting SDK0.5.Validation
use client.ConfidenceClient,FlagBundle, andpublishFlagEvaluation.✔️ Checklist