Skip to content

[ 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).

terminal
pnpm add @vllnt/convex-flags
pnpm add @vllnt/convex-flags@canary

Register the component

Add it to your app’s convex/convex.config.ts, then run npx convex dev to generate the references.

convex/convex.config.ts
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.

Read the 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
WeekDownloads
14 June 2026 to 15 June 2026250
16 June 2026 to 22 June 2026673
23 June 2026 to 29 June 2026608
30 June 2026 to 6 July 2026643
7 July 2026 to 13 July 2026519
14 July 2026 to 20 July 2026300
21 July 2026 to 27 July 2026172
28 July 2026 to 3 August 2026220
4 August 2026 to 10 August 2026452
11 August 2026 to 17 August 2026490
18 August 2026 to 24 August 202674
25 August 2026 to 31 August 20261,043
1 September 2026 to 7 September 2026816
8 September 2026 to 14 September 20262,380
15 September 2026 to 21 September 2026757
22 September 2026 to 28 September 2026613
29 September 2026 to 5 October 2026536
6 October 2026 to 12 October 2026659
13 October 2026 to 19 October 2026420
20 October 2026 to 26 October 2026427
27 October 2026 to 2 November 20261,196
3 November 2026 to 9 November 2026788
10 November 2026 to 16 November 2026438
17 November 2026 to 23 November 2026627

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
VersionKindPublished
0.1.1-canary.c79227ccanary31 October 2026
0.1.0stable1 September 2026
0.1.0-canary.6315125canary31 August 2026
0.1.0-canary.2b5f2dccanary31 August 2026
0.1.0-canary.e349be6canary31 August 2026
0.1.0-canary.48e5b8ecanary9 July 2026
0.1.0-canary.0e432b5canary17 June 2026
0.1.0-canary.b0335f7canary16 June 2026
0.1.0-canary.bf53746canary16 June 2026
0.1.0-canary.9d01801canary16 June 2026
0.1.0-canary.b9ab77fcanary14 June 2026
0.1.0-canary.a2bb74ecanary14 June 2026

Changelog

The newest stable releases of @vllnt/convex-flags, with the notes from its changelog.

  1. 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.

    • Flags client class: define, enable, disable, remove, get, list, evaluate, isEnabled, and all.

    • Sandboxed flags table keyed by an opaque, host-chosen flag key (by_key index).

    • example/convex/ host-app harness with 100% end-to-end coverage via convex-test.

    • Multivariate variants — a flag value is now a typed primitive (boolean | string | number); define accepts variants metadata. Added variant(ctx, key, options?) returning just the value.

    • Attribute targeting — define accepts ordered rules ({ conditions, value | rollout }) with operators eq, 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 — define accepts a rollout of weighted splits, bucketed deterministically (FNV-1a) by context.subjectRef or a named by attribute, so a subject always resolves to the same value.

    • Evaluation context — evaluate / isEnabled / all / variant take an optional host-supplied EvalContext ({ subjectRef?, attributes? }); evaluate takes an optional default for unknown keys.

    • Per-subject overrides — setOverride(key, subjectRef, value) / clearOverride(key, subjectRef); an override wins over targeting in evaluate and all.

    • Lifecycle — archive(key) (reversible; serves the base value with reason disabled) and restore(key), distinct from remove (which now also deletes a flag's overrides).

    • React — optional @vllnt/convex-flags/react entry exporting useFlag / useFlags; react is an optional peer dependency.

    • New evaluation reason codes: rule, rollout, override, disabled, default (alongside flag, unknown).

    • Partial update — update(ctx, key, patch) patches only the supplied fields, leaving the rest untouched (the opposite of define, which fully replaces a definition).

    Changed
    • Treat Convex _generated output 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.0 and update convex-test to ^0.0.56.
    • Docs polish — refreshed the package tagline; the README Usage section now shows a complete convex/flags.ts host module (the evaluate/all queries the React hooks consume, plus gated management wrappers); documented define (full replace) vs update (partial) and that enable/disable are boolean convenience.
    Fixed
    • Backward-compatible status — the stored flags.status column is now optional, so a deployment holding flag rows written before status existed no longer fails schema validation on the next convex deploy (Object is missing the required field status). Reads materialize an absent status as "active" — get/list return a concrete status and evaluation treats a legacy flag as active — so the public FlagDoc shape is unchanged. define still writes status: "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.
All releases of @vllnt/convex-flags
Stable releases
RSSAtomJSON Feed
Canary builds
RSSAtomJSON Feed

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

Theme