From 35c48e9d31073512883d4c47014fa50cad14864d Mon Sep 17 00:00:00 2001 From: Antoine THEBAUD Date: Fri, 7 Feb 2025 15:12:58 +0100 Subject: [PATCH 1/2] [IGNORE] mystery fix for perses/perses migration unit tests This is to work around the issue `spec.visual.lineWidth: cannot convert incomplete value \"_\" to JSON"` Signed-off-by: Antoine THEBAUD --- TimeSeriesChart/schemas/migrate/migrate.cue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/TimeSeriesChart/schemas/migrate/migrate.cue b/TimeSeriesChart/schemas/migrate/migrate.cue index ceb1829..b269c17 100644 --- a/TimeSeriesChart/schemas/migrate/migrate.cue +++ b/TimeSeriesChart/schemas/migrate/migrate.cue @@ -101,11 +101,15 @@ spec: { // visual #lineWidth: *#panel.fieldConfig.defaults.custom.lineWidth | null if #lineWidth != null { - visual: lineWidth: [// switch - if #lineWidth > 3 {3}, // line width can't go beyond 3 in Perses - if #lineWidth < 0.25 {0.25}, // line width can't go below 0.25 in Perses - #lineWidth, - ][0] + if #lineWidth > 3 { + visual: lineWidth: 3 // line width can't go beyond 3 in Perses + } + if #lineWidth < 0.25 { + visual: lineWidth: 0.25 // line width can't go below 0.25 in Perses + } + if #lineWidth >= 0.25 && #lineWidth <= 3 { + visual: lineWidth: #lineWidth + } } #fillOpacity: *#panel.fieldConfig.defaults.custom.fillOpacity | null From 3f24d987fa152d5a41c49168a057c3c7153916f6 Mon Sep 17 00:00:00 2001 From: Antoine THEBAUD Date: Fri, 7 Feb 2025 15:31:54 +0100 Subject: [PATCH 2/2] bump version Signed-off-by: Antoine THEBAUD --- TimeSeriesChart/package.json | 2 +- package-lock.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/TimeSeriesChart/package.json b/TimeSeriesChart/package.json index f633f9c..2c5ebb3 100644 --- a/TimeSeriesChart/package.json +++ b/TimeSeriesChart/package.json @@ -1,7 +1,7 @@ { "name": "@perses-dev/timeseries-chart", "private": true, - "version": "0.4.1", + "version": "0.4.2", "scripts": { "dev": "rsbuild dev", "build": "rsbuild build", diff --git a/package-lock.json b/package-lock.json index 027605f..297be5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13154,7 +13154,7 @@ }, "Prometheus": { "name": "@perses-dev/prometheus", - "version": "0.4.2", + "version": "0.5.0", "dependencies": { "@module-federation/enhanced": "^0.8.9", "@nexucis/fuzzy": "^0.5.1", @@ -13605,7 +13605,7 @@ }, "Tempo": { "name": "@perses-dev/tempo", - "version": "0.1.1", + "version": "0.2.0", "dependencies": { "@codemirror/autocomplete": "^6.18.4", "@grafana/lezer-traceql": "^0.0.20", @@ -13900,7 +13900,7 @@ }, "TimeSeriesChart": { "name": "@perses-dev/timeseries-chart", - "version": "0.4.1", + "version": "0.4.2", "dependencies": { "@module-federation/enhanced": "^0.8.9", "color-hash": "^2.0.2"