[ CONVEX COMPONENT · STABLE · MIT ]
@vllnt/convex-flags
Feature flags — variants, targeting, percentage rollouts, and per-subject overrides, evaluated on the backend and streamed live to clients
STABLE 0.1.0 · 3 GitHub stars
Package details
Install
The untagged install gets the latest stable version (0.1.0). The canary tag tracks main (0.1.1-canary.c79227c).
pnpm add @vllnt/convex-flags
pnpm add @vllnt/convex-flags@canaryRegister the component
Add it to your app’s convex/convex.config.ts, then run npx convex dev to generate the references.
import { defineApp } from "convex/server";
import flags from "@vllnt/convex-flags/convex.config";
const app = defineApp();
app.use(flags);
export default app;Use it
Usage, options and examples are in the package README.
Downloads
- Last 7 days
- 627
- Since first publish
- 15,101
Downloads per week since 14 June 2026, oldest on the left. Weeks count back from 23 November 2026, so the first one may be shorter than seven days.
627 downloads in the last 7 days. 15,101 downloads since 14 June 2026. Source: npm, counted through 23 November 2026.
Show downloads per week as a table
| Week | Downloads |
|---|---|
| 14 June 2026 to 15 June 2026 | 250 |
| 16 June 2026 to 22 June 2026 | 673 |
| 23 June 2026 to 29 June 2026 | 608 |
| 30 June 2026 to 6 July 2026 | 643 |
| 7 July 2026 to 13 July 2026 | 519 |
| 14 July 2026 to 20 July 2026 | 300 |
| 21 July 2026 to 27 July 2026 | 172 |
| 28 July 2026 to 3 August 2026 | 220 |
| 4 August 2026 to 10 August 2026 | 452 |
| 11 August 2026 to 17 August 2026 | 490 |
| 18 August 2026 to 24 August 2026 | 74 |
| 25 August 2026 to 31 August 2026 | 1,043 |
| 1 September 2026 to 7 September 2026 | 816 |
| 8 September 2026 to 14 September 2026 | 2,380 |
| 15 September 2026 to 21 September 2026 | 757 |
| 22 September 2026 to 28 September 2026 | 613 |
| 29 September 2026 to 5 October 2026 | 536 |
| 6 October 2026 to 12 October 2026 | 659 |
| 13 October 2026 to 19 October 2026 | 420 |
| 20 October 2026 to 26 October 2026 | 427 |
| 27 October 2026 to 2 November 2026 | 1,196 |
| 3 November 2026 to 9 November 2026 | 788 |
| 10 November 2026 to 16 November 2026 | 438 |
| 17 November 2026 to 23 November 2026 | 627 |
Release history
Every release on a timeline, oldest on the left. A tall mark with its version is a stable release; a short mark is a canary build. The time axis is the one of the downloads chart, so a release stands above the week it shipped in.
1 stable release and 11 canary builds since 14 June 2026. Latest stable: 0.1.0 on 1 September 2026.
Show every release as a table
| Version | Kind | Published |
|---|---|---|
| 0.1.1-canary.c79227c | canary | 31 October 2026 |
| 0.1.0 | stable | 1 September 2026 |
| 0.1.0-canary.6315125 | canary | 31 August 2026 |
| 0.1.0-canary.2b5f2dc | canary | 31 August 2026 |
| 0.1.0-canary.e349be6 | canary | 31 August 2026 |
| 0.1.0-canary.48e5b8e | canary | 9 July 2026 |
| 0.1.0-canary.0e432b5 | canary | 17 June 2026 |
| 0.1.0-canary.b0335f7 | canary | 16 June 2026 |
| 0.1.0-canary.bf53746 | canary | 16 June 2026 |
| 0.1.0-canary.9d01801 | canary | 16 June 2026 |
| 0.1.0-canary.b9ab77f | canary | 14 June 2026 |
| 0.1.0-canary.a2bb74e | canary | 14 June 2026 |
Changelog
The newest stable releases of @vllnt/convex-flags, with the notes from its changelog.
0.1.0
Added
-
First release of
@vllnt/convex-flags— feature flags as a sandboxed Convex component, evaluated on the backend and streamed to clients over Convex's reactive queries. -
Flagsclient class:define,enable,disable,remove,get,list,evaluate,isEnabled, andall. -
Sandboxed
flagstable keyed by an opaque, host-chosen flag key (by_keyindex). -
example/convex/host-app harness with 100% end-to-end coverage viaconvex-test. -
Multivariate variants — a flag value is now a typed primitive (
boolean | string | number);defineacceptsvariantsmetadata. Addedvariant(ctx, key, options?)returning just the value. -
Attribute targeting —
defineaccepts orderedrules({ conditions, value | rollout }) with operatorseq,neq,in,nin,contains,gt,gte,lt,lte. First matching rule wins; conditions within a rule AND together; an empty condition list is a catch-all. -
Percentage rollouts —
defineaccepts arolloutof weightedsplits, bucketed deterministically (FNV-1a) bycontext.subjectRefor a namedbyattribute, so a subject always resolves to the same value. -
Evaluation context —
evaluate/isEnabled/all/varianttake an optional host-suppliedEvalContext({ subjectRef?, attributes? });evaluatetakes an optionaldefaultfor unknown keys. -
Per-subject overrides —
setOverride(key, subjectRef, value)/clearOverride(key, subjectRef); an override wins over targeting inevaluateandall. -
Lifecycle —
archive(key)(reversible; serves the base value with reasondisabled) andrestore(key), distinct fromremove(which now also deletes a flag's overrides). -
React — optional
@vllnt/convex-flags/reactentry exportinguseFlag/useFlags;reactis an optional peer dependency. -
New evaluation reason codes:
rule,rollout,override,disabled,default(alongsideflag,unknown). -
Partial update —
update(ctx, key, patch)patches only the supplied fields, leaving the rest untouched (the opposite ofdefine, which fully replaces a definition).
Changed
- Treat Convex
_generatedoutput as CLI-owned, exclude it from formatting, and expose a dedicated codegen script. - Refresh all direct dependencies to their latest compatible releases for canary validation.
- Require
convex@^1.45.0and updateconvex-testto^0.0.56. - Docs polish — refreshed the package tagline; the README Usage section now shows a complete
convex/flags.tshost module (theevaluate/allqueries the React hooks consume, plus gated management wrappers); documenteddefine(full replace) vsupdate(partial) and thatenable/disableare boolean convenience.
Fixed
- Backward-compatible
status— the storedflags.statuscolumn is now optional, so a deployment holding flag rows written beforestatusexisted no longer fails schema validation on the nextconvex deploy(Object is missing the required field status). Reads materialize an absent status as"active"—get/listreturn a concretestatusand evaluation treats a legacy flag as active — so the publicFlagDocshape is unchanged.definestill writesstatus: "active"for new flags;restore(key)stamps it onto legacy rows in storage. (#5)
Notes
- Backward compatible: the boolean kill-switch API (
define({ key, value }),enable/disable,isEnabled(key),evaluate(key),get/list/all/remove) is unchanged. - Deferred: named reusable segments, JSON-object variant values, scheduled/progressive rollouts,
stale-flag detection, and audit-event emission — see
ROADMAP.md.
-
Licence
Released under the MIT licence. The full text is in the source repository.
[ PACKAGE ]
- Stable
- 0.1.0
- Canary
- 0.1.1-canary.c79227c
- GitHub stars
- 3 GitHub stars
- Licence
- MIT
- Issues
- Open an issue