Skip to content

[adapter-launchdarkly] support native Marketplace integration#418

Merged
mbrakken merged 6 commits into
mainfrom
marcbrakken/ld-provider-marketpalce
Jul 10, 2026
Merged

[adapter-launchdarkly] support native Marketplace integration#418
mbrakken merged 6 commits into
mainfrom
marcbrakken/ld-provider-marketpalce

Conversation

@mbrakken

@mbrakken mbrakken commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Updates the @flags-sdk/launchdarkly adapter 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_CONFIG rather than the EDGE_CONFIG var used by the legacy Vercel integration. The native integration also does not currently provide LAUNCHDARKLY_PROJECT_SLUG.

Changes

  • Edge Config connection string: the default adapter now reads EXPERIMENTATION_CONFIG instead of EDGE_CONFIG. This aligns with the native Marketplace integration and matches the behavior of the Statsig adapter, which reads EXPERIMENTATION_CONFIG only. The missing-env error message was updated accordingly.
  • Optional project slug: LAUNCHDARKLY_PROJECT_SLUG / projectSlug is now optional. It is only used to deep-link flags to the LaunchDarkly dashboard (the adapter's origin). When it is not set, flag evaluation is unaffected, but variation().origin is undefined.
  • Docs (README + provider mdx) and tests updated. Also fixed a pre-existing README typo (ldClientSideKeyclientSideId).

Breaking changes

Released as a major bump (0.3.41.0.0):

  • The default adapter reads the Edge Config connection string from EXPERIMENTATION_CONFIG and no longer reads EDGE_CONFIG. The missing-env error text changed to LaunchDarkly Adapter: Missing EXPERIMENTATION_CONFIG environment variable.
  • variation().origin can now be undefined (previously always a function) when no projectSlug is configured.

Migration for legacy Vercel integration users

If your project provides the connection string as EDGE_CONFIG, either:

  1. Set EXPERIMENTATION_CONFIG to the same value (EXPERIMENTATION_CONFIG=$EDGE_CONFIG), or
  2. Pass it explicitly via createLaunchDarklyAdapter({ edgeConfigConnectionString: process.env.EDGE_CONFIG }).

Full migration instructions are in the changeset.

Test plan

  • pnpm test (10/10 pass)
  • pnpm type-check
  • pnpm check (biome)

- 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
@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flags-playground Ready Ready Preview, Comment, Open in v0 Jul 10, 2026 3:03pm
flags-sdk-dev Ready Ready Preview, Comment, Open in v0 Jul 10, 2026 3:03pm
flags-sdk-snippets Ready Ready Preview, Comment, Open in v0 Jul 10, 2026 3:03pm
flags-sdk-sveltekit-snippets Ready Ready Preview, Comment, Open in v0 Jul 10, 2026 3:03pm
shirt-shop Ready Ready Preview, Comment, Open in v0 Jul 10, 2026 3:03pm
shirt-shop-api Ready Ready Preview, Comment, Open in v0 Jul 10, 2026 3:03pm

@dferber90 dferber90 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

**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:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's eliminate this and keep the second option only.

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