2 of 6 standards met
Summary Adds and support to allow the server to skip streaming the initial datafile contents if it matches the bundled revision Replaces the monolithic with a Controller state machine backed by dedicated , , and I/O modules Tags all data with its origin at arrival (, , , , ), flowing into a new field (, , ) Enforces mutually exclusive streaming and polling โ never runs both simultaneously Adds a guard that rejects stale data from overwriting newer in-memory state Hardens stream reconnection: 401s now fast-fail (no waiting for timeout), a minimum 1s gap between attempts prevents server spam, and headers aid debugging Moves per-request deduplication from a global to per-instance, so multiple calls no longer share tracking state Adds requeue-on-failure to โ failed ingest events are prepended back to the queue (capped at 500) instead of silently dropped Deduplicates build-step reads: all concurrent calls during a build share a single fetch promise and emit a single usage tracking event Adds ReDoS protection (10k char limit on regex comparator inputs) and circular environment-reuse detection in evaluation Rewrites the entire test suite as black-box tests through the public API using and , removing the dependency Breaking Changes Renamed exports (old names preserved as deprecated aliases): class โ (alias kept) type โ (alias kept) interface โ (no alias โ this was the lower-level interface, not the re-exported one) Since and are still exported with annotations, consumers using those names won't break. However, was renamed to without an alias โ anyone importing from types will break. is now required on all evaluation results: Added to the type Any code that constructs or pattern-matches objects exhaustively would need updating no longer throws when all data sources fail (if is provided): On : calls without try/catch โ if read throws, the error propagates On : wraps in try/catch and returns when a default is provided This is a behavioral change โ callers that relied on catching errors from when sources are down will now silently get the default value back now reports on FLAG_NOT_FOUND: On : no call when the flag definition is missing On : calls with when exists initialization failures are swallowed: On : does โ init errors propagate On : wraps in try/catch โ init errors are swallowed, letting handle its own fallback chain Error message prefix changed: โ โ โ ControllerControllerOptionsMetrics.mode'streaming' \ 'offline'ControllerInterfaceDataSourcegetDatafile()createClientsdkKeyOrConnectionStringDataSourceControllerInterfaceclient-map.tsClientInstanceclientMapControllerInstancecontrollerInstanceMapcontroller-fns.tsdata-source/FlagNetworkDataSourceInMemoryDataSourcestream-connectioncontroller/mswfetchMockFlagNetworkDataSourceControllerFlagNetworkDataSourceOptionsControllerOptions
Repository: vercel/flags. Description: Flags SDK by Vercel Stars: 565, Forks: 66. Primary language: TypeScript. Languages: TypeScript (80.3%), MDX (18.6%), CSS (0.5%), JavaScript (0.4%), Svelte (0.1%). License: MIT. Homepage: https://flags-sdk.dev Latest release: @flags-sdk/vercel@1.0.1 (2w ago). Open PRs: 13, open issues: 11. Last activity: 8h ago. Community health: 62%. Top contributors: dferber90, github-actions[bot], dependabot[bot], AAorris, vincent-derks, luismeyer, AndyBitz, haydenbleasel, bryce-fitzsimons, vercel[bot] and others.
TypeScript
Last 12 weeks ยท 41 commits
Add operator and case-insensitive comparators Summary Adds and comparators for substring matching Adds optional case-insensitivity flag via a 4th tuple element: CI is supported for all string-based comparators (EQ, ONE_OF, STARTS_WITH, ENDS_WITH, CONTAINS, and their negations, plus the array comparators) Backwards compatibility The 4th-element approach was chosen specifically for backwards compat. Old SDKs destructure only 3 elements from the condition tuple, so is silently ignored and the condition evaluates case-sensitively (graceful degradation). New comparators like fall through to and return on old SDKs -- no crash, just a skipped rule.
I'm onboarding to use Next.js's typed routes implementation (https://nextjs.org/docs/app/api-reference/config/typescript#statically-typed-links) And all of these routes expect the true file-based route to be passed in, which unfortunately means in every route. This is pretty unfortunate because now we're hard coupling our general routing schema with whatever page happens to have an a b test on it at a given point in time. Is there any way to fix this or should we just not even bother with precompute?