Skip to content

Version Packages - #542

Merged
vincent-derks merged 1 commit into
mainfrom
changeset-release/main
Oct 9, 2026
Merged

vincent-derks merged 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@vercel/prepare-flags-definitions@0.6.0

Minor Changes

  • #540 1a38dee Thanks @vincent-derks! - Embed definitions for every project connected to the deployment's project. Remove the internal flags:projectId= environment option introduced in 0.5.0.

Patch Changes

  • #511 3f925dc Thanks @luismeyer! - Record fetchedAt when a datafile fetch completes and preserve it in generated flag definitions. Loading the bundle retains the original timestamp so the Flags SDK can determine its age.

    Expose optional fetchedAt metadata on datafiles. Record it for accepted live updates and preserve valid timestamps when loading provided or bundled definitions, without mutating the input.

@vercel/flags-core@1.10.0

Minor Changes

  • #511 3f925dc Thanks @luismeyer! - Add a header-driven vercel client mode, enabled by default when VERCEL=1. Initialization loads provided/bundled definitions. At module scope it starts no network activity, and an empty cache fetches on its first read. Inside a request, initialize() prepares the cache like the first evaluation would (confirm a matching version, fetch a newer one or an empty cache, or start streaming/polling for a missing entry), and repeated calls in later requests repeat that preparation. Request versions trigger refreshes. Explicit offline/build behavior is preserved.

    Evaluations require a valid positive version header for their own project. Missing, empty, malformed, or unrelated project entries permanently start streaming when enabled, otherwise polling; multiple clients select their sources independently. Concurrent reads share startup and pending HTTP refreshes. Accepted stream updates and valid confirmations cancel superseded refreshes; waiting reads use the confirmed cache, and late responses cannot change cache or authorization state. A cold shared fetch discovers project identity before accepting header evidence; a failed cold fetch rejects without switching sources and is retried by the next read. getDatafile() remains a snapshot that never starts streaming or polling: it serves cached definitions through the same header checks, stale-while-revalidate, blocking refresh, and stale-if-error, and loads bundled definitions or performs a one-time fetch when the cache is empty.

    Cached definitions now age in streaming and polling mode. Streaming data is fresh for 60 seconds after the last message; polling data is fresh for its interval plus the 10-second fetch deadline (40 seconds by default). Polling data then stays stale for staleWhileRevalidate seconds (default 10) while reads refresh over HTTP in the background, and expired reads wait for the shared fetch. While streaming, reads never wait and no HTTP request competes with the connection: older data is served immediately and reported as stale while the stream's ping watchdog reconnects in the background, including right after a suspended runtime resumes. Data without a known age is served until its source first confirms it. Accepted updates, source responses, valid confirmations, and stream pings reset age without rewriting fetchedAt.

    Streaming and polling never run at the same time. A stream startup timeout or disconnect keeps the stream reconnecting in the background while reads serve the cache; polling starts only once the stream gives up for good (retries exhausted, 401, or token failure), waiting for its first poll up to polling.initTimeoutMs. Ping timeouts reconnect the stream internally, allowing suspended runtimes to resume. Polling gives up on a 401 too. Whenever no live source is active, because the stream is reconnecting or the stream or polling gave up, reads apply plain stale-while-revalidate over HTTP: fresh within staleWhileRevalidate, served while refreshing in the background beyond that, and waiting for the refresh once older than staleWhileRevalidate plus staleIfError; data of unknown age refreshes in the background. Shutting down and reinitializing a client rewires its sources and starts with a clean cache and failure deadline.

    Use staleWhileRevalidate (default 10) and staleIfError (default Infinity) in seconds, including fractions. Setting either to 0 disables its stale allowance. Datafiles preserve optional fetchedAt epoch-millisecond timestamps across serialization and bundled/provided reuse.

  • #540 1a38dee Thanks @vincent-derks! - Remove the internal projectId connection string option introduced in 1.9.0. SDK keys and sdkKey= connection strings are unchanged.

  • #510 571141d Thanks @luismeyer! - Add staleIfError in seconds to bound cached runtime reads after the first consecutive stream/poll failure or stream disconnect. The default Infinity preserves unlimited fallback; finite nonnegative durations (including fractional seconds) use existing evaluation defaults and errors after expiry, and getDatafile() follows the same allowance. Any successful source response resets the allowance, including one the version guard rejects as older or for a different project, as does a matching stream primed revision. Storing provided or bundled fallback data does not confirm freshness or renew the failure clock. Build/offline behavior and source scheduling remain unchanged.

