feat(useFeatures): implement adapters#73
Merged
johnleider merged 19 commits intomasterfrom Jan 22, 2026
Merged
Conversation
|
commit: |
2ee36d4 to
e3270ca
Compare
…rvices Implement adapter pattern for integrating with external feature flag services like Flagsmith, LaunchDarkly, and PostHog. Includes base adapter interface, concrete implementations for each service, tests, and integration with the existing features system. Add peer dependencies for external SDKs and update package.json. The adapters sync flags automatically when changes are detected and handle cleanup on disposal.
Add Flagsmith, LaunchDarkly, and PostHog SDKs to enable feature flag functionality in development environment
ad8ad34 to
74d269f
Compare
…eatures plugin The change ensures proper cleanup when the Vue app is unmounted rather than when the scope is disposed. Also adds type check for adapter.dispose.
Implement proper cleanup of PostHog feature flag listener to prevent memory leaks
add tests for dispose before setup in all feature adapters test null feature value handling in createFeatures add size property test for feature collection
Replace generic 'any' types with explicit Flagsmith types for oldFlags, params, and loadingState parameters. Also remove unnecessary type assertion when iterating over flags object entries.
Extract flag transformation logic into reusable function to ensure consistent handling of null flags. This prevents runtime errors when getAllFlags() returns null and ensures adapter always returns proper object structure.
Add module-level JSDoc comments to all feature flag adapter files to improve code documentation and clarify the purpose of each adapter module.
johnleider
approved these changes
Jan 22, 2026
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.
Supersedes #55
Implement adapter pattern for integrating with external feature flag services like Flagsmith, LaunchDarkly, and PostHog.