@vercel/flags-core 1.10.0 → 1.10.1

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.
@@ -559,7 +559,7 @@ function bulkEvaluate(flags, shared) {
559
559
  }
560
560
 
561
561
  // package.json
562
- var version = "1.10.0";
562
+ var version = "1.10.1";
563
563
 
564
564
  // src/lib/report-value.ts
565
565
  function internalReportValue(key, value, data) {
@@ -650,7 +650,8 @@ async function evaluate2(id, flagKey, defaultValue, entities) {
650
650
  trackEvaluation(controller, {
651
651
  flagKey,
652
652
  variant: null,
653
- reason: result2.reason
653
+ reason: result2.reason,
654
+ revision: datafile.revision
654
655
  });
655
656
  return result2;
656
657
  }
@@ -674,7 +675,8 @@ async function evaluate2(id, flagKey, defaultValue, entities) {
674
675
  trackEvaluation(controller, {
675
676
  flagKey,
676
677
  variant: result.variantId,
677
- reason: result.reason
678
+ reason: result.reason,
679
+ revision: datafile.revision
678
680
  });
679
681
  return Object.assign(result, {
680
682
  metrics: {
@@ -742,7 +744,8 @@ async function bulkEvaluate2(id, flags, entities) {
742
744
  trackEvaluation(controller, {
743
745
  flagKey: key,
744
746
  variant: null,
745
- reason: "error" /* ERROR */
747
+ reason: "error" /* ERROR */,
748
+ revision: datafile.revision
746
749
  });
747
750
  continue;
748
751
  }
@@ -768,7 +771,8 @@ async function bulkEvaluate2(id, flags, entities) {
768
771
  trackEvaluation(controller, {
769
772
  flagKey: key,
770
773
  variant: result.variantId,
771
- reason: result.reason
774
+ reason: result.reason,
775
+ revision: datafile.revision
772
776
  });
773
777
  results[key] = Object.assign(result, {
774
778
  metrics: { evaluationMs: evaluationDurationMs, ...baseMetrics }
@@ -1455,6 +1459,7 @@ function evaluationBatchKey(options) {
1455
1459
  options.variant,
1456
1460
  options.reason,
1457
1461
  options.clientName ?? null,
1462
+ options.revision ?? null,
1458
1463
  options.bucketTs
1459
1464
  ]);
1460
1465
  }
@@ -1472,6 +1477,9 @@ var FlagsEvaluationEvent = class {
1472
1477
  if (eventOptions.clientName) {
1473
1478
  this.payload.clientName = eventOptions.clientName;
1474
1479
  }
1480
+ if (eventOptions.revision !== void 0) {
1481
+ this.payload.revision = String(eventOptions.revision);
1482
+ }
1475
1483
  }
1476
1484
  increment() {
1477
1485
  this.payload.evaluationCount += 1;
@@ -3746,4 +3754,4 @@ export {
3746
3754
  resetDefaultFlagsClient,
3747
3755
  createClient
3748
3756
  };
3749
- //# sourceMappingURL=chunk-5F64DMZJ.js.map
3757
+ //# sourceMappingURL=chunk-ZY7CHPJG.js.map