@flagwire/evaluate 0.1.0 → 0.2.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.
Files changed (2) hide show
  1. package/README.md +26 -4
  2. package/package.json +11 -2
package/README.md CHANGED
@@ -1,11 +1,33 @@
1
1
  # `@flagwire/evaluate`
2
2
 
3
- Deterministic local evaluation engine shared by FlagWire's server SDKs. The package includes the
4
- append-only compatibility vectors used to keep language implementations behaviorally identical.
3
+ Deterministic local evaluation engine used by FlagWire server SDKs. It includes the compatibility
4
+ fixtures that keep implementations in different languages behaviorally identical.
5
+
6
+ ## Install
7
+
8
+ ```sh
9
+ pnpm add @flagwire/evaluate
10
+ ```
11
+
12
+ ## Usage
5
13
 
6
14
  ```ts
7
15
  import { evaluateFlag } from "@flagwire/evaluate";
16
+
17
+ const detail = evaluateFlag(
18
+ bundle,
19
+ "checkout-redesign",
20
+ { key: "user-123", attributes: { region: "eu-west" } },
21
+ false,
22
+ );
8
23
  ```
9
24
 
10
- Existing vector files are immutable compatibility history. Add a new vector file for every new
11
- edge case.
25
+ The package exports deterministic hashing, bucket calculation, single-flag evaluation, bundle
26
+ evaluation, and their TypeScript types. Inputs use the contracts from `@flagwire/schema`.
27
+
28
+ ## Compatibility vectors
29
+
30
+ Published vectors are immutable protocol history and are available through the
31
+ `@flagwire/evaluate/vectors/*` export. When behavior is extended, add a new vector file instead of
32
+ editing an existing one. This lets every SDK implementation verify the same edge cases without
33
+ depending on implementation details.
package/package.json CHANGED
@@ -1,8 +1,17 @@
1
1
  {
2
2
  "name": "@flagwire/evaluate",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Deterministic local evaluation engine for FlagWire",
5
+ "keywords": [
6
+ "feature-flags",
7
+ "evaluation",
8
+ "typescript"
9
+ ],
5
10
  "license": "MIT",
11
+ "homepage": "https://github.com/flagwire/flagwire-js/tree/main/packages/evaluate#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/flagwire/flagwire-js/issues"
14
+ },
6
15
  "type": "module",
7
16
  "files": [
8
17
  "dist",
@@ -28,7 +37,7 @@
28
37
  "provenance": true
29
38
  },
30
39
  "dependencies": {
31
- "@flagwire/schema": "0.1.0"
40
+ "@flagwire/schema": "0.2.0"
32
41
  },
33
42
  "devDependencies": {
34
43
  "esbuild": "0.28.2"