Skip to content

Add bulk evaluation#385

Open
dferber90 wants to merge 45 commits into
mainfrom
bulk
Open

Add bulk evaluation#385
dferber90 wants to merge 45 commits into
mainfrom
bulk

Conversation

@dferber90
Copy link
Copy Markdown
Collaborator

@dferber90 dferber90 commented May 19, 2026

Summary

Optimizes bulk evaluation when using precompute and evaluate from flags/next, and adds dedicated functions to the underlying adapter and core support that makes it fast.

flags/next

import { evaluate } from 'flags/next';
import { flagA, flagB } from '../flags';

// pass a list of flags
const [valueA, valueB] = await evaluate([flagA, flagB]);

// pass an object
const { a, b } = await bulk({ a: flagA, b: flagB });

@vercel/flags-core

Adds new bulkEvaluate method:

const results = await flagsClient.bulkEvaluate<ValueType, EntitiesType>(
  [
    { key: "flag-a", defaultValue: false },
    { key: "flag-b", defaultValue: false },
  ],
  entities,
);

@flags-sdk/vercel

Implements bulkDecide using bulkEvaluate, so using the Flags SDK with Vercel Flags supports bulk evaluations as shown in the flags/next snippet above.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flags-playground Ready Ready Preview, Comment, Open in v0 Jun 3, 2026 1:48pm
flags-sdk-dev Ready Ready Preview, Comment, Open in v0 Jun 3, 2026 1:48pm
flags-sdk-next-15 Ready Ready Preview, Comment, Open in v0 Jun 3, 2026 1:48pm
flags-sdk-next-16 Ready Ready Preview, Comment, Open in v0 Jun 3, 2026 1:48pm
flags-sdk-snippets Ready Ready Preview, Comment, Open in v0 Jun 3, 2026 1:48pm
flags-sdk-sveltekit-snippets Ready Ready Preview, Comment, Open in v0 Jun 3, 2026 1:48pm
shirt-shop Ready Ready Preview, Comment, Open in v0 Jun 3, 2026 1:48pm
shirt-shop-api Ready Ready Preview, Comment, Open in v0 Jun 3, 2026 1:48pm

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Jun 3, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​changesets/​changelog-github@​0.7.01001006895100
Addednpm/​react@​19.3.0-canary-f4e0d4ed-202604291001008496100
Addednpm/​@​vercel/​oidc@​3.5.01001008497100
Addednpm/​@​changesets/​cli@​2.31.09710010095100

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants