Repository navigation
Version Packages - #542
Merged
Merged
Version Packages#542
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
github-actions
Bot
force-pushed
the
changeset-release/main
branch
from
October 2, 2026 17:34
ecb6600 to
27581f2
Compare
github-actions
Bot
force-pushed
the
changeset-release/main
branch
from
October 6, 2026 15:32
27581f2 to
6972dda
Compare
github-actions
Bot
force-pushed
the
changeset-release/main
branch
from
October 8, 2026 13:01
bc56e04 to
a12e486
Compare
github-actions
Bot
force-pushed
the
changeset-release/main
branch
from
October 8, 2026 18:15
a12e486 to
d642eae
Compare
vincent-derks
approved these changes
Oct 9, 2026
This branch was successfully deployed
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.
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
1a38deeThanks @vincent-derks! - Embed definitions for every project connected to the deployment's project. Remove the internalflags:projectId=environment option introduced in 0.5.0.Patch Changes
#511
3f925dcThanks @luismeyer! - RecordfetchedAtwhen 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
fetchedAtmetadata 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
3f925dcThanks @luismeyer! - Add a header-drivenvercelclient mode, enabled by default whenVERCEL=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
staleWhileRevalidateseconds (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 rewritingfetchedAt.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 withinstaleWhileRevalidate, served while refreshing in the background beyond that, and waiting for the refresh once older thanstaleWhileRevalidateplusstaleIfError; 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) andstaleIfError(default Infinity) in seconds, including fractions. Setting either to0disables its stale allowance. Datafiles preserve optionalfetchedAtepoch-millisecond timestamps across serialization and bundled/provided reuse.#540
1a38deeThanks @vincent-derks! - Remove the internalprojectIdconnection string option introduced in 1.9.0. SDK keys andsdkKey=connection strings are unchanged.#510
571141dThanks @luismeyer! - AddstaleIfErrorin seconds to bound cached runtime reads after the first consecutive stream/poll failure or stream disconnect. The defaultInfinitypreserves unlimited fallback; finite nonnegative durations (including fractional seconds) use existing evaluation defaults and errors after expiry, andgetDatafile()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
941e71dThanks @luismeyer! - Add detailed client lifecycle, cache freshness, and network diagnostics using theDEBUG=@vercel/flags-coreenvironment variable.DEBUGnow 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 configuredclientName, 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
3f925dcThanks @luismeyer! - RecordfetchedAtwhen 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
fetchedAtmetadata 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
afcfecbThanks @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
941e71d,3f925dc,3f925dc,1a38dee,571141d]: