Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

feat(useFeatures): implement adapters#73

Merged
johnleider merged 19 commits intomasterfrom
feat/usefeatures-adapters
Jan 22, 2026
Merged

feat(useFeatures): implement adapters#73
johnleider merged 19 commits intomasterfrom
feat/usefeatures-adapters

Conversation

@AndreyYolkin
Copy link
Contributor

Supersedes #55

Implement adapter pattern for integrating with external feature flag services like Flagsmith, LaunchDarkly, and PostHog.

@AndreyYolkin AndreyYolkin self-assigned this Dec 30, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 30, 2025

Open in StackBlitz

commit: bce945d

@johnleider johnleider added this to the v0.1.0 milestone Jan 1, 2026
@AndreyYolkin AndreyYolkin force-pushed the feat/usefeatures-adapters branch from 2ee36d4 to e3270ca Compare January 14, 2026 15:16
…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
@AndreyYolkin AndreyYolkin force-pushed the feat/usefeatures-adapters branch 2 times, most recently from ad8ad34 to 74d269f Compare January 20, 2026 10:18
@AndreyYolkin AndreyYolkin marked this pull request as ready for review January 21, 2026 23:37
…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 johnleider merged commit 0fdef7a into master Jan 22, 2026
12 of 13 checks passed
@johnleider johnleider deleted the feat/usefeatures-adapters branch January 22, 2026 20:59
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