Skip to content

Commit

Permalink
add migration steps from v2 to v3 (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
dferber90 authored Jan 16, 2025
1 parent 759e4b7 commit 22510b1
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .changeset/olive-chairs-grab.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,21 @@
'@vercel/flags': minor
---

@vercel/flags/next: Export `dedupe` function
**BREAKING CHANGES**

`dedupe` is a middleware-friendly version of `React.cache`. It allows ensuring a function only ever runs once for a request.
- removed all `unstable_` prefixes, e.g. `unstable_flag` is now `flag`
- removed `getPrecomputationContext`, use `dedupe` instead (see below)
- moved all provider functions to dedicated packages
- `@vercel/flags/providers/launchdarkly``@flags-sdk/launchdarkly`
- `@vercel/flags/providers/statsig``@flags-sdk/statsig`
- `@vercel/flags/providers/split``@flags-sdk/split`
- `@vercel/flags/providers/hypertune``@flags-sdk/hypertune`
- `@vercel/flags/providers/optimizely``@flags-sdk/optimizely`
- `@vercel/flags/providers/happykit``@flags-sdk/happykit`

**@vercel/flags/next: Added a `dedupe` function**

`dedupe` is a middleware-friendly version of `React.cache`. It allows ensuring a function only ever runs once per request.

```ts
import { dedupe } from '@vercel/flags/next';
Expand Down

0 comments on commit 22510b1

Please sign in to comment.