@jsenv/performance-impact 2.2.0 → 2.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/performance-impact",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "Report pull request impacts on performance metrics",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -16,8 +16,7 @@
16
16
  "node": ">=14.17.0"
17
17
  },
18
18
  "publishConfig": {
19
- "access": "public",
20
- "registry": "https://registry.npmjs.org"
19
+ "access": "public"
21
20
  },
22
21
  "type": "module",
23
22
  "exports": {
@@ -31,6 +31,12 @@ const getAllImpactRatios = ({ afterMergeMetrics, beforeMergeMetrics }) => {
31
31
  const metricValueBeforeMerge = metricBeforeMerge.value
32
32
  const metricValueAfterMerge = metricAfterMerge.value
33
33
  const metricDiff = metricValueAfterMerge - metricValueBeforeMerge
34
+ if (metricDiff === 0 && metricValueAfterMerge === 0 && metricValueBeforeMerge === 0) {
35
+ // there is no impact on a metric that is 0
36
+ // we can ignore this metric
37
+ return
38
+ }
39
+
34
40
  const metricDiffRatio =
35
41
  metricDiff === 0
36
42
  ? 0