Skip to content

flags@5.0.0-standard.1

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 02 Dec 15:46
· 22 commits to main since this release
d078f73

Minor Changes

  • #655 c3b56fd Thanks @dferber90! - Read the overrides also from the cookie flag-overrides, the cookie of the standard. The SDK still reads vercel-flag-overrides, the cookie of v4. If both are set, flag-overrides wins, and the overrides of the two cookies are not merged.

  • #653 13465b9 Thanks @dferber90! - Add flags modules: each export of a module whose name ends in .flags.ts (or .flags.js, .flags.tsx, …) is a flag. The new flags/manifest creates the manifest of the flags from these modules (createManifest, validateFlagsManifest), and flags/tooling has the functions for build plugins (isFlagsModuleName, findFlagsModules, createFlagsModulesIndex, watchFlagsModules, writeManifestFromBuild). The plugins find the flags modules by their name, and skip node_modules, the output of builds, hidden directories and symbolic links. Two files of one flags module in one directory, e.g. shop.flags.ts and shop.flags, fail the build.

  • #654 af54755 Thanks @dferber90! - Add the runtime of the SDK, one for all frameworks. runtime.onInvoke(request, next) of the new flags/runtime gives 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 from runtime.onInvoke, then from the framework binding. Each request has one state: the cache of the flag values, the argument of identify, the overrides, and the cache of dedupe. The types FlagsRequest and FlagsRequestInit describe the request.