@featurevisor/sdk 2.10.0 → 2.12.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
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.12.0](https://github.com/featurevisor/featurevisor/compare/v2.11.0...v2.12.0) (2026-02-21)
7
+
8
+
9
+ ### Features
10
+
11
+ * reusable schemas ([#390](https://github.com/featurevisor/featurevisor/issues/390)) ([fa32095](https://github.com/featurevisor/featurevisor/commit/fa3209554c08bdc2c7cc3dd8af8f8fc51213e7be))
12
+
13
+
14
+
15
+
16
+
6
17
  # [2.10.0](https://github.com/featurevisor/featurevisor/compare/v2.9.0...v2.10.0) (2026-02-15)
7
18
 
8
19
 
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1771194420537" clover="3.2.0">
3
- <project timestamp="1771194420537" name="All files">
2
+ <coverage generated="1771702382738" clover="3.2.0">
3
+ <project timestamp="1771702382738" name="All files">
4
4
  <metrics statements="693" coveredstatements="633" conditionals="458" coveredconditionals="391" methods="116" coveredmethods="105" elements="1267" coveredelements="1129" complexity="0" loc="693" ncloc="693" packages="1" files="11" classes="11"/>
5
5
  <file name="bucketer.ts" path="/home/runner/work/featurevisor/featurevisor/packages/sdk/src/bucketer.ts">
6
6
  <metrics statements="34" coveredstatements="32" conditionals="14" coveredconditionals="13" methods="3" coveredmethods="3"/>
@@ -331,7 +331,7 @@ export function getBucketKey(options: GetBucketKeyOptions): BucketKey {
331
331
  <div class='footer quiet pad2 space-top1 center small'>
332
332
  Code coverage generated by
333
333
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
334
- at 2026-02-15T22:27:00.520Z
334
+ at 2026-02-21T19:33:02.722Z
335
335
  </div>
336
336
  <script src="prettify.js"></script>
337
337
  <script>
@@ -925,7 +925,7 @@ export class FeaturevisorChildInstance {
925
925
  <div class='footer quiet pad2 space-top1 center small'>
926
926
  Code coverage generated by
927
927
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
928
- at 2026-02-15T22:27:00.520Z
928
+ at 2026-02-21T19:33:02.722Z
929
929
  </div>
930
930
  <script src="prettify.js"></script>
931
931
  <script>
@@ -400,7 +400,7 @@ export function conditionIsMatched(
400
400
  <div class='footer quiet pad2 space-top1 center small'>
401
401
  Code coverage generated by
402
402
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
403
- at 2026-02-15T22:27:00.520Z
403
+ at 2026-02-21T19:33:02.722Z
404
404
  </div>
405
405
  <script src="prettify.js"></script>
406
406
  <script>
@@ -1048,7 +1048,7 @@ export class DatafileReader {
1048
1048
  <div class='footer quiet pad2 space-top1 center small'>
1049
1049
  Code coverage generated by
1050
1050
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
1051
- at 2026-02-15T22:27:00.520Z
1051
+ at 2026-02-21T19:33:02.722Z
1052
1052
  </div>
1053
1053
  <script src="prettify.js"></script>
1054
1054
  <script>
@@ -247,7 +247,7 @@ export class Emitter {
247
247
  <div class='footer quiet pad2 space-top1 center small'>
248
248
  Code coverage generated by
249
249
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
250
- at 2026-02-15T22:27:00.520Z
250
+ at 2026-02-21T19:33:02.722Z
251
251
  </div>
252
252
  <script src="prettify.js"></script>
253
253
  <script>
@@ -1814,7 +1814,7 @@
1814
1814
  VariationValue,
1815
1815
  VariableKey,
1816
1816
  VariableValue,
1817
- VariableSchema,
1817
+ ResolvedVariableSchema,
1818
1818
  EvaluatedFeature,
1819
1819
  StickyFeatures,
1820
1820
  Allocation,
@@ -1879,7 +1879,7 @@ export interface Evaluation {
1879
1879
  // variable
1880
1880
  variableKey?: VariableKey;
1881
1881
  variableValue?: VariableValue;
1882
- variableSchema?: VariableSchema;
1882
+ variableSchema?: ResolvedVariableSchema;
1883
1883
  }
1884
1884
  &nbsp;
1885
1885
  export interface EvaluateDependencies {
@@ -2129,8 +2129,8 @@ export function evaluate(options: EvaluateOptions): Evaluation {
2129
2129
  logger.warn("feature is deprecated", { featureKey });
2130
2130
  }
2131
2131
  &nbsp;
2132
- // variableSchema
2133
- let variableSchema: VariableSchema | undefined;
2132
+ // variableSchema (from datafile, always resolved)
2133
+ let variableSchema: ResolvedVariableSchema | undefined;
2134
2134
  &nbsp;
2135
2135
  if (variableKey) {
2136
2136
  if (feature.variablesSchema &amp;&amp; feature.variablesSchema[variableKey]) {
@@ -2680,7 +2680,7 @@ export function evaluate(options: EvaluateOptions): Evaluation {
2680
2680
  <div class='footer quiet pad2 space-top1 center small'>
2681
2681
  Code coverage generated by
2682
2682
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
2683
- at 2026-02-15T22:27:00.520Z
2683
+ at 2026-02-21T19:33:02.722Z
2684
2684
  </div>
2685
2685
  <script src="prettify.js"></script>
2686
2686
  <script>
@@ -319,7 +319,7 @@ export function getParamsForDatafileSetEvent(
319
319
  <div class='footer quiet pad2 space-top1 center small'>
320
320
  Code coverage generated by
321
321
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
322
- at 2026-02-15T22:27:00.520Z
322
+ at 2026-02-21T19:33:02.722Z
323
323
  </div>
324
324
  <script src="prettify.js"></script>
325
325
  <script>
@@ -154,7 +154,7 @@ export function getValueByType(value: ValueType, fieldType: FieldType): ValueTyp
154
154
  <div class='footer quiet pad2 space-top1 center small'>
155
155
  Code coverage generated by
156
156
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
157
- at 2026-02-15T22:27:00.520Z
157
+ at 2026-02-21T19:33:02.722Z
158
158
  </div>
159
159
  <script src="prettify.js"></script>
160
160
  <script>
@@ -337,7 +337,7 @@ export class HooksManager {
337
337
  <div class='footer quiet pad2 space-top1 center small'>
338
338
  Code coverage generated by
339
339
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
340
- at 2026-02-15T22:27:00.520Z
340
+ at 2026-02-21T19:33:02.722Z
341
341
  </div>
342
342
  <script src="prettify.js"></script>
343
343
  <script>
@@ -251,7 +251,7 @@
251
251
  <div class='footer quiet pad2 space-top1 center small'>
252
252
  Code coverage generated by
253
253
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
254
- at 2026-02-15T22:27:00.520Z
254
+ at 2026-02-21T19:33:02.722Z
255
255
  </div>
256
256
  <script src="prettify.js"></script>
257
257
  <script>
@@ -1402,7 +1402,7 @@ export function createInstance(options: InstanceOptions = <span class="branch-0
1402
1402
  <div class='footer quiet pad2 space-top1 center small'>
1403
1403
  Code coverage generated by
1404
1404
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
1405
- at 2026-02-15T22:27:00.520Z
1405
+ at 2026-02-21T19:33:02.722Z
1406
1406
  </div>
1407
1407
  <script src="prettify.js"></script>
1408
1408
  <script>
@@ -340,7 +340,7 @@ export function createLogger(options: CreateLoggerOptions = {}): Logger {
340
340
  <div class='footer quiet pad2 space-top1 center small'>
341
341
  Code coverage generated by
342
342
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
343
- at 2026-02-15T22:27:00.520Z
343
+ at 2026-02-21T19:33:02.722Z
344
344
  </div>
345
345
  <script src="prettify.js"></script>
346
346
  <script>
@@ -1,4 +1,4 @@
1
- import type { FeatureKey, Context, RuleKey, Traffic, Force, Required, Variation, VariationValue, VariableKey, VariableValue, VariableSchema, EvaluatedFeature, StickyFeatures } from "@featurevisor/types";
1
+ import type { FeatureKey, Context, RuleKey, Traffic, Force, Required, Variation, VariationValue, VariableKey, VariableValue, ResolvedVariableSchema, EvaluatedFeature, StickyFeatures } from "@featurevisor/types";
2
2
  import { Logger } from "./logger";
3
3
  import { HooksManager } from "./hooks";
4
4
  import { DatafileReader } from "./datafileReader";
@@ -40,7 +40,7 @@ export interface Evaluation {
40
40
  variationValue?: VariationValue;
41
41
  variableKey?: VariableKey;
42
42
  variableValue?: VariableValue;
43
- variableSchema?: VariableSchema;
43
+ variableSchema?: ResolvedVariableSchema;
44
44
  }
45
45
  export interface EvaluateDependencies {
46
46
  context: Context;