@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.
@@ -576,7 +576,7 @@ function bulkEvaluate(flags, shared) {
576
576
  }
577
577
 
578
578
  // package.json
579
- var version = "1.10.0";
579
+ var version = "1.10.1";
580
580
 
581
581
  // src/lib/report-value.ts
582
582
  function internalReportValue(key, value, data) {
@@ -667,7 +667,8 @@ async function evaluate2(id, flagKey, defaultValue, entities) {
667
667
  trackEvaluation(controller, {
668
668
  flagKey,
669
669
  variant: null,
670
- reason: result2.reason
670
+ reason: result2.reason,
671
+ revision: datafile.revision
671
672
  });
672
673
  return result2;
673
674
  }
@@ -691,7 +692,8 @@ async function evaluate2(id, flagKey, defaultValue, entities) {
691
692
  trackEvaluation(controller, {
692
693
  flagKey,
693
694
  variant: result.variantId,
694
- reason: result.reason
695
+ reason: result.reason,
696
+ revision: datafile.revision
695
697
  });
696
698
  return Object.assign(result, {
697
699
  metrics: {
@@ -759,7 +761,8 @@ async function bulkEvaluate2(id, flags, entities) {
759
761
  trackEvaluation(controller, {
760
762
  flagKey: key,
761
763
  variant: null,
762
- reason: "error" /* ERROR */
764
+ reason: "error" /* ERROR */,
765
+ revision: datafile.revision
763
766
  });
764
767
  continue;
765
768
  }
@@ -785,7 +788,8 @@ async function bulkEvaluate2(id, flags, entities) {
785
788
  trackEvaluation(controller, {
786
789
  flagKey: key,
787
790
  variant: result.variantId,
788
- reason: result.reason
791
+ reason: result.reason,
792
+ revision: datafile.revision
789
793
  });
790
794
  results[key] = Object.assign(result, {
791
795
  metrics: { evaluationMs: evaluationDurationMs, ...baseMetrics }
@@ -1472,6 +1476,7 @@ function evaluationBatchKey(options) {
1472
1476
  options.variant,
1473
1477
  options.reason,
1474
1478
  _nullishCoalesce(options.clientName, () => ( null)),
1479
+ _nullishCoalesce(options.revision, () => ( null)),
1475
1480
  options.bucketTs
1476
1481
  ]);
1477
1482
  }
@@ -1489,6 +1494,9 @@ var FlagsEvaluationEvent = (_class3 = class {
1489
1494
  if (eventOptions.clientName) {
1490
1495
  this.payload.clientName = eventOptions.clientName;
1491
1496
  }
1497
+ if (eventOptions.revision !== void 0) {
1498
+ this.payload.revision = String(eventOptions.revision);
1499
+ }
1492
1500
  }
1493
1501
  increment() {
1494
1502
  this.payload.evaluationCount += 1;
@@ -3737,4 +3745,4 @@ var {
3737
3745
 
3738
3746
 
3739
3747
  exports.ResolutionReason = ResolutionReason; exports.evaluate = evaluate; exports.FallbackNotFoundError = FallbackNotFoundError; exports.FallbackEntryNotFoundError = FallbackEntryNotFoundError; exports.Controller = Controller; exports.flagsClient = flagsClient; exports.resetDefaultFlagsClient = resetDefaultFlagsClient; exports.createClient = createClient;
3740
- //# sourceMappingURL=chunk-SMFY4V2C.cjs.map
3748
+ //# sourceMappingURL=chunk-EW4YJU7V.cjs.map