unstale

npm / flags

flags

What changed in flags 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

2 breaking1 deprecations2 new APIs and options3 performance5 behavior and defaults5 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.1.1 on npm

flags 418 changes

Breaking changes 2

  • The Edge Config adapter package is renamed to @flags-sdk/global-config.

    4.3.0release notes

  • Declaring a feature flag without a decide function, or with an adapter missing one, now throws an error at declaration time.

    4.0.3release notes

Deprecations 1

  • Previous Edge Config names remain available as deprecated aliases.

    4.3.0release notes

New APIs and options 2

  • Adds an adapter hook for observing values set by the Flags SDK override cookie. It is not supported for general use unless Vercel has explicitly enabled it.

    4.3.1release notes

  • Adapters can opt into bulk evaluation by implementing bulkDecide and setting a stable adapterId; flags with matching adapterId and identify source are evaluated together.

    4.1.0release notes

Performance 3

  • evaluate() and precompute() defer bulk evaluation to capable adapters, falling back to per-flag evaluation otherwise; shared request reads are reused.

    4.1.0release notes

  • Reduces microtask queue overhead by replacing the async IIFE around decide() with a direct call and Promise.resolve().

    4.0.6release notes

  • Caches the resolved next/headers module locally so only the first call awaits the dynamic import, reducing overhead in flag evaluation.

    4.0.6release notes

Behavior and default changes 5

  • Global Config environment variables replace the Edge Config names; previous environment variables remain honored as fallbacks.

    4.3.0release notes

  • The flags discovery endpoint returns cache-control: no-store.

    4.2.4release notes

  • Accepts a NextRequest or Web Request directly outside App Router, including in routing middleware, instead of requiring a Pages Router IncomingMessage or manually flattened headers.

    4.2.1release notes

  • Accepts a NextRequest or Web Request directly outside App Router, including in routing middleware, instead of requiring a Pages Router IncomingMessage or manually flattened headers.

    4.2.1release notes

  • Tracing emits an evaluate span with flagCount and one batch span per bulk-evaluated adapter group instead of individual per-flag run spans.

    4.1.0release notes

Fixes and other changes 5

  • Removed @sveltejs/kit from peer dependencies to prevent npm from auto-installing it and causing Vite peer dependency conflicts in non-SvelteKit projects.

    4.2.3release notes

  • Next.js control-flow errors are re-thrown without marking flag evaluation spans as errored; genuine evaluation failures still mark spans as errored.

    4.2.2release notes

  • Recognizes hanging promise rejection as an internal Next.js error.

    4.1.1release notes

  • Guards internal flag hooks when Vercel does not expose the expected runtime helpers during evaluation.

    4.0.5release notes

  • When an app goes from precomputing flags to precomputing none, the SDK serializes __no_flags__ so the app still rewrites and prerenders the page.

    4.0.4release notes