@vercel/flags-core 0.1.8 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @vercel/flags-core
2
2
 
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - c71729b: See http://vercel.com/docs/flags/vercel-flags for more information.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [795dfd4]
12
+ - flags@4.0.3
13
+
3
14
  ## 0.1.8
4
15
 
5
16
  ### Patch Changes
package/README.md CHANGED
@@ -1 +1,41 @@
1
1
  # `@vercel/flags-core`
2
+
3
+ The core evaluation engine for [Vercel Flags](https://vercel.com/docs/flags/vercel-flags), the feature flag platform built into Vercel. This package provides direct access to the flag evaluation client, data fetching, and an [OpenFeature](https://openfeature.dev/) provider.
4
+
5
+ For Next.js and SvelteKit applications, use the [Flags SDK](https://flags-sdk.dev/) with [`@flags-sdk/vercel`](https://flags-sdk.dev/providers/vercel) provider instead. Use `@vercel/flags-core` when you need lower-level control, are working with an unsupported framework, or want to use the OpenFeature standard.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm i @vercel/flags-core
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```ts
16
+ import { createClient } from '@vercel/flags-core';
17
+
18
+ const client = createClient(process.env.FLAGS!);
19
+
20
+ const result = await client.evaluate<boolean>('show-new-feature', false, {
21
+ user: { id: 'user-123' },
22
+ });
23
+ ```
24
+
25
+ ## OpenFeature
26
+
27
+ An OpenFeature-compatible provider is available at `@vercel/flags-core/openfeature`:
28
+
29
+ ```ts
30
+ import { OpenFeature } from '@openfeature/server-sdk';
31
+ import { VercelProvider } from '@vercel/flags-core/openfeature';
32
+
33
+ await OpenFeature.setProviderAndWait(new VercelProvider());
34
+ const client = OpenFeature.getClient();
35
+ ```
36
+
37
+ ## Documentation
38
+
39
+ - [Core Library Docs](https://vercel.com/docs/flags/vercel-flags/sdks/core)
40
+ - [OpenFeature Provider Docs](https://vercel.com/docs/flags/vercel-flags/sdks/openfeature)
41
+ - [Vercel Flags](https://vercel.com/docs/flags/vercel-flags)