Commit Graph

364 Commits

Author SHA1 Message Date
Dominik Ferber bdf4f9c73f Merge branch 'main' into experiments-managing-flags 2026-08-31 15:10:07 +03:00
github-actions[bot] f13fd27816 Version Packages (#484)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@vercel/flags-core@1.8.0 @flags-sdk/vercel@1.4.7
2026-08-26 12:57:29 +02:00
Luis Meyer cc8c26648c feat(flags-core): add metrics environment option (#453)
* feat(flags-core): support explicit environment

Co-Authored-By: Claude <noreply@anthropic.com>

Co-Authored-By: Luis Meyer <luis.meyer@vercel.com>

* fix(flags-core): scope environment to metrics ingest

Co-Authored-By: Claude <noreply@anthropic.com>

Co-Authored-By: Luis Meyer <luis.meyer@vercel.com>

* fix(flags-core): clarify metrics environment

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(flags-core): restrict metric environment values

* docs(flags-core): clarify metrics environment fallback

---------

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-08-26 12:28:13 +02:00
Rich Haines 9f77c88979 docs: fix Global Config links (#483) 2026-08-25 13:47:45 +02:00
Rich Haines 0c0872710b [docs] upgrade Geistdocs to 1.20.4 (#480)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: molebox <22930449+molebox@users.noreply.github.com>
2026-08-25 10:47:27 +02:00
Rich Haines 03f971440a Update Geistdocs to 1.23.0 (#481) 2026-08-25 10:38:22 +03:00
Dominik Ferber c476b82ecc Update package versions for experiment replacement 2026-08-22 22:46:51 +03:00
Dominik Ferber b8d03bfdbb Initialize adapters before reporting flag overrides 2026-08-21 16:11:02 +03:00
Dominik Ferber 3ea6ea935f hybrid and override exposure reporting 2026-08-21 11:50:29 +03:00
Dominik Ferber bb14f27f0c version 2026-08-20 08:45:16 +03:00
Dominik Ferber 6f06dfd542 Attach experiment metadata to all evaluated flag outcomes 2026-08-20 08:19:31 +03:00
Dominik Ferber 6294177c50 docs: update marketing pages guide examples (#479)
Rename the Proxy function to `proxy` and simplify the `identify` example
with the `Identify` type helper.

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Co-authored-by: Dominik Ferber <1765075+dferber90@users.noreply.github.com>
2026-08-18 08:59:39 +02:00
Dominik Ferber 5838f58412 chore: upgrade Changesets to v3 (#478)
Changesets v3 is the first major release since v2. All packages are now ES
modules, and the dependency tree is smaller.

- @changesets/cli 2.31.0 -> 3.0.0
- @changesets/changelog-github ^0.7.0 -> ^1.0.0
- changesets/action v1.7.0 -> v2.1.0 (v1 supports only Changesets v2)
- root engines.node -> ^22.11 || ^24 || >=26, the requirement of the new CLI

Remove the onlyUpdatePeerDependentsWhenOutOfRange experimental option.
Changesets v3 gives a peer dependent a patch increase, and only when the new
version leaves the declared range. This makes the option redundant for the
release plan.

Empty the ignore list. Changesets v3 does not version private packages by
default, and every ignored package is private.

Set format to false. Changesets v3 no longer bundles Prettier, and it excludes
Biome from formatter auto-detection.

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Co-authored-by: Dominik Ferber <1765075+dferber90@users.noreply.github.com>
2026-08-17 14:06:45 +03:00
Dominik Ferber 279b91940e undo exposureLogging boolean 2026-08-16 16:00:17 +03:00
Dominik Ferber 21e62e54c2 exposures 2026-08-16 15:55:24 +03:00
Dominik Ferber 321356cb8b single experiment 2026-08-16 15:03:11 +03:00
Dominik Ferber 7905762f55 reuse variants 2026-08-15 22:02:40 +03:00
Dominik Ferber 98866ff3df single experiment 2026-08-15 21:04:06 +03:00
Dominik Ferber 8505d179b6 step 1 2026-08-15 17:13:15 +03:00
github-actions[bot] a427635e24 Version Packages (#475)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@flags-sdk/openfeature@0.1.3
2026-08-13 19:35:54 +00:00
Dominik Ferber 2dfc85c3ec [openfeature] allow recovering from bad init (#474) 2026-08-13 22:32:43 +03:00
Dominik Ferber b64b6bccdb chore: override nanoid@3 to fix Dependabot alert (#471)
`hypertune` and `@vercel/microfrontends` resolved to nanoid 3.3.16, which
is vulnerable to an infinite loop when a custom generator is called with
size zero. The existing `nanoid@>=4` override did not cover the v3 range,
so add a matching `nanoid@3: ^3.3.18` override.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-12 11:22:17 +03:00
github-actions[bot] f0f8a00848 Version Packages (#465)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@flags-sdk/global-config@0.3.1 @flags-sdk/statsig@0.3.1 @flags-sdk/launchdarkly@1.1.1 @flags-sdk/hypertune@0.3.4 @flags-sdk/growthbook@0.3.1
2026-08-12 08:39:34 +02:00
Dominik Ferber 2532e99ea8 chore: fix open Dependabot security alerts (#470)
Bumps the vulnerable transitive dependencies flagged by Dependabot via
pnpm overrides, and the direct nanoid dependency in the examples.

- nanoid >= 4 -> ^5.1.16 (GHSA infinite loop on negative/zero size)
- brace-expansion >= 4 -> ^5.0.9 (DoS via unbounded intermediate arrays)
- dompurify -> ^3.4.13 (XSS via detached subtree after IN_PLACE hook removal)
- fast-uri -> ^3.1.5 (host confusion via backslash authority introducer)
- js-yaml 3 -> ^3.15.1, js-yaml 4 -> ^4.3.1 (quadratic CPU in !!omap)
- mermaid -> ^11.16.1 (DoS, prototype pollution, CSS injection)
- postcss -> ^8.5.23 (arbitrary .map file read via sourceMappingURL)
- @sveltejs/kit -> ^2.70.2 (ReDoS in Accept header content negotiation)

image-size (alerts #979, #980) has no patched release yet, so it is left
as-is. It is only used at build time by the docs site.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-11 20:14:54 +02:00
Andy 8913cf1578 Bump @vercel/global-config to 1.5.1 (#464)
* Bump Global Config SDK

* Add changeset
2026-08-07 16:00:05 +02:00
christopherkindl db7ce9aa66 [docs] upgrade geistdocs to 1.19.4 (#463) 2026-08-05 09:51:51 +03:00
github-actions[bot] c7a56d6a66 Version Packages (#461)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@flags-sdk/hypertune@0.3.3 @flags-sdk/statsig@0.3.0 flags@4.3.0 @flags-sdk/growthbook@0.3.0 @flags-sdk/launchdarkly@1.1.0 @flags-sdk/posthog@1.0.1 @flags-sdk/reflag@1.0.2 @flags-sdk/global-config@0.3.0
2026-08-04 19:12:09 +02:00
Andy 0258b6ca3c Update exports and changesets (#462) 2026-08-04 13:14:03 +02:00
Luis Meyer 58e1f5bcdf Rename Edge Config packages to Global Config (#452)
* Rename edge config packages

* Rename Global Config APIs

* Fix Global Config environment setup

* Rename Global Config endpoints

* Update Global Config documentation links

* Undo lockfile changes

* Update lockfile

* Undo lockfile changes

* Update lockfile

* Fall back to EDGE_CONFIG

---------

Co-authored-by: Andy Bitz <artzbitz@gmail.com>
2026-08-04 12:36:41 +02:00
Dominik Ferber 3a5ba70f53 docs: add no-store to flags discovery endpoint (#459) 2026-08-03 16:14:28 +03:00
christopherkindl 6ddb6b75aa [docs] upgrade geistdocs to 1.19 and rework the homepage layout (#457) 2026-07-31 16:25:46 +02:00
github-actions[bot] 81707e7a0e Version Packages (#456)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@flags-sdk/posthog@1.0.0
2026-07-29 15:01:19 +00:00
Dominik Ferber aec3c03430 @flags-sdk/posthog: upgrade posthog-node; explicit evaluation modes (#436)
* @flags-sdk/posthog: upgrade posthog-node

* @flags-sdk/posthog: make local vs remote evaluation explicit

The default adapter passed POSTHOG_PERSONAL_API_KEY into the runtime
posthog-node client, which enabled local evaluation and started a
feature-flag poller in every warm process. On serverless this produced
large, traffic-independent PostHog feature flag request volume.

Local evaluation is now opt-in via POSTHOG_SECRET_KEY; without it the
adapter evaluates remotely. POSTHOG_PERSONAL_API_KEY is used only by
getProviderData (Flags Explorer) and no longer affects runtime
evaluation. Drops the forced 10s poll interval in favor of the v5
default. Updates docs, README, and tests.

* remove unused @vercel/edge-config dependency

* add remote vs local tradeoffs

* rm edge config tag

* modernize

* rm trimKey

* lockfile

* update

* fixes

* reword changeset

* merge changesets

* reword changelog
2026-07-29 14:54:40 +00:00
github-actions[bot] e718915540 Version Packages (#455)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
flags@4.2.4
2026-07-29 09:49:11 -04:00
Dominik Ferber dcb74ff938 return no-store on flags discovery endpoint (#454) 2026-07-29 09:42:01 -04:00
github-actions[bot] 5ff8eafec9 Version Packages (#451)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@flags-sdk/vercel@1.4.6 @vercel/flags-core@1.7.1
2026-07-27 10:32:21 -04:00
Dominik Ferber ceb15198f7 [@vercel/flags-core] strip g and y regex flags (#450) 2026-07-27 13:50:24 +00:00
Dominik Ferber fde6ab7135 address CodeQL alerts (#448)
* explicit workflow permissions

* max-delay

* better parsing
2026-07-26 10:20:17 -04:00
Dominik Ferber 6dbf589e0c upgrade toolbar and others (#447) 2026-07-26 13:42:26 +00:00
Dominik Ferber 42cc02cacd upgrade more packages (#446) 2026-07-26 13:20:24 +00:00
Dominik Ferber 1f000784e5 upgrade vite & vitest (#445) 2026-07-26 08:25:37 -04:00
Dominik Ferber 0cf1f2b201 upgrade next and postcss (#444)
* upgrade postcss

* [snippets] upgrade postcss

* upgrade next

* upgrade postcss

* upgrade pnpm-lock
2026-07-26 07:35:48 -04:00
github-actions[bot] bd33058932 Version Packages (#443)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
flags@4.2.3
2026-07-24 18:06:50 +03:00
Dominik Ferber 622d56e608 fix(flags): remove @sveltejs/kit from peer dependencies (#442)
@sveltejs/kit was declared as an optional peer with a "*" range, causing
npm to auto-install the newest @sveltejs/kit and pull in its transitive
@sveltejs/vite-plugin-svelte → vite peer chain. In non-SvelteKit projects
already on Vite 7 (via Vitest, Storybook, etc.) this produced a hard
ERESOLVE error requiring `npm install --force`.

Move @sveltejs/kit to devDependencies so the sveltekit entrypoint still
builds and type-generates in the monorepo. SvelteKit consumers always have
@sveltejs/kit installed as the framework, so flags/sveltekit continues to
resolve it from their own tree.

fixes #440
2026-07-24 17:39:25 +03:00
github-actions[bot] 3ba3c40940 Version Packages (#441)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
flags@4.2.2
2026-07-24 15:25:01 +03:00
Sebastian "Sebbie" Silbermann d23d9d2b7a Stop tracing Next.js control-flow errors as span errors (#438)
* Stop tracing Next.js control-flow errors as span errors

The `trace()` helper marked spans as errored via `span.setStatus({ code: 2, message })` for every rejection of the traced function. This included errors that Next.js uses for control flow and that the evaluation layer deliberately re-throws via `isInternalNextError`: redirects, notFound, and the rejected hanging promises of aborted prerenders (`HANGING_PROMISE_REJECTION`).

The hanging-promise case is the noisy one in practice. Whenever a runtime prefetch prerender is aborted while a flag evaluation awaits `connection()` or `cookies()` (for example through an `identify` function that reads the request), the evaluation promise rejects with the `HANGING_PROMISE_REJECTION` digest, and every affected flag span reported "During prerendering, `connection()` rejects when the prerender is complete" as its status description. On heavily prefetched routes this produces a large volume of error-annotated spans for behavior that is entirely expected.

The tracing helper now skips the error status for internal Next.js errors in both the promise rejection path and the synchronous throw path, while still ending the span and preserving span-context attributes. Control flow is unchanged: the error keeps propagating to the caller. `isInternalNextError` moves from `src/next/` to `src/lib/` so the shared tracing module can use it without depending on the Next.js entrypoint; it is a plain digest check with no Next.js imports.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* keep tracing framework agnostic (#439)

* Report ignored control-flow errors as successful spans

When `isIgnoredError` classifies an error as control flow, the traced function completed as intended, so the span now gets an explicit Ok status instead of ending with an unset status. This keeps ignored control-flow rejections (like Next.js hanging promise rejections of aborted prerenders) clearly distinguishable from both errored spans and spans that were never finalized.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Dominik Ferber <dominik.ferber@gmail.com>
2026-07-24 15:22:38 +03:00
Rich Haines f04785a0a1 Update Geistdocs to 1.14.2 (#437) 2026-07-21 13:38:34 +03:00
github-actions[bot] d7fc7e5608 Version Packages (#435)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
flags@4.2.1
2026-07-20 14:40:44 +03:00
Dominik Ferber 4d6eb10705 [flags] allow passing request when invoking flag (#434)
* accept NextRequest in flag(req)

* add changeset
2026-07-20 14:34:03 +03:00
github-actions[bot] 6de1dcdcdc Version Packages (#431)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@flags-sdk/launchdarkly@1.0.0
2026-07-10 15:13:09 +00:00