Repository navigation
flags@5.0.0-standard.1
Pre-releaseMinor Changes
-
#655
c3b56fdThanks @dferber90! - Read the overrides also from the cookieflag-overrides, the cookie of the standard. The SDK still readsvercel-flag-overrides, the cookie of v4. If both are set,flag-overrideswins, and the overrides of the two cookies are not merged. -
#653
13465b9Thanks @dferber90! - Add flags modules: each export of a module whose name ends in.flags.ts(or.flags.js,.flags.tsx, …) is a flag. The newflags/manifestcreates the manifest of the flags from these modules (createManifest,validateFlagsManifest), andflags/toolinghas the functions for build plugins (isFlagsModuleName,findFlagsModules,createFlagsModulesIndex,watchFlagsModules,writeManifestFromBuild). The plugins find the flags modules by their name, and skipnode_modules, the output of builds, hidden directories and symbolic links. Two files of one flags module in one directory, e.g.shop.flags.tsandshop.flags, fail the build. -
#654
af54755Thanks @dferber90! - Add the runtime of the SDK, one for all frameworks.runtime.onInvoke(request, next)of the newflags/runtimegives the flags of a request its state, for frameworks with a middleware which wraps the handler. A flag gets its request from the call, then fromruntime.onInvoke, then from the framework binding. Each request has one state: the cache of the flag values, the argument ofidentify, the overrides, and the cache ofdedupe. The typesFlagsRequestandFlagsRequestInitdescribe the request.