[adapter-launchdarkly] support native Marketplace integration#418
Merged
Conversation
- Read the Edge Config connection string from EXPERIMENTATION_CONFIG, falling back to EDGE_CONFIG for the legacy Vercel integration - Make LAUNCHDARKLY_PROJECT_SLUG / projectSlug optional; it is only used to deep-link flags to the LaunchDarkly dashboard
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
dferber90
requested changes
Jul 7, 2026
dferber90
left a comment
Collaborator
There was a problem hiding this comment.
The default of our Statsig adapter is to look at EXPERIMENTATION_CONFIG only, and ignore EDGE_CONFIG completely. I think it’s best to not diverge from that precedence.
I suggest
- using EXPERIMENTATION_CONFIG only, and not respect EDGE_CONFIG at all
- change the changeset to be a breaking change
- add instructions to the changeset for users of the legacy integration on how to configure passing EDGE_CONFIG
Align with the Statsig adapter: the default adapter reads the Edge Config connection string from EXPERIMENTATION_CONFIG only and no longer falls back to EDGE_CONFIG. Legacy Vercel integration users can set EXPERIMENTATION_CONFIG to their EDGE_CONFIG value or pass edgeConfigConnectionString explicitly.
dferber90
requested changes
Jul 9, 2026
|
|
||
| **If you use the legacy LaunchDarkly Vercel integration** (which provides the connection string as `EDGE_CONFIG`), do one of the following: | ||
|
|
||
| 1. Set `EXPERIMENTATION_CONFIG` to the same value as `EDGE_CONFIG`, for example in your project's environment variables: |
Collaborator
There was a problem hiding this comment.
let's eliminate this and keep the second option only.
dferber90
approved these changes
Jul 10, 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.
Summary
Updates the
@flags-sdk/launchdarklyadapter to support LaunchDarkly's new native Marketplace integration.When Edge Config is enabled for the collection, the native integration exposes the connection string as
EXPERIMENTATION_CONFIGrather than theEDGE_CONFIGvar used by the legacy Vercel integration. The native integration also does not currently provideLAUNCHDARKLY_PROJECT_SLUG.Changes
EXPERIMENTATION_CONFIGinstead ofEDGE_CONFIG. This aligns with the native Marketplace integration and matches the behavior of the Statsig adapter, which readsEXPERIMENTATION_CONFIGonly. The missing-env error message was updated accordingly.LAUNCHDARKLY_PROJECT_SLUG/projectSlugis now optional. It is only used to deep-link flags to the LaunchDarkly dashboard (the adapter'sorigin). When it is not set, flag evaluation is unaffected, butvariation().originisundefined.ldClientSideKey→clientSideId).Breaking changes
Released as a
majorbump (0.3.4→1.0.0):EXPERIMENTATION_CONFIGand no longer readsEDGE_CONFIG. The missing-env error text changed toLaunchDarkly Adapter: Missing EXPERIMENTATION_CONFIG environment variable.variation().origincan now beundefined(previously always a function) when noprojectSlugis configured.Migration for legacy Vercel integration users
If your project provides the connection string as
EDGE_CONFIG, either:EXPERIMENTATION_CONFIGto the same value (EXPERIMENTATION_CONFIG=$EDGE_CONFIG), orcreateLaunchDarklyAdapter({ edgeConfigConnectionString: process.env.EDGE_CONFIG }).Full migration instructions are in the changeset.
Test plan
pnpm test(10/10 pass)pnpm type-checkpnpm check(biome)