Patch Changes

  • #518 941e71d Thanks @luismeyer! - Add detailed client lifecycle, cache freshness, and network diagnostics using the DEBUG=@vercel/flags-core environment variable. DEBUG now follows the usual conventions for both the diagnostics and the ingest debug header: comma- or space-separated patterns, * wildcards, and - exclusions. A shared global logger emits events without passing logger instances through the client. Every client diagnostic includes the configured clientName, including cache, source, and background network activity. Logs omit credentials, definitions, and raw errors.

    State changes include their cause; refresh logs distinguish response receipt, cache application, shared work, stream confirmation, and shutdown cancellation. Startup and source logs expose timeout and freshness thresholds, and recovery is logged only when a failure clears.

  • #511 3f925dc Thanks @luismeyer! - Record fetchedAt when a datafile fetch completes and preserve it in generated flag definitions. Loading the bundle retains the original timestamp so the Flags SDK can determine its age.

    Expose optional fetchedAt metadata on datafiles. Record it for accepted live updates and preserve valid timestamps when loading provided or bundled definitions, without mutating the input.

@flags-sdk/reflag@1.0.3

Patch Changes

  • #543 afcfecb Thanks @dferber90! - Include a Reflag dashboard link in adapter and discovery metadata. Omit missing provider descriptions so merging discovery data preserves descriptions declared in code.

@flags-sdk/vercel@1.5.1

Patch Changes

@vercel

vercel Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
flags-playground Ready Ready Preview, v0 Oct 9, 2026 1:12pm UTC
flags-sdk-dev Ready Ready Preview, v0 Oct 9, 2026 1:12pm UTC
flags-sdk-flagsmith Ready Ready Preview, v0 Oct 9, 2026 1:12pm UTC
flags-sdk-growthbook Ready Ready Preview, v0 Oct 9, 2026 1:12pm UTC
flags-sdk-launchdarkly Ready Ready Preview, v0 Oct 9, 2026 1:12pm UTC
flags-sdk-openfeature Ready Ready Preview, v0 Oct 9, 2026 1:12pm UTC
flags-sdk-posthog Ready Ready Preview, v0 Oct 9, 2026 1:12pm UTC
flags-sdk-reflag Ready Ready Preview, v0 Oct 9, 2026 1:12pm UTC
flags-sdk-snippets Ready Ready Preview, v0 Oct 9, 2026 1:12pm UTC
flags-sdk-statsig Ready Ready Preview, v0 Oct 9, 2026 1:12pm UTC
flags-sdk-sveltekit-snippets Ready Ready Preview, v0 Oct 9, 2026 1:12pm UTC
shirt-shop Ready Ready Preview, v0 Oct 9, 2026 1:12pm UTC
shirt-shop-api Ready Ready Preview, v0 Oct 9, 2026 1:12pm UTC

@github-actions
github-actions Bot force-pushed the changeset-release/main branch from ecb6600 to 27581f2 Compare October 2, 2026 17:34
@github-actions
github-actions Bot force-pushed the changeset-release/main branch from 27581f2 to 6972dda Compare October 6, 2026 15:32
@github-actions
github-actions Bot force-pushed the changeset-release/main branch from bc56e04 to a12e486 Compare October 8, 2026 13:01
@github-actions
github-actions Bot force-pushed the changeset-release/main branch from a12e486 to d642eae Compare October 8, 2026 18:15

This branch was successfully deployed

14 active deployments
Preview – flags-sdk-dev — 0c784b24 Deployed Oct 9, 2026 by vercel[bot]
Preview – flags-sdk-launchdarkly — 0c784b24 Deployed Oct 9, 2026 by vercel[bot]
Preview – flags-playground — 0c784b24 Deployed Oct 9, 2026 by vercel[bot]
Preview – flags-sdk-snippets — 0c784b24 Deployed Oct 9, 2026 by vercel[bot]
Preview – flags-sdk-growthbook — 0c784b24 Deployed Oct 9, 2026 by vercel[bot]
Preview – flags-sdk-vercel — 0c784b24 Deployed Oct 9, 2026 by vercel[bot]
Preview – flags-sdk-posthog — 0c784b24 Deployed Oct 9, 2026 by vercel[bot]
Preview – flags-sdk-statsig — 0c784b24 Deployed Oct 9, 2026 by vercel[bot]
Preview – flags-sdk-sveltekit-snippets — 0c784b24 Deployed Oct 9, 2026 by vercel[bot]
Preview – flags-sdk-flagsmith — 0c784b24 Deployed Oct 9, 2026 by vercel[bot]
Preview – flags-sdk-openfeature — 0c784b24 Deployed Oct 9, 2026 by vercel[bot]
Preview – flags-sdk-reflag — 0c784b24 Deployed Oct 9, 2026 by vercel[bot]
Preview – shirt-shop-api — 0c784b24 Deployed Oct 9, 2026 by vercel[bot]
Preview – shirt-shop — 0c784b24 Deployed Oct 9, 2026 by vercel[bot]
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.

1 participant