From 01b88ddf5c89ac1b94263da66b0e80feaadf0142 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Sat, 15 Aug 2026 10:58:15 +0000 Subject: [PATCH 1/7] [IGNORE] Replace ESlint and Prettier by Oxlint and Oxfmt Signed-off-by: Guillaume LADORME --- .eslintrc.js | 112 - .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/ISSUE_TEMPLATE/other.yml | 4 +- .github/dependabot.yml | 24 +- .github/workflows/ci.yml | 20 +- .github/workflows/cue.yml | 14 +- .github/workflows/doc.yml | 4 +- .github/workflows/go.yml | 6 +- .github/workflows/react.yml | 9 +- .mdox.validate.yaml | 2 +- .oxfmtrc.json | 18 + .oxlintrc.json | 57 + .prettierrc.json | 5 - alertmanager/jest.config.ts | 1 + alertmanager/package.json | 2 +- alertmanager/rsbuild.config.ts | 1 + alertmanager/src/components/ColumnsEditor.tsx | 2 +- alertmanager/src/components/MatcherEditor.tsx | 2 +- .../src/components/MatchersList.test.tsx | 1 + alertmanager/src/components/SilenceForm.tsx | 1 + .../src/components/StatusBadge.test.tsx | 1 + alertmanager/src/components/StatusBadge.tsx | 2 +- .../explore/AlertManagerAlertsExplorer.tsx | 4 +- .../explore/AlertManagerSilencesExplorer.tsx | 9 +- alertmanager/src/getPluginModule.ts | 1 + alertmanager/src/model/alertmanager-client.ts | 3 +- .../src/model/alertmanager-selectors.ts | 2 +- .../plugins/AlertManagerDatasourceEditor.tsx | 1 + .../src/plugins/alert-table/AlertTable.ts | 3 +- .../alert-table/AlertTableColumnsEditor.tsx | 1 + .../AlertTableDeduplicationEditor.tsx | 1 + .../alert-table/AlertTableLabelsEditor.tsx | 1 + .../alert-table/AlertTableOptionsEditor.tsx | 1 + .../plugins/alert-table/AlertTablePanel.tsx | 5 +- .../alert-table/alert-table-model.test.ts | 1 + .../plugins/alert-table/alert-table-model.ts | 3 +- .../alert-table/alert-table-sorting.test.ts | 1 + .../alert-table/alert-table-sorting.ts | 1 + .../AlertManagerAlertsQuery.ts | 3 +- .../AlertManagerAlertsQueryEditor.tsx | 1 + .../get-alerts-data.test.ts | 1 + .../get-alerts-data.ts | 1 + .../src/plugins/alertmanager-datasource.tsx | 3 +- .../AlertManagerSilencesQuery.ts | 3 +- .../AlertManagerSilencesQueryEditor.tsx | 1 + .../get-silences-data.test.ts | 1 + .../get-silences-data.ts | 1 + .../src/plugins/silence-table/SilenceTable.ts | 3 +- .../SilenceTableColumnsEditor.tsx | 1 + .../SilenceTableOptionsEditor.tsx | 1 + .../silence-table/SilenceTablePanel.tsx | 3 +- .../silence-table/silence-table-model.test.ts | 1 + .../silence-table/silence-table-model.ts | 9 +- .../silence-table-sorting.test.ts | 1 + .../silence-table/silence-table-sorting.ts | 1 + alertmanager/src/plugins/types.ts | 3 +- alertmanager/tsconfig.build.json | 4 +- alertmanager/tsconfig.json | 4 +- barchart/jest.config.ts | 1 + barchart/package.json | 2 +- barchart/rsbuild.config.ts | 1 + .../schemas/migrate/tests/basic/expected.json | 2 +- .../schemas/migrate/tests/basic/input.json | 6 +- barchart/src/BarChart.ts | 3 +- barchart/src/BarChartBase.tsx | 20 +- barchart/src/BarChartExportAction.tsx | 7 +- .../BarChartOptionsEditorSettings.test.tsx | 1 + .../src/BarChartOptionsEditorSettings.tsx | 1 + barchart/src/BarChartPanel.tsx | 11 +- barchart/src/getPluginModule.ts | 1 + barchart/src/utils.ts | 5 +- clickhouse/jest.config.ts | 1 + clickhouse/package.json | 2 +- clickhouse/rsbuild.config.ts | 1 + clickhouse/src/components/ClickQLEditor.tsx | 2 +- .../ClickHouseDatasource.tsx | 1 + .../ClickHouseDatasourceEditor.tsx | 1 + clickhouse/src/getPluginModule.ts | 1 + clickhouse/src/model/click-house-client.ts | 2 +- .../ClickHouseLogQuery.tsx | 7 +- .../ClickHouseLogQueryEditor.tsx | 9 +- .../click-house-log-query-types.test.ts | 1 + .../get-click-house-log-data.ts | 3 +- .../ClickHouseQuery.tsx | 7 +- .../ClickHouseQueryEditor.tsx | 9 +- .../click-house-query-types.test.ts | 1 + .../get-click-house-data.ts | 9 +- clickhouse/src/queries/query-editor-model.ts | 4 +- datasourcevariable/package.json | 2 +- datasourcevariable/rsbuild.config.ts | 1 + .../schemas/migrate/tests/basic/expected.json | 2 +- .../schemas/migrate/tests/basic/input.json | 2 +- .../schemas/tests/valid/datasource.json | 2 +- datasourcevariable/src/DatasourceVariable.tsx | 2 +- datasourcevariable/src/getPluginModule.ts | 1 + flamechart/jest.config.ts | 1 + flamechart/package.json | 2 +- flamechart/rsbuild.config.ts | 1 + flamechart/src/FlameChart.ts | 3 +- .../src/components/CustomBreadcrumb.tsx | 8 +- flamechart/src/components/FlameChart.tsx | 17 +- .../FlameChartOptionsEditorSettings.tsx | 5 +- flamechart/src/components/FlameChartPanel.tsx | 79 +- flamechart/src/components/PaletteSelector.tsx | 2 +- flamechart/src/components/SearchBar.tsx | 2 +- flamechart/src/components/SeriesChart.tsx | 7 +- flamechart/src/components/Settings.tsx | 9 +- flamechart/src/components/SwitchSelector.tsx | 4 +- flamechart/src/components/TableChart.tsx | 8 +- flamechart/src/getPluginModule.ts | 1 + flamechart/src/utils/data-transform.test.ts | 1 + flamechart/src/utils/data-transform.ts | 3 +- flamechart/src/utils/tooltip.ts | 1 + flamechart/src/utils/utils.ts | 1 + gaugechart/jest.config.ts | 1 + gaugechart/package.json | 2 +- gaugechart/rsbuild.config.ts | 1 + .../schemas/migrate/tests/basic/expected.json | 2 +- .../schemas/migrate/tests/basic/input.json | 6 +- gaugechart/src/GaugeChart.ts | 1 + gaugechart/src/GaugeChartBase.tsx | 4 +- .../GaugeChartOptionsEditorSettings.test.tsx | 1 + .../src/GaugeChartOptionsEditorSettings.tsx | 3 +- gaugechart/src/GaugeChartPanel.tsx | 5 +- gaugechart/src/getPluginModule.ts | 1 + greptimedb/jest.config.ts | 1 + greptimedb/package.json | 2 +- greptimedb/rsbuild.config.ts | 1 + .../src/components/GreptimeDBQLEditor.tsx | 2 +- .../GreptimeDBDatasource.tsx | 5 +- .../GreptimeDBDatasourceEditor.tsx | 1 + .../greptimedb-datasource-types.ts | 4 +- greptimedb/src/getPluginModule.ts | 1 + greptimedb/src/model/greptimedb-client.ts | 5 +- .../GreptimeDBLogQuery.tsx | 5 +- .../GreptimeDBLogQueryEditor.tsx | 7 +- .../get-greptimedb-log-data.ts | 1 + .../greptimedb-log-query-types.test.ts | 1 + .../queries/greptimedb-query-data-model.ts | 5 +- .../GreptimeDBQuery.tsx | 5 +- .../GreptimeDBQueryEditor.tsx | 7 +- .../get-greptimedb-data.ts | 3 +- .../greptimedb-query-types.test.ts | 3 +- .../GreptimeDBTraceQuery.tsx | 3 +- .../GreptimeDBTraceQueryEditor.tsx | 3 +- .../get-greptimedb-trace-data.ts | 5 +- .../greptimedb-trace-query.test.ts | 1 + heatmapchart/jest.config.ts | 1 + heatmapchart/package.json | 2 +- heatmapchart/rsbuild.config.ts | 1 + heatmapchart/src/HeatMapChart.ts | 1 + heatmapchart/src/components/HeatMapChart.tsx | 13 +- ...HeatMapChartOptionsEditorSettings.test.tsx | 1 + .../HeatMapChartOptionsEditorSettings.tsx | 1 + .../src/components/HeatMapChartPanel.tsx | 3 +- heatmapchart/src/components/HeatMapTooltip.ts | 1 + heatmapchart/src/getPluginModule.ts | 1 + histogramchart/jest.config.ts | 1 + histogramchart/package.json | 2 +- histogramchart/rsbuild.config.ts | 1 + histogramchart/src/HistogramChart.ts | 1 + .../src/components/HistogramChart.tsx | 11 +- ...stogramChartOptionsEditorSettings.test.tsx | 1 + .../HistogramChartOptionsEditorSettings.tsx | 1 + .../src/components/HistogramChartPanel.tsx | 5 +- histogramchart/src/getPluginModule.ts | 1 + jaeger/jest.config.ts | 1 + jaeger/package.json | 2 +- jaeger/rsbuild.config.ts | 1 + jaeger/src/getPluginModule.ts | 1 + jaeger/src/model/jaeger-client.ts | 5 +- jaeger/src/model/trace-query-model.ts | 1 + jaeger/src/plugins/JaegerDatasourceEditor.tsx | 1 + jaeger/src/plugins/JaegerTraceQuery.ts | 1 + .../plugins/JaegerTraceQueryEditor.test.tsx | 3 +- jaeger/src/plugins/JaegerTraceQueryEditor.tsx | 3 +- jaeger/src/plugins/get-trace-data.test.ts | 19 +- jaeger/src/plugins/get-trace-data.ts | 14 +- jaeger/src/plugins/jaeger-datasource.tsx | 1 + jest.shared.ts | 1 + logexplorer/jest.config.ts | 10 +- logexplorer/package.json | 2 +- logexplorer/rsbuild.config.ts | 1 + .../src/explore/log-explorer/LogExplorer.tsx | 6 +- logexplorer/src/getPluginModule.ts | 1 + logstable/jest.config.ts | 1 + logstable/package.json | 2 +- logstable/rsbuild.config.ts | 1 + logstable/src/LogsTable.ts | 5 +- logstable/src/LogsTableComponent.tsx | 7 +- .../src/LogsTableCsvExportAction.test.ts | 1 + logstable/src/LogsTableCsvExportAction.tsx | 7 +- logstable/src/LogsTableExportAction.tsx | 5 +- .../LogsTableItemSelectionActionsEditor.tsx | 1 + logstable/src/LogsTablePanel.test.tsx | 1 + logstable/src/LogsTablePanel.tsx | 1 + logstable/src/LogsTableSettingsEditor.tsx | 1 + logstable/src/components/EmptyLogsState.tsx | 2 +- .../src/components/LogRow/LogDetailsTable.tsx | 6 +- .../src/components/LogRow/LogRow.test.tsx | 3 +- logstable/src/components/LogRow/LogRow.tsx | 6 +- .../src/components/LogRow/LogsStyles.tsx | 7 +- .../src/components/LogRow/ansiColors.css | 194 +- logstable/src/components/LogsList.tsx | 3 +- .../src/components/VirtualizedLogsList.tsx | 25 +- logstable/src/components/hooks/useSeverity.ts | 1 + logstable/src/getPluginModule.ts | 1 + logstable/src/utils/copyHelpers.test.ts | 1 + logstable/src/utils/copyHelpers.ts | 1 + loki/jest.config.ts | 1 + loki/package.json | 2 +- loki/rsbuild.config.ts | 1 + .../tests/valid/loki-label-names.json | 4 +- .../tests/valid/loki-label-values.json | 4 +- loki/src/components/complete.test.ts | 5 +- loki/src/components/complete.ts | 18 +- loki/src/components/logql-editor.tsx | 3 +- loki/src/components/logql-extension.ts | 7 +- .../loki-datasource/LokiDatasource.tsx | 1 + .../loki-datasource/LokiDatasourceEditor.tsx | 1 + loki/src/getPluginModule.ts | 1 + loki/src/model/loki-client.test.ts | 1 + loki/src/model/loki-client.ts | 1 + .../queries/loki-log-query/LokiLogQuery.tsx | 7 +- .../loki-log-query/LokiLogQueryEditor.tsx | 9 +- .../loki-log-query/get-loki-log-data.ts | 3 +- .../loki-log-query-types.test.ts | 3 +- .../loki-log-query/loki-log-query-types.ts | 1 + .../LokiTimeSeriesQuery.tsx | 5 +- .../LokiTimeSeriesQueryEditor.tsx | 7 +- .../get-loki-time-series-data.ts | 3 +- .../loki-time-series-query-types.test.ts | 3 +- .../loki-time-series-query-types.ts | 1 + loki/src/queries/query-editor-model.ts | 4 +- loki/src/variables/LokiLabelNamesVariable.tsx | 3 +- .../src/variables/LokiLabelValuesVariable.tsx | 3 +- loki/src/variables/LokiLogQLVariable.tsx | 1 + loki/src/variables/loki-variables.test.ts | 3 +- loki/src/variables/loki-variables.tsx | 1 + loki/src/variables/types.ts | 1 + markdown/jest.config.ts | 1 + markdown/package.json | 2 +- markdown/rsbuild.config.ts | 1 + .../schemas/migrate/tests/text/expected.json | 2 +- .../schemas/migrate/tests/text/input.json | 2 +- markdown/src/Markdown.ts | 1 + markdown/src/MarkdownPanel.tsx | 1 + markdown/src/MarkdownPanelOptionsEditor.tsx | 5 +- markdown/src/getPluginModule.ts | 1 + opensearch/docs/examples/docker-compose.yml | 8 +- opensearch/jest.config.ts | 1 + opensearch/package.json | 2 +- opensearch/rsbuild.config.ts | 1 + .../OpenSearchDatasource.tsx | 1 + .../OpenSearchDatasourceEditor.tsx | 1 + opensearch/src/getPluginModule.ts | 1 + opensearch/src/model/opensearch-selectors.ts | 2 +- .../OpenSearchLogQuery.tsx | 3 +- .../OpenSearchLogQueryEditor.test.tsx | 3 +- .../OpenSearchLogQueryEditor.tsx | 7 +- .../get-opensearch-log-data.test.ts | 5 +- .../get-opensearch-log-data.ts | 8 +- .../opensearch-log-query-types.ts | 1 + opensearch/src/queries/query-editor-model.ts | 4 +- package-lock.json | 10043 ++++++---------- package.json | 13 +- piechart/jest.config.ts | 1 + piechart/package.json | 2 +- piechart/rsbuild.config.ts | 1 + .../schemas/migrate/tests/basic/expected.json | 2 +- .../schemas/migrate/tests/basic/input.json | 10 +- piechart/schemas/tests/valid/pie.json | 2 +- piechart/src/PieChart.ts | 1 + piechart/src/PieChartBase.tsx | 9 +- .../src/PieChartOptionsEditorSettings.tsx | 44 +- piechart/src/PieChartPanel.tsx | 9 +- piechart/src/colors.ts | 4 +- piechart/src/getPluginModule.ts | 1 + piechart/src/utils.test.ts | 1 + piechart/src/utils.ts | 7 +- prometheus/jest.config.ts | 1 + prometheus/package.json | 2 +- prometheus/rsbuild.config.ts | 1 + .../prometheus-proxy-with-query-params.json | 2 +- .../valid/prometheus-with-query-params.json | 2 +- .../migrate/tests/basic/expected.json | 2 +- .../migrate/tests/basic/input.json | 3 +- .../tests/valid/prometheus-label-names.json | 5 +- .../migrate/tests/basic-2/expected.json | 6 +- .../migrate/tests/basic-2/input.json | 3 +- .../migrate/tests/basic-3/expected.json | 6 +- .../migrate/tests/basic-3/input.json | 3 +- .../migrate/tests/basic-4/expected.json | 6 +- .../migrate/tests/basic-4/input.json | 3 +- .../migrate/tests/basic/expected.json | 2 +- .../migrate/tests/basic/input.json | 2 +- .../tests/valid/prometheus-label-values.json | 5 +- .../migrate/tests/basic/expected.json | 2 +- .../migrate/tests/basic/input.json | 3 +- .../migrate/tests/legacy-format/expected.json | 2 +- .../migrate/tests/legacy-format/input.json | 2 +- .../migrate/tests/no-aggr/expected.json | 2 +- .../migrate/tests/no-aggr/input.json | 3 +- .../migrate/tests/volatile/expected.json | 2 +- .../migrate/tests/volatile/input.json | 3 +- .../migrate/tests/basic/expected.json | 2 +- .../migrate/tests/basic/input.json | 2 +- .../migrate/tests/legend-format/expected.json | 2 +- .../migrate/tests/legend-format/input.json | 2 +- .../valid/prometheus-time-series-query.json | 5 +- .../PrometheusPromQLAnnotation.tsx | 3 +- ...PrometheusPromQLAnnotationOptionEditor.tsx | 10 +- .../src/annotations/get-annotation-data.ts | 7 +- prometheus/src/components/PromQLEditor.tsx | 18 +- prometheus/src/components/TreeNode.tsx | 12 +- prometheus/src/components/promql/format.tsx | 66 +- prometheus/src/components/promql/serialize.ts | 44 +- prometheus/src/components/query.ts | 5 +- prometheus/src/explore/PrometheusExplorer.tsx | 11 +- .../PrometheusMetricsFinder.tsx | 5 +- .../display/list/MetricList.test.tsx | 1 + .../display/list/MetricList.tsx | 3 +- .../filter/FilterInputs.test.tsx | 1 + .../filter/FilterInputs.tsx | 23 +- .../filter/FinderFilters.tsx | 4 +- .../overview/MetricOverview.tsx | 10 +- .../overview/tabs/JobTab.tsx | 3 +- .../overview/tabs/OverviewTab.tsx | 42 +- .../overview/tabs/SimilarTab.tsx | 3 +- .../explore/PrometheusMetricsFinder/utils.ts | 5 +- prometheus/src/getPluginModule.ts | 1 + prometheus/src/model/api-types.ts | 1 + prometheus/src/model/prometheus-client.ts | 3 +- prometheus/src/model/time.ts | 3 +- .../plugins/PrometheusDatasourceEditor.tsx | 3 +- .../plugins/PrometheusLabelNamesVariable.tsx | 5 +- .../plugins/PrometheusLabelValuesVariable.tsx | 8 +- .../src/plugins/PrometheusPromQLVariable.tsx | 3 +- prometheus/src/plugins/interpolation.ts | 1 + .../src/plugins/prometheus-datasource.tsx | 3 +- .../PrometheusTimeSeriesQuery.ts | 1 + .../PrometheusTimeSeriesQueryEditor.tsx | 13 +- .../get-time-series-data.ts | 5 +- .../plugin.test.ts | 1 + .../query-editor-model.ts | 5 +- .../time-series-query-model.ts | 1 + .../src/plugins/prometheus-variables.tsx | 1 + prometheus/src/plugins/types.ts | 1 + prometheus/src/plugins/variable.tsx | 2 +- prometheus/src/utils/utils.ts | 2 +- pyroscope/jest.config.ts | 1 + pyroscope/package.json | 2 +- pyroscope/rsbuild.config.ts | 1 + .../tests/valid/pyroscope-profile-query.json | 5 +- pyroscope/src/components/AddFilterItem.tsx | 4 +- pyroscope/src/components/DeleteFilterItem.tsx | 4 +- pyroscope/src/components/FilterItem.tsx | 7 +- pyroscope/src/components/Filters.tsx | 5 +- pyroscope/src/components/LabelName.tsx | 3 +- pyroscope/src/components/LabelValue.tsx | 3 +- pyroscope/src/components/Operator.tsx | 2 +- .../src/components/ProfileTypeSelector.tsx | 3 +- pyroscope/src/components/Service.tsx | 3 +- pyroscope/src/explore/PyroscopeExplorer.tsx | 5 +- pyroscope/src/getPluginModule.ts | 1 + pyroscope/src/model/pyroscope-client.ts | 5 +- .../src/plugins/PyroscopeDatasourceEditor.tsx | 1 + .../src/plugins/pyroscope-datasource.tsx | 1 + .../PyroscopeProfileQueryEditor.tsx | 7 +- .../get-profile-data.test.ts | 1 + .../get-profile-data.ts | 3 +- .../query-editor-model.ts | 5 +- pyroscope/src/utils/use-query.ts | 6 +- scatterchart/jest.config.ts | 1 + scatterchart/package.json | 2 +- scatterchart/rsbuild.config.ts | 1 + scatterchart/src/ScatterChart.ts | 1 + scatterchart/src/ScatterChartPanel.test.tsx | 9 +- scatterchart/src/ScatterChartPanel.tsx | 9 +- scatterchart/src/Scatterplot.tsx | 21 +- scatterchart/src/getPluginModule.ts | 1 + splunk/jest.config.ts | 1 + splunk/package.json | 2 +- splunk/rsbuild.config.ts | 1 + .../splunk-datasource/SplunkDatasource.tsx | 1 + .../SplunkDatasourceEditor.tsx | 1 + splunk/src/getPluginModule.ts | 1 + splunk/src/model/splunk-client.ts | 1 + .../splunk-log-query/SplunkLogQuery.test.ts | 2 +- .../splunk-log-query/SplunkLogQuery.tsx | 7 +- .../splunk-log-query/SplunkLogQueryEditor.tsx | 5 +- .../splunk-log-query/get-splunk-log-data.ts | 7 +- .../splunk-log-query-types.ts | 1 + .../SplunkTimeSeriesQuery.tsx | 5 +- .../SplunkTimeSeriesQueryEditor.tsx | 5 +- .../get-splunk-time-series-data.ts | 5 +- .../splunk-time-series-query-types.ts | 1 + statchart/jest.config.ts | 1 + statchart/package.json | 2 +- statchart/rsbuild.config.ts | 1 + .../schemas/migrate/tests/basic/input.json | 6 +- .../label-display-from-legend/input.json | 6 +- .../label-display-from-options/input.json | 4 +- .../migrate/tests/mappings/expected.json | 2 +- .../tests/overrides_to_mappings/input.json | 6 +- .../expected.json | 2 +- .../special_mapping_without_match/input.json | 160 +- .../tests/valid/misc_with_null_value.json | 2 +- statchart/src/StatChart.ts | 3 +- statchart/src/StatChartBase.test.tsx | 2 +- statchart/src/StatChartBase.tsx | 15 +- .../StatChartOptionsEditorSettings.test.tsx | 1 + .../src/StatChartOptionsEditorSettings.tsx | 1 + statchart/src/StatChartPanel.tsx | 20 +- statchart/src/StatChartValueMappingEditor.tsx | 3 +- statchart/src/getPluginModule.ts | 1 + statchart/src/utils/calculate-font-size.ts | 2 +- statchart/src/utils/data-transform.test.ts | 1 + statchart/src/utils/data-transform.ts | 1 + statchart/src/utils/get-color.ts | 1 + staticlistvariable/package.json | 2 +- staticlistvariable/rsbuild.config.ts | 1 + .../tests/custom-complex/expected.json | 2 +- .../migrate/tests/custom-complex/input.json | 2 +- .../migrate/tests/custom/expected.json | 2 +- .../schemas/migrate/tests/custom/input.json | 2 +- .../migrate/tests/interval-auto/expected.json | 15 +- .../migrate/tests/interval-auto/input.json | 2 +- .../tests/interval-no-options/expected.json | 14 +- .../tests/interval-no-options/input.json | 2 +- .../migrate/tests/interval/expected.json | 15 +- .../schemas/migrate/tests/interval/input.json | 2 +- .../schemas/tests/valid/static-list.json | 2 +- staticlistvariable/src/StaticListVariable.tsx | 4 +- staticlistvariable/src/getPluginModule.ts | 1 + statushistorychart/jest.config.ts | 1 + statushistorychart/package.json | 2 +- statushistorychart/rsbuild.config.ts | 1 + .../schemas/migrate/tests/mappings/input.json | 2 +- .../schemas/tests/valid/status-history.json | 16 +- .../src/StatusHistoryChartBase.tsx | 13 +- ...tatusHistoryChartOptionsEditorSettings.tsx | 7 +- statushistorychart/src/StatusHistoryPanel.tsx | 5 +- .../src/StatusHistoryTooltip.ts | 1 + .../src/StatusHistoryValueMappingEditor.tsx | 3 +- statushistorychart/src/getPluginModule.ts | 1 + .../src/utils/data-transform.test.ts | 3 +- .../src/utils/data-transform.ts | 3 +- table/jest.config.ts | 1 + table/package.json | 2 +- table/rsbuild.config.ts | 1 + .../expected.json | 2 +- .../input.json | 2 +- .../migrate/tests/legacy-panel/expected.json | 2 +- .../migrate/tests/legacy-panel/input.json | 8 +- .../expected.json | 2 +- .../override-width-undefined-value/input.json | 6 +- .../expected.json | 2 +- .../input.json | 6 +- .../rename-same-using-both/expected.json | 2 +- .../tests/rename-same-using-both/input.json | 6 +- .../expected.json | 2 +- .../rename-twice-using-overrides/input.json | 6 +- .../expected.json | 2 +- .../rename-twice-using-transform/input.json | 6 +- .../rename-using-overrides/expected.json | 2 +- .../tests/rename-using-overrides/input.json | 6 +- .../rename-using-transform/expected.json | 2 +- .../tests/rename-using-transform/input.json | 6 +- .../expected.json | 2 +- .../several-settings-using-both-2/input.json | 6 +- .../expected.json | 2 +- .../several-settings-using-both-3/input.json | 6 +- .../several-settings-using-both/expected.json | 2 +- .../several-settings-using-both/input.json | 6 +- .../width-twice-using-overrides/expected.json | 2 +- .../width-twice-using-overrides/input.json | 6 +- table/schemas/tests/valid/table.json | 2 +- table/src/Table.ts | 1 + table/src/TableExportAction.test.ts | 1 + table/src/TableExportAction.tsx | 9 +- .../components/CellsEditor/CellsEditor.tsx | 1 + .../components/ColumnsEditor/ColumnEditor.tsx | 2 +- .../ColumnsEditor/ColumnEditorContainer.tsx | 7 +- .../ColumnsEditor/ColumnsEditor.tsx | 5 +- .../ColumnsEditor/DataLinkEditorDialog.tsx | 7 +- table/src/components/ConditionalPanel.tsx | 5 +- table/src/components/EmbeddedPanel.tsx | 8 +- table/src/components/TableCellsEditor.tsx | 1 + .../components/TableColumnsEditor.test.tsx | 1 + table/src/components/TableColumnsEditor.tsx | 1 + .../TableItemSelectionActionsEditor.tsx | 1 + table/src/components/TablePanel.test.tsx | 3 +- table/src/components/TablePanel.tsx | 23 +- table/src/components/TableSettingsEditor.tsx | 1 + .../src/components/TableTransformsEditor.tsx | 1 + table/src/getPluginModule.ts | 1 + table/src/models/table-model.ts | 4 +- table/src/table-data-utils.ts | 1 + tempo/jest.config.ts | 1 + tempo/package.json | 2 +- tempo/rsbuild.config.ts | 1 + .../tests/valid/tempo-trace-query.json | 5 +- tempo/src/components/AttributeFilters.tsx | 5 +- tempo/src/components/ClosableAlert.tsx | 2 +- tempo/src/components/TraceQLEditor.tsx | 5 +- tempo/src/components/TraceQLExtension.ts | 7 +- tempo/src/components/complete.test.ts | 5 +- tempo/src/components/complete.ts | 11 +- .../components/filter/traceql_to_filter.ts | 1 + tempo/src/explore/TempoExplorer.tsx | 5 +- tempo/src/getPluginModule.ts | 1 + tempo/src/model/tempo-client.test.ts | 1 + tempo/src/model/tempo-client.ts | 3 +- tempo/src/model/trace-query-model.ts | 1 + tempo/src/plugins/TempoDatasourceEditor.tsx | 1 + tempo/src/plugins/plugin.test.ts | 3 +- tempo/src/plugins/tempo-datasource.tsx | 1 + .../tempo-trace-query/TempoTraceQuery.ts | 1 + .../TempoTraceQueryEditor.tsx | 5 +- .../tempo-trace-query/get-trace-data.test.ts | 7 +- .../tempo-trace-query/get-trace-data.ts | 3 +- .../tempo-trace-query/query-editor-model.ts | 5 +- tempo/src/test/mock-data.ts | 1 + timeserieschart/jest.config.ts | 1 + timeserieschart/package.json | 2 +- timeserieschart/rsbuild.config.ts | 1 + .../tests/basic-with-calcs/expected.json | 13 +- .../migrate/tests/basic-with-calcs/input.json | 13 +- .../tests/basic-with-thresholds/expected.json | 2 +- .../tests/basic-with-thresholds/input.json | 2 +- .../basic-with-ymax-and-dotted/input.json | 7 +- .../color-based-on-legend-text/expected.json | 2 +- .../color-based-on-legend-text/input.json | 2 +- .../migrate/tests/legacy-panel/expected.json | 2 +- .../migrate/tests/legacy-panel/input.json | 2 +- .../tests/multiple-overrides/expected.json | 6 +- .../tests/multiple-overrides/input.json | 18 +- .../tests/undefined-refId/expected.json | 13 +- .../migrate/tests/undefined-refId/input.json | 9 +- timeserieschart/src/GeneralSettingsEditor.tsx | 3 +- timeserieschart/src/QuerySettingsEditor.tsx | 15 +- timeserieschart/src/TimeSeriesChart.ts | 3 +- timeserieschart/src/TimeSeriesChartBase.tsx | 58 +- .../src/TimeSeriesChartPanel.test.tsx | 9 +- timeserieschart/src/TimeSeriesChartPanel.tsx | 31 +- .../src/TimeSeriesExportAction.tsx | 3 +- .../src/VisualOptionsEditor.test.tsx | 1 + timeserieschart/src/VisualOptionsEditor.tsx | 3 +- timeserieschart/src/YAxisOptionsEditor.tsx | 2 +- .../src/annotations/AnnotationTooltip.tsx | 9 +- timeserieschart/src/getPluginModule.ts | 1 + timeserieschart/src/utils/annotation.ts | 2 +- .../src/utils/data-transform.test.ts | 1 + timeserieschart/src/utils/data-transform.ts | 5 +- timeseriestable/jest.config.ts | 1 + timeseriestable/package.json | 2 +- timeseriestable/rsbuild.config.ts | 1 + timeseriestable/src/TimeSeriesTable.ts | 3 +- .../src/TimeSeriesTablePanel.test.tsx | 3 +- timeseriestable/src/TimeSeriesTablePanel.tsx | 6 +- timeseriestable/src/components/DataTable.tsx | 3 +- .../src/components/EmbeddedPanel.tsx | 8 +- timeseriestable/src/components/SeriesName.tsx | 4 +- ...eSeriesTableItemSelectionActionsEditor.tsx | 1 + timeseriestable/src/getPluginModule.ts | 1 + tracetable/jest.config.ts | 1 + tracetable/package.json | 2 +- tracetable/rsbuild.config.ts | 1 + tracetable/src/DataTable.tsx | 13 +- tracetable/src/TraceTable.ts | 3 +- .../TraceTableItemSelectionActionsEditor.tsx | 1 + tracetable/src/TraceTablePanel.test.tsx | 7 +- tracetable/src/TraceTablePanel.tsx | 5 +- tracetable/src/getPluginModule.ts | 1 + tracetable/src/utils/utils.ts | 3 +- tracingganttchart/jest.config.ts | 1 + tracingganttchart/package.json | 2 +- tracingganttchart/rsbuild.config.ts | 1 + .../tests/valid/tracing-gantt-chart.json | 4 +- tracingganttchart/src/PanelActions.test.ts | 3 +- tracingganttchart/src/PanelActions.tsx | 6 +- tracingganttchart/src/TracingGanttChart.ts | 3 +- .../DetailPane/Attributes.test.tsx | 11 +- .../DetailPane/Attributes.tsx | 5 +- .../DetailPane/DetailPane.tsx | 5 +- .../DetailPane/SpanEvents.test.tsx | 10 +- .../DetailPane/SpanEvents.tsx | 11 +- .../DetailPane/SpanLinks.test.tsx | 11 +- .../DetailPane/SpanLinks.tsx | 5 +- .../GanttTable/GanttTable.test.tsx | 3 +- .../GanttTable/GanttTable.tsx | 9 +- .../GanttTable/GanttTableHeader.tsx | 3 +- .../GanttTable/GanttTableRow.tsx | 5 +- .../GanttTable/ResizableDivider.tsx | 2 +- .../GanttTable/SpanDuration.test.tsx | 3 +- .../GanttTable/SpanDuration.tsx | 5 +- .../GanttTable/SpanIndents.tsx | 1 + .../GanttTable/SpanLinksButton.tsx | 7 +- .../GanttTable/SpanName.test.tsx | 5 +- .../TracingGanttChart/GanttTable/SpanName.tsx | 5 +- .../MiniGanttChart/Canvas.tsx | 15 +- .../MiniGanttChart/MiniGanttChart.tsx | 5 +- .../src/TracingGanttChart/Search.test.tsx | 5 +- .../src/TracingGanttChart/Search.tsx | 5 +- .../src/TracingGanttChart/Ticks.test.tsx | 3 +- .../src/TracingGanttChart/Ticks.tsx | 5 +- .../TracingGanttChart/TraceHeaderBar.test.tsx | 7 +- .../src/TracingGanttChart/TraceHeaderBar.tsx | 7 +- .../TracingGanttChart/TracingGanttChart.tsx | 11 +- .../src/TracingGanttChart/trace.test.ts | 7 +- .../src/TracingGanttChart/trace.ts | 2 +- .../src/TracingGanttChart/utils.ts | 3 +- .../src/TracingGanttChartPanel.tsx | 7 +- tracingganttchart/src/getPluginModule.ts | 1 + .../src/test/traces/async_jaeger.json | 1361 +-- .../traces/authenticate_error_jaeger.json | 1232 +- .../src/test/traces/example_otlp.json | 183 +- victorialogs/jest.config.ts | 1 + victorialogs/package.json | 2 +- victorialogs/rsbuild.config.ts | 1 + victorialogs/src/components/logsql-editor.tsx | 3 +- .../src/components/logsql-extension.ts | 1 + .../VictoriaLogsDatasource.tsx | 1 + .../VictoriaLogsDatasourceEditor.tsx | 1 + victorialogs/src/getPluginModule.ts | 1 + .../VictoriaLogsLogQuery.tsx | 7 +- .../VictoriaLogsLogQueryEditor.tsx | 5 +- .../queries/victorialogs-log-query/query.ts | 3 +- .../victorialogs-log-query/types.test.ts | 3 +- .../VictoriaLogsTimeSeriesQuery.tsx | 5 +- .../VictoriaLogsTimeSeriesQueryEditor.tsx | 5 +- .../victorialogs-time-series-query/query.ts | 3 +- .../types.test.ts | 3 +- victorialogs/src/variables/types.ts | 1 + victorialogs/src/variables/utils.ts | 5 +- .../VictoriaLogsFieldNamesVariable.tsx | 3 +- .../VictoriaLogsFieldNamesVariableEditor.tsx | 1 + .../VictoriaLogsFieldValuesVariable.tsx | 1 + .../VictoriaLogsFieldValuesVariableEditor.tsx | 1 + 640 files changed, 7101 insertions(+), 8979 deletions(-) delete mode 100644 .eslintrc.js create mode 100644 .oxfmtrc.json create mode 100644 .oxlintrc.json delete mode 100644 .prettierrc.json diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index d6f111be2..000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright The Perses Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Base eslint configuration for typescript projects -module.exports = { - extends: [ - 'eslint:recommended', - 'plugin:react/recommended', - 'plugin:react-hooks/recommended', - 'plugin:jsx-a11y/recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:prettier/recommended', - ], - - plugins: ['import'], - - env: { - commonjs: true, - es6: true, - jest: true, - node: true, - browser: true, - }, - - parser: '@typescript-eslint/parser', - - parserOptions: { - ecmaVersion: 2018, - sourceType: 'module', - ecmaFeatures: { - jsx: true, - }, - }, - - settings: { - react: { - version: 'detect', - }, - }, - - rules: { - '@typescript-eslint/explicit-function-return-type': 'error', - '@typescript-eslint/explicit-module-boundary-types': 'error', - - 'prettier/prettier': 'error', - '@typescript-eslint/array-type': [ - 'error', - { - default: 'array-simple', - }, - ], - eqeqeq: ['error', 'always'], - 'import/order': 'error', - // you must disable the base rule as it can report incorrect errors - 'no-unused-vars': 'off', - '@typescript-eslint/no-unused-vars': [ - 'error', - { - argsIgnorePattern: '^_', - varsIgnorePattern: '^_', - caughtErrorsIgnorePattern: '^_', - }, - ], - - 'react/prop-types': 'off', - 'react-hooks/exhaustive-deps': 'error', - // Not necessary in React 17 - 'react/react-in-jsx-scope': 'off', - 'react/jsx-curly-brace-presence': ['error', { props: 'never', children: 'never', propElementValues: 'always' }], - - // We use this rule instead of the core eslint `no-duplicate-imports` - // because it avoids false errors on cases where we have a regular - // import and an `import type`. - 'import/no-duplicates': 'error', - - 'no-restricted-imports': [ - 'error', - { - patterns: [ - { - /** - * This library is gigantic and named imports end up slowing down builds/blowing out bundle sizes, - * so this prevents that style of import. - */ - group: ['mdi-material-ui', '!mdi-material-ui/'], - message: ` -Please use the default import from the icon file directly rather than using a named import. - -Good: -import IconName from 'mdi-material-ui/IconName'; - -Bad: -import { IconName } from 'mdi-material-ui'; -`, - }, - ], - }, - ], - }, - - ignorePatterns: ['**/dist'], -}; diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 81d3758eb..c382bc412 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -2,4 +2,4 @@ blank_issues_enabled: false contact_links: - name: Bug Report or Feature Request url: https://github.com/perses/perses/issues - about: Please open all issues in the perses/perses repository. \ No newline at end of file + about: Please open all issues in the perses/perses repository. diff --git a/.github/ISSUE_TEMPLATE/other.yml b/.github/ISSUE_TEMPLATE/other.yml index 6319cd020..a9a91bd47 100644 --- a/.github/ISSUE_TEMPLATE/other.yml +++ b/.github/ISSUE_TEMPLATE/other.yml @@ -1,7 +1,7 @@ --- name: Other description: Other kind of issue. -labels: [ "bug" ] +labels: ['bug'] body: - type: markdown attributes: @@ -11,4 +11,4 @@ body: Even if it concerns a specific plugin, if your issue is a feature request or bug report please create it in the [perses/perses](https://github.com/perses/perses/issues) repository instead. - type: textarea attributes: - label: Description \ No newline at end of file + label: Description diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7c5cbbcc5..925599006 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,29 +1,29 @@ version: 2 updates: - - package-ecosystem: "gomod" + - package-ecosystem: 'gomod' directories: - - "**/*" + - '**/*' open-pull-requests-limit: 10 schedule: - interval: "weekly" + interval: 'weekly' groups: gomod: patterns: - - "*" - - package-ecosystem: "github-actions" - directory: "/" + - '*' + - package-ecosystem: 'github-actions' + directory: '/' schedule: - interval: "weekly" + interval: 'weekly' groups: actions: patterns: - - "*" - - package-ecosystem: "docker" + - '*' + - package-ecosystem: 'docker' directories: - - "/" + - '/' schedule: - interval: "weekly" + interval: 'weekly' groups: docker: patterns: - - "*" + - '*' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5fe47e8ac..e41445832 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ on: jobs: build: - name: "build" + name: 'build' runs-on: ubuntu-latest steps: - name: checkout @@ -22,11 +22,11 @@ jobs: enable_npm: true enable_go: true enable_cue: true - cue_version: "v0.16.1" + cue_version: 'v0.16.1' - name: install percli uses: perses/cli-actions/actions/install_percli@v0.2.1 with: - cli-version: "v0.54.0" + cli-version: 'v0.54.0' - name: cache cue deps uses: actions/cache@v6 with: @@ -52,7 +52,7 @@ jobs: !node_modules e2e: - name: "e2e tests" + name: 'e2e tests' needs: build # <--- CRITICAL: Wait for build to finish. PERSES_PLUGIN_ARCHIVE_PATHS accepts archive files only runs-on: ubuntu-latest steps: @@ -72,12 +72,12 @@ jobs: - name: start dev env uses: hoverkraft-tech/compose-action@v3.1.0 with: - compose-file: .github/dev/docker-compose.ci.yml + compose-file: .github/dev/docker-compose.ci.yml - uses: perses/github-actions@v0.12.0 - uses: ./.github/perses-ci/actions/setup_environment with: enable_npm: true - nvmrc_path: ".nvmrc" + nvmrc_path: '.nvmrc' - name: install dependencies run: npm ci - name: install Playwright browsers @@ -87,8 +87,8 @@ jobs: run: npm run test:ci --prefix e2e -- src/tests release: - name: "release" - needs: "build" + name: 'release' + needs: 'build' runs-on: ubuntu-latest permissions: contents: write @@ -104,8 +104,8 @@ jobs: enable_npm: true enable_go: true enable_cue: true - cue_version: "v0.16.1" - nvmrc_path: "./.nvmrc" + cue_version: 'v0.16.1' + nvmrc_path: './.nvmrc' - name: Download archive uses: actions/download-artifact@v8 with: diff --git a/.github/workflows/cue.yml b/.github/workflows/cue.yml index 27d7303e8..28807cf0d 100644 --- a/.github/workflows/cue.yml +++ b/.github/workflows/cue.yml @@ -8,7 +8,7 @@ on: jobs: checkformat-cue: - name: "Check CUE files format" + name: 'Check CUE files format' runs-on: ubuntu-latest steps: - name: checkout @@ -18,10 +18,10 @@ jobs: with: enable_go: true enable_cue: true - cue_version: "v0.16.1" + cue_version: 'v0.16.1' - run: make checkformat-cue validate-schemas: - name: "Validate plugin schemas" + name: 'Validate plugin schemas' runs-on: ubuntu-latest steps: - name: checkout @@ -31,11 +31,11 @@ jobs: with: enable_go: true enable_cue: true - cue_version: "v0.16.1" + cue_version: 'v0.16.1' - name: Install percli uses: perses/cli-actions/actions/install_percli@v0.2.1 with: - cli-version: "v0.54.0" + cli-version: 'v0.54.0' - uses: actions/cache@v6 id: cache with: @@ -47,7 +47,7 @@ jobs: - run: make test-schemas-plugins module-check: - name: "Check plugin modules" + name: 'Check plugin modules' runs-on: ubuntu-latest steps: - name: checkout @@ -57,7 +57,7 @@ jobs: with: enable_go: true enable_cue: true - cue_version: "v0.16.1" + cue_version: 'v0.16.1' - uses: actions/cache@v6 id: cache with: diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 697fc2683..ebaeee194 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -12,7 +12,7 @@ on: jobs: docs-fmt: - name: "Check docs format" + name: 'Check docs format' runs-on: ubuntu-latest steps: - name: checkout @@ -25,5 +25,3 @@ jobs: run: go install github.com/bwplotka/mdox@latest - name: check docs run: make checkdocs - - diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 2aa53be6b..a278623ff 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -12,7 +12,7 @@ concurrency: jobs: test-go: - name: "test-go" + name: 'test-go' runs-on: ubuntu-latest steps: - name: checkout @@ -22,7 +22,7 @@ jobs: with: enable_go: true enable_cue: true # needed for DaC CLI commands unit tests - cue_version: "v0.16.1" + cue_version: 'v0.16.1' - name: test run: make test golangci: @@ -44,7 +44,7 @@ jobs: version: v2.12.2 - run: make golangci-lint checklicense: - name: "check license headers" + name: 'check license headers' runs-on: ubuntu-latest steps: - name: checkout diff --git a/.github/workflows/react.yml b/.github/workflows/react.yml index 9e4316706..657ad1000 100644 --- a/.github/workflows/react.yml +++ b/.github/workflows/react.yml @@ -8,7 +8,7 @@ on: jobs: lint-npm: - name: "lint-npm" + name: 'lint-npm' runs-on: ubuntu-latest steps: - name: checkout @@ -18,9 +18,10 @@ jobs: with: enable_npm: true - run: npm ci - - run: npm run lint + - run: npm run lint:ci + - run: npm run format:check test-npm: - name: "test-npm" + name: 'test-npm' runs-on: ubuntu-latest steps: - name: checkout @@ -33,7 +34,7 @@ jobs: - run: npm run test type-check: - name: "type-check" + name: 'type-check' runs-on: ubuntu-latest steps: - name: checkout diff --git a/.mdox.validate.yaml b/.mdox.validate.yaml index ee8fde261..ececffe01 100644 --- a/.mdox.validate.yaml +++ b/.mdox.validate.yaml @@ -9,4 +9,4 @@ validators: type: 'ignore' # getting 403 forbidden in the CI - regex: 'npmjs\.com' - type: 'ignore' \ No newline at end of file + type: 'ignore' diff --git a/.oxfmtrc.json b/.oxfmtrc.json new file mode 100644 index 000000000..60c475e65 --- /dev/null +++ b/.oxfmtrc.json @@ -0,0 +1,18 @@ +{ + "$schema": "./node_modules/oxfmt/configuration_schema.json", + "printWidth": 120, + "singleQuote": true, + "trailingComma": "es5", + "sortImports": {}, + "sortPackageJson": false, + "ignorePatterns": [ + "**/dist", + "**/lib", + "**/*.md", + "**/*.mdx", + "**/mock-query-range.json", + "package-lock.json", + ".github/perses-ci", + ".github/perses-ci/**" + ] +} diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 000000000..819f09ecf --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,57 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["eslint", "typescript", "unicorn", "oxc", "import", "react", "react-perf", "jsx-a11y"], + "categories": { + "correctness": "error", + "suspicious": "warn", + "perf": "warn" + }, + "env": { + "commonjs": true, + "es6": true, + "jest": true, + "node": true, + "browser": true + }, + "rules": { + "typescript/explicit-function-return-type": "error", + "typescript/explicit-module-boundary-types": "error", + "typescript/array-type": ["error", { "default": "array-simple" }], + "eqeqeq": ["error", "always"], + "no-unused-vars": [ + "error", + { + "argsIgnorePattern": "^_", + "varsIgnorePattern": "^_", + "caughtErrorsIgnorePattern": "^_" + } + ], + "no-nested-ternary": "error", + "react/react-in-jsx-scope": "off", + "react/rules-of-hooks": "error", + "react/checked-requires-onchange-or-readonly": "error", + "react/display-name": "error", + "react/jsx-no-target-blank": "error", + "react/jsx-no-useless-fragment": "warn", + "react/no-unescaped-entities": "error", + "react/exhaustive-deps": "error", + "react/react-compiler": "warn", + "react/jsx-curly-brace-presence": [ + "error", + { "props": "never", "children": "never", "propElementValues": "always" } + ], + "import/no-duplicates": "error", + "no-restricted-imports": [ + "error", + { + "patterns": [ + { + "group": ["mdi-material-ui", "!mdi-material-ui/"], + "message": "Please use the default import from the icon file directly rather than using a named import.\n\nGood:\nimport IconName from 'mdi-material-ui/IconName';\n\nBad:\nimport { IconName } from 'mdi-material-ui';" + } + ] + } + ] + }, + "ignorePatterns": ["**/dist", "**/lib"] +} diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index 9d5ce399a..000000000 --- a/.prettierrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "printWidth": 120, - "singleQuote": true, - "trailingComma": "es5" -} diff --git a/alertmanager/jest.config.ts b/alertmanager/jest.config.ts index 5190fb4de..16027133b 100644 --- a/alertmanager/jest.config.ts +++ b/alertmanager/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/alertmanager/package.json b/alertmanager/package.json index 153bcc725..ae4e331da 100644 --- a/alertmanager/package.json +++ b/alertmanager/package.json @@ -18,7 +18,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/alertmanager/rsbuild.config.ts b/alertmanager/rsbuild.config.ts index ff31fd5af..a3f05e5b4 100644 --- a/alertmanager/rsbuild.config.ts +++ b/alertmanager/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/alertmanager/src/components/ColumnsEditor.tsx b/alertmanager/src/components/ColumnsEditor.tsx index 707abbf9f..91aaab7c8 100644 --- a/alertmanager/src/components/ColumnsEditor.tsx +++ b/alertmanager/src/components/ColumnsEditor.tsx @@ -27,8 +27,8 @@ import { Typography, } from '@mui/material'; import { OptionsEditorGroup } from '@perses-dev/components'; -import ArrowUpIcon from 'mdi-material-ui/ArrowUp'; import ArrowDownIcon from 'mdi-material-ui/ArrowDown'; +import ArrowUpIcon from 'mdi-material-ui/ArrowUp'; import DeleteIcon from 'mdi-material-ui/Delete'; import PlusIcon from 'mdi-material-ui/Plus'; import { ReactElement, useCallback, useRef } from 'react'; diff --git a/alertmanager/src/components/MatcherEditor.tsx b/alertmanager/src/components/MatcherEditor.tsx index d5020b237..028dabb68 100644 --- a/alertmanager/src/components/MatcherEditor.tsx +++ b/alertmanager/src/components/MatcherEditor.tsx @@ -11,7 +11,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, useId } from 'react'; import { IconButton, MenuItem, @@ -23,6 +22,7 @@ import { SelectChangeEvent, } from '@mui/material'; import DeleteIcon from 'mdi-material-ui/Delete'; +import { ReactElement, useId } from 'react'; export interface MatcherValue { name: string; diff --git a/alertmanager/src/components/MatchersList.test.tsx b/alertmanager/src/components/MatchersList.test.tsx index e8e4b9c28..08a025d6d 100644 --- a/alertmanager/src/components/MatchersList.test.tsx +++ b/alertmanager/src/components/MatchersList.test.tsx @@ -12,6 +12,7 @@ // limitations under the License. import { render, screen } from '@testing-library/react'; + import { MatchersList } from './MatchersList'; describe('MatchersList', () => { diff --git a/alertmanager/src/components/SilenceForm.tsx b/alertmanager/src/components/SilenceForm.tsx index b374c1903..34a575766 100644 --- a/alertmanager/src/components/SilenceForm.tsx +++ b/alertmanager/src/components/SilenceForm.tsx @@ -14,6 +14,7 @@ import { Button, Dialog, DialogActions, DialogContent, DialogTitle, Stack, TextField, Typography } from '@mui/material'; import AddIcon from 'mdi-material-ui/Plus'; import { ReactElement, useState } from 'react'; + import { PostableSilence } from '../model/api-types'; import { MatcherEditor, MatcherValue } from './MatcherEditor'; diff --git a/alertmanager/src/components/StatusBadge.test.tsx b/alertmanager/src/components/StatusBadge.test.tsx index f282695b1..2beb5f740 100644 --- a/alertmanager/src/components/StatusBadge.test.tsx +++ b/alertmanager/src/components/StatusBadge.test.tsx @@ -12,6 +12,7 @@ // limitations under the License. import { render, screen } from '@testing-library/react'; + import { StatusBadge } from './StatusBadge'; describe('StatusBadge', () => { diff --git a/alertmanager/src/components/StatusBadge.tsx b/alertmanager/src/components/StatusBadge.tsx index a45864c84..f6d0b54d9 100644 --- a/alertmanager/src/components/StatusBadge.tsx +++ b/alertmanager/src/components/StatusBadge.tsx @@ -11,8 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement } from 'react'; import { Chip, ChipProps } from '@mui/material'; +import { ReactElement } from 'react'; export interface StatusBadgeProps { status: string; diff --git a/alertmanager/src/explore/AlertManagerAlertsExplorer.tsx b/alertmanager/src/explore/AlertManagerAlertsExplorer.tsx index e68892787..613777b6f 100644 --- a/alertmanager/src/explore/AlertManagerAlertsExplorer.tsx +++ b/alertmanager/src/explore/AlertManagerAlertsExplorer.tsx @@ -11,12 +11,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, useState } from 'react'; import { Box, Stack } from '@mui/material'; -import { DataQueriesProvider, MultiQueryEditor } from '@perses-dev/plugin-system'; import { Panel } from '@perses-dev/dashboards'; import { useExplorerManagerContext } from '@perses-dev/explore'; +import { DataQueriesProvider, MultiQueryEditor } from '@perses-dev/plugin-system'; import { QueryDefinition } from '@perses-dev/spec'; +import { ReactElement, useState } from 'react'; interface AlertsExplorerQueryParams { queries?: QueryDefinition[]; diff --git a/alertmanager/src/explore/AlertManagerSilencesExplorer.tsx b/alertmanager/src/explore/AlertManagerSilencesExplorer.tsx index dd0167743..83cb8c619 100644 --- a/alertmanager/src/explore/AlertManagerSilencesExplorer.tsx +++ b/alertmanager/src/explore/AlertManagerSilencesExplorer.tsx @@ -11,15 +11,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, useCallback, useMemo, useRef, useState } from 'react'; import { Box, Button, Stack } from '@mui/material'; -import BellOffIcon from 'mdi-material-ui/BellOff'; -import { DataQueriesProvider, MultiQueryEditor, useDatasourceClient } from '@perses-dev/plugin-system'; +import { useSnackbar } from '@perses-dev/components'; import { Panel } from '@perses-dev/dashboards'; import { useExplorerManagerContext } from '@perses-dev/explore'; +import { DataQueriesProvider, MultiQueryEditor, useDatasourceClient } from '@perses-dev/plugin-system'; import { DatasourceSelector, QueryDefinition } from '@perses-dev/spec'; -import { useSnackbar } from '@perses-dev/components'; import { useQueryClient } from '@tanstack/react-query'; +import BellOffIcon from 'mdi-material-ui/BellOff'; +import { ReactElement, useCallback, useMemo, useRef, useState } from 'react'; + import { SilenceForm } from '../components/SilenceForm'; import { AlertManagerClient, DEFAULT_ALERTMANAGER, PostableSilence } from '../model'; diff --git a/alertmanager/src/getPluginModule.ts b/alertmanager/src/getPluginModule.ts index 2bf440477..2c762611b 100644 --- a/alertmanager/src/getPluginModule.ts +++ b/alertmanager/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; export function getPluginModule(): PluginModuleResource { diff --git a/alertmanager/src/model/alertmanager-client.ts b/alertmanager/src/model/alertmanager-client.ts index 2229adcaa..4890a96e7 100644 --- a/alertmanager/src/model/alertmanager-client.ts +++ b/alertmanager/src/model/alertmanager-client.ts @@ -13,6 +13,7 @@ import { fetch, RequestHeaders } from '@perses-dev/client'; import { DatasourceClient } from '@perses-dev/plugin-system'; + import { AlertManagerStatus, AlertsQueryParams, @@ -57,7 +58,7 @@ const executeRequest = async (...args: Parameters): Promise return await response.json(); } catch (e) { console.error('Invalid response from server', e); - throw new Error('Invalid response from server'); + throw new Error('Invalid response from server', { cause: e }); } }; diff --git a/alertmanager/src/model/alertmanager-selectors.ts b/alertmanager/src/model/alertmanager-selectors.ts index 75a772983..382e191ee 100644 --- a/alertmanager/src/model/alertmanager-selectors.ts +++ b/alertmanager/src/model/alertmanager-selectors.ts @@ -11,8 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { DatasourceSelector, QueryDefinition } from '@perses-dev/spec'; import { DatasourceSelectValue, isVariableDatasource } from '@perses-dev/plugin-system'; +import { DatasourceSelector, QueryDefinition } from '@perses-dev/spec'; export const ALERTMANAGER_DATASOURCE_KIND = 'AlertManagerDatasource' as const; diff --git a/alertmanager/src/plugins/AlertManagerDatasourceEditor.tsx b/alertmanager/src/plugins/AlertManagerDatasourceEditor.tsx index 2fb1bff20..ff83ce0ea 100644 --- a/alertmanager/src/plugins/AlertManagerDatasourceEditor.tsx +++ b/alertmanager/src/plugins/AlertManagerDatasourceEditor.tsx @@ -13,6 +13,7 @@ import { HTTPSettingsEditor } from '@perses-dev/plugin-system'; import { ReactElement } from 'react'; + import { AlertManagerDatasourceSpec } from './types'; export interface AlertManagerDatasourceEditorProps { diff --git a/alertmanager/src/plugins/alert-table/AlertTable.ts b/alertmanager/src/plugins/alert-table/AlertTable.ts index 6b359931b..b267de2c4 100644 --- a/alertmanager/src/plugins/alert-table/AlertTable.ts +++ b/alertmanager/src/plugins/alert-table/AlertTable.ts @@ -12,12 +12,13 @@ // limitations under the License. import { PanelPlugin } from '@perses-dev/plugin-system'; + +import { AlertTableOptions } from './alert-table-model'; import { AlertTableColumnsEditor } from './AlertTableColumnsEditor'; import { AlertTableDeduplicationEditor } from './AlertTableDeduplicationEditor'; import { AlertTableLabelsEditor } from './AlertTableLabelsEditor'; import { AlertTableOptionsEditor } from './AlertTableOptionsEditor'; import { AlertTablePanel, AlertTablePanelProps } from './AlertTablePanel'; -import { AlertTableOptions } from './alert-table-model'; /** * Panel plugin for displaying Alert Manager alerts in a hierarchical table. diff --git a/alertmanager/src/plugins/alert-table/AlertTableColumnsEditor.tsx b/alertmanager/src/plugins/alert-table/AlertTableColumnsEditor.tsx index 9a679b6fa..b8c550577 100644 --- a/alertmanager/src/plugins/alert-table/AlertTableColumnsEditor.tsx +++ b/alertmanager/src/plugins/alert-table/AlertTableColumnsEditor.tsx @@ -15,6 +15,7 @@ import { TextField } from '@mui/material'; import { OptionsEditorProps } from '@perses-dev/plugin-system'; import { produce } from 'immer'; import { ReactElement, useCallback } from 'react'; + import { ColumnsEditor } from '../../components/ColumnsEditor'; import { AlertTableOptions, ColumnDefinition, ColumnSortMode } from './alert-table-model'; diff --git a/alertmanager/src/plugins/alert-table/AlertTableDeduplicationEditor.tsx b/alertmanager/src/plugins/alert-table/AlertTableDeduplicationEditor.tsx index 116d686ef..2ab83ca3a 100644 --- a/alertmanager/src/plugins/alert-table/AlertTableDeduplicationEditor.tsx +++ b/alertmanager/src/plugins/alert-table/AlertTableDeduplicationEditor.tsx @@ -16,6 +16,7 @@ import { OptionsEditorGroup } from '@perses-dev/components'; import { OptionsEditorProps } from '@perses-dev/plugin-system'; import { produce } from 'immer'; import { ReactElement, SyntheticEvent, useCallback } from 'react'; + import { AlertDeduplicationConfig, AlertTableOptions } from './alert-table-model'; const MODE_DESCRIPTIONS: Record = { diff --git a/alertmanager/src/plugins/alert-table/AlertTableLabelsEditor.tsx b/alertmanager/src/plugins/alert-table/AlertTableLabelsEditor.tsx index e770b3d68..72c8b1b4c 100644 --- a/alertmanager/src/plugins/alert-table/AlertTableLabelsEditor.tsx +++ b/alertmanager/src/plugins/alert-table/AlertTableLabelsEditor.tsx @@ -32,6 +32,7 @@ import { produce } from 'immer'; import DeleteIcon from 'mdi-material-ui/Delete'; import PlusIcon from 'mdi-material-ui/Plus'; import { ReactElement, useCallback } from 'react'; + import { AlertTableOptions, LabelColorMapping, LabelColorOverride } from './alert-table-model'; const MODE_LABELS: Record = { diff --git a/alertmanager/src/plugins/alert-table/AlertTableOptionsEditor.tsx b/alertmanager/src/plugins/alert-table/AlertTableOptionsEditor.tsx index 2692b3bcd..b2f5d7cea 100644 --- a/alertmanager/src/plugins/alert-table/AlertTableOptionsEditor.tsx +++ b/alertmanager/src/plugins/alert-table/AlertTableOptionsEditor.tsx @@ -16,6 +16,7 @@ import { OptionsEditorGroup } from '@perses-dev/components'; import { OptionsEditorProps } from '@perses-dev/plugin-system'; import { produce } from 'immer'; import { ChangeEvent, ReactElement, SyntheticEvent, useCallback } from 'react'; + import { AlertAction, AlertTableOptions, ALL_ALERT_ACTIONS } from './alert-table-model'; const ACTION_LABELS: Record = { diff --git a/alertmanager/src/plugins/alert-table/AlertTablePanel.tsx b/alertmanager/src/plugins/alert-table/AlertTablePanel.tsx index 6084e9ab0..4192f00bd 100644 --- a/alertmanager/src/plugins/alert-table/AlertTablePanel.tsx +++ b/alertmanager/src/plugins/alert-table/AlertTablePanel.tsx @@ -51,6 +51,7 @@ import MagnifyIcon from 'mdi-material-ui/Magnify'; import UnfoldLessHorizontalIcon from 'mdi-material-ui/UnfoldLessHorizontal'; import UnfoldMoreHorizontalIcon from 'mdi-material-ui/UnfoldMoreHorizontal'; import { ReactElement, useCallback, useEffect, useMemo, useRef, useState } from 'react'; + import { SilenceForm } from '../../components/SilenceForm'; import { StatusBadge } from '../../components/StatusBadge'; import { AlertManagerClient, extractDatasourceSelector } from '../../model'; @@ -110,7 +111,7 @@ function LabelValueSummaryChips({ return ( {Object.entries(counts) - .sort(([, a], [, b]) => b - a) + .toSorted(([, a], [, b]) => b - a) .map(([value, count]) => { const bgColor = getLabelColor(value, mapping); return ( @@ -288,7 +289,7 @@ function AlertGroupRow({ {Object.entries(counts) - .sort(([, a], [, b]) => b - a) + .toSorted(([, a], [, b]) => b - a) .map(([value, count]) => ( ))} diff --git a/alertmanager/src/plugins/alert-table/alert-table-model.test.ts b/alertmanager/src/plugins/alert-table/alert-table-model.test.ts index e87f93b4e..647f19673 100644 --- a/alertmanager/src/plugins/alert-table/alert-table-model.test.ts +++ b/alertmanager/src/plugins/alert-table/alert-table-model.test.ts @@ -12,6 +12,7 @@ // limitations under the License. import { Alert } from '@perses-dev/spec'; + import { deduplicateAlerts, extractLabelKeys, getGroupKey, getGroupSummary } from './alert-table-model'; const makeAlert = (overrides: Partial = {}): Alert => ({ diff --git a/alertmanager/src/plugins/alert-table/alert-table-model.ts b/alertmanager/src/plugins/alert-table/alert-table-model.ts index 26aec4ecb..243d77db7 100644 --- a/alertmanager/src/plugins/alert-table/alert-table-model.ts +++ b/alertmanager/src/plugins/alert-table/alert-table-model.ts @@ -12,6 +12,7 @@ // limitations under the License. import { Alert } from '@perses-dev/spec'; + import { getEffectiveStatus, SORT_COL_ALERTNAME, SORT_COL_STATUS } from './alert-table-sorting'; /** @@ -130,7 +131,7 @@ export function extractLabelKeys(alerts: Alert[]): string[] { keys.add(key); } } - return Array.from(keys).sort(); + return Array.from(keys).toSorted(); } /** diff --git a/alertmanager/src/plugins/alert-table/alert-table-sorting.test.ts b/alertmanager/src/plugins/alert-table/alert-table-sorting.test.ts index 067fe2c6c..527d1a207 100644 --- a/alertmanager/src/plugins/alert-table/alert-table-sorting.test.ts +++ b/alertmanager/src/plugins/alert-table/alert-table-sorting.test.ts @@ -12,6 +12,7 @@ // limitations under the License. import { Alert } from '@perses-dev/spec'; + import { compareAlertsByColumn, compareGroupsByColumn, diff --git a/alertmanager/src/plugins/alert-table/alert-table-sorting.ts b/alertmanager/src/plugins/alert-table/alert-table-sorting.ts index da24941f0..0a75c8de2 100644 --- a/alertmanager/src/plugins/alert-table/alert-table-sorting.ts +++ b/alertmanager/src/plugins/alert-table/alert-table-sorting.ts @@ -12,6 +12,7 @@ // limitations under the License. import { Alert } from '@perses-dev/spec'; + import { ColumnSortMode, SortDirection } from './alert-table-model'; import { getSeverityWeight, SEVERITY_ORDER } from './label-colors'; diff --git a/alertmanager/src/plugins/alertmanager-alerts-query/AlertManagerAlertsQuery.ts b/alertmanager/src/plugins/alertmanager-alerts-query/AlertManagerAlertsQuery.ts index 271bb4f32..6ee098be4 100644 --- a/alertmanager/src/plugins/alertmanager-alerts-query/AlertManagerAlertsQuery.ts +++ b/alertmanager/src/plugins/alertmanager-alerts-query/AlertManagerAlertsQuery.ts @@ -12,9 +12,10 @@ // limitations under the License. import { AlertsQueryPlugin, isVariableDatasource, parseVariables } from '@perses-dev/plugin-system'; + import { AlertManagerAlertsQuerySpec } from '../types'; -import { getAlertsData } from './get-alerts-data'; import { AlertManagerAlertsQueryEditor } from './AlertManagerAlertsQueryEditor'; +import { getAlertsData } from './get-alerts-data'; export const AlertManagerAlertsQuery: AlertsQueryPlugin = { getAlertsData, diff --git a/alertmanager/src/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.tsx b/alertmanager/src/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.tsx index 2ddfd4f46..b4d75cf2c 100644 --- a/alertmanager/src/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.tsx +++ b/alertmanager/src/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.tsx @@ -16,6 +16,7 @@ import { useId } from '@perses-dev/components'; import { DatasourceSelect, DatasourceSelectProps } from '@perses-dev/plugin-system'; import { produce } from 'immer'; import { ReactElement, useCallback } from 'react'; + import { LazyTextField } from '../../components/LazyTextField'; import { ALERTMANAGER_DATASOURCE_KIND, diff --git a/alertmanager/src/plugins/alertmanager-alerts-query/get-alerts-data.test.ts b/alertmanager/src/plugins/alertmanager-alerts-query/get-alerts-data.test.ts index 619e514f9..4855b91b9 100644 --- a/alertmanager/src/plugins/alertmanager-alerts-query/get-alerts-data.test.ts +++ b/alertmanager/src/plugins/alertmanager-alerts-query/get-alerts-data.test.ts @@ -12,6 +12,7 @@ // limitations under the License. import { AlertsQueryContext } from '@perses-dev/plugin-system'; + import { AlertManagerClient, GettableAlert } from '../../model'; import { AlertManagerDatasource } from '../alertmanager-datasource'; import { AlertManagerAlertsQuerySpec } from '../types'; diff --git a/alertmanager/src/plugins/alertmanager-alerts-query/get-alerts-data.ts b/alertmanager/src/plugins/alertmanager-alerts-query/get-alerts-data.ts index 5dbb9f05a..50f8cf884 100644 --- a/alertmanager/src/plugins/alertmanager-alerts-query/get-alerts-data.ts +++ b/alertmanager/src/plugins/alertmanager-alerts-query/get-alerts-data.ts @@ -13,6 +13,7 @@ import { AlertsQueryContext, datasourceSelectValueToSelector, replaceVariables } from '@perses-dev/plugin-system'; import { Alert, AlertState, AlertsData, SuppressionRule } from '@perses-dev/spec'; + import { ALERTMANAGER_DATASOURCE_KIND, AlertManagerClient, DEFAULT_ALERTMANAGER, GettableAlert } from '../../model'; import { AlertManagerAlertsQuerySpec } from '../types'; diff --git a/alertmanager/src/plugins/alertmanager-datasource.tsx b/alertmanager/src/plugins/alertmanager-datasource.tsx index ee858da76..652c9a938 100644 --- a/alertmanager/src/plugins/alertmanager-datasource.tsx +++ b/alertmanager/src/plugins/alertmanager-datasource.tsx @@ -12,6 +12,7 @@ // limitations under the License. import { DatasourcePlugin } from '@perses-dev/plugin-system'; + import { AlertManagerClient, getAlerts, @@ -21,8 +22,8 @@ import { deleteSilence, getStatus, } from '../model'; -import { AlertManagerDatasourceSpec } from './types'; import { AlertManagerDatasourceEditor } from './AlertManagerDatasourceEditor'; +import { AlertManagerDatasourceSpec } from './types'; const createClient: DatasourcePlugin['createClient'] = ( spec, diff --git a/alertmanager/src/plugins/alertmanager-silences-query/AlertManagerSilencesQuery.ts b/alertmanager/src/plugins/alertmanager-silences-query/AlertManagerSilencesQuery.ts index 542986368..7ee086f32 100644 --- a/alertmanager/src/plugins/alertmanager-silences-query/AlertManagerSilencesQuery.ts +++ b/alertmanager/src/plugins/alertmanager-silences-query/AlertManagerSilencesQuery.ts @@ -12,9 +12,10 @@ // limitations under the License. import { isVariableDatasource, parseVariables, SilencesQueryPlugin } from '@perses-dev/plugin-system'; + import { AlertManagerSilencesQuerySpec } from '../types'; -import { getSilencesData } from './get-silences-data'; import { AlertManagerSilencesQueryEditor } from './AlertManagerSilencesQueryEditor'; +import { getSilencesData } from './get-silences-data'; export const AlertManagerSilencesQuery: SilencesQueryPlugin = { getSilencesData, diff --git a/alertmanager/src/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.tsx b/alertmanager/src/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.tsx index ce30c3caf..525da3a29 100644 --- a/alertmanager/src/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.tsx +++ b/alertmanager/src/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.tsx @@ -16,6 +16,7 @@ import { useId } from '@perses-dev/components'; import { DatasourceSelect, DatasourceSelectProps } from '@perses-dev/plugin-system'; import { produce } from 'immer'; import { ReactElement, useCallback } from 'react'; + import { LazyTextField } from '../../components/LazyTextField'; import { ALERTMANAGER_DATASOURCE_KIND, diff --git a/alertmanager/src/plugins/alertmanager-silences-query/get-silences-data.test.ts b/alertmanager/src/plugins/alertmanager-silences-query/get-silences-data.test.ts index 1ec11e708..ad2214653 100644 --- a/alertmanager/src/plugins/alertmanager-silences-query/get-silences-data.test.ts +++ b/alertmanager/src/plugins/alertmanager-silences-query/get-silences-data.test.ts @@ -12,6 +12,7 @@ // limitations under the License. import { SilencesQueryContext } from '@perses-dev/plugin-system'; + import { AlertManagerClient } from '../../model'; import { AlertManagerDatasource } from '../alertmanager-datasource'; import { AlertManagerSilencesQuerySpec } from '../types'; diff --git a/alertmanager/src/plugins/alertmanager-silences-query/get-silences-data.ts b/alertmanager/src/plugins/alertmanager-silences-query/get-silences-data.ts index f633b2ecd..0c40dfcea 100644 --- a/alertmanager/src/plugins/alertmanager-silences-query/get-silences-data.ts +++ b/alertmanager/src/plugins/alertmanager-silences-query/get-silences-data.ts @@ -13,6 +13,7 @@ import { datasourceSelectValueToSelector, replaceVariables, SilencesQueryContext } from '@perses-dev/plugin-system'; import { Silence, SilencesData } from '@perses-dev/spec'; + import { ALERTMANAGER_DATASOURCE_KIND, AlertManagerClient, DEFAULT_ALERTMANAGER, GettableSilence } from '../../model'; import { AlertManagerSilencesQuerySpec } from '../types'; /** diff --git a/alertmanager/src/plugins/silence-table/SilenceTable.ts b/alertmanager/src/plugins/silence-table/SilenceTable.ts index 9d5b82194..e928d4686 100644 --- a/alertmanager/src/plugins/silence-table/SilenceTable.ts +++ b/alertmanager/src/plugins/silence-table/SilenceTable.ts @@ -12,10 +12,11 @@ // limitations under the License. import { PanelPlugin } from '@perses-dev/plugin-system'; + +import { SilenceTableOptions } from './silence-table-model'; import { SilenceTableColumnsEditor } from './SilenceTableColumnsEditor'; import { SilenceTableOptionsEditor } from './SilenceTableOptionsEditor'; import { SilenceTablePanel } from './SilenceTablePanel'; -import { SilenceTableOptions } from './silence-table-model'; /** * Panel plugin for displaying Alert Manager silences in a table. diff --git a/alertmanager/src/plugins/silence-table/SilenceTableColumnsEditor.tsx b/alertmanager/src/plugins/silence-table/SilenceTableColumnsEditor.tsx index bf68b7254..2dfce0580 100644 --- a/alertmanager/src/plugins/silence-table/SilenceTableColumnsEditor.tsx +++ b/alertmanager/src/plugins/silence-table/SilenceTableColumnsEditor.tsx @@ -15,6 +15,7 @@ import { FormControl, InputLabel, MenuItem, Select } from '@mui/material'; import { OptionsEditorProps } from '@perses-dev/plugin-system'; import { produce } from 'immer'; import { ReactElement, useCallback } from 'react'; + import { ColumnsEditor } from '../../components/ColumnsEditor'; import { DEFAULT_COLUMN_HEADERS, diff --git a/alertmanager/src/plugins/silence-table/SilenceTableOptionsEditor.tsx b/alertmanager/src/plugins/silence-table/SilenceTableOptionsEditor.tsx index 93bbd1567..6fa317d3d 100644 --- a/alertmanager/src/plugins/silence-table/SilenceTableOptionsEditor.tsx +++ b/alertmanager/src/plugins/silence-table/SilenceTableOptionsEditor.tsx @@ -16,6 +16,7 @@ import { OptionsEditorGroup } from '@perses-dev/components'; import { OptionsEditorProps } from '@perses-dev/plugin-system'; import { produce } from 'immer'; import { ReactElement, useCallback } from 'react'; + import { ALL_SILENCE_ACTIONS, SilenceAction, SilenceTableOptions } from './silence-table-model'; const ACTION_LABELS: Record = { diff --git a/alertmanager/src/plugins/silence-table/SilenceTablePanel.tsx b/alertmanager/src/plugins/silence-table/SilenceTablePanel.tsx index a5ab19125..1aaf8df25 100644 --- a/alertmanager/src/plugins/silence-table/SilenceTablePanel.tsx +++ b/alertmanager/src/plugins/silence-table/SilenceTablePanel.tsx @@ -34,6 +34,7 @@ import { useQueryClient } from '@tanstack/react-query'; import DeleteIcon from 'mdi-material-ui/Delete'; import MagnifyIcon from 'mdi-material-ui/Magnify'; import { ReactElement, useCallback, useMemo, useState } from 'react'; + import { MatchersList } from '../../components/MatchersList'; import { StatusBadge } from '../../components/StatusBadge'; import { AlertManagerClient, extractDatasourceSelector } from '../../model'; @@ -203,7 +204,7 @@ export function SilenceTablePanel({ spec, queryResults, contentDimensions }: Sil const silences = useMemo(() => { if (!sortState) return filteredSilences; - return [...filteredSilences].sort((a, b) => compareSilencesByColumn(a, b, sortState)); + return [...filteredSilences].toSorted((a, b) => compareSilencesByColumn(a, b, sortState)); }, [filteredSilences, sortState]); if (allSilences.length === 0) { diff --git a/alertmanager/src/plugins/silence-table/silence-table-model.test.ts b/alertmanager/src/plugins/silence-table/silence-table-model.test.ts index dad189c96..ff8e8447b 100644 --- a/alertmanager/src/plugins/silence-table/silence-table-model.test.ts +++ b/alertmanager/src/plugins/silence-table/silence-table-model.test.ts @@ -12,6 +12,7 @@ // limitations under the License. import { Silence } from '@perses-dev/spec'; + import { getSilenceDuration, getSilenceFieldValue, inferSortMode } from './silence-table-model'; const makeSilence = (overrides: Partial = {}): Silence => ({ diff --git a/alertmanager/src/plugins/silence-table/silence-table-model.ts b/alertmanager/src/plugins/silence-table/silence-table-model.ts index 586c8728e..b8833dcf7 100644 --- a/alertmanager/src/plugins/silence-table/silence-table-model.ts +++ b/alertmanager/src/plugins/silence-table/silence-table-model.ts @@ -22,7 +22,14 @@ export type SortDirection = 'asc' | 'desc'; export type SilenceColumnSortMode = 'alphabetical' | 'date' | 'status'; export type SilenceFieldName = - 'status' | 'matchers' | 'createdBy' | 'startsAt' | 'endsAt' | 'duration' | 'comment' | 'updatedAt'; + | 'status' + | 'matchers' + | 'createdBy' + | 'startsAt' + | 'endsAt' + | 'duration' + | 'comment' + | 'updatedAt'; export interface SilenceColumnDefinition { name: SilenceFieldName; diff --git a/alertmanager/src/plugins/silence-table/silence-table-sorting.test.ts b/alertmanager/src/plugins/silence-table/silence-table-sorting.test.ts index 25dcb5c47..68c969ee3 100644 --- a/alertmanager/src/plugins/silence-table/silence-table-sorting.test.ts +++ b/alertmanager/src/plugins/silence-table/silence-table-sorting.test.ts @@ -12,6 +12,7 @@ // limitations under the License. import { Silence } from '@perses-dev/spec'; + import { compareSilencesByColumn, SilenceSortState } from './silence-table-sorting'; const makeSilence = (overrides: Partial = {}): Silence => ({ diff --git a/alertmanager/src/plugins/silence-table/silence-table-sorting.ts b/alertmanager/src/plugins/silence-table/silence-table-sorting.ts index abe92adc7..7ccaf1a9f 100644 --- a/alertmanager/src/plugins/silence-table/silence-table-sorting.ts +++ b/alertmanager/src/plugins/silence-table/silence-table-sorting.ts @@ -12,6 +12,7 @@ // limitations under the License. import { Silence } from '@perses-dev/spec'; + import { SilenceColumnSortMode, SilenceFieldName, SortDirection, getSilenceFieldValue } from './silence-table-model'; export interface SilenceSortState { diff --git a/alertmanager/src/plugins/types.ts b/alertmanager/src/plugins/types.ts index cb9e82878..5820b7fa6 100644 --- a/alertmanager/src/plugins/types.ts +++ b/alertmanager/src/plugins/types.ts @@ -11,8 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { HTTPProxy } from '@perses-dev/spec'; import { DatasourceSelectValue } from '@perses-dev/plugin-system'; +import { HTTPProxy } from '@perses-dev/spec'; + import { AlertManagerDatasourceSelector } from '../model/alertmanager-selectors'; /** diff --git a/alertmanager/tsconfig.build.json b/alertmanager/tsconfig.build.json index 055915f9e..fc0aafe27 100644 --- a/alertmanager/tsconfig.build.json +++ b/alertmanager/tsconfig.build.json @@ -4,6 +4,6 @@ "compilerOptions": { "emitDeclarationOnly": true, "declaration": true, - "preserveWatchOutput": true, - }, + "preserveWatchOutput": true + } } diff --git a/alertmanager/tsconfig.json b/alertmanager/tsconfig.json index 28852c59e..98221344c 100644 --- a/alertmanager/tsconfig.json +++ b/alertmanager/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "./dist/lib", - "rootDir": "./src", + "rootDir": "./src" }, - "include": ["src"], + "include": ["src"] } diff --git a/barchart/jest.config.ts b/barchart/jest.config.ts index 5190fb4de..16027133b 100644 --- a/barchart/jest.config.ts +++ b/barchart/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/barchart/package.json b/barchart/package.json index 405973298..a33174756 100644 --- a/barchart/package.json +++ b/barchart/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/barchart/rsbuild.config.ts b/barchart/rsbuild.config.ts index aae00b463..fdea5110a 100644 --- a/barchart/rsbuild.config.ts +++ b/barchart/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/barchart/schemas/migrate/tests/basic/expected.json b/barchart/schemas/migrate/tests/basic/expected.json index ab93a9036..4ed75cf51 100644 --- a/barchart/schemas/migrate/tests/basic/expected.json +++ b/barchart/schemas/migrate/tests/basic/expected.json @@ -7,4 +7,4 @@ "unit": "percent" } } -} \ No newline at end of file +} diff --git a/barchart/schemas/migrate/tests/basic/input.json b/barchart/schemas/migrate/tests/basic/input.json index 69e86cf06..ef375cba2 100644 --- a/barchart/schemas/migrate/tests/basic/input.json +++ b/barchart/schemas/migrate/tests/basic/input.json @@ -37,9 +37,7 @@ "options": { "reduceOptions": { "values": false, - "calcs": [ - "lastNotNull" - ], + "calcs": ["lastNotNull"], "fields": "" }, "orientation": "horizontal", @@ -61,4 +59,4 @@ ], "title": "Some metrics", "type": "bargauge" -} \ No newline at end of file +} diff --git a/barchart/src/BarChart.ts b/barchart/src/BarChart.ts index e8c11533c..e2b46880c 100644 --- a/barchart/src/BarChart.ts +++ b/barchart/src/BarChart.ts @@ -12,10 +12,11 @@ // limitations under the License. import { PanelPlugin } from '@perses-dev/plugin-system'; + import { createInitialBarChartOptions, BarChartOptions } from './bar-chart-model'; +import { BarChartExportAction } from './BarChartExportAction'; import { BarChartOptionsEditorSettings } from './BarChartOptionsEditorSettings'; import { BarChartPanel, BarChartPanelProps } from './BarChartPanel'; -import { BarChartExportAction } from './BarChartExportAction'; /** * The core BarChart panel plugin for Perses. diff --git a/barchart/src/BarChartBase.tsx b/barchart/src/BarChartBase.tsx index 5836a769f..317f2d548 100644 --- a/barchart/src/BarChartBase.tsx +++ b/barchart/src/BarChartBase.tsx @@ -11,7 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, useMemo } from 'react'; +import { Box } from '@mui/material'; import { EChart, FormatOptions, @@ -20,13 +20,13 @@ import { getFormattedAxis, useChartsTheme, } from '@perses-dev/components'; -import { use, EChartsCoreOption } from 'echarts/core'; import { BarChart as EChartsBarChart } from 'echarts/charts'; import { GridComponent, DatasetComponent, TitleComponent, TooltipComponent, LegendComponent } from 'echarts/components'; +import { use as registerECharts, EChartsCoreOption } from 'echarts/core'; import { CanvasRenderer } from 'echarts/renderers'; -import { Box } from '@mui/material'; +import { ReactElement, useMemo } from 'react'; -use([ +registerECharts([ EChartsBarChart, GridComponent, DatasetComponent, @@ -199,11 +199,13 @@ export function BarChartBase(props: BarChartBaseProps): ReactElement { }; }, [data, groupedData, isStacked, chartsTheme, width, mode, format, isHorizontal]); - const numGroupedRows = groupedData - ? isStacked - ? groupedData.categories.length - : groupedData.categories.length * groupedData.series.length - : 0; + let numGroupedRows = 0; + if (groupedData) { + numGroupedRows = groupedData.categories.length; + if (!isStacked) { + numGroupedRows *= groupedData.series.length; + } + } function getChartHeight(): number | string { if (groupedData) { diff --git a/barchart/src/BarChartExportAction.tsx b/barchart/src/BarChartExportAction.tsx index be8e99a24..b9f406c0a 100644 --- a/barchart/src/BarChartExportAction.tsx +++ b/barchart/src/BarChartExportAction.tsx @@ -11,11 +11,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import React, { useCallback, useMemo } from 'react'; -import { exportDataAsCSV, extractExportableData, isExportableData, sanitizeFilename } from '@perses-dev/plugin-system'; -import { InfoTooltip } from '@perses-dev/components'; import { IconButton } from '@mui/material'; +import { InfoTooltip } from '@perses-dev/components'; +import { exportDataAsCSV, extractExportableData, isExportableData, sanitizeFilename } from '@perses-dev/plugin-system'; import DownloadIcon from 'mdi-material-ui/Download'; +import React, { useCallback, useMemo } from 'react'; + import { BarChartPanelProps } from './BarChartPanel'; export const BarChartExportAction: React.FC = ({ queryResults, definition }) => { diff --git a/barchart/src/BarChartOptionsEditorSettings.test.tsx b/barchart/src/BarChartOptionsEditorSettings.test.tsx index 669989791..9a1ecb8af 100644 --- a/barchart/src/BarChartOptionsEditorSettings.test.tsx +++ b/barchart/src/BarChartOptionsEditorSettings.test.tsx @@ -14,6 +14,7 @@ import { ChartsProvider, testChartsTheme } from '@perses-dev/components'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; + import { BarChartOptions } from './bar-chart-model'; import { BarChartOptionsEditorSettings } from './BarChartOptionsEditorSettings'; diff --git a/barchart/src/BarChartOptionsEditorSettings.tsx b/barchart/src/BarChartOptionsEditorSettings.tsx index f59d43636..777042adc 100644 --- a/barchart/src/BarChartOptionsEditorSettings.tsx +++ b/barchart/src/BarChartOptionsEditorSettings.tsx @@ -47,6 +47,7 @@ import { produce } from 'immer'; import merge from 'lodash/merge'; import omit from 'lodash/omit'; import { MouseEventHandler, ReactElement } from 'react'; + import { BarChartOptions, BarChartOptionsEditorProps, diff --git a/barchart/src/BarChartPanel.tsx b/barchart/src/BarChartPanel.tsx index 07a40a4ce..cdb995cfa 100644 --- a/barchart/src/BarChartPanel.tsx +++ b/barchart/src/BarChartPanel.tsx @@ -11,14 +11,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { useChartsTheme } from '@perses-dev/components'; import { Box } from '@mui/material'; -import { ReactElement, useMemo } from 'react'; +import { useChartsTheme } from '@perses-dev/components'; import { CalculationsMap, CalculationType, PanelProps } from '@perses-dev/plugin-system'; import { TimeSeriesData } from '@perses-dev/spec'; +import { ReactElement, useMemo } from 'react'; + import { BarChartOptions } from './bar-chart-model'; -import { calculatePercentages, sortSeriesData } from './utils'; import { BarChartBase, BarChartData, StackedBarChartData, StackedBarChartSeries } from './BarChartBase'; +import { calculatePercentages, sortSeriesData } from './utils'; export type BarChartPanelProps = PanelProps; @@ -96,9 +97,9 @@ export function BarChartPanel(props: BarChartPanelProps): ReactElement | null { let categories = Array.from(groupMap.keys()); if (sort === 'asc') { - categories = categories.sort((a, b) => getTotalValue(a) - getTotalValue(b)); + categories = categories.toSorted((a, b) => getTotalValue(a) - getTotalValue(b)); } else if (sort === 'desc') { - categories = categories.sort((a, b) => getTotalValue(b) - getTotalValue(a)); + categories = categories.toSorted((a, b) => getTotalValue(b) - getTotalValue(a)); } const series: StackedBarChartSeries[] = segmentNamesOrdered.map((segName) => { diff --git a/barchart/src/getPluginModule.ts b/barchart/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/barchart/src/getPluginModule.ts +++ b/barchart/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/barchart/src/utils.ts b/barchart/src/utils.ts index 1f8c99e53..efc309da3 100644 --- a/barchart/src/utils.ts +++ b/barchart/src/utils.ts @@ -12,6 +12,7 @@ // limitations under the License. import { SortOption } from '@perses-dev/components'; + import { DEFAULT_SORT } from './bar-chart-model'; import { BarChartData } from './BarChartBase'; @@ -29,7 +30,7 @@ export function calculatePercentages(data: BarChartData[]): Array<{ label: strin export function sortSeriesData(data: BarChartData[], sortOrder: SortOption = DEFAULT_SORT): BarChartData[] { if (sortOrder === 'asc') { // sort in ascending order by value - return data.sort((a, b) => { + return data.toSorted((a, b) => { if (a.value === null) { return 1; } @@ -43,7 +44,7 @@ export function sortSeriesData(data: BarChartData[], sortOrder: SortOption = DEF }); } else { // sort in descending order by value - return data.sort((a, b) => { + return data.toSorted((a, b) => { if (a.value === null) { return -1; } diff --git a/clickhouse/jest.config.ts b/clickhouse/jest.config.ts index 5190fb4de..16027133b 100644 --- a/clickhouse/jest.config.ts +++ b/clickhouse/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/clickhouse/package.json b/clickhouse/package.json index bd344dac1..ba46e1932 100644 --- a/clickhouse/package.json +++ b/clickhouse/package.json @@ -9,7 +9,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/clickhouse/rsbuild.config.ts b/clickhouse/rsbuild.config.ts index 89c1a1645..679ead081 100644 --- a/clickhouse/rsbuild.config.ts +++ b/clickhouse/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/clickhouse/src/components/ClickQLEditor.tsx b/clickhouse/src/components/ClickQLEditor.tsx index cc6e80b8e..de08f5bfa 100644 --- a/clickhouse/src/components/ClickQLEditor.tsx +++ b/clickhouse/src/components/ClickQLEditor.tsx @@ -11,9 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import CodeMirror, { ReactCodeMirrorProps } from '@uiw/react-codemirror'; import { EditorView } from '@codemirror/view'; import { useTheme, InputLabel, Stack } from '@mui/material'; +import CodeMirror, { ReactCodeMirrorProps } from '@uiw/react-codemirror'; import { ReactElement } from 'react'; export type ClickQLEditorProps = Omit; diff --git a/clickhouse/src/datasources/click-house-datasource/ClickHouseDatasource.tsx b/clickhouse/src/datasources/click-house-datasource/ClickHouseDatasource.tsx index 01662c865..162073865 100644 --- a/clickhouse/src/datasources/click-house-datasource/ClickHouseDatasource.tsx +++ b/clickhouse/src/datasources/click-house-datasource/ClickHouseDatasource.tsx @@ -12,6 +12,7 @@ // limitations under the License. import { DatasourcePlugin } from '@perses-dev/plugin-system'; + import { query } from '../../model/click-house-client'; import { ClickHouseDatasourceSpec, ClickHouseDatasourceClient } from './click-house-datasource-types'; import { ClickHouseDatasourceEditor } from './ClickHouseDatasourceEditor'; diff --git a/clickhouse/src/datasources/click-house-datasource/ClickHouseDatasourceEditor.tsx b/clickhouse/src/datasources/click-house-datasource/ClickHouseDatasourceEditor.tsx index 4106583e0..dc8b5e65e 100644 --- a/clickhouse/src/datasources/click-house-datasource/ClickHouseDatasourceEditor.tsx +++ b/clickhouse/src/datasources/click-house-datasource/ClickHouseDatasourceEditor.tsx @@ -13,6 +13,7 @@ import { HTTPSettingsEditor } from '@perses-dev/plugin-system'; import { ReactElement } from 'react'; + import { ClickHouseDatasourceSpec } from './click-house-datasource-types'; export interface ClickHouseDatasourceEditorProps { diff --git a/clickhouse/src/getPluginModule.ts b/clickhouse/src/getPluginModule.ts index cab8b384b..515511f2f 100644 --- a/clickhouse/src/getPluginModule.ts +++ b/clickhouse/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/clickhouse/src/model/click-house-client.ts b/clickhouse/src/model/click-house-client.ts index ec1339809..cbc1b0fdd 100644 --- a/clickhouse/src/model/click-house-client.ts +++ b/clickhouse/src/model/click-house-client.ts @@ -90,7 +90,7 @@ export async function query( data: body.data || body, }; } catch (e) { - throw new Error(`ClickHouse query failed: ${e}`); + throw new Error(`ClickHouse query failed: ${e}`, { cause: e }); } } diff --git a/clickhouse/src/queries/click-house-log-query/ClickHouseLogQuery.tsx b/clickhouse/src/queries/click-house-log-query/ClickHouseLogQuery.tsx index 8d4d1df06..6837afe0b 100644 --- a/clickhouse/src/queries/click-house-log-query/ClickHouseLogQuery.tsx +++ b/clickhouse/src/queries/click-house-log-query/ClickHouseLogQuery.tsx @@ -12,9 +12,10 @@ // limitations under the License. import { parseVariables, LogQueryPlugin } from '@perses-dev/plugin-system'; -import { getClickHouseLogData } from './get-click-house-log-data'; -import { ClickHouseLogQueryEditor } from './ClickHouseLogQueryEditor'; + import { ClickHouseLogQuerySpec } from './click-house-log-query-types'; +import { ClickHouseLogQueryEditor } from './ClickHouseLogQueryEditor'; +import { getClickHouseLogData } from './get-click-house-log-data'; export const ClickHouseLogQuery: LogQueryPlugin = { getLogData: getClickHouseLogData, @@ -22,7 +23,7 @@ export const ClickHouseLogQuery: LogQueryPlugin = { createInitialOptions: () => ({ query: '' }), dependsOn: (spec) => { const queryVariables = parseVariables(spec.query); - const allVariables = [...new Set([...queryVariables])]; + const allVariables = [...new Set(queryVariables)]; return { variables: allVariables, }; diff --git a/clickhouse/src/queries/click-house-log-query/ClickHouseLogQueryEditor.tsx b/clickhouse/src/queries/click-house-log-query/ClickHouseLogQueryEditor.tsx index ced1283b0..97c9fa144 100644 --- a/clickhouse/src/queries/click-house-log-query/ClickHouseLogQueryEditor.tsx +++ b/clickhouse/src/queries/click-house-log-query/ClickHouseLogQueryEditor.tsx @@ -11,19 +11,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { Stack } from '@mui/material'; +import { createModEnterHandler } from '@perses-dev/dashboards'; import { DatasourceSelect, DatasourceSelectProps, isVariableDatasource, OptionsEditorProps, } from '@perses-dev/plugin-system'; -import { ReactElement, useCallback } from 'react'; import { produce } from 'immer'; -import { Stack } from '@mui/material'; -import { createModEnterHandler } from '@perses-dev/dashboards'; -import { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants'; +import { ReactElement, useCallback } from 'react'; + import { ClickQLEditor } from '../../components'; import { queryExample } from '../../components/constants'; +import { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants'; import { useQueryState } from '../query-editor-model'; import { ClickHouseLogQuerySpec } from './click-house-log-query-types'; diff --git a/clickhouse/src/queries/click-house-log-query/click-house-log-query-types.test.ts b/clickhouse/src/queries/click-house-log-query/click-house-log-query-types.test.ts index 18bef27dc..a16f27368 100644 --- a/clickhouse/src/queries/click-house-log-query/click-house-log-query-types.test.ts +++ b/clickhouse/src/queries/click-house-log-query/click-house-log-query-types.test.ts @@ -12,6 +12,7 @@ // limitations under the License. import { LogQueryContext } from '@perses-dev/plugin-system'; + import { ClickHouseDatasource, ClickHouseDatasourceSpec } from '../../datasources/click-house-datasource'; import { ClickHouseQueryResponse } from '../../model/click-house-client'; import { ClickHouseLogQuery } from './ClickHouseLogQuery'; diff --git a/clickhouse/src/queries/click-house-log-query/get-click-house-log-data.ts b/clickhouse/src/queries/click-house-log-query/get-click-house-log-data.ts index f8f205304..3a05342d6 100644 --- a/clickhouse/src/queries/click-house-log-query/get-click-house-log-data.ts +++ b/clickhouse/src/queries/click-house-log-query/get-click-house-log-data.ts @@ -13,6 +13,7 @@ import { replaceVariables, LogQueryPlugin } from '@perses-dev/plugin-system'; import { LogData, LogEntry } from '@perses-dev/spec'; + import { ClickHouseClient, ClickHouseQueryResponse, @@ -49,7 +50,7 @@ function convertStreamsToLogs(streams: LogEntry[]): LogData { const sortedEntry: Record = {}; Object.keys(flattened) - .sort((a, b) => a.localeCompare(b)) + .toSorted((a, b) => a.localeCompare(b)) .forEach((key) => { sortedEntry[key] = flattened[key]; }); diff --git a/clickhouse/src/queries/click-house-time-series-query/ClickHouseQuery.tsx b/clickhouse/src/queries/click-house-time-series-query/ClickHouseQuery.tsx index 4c5fa8d41..8a9fee3b2 100644 --- a/clickhouse/src/queries/click-house-time-series-query/ClickHouseQuery.tsx +++ b/clickhouse/src/queries/click-house-time-series-query/ClickHouseQuery.tsx @@ -12,9 +12,10 @@ // limitations under the License. import { TimeSeriesQueryPlugin, parseVariables } from '@perses-dev/plugin-system'; -import { getTimeSeriesData } from './get-click-house-data'; -import { ClickHouseTimeSeriesQueryEditor } from './ClickHouseQueryEditor'; + import { ClickHouseTimeSeriesQuerySpec } from './click-house-query-types'; +import { ClickHouseTimeSeriesQueryEditor } from './ClickHouseQueryEditor'; +import { getTimeSeriesData } from './get-click-house-data'; export const ClickHouseTimeSeriesQuery: TimeSeriesQueryPlugin = { getTimeSeriesData, @@ -22,7 +23,7 @@ export const ClickHouseTimeSeriesQuery: TimeSeriesQueryPlugin ({ query: '' }), dependsOn: (spec) => { const queryVariables = parseVariables(spec.query); - const allVariables = [...new Set([...queryVariables])]; + const allVariables = [...new Set(queryVariables)]; return { variables: allVariables, }; diff --git a/clickhouse/src/queries/click-house-time-series-query/ClickHouseQueryEditor.tsx b/clickhouse/src/queries/click-house-time-series-query/ClickHouseQueryEditor.tsx index 5df4e9439..6e6ca5040 100644 --- a/clickhouse/src/queries/click-house-time-series-query/ClickHouseQueryEditor.tsx +++ b/clickhouse/src/queries/click-house-time-series-query/ClickHouseQueryEditor.tsx @@ -11,19 +11,20 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { Stack } from '@mui/material'; +import { createModEnterHandler } from '@perses-dev/dashboards'; import { DatasourceSelect, DatasourceSelectProps, isVariableDatasource, OptionsEditorProps, } from '@perses-dev/plugin-system'; -import { ReactElement, useCallback } from 'react'; import { produce } from 'immer'; -import { Stack } from '@mui/material'; -import { createModEnterHandler } from '@perses-dev/dashboards'; -import { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants'; +import { ReactElement, useCallback } from 'react'; + import { ClickQLEditor } from '../../components'; import { queryExample } from '../../components/constants'; +import { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants'; import { useQueryState } from '../query-editor-model'; import { ClickHouseTimeSeriesQuerySpec } from './click-house-query-types'; diff --git a/clickhouse/src/queries/click-house-time-series-query/click-house-query-types.test.ts b/clickhouse/src/queries/click-house-time-series-query/click-house-query-types.test.ts index 8505f03aa..7a091c8c8 100644 --- a/clickhouse/src/queries/click-house-time-series-query/click-house-query-types.test.ts +++ b/clickhouse/src/queries/click-house-time-series-query/click-house-query-types.test.ts @@ -17,6 +17,7 @@ jest.mock('echarts/core'); import { TimeSeriesQueryContext } from '@perses-dev/plugin-system'; import { DatasourceSpec } from '@perses-dev/spec'; + import { ClickHouseDatasource, ClickHouseDatasourceSpec } from '../../datasources'; import { ClickHouseQueryResponse } from '../../model/click-house-client'; import { ClickHouseTimeSeriesQuery } from './ClickHouseQuery'; diff --git a/clickhouse/src/queries/click-house-time-series-query/get-click-house-data.ts b/clickhouse/src/queries/click-house-time-series-query/get-click-house-data.ts index b195b90a5..8e186ba75 100644 --- a/clickhouse/src/queries/click-house-time-series-query/get-click-house-data.ts +++ b/clickhouse/src/queries/click-house-time-series-query/get-click-house-data.ts @@ -13,14 +13,15 @@ import { TimeSeriesQueryPlugin, replaceVariables } from '@perses-dev/plugin-system'; import { TimeSeries } from '@perses-dev/spec'; -import { DEFAULT_DATASOURCE } from '../constants'; -import { TimeSeriesEntry } from '../../model/click-house-data-types'; + import { ClickHouseClient, ClickHouseQueryResponse, formatClickHouseDateTime, replaceTimeRangePlaceholders, } from '../../model/click-house-client'; +import { TimeSeriesEntry } from '../../model/click-house-data-types'; +import { DEFAULT_DATASOURCE } from '../constants'; import { ClickHouseTimeSeriesQuerySpec, DatasourceQueryResponse } from './click-house-query-types'; const DEFAULT_STEP_MS = 30 * 1000; @@ -67,7 +68,7 @@ function inferStepMs(response?: DatasourceQueryResponse): number { const timestamps = data .map((row: TimeSeriesEntry) => new Date(row.time).getTime()) .filter(Number.isFinite) - .sort((a, b) => a - b); + .toSorted((a, b) => a - b); if (timestamps.length < 2) { return DEFAULT_STEP_MS; @@ -92,7 +93,7 @@ function inferStepMs(response?: DatasourceQueryResponse): number { deltaCounts.set(delta, (deltaCounts.get(delta) ?? 0) + 1); } - const inferredStep = Array.from(deltaCounts.entries()).sort(([deltaA, countA], [deltaB, countB]) => { + const inferredStep = Array.from(deltaCounts.entries()).toSorted(([deltaA, countA], [deltaB, countB]) => { if (countA !== countB) { return countB - countA; } diff --git a/clickhouse/src/queries/query-editor-model.ts b/clickhouse/src/queries/query-editor-model.ts index b26ac0c2f..d492e8552 100644 --- a/clickhouse/src/queries/query-editor-model.ts +++ b/clickhouse/src/queries/query-editor-model.ts @@ -11,9 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { useState } from 'react'; -import { produce } from 'immer'; import { OptionsEditorProps } from '@perses-dev/plugin-system'; +import { produce } from 'immer'; +import { useState } from 'react'; /** * Generic type for any ClickHouse query spec that has a query field diff --git a/datasourcevariable/package.json b/datasourcevariable/package.json index f0a2f3d57..f7d39a04e 100644 --- a/datasourcevariable/package.json +++ b/datasourcevariable/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest --passWithNoTests", "type-check": "tsc --noEmit" }, diff --git a/datasourcevariable/rsbuild.config.ts b/datasourcevariable/rsbuild.config.ts index cc39bce53..5843da712 100644 --- a/datasourcevariable/rsbuild.config.ts +++ b/datasourcevariable/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/datasourcevariable/schemas/migrate/tests/basic/expected.json b/datasourcevariable/schemas/migrate/tests/basic/expected.json index 3c5e43be2..2b6dbb861 100644 --- a/datasourcevariable/schemas/migrate/tests/basic/expected.json +++ b/datasourcevariable/schemas/migrate/tests/basic/expected.json @@ -3,4 +3,4 @@ "spec": { "datasourcePluginKind": "PrometheusDatasource" } -} \ No newline at end of file +} diff --git a/datasourcevariable/schemas/migrate/tests/basic/input.json b/datasourcevariable/schemas/migrate/tests/basic/input.json index d4bf83b09..0bfe1dab8 100644 --- a/datasourcevariable/schemas/migrate/tests/basic/input.json +++ b/datasourcevariable/schemas/migrate/tests/basic/input.json @@ -15,4 +15,4 @@ "regex": "my-ds", "skipUrlSync": false, "type": "datasource" -} \ No newline at end of file +} diff --git a/datasourcevariable/schemas/tests/valid/datasource.json b/datasourcevariable/schemas/tests/valid/datasource.json index 3c5e43be2..2b6dbb861 100644 --- a/datasourcevariable/schemas/tests/valid/datasource.json +++ b/datasourcevariable/schemas/tests/valid/datasource.json @@ -3,4 +3,4 @@ "spec": { "datasourcePluginKind": "PrometheusDatasource" } -} \ No newline at end of file +} diff --git a/datasourcevariable/src/DatasourceVariable.tsx b/datasourcevariable/src/DatasourceVariable.tsx index 30a718210..1a993cd91 100644 --- a/datasourcevariable/src/DatasourceVariable.tsx +++ b/datasourcevariable/src/DatasourceVariable.tsx @@ -11,8 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { OptionsEditorProps, useListPluginMetadata, VariablePlugin } from '@perses-dev/plugin-system'; import { Autocomplete, TextField } from '@mui/material'; +import { OptionsEditorProps, useListPluginMetadata, VariablePlugin } from '@perses-dev/plugin-system'; import { ReactElement, useEffect, useMemo } from 'react'; type StaticListVariableOptions = { diff --git a/datasourcevariable/src/getPluginModule.ts b/datasourcevariable/src/getPluginModule.ts index cab8b384b..515511f2f 100644 --- a/datasourcevariable/src/getPluginModule.ts +++ b/datasourcevariable/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/flamechart/jest.config.ts b/flamechart/jest.config.ts index 5190fb4de..16027133b 100644 --- a/flamechart/jest.config.ts +++ b/flamechart/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/flamechart/package.json b/flamechart/package.json index 541ddedbb..0e6a0386e 100644 --- a/flamechart/package.json +++ b/flamechart/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/flamechart/rsbuild.config.ts b/flamechart/rsbuild.config.ts index dc17a39ea..93d7d6d10 100644 --- a/flamechart/rsbuild.config.ts +++ b/flamechart/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/flamechart/src/FlameChart.ts b/flamechart/src/FlameChart.ts index 186e742d1..b443a943b 100644 --- a/flamechart/src/FlameChart.ts +++ b/flamechart/src/FlameChart.ts @@ -12,8 +12,9 @@ // limitations under the License. import { PanelPlugin } from '@perses-dev/plugin-system'; -import { createInitialFlameChartOptions, FlameChartOptions } from './flame-chart-model'; + import { FlameChartPanel, FlameChartPanelProps, FlameChartOptionsEditorSettings } from './components'; +import { createInitialFlameChartOptions, FlameChartOptions } from './flame-chart-model'; /** * The core FlameChart panel plugin for Perses. diff --git a/flamechart/src/components/CustomBreadcrumb.tsx b/flamechart/src/components/CustomBreadcrumb.tsx index 5f9bac4cb..c04280cfe 100644 --- a/flamechart/src/components/CustomBreadcrumb.tsx +++ b/flamechart/src/components/CustomBreadcrumb.tsx @@ -11,14 +11,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement } from 'react'; import { Stack, Breadcrumbs } from '@mui/material'; -import ChevronRightIcon from 'mdi-material-ui/ChevronRight'; -import EyeIcon from 'mdi-material-ui/EyeOutline'; -import CloseIcon from 'mdi-material-ui/Close'; import Chip from '@mui/material/Chip'; import { emphasize, styled } from '@mui/material/styles'; import { formatValue } from '@perses-dev/components'; +import ChevronRightIcon from 'mdi-material-ui/ChevronRight'; +import CloseIcon from 'mdi-material-ui/Close'; +import EyeIcon from 'mdi-material-ui/EyeOutline'; +import { ReactElement } from 'react'; export interface CustomBreadcrumbProps { totalValue: string; diff --git a/flamechart/src/components/FlameChart.tsx b/flamechart/src/components/FlameChart.tsx index 626bef656..1b63c0488 100644 --- a/flamechart/src/components/FlameChart.tsx +++ b/flamechart/src/components/FlameChart.tsx @@ -11,23 +11,24 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { Stack, Box, Menu, MenuItem, Divider, useTheme } from '@mui/material'; +import { useChartsTheme, EChart, MouseEventsParameters } from '@perses-dev/components'; +import { ProfileData } from '@perses-dev/spec'; import { CustomSeriesRenderItem, CustomSeriesRenderItemAPI, CustomSeriesRenderItemParams, CustomSeriesRenderItemReturn, } from 'echarts'; -import { Stack, Box, Menu, MenuItem, Divider, useTheme } from '@mui/material'; -import { ReactElement, useState, useMemo, MouseEvent } from 'react'; -import { useChartsTheme, EChart, MouseEventsParameters } from '@perses-dev/components'; -import RefreshIcon from 'mdi-material-ui/Refresh'; -import EyeIcon from 'mdi-material-ui/EyeOutline'; -import ContentCopyIcon from 'mdi-material-ui/ContentCopy'; import { EChartsCoreOption } from 'echarts/core'; -import { ProfileData } from '@perses-dev/spec'; +import ContentCopyIcon from 'mdi-material-ui/ContentCopy'; +import EyeIcon from 'mdi-material-ui/EyeOutline'; +import RefreshIcon from 'mdi-material-ui/Refresh'; +import { ReactElement, useState, useMemo, MouseEvent } from 'react'; + +import { FlameChartSample as Sample } from '../utils/data-model'; import { buildSamples, findTotalSampleByName } from '../utils/data-transform'; import { generateTooltip } from '../utils/tooltip'; -import { FlameChartSample as Sample } from '../utils/data-model'; import { CustomBreadcrumb } from './CustomBreadcrumb'; const ITEM_GAP = 2; // vertical gap between flame chart items diff --git a/flamechart/src/components/FlameChartOptionsEditorSettings.tsx b/flamechart/src/components/FlameChartOptionsEditorSettings.tsx index b26b55954..3f06f687b 100644 --- a/flamechart/src/components/FlameChartOptionsEditorSettings.tsx +++ b/flamechart/src/components/FlameChartOptionsEditorSettings.tsx @@ -11,14 +11,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement } from 'react'; +import { Button, TextField } from '@mui/material'; import { OptionsEditorGroup, OptionsEditorGrid, OptionsEditorColumn, OptionsEditorControl, } from '@perses-dev/components'; -import { Button, TextField } from '@mui/material'; +import { ReactElement } from 'react'; + import { FlameChartOptionsEditorProps } from '../flame-chart-model'; import { usePaletteState, diff --git a/flamechart/src/components/FlameChartPanel.tsx b/flamechart/src/components/FlameChartPanel.tsx index 179ab7ac0..c5b92b7e1 100644 --- a/flamechart/src/components/FlameChartPanel.tsx +++ b/flamechart/src/components/FlameChartPanel.tsx @@ -11,18 +11,19 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { TitleComponentOption } from 'echarts'; -import { useChartsTheme } from '@perses-dev/components'; import { Stack, Typography, SxProps, useMediaQuery, useTheme } from '@mui/material'; -import { FC, useState, useEffect, useMemo } from 'react'; +import { useChartsTheme } from '@perses-dev/components'; import { PanelProps } from '@perses-dev/plugin-system'; import { ProfileData, StackTrace } from '@perses-dev/spec'; +import { TitleComponentOption } from 'echarts'; +import { FC, useState, useEffect, useMemo } from 'react'; + import { FlameChartOptions } from '../flame-chart-model'; import { filterStackTraceById, getMaxDepth } from '../utils/data-transform'; import { FlameChart } from './FlameChart'; +import { SeriesChart } from './SeriesChart'; import { Settings } from './Settings'; import { TableChart } from './TableChart'; -import { SeriesChart } from './SeriesChart'; const LARGE_PANEL_THRESHOLD = 600; const DEFAULT_SERIES_CHART_HEIGHT = 200; @@ -89,37 +90,33 @@ export const FlameChartPanel: FC = (props) => { if (!contentDimensions) return null; - const PADDING = - liveSpec.showSeries && liveSpec.showSettings ? 32 : liveSpec.showSeries || liveSpec.showSettings ? 16 : 0; + let padding = 0; + if (liveSpec.showSeries && liveSpec.showSettings) { + padding = 32; + } else if (liveSpec.showSeries || liveSpec.showSettings) { + padding = 16; + } const SETTINGS_HEIGHT = liveSpec.showSettings ? 30 : 0; - const SERIES_CHART_HEIGHT = liveSpec.showSeries - ? contentDimensions.height < DEFAULT_SERIES_CHART_HEIGHT - ? contentDimensions.height - : DEFAULT_SERIES_CHART_HEIGHT - : 0; - - const TABLE_FLAME_CHART_HEIGHT = liveSpec.traceHeight - ? Math.max( - contentDimensions.height - - (contentDimensions.height > LARGE_PANEL_THRESHOLD ? SERIES_CHART_HEIGHT + SETTINGS_HEIGHT + PADDING : 0), - maxDepth * liveSpec.traceHeight - ) - : contentDimensions.height - - (contentDimensions.height > LARGE_PANEL_THRESHOLD ? SERIES_CHART_HEIGHT + SETTINGS_HEIGHT + PADDING : 0); - - const TABLE_CHART_WIDTH = isMobileSize - ? contentDimensions.width - : liveSpec.showFlameGraph - ? 0.4 * contentDimensions.width - : contentDimensions.width; - - const FLAME_CHART_WIDTH = isMobileSize - ? contentDimensions.width - : liveSpec.showTable - ? 0.6 * contentDimensions.width - : contentDimensions.width; + const seriesChartHeight = liveSpec.showSeries ? Math.min(contentDimensions.height, DEFAULT_SERIES_CHART_HEIGHT) : 0; + + const reservedHeight = + contentDimensions.height > LARGE_PANEL_THRESHOLD ? seriesChartHeight + SETTINGS_HEIGHT + padding : 0; + const availableChartHeight = contentDimensions.height - reservedHeight; + const tableFlameChartHeight = liveSpec.traceHeight + ? Math.max(availableChartHeight, maxDepth * liveSpec.traceHeight) + : availableChartHeight; + + let tableChartWidth = contentDimensions.width; + if (!isMobileSize && liveSpec.showFlameGraph) { + tableChartWidth = 0.4 * contentDimensions.width; + } + + let flameChartWidth = contentDimensions.width; + if (!isMobileSize && liveSpec.showTable) { + flameChartWidth = 0.6 * contentDimensions.width; + } // TODO (gladorme): allow users to override height (useful for explorer for stack traces with high depth) return ( @@ -129,12 +126,13 @@ export const FlameChartPanel: FC = (props) => { justifyContent="center" alignItems="center" > - {queryResults.length > 1 ? ( + {queryResults.length > 1 && ( // display a message if there is more than one query There is more than one query. Please make sure that you provided only one query. - ) : flameChartData ? ( + )} + {queryResults.length <= 1 && flameChartData && ( = (props) => { }} > {liveSpec.showSeries && ( - + )} {liveSpec.showSettings && ( = (props) => { > {liveSpec.showTable && ( = (props) => { )} {liveSpec.showFlameGraph && ( = (props) => { )} - ) : ( - No data )} + {queryResults.length <= 1 && !flameChartData && No data} ); }; diff --git a/flamechart/src/components/PaletteSelector.tsx b/flamechart/src/components/PaletteSelector.tsx index 7c0040581..28e429717 100644 --- a/flamechart/src/components/PaletteSelector.tsx +++ b/flamechart/src/components/PaletteSelector.tsx @@ -11,8 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement } from 'react'; import { OptionsEditorControl, SettingsAutocomplete } from '@perses-dev/components'; +import { ReactElement } from 'react'; const PALETTE_OPTIONS: Array<{ id: PaletteOption; label: string }> = [ { id: 'package-name', label: 'By Package Name' }, diff --git a/flamechart/src/components/SearchBar.tsx b/flamechart/src/components/SearchBar.tsx index 09e169a71..c03766330 100644 --- a/flamechart/src/components/SearchBar.tsx +++ b/flamechart/src/components/SearchBar.tsx @@ -11,9 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement } from 'react'; import { TextField, InputAdornment, Chip } from '@mui/material'; import Magnify from 'mdi-material-ui/Magnify'; +import { ReactElement } from 'react'; export interface SearchBarProps { searchValue: string; diff --git a/flamechart/src/components/SeriesChart.tsx b/flamechart/src/components/SeriesChart.tsx index 30b3b3c3c..e739f8e35 100644 --- a/flamechart/src/components/SeriesChart.tsx +++ b/flamechart/src/components/SeriesChart.tsx @@ -11,17 +11,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, useMemo, useRef } from 'react'; import { Stack, useTheme } from '@mui/material'; import { useChartsTheme, EChart, ZoomEventData, OnEventsType, enableDataZoom } from '@perses-dev/components'; import { useTimeRange } from '@perses-dev/plugin-system'; +import { ProfileData, Timeline } from '@perses-dev/spec'; import type { EChartsCoreOption, LineSeriesOption } from 'echarts'; import { ECharts as EChartsInstance } from 'echarts/core'; import { CallbackDataParams } from 'echarts/types/dist/shared'; -import { ProfileData, Timeline } from '@perses-dev/spec'; +import { ReactElement, useMemo, useRef } from 'react'; + +import { SeriesSample } from '../utils/data-model'; import { formatItemValue } from '../utils/format'; import { getSeriesTooltip } from '../utils/series-tooltip'; -import { SeriesSample } from '../utils/data-model'; const LINE_WIDTH = 1.25; const POINT_SIZE_OFFSET = 2; diff --git a/flamechart/src/components/Settings.tsx b/flamechart/src/components/Settings.tsx index 9c0f1bbd0..39d83594f 100644 --- a/flamechart/src/components/Settings.tsx +++ b/flamechart/src/components/Settings.tsx @@ -11,13 +11,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, useState, useMemo } from 'react'; -import RefreshIcon from 'mdi-material-ui/Refresh'; -import PaletteIcon from 'mdi-material-ui/Palette'; import { Stack, Button, useTheme, MenuItem, Menu, Fade } from '@mui/material'; import { ToolbarIconButton, InfoTooltip } from '@perses-dev/components'; -import { TOOLTIP_TEXT } from '../utils/ui-text'; +import PaletteIcon from 'mdi-material-ui/Palette'; +import RefreshIcon from 'mdi-material-ui/Refresh'; +import { ReactElement, useState, useMemo } from 'react'; + import { FlameChartOptions } from '../flame-chart-model'; +import { TOOLTIP_TEXT } from '../utils/ui-text'; export interface SettingsProps { value: FlameChartOptions; diff --git a/flamechart/src/components/SwitchSelector.tsx b/flamechart/src/components/SwitchSelector.tsx index de12268ec..745bb27c0 100644 --- a/flamechart/src/components/SwitchSelector.tsx +++ b/flamechart/src/components/SwitchSelector.tsx @@ -11,9 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement } from 'react'; -import { OptionsEditorControl } from '@perses-dev/components'; import { Switch } from '@mui/material'; +import { OptionsEditorControl } from '@perses-dev/components'; +import { ReactElement } from 'react'; export interface SwitchSelectorProps { onChange: (newValue: boolean) => void; diff --git a/flamechart/src/components/TableChart.tsx b/flamechart/src/components/TableChart.tsx index 63b149e9b..172f8fd22 100644 --- a/flamechart/src/components/TableChart.tsx +++ b/flamechart/src/components/TableChart.tsx @@ -11,14 +11,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, useMemo, useState } from 'react'; import { Stack, useTheme, Link } from '@mui/material'; - import { Table, TableColumnConfig } from '@perses-dev/components'; -import { SortingState } from '@tanstack/react-table'; import { ProfileData } from '@perses-dev/spec'; -import { tableRecursionJson } from '../utils/data-transform'; +import { SortingState } from '@tanstack/react-table'; +import { ReactElement, useMemo, useState } from 'react'; + import { TableChartSample } from '../utils/data-model'; +import { tableRecursionJson } from '../utils/data-transform'; import { formatItemValue } from '../utils/format'; import { SearchBar } from './SearchBar'; diff --git a/flamechart/src/getPluginModule.ts b/flamechart/src/getPluginModule.ts index cab8b384b..515511f2f 100644 --- a/flamechart/src/getPluginModule.ts +++ b/flamechart/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/flamechart/src/utils/data-transform.test.ts b/flamechart/src/utils/data-transform.test.ts index f17324534..996362057 100644 --- a/flamechart/src/utils/data-transform.test.ts +++ b/flamechart/src/utils/data-transform.test.ts @@ -12,6 +12,7 @@ // limitations under the License. import { StackTrace } from '@perses-dev/spec'; + import { FlameChartSample as Sample } from './data-model'; import { filterStackTraceById, buildSamples } from './data-transform'; import { getSpanColor } from './palette-gen'; diff --git a/flamechart/src/utils/data-transform.ts b/flamechart/src/utils/data-transform.ts index 5059f6625..0ca4c8fa3 100644 --- a/flamechart/src/utils/data-transform.ts +++ b/flamechart/src/utils/data-transform.ts @@ -12,9 +12,10 @@ // limitations under the License. import { ProfileMetaData, StackTrace } from '@perses-dev/spec'; + import { FlameChartSample as Sample, TableChartSample } from './data-model'; -import { getSpanColor } from './palette-gen'; import { formatItemValue } from './format'; +import { getSpanColor } from './palette-gen'; /** * Filter the global stacktrace by a function ID to focus on that function and display its corresponding flame chart diff --git a/flamechart/src/utils/tooltip.ts b/flamechart/src/utils/tooltip.ts index f94a3e2a8..0f898189e 100644 --- a/flamechart/src/utils/tooltip.ts +++ b/flamechart/src/utils/tooltip.ts @@ -12,6 +12,7 @@ // limitations under the License. import * as echarts from 'echarts'; + import { FlameChartSample } from './data-model'; import { formatItemValue } from './format'; diff --git a/flamechart/src/utils/utils.ts b/flamechart/src/utils/utils.ts index d889b278b..5c1192ab0 100644 --- a/flamechart/src/utils/utils.ts +++ b/flamechart/src/utils/utils.ts @@ -13,6 +13,7 @@ import { produce } from 'immer'; import { ChangeEventHandler } from 'react'; + import { FlameChartOptionsEditorProps } from '../flame-chart-model'; /** diff --git a/gaugechart/jest.config.ts b/gaugechart/jest.config.ts index 5190fb4de..16027133b 100644 --- a/gaugechart/jest.config.ts +++ b/gaugechart/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/gaugechart/package.json b/gaugechart/package.json index 84f0fa032..c20fc7eaa 100644 --- a/gaugechart/package.json +++ b/gaugechart/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/gaugechart/rsbuild.config.ts b/gaugechart/rsbuild.config.ts index f1a34430d..0be16e3e9 100644 --- a/gaugechart/rsbuild.config.ts +++ b/gaugechart/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/gaugechart/schemas/migrate/tests/basic/expected.json b/gaugechart/schemas/migrate/tests/basic/expected.json index 2a12bbbb8..8fc1ba5de 100644 --- a/gaugechart/schemas/migrate/tests/basic/expected.json +++ b/gaugechart/schemas/migrate/tests/basic/expected.json @@ -19,4 +19,4 @@ ] } } -} \ No newline at end of file +} diff --git a/gaugechart/schemas/migrate/tests/basic/input.json b/gaugechart/schemas/migrate/tests/basic/input.json index 24c3020cb..13f3a8f01 100644 --- a/gaugechart/schemas/migrate/tests/basic/input.json +++ b/gaugechart/schemas/migrate/tests/basic/input.json @@ -38,9 +38,7 @@ "options": { "orientation": "auto", "reduceOptions": { - "calcs": [ - "lastNotNull" - ], + "calcs": ["lastNotNull"], "fields": "", "values": false }, @@ -63,4 +61,4 @@ ], "title": "My 2nd panel", "type": "gauge" -} \ No newline at end of file +} diff --git a/gaugechart/src/GaugeChart.ts b/gaugechart/src/GaugeChart.ts index 879665db0..f94ec4e30 100644 --- a/gaugechart/src/GaugeChart.ts +++ b/gaugechart/src/GaugeChart.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PanelPlugin } from '@perses-dev/plugin-system'; + import { createInitialGaugeChartOptions, GaugeChartOptions } from './gauge-chart-model'; import { GaugeChartOptionsEditorSettings } from './GaugeChartOptionsEditorSettings'; import { GaugeChartLoading, GaugeChartPanel, GaugeChartPanelProps } from './GaugeChartPanel'; diff --git a/gaugechart/src/GaugeChartBase.tsx b/gaugechart/src/GaugeChartBase.tsx index d56a5752f..ceccadbe1 100644 --- a/gaugechart/src/GaugeChartBase.tsx +++ b/gaugechart/src/GaugeChartBase.tsx @@ -12,13 +12,13 @@ // limitations under the License. import { EChart, FormatOptions, formatValue, useChartsTheme, useDeepMemo } from '@perses-dev/components'; -import { use, EChartsCoreOption } from 'echarts/core'; import { GaugeChart as EChartsGaugeChart, GaugeSeriesOption } from 'echarts/charts'; import { GridComponent, TitleComponent, TooltipComponent } from 'echarts/components'; +import { use as registerECharts, EChartsCoreOption } from 'echarts/core'; import { CanvasRenderer } from 'echarts/renderers'; import { ReactElement } from 'react'; -use([EChartsGaugeChart, GridComponent, TitleComponent, TooltipComponent, CanvasRenderer]); +registerECharts([EChartsGaugeChart, GridComponent, TitleComponent, TooltipComponent, CanvasRenderer]); // adjusts when to show pointer icon const GAUGE_SMALL_BREAKPOINT = 170; diff --git a/gaugechart/src/GaugeChartOptionsEditorSettings.test.tsx b/gaugechart/src/GaugeChartOptionsEditorSettings.test.tsx index 43ab878a6..348418fd6 100644 --- a/gaugechart/src/GaugeChartOptionsEditorSettings.test.tsx +++ b/gaugechart/src/GaugeChartOptionsEditorSettings.test.tsx @@ -15,6 +15,7 @@ import { ChartsProvider, testChartsTheme } from '@perses-dev/components'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; + import { GaugeChartOptions } from './gauge-chart-model'; import { GaugeChartOptionsEditorSettings } from './GaugeChartOptionsEditorSettings'; diff --git a/gaugechart/src/GaugeChartOptionsEditorSettings.tsx b/gaugechart/src/GaugeChartOptionsEditorSettings.tsx index b52b5ea89..e249bf9e8 100644 --- a/gaugechart/src/GaugeChartOptionsEditorSettings.tsx +++ b/gaugechart/src/GaugeChartOptionsEditorSettings.tsx @@ -26,6 +26,7 @@ import { CalculationSelector, CalculationSelectorProps } from '@perses-dev/plugi import { produce } from 'immer'; import merge from 'lodash/merge'; import { ReactElement } from 'react'; + import { DEFAULT_FORMAT, DEFAULT_MAX_PERCENT, @@ -36,7 +37,7 @@ import { export function GaugeChartOptionsEditorSettings(props: GaugeChartOptionsEditorProps): ReactElement { const { onChange, value } = props; - /* If legend setting doesn't exist (because it is optional), the legend should show by default + /* If legend setting doesn't exist (because it is optional), the legend should show by default This is for the records before the legend option was added */ const showLegend = value?.legend?.show ?? true; diff --git a/gaugechart/src/GaugeChartPanel.tsx b/gaugechart/src/GaugeChartPanel.tsx index 3ee76faea..5b84a064d 100644 --- a/gaugechart/src/GaugeChartPanel.tsx +++ b/gaugechart/src/GaugeChartPanel.tsx @@ -14,18 +14,19 @@ import { Box, Skeleton, Stack } from '@mui/material'; import { FormatOptions, formatValue, useChartsTheme } from '@perses-dev/components'; import { CalculationsMap, DEFAULT_CALCULATION, PanelProps } from '@perses-dev/plugin-system'; +import { TimeSeriesData } from '@perses-dev/spec'; import type { GaugeSeriesOption } from 'echarts'; import merge from 'lodash/merge'; import { ReactElement, useMemo } from 'react'; -import { TimeSeriesData } from '@perses-dev/spec'; + import { DEFAULT_FORMAT, DEFAULT_MAX_PERCENT, DEFAULT_MAX_PERCENT_DECIMAL, GaugeChartOptions, } from './gauge-chart-model'; -import { convertThresholds, defaultThresholdInput } from './thresholds'; import { GaugeChartBase, GaugeSeries } from './GaugeChartBase'; +import { convertThresholds, defaultThresholdInput } from './thresholds'; const EMPTY_GAUGE_SERIES: GaugeSeries = { label: '', value: undefined }; const GAUGE_MIN_WIDTH = 90; diff --git a/gaugechart/src/getPluginModule.ts b/gaugechart/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/gaugechart/src/getPluginModule.ts +++ b/gaugechart/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/greptimedb/jest.config.ts b/greptimedb/jest.config.ts index 5190fb4de..16027133b 100644 --- a/greptimedb/jest.config.ts +++ b/greptimedb/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/greptimedb/package.json b/greptimedb/package.json index 90f8d23f9..3817900e4 100644 --- a/greptimedb/package.json +++ b/greptimedb/package.json @@ -9,7 +9,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/greptimedb/rsbuild.config.ts b/greptimedb/rsbuild.config.ts index 6eb97d4ab..0c397105f 100644 --- a/greptimedb/rsbuild.config.ts +++ b/greptimedb/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/greptimedb/src/components/GreptimeDBQLEditor.tsx b/greptimedb/src/components/GreptimeDBQLEditor.tsx index 64342ebea..db0d21715 100644 --- a/greptimedb/src/components/GreptimeDBQLEditor.tsx +++ b/greptimedb/src/components/GreptimeDBQLEditor.tsx @@ -11,9 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import CodeMirror, { ReactCodeMirrorProps } from '@uiw/react-codemirror'; import { EditorView } from '@codemirror/view'; import { InputLabel, Stack, useTheme } from '@mui/material'; +import CodeMirror, { ReactCodeMirrorProps } from '@uiw/react-codemirror'; import { ReactElement } from 'react'; export function GreptimeDBQLEditor(props: ReactCodeMirrorProps): ReactElement { diff --git a/greptimedb/src/datasources/greptimedb-datasource/GreptimeDBDatasource.tsx b/greptimedb/src/datasources/greptimedb-datasource/GreptimeDBDatasource.tsx index 64a011706..2ccbbef90 100644 --- a/greptimedb/src/datasources/greptimedb-datasource/GreptimeDBDatasource.tsx +++ b/greptimedb/src/datasources/greptimedb-datasource/GreptimeDBDatasource.tsx @@ -12,6 +12,7 @@ // limitations under the License. import { DatasourcePlugin } from '@perses-dev/plugin-system'; + import { greptimedbQuery } from '../../model/greptimedb-client'; import { GreptimeDBDatasourceClient, GreptimeDBDatasourceSpec } from './greptimedb-datasource-types'; import { GreptimeDBDatasourceEditor } from './GreptimeDBDatasourceEditor'; @@ -32,8 +33,8 @@ const createClient: DatasourcePlugin = { }), dependsOn: (spec) => { const queryVariables = parseVariables(spec.query); - const allVariables = [...new Set([...queryVariables])]; + const allVariables = [...new Set(queryVariables)]; return { variables: allVariables, }; diff --git a/greptimedb/src/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.tsx b/greptimedb/src/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.tsx index 003cc6f54..321855d7e 100644 --- a/greptimedb/src/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.tsx +++ b/greptimedb/src/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.tsx @@ -11,18 +11,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { Stack, useTheme } from '@mui/material'; import { DatasourceSelect, DatasourceSelectProps, isVariableDatasource, OptionsEditorProps, } from '@perses-dev/plugin-system'; -import { ReactElement, useCallback } from 'react'; import { produce } from 'immer'; -import { Stack, useTheme } from '@mui/material'; -import { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants'; +import { ReactElement, useCallback } from 'react'; + import { GreptimeDBQLEditor } from '../../components'; import { queryExample } from '../../components/constants'; +import { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants'; import { useQueryState } from '../query-editor-model'; import { GreptimeDBLogQuerySpec } from './greptimedb-log-query-types'; diff --git a/greptimedb/src/queries/greptimedb-log-query/get-greptimedb-log-data.ts b/greptimedb/src/queries/greptimedb-log-query/get-greptimedb-log-data.ts index a8b948f1e..9a2b66320 100644 --- a/greptimedb/src/queries/greptimedb-log-query/get-greptimedb-log-data.ts +++ b/greptimedb/src/queries/greptimedb-log-query/get-greptimedb-log-data.ts @@ -12,6 +12,7 @@ // limitations under the License. import { LogData, LogEntry } from '@perses-dev/spec'; + import { GreptimeDBClient, GreptimeDBQueryResponse } from '../../model/greptimedb-client'; import { DEFAULT_DATASOURCE } from '../constants'; import { diff --git a/greptimedb/src/queries/greptimedb-log-query/greptimedb-log-query-types.test.ts b/greptimedb/src/queries/greptimedb-log-query/greptimedb-log-query-types.test.ts index f58b66429..de5961ea6 100644 --- a/greptimedb/src/queries/greptimedb-log-query/greptimedb-log-query-types.test.ts +++ b/greptimedb/src/queries/greptimedb-log-query/greptimedb-log-query-types.test.ts @@ -12,6 +12,7 @@ // limitations under the License. import { DatasourceSpec } from '@perses-dev/spec'; + import { GreptimeDBDatasource, GreptimeDBDatasourceSpec } from '../../datasources'; import { GreptimeDBQueryResponse } from '../../model/greptimedb-client'; import { GreptimeDBLogQuery } from './GreptimeDBLogQuery'; diff --git a/greptimedb/src/queries/greptimedb-query-data-model.ts b/greptimedb/src/queries/greptimedb-query-data-model.ts index ae492b686..4f98957ac 100644 --- a/greptimedb/src/queries/greptimedb-query-data-model.ts +++ b/greptimedb/src/queries/greptimedb-query-data-model.ts @@ -13,6 +13,7 @@ import { replaceVariables, VariableStateMap } from '@perses-dev/plugin-system'; import { AbsoluteTimeRange } from '@perses-dev/spec'; + import { GreptimeDBColumnSchema, GreptimeDBRecords, GreptimeDBResponseData } from '../model/greptimedb-data-types'; export type { GreptimeDBColumnSchema, GreptimeDBRecords, GreptimeDBResponseData }; @@ -129,8 +130,8 @@ export function findTimeColumnIndex(columnSchemas: GreptimeDBColumnSchema[]): nu } if (timeIndex === -1) { - const fallbackColumns = ['greptime_timestamp', 'timestamp', 'ts', 'time']; - timeIndex = columnSchemas.findIndex((col) => fallbackColumns.includes(col.name.toLowerCase())); + const fallbackColumns = new Set(['greptime_timestamp', 'timestamp', 'ts', 'time']); + timeIndex = columnSchemas.findIndex((col) => fallbackColumns.has(col.name.toLowerCase())); } return timeIndex; diff --git a/greptimedb/src/queries/greptimedb-time-series-query/GreptimeDBQuery.tsx b/greptimedb/src/queries/greptimedb-time-series-query/GreptimeDBQuery.tsx index 89bc7728f..045cbab3e 100644 --- a/greptimedb/src/queries/greptimedb-time-series-query/GreptimeDBQuery.tsx +++ b/greptimedb/src/queries/greptimedb-time-series-query/GreptimeDBQuery.tsx @@ -12,8 +12,9 @@ // limitations under the License. import { parseVariables, TimeSeriesQueryPlugin } from '@perses-dev/plugin-system'; -import { GreptimeDBTimeSeriesQuerySpec } from './greptimedb-query-types'; + import { getTimeSeriesData } from './get-greptimedb-data'; +import { GreptimeDBTimeSeriesQuerySpec } from './greptimedb-query-types'; import { GreptimeDBTimeSeriesQueryEditor } from './GreptimeDBQueryEditor'; export const GreptimeDBTimeSeriesQuery: TimeSeriesQueryPlugin = { @@ -24,7 +25,7 @@ export const GreptimeDBTimeSeriesQuery: TimeSeriesQueryPlugin { const queryVariables = parseVariables(spec.query); - const allVariables = [...new Set([...queryVariables])]; + const allVariables = [...new Set(queryVariables)]; return { variables: allVariables, }; diff --git a/greptimedb/src/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.tsx b/greptimedb/src/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.tsx index 833973387..5a514b812 100644 --- a/greptimedb/src/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.tsx +++ b/greptimedb/src/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.tsx @@ -11,18 +11,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { Stack } from '@mui/material'; import { DatasourceSelect, DatasourceSelectProps, isVariableDatasource, OptionsEditorProps, } from '@perses-dev/plugin-system'; -import { ReactElement, useCallback } from 'react'; import { produce } from 'immer'; -import { Stack } from '@mui/material'; -import { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants'; +import { ReactElement, useCallback } from 'react'; + import { GreptimeDBQLEditor } from '../../components'; import { queryExample } from '../../components/constants'; +import { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants'; import { useQueryState } from '../query-editor-model'; import { GreptimeDBTimeSeriesQuerySpec } from './greptimedb-query-types'; diff --git a/greptimedb/src/queries/greptimedb-time-series-query/get-greptimedb-data.ts b/greptimedb/src/queries/greptimedb-time-series-query/get-greptimedb-data.ts index 50b3a4537..8c1560db2 100644 --- a/greptimedb/src/queries/greptimedb-time-series-query/get-greptimedb-data.ts +++ b/greptimedb/src/queries/greptimedb-time-series-query/get-greptimedb-data.ts @@ -12,6 +12,7 @@ // limitations under the License. import { TimeSeriesQueryPlugin } from '@perses-dev/plugin-system'; + import { GreptimeDBClient, GreptimeDBQueryResponse } from '../../model/greptimedb-client'; import { DEFAULT_DATASOURCE } from '../constants'; import { @@ -152,7 +153,7 @@ function inferStepMsFromSeries( let minDeltaMs = Number.POSITIVE_INFINITY; for (const s of series) { - const sortedTimestamps = [...s.values.map(([ts]) => ts)].sort((a, b) => a - b); + const sortedTimestamps = s.values.map(([ts]) => ts).toSorted((a, b) => a - b); for (let i = 1; i < sortedTimestamps.length; i++) { const delta = sortedTimestamps[i]! - sortedTimestamps[i - 1]!; if (delta > 0 && delta < minDeltaMs) { diff --git a/greptimedb/src/queries/greptimedb-time-series-query/greptimedb-query-types.test.ts b/greptimedb/src/queries/greptimedb-time-series-query/greptimedb-query-types.test.ts index 4ed391e3d..b4a615aca 100644 --- a/greptimedb/src/queries/greptimedb-time-series-query/greptimedb-query-types.test.ts +++ b/greptimedb/src/queries/greptimedb-time-series-query/greptimedb-query-types.test.ts @@ -13,6 +13,7 @@ import { TimeSeriesQueryContext } from '@perses-dev/plugin-system'; import { DatasourceSpec } from '@perses-dev/spec'; + import { GreptimeDBDatasource, GreptimeDBDatasourceSpec } from '../../datasources'; import { GreptimeDBQueryResponse } from '../../model/greptimedb-client'; import { GreptimeDBTimeSeriesQuery } from './GreptimeDBQuery'; @@ -170,6 +171,6 @@ describe('GreptimeDBTimeSeriesQuery', () => { ); expect(result.series).toHaveLength(2); - expect(result.series.map((s) => s.name).sort()).toEqual(['host=host-c', 'host=host_b']); + expect(result.series.map((s) => s.name).toSorted()).toEqual(['host=host-c', 'host=host_b']); }); }); diff --git a/greptimedb/src/queries/greptimedb-trace-query/GreptimeDBTraceQuery.tsx b/greptimedb/src/queries/greptimedb-trace-query/GreptimeDBTraceQuery.tsx index 5ec9d9028..3bc023f5a 100644 --- a/greptimedb/src/queries/greptimedb-trace-query/GreptimeDBTraceQuery.tsx +++ b/greptimedb/src/queries/greptimedb-trace-query/GreptimeDBTraceQuery.tsx @@ -12,8 +12,9 @@ // limitations under the License. import { parseVariables, TraceQueryPlugin } from '@perses-dev/plugin-system'; -import { GreptimeDBTraceQuerySpec } from './greptimedb-trace-query-types'; + import { getGreptimeDBTraceData } from './get-greptimedb-trace-data'; +import { GreptimeDBTraceQuerySpec } from './greptimedb-trace-query-types'; import { GreptimeDBTraceQueryEditor } from './GreptimeDBTraceQueryEditor'; export const GreptimeDBTraceQuery: TraceQueryPlugin = { diff --git a/greptimedb/src/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.tsx b/greptimedb/src/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.tsx index 360de9194..f29652fc6 100644 --- a/greptimedb/src/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.tsx +++ b/greptimedb/src/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.tsx @@ -12,14 +12,15 @@ // limitations under the License. import { Stack } from '@mui/material'; -import { produce } from 'immer'; import { DatasourceSelect, DatasourceSelectProps, isVariableDatasource, OptionsEditorProps, } from '@perses-dev/plugin-system'; +import { produce } from 'immer'; import { ReactElement, useCallback } from 'react'; + import { GreptimeDBQLEditor } from '../../components'; import { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants'; import { useQueryState } from '../query-editor-model'; diff --git a/greptimedb/src/queries/greptimedb-trace-query/get-greptimedb-trace-data.ts b/greptimedb/src/queries/greptimedb-trace-query/get-greptimedb-trace-data.ts index 6e4c8914a..31ea015bb 100644 --- a/greptimedb/src/queries/greptimedb-trace-query/get-greptimedb-trace-data.ts +++ b/greptimedb/src/queries/greptimedb-trace-query/get-greptimedb-trace-data.ts @@ -13,8 +13,9 @@ import { replaceVariables, TraceQueryPlugin } from '@perses-dev/plugin-system'; import { TraceSearchResult } from '@perses-dev/spec'; -import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; import * as otlpcommonv1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/common/v1/common'; +import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; + import { GreptimeDBClient, GreptimeDBQueryResponse } from '../../model/greptimedb-client'; import { DEFAULT_DATASOURCE } from '../constants'; import { @@ -270,7 +271,7 @@ function buildSearchResult(records: GreptimeDBRecords | undefined): TraceSearchR rootTraceName: entry.rootTraceName, serviceStats: entry.serviceStats, })) - .sort((a, b) => b.startTimeUnixMs - a.startTimeUnixMs); + .toSorted((a, b) => b.startTimeUnixMs - a.startTimeUnixMs); } function isIntegerGreptimeDataType(dataType: string): boolean { diff --git a/greptimedb/src/queries/greptimedb-trace-query/greptimedb-trace-query.test.ts b/greptimedb/src/queries/greptimedb-trace-query/greptimedb-trace-query.test.ts index 987c33c5c..ee69c7f2e 100644 --- a/greptimedb/src/queries/greptimedb-trace-query/greptimedb-trace-query.test.ts +++ b/greptimedb/src/queries/greptimedb-trace-query/greptimedb-trace-query.test.ts @@ -13,6 +13,7 @@ import { TraceQueryContext } from '@perses-dev/plugin-system'; import { DatasourceSpec } from '@perses-dev/spec'; + import { GreptimeDBDatasource, GreptimeDBDatasourceSpec } from '../../datasources'; import { GreptimeDBQueryResponse } from '../../model/greptimedb-client'; import { GreptimeDBTraceQuery } from './GreptimeDBTraceQuery'; diff --git a/heatmapchart/jest.config.ts b/heatmapchart/jest.config.ts index 5190fb4de..16027133b 100644 --- a/heatmapchart/jest.config.ts +++ b/heatmapchart/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/heatmapchart/package.json b/heatmapchart/package.json index 0205d4840..2181726d8 100644 --- a/heatmapchart/package.json +++ b/heatmapchart/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/heatmapchart/rsbuild.config.ts b/heatmapchart/rsbuild.config.ts index 920658ca0..22abfc9d5 100644 --- a/heatmapchart/rsbuild.config.ts +++ b/heatmapchart/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/heatmapchart/src/HeatMapChart.ts b/heatmapchart/src/HeatMapChart.ts index 58b581327..af8ec88b5 100644 --- a/heatmapchart/src/HeatMapChart.ts +++ b/heatmapchart/src/HeatMapChart.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PanelPlugin } from '@perses-dev/plugin-system'; + import { HeatMapChartOptionsEditorSettings, HeatMapChartPanel, HeatMapChartPanelProps } from './components'; import { createInitialHeatMapChartOptions, HeatMapChartOptions } from './heat-map-chart-model'; diff --git a/heatmapchart/src/components/HeatMapChart.tsx b/heatmapchart/src/components/HeatMapChart.tsx index a52cf9dc4..89cf4ad22 100644 --- a/heatmapchart/src/components/HeatMapChart.tsx +++ b/heatmapchart/src/components/HeatMapChart.tsx @@ -11,19 +11,20 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, useMemo } from 'react'; +import { useTheme } from '@mui/material'; import { EChart, FormatOptions, formatValue, useChartsTheme, useTimeZone } from '@perses-dev/components'; -import { use, EChartsCoreOption } from 'echarts/core'; -import { CustomChart } from 'echarts/charts'; +import { TimeScale } from '@perses-dev/spec'; import type { CustomSeriesRenderItemAPI, CustomSeriesRenderItemParams } from 'echarts'; -import { useTheme } from '@mui/material'; +import { CustomChart } from 'echarts/charts'; +import { use as registerECharts, EChartsCoreOption } from 'echarts/core'; import { CustomSeriesRenderItemReturn } from 'echarts/types/dist/echarts'; -import { TimeScale } from '@perses-dev/spec'; +import { ReactElement, useMemo } from 'react'; + import { LOG_BASE } from '../heat-map-chart-model'; import { getFormattedHeatmapAxisLabel } from '../utils'; import { generateTooltipHTML } from './HeatMapTooltip'; -use([CustomChart]); +registerECharts([CustomChart]); // The default coloring is a blue->yellow->red gradient const DEFAULT_VISUAL_MAP_COLORS = [ diff --git a/heatmapchart/src/components/HeatMapChartOptionsEditorSettings.test.tsx b/heatmapchart/src/components/HeatMapChartOptionsEditorSettings.test.tsx index 3a5d768b6..a4d8d3124 100644 --- a/heatmapchart/src/components/HeatMapChartOptionsEditorSettings.test.tsx +++ b/heatmapchart/src/components/HeatMapChartOptionsEditorSettings.test.tsx @@ -15,6 +15,7 @@ import { ChartsProvider, testChartsTheme } from '@perses-dev/components'; import { fireEvent, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React, { act } from 'react'; + import { DEFAULT_FORMAT, HeatMapChartOptions } from '../heat-map-chart-model'; import { HeatMapChartOptionsEditorSettings } from './HeatMapChartOptionsEditorSettings'; diff --git a/heatmapchart/src/components/HeatMapChartOptionsEditorSettings.tsx b/heatmapchart/src/components/HeatMapChartOptionsEditorSettings.tsx index 9abc76be4..d19f36eb7 100644 --- a/heatmapchart/src/components/HeatMapChartOptionsEditorSettings.tsx +++ b/heatmapchart/src/components/HeatMapChartOptionsEditorSettings.tsx @@ -24,6 +24,7 @@ import { import { produce } from 'immer'; import merge from 'lodash/merge'; import { ReactElement } from 'react'; + import { DEFAULT_FORMAT, HeatMapChartOptions, diff --git a/heatmapchart/src/components/HeatMapChartPanel.tsx b/heatmapchart/src/components/HeatMapChartPanel.tsx index 4c8ec7751..8795e280a 100644 --- a/heatmapchart/src/components/HeatMapChartPanel.tsx +++ b/heatmapchart/src/components/HeatMapChartPanel.tsx @@ -13,9 +13,10 @@ import { Stack, Typography } from '@mui/material'; import { PanelProps } from '@perses-dev/plugin-system'; +import { TimeScale, TimeSeries, TimeSeriesData } from '@perses-dev/spec'; import merge from 'lodash/merge'; import { ReactElement, useMemo } from 'react'; -import { TimeScale, TimeSeries, TimeSeriesData } from '@perses-dev/spec'; + import { DEFAULT_FORMAT, HeatMapChartOptions, LOG_BASE } from '../heat-map-chart-model'; import { generateCompleteTimestamps, getCommonTimeScaleForQueries } from '../utils'; import { HeatMapChart, HeatMapDataItem } from './HeatMapChart'; diff --git a/heatmapchart/src/components/HeatMapTooltip.ts b/heatmapchart/src/components/HeatMapTooltip.ts index e4d6e955e..19d7dc648 100644 --- a/heatmapchart/src/components/HeatMapTooltip.ts +++ b/heatmapchart/src/components/HeatMapTooltip.ts @@ -13,6 +13,7 @@ import { css, Theme } from '@mui/material'; import { FormatOptions, formatValue, getDateAndTime } from '@perses-dev/components'; + import { HeatMapData } from './HeatMapChart'; interface CustomTooltipProps { diff --git a/heatmapchart/src/getPluginModule.ts b/heatmapchart/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/heatmapchart/src/getPluginModule.ts +++ b/heatmapchart/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/histogramchart/jest.config.ts b/histogramchart/jest.config.ts index 5190fb4de..16027133b 100644 --- a/histogramchart/jest.config.ts +++ b/histogramchart/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/histogramchart/package.json b/histogramchart/package.json index aa7efb286..17c65732c 100644 --- a/histogramchart/package.json +++ b/histogramchart/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/histogramchart/rsbuild.config.ts b/histogramchart/rsbuild.config.ts index f5c41edbf..2e35852de 100644 --- a/histogramchart/rsbuild.config.ts +++ b/histogramchart/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/histogramchart/src/HistogramChart.ts b/histogramchart/src/HistogramChart.ts index e2e2f0767..d12ad1861 100644 --- a/histogramchart/src/HistogramChart.ts +++ b/histogramchart/src/HistogramChart.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PanelPlugin } from '@perses-dev/plugin-system'; + import { HistogramChartOptionsEditorSettings, HistogramChartPanel, HistogramChartPanelProps } from './components'; import { createInitialHistogramChartOptions, HistogramChartOptions } from './histogram-chart-model'; diff --git a/histogramchart/src/components/HistogramChart.tsx b/histogramchart/src/components/HistogramChart.tsx index 5266389c6..23fa4532b 100644 --- a/histogramchart/src/components/HistogramChart.tsx +++ b/histogramchart/src/components/HistogramChart.tsx @@ -11,17 +11,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, useMemo } from 'react'; import { EChart, FormatOptions, getFormattedAxis, ThresholdOptions, useChartsTheme } from '@perses-dev/components'; -import { use, EChartsCoreOption } from 'echarts/core'; +import { BucketTuple } from '@perses-dev/spec'; import { CustomSeriesRenderItemAPI, CustomSeriesRenderItemParams } from 'echarts'; import { CustomChart } from 'echarts/charts'; +import { use as registerECharts, EChartsCoreOption } from 'echarts/core'; import { CustomSeriesRenderItemReturn } from 'echarts/types/dist/echarts'; -import { BucketTuple } from '@perses-dev/spec'; -import { getColorFromThresholds } from '../utils'; +import { ReactElement, useMemo } from 'react'; + import { LOG_BASE } from '../histogram-chart-model'; +import { getColorFromThresholds } from '../utils'; -use([CustomChart]); +registerECharts([CustomChart]); export interface HistogramChartData { buckets: BucketTuple[]; diff --git a/histogramchart/src/components/HistogramChartOptionsEditorSettings.test.tsx b/histogramchart/src/components/HistogramChartOptionsEditorSettings.test.tsx index f1227e6d4..acf0a3c84 100644 --- a/histogramchart/src/components/HistogramChartOptionsEditorSettings.test.tsx +++ b/histogramchart/src/components/HistogramChartOptionsEditorSettings.test.tsx @@ -14,6 +14,7 @@ import { ChartsProvider, testChartsTheme } from '@perses-dev/components'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; + import { HistogramChartOptions } from '../histogram-chart-model'; import { HistogramChartOptionsEditorSettings } from './HistogramChartOptionsEditorSettings'; diff --git a/histogramchart/src/components/HistogramChartOptionsEditorSettings.tsx b/histogramchart/src/components/HistogramChartOptionsEditorSettings.tsx index 76ca54259..ca8789656 100644 --- a/histogramchart/src/components/HistogramChartOptionsEditorSettings.tsx +++ b/histogramchart/src/components/HistogramChartOptionsEditorSettings.tsx @@ -26,6 +26,7 @@ import { import { produce } from 'immer'; import merge from 'lodash/merge'; import { ReactElement } from 'react'; + import { DEFAULT_FORMAT, DEFAULT_MAX_PERCENT, diff --git a/histogramchart/src/components/HistogramChartPanel.tsx b/histogramchart/src/components/HistogramChartPanel.tsx index c4f1483ac..4ad6acfe3 100644 --- a/histogramchart/src/components/HistogramChartPanel.tsx +++ b/histogramchart/src/components/HistogramChartPanel.tsx @@ -12,11 +12,12 @@ // limitations under the License. import { Box, Stack, Typography } from '@mui/material'; +import { useChartsTheme } from '@perses-dev/components'; import { PanelProps } from '@perses-dev/plugin-system'; +import { TimeSeriesData } from '@perses-dev/spec'; import merge from 'lodash/merge'; import { ReactElement, useMemo } from 'react'; -import { useChartsTheme } from '@perses-dev/components'; -import { TimeSeriesData } from '@perses-dev/spec'; + import { DEFAULT_FORMAT, DEFAULT_THRESHOLDS, HistogramChartOptions } from '../histogram-chart-model'; import { HistogramChart, HistogramChartData } from './HistogramChart'; diff --git a/histogramchart/src/getPluginModule.ts b/histogramchart/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/histogramchart/src/getPluginModule.ts +++ b/histogramchart/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/jaeger/jest.config.ts b/jaeger/jest.config.ts index 602ff9f7b..89782643e 100644 --- a/jaeger/jest.config.ts +++ b/jaeger/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/jaeger/package.json b/jaeger/package.json index 95e550d0d..3e5856281 100644 --- a/jaeger/package.json +++ b/jaeger/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/jaeger/rsbuild.config.ts b/jaeger/rsbuild.config.ts index 46f085879..a5b33d048 100644 --- a/jaeger/rsbuild.config.ts +++ b/jaeger/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/jaeger/src/getPluginModule.ts b/jaeger/src/getPluginModule.ts index 2bf440477..2c762611b 100644 --- a/jaeger/src/getPluginModule.ts +++ b/jaeger/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; export function getPluginModule(): PluginModuleResource { diff --git a/jaeger/src/model/jaeger-client.ts b/jaeger/src/model/jaeger-client.ts index 676ad06f1..ea28738bc 100644 --- a/jaeger/src/model/jaeger-client.ts +++ b/jaeger/src/model/jaeger-client.ts @@ -11,8 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { DatasourceClient } from '@perses-dev/plugin-system'; import { RequestHeaders } from '@perses-dev/client'; +import { DatasourceClient } from '@perses-dev/plugin-system'; + import { JaegerApiResponse, JaegerOperation, JaegerSearchRequestParameters, JaegerTrace } from './api-types'; interface JaegerClientOptions { @@ -42,7 +43,7 @@ export const executeRequest = async (...args: Parameters return await response.json(); } catch (e) { console.error('Invalid response from server', e); - throw new Error('Invalid response from server'); + throw new Error('Invalid response from server', { cause: e }); } }; diff --git a/jaeger/src/model/trace-query-model.ts b/jaeger/src/model/trace-query-model.ts index 5c682a03f..159e1f6f3 100644 --- a/jaeger/src/model/trace-query-model.ts +++ b/jaeger/src/model/trace-query-model.ts @@ -12,6 +12,7 @@ // limitations under the License. import { DatasourceSelectValue } from '@perses-dev/plugin-system'; + import { JaegerDatasourceSelector } from './jaeger-selectors'; export interface JaegerTraceQuerySpec { diff --git a/jaeger/src/plugins/JaegerDatasourceEditor.tsx b/jaeger/src/plugins/JaegerDatasourceEditor.tsx index ce51c9160..864d8a240 100644 --- a/jaeger/src/plugins/JaegerDatasourceEditor.tsx +++ b/jaeger/src/plugins/JaegerDatasourceEditor.tsx @@ -13,6 +13,7 @@ import { HTTPSettingsEditor } from '@perses-dev/plugin-system'; import { ReactElement } from 'react'; + import { JaegerDatasourceSpec } from './jaeger-datasource-types'; export interface JaegerDatasourceEditorProps { diff --git a/jaeger/src/plugins/JaegerTraceQuery.ts b/jaeger/src/plugins/JaegerTraceQuery.ts index 58403bcb6..efdabfbc3 100644 --- a/jaeger/src/plugins/JaegerTraceQuery.ts +++ b/jaeger/src/plugins/JaegerTraceQuery.ts @@ -12,6 +12,7 @@ // limitations under the License. import { isVariableDatasource, parseVariables, TraceQueryPlugin } from '@perses-dev/plugin-system'; + import { JaegerTraceQuerySpec } from '../model'; import { getTraceData } from './get-trace-data'; import { JaegerTraceQueryEditor } from './JaegerTraceQueryEditor'; diff --git a/jaeger/src/plugins/JaegerTraceQueryEditor.test.tsx b/jaeger/src/plugins/JaegerTraceQueryEditor.test.tsx index f9e8430a2..d6be24308 100644 --- a/jaeger/src/plugins/JaegerTraceQueryEditor.test.tsx +++ b/jaeger/src/plugins/JaegerTraceQueryEditor.test.tsx @@ -11,8 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { fireEvent, render, screen, waitFor } from '@testing-library/react'; import { useDatasourceClient, useDatasourceSelectValueToSelector } from '@perses-dev/plugin-system'; +import { fireEvent, render, screen, waitFor } from '@testing-library/react'; + import { JaegerTraceQueryEditor } from './JaegerTraceQueryEditor'; jest.mock('@perses-dev/components', () => ({ diff --git a/jaeger/src/plugins/JaegerTraceQueryEditor.tsx b/jaeger/src/plugins/JaegerTraceQueryEditor.tsx index 4c654a635..f30101c11 100644 --- a/jaeger/src/plugins/JaegerTraceQueryEditor.tsx +++ b/jaeger/src/plugins/JaegerTraceQueryEditor.tsx @@ -30,6 +30,7 @@ import { } from '@perses-dev/plugin-system'; import { produce } from 'immer'; import { ChangeEvent, ReactElement, SyntheticEvent, useCallback, useEffect, useMemo, useState } from 'react'; + import { DEFAULT_JAEGER, JaegerClient, @@ -358,7 +359,7 @@ function toOptionalString(value: string): string | undefined { } function toSortedUniqueOptions(values: string[]): string[] { - return Array.from(new Set(values.filter((value) => value !== ''))).sort((a, b) => a.localeCompare(b)); + return Array.from(new Set(values.filter((value) => value !== ''))).toSorted((a, b) => a.localeCompare(b)); } function normalizeFieldValue(value: string | undefined): string | undefined { diff --git a/jaeger/src/plugins/get-trace-data.test.ts b/jaeger/src/plugins/get-trace-data.test.ts index f5782c3b2..e24b7eee9 100644 --- a/jaeger/src/plugins/get-trace-data.test.ts +++ b/jaeger/src/plugins/get-trace-data.test.ts @@ -13,9 +13,10 @@ import { replaceVariables, TraceQueryContext } from '@perses-dev/plugin-system'; import { DatasourceSpec } from '@perses-dev/spec'; + import { JaegerClient } from '../model'; -import { JaegerDatasource } from './jaeger-datasource'; import { getTraceData, jaegerTraceToOTLP } from './get-trace-data'; +import { JaegerDatasource } from './jaeger-datasource'; jest.mock('@perses-dev/plugin-system', () => { const actual = jest.requireActual('@perses-dev/plugin-system'); @@ -86,13 +87,15 @@ const makeClient = (): JaegerClient => { return client; }; -const getDatasource: jest.Mock = jest.fn((): DatasourceSpec => ({ - default: false, - plugin: { - kind: 'JaegerDatasource', - spec: datasource, - }, -})); +const getDatasource: jest.Mock = jest.fn( + (): DatasourceSpec => ({ + default: false, + plugin: { + kind: 'JaegerDatasource', + spec: datasource, + }, + }) +); function createContext(client: JaegerClient): TraceQueryContext { return { diff --git a/jaeger/src/plugins/get-trace-data.ts b/jaeger/src/plugins/get-trace-data.ts index 31537969c..fc0d95a8a 100644 --- a/jaeger/src/plugins/get-trace-data.ts +++ b/jaeger/src/plugins/get-trace-data.ts @@ -18,8 +18,9 @@ import { VariableStateMap, } from '@perses-dev/plugin-system'; import { AbsoluteTimeRange, Notice, TraceSearchResult } from '@perses-dev/spec'; -import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; import * as otlpcommonv1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/common/v1/common'; +import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; + import { DEFAULT_JAEGER, DEFAULT_SEARCH_LIMIT, @@ -303,6 +304,10 @@ function convertSpan(span: JaegerSpan): otlptracev1.Span { const spanKindTag = getTagValue(span.tags, 'span.kind'); const statusCodeTag = getTagValue(span.tags, 'otel.status_code'); const statusDescriptionTag = getTagValue(span.tags, 'otel.status_description'); + let statusCode: otlptracev1.Status['code'] | undefined = isErrorSpan(span) ? 'STATUS_CODE_ERROR' : undefined; + if (statusCodeTag && typeof statusCodeTag === 'string') { + statusCode = STATUS_CODE_MAP[statusCodeTag.toLowerCase()]; + } return { traceId: normalizeTraceId(span.traceID), @@ -316,12 +321,7 @@ function convertSpan(span: JaegerSpan): otlptracev1.Span { events: (span.logs ?? []).map(convertLog), links: buildLinks(span.references), status: { - code: - statusCodeTag && typeof statusCodeTag === 'string' - ? STATUS_CODE_MAP[statusCodeTag.toLowerCase()] - : isErrorSpan(span) - ? 'STATUS_CODE_ERROR' - : undefined, + code: statusCode, message: typeof statusDescriptionTag === 'string' ? statusDescriptionTag : undefined, }, }; diff --git a/jaeger/src/plugins/jaeger-datasource.tsx b/jaeger/src/plugins/jaeger-datasource.tsx index bb29231b1..9f8870bd6 100644 --- a/jaeger/src/plugins/jaeger-datasource.tsx +++ b/jaeger/src/plugins/jaeger-datasource.tsx @@ -12,6 +12,7 @@ // limitations under the License. import { DatasourcePlugin } from '@perses-dev/plugin-system'; + import { getTrace, JaegerClient, searchOperations, searchServices, searchTraces } from '../model'; import { JaegerDatasourceSpec } from './jaeger-datasource-types'; import { JaegerDatasourceEditor } from './JaegerDatasourceEditor'; diff --git a/jest.shared.ts b/jest.shared.ts index a09696422..8d4f4079b 100644 --- a/jest.shared.ts +++ b/jest.shared.ts @@ -13,6 +13,7 @@ import { readFileSync } from 'fs'; import { resolve } from 'path'; + import type { Config } from '@jest/types'; const swcrcPath = resolve(__dirname, './.cjs.swcrc'); diff --git a/logexplorer/jest.config.ts b/logexplorer/jest.config.ts index 13276c6cd..368681296 100644 --- a/logexplorer/jest.config.ts +++ b/logexplorer/jest.config.ts @@ -11,16 +11,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -import type { Config } from "@jest/types"; -import shared from "../jest.shared"; +import type { Config } from '@jest/types'; + +import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { ...shared, - setupFilesAfterEnv: [ - ...(shared.setupFilesAfterEnv ?? []), - "/src/setup-tests.ts", - ], + setupFilesAfterEnv: [...(shared.setupFilesAfterEnv ?? []), '/src/setup-tests.ts'], }; export default jestConfig; diff --git a/logexplorer/package.json b/logexplorer/package.json index bdeb36c51..8780e2229 100644 --- a/logexplorer/package.json +++ b/logexplorer/package.json @@ -16,7 +16,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest --passWithNoTests", "type-check": "tsc --noEmit" }, diff --git a/logexplorer/rsbuild.config.ts b/logexplorer/rsbuild.config.ts index a46647113..f4ba68952 100644 --- a/logexplorer/rsbuild.config.ts +++ b/logexplorer/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/logexplorer/src/explore/log-explorer/LogExplorer.tsx b/logexplorer/src/explore/log-explorer/LogExplorer.tsx index aeef5dc01..7ba3be788 100644 --- a/logexplorer/src/explore/log-explorer/LogExplorer.tsx +++ b/logexplorer/src/explore/log-explorer/LogExplorer.tsx @@ -12,6 +12,8 @@ // limitations under the License. import { Box, Stack } from '@mui/material'; +import { Panel } from '@perses-dev/dashboards'; +import { useExplorerManagerContext } from '@perses-dev/explore'; import { DataQueriesProvider, LogQueryContext, @@ -22,11 +24,9 @@ import { usePluginRegistry, useTimeRange, } from '@perses-dev/plugin-system'; -import { ReactElement, useState, useMemo } from 'react'; import { QueryDefinition } from '@perses-dev/spec'; -import { Panel } from '@perses-dev/dashboards'; -import { useExplorerManagerContext } from '@perses-dev/explore'; import { useQuery } from '@tanstack/react-query'; +import { ReactElement, useState, useMemo } from 'react'; interface LogExplorerQueryParams { queries?: QueryDefinition[]; diff --git a/logexplorer/src/getPluginModule.ts b/logexplorer/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/logexplorer/src/getPluginModule.ts +++ b/logexplorer/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/logstable/jest.config.ts b/logstable/jest.config.ts index 44271c334..8e8bcee0d 100644 --- a/logstable/jest.config.ts +++ b/logstable/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/logstable/package.json b/logstable/package.json index 6ca4bdefd..68d91c9fb 100644 --- a/logstable/package.json +++ b/logstable/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/logstable/rsbuild.config.ts b/logstable/rsbuild.config.ts index a275f6295..d693be18d 100644 --- a/logstable/rsbuild.config.ts +++ b/logstable/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/logstable/src/LogsTable.ts b/logstable/src/LogsTable.ts index d5505afb9..82cdd7bf2 100644 --- a/logstable/src/LogsTable.ts +++ b/logstable/src/LogsTable.ts @@ -12,12 +12,13 @@ // limitations under the License. import { PanelPlugin } from '@perses-dev/plugin-system'; + import { LogsTableComponent } from './LogsTableComponent'; +import { LogsTableCsvExportAction } from './LogsTableCsvExportAction'; +import { LogsTableExportAction } from './LogsTableExportAction'; import { LogsTableItemSelectionActionsEditor } from './LogsTableItemSelectionActionsEditor'; import { LogsTableSettingsEditor } from './LogsTableSettingsEditor'; import { LogsTableOptions, LogsTableProps } from './model'; -import { LogsTableCsvExportAction } from './LogsTableCsvExportAction'; -import { LogsTableExportAction } from './LogsTableExportAction'; export const LogsTable: PanelPlugin = { PanelComponent: LogsTableComponent, diff --git a/logstable/src/LogsTableComponent.tsx b/logstable/src/LogsTableComponent.tsx index fdcb99ef9..4baae4525 100644 --- a/logstable/src/LogsTableComponent.tsx +++ b/logstable/src/LogsTableComponent.tsx @@ -11,10 +11,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement } from 'react'; import { Box, Typography } from '@mui/material'; -import { LogsTableProps } from './model'; +import { ReactElement } from 'react'; + import { LogsList } from './components/LogsList'; +import { LogsTableProps } from './model'; export function LogsTableComponent(props: LogsTableProps): ReactElement | null { const { queryResults, spec } = props; @@ -22,7 +23,7 @@ export function LogsTableComponent(props: LogsTableProps): ReactElement | null { // all queries results must be included const logs = queryResults .flatMap((result) => result?.data.logs?.entries ?? []) - .sort((a, b) => b.timestamp - a.timestamp); + .toSorted((a, b) => b.timestamp - a.timestamp); if (!logs.length) { return ( diff --git a/logstable/src/LogsTableCsvExportAction.test.ts b/logstable/src/LogsTableCsvExportAction.test.ts index 6f985605a..a8a12eb7b 100644 --- a/logstable/src/LogsTableCsvExportAction.test.ts +++ b/logstable/src/LogsTableCsvExportAction.test.ts @@ -23,6 +23,7 @@ jest.mock('@perses-dev/plugin-system', () => { }); import { LogEntry } from '@perses-dev/spec'; + import { collectLabelKeys, buildLogsCsvString } from './LogsTableCsvExportAction'; describe('collectLabelKeys', () => { diff --git a/logstable/src/LogsTableCsvExportAction.tsx b/logstable/src/LogsTableCsvExportAction.tsx index 2e05dec8b..0344408b8 100644 --- a/logstable/src/LogsTableCsvExportAction.tsx +++ b/logstable/src/LogsTableCsvExportAction.tsx @@ -11,12 +11,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { InfoTooltip } from '@perses-dev/components'; import { IconButton } from '@mui/material'; -import FileDelimitedOutline from 'mdi-material-ui/FileDelimitedOutline'; +import { InfoTooltip } from '@perses-dev/components'; import { escapeCsvValue, formatTimestampISO, sanitizeFilename } from '@perses-dev/plugin-system'; import { LogEntry } from '@perses-dev/spec'; +import FileDelimitedOutline from 'mdi-material-ui/FileDelimitedOutline'; import { useCallback, useMemo } from 'react'; + import { LogsTableProps } from './model'; import { stripAnsi } from './utils/ansi'; @@ -27,7 +28,7 @@ export function collectLabelKeys(entries: LogEntry[]): string[] { keys.add(key); } } - return Array.from(keys).sort(); + return Array.from(keys).toSorted(); } export function buildLogsCsvString(entries: LogEntry[]): string { diff --git a/logstable/src/LogsTableExportAction.tsx b/logstable/src/LogsTableExportAction.tsx index 42d0bc850..f30a41d92 100644 --- a/logstable/src/LogsTableExportAction.tsx +++ b/logstable/src/LogsTableExportAction.tsx @@ -11,11 +11,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { InfoTooltip } from '@perses-dev/components'; import { IconButton } from '@mui/material'; -import DownloadIcon from 'mdi-material-ui/Download'; +import { InfoTooltip } from '@perses-dev/components'; import { sanitizeFilename } from '@perses-dev/plugin-system'; +import DownloadIcon from 'mdi-material-ui/Download'; import { useCallback, useMemo } from 'react'; + import { LogsTableProps } from './model'; export const LogsTableExportAction: React.FC = ({ queryResults, definition }) => { diff --git a/logstable/src/LogsTableItemSelectionActionsEditor.tsx b/logstable/src/LogsTableItemSelectionActionsEditor.tsx index e94560c7f..d0eb68196 100644 --- a/logstable/src/LogsTableItemSelectionActionsEditor.tsx +++ b/logstable/src/LogsTableItemSelectionActionsEditor.tsx @@ -13,6 +13,7 @@ import { ActionOptions, ItemSelectionActionsEditor, SelectionOptions } from '@perses-dev/plugin-system'; import { ReactElement } from 'react'; + import { LogsTableSettingsEditorProps } from './model'; export function LogsTableItemSelectionActionsEditor({ value, onChange }: LogsTableSettingsEditorProps): ReactElement { diff --git a/logstable/src/LogsTablePanel.test.tsx b/logstable/src/LogsTablePanel.test.tsx index 8a02797c7..aa795626f 100644 --- a/logstable/src/LogsTablePanel.test.tsx +++ b/logstable/src/LogsTablePanel.test.tsx @@ -22,6 +22,7 @@ import { VariableProvider } from '@perses-dev/dashboards'; import { TimeRangeProviderBasic } from '@perses-dev/plugin-system'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { fireEvent, render, screen } from '@testing-library/react'; + import { LogsTablePanel } from './LogsTablePanel'; import { LogsQueryData, LogsTableProps } from './model'; import { MOCK_LOGS_QUERY_DEFINITION, MOCK_LOGS_QUERY_RESULT, MOCK_LOGS_QUERY_RESULTS } from './test/mock-query-results'; diff --git a/logstable/src/LogsTablePanel.tsx b/logstable/src/LogsTablePanel.tsx index f32fd01c9..b624ec3c6 100644 --- a/logstable/src/LogsTablePanel.tsx +++ b/logstable/src/LogsTablePanel.tsx @@ -14,6 +14,7 @@ import { Box } from '@mui/material'; import { useChartsTheme } from '@perses-dev/components'; import { ReactElement } from 'react'; + import { LogsTableComponent } from './LogsTableComponent'; import { LogsTableProps } from './model'; diff --git a/logstable/src/LogsTableSettingsEditor.tsx b/logstable/src/LogsTableSettingsEditor.tsx index 64b56d289..8bb8dd271 100644 --- a/logstable/src/LogsTableSettingsEditor.tsx +++ b/logstable/src/LogsTableSettingsEditor.tsx @@ -19,6 +19,7 @@ import { } from '@perses-dev/components'; import { LegendOptionsEditor, LegendOptionsEditorProps, OptionsEditorProps } from '@perses-dev/plugin-system'; import { ReactElement } from 'react'; + import { LogsTableOptions } from './model'; type LogsTableSettingsEditorProps = OptionsEditorProps; diff --git a/logstable/src/components/EmptyLogsState.tsx b/logstable/src/components/EmptyLogsState.tsx index 1ef881c96..73d6d159c 100644 --- a/logstable/src/components/EmptyLogsState.tsx +++ b/logstable/src/components/EmptyLogsState.tsx @@ -11,8 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import React from 'react'; import { Box, Typography, useTheme } from '@mui/material'; +import React from 'react'; interface EmptyLogsStateProps { message?: string; diff --git a/logstable/src/components/LogRow/LogDetailsTable.tsx b/logstable/src/components/LogRow/LogDetailsTable.tsx index 01d457b33..2aaaab8f7 100644 --- a/logstable/src/components/LogRow/LogDetailsTable.tsx +++ b/logstable/src/components/LogRow/LogDetailsTable.tsx @@ -11,10 +11,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import React, { useMemo } from 'react'; import { Table, TableBody, TableRow, TableCell, useTheme, alpha } from '@mui/material'; -import './ansiColors.css'; import { Labels } from '@perses-dev/spec'; + +import './ansiColors.css'; +import React, { useMemo } from 'react'; + import { ansiToSanitizedHtml } from '../../utils/ansi'; const AnsiValue: React.FC<{ value: string }> = ({ value }) => { diff --git a/logstable/src/components/LogRow/LogRow.test.tsx b/logstable/src/components/LogRow/LogRow.test.tsx index 8b12498b8..31cd69ec3 100644 --- a/logstable/src/components/LogRow/LogRow.test.tsx +++ b/logstable/src/components/LogRow/LogRow.test.tsx @@ -11,8 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { render, screen, waitFor, fireEvent, RenderResult } from '@testing-library/react'; import { LogEntry } from '@perses-dev/spec'; +import { render, screen, waitFor, fireEvent, RenderResult } from '@testing-library/react'; + import { LogRow } from './LogRow'; // Mock clipboard API diff --git a/logstable/src/components/LogRow/LogRow.tsx b/logstable/src/components/LogRow/LogRow.tsx index 09447c6d4..6ae07dc05 100644 --- a/logstable/src/components/LogRow/LogRow.tsx +++ b/logstable/src/components/LogRow/LogRow.tsx @@ -22,6 +22,7 @@ import { Tooltip, useTheme, } from '@mui/material'; +import { LogEntry } from '@perses-dev/spec'; import Check from 'mdi-material-ui/Check'; import ChevronDown from 'mdi-material-ui/ChevronDown'; import ChevronRight from 'mdi-material-ui/ChevronRight'; @@ -29,13 +30,14 @@ import CodeJson from 'mdi-material-ui/CodeJson'; import ContentCopy from 'mdi-material-ui/ContentCopy'; import FormatQuoteClose from 'mdi-material-ui/FormatQuoteClose'; import React, { memo, ReactNode, useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import { LogEntry } from '@perses-dev/spec'; + import { ansiToSanitizedHtml } from '../../utils/ansi'; import { formatLogAsJson, formatLogEntry, formatLogMessage } from '../../utils/copyHelpers'; import { useSeverityColor } from '../hooks/useSeverity'; import { LogDetailsTable } from './LogDetailsTable'; -import { LogTimestamp } from './LogTimestamp'; import { ExpandButton, LogRowContainer, LogRowContent, LogText } from './LogsStyles'; +import { LogTimestamp } from './LogTimestamp'; + import './ansiColors.css'; const COPY_SUCCESS_DURATION_MS = 1500; diff --git a/logstable/src/components/LogRow/LogsStyles.tsx b/logstable/src/components/LogRow/LogsStyles.tsx index 4d4a770a8..69a7e9dd8 100644 --- a/logstable/src/components/LogRow/LogsStyles.tsx +++ b/logstable/src/components/LogRow/LogsStyles.tsx @@ -36,11 +36,8 @@ export const LogRowContent = styled(Box, { padding: '4px 8px', cursor: 'default', gap: '12px', - backgroundColor: isHighlighted - ? theme.palette.action.hover - : isSelected - ? theme.palette.action.selected - : 'transparent', + backgroundColor: + (isHighlighted && theme.palette.action.hover) || (isSelected && theme.palette.action.selected) || 'transparent', '&:hover': { backgroundColor: isSelected ? theme.palette.action.focus : theme.palette.action.hover, }, diff --git a/logstable/src/components/LogRow/ansiColors.css b/logstable/src/components/LogRow/ansiColors.css index 0a5d8b5be..ea7fc605f 100644 --- a/logstable/src/components/LogRow/ansiColors.css +++ b/logstable/src/components/LogRow/ansiColors.css @@ -1,93 +1,143 @@ /* Light mode defaults */ :root { - --ansi-black: #000000; - --ansi-red: #cc0000; - --ansi-green: #00aa00; - --ansi-yellow: #aa5500; - --ansi-blue: #0000aa; - --ansi-magenta: #aa00aa; - --ansi-cyan: #00aaaa; - --ansi-white: #aaaaaa; - --ansi-bright-black: #555555; - --ansi-bright-red: #ff5555; - --ansi-bright-green: #55ff55; - --ansi-bright-yellow: #ffff55; - --ansi-bright-blue: #5555ff; + --ansi-black: #000000; + --ansi-red: #cc0000; + --ansi-green: #00aa00; + --ansi-yellow: #aa5500; + --ansi-blue: #0000aa; + --ansi-magenta: #aa00aa; + --ansi-cyan: #00aaaa; + --ansi-white: #aaaaaa; + --ansi-bright-black: #555555; + --ansi-bright-red: #ff5555; + --ansi-bright-green: #55ff55; + --ansi-bright-yellow: #ffff55; + --ansi-bright-blue: #5555ff; --ansi-bright-magenta: #ff55ff; - --ansi-bright-cyan: #55ffff; - --ansi-bright-white: #ffffff; + --ansi-bright-cyan: #55ffff; + --ansi-bright-white: #ffffff; } /* Dark mode overrides — MUI sets [data-mui-color-scheme="dark"] on the root, falling back to OS preference via prefers-color-scheme */ -[data-mui-color-scheme="dark"], +[data-mui-color-scheme='dark'], .dark-mode { - --ansi-black: #555555; - --ansi-red: #ff6b6b; - --ansi-green: #69db7c; - --ansi-yellow: #ffd43b; - --ansi-blue: #74c0fc; - --ansi-magenta: #da77f2; - --ansi-cyan: #66d9e8; - --ansi-white: #ffffff; - --ansi-bright-black: #888888; - --ansi-bright-red: #ff8787; - --ansi-bright-green: #8ce99a; - --ansi-bright-yellow: #ffe066; - --ansi-bright-blue: #a5d8ff; + --ansi-black: #555555; + --ansi-red: #ff6b6b; + --ansi-green: #69db7c; + --ansi-yellow: #ffd43b; + --ansi-blue: #74c0fc; + --ansi-magenta: #da77f2; + --ansi-cyan: #66d9e8; + --ansi-white: #ffffff; + --ansi-bright-black: #888888; + --ansi-bright-red: #ff8787; + --ansi-bright-green: #8ce99a; + --ansi-bright-yellow: #ffe066; + --ansi-bright-blue: #a5d8ff; --ansi-bright-magenta: #e599f7; - --ansi-bright-cyan: #99e9f2; - --ansi-bright-white: #ffffff; + --ansi-bright-cyan: #99e9f2; + --ansi-bright-white: #ffffff; } @media (prefers-color-scheme: dark) { - :root:not([data-mui-color-scheme="light"]) { - --ansi-black: #555555; - --ansi-red: #ff6b6b; - --ansi-green: #69db7c; - --ansi-yellow: #ffd43b; - --ansi-blue: #74c0fc; - --ansi-magenta: #da77f2; - --ansi-cyan: #66d9e8; - --ansi-white: #ffffff; - --ansi-bright-black: #888888; - --ansi-bright-red: #ff8787; - --ansi-bright-green: #8ce99a; - --ansi-bright-yellow: #ffe066; - --ansi-bright-blue: #a5d8ff; + :root:not([data-mui-color-scheme='light']) { + --ansi-black: #555555; + --ansi-red: #ff6b6b; + --ansi-green: #69db7c; + --ansi-yellow: #ffd43b; + --ansi-blue: #74c0fc; + --ansi-magenta: #da77f2; + --ansi-cyan: #66d9e8; + --ansi-white: #ffffff; + --ansi-bright-black: #888888; + --ansi-bright-red: #ff8787; + --ansi-bright-green: #8ce99a; + --ansi-bright-yellow: #ffe066; + --ansi-bright-blue: #a5d8ff; --ansi-bright-magenta: #e599f7; - --ansi-bright-cyan: #99e9f2; - --ansi-bright-white: #ffffff; + --ansi-bright-cyan: #99e9f2; + --ansi-bright-white: #ffffff; } } /* Foreground colors */ -.ansi-black-fg { color: var(--ansi-black); } -.ansi-red-fg { color: var(--ansi-red); } -.ansi-green-fg { color: var(--ansi-green); } -.ansi-yellow-fg { color: var(--ansi-yellow); } -.ansi-blue-fg { color: var(--ansi-blue); } -.ansi-magenta-fg { color: var(--ansi-magenta); } -.ansi-cyan-fg { color: var(--ansi-cyan); } -.ansi-white-fg { color: var(--ansi-white); } -.ansi-bright-black-fg { color: var(--ansi-bright-black); } -.ansi-bright-red-fg { color: var(--ansi-bright-red); } -.ansi-bright-green-fg { color: var(--ansi-bright-green); } -.ansi-bright-yellow-fg { color: var(--ansi-bright-yellow); } -.ansi-bright-blue-fg { color: var(--ansi-bright-blue); } -.ansi-bright-magenta-fg { color: var(--ansi-bright-magenta); } -.ansi-bright-cyan-fg { color: var(--ansi-bright-cyan); } -.ansi-bright-white-fg { color: var(--ansi-bright-white); } +.ansi-black-fg { + color: var(--ansi-black); +} +.ansi-red-fg { + color: var(--ansi-red); +} +.ansi-green-fg { + color: var(--ansi-green); +} +.ansi-yellow-fg { + color: var(--ansi-yellow); +} +.ansi-blue-fg { + color: var(--ansi-blue); +} +.ansi-magenta-fg { + color: var(--ansi-magenta); +} +.ansi-cyan-fg { + color: var(--ansi-cyan); +} +.ansi-white-fg { + color: var(--ansi-white); +} +.ansi-bright-black-fg { + color: var(--ansi-bright-black); +} +.ansi-bright-red-fg { + color: var(--ansi-bright-red); +} +.ansi-bright-green-fg { + color: var(--ansi-bright-green); +} +.ansi-bright-yellow-fg { + color: var(--ansi-bright-yellow); +} +.ansi-bright-blue-fg { + color: var(--ansi-bright-blue); +} +.ansi-bright-magenta-fg { + color: var(--ansi-bright-magenta); +} +.ansi-bright-cyan-fg { + color: var(--ansi-bright-cyan); +} +.ansi-bright-white-fg { + color: var(--ansi-bright-white); +} /* Background colors */ -.ansi-black-bg { background-color: var(--ansi-black); } -.ansi-red-bg { background-color: var(--ansi-red); } -.ansi-green-bg { background-color: var(--ansi-green); } -.ansi-yellow-bg { background-color: var(--ansi-yellow); } -.ansi-blue-bg { background-color: var(--ansi-blue); } -.ansi-magenta-bg { background-color: var(--ansi-magenta); } -.ansi-cyan-bg { background-color: var(--ansi-cyan); } -.ansi-white-bg { background-color: var(--ansi-white); } +.ansi-black-bg { + background-color: var(--ansi-black); +} +.ansi-red-bg { + background-color: var(--ansi-red); +} +.ansi-green-bg { + background-color: var(--ansi-green); +} +.ansi-yellow-bg { + background-color: var(--ansi-yellow); +} +.ansi-blue-bg { + background-color: var(--ansi-blue); +} +.ansi-magenta-bg { + background-color: var(--ansi-magenta); +} +.ansi-cyan-bg { + background-color: var(--ansi-cyan); +} +.ansi-white-bg { + background-color: var(--ansi-white); +} /* Text decoration */ -.ansi-bold { font-weight: bold; } +.ansi-bold { + font-weight: bold; +} diff --git a/logstable/src/components/LogsList.tsx b/logstable/src/components/LogsList.tsx index bfce700aa..551bdff8d 100644 --- a/logstable/src/components/LogsList.tsx +++ b/logstable/src/components/LogsList.tsx @@ -11,8 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import React from 'react'; import { LogEntry } from '@perses-dev/spec'; +import React from 'react'; + import { LogsTableOptions } from '../model'; import { EmptyLogsState } from './EmptyLogsState'; import { useExpandedRows } from './hooks/useExpandedRows'; diff --git a/logstable/src/components/VirtualizedLogsList.tsx b/logstable/src/components/VirtualizedLogsList.tsx index cdb749b9a..35ec53384 100644 --- a/logstable/src/components/VirtualizedLogsList.tsx +++ b/logstable/src/components/VirtualizedLogsList.tsx @@ -11,20 +11,27 @@ // See the License for the specific language governing permissions and // limitations under the License. -import React, { useCallback, useState, useEffect, useRef, ReactNode } from 'react'; import { Box, useTheme, Popover, Button, ButtonGroup, IconButton } from '@mui/material'; -import CloseIcon from 'mdi-material-ui/Close'; -import { Virtuoso } from 'react-virtuoso'; import { useSelection } from '@perses-dev/components'; import { formatForDisplay, useSelectionItemActions } from '@perses-dev/dashboards'; import { ActionOptions, useAllVariableValues } from '@perses-dev/plugin-system'; import { LogEntry } from '@perses-dev/spec'; -import { formatLogEntries, formatLogMessage } from '../utils/copyHelpers'; +import CloseIcon from 'mdi-material-ui/Close'; +import React, { useCallback, useState, useEffect, useRef, ReactNode } from 'react'; +import { Virtuoso } from 'react-virtuoso'; + import { LogsTableOptions } from '../model'; +import { formatLogEntries, formatLogMessage } from '../utils/copyHelpers'; import { LogRow } from './LogRow'; const PERSES_LOGSTABLE_HINTS_DISMISSED = 'PERSES_LOGSTABLE_HINTS_DISMISSED'; const COPY_TOAST_DURATION_MS = 5000; +type CopyFormat = 'full' | 'message' | 'json'; +const COPY_FORMAT_LABELS: Record = { + full: 'Full', + message: 'Message', + json: 'JSON', +}; // Platform-aware modifier key display using TanStack's formatForDisplay const modKeyDisplay = formatForDisplay('Mod'); @@ -47,7 +54,7 @@ export const VirtualizedLogsList: React.FC = ({ const [lastSelectedIndex, setLastSelectedIndex] = useState(null); const selectedRowsRef = useRef>(selectedRows); const [copyPopoverAnchor, setCopyPopoverAnchor] = useState<{ x: number; y: number } | null>(null); - const [lastCopiedFormat, setLastCopiedFormat] = useState<'full' | 'message' | 'json'>('full'); + const [lastCopiedFormat, setLastCopiedFormat] = useState('full'); const [lastCopiedCount, setLastCopiedCount] = useState(0); const copyPopoverTimerRef = useRef(null); const [isHintsDismissed, setIsHintsDismissed] = useState(() => { @@ -130,7 +137,7 @@ export const VirtualizedLogsList: React.FC = ({ const handleCopyInFormat = useCallback( async (format: 'full' | 'message' | 'json') => { const selectedLogs = Array.from(selectedRowsRef.current) - .sort((a, b) => a - b) + .toSorted((a, b) => a - b) .map((index) => logs[index]) .filter((log) => log !== undefined); @@ -232,7 +239,7 @@ export const VirtualizedLogsList: React.FC = ({ if (currentSelectedRows.size > 0) { e.preventDefault(); const selectedLogs = Array.from(currentSelectedRows) - .sort((a, b) => a - b) + .toSorted((a, b) => a - b) .map((index) => logs[index]) .filter((log) => log !== undefined); const formattedText = formatLogEntries(selectedLogs); @@ -262,7 +269,7 @@ export const VirtualizedLogsList: React.FC = ({ if (selectedRowsRef.current.size > 0 && !hasTextSelection) { e.preventDefault(); const selectedLogs = Array.from(selectedRowsRef.current) - .sort((a, b) => a - b) + .toSorted((a, b) => a - b) .map((index) => logs[index]) .filter((log) => log !== undefined); const formattedText = formatLogEntries(selectedLogs); @@ -413,7 +420,7 @@ export const VirtualizedLogsList: React.FC = ({ component="span" sx={{ color: theme.palette.primary.main, minWidth: '60px', display: 'inline-block' }} > - {lastCopiedFormat === 'full' ? 'Full' : lastCopiedFormat === 'message' ? 'Message' : 'JSON'} + {COPY_FORMAT_LABELS[lastCopiedFormat]} diff --git a/logstable/src/components/hooks/useSeverity.ts b/logstable/src/components/hooks/useSeverity.ts index 14a6562fe..0d29dedd6 100644 --- a/logstable/src/components/hooks/useSeverity.ts +++ b/logstable/src/components/hooks/useSeverity.ts @@ -13,6 +13,7 @@ import { useTheme } from '@mui/material'; import { LogEntry } from '@perses-dev/spec'; + import { getSeverity } from '../utils'; export const useSeverityColor = (log?: LogEntry): string => { diff --git a/logstable/src/getPluginModule.ts b/logstable/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/logstable/src/getPluginModule.ts +++ b/logstable/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/logstable/src/utils/copyHelpers.test.ts b/logstable/src/utils/copyHelpers.test.ts index e3025b389..9e26a16cd 100644 --- a/logstable/src/utils/copyHelpers.test.ts +++ b/logstable/src/utils/copyHelpers.test.ts @@ -12,6 +12,7 @@ // limitations under the License. import { LogEntry } from '@perses-dev/spec'; + import { formatTimestamp, formatLabels, diff --git a/logstable/src/utils/copyHelpers.ts b/logstable/src/utils/copyHelpers.ts index 8b8f07b11..8d3302e4d 100644 --- a/logstable/src/utils/copyHelpers.ts +++ b/logstable/src/utils/copyHelpers.ts @@ -12,6 +12,7 @@ // limitations under the License. import { LogEntry } from '@perses-dev/spec'; + import { stripAnsi } from './ansi'; /** diff --git a/loki/jest.config.ts b/loki/jest.config.ts index 5190fb4de..16027133b 100644 --- a/loki/jest.config.ts +++ b/loki/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/loki/package.json b/loki/package.json index 668859b94..728e724e2 100644 --- a/loki/package.json +++ b/loki/package.json @@ -9,7 +9,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/loki/rsbuild.config.ts b/loki/rsbuild.config.ts index 5e478fe88..64e8dc470 100644 --- a/loki/rsbuild.config.ts +++ b/loki/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/loki/schemas/variables/loki-label-names/tests/valid/loki-label-names.json b/loki/schemas/variables/loki-label-names/tests/valid/loki-label-names.json index 2175d023a..83a743363 100644 --- a/loki/schemas/variables/loki-label-names/tests/valid/loki-label-names.json +++ b/loki/schemas/variables/loki-label-names/tests/valid/loki-label-names.json @@ -1,8 +1,6 @@ { "kind": "LokiLabelNamesVariable", "spec": { - "matchers": [ - "{job=\"myapp\"}" - ] + "matchers": ["{job=\"myapp\"}"] } } diff --git a/loki/schemas/variables/loki-label-values/tests/valid/loki-label-values.json b/loki/schemas/variables/loki-label-values/tests/valid/loki-label-values.json index a18b14f53..fed12468c 100644 --- a/loki/schemas/variables/loki-label-values/tests/valid/loki-label-values.json +++ b/loki/schemas/variables/loki-label-values/tests/valid/loki-label-values.json @@ -2,8 +2,6 @@ "kind": "LokiLabelValuesVariable", "spec": { "labelName": "job", - "matchers": [ - "{job=\"myapp\"}" - ] + "matchers": ["{job=\"myapp\"}"] } } diff --git a/loki/src/components/complete.test.ts b/loki/src/components/complete.test.ts index 7dfdfe526..606c9b215 100644 --- a/loki/src/components/complete.test.ts +++ b/loki/src/components/complete.test.ts @@ -11,9 +11,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { EditorState, EditorView } from '@uiw/react-codemirror'; -import { parser } from '@grafana/lezer-logql'; import { LRLanguage, ensureSyntaxTree } from '@codemirror/language'; +import { parser } from '@grafana/lezer-logql'; +import { EditorState, EditorView } from '@uiw/react-codemirror'; + import { identifyCompletion, applyQuotedCompletion } from './complete'; const logQLExtension = LRLanguage.define({ parser: parser }); diff --git a/loki/src/components/complete.ts b/loki/src/components/complete.ts index 500fe0078..cf4f801ad 100644 --- a/loki/src/components/complete.ts +++ b/loki/src/components/complete.ts @@ -14,7 +14,6 @@ import { Completion, CompletionContext, CompletionResult, insertCompletionText } from '@codemirror/autocomplete'; import { syntaxTree } from '@codemirror/language'; import { EditorState } from '@codemirror/state'; -import { SyntaxNode, Tree } from '@lezer/common'; import { Selector, Matchers, @@ -27,7 +26,9 @@ import { String as StringType, Pipe, } from '@grafana/lezer-logql'; +import { SyntaxNode, Tree } from '@lezer/common'; import { EditorView } from '@uiw/react-codemirror'; + import { toUnixSeconds } from '../model'; import { CompletionConfig } from './logql-extension'; @@ -46,7 +47,7 @@ export interface CompletionInfo { to?: number; } -const quoteChars = ['"', '`']; +const quoteChars = new Set(['"', '`']); const defaultQuoteChar = '"'; const ERROR_NODE = 0; // Lezer parser creates error nodes for incomplete/malformed syntax @@ -234,7 +235,7 @@ function detectLabelCompletion(state: EditorState, pos: number, node: SyntaxNode if (labelNode?.type.id === Identifier) { const label = state.sliceDoc(labelNode.from, labelNode.to); // Skip leading quote if present: { name="HT▯ - const from = quoteChars.includes(state.sliceDoc(node.from, node.from + 1)) ? node.from + 1 : node.from; + const from = quoteChars.has(state.sliceDoc(node.from, node.from + 1)) ? node.from + 1 : node.from; return { scope: { kind: 'LabelValue', label }, from }; } } @@ -330,7 +331,12 @@ function completePipeFunctions(afterPipe: boolean, hasSpace: boolean, afterExcla // Parser functions and pipe operations: always show // Add pipe prefix when not after pipe (e.g., "{} " needs "| json" not " json") - const parserPrefix = !afterPipe ? '| ' : hasSpace ? '' : ' '; + let parserPrefix = ' '; + if (!afterPipe) { + parserPrefix = '| '; + } else if (hasSpace) { + parserPrefix = ''; + } // Parsing expressions: Extract structured data const parsingExpressions = ['json', 'logfmt', 'pattern', 'regexp', 'unpack', 'unwrap']; @@ -443,11 +449,11 @@ function escapeString(input: string, quoteChar: string): string { */ export function applyQuotedCompletion(view: EditorView, completion: Completion, from: number, to: number): void { let quoteChar = defaultQuoteChar; - if (quoteChars.includes(view.state.sliceDoc(from - 1, from))) { + if (quoteChars.has(view.state.sliceDoc(from - 1, from))) { quoteChar = view.state.sliceDoc(from - 1, from); from--; } - if (quoteChars.includes(view.state.sliceDoc(to, to + 1))) { + if (quoteChars.has(view.state.sliceDoc(to, to + 1))) { quoteChar = view.state.sliceDoc(to, to + 1); to++; } diff --git a/loki/src/components/logql-editor.tsx b/loki/src/components/logql-editor.tsx index e37585668..ada2e4bbe 100644 --- a/loki/src/components/logql-editor.tsx +++ b/loki/src/components/logql-editor.tsx @@ -11,9 +11,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, useMemo } from 'react'; import { useTheme } from '@mui/material'; import CodeMirror, { EditorView, ReactCodeMirrorProps } from '@uiw/react-codemirror'; +import { ReactElement, useMemo } from 'react'; + import { LogQLExtension, CompletionConfig } from './logql-extension'; export type LogQLEditorProps = Omit & { diff --git a/loki/src/components/logql-extension.ts b/loki/src/components/logql-extension.ts index 44a642004..06acc72aa 100644 --- a/loki/src/components/logql-extension.ts +++ b/loki/src/components/logql-extension.ts @@ -11,14 +11,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { CompletionContext } from '@codemirror/autocomplete'; import { LRLanguage } from '@codemirror/language'; import { parser } from '@grafana/lezer-logql'; -import { CompletionContext } from '@codemirror/autocomplete'; -import { Extension } from '@uiw/react-codemirror'; import { AbsoluteTimeRange } from '@perses-dev/spec'; +import { Extension } from '@uiw/react-codemirror'; + import { LokiClient } from '../model'; -import { logqlHighlight } from './logql-highlight'; import { complete } from './complete'; +import { logqlHighlight } from './logql-highlight'; function logqlLanguage(): LRLanguage { return LRLanguage.define({ diff --git a/loki/src/datasources/loki-datasource/LokiDatasource.tsx b/loki/src/datasources/loki-datasource/LokiDatasource.tsx index bd9f27ba6..a97c1ec14 100644 --- a/loki/src/datasources/loki-datasource/LokiDatasource.tsx +++ b/loki/src/datasources/loki-datasource/LokiDatasource.tsx @@ -12,6 +12,7 @@ // limitations under the License. import { DatasourcePlugin } from '@perses-dev/plugin-system'; + import { LokiClient, query, diff --git a/loki/src/datasources/loki-datasource/LokiDatasourceEditor.tsx b/loki/src/datasources/loki-datasource/LokiDatasourceEditor.tsx index 0f55186f9..9767458f6 100644 --- a/loki/src/datasources/loki-datasource/LokiDatasourceEditor.tsx +++ b/loki/src/datasources/loki-datasource/LokiDatasourceEditor.tsx @@ -13,6 +13,7 @@ import { HTTPSettingsEditor } from '@perses-dev/plugin-system'; import { ReactElement } from 'react'; + import { LokiDatasourceSpec } from './loki-datasource-types'; export interface LokiDatasourceEditorProps { diff --git a/loki/src/getPluginModule.ts b/loki/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/loki/src/getPluginModule.ts +++ b/loki/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/loki/src/model/loki-client.test.ts b/loki/src/model/loki-client.test.ts index 592865e7d..b0ad89e7c 100644 --- a/loki/src/model/loki-client.test.ts +++ b/loki/src/model/loki-client.test.ts @@ -12,6 +12,7 @@ // limitations under the License. import { AbsoluteTimeRange } from '@perses-dev/spec'; + import { toUnixSeconds, getLokiTimeRange, labels, labelValues } from './loki-client'; // Mock global fetch for labels/labelValues tests diff --git a/loki/src/model/loki-client.ts b/loki/src/model/loki-client.ts index cd7869fe1..375744e7b 100644 --- a/loki/src/model/loki-client.ts +++ b/loki/src/model/loki-client.ts @@ -12,6 +12,7 @@ // limitations under the License. import { AbsoluteTimeRange } from '@perses-dev/spec'; + import { LokiQueryResponse, LokiQueryRangeResponse, diff --git a/loki/src/queries/loki-log-query/LokiLogQuery.tsx b/loki/src/queries/loki-log-query/LokiLogQuery.tsx index 8b304dede..55d513a0f 100644 --- a/loki/src/queries/loki-log-query/LokiLogQuery.tsx +++ b/loki/src/queries/loki-log-query/LokiLogQuery.tsx @@ -11,11 +11,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { QueryDefinition } from '@perses-dev/spec'; import { LogQueryPlugin, LogQueryContext, calculateVolumeInterval, parseVariables } from '@perses-dev/plugin-system'; +import { QueryDefinition } from '@perses-dev/spec'; + import { getLokiLogData } from './get-loki-log-data'; -import { LokiLogQueryEditor } from './LokiLogQueryEditor'; import { LokiLogQuerySpec } from './loki-log-query-types'; +import { LokiLogQueryEditor } from './LokiLogQueryEditor'; export const LokiLogQuery: LogQueryPlugin = { getLogData: getLokiLogData, @@ -23,7 +24,7 @@ export const LokiLogQuery: LogQueryPlugin = { createInitialOptions: () => ({ query: '' }), dependsOn: (spec) => { const queryVariables = parseVariables(spec.query); - const allVariables = [...new Set([...queryVariables])]; + const allVariables = [...new Set(queryVariables)]; return { variables: allVariables, }; diff --git a/loki/src/queries/loki-log-query/LokiLogQueryEditor.tsx b/loki/src/queries/loki-log-query/LokiLogQueryEditor.tsx index bfcae944d..0555fa708 100644 --- a/loki/src/queries/loki-log-query/LokiLogQueryEditor.tsx +++ b/loki/src/queries/loki-log-query/LokiLogQueryEditor.tsx @@ -11,6 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { InputLabel, Stack, ToggleButton, ToggleButtonGroup } from '@mui/material'; +import { OptionsEditorControl } from '@perses-dev/components'; +import { createModEnterHandler } from '@perses-dev/dashboards'; import { DatasourceSelect, DatasourceSelectProps, @@ -20,11 +23,9 @@ import { useDatasourceClient, useTimeRange, } from '@perses-dev/plugin-system'; -import { InputLabel, Stack, ToggleButton, ToggleButtonGroup } from '@mui/material'; -import { ReactElement, useCallback, useMemo } from 'react'; import { produce } from 'immer'; -import { OptionsEditorControl } from '@perses-dev/components'; -import { createModEnterHandler } from '@perses-dev/dashboards'; +import { ReactElement, useCallback, useMemo } from 'react'; + import { LogQLEditor } from '../../components'; import { isDefaultLokiSelector, LOKI_DATASOURCE_KIND, LokiDatasourceSelector, LokiClient } from '../../model'; import { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants'; diff --git a/loki/src/queries/loki-log-query/get-loki-log-data.ts b/loki/src/queries/loki-log-query/get-loki-log-data.ts index bdf84ee45..181e73aca 100644 --- a/loki/src/queries/loki-log-query/get-loki-log-data.ts +++ b/loki/src/queries/loki-log-query/get-loki-log-data.ts @@ -13,8 +13,9 @@ import { replaceVariables, LogQueryPlugin, LogQueryContext } from '@perses-dev/plugin-system'; import { LogData, LogEntry } from '@perses-dev/spec'; -import { LokiStreamResult } from '../../model/loki-client-types'; + import { LokiClient } from '../../model/loki-client'; +import { LokiStreamResult } from '../../model/loki-client-types'; import { DEFAULT_DATASOURCE } from '../constants'; import { LokiLogQuerySpec } from './loki-log-query-types'; diff --git a/loki/src/queries/loki-log-query/loki-log-query-types.test.ts b/loki/src/queries/loki-log-query/loki-log-query-types.test.ts index 9318046d4..658bf5d67 100644 --- a/loki/src/queries/loki-log-query/loki-log-query-types.test.ts +++ b/loki/src/queries/loki-log-query/loki-log-query-types.test.ts @@ -12,9 +12,10 @@ // limitations under the License. import { LogQueryContext } from '@perses-dev/plugin-system'; -import { LokiQueryRangeStreamsResponse, LokiQueryRangeResponse } from '../../model/loki-client-types'; + import { LokiDatasource } from '../../datasources/loki-datasource'; import { LokiDatasourceSpec } from '../../datasources/loki-datasource/loki-datasource-types'; +import { LokiQueryRangeStreamsResponse, LokiQueryRangeResponse } from '../../model/loki-client-types'; import { LokiLogQuery } from './LokiLogQuery'; const datasource: LokiDatasourceSpec = { diff --git a/loki/src/queries/loki-log-query/loki-log-query-types.ts b/loki/src/queries/loki-log-query/loki-log-query-types.ts index 2f9b88117..c8fa5ef45 100644 --- a/loki/src/queries/loki-log-query/loki-log-query-types.ts +++ b/loki/src/queries/loki-log-query/loki-log-query-types.ts @@ -12,6 +12,7 @@ // limitations under the License. import { DatasourceSelector } from '@perses-dev/spec'; + import { LokiQueryRangeStreamsResponse } from '../../model/loki-client-types'; export interface LokiLogQuerySpec { diff --git a/loki/src/queries/loki-time-series-query/LokiTimeSeriesQuery.tsx b/loki/src/queries/loki-time-series-query/LokiTimeSeriesQuery.tsx index 074157072..7cb4ebb68 100644 --- a/loki/src/queries/loki-time-series-query/LokiTimeSeriesQuery.tsx +++ b/loki/src/queries/loki-time-series-query/LokiTimeSeriesQuery.tsx @@ -12,9 +12,10 @@ // limitations under the License. import { TimeSeriesQueryPlugin, parseVariables } from '@perses-dev/plugin-system'; + import { getLokiTimeSeriesData } from './get-loki-time-series-data'; -import { LokiQueryEditor } from './LokiTimeSeriesQueryEditor'; import { LokiTimeSeriesQuerySpec } from './loki-time-series-query-types'; +import { LokiQueryEditor } from './LokiTimeSeriesQueryEditor'; export const LokiTimeSeriesQuery: TimeSeriesQueryPlugin = { getTimeSeriesData: getLokiTimeSeriesData, @@ -22,7 +23,7 @@ export const LokiTimeSeriesQuery: TimeSeriesQueryPlugin createInitialOptions: () => ({ query: '' }), dependsOn: (spec) => { const queryVariables = parseVariables(spec.query); - const allVariables = [...new Set([...queryVariables])]; + const allVariables = [...new Set(queryVariables)]; return { variables: allVariables, }; diff --git a/loki/src/queries/loki-time-series-query/LokiTimeSeriesQueryEditor.tsx b/loki/src/queries/loki-time-series-query/LokiTimeSeriesQueryEditor.tsx index 90cb5ff34..ec59aacdd 100644 --- a/loki/src/queries/loki-time-series-query/LokiTimeSeriesQueryEditor.tsx +++ b/loki/src/queries/loki-time-series-query/LokiTimeSeriesQueryEditor.tsx @@ -11,6 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { InputLabel, Stack } from '@mui/material'; +import { createModEnterHandler } from '@perses-dev/dashboards'; import { DatasourceSelect, DatasourceSelectProps, @@ -18,10 +20,9 @@ import { OptionsEditorProps, useDatasourceSelectValueToSelector, } from '@perses-dev/plugin-system'; -import { InputLabel, Stack } from '@mui/material'; -import { ReactElement, useCallback } from 'react'; -import { createModEnterHandler } from '@perses-dev/dashboards'; import { produce } from 'immer'; +import { ReactElement, useCallback } from 'react'; + import { LogQLEditor } from '../../components'; import { LOKI_DATASOURCE_KIND, LokiDatasourceSelector } from '../../model'; import { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants'; diff --git a/loki/src/queries/loki-time-series-query/get-loki-time-series-data.ts b/loki/src/queries/loki-time-series-query/get-loki-time-series-data.ts index 3a45feed6..47adc99df 100644 --- a/loki/src/queries/loki-time-series-query/get-loki-time-series-data.ts +++ b/loki/src/queries/loki-time-series-query/get-loki-time-series-data.ts @@ -12,8 +12,9 @@ // limitations under the License. import { TimeSeriesQueryPlugin, replaceVariables } from '@perses-dev/plugin-system'; -import { milliseconds } from 'date-fns'; import { DurationString, parseDurationString, TimeSeries } from '@perses-dev/spec'; +import { milliseconds } from 'date-fns'; + import { LokiClient, toUnixSeconds } from '../../model/loki-client'; import { LokiMatrixResult, LokiVectorResult } from '../../model/loki-client-types'; import { DEFAULT_DATASOURCE } from '../constants'; diff --git a/loki/src/queries/loki-time-series-query/loki-time-series-query-types.test.ts b/loki/src/queries/loki-time-series-query/loki-time-series-query-types.test.ts index fe28cbced..feaf36260 100644 --- a/loki/src/queries/loki-time-series-query/loki-time-series-query-types.test.ts +++ b/loki/src/queries/loki-time-series-query/loki-time-series-query-types.test.ts @@ -17,9 +17,10 @@ jest.mock('echarts/core'); import { TimeSeriesQueryContext } from '@perses-dev/plugin-system'; import { DatasourceSpec } from '@perses-dev/spec'; -import { LokiQueryRangeMatrixResponse, LokiQueryRangeResponse, LokiQueryResponse } from '../../model/loki-client-types'; + import { LokiDatasource } from '../../datasources/loki-datasource'; import { LokiDatasourceSpec } from '../../datasources/loki-datasource/loki-datasource-types'; +import { LokiQueryRangeMatrixResponse, LokiQueryRangeResponse, LokiQueryResponse } from '../../model/loki-client-types'; import { LokiTimeSeriesQuery } from './LokiTimeSeriesQuery'; const datasource: LokiDatasourceSpec = { diff --git a/loki/src/queries/loki-time-series-query/loki-time-series-query-types.ts b/loki/src/queries/loki-time-series-query/loki-time-series-query-types.ts index 2b57a7f24..af5ec3c7e 100644 --- a/loki/src/queries/loki-time-series-query/loki-time-series-query-types.ts +++ b/loki/src/queries/loki-time-series-query/loki-time-series-query-types.ts @@ -12,6 +12,7 @@ // limitations under the License. import { DatasourceSelector } from '@perses-dev/spec'; + import { LokiQueryRangeMatrixResponse, LokiQueryResponse } from '../../model/loki-client-types'; export interface LokiTimeSeriesQuerySpec { diff --git a/loki/src/queries/query-editor-model.ts b/loki/src/queries/query-editor-model.ts index 448a3fedb..a9a92ed12 100644 --- a/loki/src/queries/query-editor-model.ts +++ b/loki/src/queries/query-editor-model.ts @@ -11,9 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { useState } from 'react'; -import { produce } from 'immer'; import { OptionsEditorProps } from '@perses-dev/plugin-system'; +import { produce } from 'immer'; +import { useState } from 'react'; /** * Generic type for any Loki query spec that has a query field diff --git a/loki/src/variables/LokiLabelNamesVariable.tsx b/loki/src/variables/LokiLabelNamesVariable.tsx index 5d2fd428d..5690fc88a 100644 --- a/loki/src/variables/LokiLabelNamesVariable.tsx +++ b/loki/src/variables/LokiLabelNamesVariable.tsx @@ -18,6 +18,7 @@ import { datasourceSelectValueToSelector, isVariableDatasource, } from '@perses-dev/plugin-system'; + import { LokiClient, DEFAULT_LOKI, getLokiTimeRange, LOKI_DATASOURCE_KIND } from '../model'; import { stringArrayToVariableOptions, LokiLabelNamesVariableEditor } from './loki-variables'; import { LokiLabelNamesVariableOptions } from './types'; @@ -37,7 +38,7 @@ export const LokiLabelNamesVariable: VariablePlugin { - const matcherVariables = spec.matchers?.map((m) => parseVariables(m)).flat() || []; + const matcherVariables = spec.matchers?.flatMap((m) => parseVariables(m)) || []; const datasourceVariables = spec.datasource && isVariableDatasource(spec.datasource) ? parseVariables(spec.datasource) : []; return { variables: [...matcherVariables, ...datasourceVariables] }; diff --git a/loki/src/variables/LokiLabelValuesVariable.tsx b/loki/src/variables/LokiLabelValuesVariable.tsx index 3b40f7370..7dd2210cc 100644 --- a/loki/src/variables/LokiLabelValuesVariable.tsx +++ b/loki/src/variables/LokiLabelValuesVariable.tsx @@ -18,6 +18,7 @@ import { datasourceSelectValueToSelector, isVariableDatasource, } from '@perses-dev/plugin-system'; + import { LokiClient, DEFAULT_LOKI, getLokiTimeRange, LOKI_DATASOURCE_KIND } from '../model'; import { stringArrayToVariableOptions, LokiLabelValuesVariableEditor } from './loki-variables'; import { LokiLabelValuesVariableOptions } from './types'; @@ -42,7 +43,7 @@ export const LokiLabelValuesVariable: VariablePlugin { - const matcherVariables = spec.matchers?.map((m) => parseVariables(m)).flat() || []; + const matcherVariables = spec.matchers?.flatMap((m) => parseVariables(m)) || []; const labelVariables = parseVariables(spec.labelName); const datasourceVariables = spec.datasource && isVariableDatasource(spec.datasource) ? parseVariables(spec.datasource) : []; diff --git a/loki/src/variables/LokiLogQLVariable.tsx b/loki/src/variables/LokiLogQLVariable.tsx index 3953e6036..5f52ea750 100644 --- a/loki/src/variables/LokiLogQLVariable.tsx +++ b/loki/src/variables/LokiLogQLVariable.tsx @@ -18,6 +18,7 @@ import { datasourceSelectValueToSelector, isVariableDatasource, } from '@perses-dev/plugin-system'; + import { LokiClient, DEFAULT_LOKI, LOKI_DATASOURCE_KIND, getLokiTimeRange } from '../model'; import { capturingMetric, diff --git a/loki/src/variables/loki-variables.test.ts b/loki/src/variables/loki-variables.test.ts index decb5e1f5..90164f356 100644 --- a/loki/src/variables/loki-variables.test.ts +++ b/loki/src/variables/loki-variables.test.ts @@ -12,10 +12,11 @@ // limitations under the License. import { GetVariableOptionsContext } from '@perses-dev/plugin-system'; + import { LokiStreamResult } from '../model/loki-client-types'; import { stringArrayToVariableOptions, capturingMetric, capturingStreams } from './loki-variables'; -import { LokiLabelValuesVariable } from './LokiLabelValuesVariable'; import { LokiLabelNamesVariable } from './LokiLabelNamesVariable'; +import { LokiLabelValuesVariable } from './LokiLabelValuesVariable'; import { LokiLogQLVariable } from './LokiLogQLVariable'; // Dummy context for dependsOn calls (the implementations don't use ctx) diff --git a/loki/src/variables/loki-variables.tsx b/loki/src/variables/loki-variables.tsx index 9ca26c241..751535365 100644 --- a/loki/src/variables/loki-variables.tsx +++ b/loki/src/variables/loki-variables.tsx @@ -23,6 +23,7 @@ import { } from '@perses-dev/plugin-system'; import { produce } from 'immer'; import { ReactElement, useCallback, ChangeEvent, FocusEvent } from 'react'; + import { LogQLEditor } from '../components'; import { DEFAULT_LOKI, diff --git a/loki/src/variables/types.ts b/loki/src/variables/types.ts index b9f33a3ab..d27fb0a6d 100644 --- a/loki/src/variables/types.ts +++ b/loki/src/variables/types.ts @@ -12,6 +12,7 @@ // limitations under the License. import { DatasourceSelectValue } from '@perses-dev/plugin-system'; + import { LokiDatasourceSelector } from '../model/loki-selectors'; export interface LokiVariableOptionsBase { diff --git a/markdown/jest.config.ts b/markdown/jest.config.ts index 5190fb4de..16027133b 100644 --- a/markdown/jest.config.ts +++ b/markdown/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/markdown/package.json b/markdown/package.json index d625538e1..9d98b8365 100644 --- a/markdown/package.json +++ b/markdown/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest --passWithNoTests", "type-check": "tsc --noEmit" }, diff --git a/markdown/rsbuild.config.ts b/markdown/rsbuild.config.ts index ef2630c3e..0adfaf222 100644 --- a/markdown/rsbuild.config.ts +++ b/markdown/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/markdown/schemas/migrate/tests/text/expected.json b/markdown/schemas/migrate/tests/text/expected.json index cc4435fa4..4ab64b411 100644 --- a/markdown/schemas/migrate/tests/text/expected.json +++ b/markdown/schemas/migrate/tests/text/expected.json @@ -3,4 +3,4 @@ "spec": { "text": "This dashboard does have some purpose, let me remind... uuuuh..." } -} \ No newline at end of file +} diff --git a/markdown/schemas/migrate/tests/text/input.json b/markdown/schemas/migrate/tests/text/input.json index db7c6f353..0b34d8fd7 100644 --- a/markdown/schemas/migrate/tests/text/input.json +++ b/markdown/schemas/migrate/tests/text/input.json @@ -22,4 +22,4 @@ "pluginVersion": "10.1.8", "title": "Purpose of the Dashboard", "type": "text" -} \ No newline at end of file +} diff --git a/markdown/src/Markdown.ts b/markdown/src/Markdown.ts index 7f62ecfc3..31df3563d 100644 --- a/markdown/src/Markdown.ts +++ b/markdown/src/Markdown.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PanelPlugin } from '@perses-dev/plugin-system'; + import { createInitialMarkdownPanelOptions, MarkdownPanelOptions } from './markdown-panel-model'; import { MarkdownPanel } from './MarkdownPanel'; import { MarkdownPanelOptionsEditor } from './MarkdownPanelOptionsEditor'; diff --git a/markdown/src/MarkdownPanel.tsx b/markdown/src/MarkdownPanel.tsx index f84146633..d2f9e286f 100644 --- a/markdown/src/MarkdownPanel.tsx +++ b/markdown/src/MarkdownPanel.tsx @@ -17,6 +17,7 @@ import { PanelProps, useReplaceVariablesInString } from '@perses-dev/plugin-syst import DOMPurify from 'dompurify'; import { marked } from 'marked'; import React, { ReactElement, useMemo } from 'react'; + import { MarkdownPanelOptions } from './markdown-panel-model'; export type MarkdownPanelProps = PanelProps; diff --git a/markdown/src/MarkdownPanelOptionsEditor.tsx b/markdown/src/MarkdownPanelOptionsEditor.tsx index 277e882b1..8d8bd2145 100644 --- a/markdown/src/MarkdownPanelOptionsEditor.tsx +++ b/markdown/src/MarkdownPanelOptionsEditor.tsx @@ -11,9 +11,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ChangeEvent, ReactElement } from 'react'; -import { OptionsEditorProps } from '@perses-dev/plugin-system'; import { Link, Stack, TextField } from '@mui/material'; +import { OptionsEditorProps } from '@perses-dev/plugin-system'; +import { ChangeEvent, ReactElement } from 'react'; + import { MarkdownPanelOptions } from './markdown-panel-model'; export type MarkdownPanelOptionsEditorProps = OptionsEditorProps; diff --git a/markdown/src/getPluginModule.ts b/markdown/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/markdown/src/getPluginModule.ts +++ b/markdown/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/opensearch/docs/examples/docker-compose.yml b/opensearch/docs/examples/docker-compose.yml index 7d1a9cbc5..2ed29b9ab 100644 --- a/opensearch/docs/examples/docker-compose.yml +++ b/opensearch/docs/examples/docker-compose.yml @@ -21,10 +21,10 @@ services: soft: 65536 hard: 65536 ports: - - "9200:9200" - - "9600:9600" + - '9200:9200' + - '9600:9600' healthcheck: - test: ["CMD-SHELL", "curl -fsS http://localhost:9200/_cluster/health || exit 1"] + test: ['CMD-SHELL', 'curl -fsS http://localhost:9200/_cluster/health || exit 1'] interval: 5s timeout: 5s retries: 20 @@ -36,7 +36,7 @@ services: - OPENSEARCH_HOSTS=["http://opensearch:9200"] - DISABLE_SECURITY_DASHBOARDS_PLUGIN=true ports: - - "5601:5601" + - '5601:5601' depends_on: opensearch: condition: service_healthy diff --git a/opensearch/jest.config.ts b/opensearch/jest.config.ts index bc094df8a..f1de9371c 100644 --- a/opensearch/jest.config.ts +++ b/opensearch/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/opensearch/package.json b/opensearch/package.json index c69a01abb..cd08beccc 100644 --- a/opensearch/package.json +++ b/opensearch/package.json @@ -10,7 +10,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/opensearch/rsbuild.config.ts b/opensearch/rsbuild.config.ts index 163b6af13..6059b1641 100644 --- a/opensearch/rsbuild.config.ts +++ b/opensearch/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/opensearch/src/datasources/opensearch-datasource/OpenSearchDatasource.tsx b/opensearch/src/datasources/opensearch-datasource/OpenSearchDatasource.tsx index f929640cc..48917c0fe 100644 --- a/opensearch/src/datasources/opensearch-datasource/OpenSearchDatasource.tsx +++ b/opensearch/src/datasources/opensearch-datasource/OpenSearchDatasource.tsx @@ -12,6 +12,7 @@ // limitations under the License. import { DatasourcePlugin } from '@perses-dev/plugin-system'; + import { OpenSearchClient, ppl } from '../../model/opensearch-client'; import { OpenSearchDatasourceSpec } from './opensearch-datasource-types'; import { OpenSearchDatasourceEditor } from './OpenSearchDatasourceEditor'; diff --git a/opensearch/src/datasources/opensearch-datasource/OpenSearchDatasourceEditor.tsx b/opensearch/src/datasources/opensearch-datasource/OpenSearchDatasourceEditor.tsx index 8d175c43c..5d97e3165 100644 --- a/opensearch/src/datasources/opensearch-datasource/OpenSearchDatasourceEditor.tsx +++ b/opensearch/src/datasources/opensearch-datasource/OpenSearchDatasourceEditor.tsx @@ -13,6 +13,7 @@ import { HTTPSettingsEditor } from '@perses-dev/plugin-system'; import { ReactElement } from 'react'; + import { OpenSearchDatasourceSpec } from './opensearch-datasource-types'; export interface OpenSearchDatasourceEditorProps { diff --git a/opensearch/src/getPluginModule.ts b/opensearch/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/opensearch/src/getPluginModule.ts +++ b/opensearch/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/opensearch/src/model/opensearch-selectors.ts b/opensearch/src/model/opensearch-selectors.ts index 82ad20907..b348f4162 100644 --- a/opensearch/src/model/opensearch-selectors.ts +++ b/opensearch/src/model/opensearch-selectors.ts @@ -11,8 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { DatasourceSelector } from '@perses-dev/spec'; import { DatasourceSelectValue, isVariableDatasource } from '@perses-dev/plugin-system'; +import { DatasourceSelector } from '@perses-dev/spec'; export const OPENSEARCH_DATASOURCE_KIND = 'OpenSearchDatasource' as const; diff --git a/opensearch/src/queries/opensearch-log-query/OpenSearchLogQuery.tsx b/opensearch/src/queries/opensearch-log-query/OpenSearchLogQuery.tsx index 65a4c871f..83da38d4f 100644 --- a/opensearch/src/queries/opensearch-log-query/OpenSearchLogQuery.tsx +++ b/opensearch/src/queries/opensearch-log-query/OpenSearchLogQuery.tsx @@ -12,9 +12,10 @@ // limitations under the License. import { parseVariables, LogQueryPlugin } from '@perses-dev/plugin-system'; + import { getOpenSearchLogData } from './get-opensearch-log-data'; -import { OpenSearchLogQueryEditor } from './OpenSearchLogQueryEditor'; import { OpenSearchLogQuerySpec } from './opensearch-log-query-types'; +import { OpenSearchLogQueryEditor } from './OpenSearchLogQueryEditor'; export const OpenSearchLogQuery: LogQueryPlugin = { getLogData: getOpenSearchLogData, diff --git a/opensearch/src/queries/opensearch-log-query/OpenSearchLogQueryEditor.test.tsx b/opensearch/src/queries/opensearch-log-query/OpenSearchLogQueryEditor.test.tsx index 298d9b379..ff14c11fc 100644 --- a/opensearch/src/queries/opensearch-log-query/OpenSearchLogQueryEditor.test.tsx +++ b/opensearch/src/queries/opensearch-log-query/OpenSearchLogQueryEditor.test.tsx @@ -12,9 +12,10 @@ // limitations under the License. import { render, screen, fireEvent } from '@testing-library/react'; + import { PPL_DOCS_URL } from '../constants'; -import { OpenSearchLogQueryEditor } from './OpenSearchLogQueryEditor'; import { OpenSearchLogQuerySpec } from './opensearch-log-query-types'; +import { OpenSearchLogQueryEditor } from './OpenSearchLogQueryEditor'; jest.mock('@perses-dev/plugin-system', () => ({ ...jest.requireActual('@perses-dev/plugin-system'), diff --git a/opensearch/src/queries/opensearch-log-query/OpenSearchLogQueryEditor.tsx b/opensearch/src/queries/opensearch-log-query/OpenSearchLogQueryEditor.tsx index dead100e3..63e14add1 100644 --- a/opensearch/src/queries/opensearch-log-query/OpenSearchLogQueryEditor.tsx +++ b/opensearch/src/queries/opensearch-log-query/OpenSearchLogQueryEditor.tsx @@ -11,6 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { Box, Checkbox, FormControlLabel, InputLabel, Link, Stack, TextField, Typography } from '@mui/material'; +import { createModEnterHandler } from '@perses-dev/dashboards'; import { DatasourceSelect, DatasourceSelectProps, @@ -18,10 +20,9 @@ import { OptionsEditorProps, useDatasourceSelectValueToSelector, } from '@perses-dev/plugin-system'; -import { Box, Checkbox, FormControlLabel, InputLabel, Link, Stack, TextField, Typography } from '@mui/material'; -import { ReactElement } from 'react'; import { produce } from 'immer'; -import { createModEnterHandler } from '@perses-dev/dashboards'; +import { ReactElement } from 'react'; + import { isDefaultOpenSearchSelector, OPENSEARCH_DATASOURCE_KIND, OpenSearchDatasourceSelector } from '../../model'; import { DATASOURCE_KIND, DEFAULT_DATASOURCE, PPL_DOCS_URL, PPL_QUERY_EXAMPLES } from '../constants'; import { useQueryState } from '../query-editor-model'; diff --git a/opensearch/src/queries/opensearch-log-query/get-opensearch-log-data.test.ts b/opensearch/src/queries/opensearch-log-query/get-opensearch-log-data.test.ts index 4d2c22d8f..008b8a317 100644 --- a/opensearch/src/queries/opensearch-log-query/get-opensearch-log-data.test.ts +++ b/opensearch/src/queries/opensearch-log-query/get-opensearch-log-data.test.ts @@ -12,11 +12,12 @@ // limitations under the License. import { LogQueryContext } from '@perses-dev/plugin-system'; + import { OpenSearchDatasource } from '../../datasources/opensearch-datasource'; import { OpenSearchDatasourceSpec } from '../../datasources/opensearch-datasource/opensearch-datasource-types'; import { OpenSearchPPLResponse } from '../../model/opensearch-client-types'; -import { OpenSearchLogQuery } from './OpenSearchLogQuery'; import { buildBoundedPPL, convertPPLToLogs, parseTimestamp } from './get-opensearch-log-data'; +import { OpenSearchLogQuery } from './OpenSearchLogQuery'; const datasource: OpenSearchDatasourceSpec = { directUrl: '/test', @@ -81,7 +82,7 @@ describe('OpenSearchLogQuery', () => { }, createStubContext() ); - expect(variables?.sort()).toEqual(['index', 'level', 'service']); + expect(variables?.toSorted()).toEqual(['index', 'level', 'service']); }); it('returns empty log data for an empty query without calling the client', async () => { diff --git a/opensearch/src/queries/opensearch-log-query/get-opensearch-log-data.ts b/opensearch/src/queries/opensearch-log-query/get-opensearch-log-data.ts index a6c8b419a..5e38aafbd 100644 --- a/opensearch/src/queries/opensearch-log-query/get-opensearch-log-data.ts +++ b/opensearch/src/queries/opensearch-log-query/get-opensearch-log-data.ts @@ -13,6 +13,7 @@ import { replaceVariables, LogQueryPlugin, LogQueryContext } from '@perses-dev/plugin-system'; import { LogEntry, LogData } from '@perses-dev/spec'; + import { OpenSearchClient } from '../../model/opensearch-client'; import { OpenSearchPPLResponse } from '../../model/opensearch-client-types'; import { DEFAULT_DATASOURCE, DEFAULT_MESSAGE_FIELDS, DEFAULT_TIMESTAMP_FIELDS } from '../constants'; @@ -155,7 +156,12 @@ export function parseTimestamp(v: unknown): number { // We emit seconds (LogEntry is second-resolution), so we only need the correct // magnitude, not sub-second precision: a float's rounding at the ns scale is far // below one second and is discarded anyway, so BigInt isn't required here. - const numeric = typeof v === 'number' ? v : /^\d+$/.test(String(v)) ? Number(v) : NaN; + let numeric = NaN; + if (typeof v === 'number') { + numeric = v; + } else if (/^\d+$/.test(String(v))) { + numeric = Number(v); + } if (!Number.isNaN(numeric)) { // Detect the unit by magnitude — a value past year ~5138 for a given unit must // really be a finer unit — and normalize to seconds. Without the µs/ns tiers diff --git a/opensearch/src/queries/opensearch-log-query/opensearch-log-query-types.ts b/opensearch/src/queries/opensearch-log-query/opensearch-log-query-types.ts index 8c1138667..f8608f048 100644 --- a/opensearch/src/queries/opensearch-log-query/opensearch-log-query-types.ts +++ b/opensearch/src/queries/opensearch-log-query/opensearch-log-query-types.ts @@ -12,6 +12,7 @@ // limitations under the License. import { DatasourceSelector } from '@perses-dev/spec'; + import { OpenSearchPPLResponse } from '../../model/opensearch-client-types'; export interface OpenSearchLogQuerySpec { diff --git a/opensearch/src/queries/query-editor-model.ts b/opensearch/src/queries/query-editor-model.ts index f0b5e99b4..7381d3479 100644 --- a/opensearch/src/queries/query-editor-model.ts +++ b/opensearch/src/queries/query-editor-model.ts @@ -11,9 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { useState } from 'react'; -import { produce } from 'immer'; import { OptionsEditorProps } from '@perses-dev/plugin-system'; +import { produce } from 'immer'; +import { useState } from 'react'; type OpenSearchQuerySpec = { query: string; diff --git a/package-lock.json b/package-lock.json index cb83530be..a526b79af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -61,20 +61,14 @@ "@types/express": "^5.0.0", "@types/jest": "^30.0.0", "@types/lodash": "^4.17.5", - "@typescript-eslint/eslint-plugin": "^8.18.0", "concurrently": "^10.0.3", "cross-env": "^7.0.3", - "eslint": "^8.57.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-import": "^2.29.1", - "eslint-plugin-jsx-a11y": "^6.8.0", - "eslint-plugin-prettier": "^5.1.3", - "eslint-plugin-react": "^7.34.1", - "eslint-plugin-react-hooks": "^4.6.2", "express": "^4.21.2", "jest": "^30.4.2", "jest-environment-jsdom": "^30.4.1", "mdi-material-ui": "^7.9.2", + "oxfmt": "0.55.0", + "oxlint": "1.70.0", "react": "^18.3.1", "react-dom": "^18.3.1", "react-router": "^6.30.3", @@ -1473,89 +1467,6 @@ "license": "MIT", "peer": true }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.9.1", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.2", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.15", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@eslint/eslintrc/node_modules/ignore": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.5", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@eslint/js": { - "version": "8.57.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, "node_modules/@fontsource/inter": { "version": "5.2.8", "license": "OFL-1.1", @@ -1585,56 +1496,6 @@ "react-hook-form": "^7.0.0" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.15", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.5", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "dev": true, @@ -3151,1426 +3012,229 @@ "version": "0.5.1", "license": "MIT" }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", + "node_modules/@oxfmt/binding-android-arm-eabi": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-android-arm-eabi/-/binding-android-arm-eabi-0.55.0.tgz", + "integrity": "sha512-+rFDOqQe5LOWgxrAJaZgLRudr6GQm0wGI6gtu7vVkrdLGjNMUSGbAlaCr8j7F2H2Er97vYQCU8WDb30onqMM1g==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">= 8" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", + "node_modules/@oxfmt/binding-android-arm64": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-android-arm64/-/binding-android-arm64-0.55.0.tgz", + "integrity": "sha512-ctulLq8s3x8Zmvw6+iccB09TIKERAklRSmbJ10gk8mlAn05qZxoyo52dj3Hi9IJcmDSwF54fQaTVh2CbL6PInw==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">= 8" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", + "node_modules/@oxfmt/binding-darwin-arm64": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-darwin-arm64/-/binding-darwin-arm64-0.55.0.tgz", + "integrity": "sha512-xDQczLH9pw/RBk1h/GH0qcGMm8hQtmtVHBNLSH3lk1gEIR09hZ4L+mJQl4VqiVAvPK9VG9PYrWWuSQLt7xTbiA==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">= 8" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@perses-dev/alert-manager-plugin": { - "resolved": "alertmanager", - "link": true - }, - "node_modules/@perses-dev/bar-chart-plugin": { - "resolved": "barchart", - "link": true + "node_modules/@oxfmt/binding-darwin-x64": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-darwin-x64/-/binding-darwin-x64-0.55.0.tgz", + "integrity": "sha512-JaNoFCkF2CJdGgpPSMbuO9HVyXyoNGIhMHPvp6NYAjeVKw9XEYc0HcUWJLPQa3Q69WV5wMa9m5jPMJPtbLtcRg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@perses-dev/clickhouse-plugin": { - "resolved": "clickhouse", - "link": true + "node_modules/@oxfmt/binding-freebsd-x64": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-freebsd-x64/-/binding-freebsd-x64-0.55.0.tgz", + "integrity": "sha512-DNbszhpg6S2MIzax5azdHFTTBIVkR5xr8yyRZuA4yoDAwOkzIp3tmldgKZM2+VlT+hJIG0xUksA+elISzMEAfA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@perses-dev/client": { - "version": "0.55.0-beta.1", - "license": "Apache-2.0", - "dependencies": { - "@perses-dev/spec": "0.3.0-beta.1", - "zod": "^3.21.4" - }, - "peerDependencies": { - "react": "^17.0.2 || ^18.0.0" + "node_modules/@oxfmt/binding-linux-arm-gnueabihf": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.55.0.tgz", + "integrity": "sha512-2snoaoRfFFyGnbOcKUK36rREBYxe/Xgz3uHbiA5zbCB/s6R4DQj4mHqYAaWWhgizCUSDxV8cE9zAZ0XleNpKGw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@perses-dev/components": { - "version": "0.55.0-beta.1", - "license": "Apache-2.0", - "dependencies": { - "@atlaskit/pragmatic-drag-and-drop": "^1.4.0", - "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.3", - "@codemirror/lang-json": "^6.0.1", - "@date-fns/tz": "^1.4.1", - "@fontsource/inter": "^5.0.0", - "@mui/x-date-pickers": "^7.23.1", - "@perses-dev/client": "0.55.0-beta.1", - "@perses-dev/spec": "0.3.0-beta.1", - "@tanstack/match-sorter-utils": "^8.19.4", - "@tanstack/react-table": "^8.20.5", - "@uiw/react-codemirror": "^4.19.1", - "date-fns": "^4.1.0", - "echarts": "5.5.0", - "immer": "^10.1.1", - "lodash": "^4.17.21", - "mathjs": "^10.6.4", - "mdi-material-ui": "^7.9.2", - "notistack": "^3.0.2", - "numbro": "^2.3.6", - "react-colorful": "^5.6.1", - "react-error-boundary": "^3.1.4", - "react-virtuoso": "^4.12.2" - }, - "peerDependencies": { - "@emotion/react": "^11.14.0", - "@emotion/styled": "^11.14.1", - "@mui/material": "^6.1.10", - "lodash": "^4.17.21", - "react": "^17.0.2 || ^18.0.0", - "react-dom": "^17.0.2 || ^18.0.0" + "node_modules/@oxfmt/binding-linux-arm-musleabihf": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.55.0.tgz", + "integrity": "sha512-q1aktHF/WRpSK81BX1dE/9vWrS2jGw1Nax2kb4DBLGAewubCLcoNyp4Zl/NSMgbv3vUS46Z33wIQkBVYOP3PYg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@perses-dev/core": { - "version": "0.53.0", - "license": "Apache-2.0", - "dependencies": { - "date-fns": "^4.1.0", - "lodash": "^4.17.21", - "mathjs": "^10.6.4", - "numbro": "^2.3.6", - "zod": "^3.21.4" + "node_modules/@oxfmt/binding-linux-arm64-gnu": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.55.0.tgz", + "integrity": "sha512-VD0y36aENezl/3tsclA/4G53Cc7iV+7Uoh7gz4yvcOTaEYBtJpQsE6PKDGTtUtOvGS4kv51ybfXY/nWZejO5IA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@perses-dev/dashboards": { - "version": "0.55.0-beta.1", - "license": "Apache-2.0", - "dependencies": { - "@perses-dev/client": "0.55.0-beta.1", - "@perses-dev/components": "0.55.0-beta.1", - "@perses-dev/plugin-system": "0.55.0-beta.1", - "@perses-dev/spec": "0.3.0-beta.1", - "@tanstack/hotkeys": "^0.8.0", - "@tanstack/react-hotkeys": "^0.9.1", - "immer": "^10.1.1", - "mdi-material-ui": "^7.9.2", - "react-grid-layout": "^1.3.4", - "react-hook-form": "^7.46.1", - "react-intersection-observer": "^9.4.0", - "use-immer": "^0.11.0", - "use-query-params": "^2.2.1", - "use-resize-observer": "^9.0.0", - "yaml": "^2.7.0", - "zustand": "^4.3.3" - }, - "peerDependencies": { - "@mui/material": "^6.1.10", - "@tanstack/react-query": "^4.39.1", - "react": "^17.0.2 || ^18.0.0", - "react-dom": "^17.0.2 || ^18.0.0" - } - }, - "node_modules/@perses-dev/datasource-variable-plugin": { - "resolved": "datasourcevariable", - "link": true - }, - "node_modules/@perses-dev/explore": { - "version": "0.55.0-beta.1", - "license": "Apache-2.0", - "dependencies": { - "@nexucis/fuzzy": "^0.5.1", - "@perses-dev/components": "0.55.0-beta.1", - "@perses-dev/dashboards": "0.55.0-beta.1", - "@perses-dev/plugin-system": "0.55.0-beta.1", - "mdi-material-ui": "^7.9.2", - "qs": "^6.14.0", - "react-virtuoso": "^4.12.2", - "use-query-params": "^2.2.1", - "use-resize-observer": "^9.0.0" - }, - "peerDependencies": { - "@mui/material": "^6.1.10", - "@tanstack/react-query": "^4.39.1", - "react": "^17.0.2 || ^18.0.0", - "react-dom": "^17.0.2 || ^18.0.0" - } - }, - "node_modules/@perses-dev/flame-chart-plugin": { - "resolved": "flamechart", - "link": true - }, - "node_modules/@perses-dev/gauge-chart-plugin": { - "resolved": "gaugechart", - "link": true - }, - "node_modules/@perses-dev/greptimedb-plugin": { - "resolved": "greptimedb", - "link": true - }, - "node_modules/@perses-dev/heatmap-chart-plugin": { - "resolved": "heatmapchart", - "link": true - }, - "node_modules/@perses-dev/histogram-chart-plugin": { - "resolved": "histogramchart", - "link": true - }, - "node_modules/@perses-dev/jaeger-plugin": { - "resolved": "jaeger", - "link": true - }, - "node_modules/@perses-dev/log-explorer-plugin": { - "resolved": "logexplorer", - "link": true - }, - "node_modules/@perses-dev/logs-table-plugin": { - "resolved": "logstable", - "link": true - }, - "node_modules/@perses-dev/loki-plugin": { - "resolved": "loki", - "link": true - }, - "node_modules/@perses-dev/markdown-plugin": { - "resolved": "markdown", - "link": true - }, - "node_modules/@perses-dev/opensearch-plugin": { - "resolved": "opensearch", - "link": true - }, - "node_modules/@perses-dev/pie-chart-plugin": { - "resolved": "piechart", - "link": true - }, - "node_modules/@perses-dev/plugin-system": { - "version": "0.55.0-beta.1", - "license": "Apache-2.0", - "dependencies": { - "@module-federation/enhanced": "^2.8.0", - "@perses-dev/client": "0.55.0-beta.1", - "@perses-dev/components": "0.55.0-beta.1", - "@perses-dev/core": "0.53.0", - "@perses-dev/spec": "0.3.0-beta.1", - "date-fns": "^4.1.0", - "date-fns-tz": "^3.2.0", - "immer": "^10.1.1", - "react-hook-form": "^7.46.1", - "semver": "^7.8.0", - "use-query-params": "^2.2.1", - "zod": "^3.25.76" - }, - "peerDependencies": { - "@emotion/react": "^11.14.0", - "@emotion/styled": "^11.14.1", - "@hookform/resolvers": "^3.2.0", - "@mui/material": "^6.1.10", - "@tanstack/react-query": "^4.39.1", - "react": "^17.0.2 || ^18.0.0", - "react-dom": "^17.0.2 || ^18.0.0" - } - }, - "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/bridge-react-webpack-plugin": { - "version": "2.8.2", - "license": "MIT", - "dependencies": { - "@module-federation/sdk": "2.8.2" - } - }, - "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/cli": { - "version": "2.8.2", - "license": "MIT", - "dependencies": { - "@module-federation/dts-plugin": "2.8.2", - "@module-federation/sdk": "2.8.2", - "commander": "11.1.0", - "jiti": "2.4.2" - }, - "bin": { - "mf": "bin/mf.js" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/dts-plugin": { - "version": "2.8.2", - "license": "MIT", - "dependencies": { - "@module-federation/error-codes": "2.8.2", - "@module-federation/managers": "2.8.2", - "@module-federation/sdk": "2.8.2", - "@module-federation/third-party-dts-extractor": "2.8.2", - "adm-zip": "0.6.0", - "isomorphic-ws": "5.0.0", - "undici": "7.29.0", - "ws": "8.21.0" - }, - "peerDependencies": { - "typescript": "^4.9.0 || ^5.0.0 || ^6.0.0 || ^7.0.0", - "vue-tsc": ">=1.0.24" - }, - "peerDependenciesMeta": { - "vue-tsc": { - "optional": true - } - } - }, - "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/enhanced": { - "version": "2.8.2", - "license": "MIT", - "dependencies": { - "@module-federation/bridge-react-webpack-plugin": "2.8.2", - "@module-federation/cli": "2.8.2", - "@module-federation/dts-plugin": "2.8.2", - "@module-federation/error-codes": "2.8.2", - "@module-federation/inject-external-runtime-core-plugin": "2.8.2", - "@module-federation/managers": "2.8.2", - "@module-federation/manifest": "2.8.2", - "@module-federation/rspack": "2.8.2", - "@module-federation/runtime-tools": "2.8.2", - "@module-federation/sdk": "2.8.2", - "@module-federation/webpack-bundler-runtime": "2.8.2", - "schema-utils": "4.3.0", - "tapable": "2.3.0" - }, - "bin": { - "mf": "bin/mf.js" - }, - "peerDependencies": { - "typescript": "^4.9.0 || ^5.0.0 || ^6.0.0 || ^7.0.0", - "vue-tsc": ">=1.0.24", - "webpack": "^5.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - }, - "vue-tsc": { - "optional": true - }, - "webpack": { - "optional": true - } - } - }, - "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/error-codes": { - "version": "2.8.2", - "license": "MIT" - }, - "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/inject-external-runtime-core-plugin": { - "version": "2.8.2", - "license": "MIT", - "peerDependencies": { - "@module-federation/runtime-tools": "2.8.2" - } - }, - "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/managers": { - "version": "2.8.2", - "license": "MIT", - "dependencies": { - "@module-federation/sdk": "2.8.2" - } - }, - "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/manifest": { - "version": "2.8.2", - "license": "MIT", - "dependencies": { - "@module-federation/dts-plugin": "2.8.2", - "@module-federation/managers": "2.8.2", - "@module-federation/sdk": "2.8.2" - } - }, - "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/rspack": { - "version": "2.8.2", - "license": "MIT", - "dependencies": { - "@module-federation/bridge-react-webpack-plugin": "2.8.2", - "@module-federation/dts-plugin": "2.8.2", - "@module-federation/inject-external-runtime-core-plugin": "2.8.2", - "@module-federation/managers": "2.8.2", - "@module-federation/manifest": "2.8.2", - "@module-federation/runtime-tools": "2.8.2", - "@module-federation/sdk": "2.8.2" - }, - "peerDependencies": { - "@rspack/core": "^0.7.0 || ^1.0.0 || ^2.0.0-0", - "typescript": "^4.9.0 || ^5.0.0 || ^6.0.0 || ^7.0.0", - "vue-tsc": ">=1.0.24" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - }, - "vue-tsc": { - "optional": true - } - } - }, - "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/runtime": { - "version": "2.8.2", - "license": "MIT", - "dependencies": { - "@module-federation/error-codes": "2.8.2", - "@module-federation/runtime-core": "2.8.2", - "@module-federation/sdk": "2.8.2" - } - }, - "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/runtime-core": { - "version": "2.8.2", - "license": "MIT", - "dependencies": { - "@module-federation/error-codes": "2.8.2", - "@module-federation/sdk": "2.8.2" - } - }, - "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/runtime-tools": { - "version": "2.8.2", - "license": "MIT", - "dependencies": { - "@module-federation/runtime": "2.8.2", - "@module-federation/webpack-bundler-runtime": "2.8.2" - } - }, - "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/sdk": { - "version": "2.8.2", - "license": "MIT" - }, - "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/third-party-dts-extractor": { - "version": "2.8.2", - "license": "MIT" - }, - "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/webpack-bundler-runtime": { - "version": "2.8.2", - "license": "MIT", - "dependencies": { - "@module-federation/error-codes": "2.8.2", - "@module-federation/runtime": "2.8.2", - "@module-federation/sdk": "2.8.2" - } - }, - "node_modules/@perses-dev/plugin-system/node_modules/adm-zip": { - "version": "0.6.0", - "license": "MIT", - "engines": { - "node": ">=14.0" - } - }, - "node_modules/@perses-dev/plugin-system/node_modules/semver": { - "version": "7.8.5", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@perses-dev/plugin-system/node_modules/undici": { - "version": "7.29.0", - "license": "MIT", - "engines": { - "node": ">=20.18.1" - } - }, - "node_modules/@perses-dev/plugins-e2e": { - "resolved": "e2e", - "link": true - }, - "node_modules/@perses-dev/prometheus-plugin": { - "resolved": "prometheus", - "link": true - }, - "node_modules/@perses-dev/pyroscope-plugin": { - "resolved": "pyroscope", - "link": true - }, - "node_modules/@perses-dev/scatter-chart-plugin": { - "resolved": "scatterchart", - "link": true - }, - "node_modules/@perses-dev/spec": { - "version": "0.3.0-beta.1", - "license": "Apache-2.0", - "dependencies": { - "date-fns": "^4.1.0", - "mathjs": "^15.1.1", - "zod": "^3.21.4" - } - }, - "node_modules/@perses-dev/spec/node_modules/fraction.js": { - "version": "5.3.4", - "license": "MIT", - "engines": { - "node": "*" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/rawify" - } - }, - "node_modules/@perses-dev/spec/node_modules/mathjs": { - "version": "15.2.0", - "license": "Apache-2.0", - "dependencies": { - "@babel/runtime": "^7.26.10", - "complex.js": "^2.2.5", - "decimal.js": "^10.4.3", - "escape-latex": "^1.2.0", - "fraction.js": "^5.2.1", - "javascript-natural-sort": "^0.7.1", - "seedrandom": "^3.0.5", - "tiny-emitter": "^2.1.0", - "typed-function": "^4.2.1" - }, - "bin": { - "mathjs": "bin/cli.js" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@perses-dev/spec/node_modules/typed-function": { - "version": "4.2.2", - "license": "MIT", - "engines": { - "node": ">= 18" - } - }, - "node_modules/@perses-dev/splunk-plugin": { - "resolved": "splunk", - "link": true - }, - "node_modules/@perses-dev/stat-chart-plugin": { - "resolved": "statchart", - "link": true - }, - "node_modules/@perses-dev/static-list-variable-plugin": { - "resolved": "staticlistvariable", - "link": true - }, - "node_modules/@perses-dev/status-history-chart-plugin": { - "resolved": "statushistorychart", - "link": true - }, - "node_modules/@perses-dev/table-plugin": { - "resolved": "table", - "link": true - }, - "node_modules/@perses-dev/tempo-plugin": { - "resolved": "tempo", - "link": true - }, - "node_modules/@perses-dev/timeseries-chart-plugin": { - "resolved": "timeserieschart", - "link": true - }, - "node_modules/@perses-dev/timeseries-table-plugin": { - "resolved": "timeseriestable", - "link": true - }, - "node_modules/@perses-dev/trace-table-plugin": { - "resolved": "tracetable", - "link": true - }, - "node_modules/@perses-dev/tracing-gantt-chart-plugin": { - "resolved": "tracingganttchart", - "link": true - }, - "node_modules/@perses-dev/victorialogs-plugin": { - "resolved": "victorialogs", - "link": true - }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@pkgr/core": { - "version": "0.3.6", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/pkgr" - } - }, - "node_modules/@playwright/test": { - "version": "1.61.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "playwright": "1.61.1" - }, - "bin": { - "playwright": "cli.js" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@popperjs/core": { - "version": "2.11.8", - "license": "MIT", - "peer": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/popperjs" - } - }, - "node_modules/@prometheus-io/codemirror-promql": { - "version": "0.313.1", - "license": "Apache-2.0", - "dependencies": { - "@prometheus-io/lezer-promql": "0.313.1", - "lru-cache": "^11.5.1" - }, - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "@codemirror/autocomplete": "^6.4.0", - "@codemirror/language": "^6.3.0", - "@codemirror/lint": "^6.0.0", - "@codemirror/state": "^6.1.1", - "@codemirror/view": "^6.4.0", - "@lezer/common": "^1.0.1" - } - }, - "node_modules/@prometheus-io/codemirror-promql/node_modules/lru-cache": { - "version": "11.5.2", - "license": "BlueOak-1.0.0", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@prometheus-io/lezer-promql": { - "version": "0.313.1", - "license": "Apache-2.0", - "peerDependencies": { - "@lezer/highlight": "^1.1.2", - "@lezer/lr": "^1.2.3" - } - }, - "node_modules/@remix-run/router": { - "version": "1.23.3", - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@rsbuild/core": { - "version": "1.7.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@rspack/core": "~1.7.10", - "@rspack/lite-tapable": "~1.1.0", - "@swc/helpers": "^0.5.20", - "core-js": "~3.47.0", - "jiti": "^2.6.1" - }, - "bin": { - "rsbuild": "bin/rsbuild.js" - }, - "engines": { - "node": ">=18.12.0" - } - }, - "node_modules/@rsbuild/core/node_modules/@module-federation/error-codes": { - "version": "0.22.0", - "dev": true, - "license": "MIT" - }, - "node_modules/@rsbuild/core/node_modules/@module-federation/runtime": { - "version": "0.22.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@module-federation/error-codes": "0.22.0", - "@module-federation/runtime-core": "0.22.0", - "@module-federation/sdk": "0.22.0" - } - }, - "node_modules/@rsbuild/core/node_modules/@module-federation/runtime-core": { - "version": "0.22.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@module-federation/error-codes": "0.22.0", - "@module-federation/sdk": "0.22.0" - } - }, - "node_modules/@rsbuild/core/node_modules/@module-federation/runtime-tools": { - "version": "0.22.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@module-federation/runtime": "0.22.0", - "@module-federation/webpack-bundler-runtime": "0.22.0" - } - }, - "node_modules/@rsbuild/core/node_modules/@module-federation/sdk": { - "version": "0.22.0", - "dev": true, - "license": "MIT" - }, - "node_modules/@rsbuild/core/node_modules/@module-federation/webpack-bundler-runtime": { - "version": "0.22.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@module-federation/runtime": "0.22.0", - "@module-federation/sdk": "0.22.0" - } - }, - "node_modules/@rsbuild/core/node_modules/@napi-rs/wasm-runtime": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.0.7.tgz", - "integrity": "sha512-SeDnOO0Tk7Okiq6DbXmmBODgOAb9dp9gjlphokTUxmt8U3liIP1ZsozBahH69j/RJv+Rfs6IwUKHTgQYJ/HBAw==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/core": "^1.5.0", - "@emnapi/runtime": "^1.5.0", - "@tybys/wasm-util": "^0.10.1" - } - }, - "node_modules/@rsbuild/core/node_modules/@rspack/binding": { - "version": "1.7.12", - "dev": true, - "license": "MIT", - "optionalDependencies": { - "@rspack/binding-darwin-arm64": "1.7.12", - "@rspack/binding-darwin-x64": "1.7.12", - "@rspack/binding-linux-arm64-gnu": "1.7.12", - "@rspack/binding-linux-arm64-musl": "1.7.12", - "@rspack/binding-linux-x64-gnu": "1.7.12", - "@rspack/binding-linux-x64-musl": "1.7.12", - "@rspack/binding-wasm32-wasi": "1.7.12", - "@rspack/binding-win32-arm64-msvc": "1.7.12", - "@rspack/binding-win32-ia32-msvc": "1.7.12", - "@rspack/binding-win32-x64-msvc": "1.7.12" - } - }, - "node_modules/@rsbuild/core/node_modules/@rspack/binding-darwin-arm64": { - "version": "1.7.12", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rsbuild/core/node_modules/@rspack/binding-darwin-x64": { - "version": "1.7.12", - "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.7.12.tgz", - "integrity": "sha512-jnOp+/UXOJa9xqUb8KXH03sysoO2e4Ij6tw6MqDdmdj8n/A8PQENRPUbW9AwXpPtVDJPus9r4fi7b3+6e4B8Hg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rsbuild/core/node_modules/@rspack/binding-linux-arm64-gnu": { - "version": "1.7.12", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.7.12.tgz", - "integrity": "sha512-C8owWG+yvo7X0oVLIXetkoJhIFBP1LYNcAQqtgLmJnQLQDklGuP83dKC+zISGQWpjawHfZ1ER96vLgoTrxKZdw==", - "cpu": [ - "arm64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rsbuild/core/node_modules/@rspack/binding-linux-arm64-musl": { - "version": "1.7.12", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.7.12.tgz", - "integrity": "sha512-i51WWI64aRpsfSki6rN0aepPqXkVfS+vZM7+4bWDcmnhUmdMvhIPcYg0QRk3DtyJnu33jqNLM0WHY78k00NyfA==", - "cpu": [ - "arm64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rsbuild/core/node_modules/@rspack/binding-linux-x64-gnu": { - "version": "1.7.12", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.7.12.tgz", - "integrity": "sha512-MSos0FuPEefqo9V92ULd5hggKG29EkSNg1zDcypy0OkpsKh5pfjVxTLYFXgTcVyFoUQQbdG8zFBzYbwmJ8V4ew==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rsbuild/core/node_modules/@rspack/binding-linux-x64-musl": { - "version": "1.7.12", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.7.12.tgz", - "integrity": "sha512-JcAMVKXOnjfpC3coWjCFPWD3Yl8RBw6a+IXQQ8mfRlHaHMIiOv8IfZqx15XRxMUn49CtP7Z0Na8iiAg2aKrcfw==", - "cpu": [ - "x64" - ], - "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rsbuild/core/node_modules/@rspack/binding-wasm32-wasi": { - "version": "1.7.12", - "resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-1.7.12.tgz", - "integrity": "sha512-n+ZqP6ZMc0nhOgvadg5VhEs9ojtbES80AcWeFnmGkbzIszvGSO63GKNiRkXtjJ9KFuRzytbbmsCqkUVH+Tywxg==", - "cpu": [ - "wasm32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@napi-rs/wasm-runtime": "1.0.7" - } - }, - "node_modules/@rsbuild/core/node_modules/@rspack/binding-win32-arm64-msvc": { - "version": "1.7.12", - "resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.7.12.tgz", - "integrity": "sha512-8+h5fYDXYdmugbdfZ+D1y8IQ3rv2EhSfyGP7vBe+bjNyaMa4jWrpucmZbtxojUL1AzaeuHbvMdj9UO/gelk/+g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rsbuild/core/node_modules/@rspack/binding-win32-ia32-msvc": { - "version": "1.7.12", - "resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.7.12.tgz", - "integrity": "sha512-cDMGwTRSa2p9fNBVe1wTRkF2AEXZ9ARWW36QeC5CkLaI0Ezz8lvhF2+CSOPnhaQ1O1qtn0L0SF+lFnrY+I7xGQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rsbuild/core/node_modules/@rspack/binding-win32-x64-msvc": { - "version": "1.7.12", - "resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.7.12.tgz", - "integrity": "sha512-wIqFvlgFqrgUyj/6S/FJcvShnkZOmIeXTfqvheLY67MGq8qd8jb1YimQVKAIrmWB3yuJKUFACI3Ag1UBtEedEA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rsbuild/core/node_modules/@rspack/core": { - "version": "1.7.12", - "dev": true, - "license": "MIT", - "dependencies": { - "@module-federation/runtime-tools": "0.22.0", - "@rspack/binding": "1.7.12", - "@rspack/lite-tapable": "1.1.0" - }, - "engines": { - "node": ">=18.12.0" - }, - "peerDependencies": { - "@swc/helpers": ">=0.5.1" - }, - "peerDependenciesMeta": { - "@swc/helpers": { - "optional": true - } - } - }, - "node_modules/@rsbuild/core/node_modules/@rspack/lite-tapable": { - "version": "1.1.0", - "dev": true, - "license": "MIT" - }, - "node_modules/@rsbuild/core/node_modules/jiti": { - "version": "2.7.0", - "dev": true, - "license": "MIT", - "bin": { - "jiti": "lib/jiti-cli.mjs" - } - }, - "node_modules/@rsbuild/plugin-react": { - "version": "1.4.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@rspack/plugin-react-refresh": "^1.6.1", - "react-refresh": "^0.18.0" - }, - "peerDependencies": { - "@rsbuild/core": "^1.0.0 || ^2.0.0-0" - }, - "peerDependenciesMeta": { - "@rsbuild/core": { - "optional": true - } - } - }, - "node_modules/@rspack/binding": { - "version": "2.1.2", - "license": "MIT", - "peer": true, - "optionalDependencies": { - "@rspack/binding-darwin-arm64": "2.1.2", - "@rspack/binding-darwin-x64": "2.1.2", - "@rspack/binding-linux-arm64-gnu": "2.1.2", - "@rspack/binding-linux-arm64-musl": "2.1.2", - "@rspack/binding-linux-riscv64-gnu": "2.1.2", - "@rspack/binding-linux-riscv64-musl": "2.1.2", - "@rspack/binding-linux-x64-gnu": "2.1.2", - "@rspack/binding-linux-x64-musl": "2.1.2", - "@rspack/binding-wasm32-wasi": "2.1.2", - "@rspack/binding-win32-arm64-msvc": "2.1.2", - "@rspack/binding-win32-ia32-msvc": "2.1.2", - "@rspack/binding-win32-x64-msvc": "2.1.2" - } - }, - "node_modules/@rspack/binding-darwin-arm64": { - "version": "2.1.2", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "peer": true - }, - "node_modules/@rspack/binding-darwin-x64": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-2.1.2.tgz", - "integrity": "sha512-aoifkILvx/XEHyvg8yW57xu95nx7f9f/3ah1+RguHSNKcJMcoCep9VX1Ct1N0ftqg8MC0JUObc7xWL5W14hmjA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "peer": true - }, - "node_modules/@rspack/binding-linux-arm64-gnu": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-2.1.2.tgz", - "integrity": "sha512-My4m40tyJSgiCEf3bB2KIEX710q3nZg99LIjy+8Zxgi3oZTkg1bFmFRusFU5U4eN5408zfSqDDGvjDE3Yv7o4w==", - "cpu": [ - "arm64" - ], - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true - }, - "node_modules/@rspack/binding-linux-arm64-musl": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-2.1.2.tgz", - "integrity": "sha512-yt+GGWUH7WPE8K97cRc8OpZhH7Pbj1vU+lkvKbDtF/rR8X9a/bJsA/nBqyUV2oBKOVbrp5I8rFZlnDskMqgvKw==", - "cpu": [ - "arm64" - ], - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true - }, - "node_modules/@rspack/binding-linux-riscv64-gnu": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-2.1.2.tgz", - "integrity": "sha512-uys8Jyw8Z3ralvICbN/L/nZfy5qELIwpOY72rhIqhoDYwFcL4fmMaY7WsvUcJOjCB2rqOcWPaWKuF2oPvo9iDQ==", - "cpu": [ - "riscv64" - ], - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true - }, - "node_modules/@rspack/binding-linux-riscv64-musl": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-2.1.2.tgz", - "integrity": "sha512-JYNVQwqCaRGQWvjHQYzZkIzQiwllMaJwh4Rdu3ww6W2OJcJUqT08sL1pkOtU0iCxT4VUYiRRcp93VGTGpHr8fg==", - "cpu": [ - "riscv64" - ], - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true - }, - "node_modules/@rspack/binding-linux-x64-gnu": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-2.1.2.tgz", - "integrity": "sha512-KDoPy0Msf/JLhxgPPrJQzZeB4Qpqd32em8AP5lSW2s6jR5I35dHgAe9xc2A++EQtnSrU4GTn6DBvFC7q84SihQ==", - "cpu": [ - "x64" - ], - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true - }, - "node_modules/@rspack/binding-linux-x64-musl": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-2.1.2.tgz", - "integrity": "sha512-66hWmIGvn4zCKAYXJE9Bp5SNSLYnLFq2Ke/efE+ZtWy43Dd5vk9AAOmThVGBwdwmIxmGtHGCp+cAuS4G0wu0TA==", - "cpu": [ - "x64" - ], - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true - }, - "node_modules/@rspack/binding-wasm32-wasi": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-2.1.2.tgz", - "integrity": "sha512-EB4SqH8DW/E/OmqssNQvnIVGQiVUyYNlA/pcc6Ia4MlTNwu6eNDppcNLrToH+kSZpL4CpHSFfSM3eIsSuar2Rw==", - "cpu": [ - "wasm32" - ], - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@emnapi/core": "1.11.1", - "@emnapi/runtime": "1.11.1", - "@napi-rs/wasm-runtime": "1.1.6" - } - }, - "node_modules/@rspack/binding-win32-arm64-msvc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-2.1.2.tgz", - "integrity": "sha512-T6Fs/g32MRja/UpCq4AdyPRj8tA0cOkcEa4PrAcn/ztUgK8b/qMVxj5mhMI+n7k+kHZQnpeB1Q4HqdSJi6OocA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "peer": true - }, - "node_modules/@rspack/binding-win32-ia32-msvc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-2.1.2.tgz", - "integrity": "sha512-OtxkFVz14mVL4QK8QriSELn9B6PaYGHw1jGJwVDEzpu2ZxSHCTQPz9dVE1ekYtREEqZUkRU7Fp7VfhJSmjTt2Q==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "peer": true - }, - "node_modules/@rspack/binding-win32-x64-msvc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-2.1.2.tgz", - "integrity": "sha512-Am+nx9fLF3nzgD/K05Bs1Bb+WO8SFLWAYRbXkymaL1r+RQxjRj7jd5ap2PhGOCcfaNA4yVWkAFvmFP92eRu7bQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "peer": true - }, - "node_modules/@rspack/core": { - "version": "2.1.2", - "license": "MIT", - "peer": true, - "dependencies": { - "@rspack/binding": "2.1.2" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "peerDependencies": { - "@module-federation/runtime-tools": "^0.24.1 || ^2.0.0", - "@swc/helpers": "^0.5.23" - }, - "peerDependenciesMeta": { - "@module-federation/runtime-tools": { - "optional": true - }, - "@swc/helpers": { - "optional": true - } - } - }, - "node_modules/@rspack/plugin-react-refresh": { - "version": "1.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "error-stack-parser": "^2.1.4" - }, - "peerDependencies": { - "react-refresh": ">=0.10.0 <1.0.0", - "webpack-hot-middleware": "2.x" - }, - "peerDependenciesMeta": { - "webpack-hot-middleware": { - "optional": true - } - } - }, - "node_modules/@rtsao/scc": { - "version": "1.1.0", - "dev": true, - "license": "MIT" - }, - "node_modules/@sec-ant/readable-stream": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "node_modules/@sinclair/typebox": { - "version": "0.34.49", - "dev": true, - "license": "MIT" - }, - "node_modules/@sindresorhus/is": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sindresorhus/is?sponsor=1" - } - }, - "node_modules/@sindresorhus/merge-streams": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "15.4.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.1" - } - }, - "node_modules/@swc/cli": { - "version": "0.8.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@swc/counter": "^0.1.3", - "@xhmikosr/bin-wrapper": "^14.0.0", - "commander": "^8.3.0", - "minimatch": "^9.0.3", - "piscina": "^4.3.1", - "semver": "^7.3.8", - "slash": "3.0.0", - "source-map": "^0.7.3", - "tinyglobby": "^0.2.13" - }, - "bin": { - "spack": "bin/spack.js", - "swc": "bin/swc.js", - "swcx": "bin/swcx.js" - }, - "engines": { - "node": ">= 20.19.0" - }, - "peerDependencies": { - "@swc/core": "^1.2.66", - "chokidar": "^5.0.0" - }, - "peerDependenciesMeta": { - "chokidar": { - "optional": true - } - } - }, - "node_modules/@swc/cli/node_modules/commander": { - "version": "8.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 12" - } - }, - "node_modules/@swc/cli/node_modules/source-map": { - "version": "0.7.6", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">= 12" - } - }, - "node_modules/@swc/core": { - "version": "1.15.43", - "dev": true, - "hasInstallScript": true, - "license": "Apache-2.0", - "dependencies": { - "@swc/counter": "^0.1.3", - "@swc/types": "^0.1.27" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/swc" - }, - "optionalDependencies": { - "@swc/core-darwin-arm64": "1.15.43", - "@swc/core-darwin-x64": "1.15.43", - "@swc/core-linux-arm-gnueabihf": "1.15.43", - "@swc/core-linux-arm64-gnu": "1.15.43", - "@swc/core-linux-arm64-musl": "1.15.43", - "@swc/core-linux-ppc64-gnu": "1.15.43", - "@swc/core-linux-s390x-gnu": "1.15.43", - "@swc/core-linux-x64-gnu": "1.15.43", - "@swc/core-linux-x64-musl": "1.15.43", - "@swc/core-win32-arm64-msvc": "1.15.43", - "@swc/core-win32-ia32-msvc": "1.15.43", - "@swc/core-win32-x64-msvc": "1.15.43" - }, - "peerDependencies": { - "@swc/helpers": ">=0.5.17" - }, - "peerDependenciesMeta": { - "@swc/helpers": { - "optional": true - } - } - }, - "node_modules/@swc/core-darwin-arm64": { - "version": "1.15.43", + "node_modules/@oxfmt/binding-linux-arm64-musl": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.55.0.tgz", + "integrity": "sha512-r8xlKJFcsRmn0H5jZrdORae6RX9jDBrZVvOoxF+bCQtampQJClv80aZEHsv+NsLsp2KCE5ql79O7DpPVzYWpXA==", "cpu": [ "arm64" ], "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-darwin-x64": { - "version": "1.15.43", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.15.43.tgz", - "integrity": "sha512-lp3d4Lamc8dt5huYdGLSR+9hLxmfr1jb0l+4XXG2zPqZwYWRN9R0U2qYoTrggiU2RWW0oV9VbWM3kBnqIc2kdQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.15.43", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.15.43.tgz", - "integrity": "sha512-JWTQQELtsG5GgphDrr/XqqmM2pDN3cZqbMS0Mrg+iTiXL3F74sn/S2IyYE/5u4h2KLkTf9qQ7dXyxsbx7YzkeA==", - "cpu": [ - "arm" + "libc": [ + "musl" ], - "dev": true, - "license": "Apache-2.0", + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=10" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.15.43", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.15.43.tgz", - "integrity": "sha512-B4otJRdPWIsmiSBf0uG7Z/+vMWmkufjz5MmYxubwKuZazDW14Zd3symga1N62QR4RT+kEFeHEgsXfZGyn/w0hw==", + "node_modules/@oxfmt/binding-linux-ppc64-gnu": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-0.55.0.tgz", + "integrity": "sha512-GRKv/HXHcwIVld/WU61rF0g0R16hl5EJ+ScKdpjevT57lnLnagj/U2YUbXf2mT+2Pg1uCzWC+mvGicPV3CDdLQ==", "cpu": [ - "arm64" + "ppc64" ], "dev": true, "libc": [ "glibc" ], - "license": "Apache-2.0 AND MIT", + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=10" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.15.43", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.15.43.tgz", - "integrity": "sha512-6zB6OnpViBxYy4tgY3v2i6AZY9fwkcHZ032UOwtwUuW1d19sdT07qF0kZe6/3UR1tUaK6jjg2rmVcUIBCEYVjQ==", + "node_modules/@oxfmt/binding-linux-riscv64-gnu": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.55.0.tgz", + "integrity": "sha512-rdv57enTiPtpSYRMKfAiEbQb0Puw5t9N7isVinDoo5qeLDScro2gznmZqSgSWbVZRzLisTeCTW8Qwgw0bOHv3A==", "cpu": [ - "arm64" + "riscv64" ], "dev": true, "libc": [ - "musl" + "glibc" ], - "license": "Apache-2.0 AND MIT", + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-ppc64-gnu": { - "version": "1.15.43", - "resolved": "https://registry.npmjs.org/@swc/core-linux-ppc64-gnu/-/core-linux-ppc64-gnu-1.15.43.tgz", - "integrity": "sha512-coxE1ZWdB3uSDVNoEtYNrRi/1epvckZx9cTJ8ICUxTMTxGk+yvQ/Twacp3ruZSaMPGCriUjP86C37VhaT6nyRg==", + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-linux-riscv64-musl": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-0.55.0.tgz", + "integrity": "sha512-7v1nNrlD43VY6+sYQ6efYyb3lE6QY182304PD/768ZxTjOmFd/3dQa3u/nGBUAXYdGSWOQc5N3PnS0QzUXyEIA==", "cpu": [ - "ppc64" + "riscv64" ], "dev": true, "libc": [ - "glibc" + "musl" ], - "license": "Apache-2.0 AND MIT", + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=10" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@swc/core-linux-s390x-gnu": { - "version": "1.15.43", - "resolved": "https://registry.npmjs.org/@swc/core-linux-s390x-gnu/-/core-linux-s390x-gnu-1.15.43.tgz", - "integrity": "sha512-lXfLhs+LpBsD5inuYx+YDH5WsPPBQ95KPUiy8P5wq9ob9xKDZFqwNfU2QW6bGO8NqRO/H9JQomTSt5Yyh+FGfA==", + "node_modules/@oxfmt/binding-linux-s390x-gnu": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.55.0.tgz", + "integrity": "sha512-f4lJLUSPOgScjFl9LiflKCTocyNRwE25JmTMbN4XQdDjoZzEHjqf3wA3VESF1/csg7i8m7+EQLbrZyYDqe10UQ==", "cpu": [ "s390x" ], @@ -4578,19 +3242,19 @@ "libc": [ "glibc" ], - "license": "Apache-2.0 AND MIT", + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=10" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.15.43", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.15.43.tgz", - "integrity": "sha512-07XnKwTmKy8TGOZG3D9fRnLWGynxPjwQnZLVmBFbo6F+7vHYzBIOuwXEhemrChBWb6yDNZsVCcMWCPX6FDD2xg==", + "node_modules/@oxfmt/binding-linux-x64-gnu": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.55.0.tgz", + "integrity": "sha512-MihqiPziJNoWy4MqNSV+jVA1g+07iQDjZiR0vaCaDoPgFEiJpCMsxamktzLV07cEeQsSJ04vQaU4CzCQwIvtDA==", "cpu": [ "x64" ], @@ -4598,19 +3262,19 @@ "libc": [ "glibc" ], - "license": "Apache-2.0 AND MIT", + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=10" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@swc/core-linux-x64-musl": { - "version": "1.15.43", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.15.43.tgz", - "integrity": "sha512-TJc+bsSIaBh+hZvZ5GRtW/K1bw66TJ9vsUwvVIsZdiWxU5ObLwZvfcnZ3UpgVfMnFibRes9uriJrQNBHEEogRQ==", + "node_modules/@oxfmt/binding-linux-x64-musl": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-x64-musl/-/binding-linux-x64-musl-0.55.0.tgz", + "integrity": "sha512-Yqghym7KYAVjP9MmSrNZiDeerMuoejNjo0r3ox5H3GDKk8eAfl8VyJm9i+pWCLDCTnAbcTUMMN2ZKjUYXH1v3g==", "cpu": [ "x64" ], @@ -4618,435 +3282,366 @@ "libc": [ "musl" ], - "license": "Apache-2.0 AND MIT", + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=10" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.15.43", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.15.43.tgz", - "integrity": "sha512-jfd7s2/bUQYkOHLs+LWQNKZdmDa8+sufKLllhpWAhVQ2GDCwsHe3vR/j+OSiItZNtkzFuaawa3+SAKz9y5gYfw==", + "node_modules/@oxfmt/binding-openharmony-arm64": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-openharmony-arm64/-/binding-openharmony-arm64-0.55.0.tgz", + "integrity": "sha512-s5SDvVVSbyQl1V5UU3Yl12M+XLUQ3rl5SglNqgAA2K4PXUtQhyNSS00wivONPEnNo5W01rCou8WkDNyvI/RGHg==", "cpu": [ "arm64" ], "dev": true, - "license": "Apache-2.0 AND MIT", + "license": "MIT", "optional": true, "os": [ - "win32" + "openharmony" ], "engines": { - "node": ">=10" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.15.43", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.15.43.tgz", - "integrity": "sha512-rLAE8JvucqEW1ZGohxPQrQWPBQeJG4+ypKbWfdlU/qmKScvCkxf9/Jxnzki1dkUQCQ7P5Enp13RlvqOlvx/32g==", + "node_modules/@oxfmt/binding-win32-arm64-msvc": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.55.0.tgz", + "integrity": "sha512-7p9FB5R32tw2KyyNX3wpQrR2WHwEHvMEiBlGXxeTCaRMCVNx3UtFMAUbaQ/pRNWIrEUZmYhJ6tcUH52uPTRYjQ==", "cpu": [ - "ia32" + "arm64" ], "dev": true, - "license": "Apache-2.0 AND MIT", + "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=10" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.15.43", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.15.43.tgz", - "integrity": "sha512-h8MLDHZcfIukwQWj03rIJZx1I0E81AYj2X7J/nGErG4nz+QAv6G1Z+peotvinL3lqpbo32tLYSMFo32/ySzxKg==", + "node_modules/@oxfmt/binding-win32-ia32-msvc": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-0.55.0.tgz", + "integrity": "sha512-ZYqj3fDnOT1IaVGMP5kpmkQl4F3tQIm2ZyAxvqkJYmI0xgWWak4ss4XYwv3VDfM+TWXeC9K4uQ/wW5jm/5XABA==", "cpu": [ - "x64" + "ia32" ], "dev": true, - "license": "Apache-2.0 AND MIT", + "license": "MIT", "optional": true, "os": [ "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/counter": { - "version": "0.1.3", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/@swc/helpers": { - "version": "0.5.23", - "devOptional": true, - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.8.0" - } - }, - "node_modules/@swc/jest": { - "version": "0.2.39", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/create-cache-key-function": "^30.0.0", - "@swc/counter": "^0.1.3", - "jsonc-parser": "^3.2.0" - }, - "engines": { - "npm": ">= 7.0.0" - }, - "peerDependencies": { - "@swc/core": "*" - } - }, - "node_modules/@swc/types": { - "version": "0.1.27", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@swc/counter": "^0.1.3" - } - }, - "node_modules/@tanstack/hotkeys": { - "version": "0.8.0", - "license": "MIT", - "dependencies": { - "@tanstack/store": "^0.11.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - } - }, - "node_modules/@tanstack/match-sorter-utils": { - "version": "8.19.4", - "license": "MIT", - "dependencies": { - "remove-accents": "0.5.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - } - }, - "node_modules/@tanstack/query-core": { - "version": "4.44.0", - "license": "MIT", - "peer": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - } - }, - "node_modules/@tanstack/react-hotkeys": { - "version": "0.9.1", - "license": "MIT", - "dependencies": { - "@tanstack/hotkeys": "0.7.1", - "@tanstack/react-store": "^0.9.3" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - }, - "peerDependencies": { - "react": ">=16.8", - "react-dom": ">=16.8" - } - }, - "node_modules/@tanstack/react-hotkeys/node_modules/@tanstack/hotkeys": { - "version": "0.7.1", - "license": "MIT", - "dependencies": { - "@tanstack/store": "^0.9.3" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - } - }, - "node_modules/@tanstack/react-hotkeys/node_modules/@tanstack/store": { - "version": "0.9.3", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - } - }, - "node_modules/@tanstack/react-query": { - "version": "4.44.0", - "license": "MIT", - "peer": true, - "dependencies": { - "@tanstack/query-core": "4.44.0", - "use-sync-external-store": "^1.6.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", - "react-native": "*" - }, - "peerDependenciesMeta": { - "react-dom": { - "optional": true - }, - "react-native": { - "optional": true - } - } - }, - "node_modules/@tanstack/react-store": { - "version": "0.9.3", - "license": "MIT", - "dependencies": { - "@tanstack/store": "0.9.3", - "use-sync-external-store": "^1.6.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" - } - }, - "node_modules/@tanstack/react-store/node_modules/@tanstack/store": { - "version": "0.9.3", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - } - }, - "node_modules/@tanstack/react-table": { - "version": "8.21.3", - "license": "MIT", - "dependencies": { - "@tanstack/table-core": "8.21.3" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" - }, - "peerDependencies": { - "react": ">=16.8", - "react-dom": ">=16.8" - } - }, - "node_modules/@tanstack/store": { - "version": "0.11.0", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@tanstack/table-core": { - "version": "8.21.3", + "node_modules/@oxfmt/binding-win32-x64-msvc": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.55.0.tgz", + "integrity": "sha512-eEYT5tivGnGbPHuOHuQpi6CGLObhh0re/5jcNQHihD2GRYkTM85dyi5a19zjP8Q00t1uqAx+/QGLUGdHeqzWyg==", + "cpu": [ + "x64" + ], + "dev": true, "license": "MIT", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=12" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/tannerlinsley" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@testing-library/dom": { - "version": "10.4.1", + "node_modules/@oxlint/binding-android-arm-eabi": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.70.0.tgz", + "integrity": "sha512-zFh0P4cswmRvw6nkyb89dr18rRanuaCPAsEXsFDoQY8WdaquI8Pt4NWFjaMJg6L23cy5NeN8J9cBnREbWzZhaw==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/runtime": "^7.12.5", - "@types/aria-query": "^5.0.1", - "aria-query": "5.3.0", - "dom-accessibility-api": "^0.5.9", - "lz-string": "^1.5.0", - "picocolors": "1.1.1", - "pretty-format": "^27.0.2" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=18" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@testing-library/jest-dom": { - "version": "6.9.1", + "node_modules/@oxlint/binding-android-arm64": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.70.0.tgz", + "integrity": "sha512-qI8o4HZjeGiBrWv+pJv4lH0Yi2Gl/JSp/EumBUApezJprIKa5PS4nU0lQsQngtky8k+SplQIOjv6hwu0SSxeyg==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@adobe/css-tools": "^4.4.0", - "aria-query": "^5.0.0", - "css.escape": "^1.5.1", - "dom-accessibility-api": "^0.6.3", - "picocolors": "^1.1.1", - "redent": "^3.0.0" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=14", - "npm": ">=6", - "yarn": ">=1" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api": { - "version": "0.6.3", + "node_modules/@oxlint/binding-darwin-arm64": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.70.0.tgz", + "integrity": "sha512-8KjgVVHI5F9nVwHCRwwA78Ty7zNKP4Wd9OeN5PSv3iu/F/u1RVXoOCgLhWqust6HmwQG6xc8c+RCyaWENy24+w==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@testing-library/react": { - "version": "16.3.2", + "node_modules/@oxlint/binding-darwin-x64": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.70.0.tgz", + "integrity": "sha512-WVydssv5PSUBXFJTdNBWlmGkbNmvPGaFt/2SUT/EZRB6bq6bEOHmMlbnupZD5jmlEvi9+mZJHi8TCw15lyfSfQ==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.12.5" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@testing-library/dom": "^10.0.0", - "@types/react": "^18.0.0 || ^19.0.0", - "@types/react-dom": "^18.0.0 || ^19.0.0", - "react": "^18.0.0 || ^19.0.0", - "react-dom": "^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@testing-library/user-event": { - "version": "13.5.0", + "node_modules/@oxlint/binding-freebsd-x64": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.70.0.tgz", + "integrity": "sha512-hJucmUf8OlinHNb1R7fI4Fw6WsAstOz7i8nmkWQfiHoZXtbufNm+MxiDTIMk1ggh2Ro4vLzgQ+bKvRY54MZoRA==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.12.5" - }, + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">=10", - "npm": ">=6" - }, - "peerDependencies": { - "@testing-library/dom": ">=7.21.4" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@tokenizer/inflate": { - "version": "0.4.1", + "node_modules/@oxlint/binding-linux-arm-gnueabihf": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.70.0.tgz", + "integrity": "sha512-1BnS7wbCYDSXwWzJJ+mc3NURoha6m6m6RT5c6vgAY3oz7C3OVXP+S0awo2mRq97arrJkVvO3qRQfyAHL+76xtQ==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", - "dependencies": { - "debug": "^4.4.3", - "token-types": "^6.1.1" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@tokenizer/token": { - "version": "0.3.0", + "node_modules/@oxlint/binding-linux-arm-musleabihf": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.70.0.tgz", + "integrity": "sha512-yKy/UdbR55+M2yEcuiV5DCNC/gdQAjr/GioUy50QwBzSrKm8ueWADqyRLS9Xk+qjNeCYGg6A8FvUBds56ttfqg==", + "cpu": [ + "arm" + ], "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@tsconfig/node10": { - "version": "1.0.12", + "node_modules/@oxlint/binding-linux-arm64-gnu": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.70.0.tgz", + "integrity": "sha512-0A5XJ4alvmqFUFP/4oYSyaO+qLto/HrKEWTSaegiVl+HOufFngK2BjYw9x4RbwBt/du5QG6l5q1zeWiJYYG5yg==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT" + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", + "node_modules/@oxlint/binding-linux-arm64-musl": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.70.0.tgz", + "integrity": "sha512-JiylyurlB0CLSedNtx1gzv3FvfWPF1h/2Y3BJszPLNt5XQFlBsH5ke0Jle3iJb3uqu5m2e7A/DwzpuCAHdiU+A==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT" + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", + "node_modules/@oxlint/binding-linux-ppc64-gnu": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.70.0.tgz", + "integrity": "sha512-J8VPG7I3/HmgaU4u8pNU2kFx2+0U+vPLS1dXFxXOaR/2TQ0f8AC7DRz0SRGRI1bfphnX2hVYTTtLuhL4nYKL+Q==", + "cpu": [ + "ppc64" + ], "dev": true, - "license": "MIT" + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", + "node_modules/@oxlint/binding-linux-riscv64-gnu": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.70.0.tgz", + "integrity": "sha512-N2+4lV2KLN+oXTIIIwmWDhwkrnvqf5oX7Hw0zPjk+RuIVgiBQSOlJWF7uQoFx2siEYX0ZQ5cfSbEAHm+J3t7Wg==", + "cpu": [ + "riscv64" + ], "dev": true, - "license": "MIT" + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@turbo/darwin-64": { - "version": "2.10.2", - "resolved": "https://registry.npmjs.org/@turbo/darwin-64/-/darwin-64-2.10.2.tgz", - "integrity": "sha512-wBM3ObqOWnKUDmg7QfUFDkDHPFUAJmrYlYqmEM8jMPAPA/I6wRJIbWimeQUqhOiQ8xPKhzyWM+xaiUP0wz8FEQ==", + "node_modules/@oxlint/binding-linux-riscv64-musl": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.70.0.tgz", + "integrity": "sha512-1e2L7cFCvx9QDzq6NPP+0tABKb5z6nWHyddWTNKprEsjO9xNrAtPowuCGpjNXxkTdsMiZ4jc8YQ5SstZd4XK6g==", "cpu": [ - "x64" + "riscv64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ - "darwin" - ] + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@turbo/darwin-arm64": { - "version": "2.10.2", + "node_modules/@oxlint/binding-linux-s390x-gnu": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.70.0.tgz", + "integrity": "sha512-Kwu/l/8GcYibCWA9m9N5pRXMIKVSsL/YbgpLzYkqDhWTiqdRfnNJ/+nqIKRKQiFbHWsdlHEhzMwruJK+qcEruA==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-x64-gnu": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.70.0.tgz", + "integrity": "sha512-tap04CsHYOl0nSAQJfPNIuBxqEPB2HnhQqwaOXLg1jnp2XfRo8Fa814dA4QC4zpvTWXCjAAaCY1W5LOORkEQuQ==", "cpu": [ - "arm64" + "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ - "darwin" - ] + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@turbo/linux-64": { - "version": "2.10.2", - "resolved": "https://registry.npmjs.org/@turbo/linux-64/-/linux-64-2.10.2.tgz", - "integrity": "sha512-mMsf5IIhiKuceEXNstd25IbadjBXZ0amxzFOqliEzJX6HyeeHdBQPVSY583PWqYDyqM/FB8d5ZjkthfBSeuH3Q==", + "node_modules/@oxlint/binding-linux-x64-musl": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.70.0.tgz", + "integrity": "sha512-hzJa/WgvtJpbBD9rgfy0qe+MjbxOXNUT0bfR1S6EQQzfTtBFA9xg5q8KSwRrQ2QfSS+TaP4j+4mVPQrfNc6UNg==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@turbo/linux-arm64": { - "version": "2.10.2", - "resolved": "https://registry.npmjs.org/@turbo/linux-arm64/-/linux-arm64-2.10.2.tgz", - "integrity": "sha512-Wcng1i2kaKmXutmwxT9MUoYZvdaIekXAdlGr4+0TpgbhGLw7nDuEcRBFrxb5BbRoX1d1q8SpdRxLc45TvDZIdQ==", + "node_modules/@oxlint/binding-openharmony-arm64": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.70.0.tgz", + "integrity": "sha512-xbsaNSNzVSnaJACCUYr1HQMyY/Q/Q1LkePmHG3UvZPvGCYGNxrsZp9OmtA6ick8xH47ltRRbRrPCM1YXYcyC+A==", "cpu": [ "arm64" ], @@ -5054,824 +3649,1038 @@ "license": "MIT", "optional": true, "os": [ - "linux" - ] + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@turbo/windows-64": { - "version": "2.10.2", - "resolved": "https://registry.npmjs.org/@turbo/windows-64/-/windows-64-2.10.2.tgz", - "integrity": "sha512-SsNhM7Ho7EpAdwtrJKBOic9Hso23vu6Dp0gAfLOvUFjPzurr/sGQlXZEvr6z89ne4RDOypTwz5CBDrixpMKtXw==", + "node_modules/@oxlint/binding-win32-arm64-msvc": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.70.0.tgz", + "integrity": "sha512-icAEsUI7JbW1TMRdEXV83mVAInhRVQYuuAlPpxdGwJ95chNdnCzjloRW8GglT0WvzOEZSio6fnYSk2DJ2Hv7LQ==", "cpu": [ - "x64" + "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "win32" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@turbo/windows-arm64": { - "version": "2.10.2", - "resolved": "https://registry.npmjs.org/@turbo/windows-arm64/-/windows-arm64-2.10.2.tgz", - "integrity": "sha512-Gf+S7ICAdimT/n02bOuVWKvhHnct/HYjZg3oBNIz5hZ9ZyWHbQim9J3P5Qip8WpX0ksxF7eaBVziJCuLnjhqDg==", + "node_modules/@oxlint/binding-win32-ia32-msvc": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.70.0.tgz", + "integrity": "sha512-FHMSWbVsPVs/f+Jcl04ws4JJ2wUnauyTzlpxWRG/lSO/8GpX08Fo2gQZqdA6CrRFI+zvkxl+N/KwJGWfUwYVZA==", "cpu": [ - "arm64" + "ia32" ], "dev": true, "license": "MIT", "optional": true, "os": [ "win32" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@tybys/wasm-util": { - "version": "0.10.3", + "node_modules/@oxlint/binding-win32-x64-msvc": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.70.0.tgz", + "integrity": "sha512-ptOlKwCz7n4AKs5VweMqG6DAg677FmKOK+vBkkL9DMNgFATIQ+upqUYBTOEwRQyRAx1ncGlPlXleV2hIcm3z4g==", + "cpu": [ + "x64" + ], + "dev": true, "license": "MIT", "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@perses-dev/alert-manager-plugin": { + "resolved": "alertmanager", + "link": true + }, + "node_modules/@perses-dev/bar-chart-plugin": { + "resolved": "barchart", + "link": true + }, + "node_modules/@perses-dev/clickhouse-plugin": { + "resolved": "clickhouse", + "link": true + }, + "node_modules/@perses-dev/client": { + "version": "0.55.0-beta.1", + "license": "Apache-2.0", "dependencies": { - "tslib": "^2.4.0" + "@perses-dev/spec": "0.3.0-beta.1", + "zod": "^3.21.4" + }, + "peerDependencies": { + "react": "^17.0.2 || ^18.0.0" } }, - "node_modules/@types/aria-query": { - "version": "5.0.4", - "dev": true, - "license": "MIT" + "node_modules/@perses-dev/components": { + "version": "0.55.0-beta.1", + "license": "Apache-2.0", + "dependencies": { + "@atlaskit/pragmatic-drag-and-drop": "^1.4.0", + "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.3", + "@codemirror/lang-json": "^6.0.1", + "@date-fns/tz": "^1.4.1", + "@fontsource/inter": "^5.0.0", + "@mui/x-date-pickers": "^7.23.1", + "@perses-dev/client": "0.55.0-beta.1", + "@perses-dev/spec": "0.3.0-beta.1", + "@tanstack/match-sorter-utils": "^8.19.4", + "@tanstack/react-table": "^8.20.5", + "@uiw/react-codemirror": "^4.19.1", + "date-fns": "^4.1.0", + "echarts": "5.5.0", + "immer": "^10.1.1", + "lodash": "^4.17.21", + "mathjs": "^10.6.4", + "mdi-material-ui": "^7.9.2", + "notistack": "^3.0.2", + "numbro": "^2.3.6", + "react-colorful": "^5.6.1", + "react-error-boundary": "^3.1.4", + "react-virtuoso": "^4.12.2" + }, + "peerDependencies": { + "@emotion/react": "^11.14.0", + "@emotion/styled": "^11.14.1", + "@mui/material": "^6.1.10", + "lodash": "^4.17.21", + "react": "^17.0.2 || ^18.0.0", + "react-dom": "^17.0.2 || ^18.0.0" + } }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "dev": true, - "license": "MIT", + "node_modules/@perses-dev/core": { + "version": "0.53.0", + "license": "Apache-2.0", "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" + "date-fns": "^4.1.0", + "lodash": "^4.17.21", + "mathjs": "^10.6.4", + "numbro": "^2.3.6", + "zod": "^3.21.4" } }, - "node_modules/@types/babel__generator": { - "version": "7.27.0", - "dev": true, - "license": "MIT", + "node_modules/@perses-dev/dashboards": { + "version": "0.55.0-beta.1", + "license": "Apache-2.0", "dependencies": { - "@babel/types": "^7.0.0" + "@perses-dev/client": "0.55.0-beta.1", + "@perses-dev/components": "0.55.0-beta.1", + "@perses-dev/plugin-system": "0.55.0-beta.1", + "@perses-dev/spec": "0.3.0-beta.1", + "@tanstack/hotkeys": "^0.8.0", + "@tanstack/react-hotkeys": "^0.9.1", + "immer": "^10.1.1", + "mdi-material-ui": "^7.9.2", + "react-grid-layout": "^1.3.4", + "react-hook-form": "^7.46.1", + "react-intersection-observer": "^9.4.0", + "use-immer": "^0.11.0", + "use-query-params": "^2.2.1", + "use-resize-observer": "^9.0.0", + "yaml": "^2.7.0", + "zustand": "^4.3.3" + }, + "peerDependencies": { + "@mui/material": "^6.1.10", + "@tanstack/react-query": "^4.39.1", + "react": "^17.0.2 || ^18.0.0", + "react-dom": "^17.0.2 || ^18.0.0" } }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "dev": true, - "license": "MIT", + "node_modules/@perses-dev/datasource-variable-plugin": { + "resolved": "datasourcevariable", + "link": true + }, + "node_modules/@perses-dev/explore": { + "version": "0.55.0-beta.1", + "license": "Apache-2.0", "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" + "@nexucis/fuzzy": "^0.5.1", + "@perses-dev/components": "0.55.0-beta.1", + "@perses-dev/dashboards": "0.55.0-beta.1", + "@perses-dev/plugin-system": "0.55.0-beta.1", + "mdi-material-ui": "^7.9.2", + "qs": "^6.14.0", + "react-virtuoso": "^4.12.2", + "use-query-params": "^2.2.1", + "use-resize-observer": "^9.0.0" + }, + "peerDependencies": { + "@mui/material": "^6.1.10", + "@tanstack/react-query": "^4.39.1", + "react": "^17.0.2 || ^18.0.0", + "react-dom": "^17.0.2 || ^18.0.0" } }, - "node_modules/@types/babel__traverse": { - "version": "7.28.0", - "dev": true, - "license": "MIT", + "node_modules/@perses-dev/flame-chart-plugin": { + "resolved": "flamechart", + "link": true + }, + "node_modules/@perses-dev/gauge-chart-plugin": { + "resolved": "gaugechart", + "link": true + }, + "node_modules/@perses-dev/greptimedb-plugin": { + "resolved": "greptimedb", + "link": true + }, + "node_modules/@perses-dev/heatmap-chart-plugin": { + "resolved": "heatmapchart", + "link": true + }, + "node_modules/@perses-dev/histogram-chart-plugin": { + "resolved": "histogramchart", + "link": true + }, + "node_modules/@perses-dev/jaeger-plugin": { + "resolved": "jaeger", + "link": true + }, + "node_modules/@perses-dev/log-explorer-plugin": { + "resolved": "logexplorer", + "link": true + }, + "node_modules/@perses-dev/logs-table-plugin": { + "resolved": "logstable", + "link": true + }, + "node_modules/@perses-dev/loki-plugin": { + "resolved": "loki", + "link": true + }, + "node_modules/@perses-dev/markdown-plugin": { + "resolved": "markdown", + "link": true + }, + "node_modules/@perses-dev/opensearch-plugin": { + "resolved": "opensearch", + "link": true + }, + "node_modules/@perses-dev/pie-chart-plugin": { + "resolved": "piechart", + "link": true + }, + "node_modules/@perses-dev/plugin-system": { + "version": "0.55.0-beta.1", + "license": "Apache-2.0", "dependencies": { - "@babel/types": "^7.28.2" + "@module-federation/enhanced": "^2.8.0", + "@perses-dev/client": "0.55.0-beta.1", + "@perses-dev/components": "0.55.0-beta.1", + "@perses-dev/core": "0.53.0", + "@perses-dev/spec": "0.3.0-beta.1", + "date-fns": "^4.1.0", + "date-fns-tz": "^3.2.0", + "immer": "^10.1.1", + "react-hook-form": "^7.46.1", + "semver": "^7.8.0", + "use-query-params": "^2.2.1", + "zod": "^3.25.76" + }, + "peerDependencies": { + "@emotion/react": "^11.14.0", + "@emotion/styled": "^11.14.1", + "@hookform/resolvers": "^3.2.0", + "@mui/material": "^6.1.10", + "@tanstack/react-query": "^4.39.1", + "react": "^17.0.2 || ^18.0.0", + "react-dom": "^17.0.2 || ^18.0.0" } }, - "node_modules/@types/body-parser": { - "version": "1.19.6", - "dev": true, + "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/bridge-react-webpack-plugin": { + "version": "2.8.2", "license": "MIT", "dependencies": { - "@types/connect": "*", - "@types/node": "*" + "@module-federation/sdk": "2.8.2" } }, - "node_modules/@types/chroma-js": { - "version": "3.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/color-hash": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/connect": { - "version": "3.4.38", - "dev": true, + "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/cli": { + "version": "2.8.2", "license": "MIT", "dependencies": { - "@types/node": "*" + "@module-federation/dts-plugin": "2.8.2", + "@module-federation/sdk": "2.8.2", + "commander": "11.1.0", + "jiti": "2.4.2" + }, + "bin": { + "mf": "bin/mf.js" + }, + "engines": { + "node": ">=16.0.0" } }, - "node_modules/@types/express": { - "version": "5.0.6", - "dev": true, + "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/dts-plugin": { + "version": "2.8.2", "license": "MIT", "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^5.0.0", - "@types/serve-static": "^2" + "@module-federation/error-codes": "2.8.2", + "@module-federation/managers": "2.8.2", + "@module-federation/sdk": "2.8.2", + "@module-federation/third-party-dts-extractor": "2.8.2", + "adm-zip": "0.6.0", + "isomorphic-ws": "5.0.0", + "undici": "7.29.0", + "ws": "8.21.0" + }, + "peerDependencies": { + "typescript": "^4.9.0 || ^5.0.0 || ^6.0.0 || ^7.0.0", + "vue-tsc": ">=1.0.24" + }, + "peerDependenciesMeta": { + "vue-tsc": { + "optional": true + } } }, - "node_modules/@types/express-serve-static-core": { - "version": "5.1.1", - "dev": true, + "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/enhanced": { + "version": "2.8.2", "license": "MIT", "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" + "@module-federation/bridge-react-webpack-plugin": "2.8.2", + "@module-federation/cli": "2.8.2", + "@module-federation/dts-plugin": "2.8.2", + "@module-federation/error-codes": "2.8.2", + "@module-federation/inject-external-runtime-core-plugin": "2.8.2", + "@module-federation/managers": "2.8.2", + "@module-federation/manifest": "2.8.2", + "@module-federation/rspack": "2.8.2", + "@module-federation/runtime-tools": "2.8.2", + "@module-federation/sdk": "2.8.2", + "@module-federation/webpack-bundler-runtime": "2.8.2", + "schema-utils": "4.3.0", + "tapable": "2.3.0" + }, + "bin": { + "mf": "bin/mf.js" + }, + "peerDependencies": { + "typescript": "^4.9.0 || ^5.0.0 || ^6.0.0 || ^7.0.0", + "vue-tsc": ">=1.0.24", + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + }, + "vue-tsc": { + "optional": true + }, + "webpack": { + "optional": true + } } }, - "node_modules/@types/http-cache-semantics": { - "version": "4.2.0", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/http-errors": { - "version": "2.0.5", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "dev": true, + "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/error-codes": { + "version": "2.8.2", "license": "MIT" }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.3", - "dev": true, + "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/inject-external-runtime-core-plugin": { + "version": "2.8.2", "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "*" + "peerDependencies": { + "@module-federation/runtime-tools": "2.8.2" } }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.4", - "dev": true, + "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/managers": { + "version": "2.8.2", "license": "MIT", "dependencies": { - "@types/istanbul-lib-report": "*" + "@module-federation/sdk": "2.8.2" } }, - "node_modules/@types/jest": { - "version": "30.0.0", - "dev": true, + "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/manifest": { + "version": "2.8.2", "license": "MIT", "dependencies": { - "expect": "^30.0.0", - "pretty-format": "^30.0.0" - } - }, - "node_modules/@types/jest/node_modules/ansi-styles": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "@module-federation/dts-plugin": "2.8.2", + "@module-federation/managers": "2.8.2", + "@module-federation/sdk": "2.8.2" } }, - "node_modules/@types/jest/node_modules/pretty-format": { - "version": "30.4.1", - "dev": true, + "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/rspack": { + "version": "2.8.2", "license": "MIT", "dependencies": { - "@jest/schemas": "30.4.1", - "ansi-styles": "^5.2.0", - "react-is-18": "npm:react-is@^18.3.1", - "react-is-19": "npm:react-is@^19.2.5" + "@module-federation/bridge-react-webpack-plugin": "2.8.2", + "@module-federation/dts-plugin": "2.8.2", + "@module-federation/inject-external-runtime-core-plugin": "2.8.2", + "@module-federation/managers": "2.8.2", + "@module-federation/manifest": "2.8.2", + "@module-federation/runtime-tools": "2.8.2", + "@module-federation/sdk": "2.8.2" }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + "peerDependencies": { + "@rspack/core": "^0.7.0 || ^1.0.0 || ^2.0.0-0", + "typescript": "^4.9.0 || ^5.0.0 || ^6.0.0 || ^7.0.0", + "vue-tsc": ">=1.0.24" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + }, + "vue-tsc": { + "optional": true + } } }, - "node_modules/@types/jsdom": { - "version": "21.1.7", - "dev": true, + "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/runtime": { + "version": "2.8.2", "license": "MIT", "dependencies": { - "@types/node": "*", - "@types/tough-cookie": "*", - "parse5": "^7.0.0" + "@module-federation/error-codes": "2.8.2", + "@module-federation/runtime-core": "2.8.2", + "@module-federation/sdk": "2.8.2" } }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "license": "MIT" - }, - "node_modules/@types/json5": { - "version": "0.0.29", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/lodash": { - "version": "4.17.24", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "26.1.0", - "dev": true, + "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/runtime-core": { + "version": "2.8.2", "license": "MIT", "dependencies": { - "undici-types": "~8.3.0" + "@module-federation/error-codes": "2.8.2", + "@module-federation/sdk": "2.8.2" } }, - "node_modules/@types/parse-json": { - "version": "4.0.2", + "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/runtime-tools": { + "version": "2.8.2", "license": "MIT", - "peer": true - }, - "node_modules/@types/prop-types": { - "version": "15.7.15", - "license": "MIT" - }, - "node_modules/@types/qs": { - "version": "6.15.1", - "dev": true, + "dependencies": { + "@module-federation/runtime": "2.8.2", + "@module-federation/webpack-bundler-runtime": "2.8.2" + } + }, + "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/sdk": { + "version": "2.8.2", "license": "MIT" }, - "node_modules/@types/range-parser": { - "version": "1.2.7", - "dev": true, + "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/third-party-dts-extractor": { + "version": "2.8.2", "license": "MIT" }, - "node_modules/@types/react": { - "version": "18.3.31", + "node_modules/@perses-dev/plugin-system/node_modules/@module-federation/webpack-bundler-runtime": { + "version": "2.8.2", "license": "MIT", - "peer": true, "dependencies": { - "@types/prop-types": "*", - "csstype": "^3.2.2" + "@module-federation/error-codes": "2.8.2", + "@module-federation/runtime": "2.8.2", + "@module-federation/sdk": "2.8.2" } }, - "node_modules/@types/react-dom": { - "version": "18.3.7", + "node_modules/@perses-dev/plugin-system/node_modules/adm-zip": { + "version": "0.6.0", "license": "MIT", - "peer": true, - "peerDependencies": { - "@types/react": "^18.0.0" + "engines": { + "node": ">=14.0" } }, - "node_modules/@types/react-transition-group": { - "version": "4.4.12", - "license": "MIT", - "peerDependencies": { - "@types/react": "*" + "node_modules/@perses-dev/plugin-system/node_modules/semver": { + "version": "7.8.5", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "node_modules/@types/semver": { - "version": "7.5.8", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/send": { - "version": "1.2.1", - "dev": true, + "node_modules/@perses-dev/plugin-system/node_modules/undici": { + "version": "7.29.0", "license": "MIT", - "dependencies": { - "@types/node": "*" + "engines": { + "node": ">=20.18.1" } }, - "node_modules/@types/serve-static": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/http-errors": "*", - "@types/node": "*" - } + "node_modules/@perses-dev/plugins-e2e": { + "resolved": "e2e", + "link": true }, - "node_modules/@types/stack-utils": { - "version": "2.0.3", - "dev": true, - "license": "MIT" + "node_modules/@perses-dev/prometheus-plugin": { + "resolved": "prometheus", + "link": true }, - "node_modules/@types/tough-cookie": { - "version": "4.0.5", - "dev": true, - "license": "MIT" + "node_modules/@perses-dev/pyroscope-plugin": { + "resolved": "pyroscope", + "link": true }, - "node_modules/@types/trusted-types": { - "version": "2.0.7", - "license": "MIT", - "optional": true + "node_modules/@perses-dev/scatter-chart-plugin": { + "resolved": "scatterchart", + "link": true }, - "node_modules/@types/yargs": { - "version": "17.0.35", - "dev": true, - "license": "MIT", + "node_modules/@perses-dev/spec": { + "version": "0.3.0-beta.1", + "license": "Apache-2.0", "dependencies": { - "@types/yargs-parser": "*" + "date-fns": "^4.1.0", + "mathjs": "^15.1.1", + "zod": "^3.21.4" } }, - "node_modules/@types/yargs-parser": { - "version": "21.0.3", - "dev": true, - "license": "MIT" - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.62.1", - "dev": true, + "node_modules/@perses-dev/spec/node_modules/fraction.js": { + "version": "5.3.4", "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.62.1", - "@typescript-eslint/type-utils": "8.62.1", - "@typescript-eslint/utils": "8.62.1", - "@typescript-eslint/visitor-keys": "8.62.1", - "ignore": "^7.0.5", - "natural-compare": "^1.4.0", - "ts-api-utils": "^2.5.0" - }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "*" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.62.1", - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" + "type": "github", + "url": "https://github.com/sponsors/rawify" } }, - "node_modules/@typescript-eslint/parser": { - "version": "8.62.1", - "dev": true, - "license": "MIT", - "peer": true, + "node_modules/@perses-dev/spec/node_modules/mathjs": { + "version": "15.2.0", + "license": "Apache-2.0", "dependencies": { - "@typescript-eslint/scope-manager": "8.62.1", - "@typescript-eslint/types": "8.62.1", - "@typescript-eslint/typescript-estree": "8.62.1", - "@typescript-eslint/visitor-keys": "8.62.1", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "@babel/runtime": "^7.26.10", + "complex.js": "^2.2.5", + "decimal.js": "^10.4.3", + "escape-latex": "^1.2.0", + "fraction.js": "^5.2.1", + "javascript-natural-sort": "^0.7.1", + "seedrandom": "^3.0.5", + "tiny-emitter": "^2.1.0", + "typed-function": "^4.2.1" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "bin": { + "mathjs": "bin/cli.js" }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" + "engines": { + "node": ">= 18" } }, - "node_modules/@typescript-eslint/project-service": { - "version": "8.62.1", - "dev": true, + "node_modules/@perses-dev/spec/node_modules/typed-function": { + "version": "4.2.2", "license": "MIT", - "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.62.1", - "@typescript-eslint/types": "^8.62.1", - "debug": "^4.4.3" - }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" + "node": ">= 18" } }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.62.1", + "node_modules/@perses-dev/splunk-plugin": { + "resolved": "splunk", + "link": true + }, + "node_modules/@perses-dev/stat-chart-plugin": { + "resolved": "statchart", + "link": true + }, + "node_modules/@perses-dev/static-list-variable-plugin": { + "resolved": "staticlistvariable", + "link": true + }, + "node_modules/@perses-dev/status-history-chart-plugin": { + "resolved": "statushistorychart", + "link": true + }, + "node_modules/@perses-dev/table-plugin": { + "resolved": "table", + "link": true + }, + "node_modules/@perses-dev/tempo-plugin": { + "resolved": "tempo", + "link": true + }, + "node_modules/@perses-dev/timeseries-chart-plugin": { + "resolved": "timeserieschart", + "link": true + }, + "node_modules/@perses-dev/timeseries-table-plugin": { + "resolved": "timeseriestable", + "link": true + }, + "node_modules/@perses-dev/trace-table-plugin": { + "resolved": "tracetable", + "link": true + }, + "node_modules/@perses-dev/tracing-gantt-chart-plugin": { + "resolved": "tracingganttchart", + "link": true + }, + "node_modules/@perses-dev/victorialogs-plugin": { + "resolved": "victorialogs", + "link": true + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", "dev": true, "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.62.1", - "@typescript-eslint/visitor-keys": "8.62.1" - }, + "optional": true, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "node": ">=14" } }, - "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.62.1", + "node_modules/@pkgr/core": { + "version": "0.3.6", "dev": true, "license": "MIT", "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^14.18.0 || >=16.0.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" + "url": "https://opencollective.com/pkgr" } }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.62.1", + "node_modules/@playwright/test": { + "version": "1.61.1", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "@typescript-eslint/types": "8.62.1", - "@typescript-eslint/typescript-estree": "8.62.1", - "@typescript-eslint/utils": "8.62.1", - "debug": "^4.4.3", - "ts-api-utils": "^2.5.0" + "playwright": "1.61.1" }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "bin": { + "playwright": "cli.js" }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "license": "MIT", + "peer": true, "funding": { "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/@prometheus-io/codemirror-promql": { + "version": "0.313.1", + "license": "Apache-2.0", + "dependencies": { + "@prometheus-io/lezer-promql": "0.313.1", + "lru-cache": "^11.5.1" + }, + "engines": { + "node": ">=12.0.0" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" + "@codemirror/autocomplete": "^6.4.0", + "@codemirror/language": "^6.3.0", + "@codemirror/lint": "^6.0.0", + "@codemirror/state": "^6.1.1", + "@codemirror/view": "^6.4.0", + "@lezer/common": "^1.0.1" + } + }, + "node_modules/@prometheus-io/codemirror-promql/node_modules/lru-cache": { + "version": "11.5.2", + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@prometheus-io/lezer-promql": { + "version": "0.313.1", + "license": "Apache-2.0", + "peerDependencies": { + "@lezer/highlight": "^1.1.2", + "@lezer/lr": "^1.2.3" } }, - "node_modules/@typescript-eslint/types": { - "version": "8.62.1", - "dev": true, + "node_modules/@remix-run/router": { + "version": "1.23.3", "license": "MIT", "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "node": ">=14.0.0" } }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.62.1", + "node_modules/@rsbuild/core": { + "version": "1.7.6", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.62.1", - "@typescript-eslint/tsconfig-utils": "8.62.1", - "@typescript-eslint/types": "8.62.1", - "@typescript-eslint/visitor-keys": "8.62.1", - "debug": "^4.4.3", - "minimatch": "^10.2.2", - "semver": "^7.7.3", - "tinyglobby": "^0.2.15", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "@rspack/core": "~1.7.10", + "@rspack/lite-tapable": "~1.1.0", + "@swc/helpers": "^0.5.20", + "core-js": "~3.47.0", + "jiti": "^2.6.1" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "bin": { + "rsbuild": "bin/rsbuild.js" }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" + "engines": { + "node": ">=18.12.0" } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/balanced-match": { - "version": "4.0.4", + "node_modules/@rsbuild/core/node_modules/@module-federation/error-codes": { + "version": "0.22.0", "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } + "license": "MIT" }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "5.0.7", + "node_modules/@rsbuild/core/node_modules/@module-federation/runtime": { + "version": "0.22.0", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" + "@module-federation/error-codes": "0.22.0", + "@module-federation/runtime-core": "0.22.0", + "@module-federation/sdk": "0.22.0" } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "10.2.5", + "node_modules/@rsbuild/core/node_modules/@module-federation/runtime-core": { + "version": "0.22.0", "dev": true, - "license": "BlueOak-1.0.0", + "license": "MIT", "dependencies": { - "brace-expansion": "^5.0.5" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.8.5", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" + "@module-federation/error-codes": "0.22.0", + "@module-federation/sdk": "0.22.0" } }, - "node_modules/@typescript-eslint/utils": { - "version": "8.62.1", + "node_modules/@rsbuild/core/node_modules/@module-federation/runtime-tools": { + "version": "0.22.0", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.62.1", - "@typescript-eslint/types": "8.62.1", - "@typescript-eslint/typescript-estree": "8.62.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" + "@module-federation/runtime": "0.22.0", + "@module-federation/webpack-bundler-runtime": "0.22.0" } }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.62.1", + "node_modules/@rsbuild/core/node_modules/@module-federation/sdk": { + "version": "0.22.0", + "dev": true, + "license": "MIT" + }, + "node_modules/@rsbuild/core/node_modules/@module-federation/webpack-bundler-runtime": { + "version": "0.22.0", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.62.1", - "eslint-visitor-keys": "^5.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "@module-federation/runtime": "0.22.0", + "@module-federation/sdk": "0.22.0" } }, - "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { - "version": "5.0.1", + "node_modules/@rsbuild/core/node_modules/@napi-rs/wasm-runtime": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.0.7.tgz", + "integrity": "sha512-SeDnOO0Tk7Okiq6DbXmmBODgOAb9dp9gjlphokTUxmt8U3liIP1ZsozBahH69j/RJv+Rfs6IwUKHTgQYJ/HBAw==", "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@uiw/codemirror-extensions-basic-setup": { - "version": "4.25.10", "license": "MIT", + "optional": true, "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/commands": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/lint": "^6.0.0", - "@codemirror/search": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0" - }, - "funding": { - "url": "https://jaywcjlove.github.io/#/sponsor" - }, - "peerDependencies": { - "@codemirror/autocomplete": ">=6.0.0", - "@codemirror/commands": ">=6.0.0", - "@codemirror/language": ">=6.0.0", - "@codemirror/lint": ">=6.0.0", - "@codemirror/search": ">=6.0.0", - "@codemirror/state": ">=6.0.0", - "@codemirror/view": ">=6.0.0" + "@emnapi/core": "^1.5.0", + "@emnapi/runtime": "^1.5.0", + "@tybys/wasm-util": "^0.10.1" } }, - "node_modules/@uiw/react-codemirror": { - "version": "4.25.10", + "node_modules/@rsbuild/core/node_modules/@rspack/binding": { + "version": "1.7.12", + "dev": true, "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.18.6", - "@codemirror/commands": "^6.1.0", - "@codemirror/state": "^6.1.1", - "@codemirror/theme-one-dark": "^6.0.0", - "@uiw/codemirror-extensions-basic-setup": "4.25.10", - "codemirror": "^6.0.0" - }, - "funding": { - "url": "https://jaywcjlove.github.io/#/sponsor" - }, - "peerDependencies": { - "@babel/runtime": ">=7.11.0", - "@codemirror/state": ">=6.0.0", - "@codemirror/theme-one-dark": ">=6.0.0", - "@codemirror/view": ">=6.0.0", - "codemirror": ">=6.0.0", - "react": ">=17.0.0", - "react-dom": ">=17.0.0" + "optionalDependencies": { + "@rspack/binding-darwin-arm64": "1.7.12", + "@rspack/binding-darwin-x64": "1.7.12", + "@rspack/binding-linux-arm64-gnu": "1.7.12", + "@rspack/binding-linux-arm64-musl": "1.7.12", + "@rspack/binding-linux-x64-gnu": "1.7.12", + "@rspack/binding-linux-x64-musl": "1.7.12", + "@rspack/binding-wasm32-wasi": "1.7.12", + "@rspack/binding-win32-arm64-msvc": "1.7.12", + "@rspack/binding-win32-ia32-msvc": "1.7.12", + "@rspack/binding-win32-x64-msvc": "1.7.12" } }, - "node_modules/@ungap/structured-clone": { - "version": "1.3.2", + "node_modules/@rsbuild/core/node_modules/@rspack/binding-darwin-arm64": { + "version": "1.7.12", + "cpu": [ + "arm64" + ], "dev": true, - "license": "ISC" + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] }, - "node_modules/@unrs/resolver-binding-android-arm-eabi": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.12.2.tgz", - "integrity": "sha512-g5T90pqg1bo/7mytQx6F4iBNC0Wsh9cu+z9veDbFjc7HjpesJFWD7QMS0NGStXM075+7dJPPVvBbpZlnrdpi/w==", + "node_modules/@rsbuild/core/node_modules/@rspack/binding-darwin-x64": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.7.12.tgz", + "integrity": "sha512-jnOp+/UXOJa9xqUb8KXH03sysoO2e4Ij6tw6MqDdmdj8n/A8PQENRPUbW9AwXpPtVDJPus9r4fi7b3+6e4B8Hg==", "cpu": [ - "arm" + "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ - "android" + "darwin" ] }, - "node_modules/@unrs/resolver-binding-android-arm64": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.12.2.tgz", - "integrity": "sha512-YGCRZv/9GLhwmz6mYDeTsm/92BAyR28l6c2ReweVW5pWgfsitWLY8upvfRlGdoyD8HjeTHSYJWyZGD4KJA/nFQ==", + "node_modules/@rsbuild/core/node_modules/@rspack/binding-linux-arm64-gnu": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.7.12.tgz", + "integrity": "sha512-C8owWG+yvo7X0oVLIXetkoJhIFBP1LYNcAQqtgLmJnQLQDklGuP83dKC+zISGQWpjawHfZ1ER96vLgoTrxKZdw==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ - "android" + "linux" ] }, - "node_modules/@unrs/resolver-binding-darwin-arm64": { - "version": "1.12.2", + "node_modules/@rsbuild/core/node_modules/@rspack/binding-linux-arm64-musl": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.7.12.tgz", + "integrity": "sha512-i51WWI64aRpsfSki6rN0aepPqXkVfS+vZM7+4bWDcmnhUmdMvhIPcYg0QRk3DtyJnu33jqNLM0WHY78k00NyfA==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ - "darwin" + "linux" ] }, - "node_modules/@unrs/resolver-binding-darwin-x64": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.12.2.tgz", - "integrity": "sha512-f7rPLi/T1HVKZu/u6t87lroib16n8vrSzcyxI7lg4BGO9UF26KhQL44sd9eOUgrTYhvRXtWOIZT5PejdPyJfUA==", + "node_modules/@rsbuild/core/node_modules/@rspack/binding-linux-x64-gnu": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.7.12.tgz", + "integrity": "sha512-MSos0FuPEefqo9V92ULd5hggKG29EkSNg1zDcypy0OkpsKh5pfjVxTLYFXgTcVyFoUQQbdG8zFBzYbwmJ8V4ew==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ - "darwin" + "linux" ] }, - "node_modules/@unrs/resolver-binding-freebsd-x64": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.12.2.tgz", - "integrity": "sha512-BpcOjWCJub6nRZUS2zA20pmLvjtqAtGejETaIyRLiZiQf++cbrjltLA5NN/xaXfqeOBOSlMFbemIl5/S5tljmg==", + "node_modules/@rsbuild/core/node_modules/@rspack/binding-linux-x64-musl": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.7.12.tgz", + "integrity": "sha512-JcAMVKXOnjfpC3coWjCFPWD3Yl8RBw6a+IXQQ8mfRlHaHMIiOv8IfZqx15XRxMUn49CtP7Z0Na8iiAg2aKrcfw==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ - "freebsd" + "linux" ] }, - "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.12.2.tgz", - "integrity": "sha512-vZTDvdSISZjJx66OzJqtsOhzifbqRjbmI1Mnu49fQDwog5GtDI4QidRiEAYbZCRj9C8YZEW+3ZjqsyS9GR4k2A==", + "node_modules/@rsbuild/core/node_modules/@rspack/binding-wasm32-wasi": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-1.7.12.tgz", + "integrity": "sha512-n+ZqP6ZMc0nhOgvadg5VhEs9ojtbES80AcWeFnmGkbzIszvGSO63GKNiRkXtjJ9KFuRzytbbmsCqkUVH+Tywxg==", "cpu": [ - "arm" + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@napi-rs/wasm-runtime": "1.0.7" + } + }, + "node_modules/@rsbuild/core/node_modules/@rspack/binding-win32-arm64-msvc": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.7.12.tgz", + "integrity": "sha512-8+h5fYDXYdmugbdfZ+D1y8IQ3rv2EhSfyGP7vBe+bjNyaMa4jWrpucmZbtxojUL1AzaeuHbvMdj9UO/gelk/+g==", + "cpu": [ + "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ - "linux" + "win32" ] }, - "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.12.2.tgz", - "integrity": "sha512-BiPI+IrIlwcW4nLLMM21+B1dFPzd55yAVgVGrdgDjNef+ch03GdxrcyaIz8X9SsQirh/kCQ7mviyWlMxdh2D7g==", + "node_modules/@rsbuild/core/node_modules/@rspack/binding-win32-ia32-msvc": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.7.12.tgz", + "integrity": "sha512-cDMGwTRSa2p9fNBVe1wTRkF2AEXZ9ARWW36QeC5CkLaI0Ezz8lvhF2+CSOPnhaQ1O1qtn0L0SF+lFnrY+I7xGQ==", "cpu": [ - "arm" + "ia32" ], "dev": true, "license": "MIT", "optional": true, "os": [ - "linux" + "win32" ] }, - "node_modules/@unrs/resolver-binding-linux-arm64-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.12.2.tgz", - "integrity": "sha512-zJc0H99FEPoFfSrNpa91HYfxzfAJCr502oxNK1cfdC9hlaFI43RT+JFCann9JUgZmLzzntChHyn13Sgn9ljHNg==", + "node_modules/@rsbuild/core/node_modules/@rspack/binding-win32-x64-msvc": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.7.12.tgz", + "integrity": "sha512-wIqFvlgFqrgUyj/6S/FJcvShnkZOmIeXTfqvheLY67MGq8qd8jb1YimQVKAIrmWB3yuJKUFACI3Ag1UBtEedEA==", "cpu": [ - "arm64" + "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ - "linux" + "win32" ] }, - "node_modules/@unrs/resolver-binding-linux-arm64-musl": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.12.2.tgz", - "integrity": "sha512-KQ3Lki6l+Pz1k/eBipN41ES+YUK30beLGb9YqcB1O542cyLCNE6GaxrfcY3T6EezmGGk84wb5XyO9loTM9tkcA==", + "node_modules/@rsbuild/core/node_modules/@rspack/core": { + "version": "1.7.12", + "dev": true, + "license": "MIT", + "dependencies": { + "@module-federation/runtime-tools": "0.22.0", + "@rspack/binding": "1.7.12", + "@rspack/lite-tapable": "1.1.0" + }, + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "@swc/helpers": ">=0.5.1" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@rsbuild/core/node_modules/@rspack/lite-tapable": { + "version": "1.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/@rsbuild/core/node_modules/jiti": { + "version": "2.7.0", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/@rsbuild/plugin-react": { + "version": "1.4.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@rspack/plugin-react-refresh": "^1.6.1", + "react-refresh": "^0.18.0" + }, + "peerDependencies": { + "@rsbuild/core": "^1.0.0 || ^2.0.0-0" + }, + "peerDependenciesMeta": { + "@rsbuild/core": { + "optional": true + } + } + }, + "node_modules/@rspack/binding": { + "version": "2.1.2", + "license": "MIT", + "peer": true, + "optionalDependencies": { + "@rspack/binding-darwin-arm64": "2.1.2", + "@rspack/binding-darwin-x64": "2.1.2", + "@rspack/binding-linux-arm64-gnu": "2.1.2", + "@rspack/binding-linux-arm64-musl": "2.1.2", + "@rspack/binding-linux-riscv64-gnu": "2.1.2", + "@rspack/binding-linux-riscv64-musl": "2.1.2", + "@rspack/binding-linux-x64-gnu": "2.1.2", + "@rspack/binding-linux-x64-musl": "2.1.2", + "@rspack/binding-wasm32-wasi": "2.1.2", + "@rspack/binding-win32-arm64-msvc": "2.1.2", + "@rspack/binding-win32-ia32-msvc": "2.1.2", + "@rspack/binding-win32-x64-msvc": "2.1.2" + } + }, + "node_modules/@rspack/binding-darwin-arm64": { + "version": "2.1.2", "cpu": [ "arm64" ], - "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ - "linux" - ] + "darwin" + ], + "peer": true }, - "node_modules/@unrs/resolver-binding-linux-loong64-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-gnu/-/resolver-binding-linux-loong64-gnu-1.12.2.tgz", - "integrity": "sha512-3SJGEh1DborhG6pyxvhPzCT4bbSIVihsvgJc13P1bHG7KLdNDaF9T3gsTwFc7Jw/5Y5/iWOjkEx7Zy0NvCGX3Q==", + "node_modules/@rspack/binding-darwin-x64": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-2.1.2.tgz", + "integrity": "sha512-aoifkILvx/XEHyvg8yW57xu95nx7f9f/3ah1+RguHSNKcJMcoCep9VX1Ct1N0ftqg8MC0JUObc7xWL5W14hmjA==", "cpu": [ - "loong64" - ], - "dev": true, - "libc": [ - "glibc" + "x64" ], "license": "MIT", "optional": true, "os": [ - "linux" - ] + "darwin" + ], + "peer": true }, - "node_modules/@unrs/resolver-binding-linux-loong64-musl": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-musl/-/resolver-binding-linux-loong64-musl-1.12.2.tgz", - "integrity": "sha512-jiuG/Obbel7uw1PwHNFfrkiKhLAF6mnyZ6aWlOAVN9WqKm8v0OFGnciJIHu8+CMvXLQ8AD51LPzAoUfT21D5Ew==", + "node_modules/@rspack/binding-linux-arm64-gnu": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-2.1.2.tgz", + "integrity": "sha512-My4m40tyJSgiCEf3bB2KIEX710q3nZg99LIjy+8Zxgi3oZTkg1bFmFRusFU5U4eN5408zfSqDDGvjDE3Yv7o4w==", "cpu": [ - "loong64" + "arm64" ], - "dev": true, "libc": [ - "musl" + "glibc" ], "license": "MIT", "optional": true, "os": [ "linux" - ] + ], + "peer": true }, - "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.12.2.tgz", - "integrity": "sha512-q7xRvVpmcfeL+LlZg8Pbbo6QaTZwDU5BaGZbwfhkEsXJn3Was8xYfE0RBH266xZt0rM6B7i8xAYIvjthuUIWHg==", + "node_modules/@rspack/binding-linux-arm64-musl": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-2.1.2.tgz", + "integrity": "sha512-yt+GGWUH7WPE8K97cRc8OpZhH7Pbj1vU+lkvKbDtF/rR8X9a/bJsA/nBqyUV2oBKOVbrp5I8rFZlnDskMqgvKw==", "cpu": [ - "ppc64" + "arm64" ], - "dev": true, "libc": [ - "glibc" + "musl" ], "license": "MIT", "optional": true, "os": [ "linux" - ] + ], + "peer": true }, - "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.12.2.tgz", - "integrity": "sha512-0CVdx6lcnT3Q9inOH8tsMIOJ6ImndllMjqJHg8RLVdB7Vq4SfkEXl9mCSsVNuNA4MCYycRicCUxPCabVHJRr6A==", + "node_modules/@rspack/binding-linux-riscv64-gnu": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-2.1.2.tgz", + "integrity": "sha512-uys8Jyw8Z3ralvICbN/L/nZfy5qELIwpOY72rhIqhoDYwFcL4fmMaY7WsvUcJOjCB2rqOcWPaWKuF2oPvo9iDQ==", "cpu": [ "riscv64" ], - "dev": true, "libc": [ "glibc" ], @@ -5879,16 +4688,16 @@ "optional": true, "os": [ "linux" - ] + ], + "peer": true }, - "node_modules/@unrs/resolver-binding-linux-riscv64-musl": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.12.2.tgz", - "integrity": "sha512-iOwlRo9vnp6R6ohHQS11n0NnfdXx/omhkocmIfaPRpQhKZ+3BDMkkdRVh53qjkFkpPddf+FETA28NwGN7l5l+w==", + "node_modules/@rspack/binding-linux-riscv64-musl": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-2.1.2.tgz", + "integrity": "sha512-JYNVQwqCaRGQWvjHQYzZkIzQiwllMaJwh4Rdu3ww6W2OJcJUqT08sL1pkOtU0iCxT4VUYiRRcp93VGTGpHr8fg==", "cpu": [ "riscv64" ], - "dev": true, "libc": [ "musl" ], @@ -5896,16 +4705,16 @@ "optional": true, "os": [ "linux" - ] + ], + "peer": true }, - "node_modules/@unrs/resolver-binding-linux-s390x-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.12.2.tgz", - "integrity": "sha512-HYJtLfXq94q8iZNFT1lknx258wlkkWhZeUXJRqzKBBUJ00CvZ+N33zgbCqimLjsyw5Va6uUxhVa12mI+kaveEw==", + "node_modules/@rspack/binding-linux-x64-gnu": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-2.1.2.tgz", + "integrity": "sha512-KDoPy0Msf/JLhxgPPrJQzZeB4Qpqd32em8AP5lSW2s6jR5I35dHgAe9xc2A++EQtnSrU4GTn6DBvFC7q84SihQ==", "cpu": [ - "s390x" + "x64" ], - "dev": true, "libc": [ "glibc" ], @@ -5913,3889 +4722,3779 @@ "optional": true, "os": [ "linux" - ] + ], + "peer": true }, - "node_modules/@unrs/resolver-binding-linux-x64-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.12.2.tgz", - "integrity": "sha512-mPsUhunKKDih5O96Y6enDQyHc1SqBPlY1E/SfMWDM3EdJ95Z9CArPeCVwCCqbP45ljvivdEk8Fxn+SIb1rDAJQ==", + "node_modules/@rspack/binding-linux-x64-musl": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-2.1.2.tgz", + "integrity": "sha512-66hWmIGvn4zCKAYXJE9Bp5SNSLYnLFq2Ke/efE+ZtWy43Dd5vk9AAOmThVGBwdwmIxmGtHGCp+cAuS4G0wu0TA==", "cpu": [ "x64" ], - "dev": true, "libc": [ - "glibc" + "musl" ], "license": "MIT", "optional": true, "os": [ "linux" - ] + ], + "peer": true }, - "node_modules/@unrs/resolver-binding-linux-x64-musl": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.12.2.tgz", - "integrity": "sha512-azrt6+5ydLd8Vt210AAFis/lZevSfPw93EJRIJG+xPu4WCJ8K0kppCTpMyLPcKT7H15M4Jnt2tMp5bOvCkRC6A==", + "node_modules/@rspack/binding-wasm32-wasi": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-2.1.2.tgz", + "integrity": "sha512-EB4SqH8DW/E/OmqssNQvnIVGQiVUyYNlA/pcc6Ia4MlTNwu6eNDppcNLrToH+kSZpL4CpHSFfSM3eIsSuar2Rw==", "cpu": [ - "x64" + "wasm32" ], - "dev": true, - "libc": [ - "musl" + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@emnapi/core": "1.11.1", + "@emnapi/runtime": "1.11.1", + "@napi-rs/wasm-runtime": "1.1.6" + } + }, + "node_modules/@rspack/binding-win32-arm64-msvc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-2.1.2.tgz", + "integrity": "sha512-T6Fs/g32MRja/UpCq4AdyPRj8tA0cOkcEa4PrAcn/ztUgK8b/qMVxj5mhMI+n7k+kHZQnpeB1Q4HqdSJi6OocA==", + "cpu": [ + "arm64" ], "license": "MIT", "optional": true, "os": [ - "linux" - ] + "win32" + ], + "peer": true }, - "node_modules/@unrs/resolver-binding-openharmony-arm64": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-openharmony-arm64/-/resolver-binding-openharmony-arm64-1.12.2.tgz", - "integrity": "sha512-YZ9hP4O0X9PQb8eO980qmLNGH4zT3I9+SZTdt0Pr0YyuGQhYKoOZkV02VzrzyOZJ5xIJ3UFIenKkUkGg8GjgWQ==", + "node_modules/@rspack/binding-win32-ia32-msvc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-2.1.2.tgz", + "integrity": "sha512-OtxkFVz14mVL4QK8QriSELn9B6PaYGHw1jGJwVDEzpu2ZxSHCTQPz9dVE1ekYtREEqZUkRU7Fp7VfhJSmjTt2Q==", "cpu": [ - "arm64" + "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ - "openharmony" - ] + "win32" + ], + "peer": true }, - "node_modules/@unrs/resolver-binding-wasm32-wasi": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.12.2.tgz", - "integrity": "sha512-tYFDIkMxSflfEc/h92ZWNsZlHSwgimbNHSO3PL2JWQHfCuC2q316jMyYU9TIWZsFK2bQwyK5VAdYgn8ygPj69A==", + "node_modules/@rspack/binding-win32-x64-msvc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-2.1.2.tgz", + "integrity": "sha512-Am+nx9fLF3nzgD/K05Bs1Bb+WO8SFLWAYRbXkymaL1r+RQxjRj7jd5ap2PhGOCcfaNA4yVWkAFvmFP92eRu7bQ==", "cpu": [ - "wasm32" + "x64" ], - "dev": true, "license": "MIT", "optional": true, + "os": [ + "win32" + ], + "peer": true + }, + "node_modules/@rspack/core": { + "version": "2.1.2", + "license": "MIT", + "peer": true, "dependencies": { - "@emnapi/core": "1.10.0", - "@emnapi/runtime": "1.10.0", - "@napi-rs/wasm-runtime": "^1.1.4" + "@rspack/binding": "2.1.2" }, "engines": { - "node": ">=14.0.0" + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "@module-federation/runtime-tools": "^0.24.1 || ^2.0.0", + "@swc/helpers": "^0.5.23" + }, + "peerDependenciesMeta": { + "@module-federation/runtime-tools": { + "optional": true + }, + "@swc/helpers": { + "optional": true + } } }, - "node_modules/@unrs/resolver-binding-wasm32-wasi/node_modules/@emnapi/core": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", - "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", + "node_modules/@rspack/plugin-react-refresh": { + "version": "1.6.2", "dev": true, "license": "MIT", - "optional": true, "dependencies": { - "@emnapi/wasi-threads": "1.2.1", - "tslib": "^2.4.0" + "error-stack-parser": "^2.1.4" + }, + "peerDependencies": { + "react-refresh": ">=0.10.0 <1.0.0", + "webpack-hot-middleware": "2.x" + }, + "peerDependenciesMeta": { + "webpack-hot-middleware": { + "optional": true + } } }, - "node_modules/@unrs/resolver-binding-wasm32-wasi/node_modules/@emnapi/runtime": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", - "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", + "node_modules/@sec-ant/readable-stream": { + "version": "0.4.1", + "dev": true, + "license": "MIT" + }, + "node_modules/@sinclair/typebox": { + "version": "0.34.49", + "dev": true, + "license": "MIT" + }, + "node_modules/@sindresorhus/is": { + "version": "7.2.0", "dev": true, "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" } }, - "node_modules/@unrs/resolver-binding-wasm32-wasi/node_modules/@emnapi/wasi-threads": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", - "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", + "node_modules/@sindresorhus/merge-streams": { + "version": "4.0.0", "dev": true, "license": "MIT", - "optional": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "tslib": "^2.4.0" + "type-detect": "4.0.8" } }, - "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.12.2.tgz", - "integrity": "sha512-qzNyg3xL0VPQmCaUh+N5jSitce6k+uCBfMDesWRnlULOZaqUkaJ0ybdT+UqlAWJoQjuqfIU/0Ptx9bteN4D82g==", - "cpu": [ - "arm64" - ], + "node_modules/@sinonjs/fake-timers": { + "version": "15.4.0", "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.1" + } }, - "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.12.2.tgz", - "integrity": "sha512-WD9sY00OfpHVGfsnHZoA8jVT+esS/Bg8z8jzxp5BnDCjjwsuKsPQrzswwpFy4J1AUJbXPRfkpcX0mXrzeXW79g==", - "cpu": [ - "ia32" - ], + "node_modules/@swc/cli": { + "version": "0.8.1", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "win32" - ] + "dependencies": { + "@swc/counter": "^0.1.3", + "@xhmikosr/bin-wrapper": "^14.0.0", + "commander": "^8.3.0", + "minimatch": "^9.0.3", + "piscina": "^4.3.1", + "semver": "^7.3.8", + "slash": "3.0.0", + "source-map": "^0.7.3", + "tinyglobby": "^0.2.13" + }, + "bin": { + "spack": "bin/spack.js", + "swc": "bin/swc.js", + "swcx": "bin/swcx.js" + }, + "engines": { + "node": ">= 20.19.0" + }, + "peerDependencies": { + "@swc/core": "^1.2.66", + "chokidar": "^5.0.0" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } }, - "node_modules/@unrs/resolver-binding-win32-x64-msvc": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.12.2.tgz", - "integrity": "sha512-nAB74NfSNKknqQ1RrYj6uz8FcXEomu/MATJZxh/x+BArzN2U3JbOYC0APYzUIGhVY3m5hRxA8VPNdPBoG8txlA==", - "cpu": [ - "x64" - ], + "node_modules/@swc/cli/node_modules/commander": { + "version": "8.3.0", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "win32" - ] + "engines": { + "node": ">= 12" + } }, - "node_modules/@xhmikosr/archive-type": { - "version": "8.1.0", + "node_modules/@swc/cli/node_modules/source-map": { + "version": "0.7.6", "dev": true, - "license": "MIT", + "license": "BSD-3-Clause", + "engines": { + "node": ">= 12" + } + }, + "node_modules/@swc/core": { + "version": "1.15.43", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", "dependencies": { - "file-type": "^21.3.4" + "@swc/counter": "^0.1.3", + "@swc/types": "^0.1.27" }, "engines": { - "node": ">=20" + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.15.43", + "@swc/core-darwin-x64": "1.15.43", + "@swc/core-linux-arm-gnueabihf": "1.15.43", + "@swc/core-linux-arm64-gnu": "1.15.43", + "@swc/core-linux-arm64-musl": "1.15.43", + "@swc/core-linux-ppc64-gnu": "1.15.43", + "@swc/core-linux-s390x-gnu": "1.15.43", + "@swc/core-linux-x64-gnu": "1.15.43", + "@swc/core-linux-x64-musl": "1.15.43", + "@swc/core-win32-arm64-msvc": "1.15.43", + "@swc/core-win32-ia32-msvc": "1.15.43", + "@swc/core-win32-x64-msvc": "1.15.43" + }, + "peerDependencies": { + "@swc/helpers": ">=0.5.17" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } } }, - "node_modules/@xhmikosr/bin-check": { - "version": "8.2.2", + "node_modules/@swc/core-darwin-arm64": { + "version": "1.15.43", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-darwin-x64": { + "version": "1.15.43", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.15.43.tgz", + "integrity": "sha512-lp3d4Lamc8dt5huYdGLSR+9hLxmfr1jb0l+4XXG2zPqZwYWRN9R0U2qYoTrggiU2RWW0oV9VbWM3kBnqIc2kdQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "execa": "^9.6.1", - "isexe": "^4.0.0" - }, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=20" + "node": ">=10" } }, - "node_modules/@xhmikosr/bin-wrapper": { - "version": "14.4.0", + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.15.43", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.15.43.tgz", + "integrity": "sha512-JWTQQELtsG5GgphDrr/XqqmM2pDN3cZqbMS0Mrg+iTiXL3F74sn/S2IyYE/5u4h2KLkTf9qQ7dXyxsbx7YzkeA==", + "cpu": [ + "arm" + ], "dev": true, - "license": "MIT", - "dependencies": { - "@xhmikosr/bin-check": "^8.2.1", - "@xhmikosr/downloader": "^16.2.0", - "@xhmikosr/os-filter-obj": "^4.1.0", - "binary-version-check": "^6.1.0" - }, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=20" + "node": ">=10" } }, - "node_modules/@xhmikosr/decompress": { - "version": "11.1.3", + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.15.43", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.15.43.tgz", + "integrity": "sha512-B4otJRdPWIsmiSBf0uG7Z/+vMWmkufjz5MmYxubwKuZazDW14Zd3symga1N62QR4RT+kEFeHEgsXfZGyn/w0hw==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "@xhmikosr/decompress-tar": "^9.0.1", - "@xhmikosr/decompress-tarbz2": "^9.0.1", - "@xhmikosr/decompress-targz": "^9.0.1", - "@xhmikosr/decompress-unzip": "^8.1.1", - "graceful-fs": "^4.2.11", - "strip-dirs": "^3.0.0" - }, + "libc": [ + "glibc" + ], + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=20" + "node": ">=10" } }, - "node_modules/@xhmikosr/decompress-tar": { - "version": "9.0.1", + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.15.43", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.15.43.tgz", + "integrity": "sha512-6zB6OnpViBxYy4tgY3v2i6AZY9fwkcHZ032UOwtwUuW1d19sdT07qF0kZe6/3UR1tUaK6jjg2rmVcUIBCEYVjQ==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "file-type": "^21.3.0", - "is-stream": "^4.0.1", - "tar-stream": "3.1.7" - }, + "libc": [ + "musl" + ], + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=20" + "node": ">=10" } }, - "node_modules/@xhmikosr/decompress-tarbz2": { - "version": "9.0.2", + "node_modules/@swc/core-linux-ppc64-gnu": { + "version": "1.15.43", + "resolved": "https://registry.npmjs.org/@swc/core-linux-ppc64-gnu/-/core-linux-ppc64-gnu-1.15.43.tgz", + "integrity": "sha512-coxE1ZWdB3uSDVNoEtYNrRi/1epvckZx9cTJ8ICUxTMTxGk+yvQ/Twacp3ruZSaMPGCriUjP86C37VhaT6nyRg==", + "cpu": [ + "ppc64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "@xhmikosr/decompress-tar": "^9.0.1", - "file-type": "^21.3.4", - "is-stream": "^4.0.1", - "seek-bzip": "^2.0.0", - "unbzip2-stream": "^1.4.3" - }, + "libc": [ + "glibc" + ], + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=20" + "node": ">=10" } }, - "node_modules/@xhmikosr/decompress-targz": { - "version": "9.0.1", + "node_modules/@swc/core-linux-s390x-gnu": { + "version": "1.15.43", + "resolved": "https://registry.npmjs.org/@swc/core-linux-s390x-gnu/-/core-linux-s390x-gnu-1.15.43.tgz", + "integrity": "sha512-lXfLhs+LpBsD5inuYx+YDH5WsPPBQ95KPUiy8P5wq9ob9xKDZFqwNfU2QW6bGO8NqRO/H9JQomTSt5Yyh+FGfA==", + "cpu": [ + "s390x" + ], "dev": true, - "license": "MIT", - "dependencies": { - "@xhmikosr/decompress-tar": "^9.0.0", - "file-type": "^21.3.0", - "is-stream": "^4.0.1" - }, + "libc": [ + "glibc" + ], + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=20" + "node": ">=10" } }, - "node_modules/@xhmikosr/decompress-unzip": { - "version": "8.2.1", + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.15.43", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.15.43.tgz", + "integrity": "sha512-07XnKwTmKy8TGOZG3D9fRnLWGynxPjwQnZLVmBFbo6F+7vHYzBIOuwXEhemrChBWb6yDNZsVCcMWCPX6FDD2xg==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "file-type": "^21.3.4", - "get-stream": "^9.0.1", - "yauzl": "^3.4.0" - }, + "libc": [ + "glibc" + ], + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=20" + "node": ">=10" } }, - "node_modules/@xhmikosr/downloader": { - "version": "16.2.0", + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.15.43", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.15.43.tgz", + "integrity": "sha512-TJc+bsSIaBh+hZvZ5GRtW/K1bw66TJ9vsUwvVIsZdiWxU5ObLwZvfcnZ3UpgVfMnFibRes9uriJrQNBHEEogRQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "@xhmikosr/archive-type": "^8.0.1", - "@xhmikosr/decompress": "^11.1.3", - "content-disposition": "^2.0.1", - "ext-name": "^5.0.0", - "file-type": "^21.3.4", - "filenamify": "^7.0.1", - "got": "^14.6.6" - }, + "libc": [ + "musl" + ], + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=20" + "node": ">=10" } }, - "node_modules/@xhmikosr/os-filter-obj": { - "version": "4.1.0", + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.15.43", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.15.43.tgz", + "integrity": "sha512-jfd7s2/bUQYkOHLs+LWQNKZdmDa8+sufKLllhpWAhVQ2GDCwsHe3vR/j+OSiItZNtkzFuaawa3+SAKz9y5gYfw==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "system-architecture": "^1.0.0" - }, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=20" + "node": ">=10" } }, - "node_modules/accepts": { - "version": "1.3.8", + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.15.43", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.15.43.tgz", + "integrity": "sha512-rLAE8JvucqEW1ZGohxPQrQWPBQeJG4+ypKbWfdlU/qmKScvCkxf9/Jxnzki1dkUQCQ7P5Enp13RlvqOlvx/32g==", + "cpu": [ + "ia32" + ], "dev": true, - "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">= 0.6" + "node": ">=10" } }, - "node_modules/acorn": { - "version": "8.17.0", + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.15.43", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.15.43.tgz", + "integrity": "sha512-h8MLDHZcfIukwQWj03rIJZx1I0E81AYj2X7J/nGErG4nz+QAv6G1Z+peotvinL3lqpbo32tLYSMFo32/ySzxKg==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=0.4.0" + "node": ">=10" } }, - "node_modules/acorn-jsx": { - "version": "5.3.2", + "node_modules/@swc/counter": { + "version": "0.1.3", "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } + "license": "Apache-2.0" }, - "node_modules/acorn-walk": { - "version": "8.3.5", - "dev": true, - "license": "MIT", + "node_modules/@swc/helpers": { + "version": "0.5.23", + "devOptional": true, + "license": "Apache-2.0", "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" + "tslib": "^2.8.0" } }, - "node_modules/adm-zip": { - "version": "0.5.10", + "node_modules/@swc/jest": { + "version": "0.2.39", "dev": true, "license": "MIT", + "dependencies": { + "@jest/create-cache-key-function": "^30.0.0", + "@swc/counter": "^0.1.3", + "jsonc-parser": "^3.2.0" + }, "engines": { - "node": ">=6.0" + "npm": ">= 7.0.0" + }, + "peerDependencies": { + "@swc/core": "*" } }, - "node_modules/agent-base": { - "version": "7.1.4", + "node_modules/@swc/types": { + "version": "0.1.27", "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14" + "license": "Apache-2.0", + "dependencies": { + "@swc/counter": "^0.1.3" } }, - "node_modules/ajv": { - "version": "6.15.0", - "dev": true, + "node_modules/@tanstack/hotkeys": { + "version": "0.8.0", "license": "MIT", "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "@tanstack/store": "^0.11.0" + }, + "engines": { + "node": ">=18" }, "funding": { "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "url": "https://github.com/sponsors/tannerlinsley" } }, - "node_modules/ajv-formats": { - "version": "2.1.1", + "node_modules/@tanstack/match-sorter-utils": { + "version": "8.19.4", "license": "MIT", "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" + "remove-accents": "0.5.0" }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "node_modules/ajv-formats/node_modules/ajv": { - "version": "8.20.0", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" + "engines": { + "node": ">=12" }, "funding": { "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-formats/node_modules/json-schema-traverse": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/ansi_up": { - "version": "6.0.6", - "license": "MIT", - "engines": { - "node": "*" + "url": "https://github.com/sponsors/tannerlinsley" } }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "dev": true, + "node_modules/@tanstack/query-core": { + "version": "4.44.0", "license": "MIT", - "engines": { - "node": ">=6" + "peer": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" } }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "dev": true, + "node_modules/@tanstack/react-hotkeys": { + "version": "0.9.1", "license": "MIT", "dependencies": { - "type-fest": "^0.21.3" + "@tanstack/hotkeys": "0.7.1", + "@tanstack/react-store": "^0.9.3" }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" } }, - "node_modules/ansi-escapes/node_modules/type-fest": { - "version": "0.21.3", - "dev": true, - "license": "(MIT OR CC0-1.0)", + "node_modules/@tanstack/react-hotkeys/node_modules/@tanstack/hotkeys": { + "version": "0.7.1", + "license": "MIT", + "dependencies": { + "@tanstack/store": "^0.9.3" + }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" } }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, + "node_modules/@tanstack/react-hotkeys/node_modules/@tanstack/store": { + "version": "0.9.3", "license": "MIT", - "engines": { - "node": ">=8" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" } }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, + "node_modules/@tanstack/react-query": { + "version": "4.44.0", "license": "MIT", + "peer": true, "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" + "@tanstack/query-core": "4.44.0", + "use-sync-external-store": "^1.6.0" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" }, - "engines": { - "node": ">= 8" + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-native": "*" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + } } }, - "node_modules/anymatch/node_modules/picomatch": { - "version": "2.3.2", - "dev": true, + "node_modules/@tanstack/react-store": { + "version": "0.9.3", "license": "MIT", - "engines": { - "node": ">=8.6" + "dependencies": { + "@tanstack/store": "0.9.3", + "use-sync-external-store": "^1.6.0" }, "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, - "node_modules/arg": { - "version": "4.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/aria-query": { - "version": "5.3.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "dequal": "^2.0.3" + "node_modules/@tanstack/react-store/node_modules/@tanstack/store": { + "version": "0.9.3", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" } }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.2", - "dev": true, + "node_modules/@tanstack/react-table": { + "version": "8.21.3", "license": "MIT", "dependencies": { - "call-bound": "^1.0.3", - "is-array-buffer": "^3.0.5" + "@tanstack/table-core": "8.21.3" }, "engines": { - "node": ">= 0.4" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" } }, - "node_modules/array-flatten": { - "version": "1.1.1", - "dev": true, - "license": "MIT" - }, - "node_modules/array-includes": { - "version": "3.1.9", - "dev": true, + "node_modules/@tanstack/store": { + "version": "0.11.0", "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.24.0", - "es-object-atoms": "^1.1.1", - "get-intrinsic": "^1.3.0", - "is-string": "^1.1.1", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" } }, - "node_modules/array.prototype.findlast": { - "version": "1.2.5", - "dev": true, + "node_modules/@tanstack/table-core": { + "version": "8.21.3", "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-shim-unscopables": "^1.0.2" - }, "engines": { - "node": ">= 0.4" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" } }, - "node_modules/array.prototype.findlastindex": { - "version": "1.2.6", + "node_modules/@testing-library/dom": { + "version": "10.4.1", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "es-shim-unscopables": "^1.1.0" + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^5.0.1", + "aria-query": "5.3.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.5.0", + "picocolors": "1.1.1", + "pretty-format": "^27.0.2" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=18" } }, - "node_modules/array.prototype.flat": { - "version": "1.3.3", + "node_modules/@testing-library/jest-dom": { + "version": "6.9.1", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" + "@adobe/css-tools": "^4.4.0", + "aria-query": "^5.0.0", + "css.escape": "^1.5.1", + "dom-accessibility-api": "^0.6.3", + "picocolors": "^1.1.1", + "redent": "^3.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=14", + "npm": ">=6", + "yarn": ">=1" } }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.3", + "node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api": { + "version": "0.6.3", + "dev": true, + "license": "MIT" + }, + "node_modules/@testing-library/react": { + "version": "16.3.2", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" + "@babel/runtime": "^7.12.5" }, "engines": { - "node": ">= 0.4" + "node": ">=18" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "peerDependencies": { + "@testing-library/dom": "^10.0.0", + "@types/react": "^18.0.0 || ^19.0.0", + "@types/react-dom": "^18.0.0 || ^19.0.0", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } } }, - "node_modules/array.prototype.tosorted": { - "version": "1.1.4", + "node_modules/@testing-library/user-event": { + "version": "13.5.0", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3", - "es-errors": "^1.3.0", - "es-shim-unscopables": "^1.0.2" + "@babel/runtime": "^7.12.5" }, "engines": { - "node": ">= 0.4" + "node": ">=10", + "npm": ">=6" + }, + "peerDependencies": { + "@testing-library/dom": ">=7.21.4" } }, - "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.4", + "node_modules/@tokenizer/inflate": { + "version": "0.4.1", "dev": true, "license": "MIT", "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "is-array-buffer": "^3.0.4" + "debug": "^4.4.3", + "token-types": "^6.1.1" }, "engines": { - "node": ">= 0.4" + "node": ">=18" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "github", + "url": "https://github.com/sponsors/Borewit" } }, - "node_modules/ast-types-flow": { - "version": "0.0.8", + "node_modules/@tokenizer/token": { + "version": "0.3.0", "dev": true, "license": "MIT" }, - "node_modules/async-function": { - "version": "1.0.0", + "node_modules/@tsconfig/node10": { + "version": "1.0.12", "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } + "license": "MIT" }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "dev": true, + "license": "MIT" + }, + "node_modules/@turbo/darwin-64": { + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/@turbo/darwin-64/-/darwin-64-2.10.2.tgz", + "integrity": "sha512-wBM3ObqOWnKUDmg7QfUFDkDHPFUAJmrYlYqmEM8jMPAPA/I6wRJIbWimeQUqhOiQ8xPKhzyWM+xaiUP0wz8FEQ==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "optional": true, + "os": [ + "darwin" + ] }, - "node_modules/axe-core": { - "version": "4.12.1", + "node_modules/@turbo/darwin-arm64": { + "version": "2.10.2", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MPL-2.0", - "engines": { - "node": ">=4" - } + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] }, - "node_modules/axobject-query": { - "version": "4.1.0", + "node_modules/@turbo/linux-64": { + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/@turbo/linux-64/-/linux-64-2.10.2.tgz", + "integrity": "sha512-mMsf5IIhiKuceEXNstd25IbadjBXZ0amxzFOqliEzJX6HyeeHdBQPVSY583PWqYDyqM/FB8d5ZjkthfBSeuH3Q==", + "cpu": [ + "x64" + ], "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" - } + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/babel-jest": { - "version": "30.4.1", + "node_modules/@turbo/linux-arm64": { + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/@turbo/linux-arm64/-/linux-arm64-2.10.2.tgz", + "integrity": "sha512-Wcng1i2kaKmXutmwxT9MUoYZvdaIekXAdlGr4+0TpgbhGLw7nDuEcRBFrxb5BbRoX1d1q8SpdRxLc45TvDZIdQ==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@jest/transform": "30.4.1", - "@types/babel__core": "^7.20.5", - "babel-plugin-istanbul": "^7.0.1", - "babel-preset-jest": "30.4.0", - "chalk": "^4.1.2", - "graceful-fs": "^4.2.11", - "slash": "^3.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.11.0 || ^8.0.0-0" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/babel-plugin-istanbul": { - "version": "7.0.1", + "node_modules/@turbo/windows-64": { + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/@turbo/windows-64/-/windows-64-2.10.2.tgz", + "integrity": "sha512-SsNhM7Ho7EpAdwtrJKBOic9Hso23vu6Dp0gAfLOvUFjPzurr/sGQlXZEvr6z89ne4RDOypTwz5CBDrixpMKtXw==", + "cpu": [ + "x64" + ], "dev": true, - "license": "BSD-3-Clause", - "workspaces": [ - "test/babel-8" + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@turbo/windows-arm64": { + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/@turbo/windows-arm64/-/windows-arm64-2.10.2.tgz", + "integrity": "sha512-Gf+S7ICAdimT/n02bOuVWKvhHnct/HYjZg3oBNIz5hZ9ZyWHbQim9J3P5Qip8WpX0ksxF7eaBVziJCuLnjhqDg==", + "cpu": [ + "arm64" ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.3", + "license": "MIT", + "optional": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.3", - "istanbul-lib-instrument": "^6.0.2", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=12" + "tslib": "^2.4.0" } }, - "node_modules/babel-plugin-jest-hoist": { - "version": "30.4.0", + "node_modules/@types/aria-query": { + "version": "5.0.4", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", "dev": true, "license": "MIT", "dependencies": { - "@types/babel__core": "^7.20.5" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" } }, - "node_modules/babel-plugin-macros": { - "version": "3.1.0", + "node_modules/@types/babel__template": { + "version": "7.4.4", + "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "@babel/runtime": "^7.12.5", - "cosmiconfig": "^7.0.0", - "resolve": "^1.19.0" - }, - "engines": { - "node": ">=10", - "npm": ">=6" + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" } }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.2.0", + "node_modules/@types/babel__traverse": { + "version": "7.28.0", "dev": true, "license": "MIT", "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-import-attributes": "^7.24.7", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5" - }, - "peerDependencies": { - "@babel/core": "^7.0.0 || ^8.0.0-0" + "@babel/types": "^7.28.2" } }, - "node_modules/babel-preset-jest": { - "version": "30.4.0", + "node_modules/@types/body-parser": { + "version": "1.19.6", "dev": true, "license": "MIT", "dependencies": { - "babel-plugin-jest-hoist": "30.4.0", - "babel-preset-current-node-syntax": "^1.2.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.11.0 || ^8.0.0-beta.1" + "@types/connect": "*", + "@types/node": "*" } }, - "node_modules/balanced-match": { - "version": "1.0.2", + "node_modules/@types/chroma-js": { + "version": "3.1.2", "dev": true, "license": "MIT" }, - "node_modules/bare-events": { - "version": "2.9.1", - "dev": true, - "license": "Apache-2.0", - "peerDependencies": { - "bare-abort-controller": "*" - }, - "peerDependenciesMeta": { - "bare-abort-controller": { - "optional": true - } - } - }, - "node_modules/base64-js": { - "version": "1.5.1", + "node_modules/@types/color-hash": { + "version": "2.0.0", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], "license": "MIT" }, - "node_modules/baseline-browser-mapping": { - "version": "2.10.40", + "node_modules/@types/connect": { + "version": "3.4.38", "dev": true, - "license": "Apache-2.0", - "bin": { - "baseline-browser-mapping": "dist/cli.cjs" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/bignumber.js": { - "version": "9.3.1", "license": "MIT", - "engines": { - "node": "*" + "dependencies": { + "@types/node": "*" } }, - "node_modules/binary-version": { - "version": "7.1.0", + "node_modules/@types/express": { + "version": "5.0.6", "dev": true, "license": "MIT", "dependencies": { - "execa": "^8.0.1", - "find-versions": "^6.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "@types/body-parser": "*", + "@types/express-serve-static-core": "^5.0.0", + "@types/serve-static": "^2" } }, - "node_modules/binary-version-check": { - "version": "6.1.0", + "node_modules/@types/express-serve-static-core": { + "version": "5.1.1", "dev": true, "license": "MIT", "dependencies": { - "binary-version": "^7.1.0", - "semver": "^7.6.0", - "semver-truncate": "^3.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" } }, - "node_modules/binary-version/node_modules/execa": { - "version": "8.0.1", + "node_modules/@types/http-cache-semantics": { + "version": "4.2.0", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/http-errors": { + "version": "2.0.5", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", "dev": true, "license": "MIT", "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^8.0.1", - "human-signals": "^5.0.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^3.0.0" - }, - "engines": { - "node": ">=16.17" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" + "@types/istanbul-lib-coverage": "*" } }, - "node_modules/binary-version/node_modules/get-stream": { - "version": "8.0.1", + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", "dev": true, "license": "MIT", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "dependencies": { + "@types/istanbul-lib-report": "*" } }, - "node_modules/binary-version/node_modules/human-signals": { - "version": "5.0.0", + "node_modules/@types/jest": { + "version": "30.0.0", "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=16.17.0" + "license": "MIT", + "dependencies": { + "expect": "^30.0.0", + "pretty-format": "^30.0.0" } }, - "node_modules/binary-version/node_modules/is-stream": { - "version": "3.0.0", + "node_modules/@types/jest/node_modules/ansi-styles": { + "version": "5.2.0", "dev": true, "license": "MIT", "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/binary-version/node_modules/npm-run-path": { - "version": "5.3.0", + "node_modules/@types/jest/node_modules/pretty-format": { + "version": "30.4.1", "dev": true, "license": "MIT", "dependencies": { - "path-key": "^4.0.0" + "@jest/schemas": "30.4.1", + "ansi-styles": "^5.2.0", + "react-is-18": "npm:react-is@^18.3.1", + "react-is-19": "npm:react-is@^19.2.5" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/binary-version/node_modules/path-key": { - "version": "4.0.0", + "node_modules/@types/jsdom": { + "version": "21.1.7", "dev": true, "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "dependencies": { + "@types/node": "*", + "@types/tough-cookie": "*", + "parse5": "^7.0.0" } }, - "node_modules/binary-version/node_modules/strip-final-newline": { - "version": "3.0.0", + "node_modules/@types/json-schema": { + "version": "7.0.15", + "license": "MIT" + }, + "node_modules/@types/lodash": { + "version": "4.17.24", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "26.1.0", "dev": true, "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "dependencies": { + "undici-types": "~8.3.0" } }, - "node_modules/bind-event-listener": { - "version": "3.0.0", + "node_modules/@types/parse-json": { + "version": "4.0.2", + "license": "MIT", + "peer": true + }, + "node_modules/@types/prop-types": { + "version": "15.7.15", "license": "MIT" }, - "node_modules/body-parser": { - "version": "1.20.5", + "node_modules/@types/qs": { + "version": "6.15.1", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", "dev": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "18.3.31", "license": "MIT", + "peer": true, "dependencies": { - "bytes": "~3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "~1.2.0", - "http-errors": "~2.0.1", - "iconv-lite": "~0.4.24", - "on-finished": "~2.4.1", - "qs": "~6.15.1", - "raw-body": "~2.5.3", - "type-is": "~1.6.18", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" + "@types/prop-types": "*", + "csstype": "^3.2.2" } }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "dev": true, + "node_modules/@types/react-dom": { + "version": "18.3.7", "license": "MIT", - "dependencies": { - "ms": "2.0.0" + "peer": true, + "peerDependencies": { + "@types/react": "^18.0.0" } }, - "node_modules/body-parser/node_modules/iconv-lite": { - "version": "0.4.24", - "dev": true, + "node_modules/@types/react-transition-group": { + "version": "4.4.12", "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" + "peerDependencies": { + "@types/react": "*" } }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", + "node_modules/@types/semver": { + "version": "7.5.8", "dev": true, "license": "MIT" }, - "node_modules/brace-expansion": { - "version": "2.1.1", + "node_modules/@types/send": { + "version": "1.2.1", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" + "@types/node": "*" } }, - "node_modules/browserslist": { - "version": "4.28.4", + "node_modules/@types/serve-static": { + "version": "2.2.0", "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], "license": "MIT", "dependencies": { - "baseline-browser-mapping": "^2.10.38", - "caniuse-lite": "^1.0.30001799", - "electron-to-chromium": "^1.5.376", - "node-releases": "^2.0.48", - "update-browserslist-db": "^1.2.3" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + "@types/http-errors": "*", + "@types/node": "*" } }, - "node_modules/bser": { - "version": "2.1.1", + "node_modules/@types/stack-utils": { + "version": "2.0.3", "dev": true, - "license": "Apache-2.0", - "dependencies": { - "node-int64": "^0.4.0" - } + "license": "MIT" }, - "node_modules/buffer": { - "version": "5.7.1", + "node_modules/@types/tough-cookie": { + "version": "4.0.5", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "license": "MIT", + "optional": true + }, + "node_modules/@types/yargs": { + "version": "17.0.35", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], "license": "MIT", "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "@types/yargs-parser": "*" } }, - "node_modules/buffer-from": { - "version": "1.1.2", + "node_modules/@types/yargs-parser": { + "version": "21.0.3", "dev": true, "license": "MIT" }, - "node_modules/byte-counter": { - "version": "0.1.0", - "dev": true, + "node_modules/@uiw/codemirror-extensions-basic-setup": { + "version": "4.25.10", "license": "MIT", - "engines": { - "node": ">=20" + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/commands": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/lint": "^6.0.0", + "@codemirror/search": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://jaywcjlove.github.io/#/sponsor" + }, + "peerDependencies": { + "@codemirror/autocomplete": ">=6.0.0", + "@codemirror/commands": ">=6.0.0", + "@codemirror/language": ">=6.0.0", + "@codemirror/lint": ">=6.0.0", + "@codemirror/search": ">=6.0.0", + "@codemirror/state": ">=6.0.0", + "@codemirror/view": ">=6.0.0" } }, - "node_modules/bytes": { - "version": "3.1.2", - "dev": true, + "node_modules/@uiw/react-codemirror": { + "version": "4.25.10", "license": "MIT", - "engines": { - "node": ">= 0.8" + "dependencies": { + "@babel/runtime": "^7.18.6", + "@codemirror/commands": "^6.1.0", + "@codemirror/state": "^6.1.1", + "@codemirror/theme-one-dark": "^6.0.0", + "@uiw/codemirror-extensions-basic-setup": "4.25.10", + "codemirror": "^6.0.0" + }, + "funding": { + "url": "https://jaywcjlove.github.io/#/sponsor" + }, + "peerDependencies": { + "@babel/runtime": ">=7.11.0", + "@codemirror/state": ">=6.0.0", + "@codemirror/theme-one-dark": ">=6.0.0", + "@codemirror/view": ">=6.0.0", + "codemirror": ">=6.0.0", + "react": ">=17.0.0", + "react-dom": ">=17.0.0" } }, - "node_modules/cacheable-lookup": { - "version": "7.0.0", + "node_modules/@ungap/structured-clone": { + "version": "1.3.2", + "dev": true, + "license": "ISC" + }, + "node_modules/@unrs/resolver-binding-android-arm-eabi": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.12.2.tgz", + "integrity": "sha512-g5T90pqg1bo/7mytQx6F4iBNC0Wsh9cu+z9veDbFjc7HjpesJFWD7QMS0NGStXM075+7dJPPVvBbpZlnrdpi/w==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", - "engines": { - "node": ">=14.16" - } + "optional": true, + "os": [ + "android" + ] }, - "node_modules/cacheable-request": { - "version": "13.0.19", + "node_modules/@unrs/resolver-binding-android-arm64": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.12.2.tgz", + "integrity": "sha512-YGCRZv/9GLhwmz6mYDeTsm/92BAyR28l6c2ReweVW5pWgfsitWLY8upvfRlGdoyD8HjeTHSYJWyZGD4KJA/nFQ==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@types/http-cache-semantics": "^4.2.0", - "get-stream": "^9.0.1", - "http-cache-semantics": "^4.2.0", - "keyv": "^5.6.0", - "mimic-response": "^4.0.0", - "normalize-url": "^8.1.1", - "responselike": "^4.0.2" - }, - "engines": { - "node": ">=18" - } + "optional": true, + "os": [ + "android" + ] }, - "node_modules/cacheable-request/node_modules/keyv": { - "version": "5.6.0", + "node_modules/@unrs/resolver-binding-darwin-arm64": { + "version": "1.12.2", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@keyv/serialize": "^1.1.1" - } + "optional": true, + "os": [ + "darwin" + ] }, - "node_modules/call-bind": { - "version": "1.0.9", + "node_modules/@unrs/resolver-binding-darwin-x64": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.12.2.tgz", + "integrity": "sha512-f7rPLi/T1HVKZu/u6t87lroib16n8vrSzcyxI7lg4BGO9UF26KhQL44sd9eOUgrTYhvRXtWOIZT5PejdPyJfUA==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "get-intrinsic": "^1.3.0", - "set-function-length": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "optional": true, + "os": [ + "darwin" + ] }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", + "node_modules/@unrs/resolver-binding-freebsd-x64": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.12.2.tgz", + "integrity": "sha512-BpcOjWCJub6nRZUS2zA20pmLvjtqAtGejETaIyRLiZiQf++cbrjltLA5NN/xaXfqeOBOSlMFbemIl5/S5tljmg==", + "cpu": [ + "x64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } + "optional": true, + "os": [ + "freebsd" + ] }, - "node_modules/call-bound": { - "version": "1.0.4", + "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.12.2.tgz", + "integrity": "sha512-vZTDvdSISZjJx66OzJqtsOhzifbqRjbmI1Mnu49fQDwog5GtDI4QidRiEAYbZCRj9C8YZEW+3ZjqsyS9GR4k2A==", + "cpu": [ + "arm" + ], + "dev": true, "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "get-intrinsic": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/callsites": { - "version": "3.1.0", + "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.12.2.tgz", + "integrity": "sha512-BiPI+IrIlwcW4nLLMM21+B1dFPzd55yAVgVGrdgDjNef+ch03GdxrcyaIz8X9SsQirh/kCQ7mviyWlMxdh2D7g==", + "cpu": [ + "arm" + ], + "dev": true, "license": "MIT", - "engines": { - "node": ">=6" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/camelcase": { - "version": "5.3.1", + "node_modules/@unrs/resolver-binding-linux-arm64-gnu": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.12.2.tgz", + "integrity": "sha512-zJc0H99FEPoFfSrNpa91HYfxzfAJCr502oxNK1cfdC9hlaFI43RT+JFCann9JUgZmLzzntChHyn13Sgn9ljHNg==", + "cpu": [ + "arm64" + ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", - "engines": { - "node": ">=6" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/caniuse-lite": { - "version": "1.0.30001800", + "node_modules/@unrs/resolver-binding-linux-arm64-musl": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.12.2.tgz", + "integrity": "sha512-KQ3Lki6l+Pz1k/eBipN41ES+YUK30beLGb9YqcB1O542cyLCNE6GaxrfcY3T6EezmGGk84wb5XyO9loTM9tkcA==", + "cpu": [ + "arm64" + ], "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } + "libc": [ + "musl" ], - "license": "CC-BY-4.0" + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/chalk": { - "version": "4.1.2", + "node_modules/@unrs/resolver-binding-linux-loong64-gnu": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-gnu/-/resolver-binding-linux-loong64-gnu-1.12.2.tgz", + "integrity": "sha512-3SJGEh1DborhG6pyxvhPzCT4bbSIVihsvgJc13P1bHG7KLdNDaF9T3gsTwFc7Jw/5Y5/iWOjkEx7Zy0NvCGX3Q==", + "cpu": [ + "loong64" + ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/char-regex": { - "version": "1.0.2", + "node_modules/@unrs/resolver-binding-linux-loong64-musl": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-musl/-/resolver-binding-linux-loong64-musl-1.12.2.tgz", + "integrity": "sha512-jiuG/Obbel7uw1PwHNFfrkiKhLAF6mnyZ6aWlOAVN9WqKm8v0OFGnciJIHu8+CMvXLQ8AD51LPzAoUfT21D5Ew==", + "cpu": [ + "loong64" + ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/chroma-js": { - "version": "3.2.0", - "license": "(BSD-3-Clause AND Apache-2.0)" + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/ci-info": { - "version": "4.4.0", + "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.12.2.tgz", + "integrity": "sha512-q7xRvVpmcfeL+LlZg8Pbbo6QaTZwDU5BaGZbwfhkEsXJn3Was8xYfE0RBH266xZt0rM6B7i8xAYIvjthuUIWHg==", + "cpu": [ + "ppc64" + ], "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } + "libc": [ + "glibc" ], "license": "MIT", - "engines": { - "node": ">=8" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/cjs-module-lexer": { - "version": "2.2.0", + "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.12.2.tgz", + "integrity": "sha512-0CVdx6lcnT3Q9inOH8tsMIOJ6ImndllMjqJHg8RLVdB7Vq4SfkEXl9mCSsVNuNA4MCYycRicCUxPCabVHJRr6A==", + "cpu": [ + "riscv64" + ], "dev": true, - "license": "MIT" + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/cliui": { - "version": "9.0.1", + "node_modules/@unrs/resolver-binding-linux-riscv64-musl": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.12.2.tgz", + "integrity": "sha512-iOwlRo9vnp6R6ohHQS11n0NnfdXx/omhkocmIfaPRpQhKZ+3BDMkkdRVh53qjkFkpPddf+FETA28NwGN7l5l+w==", + "cpu": [ + "riscv64" + ], "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^7.2.0", - "strip-ansi": "^7.1.0", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=20" - } + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "6.2.2", + "node_modules/@unrs/resolver-binding-linux-s390x-gnu": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.12.2.tgz", + "integrity": "sha512-HYJtLfXq94q8iZNFT1lknx258wlkkWhZeUXJRqzKBBUJ00CvZ+N33zgbCqimLjsyw5Va6uUxhVa12mI+kaveEw==", + "cpu": [ + "s390x" + ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/cliui/node_modules/ansi-styles": { - "version": "6.2.3", + "node_modules/@unrs/resolver-binding-linux-x64-gnu": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.12.2.tgz", + "integrity": "sha512-mPsUhunKKDih5O96Y6enDQyHc1SqBPlY1E/SfMWDM3EdJ95Z9CArPeCVwCCqbP45ljvivdEk8Fxn+SIb1rDAJQ==", + "cpu": [ + "x64" + ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/cliui/node_modules/emoji-regex": { - "version": "10.6.0", + "node_modules/@unrs/resolver-binding-linux-x64-musl": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.12.2.tgz", + "integrity": "sha512-azrt6+5ydLd8Vt210AAFis/lZevSfPw93EJRIJG+xPu4WCJ8K0kppCTpMyLPcKT7H15M4Jnt2tMp5bOvCkRC6A==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT" + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/cliui/node_modules/string-width": { - "version": "7.2.0", + "node_modules/@unrs/resolver-binding-openharmony-arm64": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-openharmony-arm64/-/resolver-binding-openharmony-arm64-1.12.2.tgz", + "integrity": "sha512-YZ9hP4O0X9PQb8eO980qmLNGH4zT3I9+SZTdt0Pr0YyuGQhYKoOZkV02VzrzyOZJ5xIJ3UFIenKkUkGg8GjgWQ==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "optional": true, + "os": [ + "openharmony" + ] }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "7.2.0", + "node_modules/@unrs/resolver-binding-wasm32-wasi": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.12.2.tgz", + "integrity": "sha512-tYFDIkMxSflfEc/h92ZWNsZlHSwgimbNHSO3PL2JWQHfCuC2q316jMyYU9TIWZsFK2bQwyK5VAdYgn8ygPj69A==", + "cpu": [ + "wasm32" + ], "dev": true, "license": "MIT", + "optional": true, "dependencies": { - "ansi-regex": "^6.2.2" + "@emnapi/core": "1.10.0", + "@emnapi/runtime": "1.10.0", + "@napi-rs/wasm-runtime": "^1.1.4" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "node": ">=14.0.0" } }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "9.0.2", + "node_modules/@unrs/resolver-binding-wasm32-wasi/node_modules/@emnapi/core": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", + "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", "dev": true, "license": "MIT", + "optional": true, "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/clsx": { - "version": "2.1.1", - "license": "MIT", - "engines": { - "node": ">=6" + "@emnapi/wasi-threads": "1.2.1", + "tslib": "^2.4.0" } }, - "node_modules/co": { - "version": "4.6.0", + "node_modules/@unrs/resolver-binding-wasm32-wasi/node_modules/@emnapi/runtime": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", + "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", "dev": true, "license": "MIT", - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "node_modules/codemirror": { - "version": "6.0.2", - "license": "MIT", + "optional": true, "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/commands": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/lint": "^6.0.0", - "@codemirror/search": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0" + "tslib": "^2.4.0" } }, - "node_modules/collect-v8-coverage": { - "version": "1.0.3", - "dev": true, - "license": "MIT" - }, - "node_modules/color-convert": { - "version": "2.0.1", + "node_modules/@unrs/resolver-binding-wasm32-wasi/node_modules/@emnapi/wasi-threads": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", + "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", "dev": true, "license": "MIT", + "optional": true, "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" + "tslib": "^2.4.0" } }, - "node_modules/color-hash": { - "version": "2.0.2", - "license": "MIT" - }, - "node_modules/color-name": { - "version": "1.1.4", + "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.12.2.tgz", + "integrity": "sha512-qzNyg3xL0VPQmCaUh+N5jSitce6k+uCBfMDesWRnlULOZaqUkaJ0ybdT+UqlAWJoQjuqfIU/0Ptx9bteN4D82g==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT" - }, - "node_modules/commander": { - "version": "11.1.0", - "license": "MIT", - "engines": { - "node": ">=16" - } - }, - "node_modules/complex.js": { - "version": "2.4.3", "license": "MIT", - "engines": { - "node": "*" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/rawify" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" + "optional": true, + "os": [ + "win32" + ] }, - "node_modules/concurrently": { - "version": "10.0.3", + "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.12.2.tgz", + "integrity": "sha512-WD9sY00OfpHVGfsnHZoA8jVT+esS/Bg8z8jzxp5BnDCjjwsuKsPQrzswwpFy4J1AUJbXPRfkpcX0mXrzeXW79g==", + "cpu": [ + "ia32" + ], "dev": true, "license": "MIT", - "dependencies": { - "chalk": "5.6.2", - "rxjs": "7.8.2", - "shell-quote": "1.8.4", - "supports-color": "10.2.2", - "tree-kill": "1.2.2", - "yargs": "18.0.0" - }, - "bin": { - "conc": "dist/bin/index.js", - "concurrently": "dist/bin/index.js" - }, - "engines": { - "node": ">=22" - }, - "funding": { - "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" - } + "optional": true, + "os": [ + "win32" + ] }, - "node_modules/concurrently/node_modules/chalk": { - "version": "5.6.2", + "node_modules/@unrs/resolver-binding-win32-x64-msvc": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.12.2.tgz", + "integrity": "sha512-nAB74NfSNKknqQ1RrYj6uz8FcXEomu/MATJZxh/x+BArzN2U3JbOYC0APYzUIGhVY3m5hRxA8VPNdPBoG8txlA==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } + "optional": true, + "os": [ + "win32" + ] }, - "node_modules/concurrently/node_modules/supports-color": { - "version": "10.2.2", + "node_modules/@xhmikosr/archive-type": { + "version": "8.1.0", "dev": true, "license": "MIT", - "engines": { - "node": ">=18" + "dependencies": { + "file-type": "^21.3.4" }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "engines": { + "node": ">=20" } }, - "node_modules/content-disposition": { - "version": "2.0.1", + "node_modules/@xhmikosr/bin-check": { + "version": "8.2.2", "dev": true, "license": "MIT", - "engines": { - "node": ">=18" + "dependencies": { + "execa": "^9.6.1", + "isexe": "^4.0.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" + "engines": { + "node": ">=20" } }, - "node_modules/content-type": { - "version": "1.0.5", + "node_modules/@xhmikosr/bin-wrapper": { + "version": "14.4.0", "dev": true, "license": "MIT", + "dependencies": { + "@xhmikosr/bin-check": "^8.2.1", + "@xhmikosr/downloader": "^16.2.0", + "@xhmikosr/os-filter-obj": "^4.1.0", + "binary-version-check": "^6.1.0" + }, "engines": { - "node": ">= 0.6" + "node": ">=20" } }, - "node_modules/convert-hrtime": { - "version": "5.0.0", + "node_modules/@xhmikosr/decompress": { + "version": "11.1.3", "dev": true, "license": "MIT", - "engines": { - "node": ">=12" + "dependencies": { + "@xhmikosr/decompress-tar": "^9.0.1", + "@xhmikosr/decompress-tarbz2": "^9.0.1", + "@xhmikosr/decompress-targz": "^9.0.1", + "@xhmikosr/decompress-unzip": "^8.1.1", + "graceful-fs": "^4.2.11", + "strip-dirs": "^3.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=20" } }, - "node_modules/convert-source-map": { - "version": "1.9.0", - "license": "MIT", - "peer": true - }, - "node_modules/cookie": { - "version": "0.7.2", + "node_modules/@xhmikosr/decompress-tar": { + "version": "9.0.1", "dev": true, "license": "MIT", + "dependencies": { + "file-type": "^21.3.0", + "is-stream": "^4.0.1", + "tar-stream": "3.1.7" + }, "engines": { - "node": ">= 0.6" + "node": ">=20" } }, - "node_modules/cookie-signature": { - "version": "1.0.7", - "dev": true, - "license": "MIT" - }, - "node_modules/core-js": { - "version": "3.47.0", + "node_modules/@xhmikosr/decompress-tarbz2": { + "version": "9.0.2", "dev": true, - "hasInstallScript": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/cosmiconfig": { - "version": "7.1.0", "license": "MIT", - "peer": true, "dependencies": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" + "@xhmikosr/decompress-tar": "^9.0.1", + "file-type": "^21.3.4", + "is-stream": "^4.0.1", + "seek-bzip": "^2.0.0", + "unbzip2-stream": "^1.4.3" }, "engines": { - "node": ">=10" + "node": ">=20" } }, - "node_modules/cosmiconfig/node_modules/yaml": { - "version": "1.10.3", - "license": "ISC", - "peer": true, + "node_modules/@xhmikosr/decompress-targz": { + "version": "9.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@xhmikosr/decompress-tar": "^9.0.0", + "file-type": "^21.3.0", + "is-stream": "^4.0.1" + }, "engines": { - "node": ">= 6" + "node": ">=20" } }, - "node_modules/create-require": { - "version": "1.1.1", - "dev": true, - "license": "MIT" - }, - "node_modules/crelt": { - "version": "1.0.7", - "license": "MIT" - }, - "node_modules/cron-parser": { - "version": "4.9.0", + "node_modules/@xhmikosr/decompress-unzip": { + "version": "8.2.1", "dev": true, "license": "MIT", "dependencies": { - "luxon": "^3.2.1" + "file-type": "^21.3.4", + "get-stream": "^9.0.1", + "yauzl": "^3.4.0" }, "engines": { - "node": ">=12.0.0" + "node": ">=20" } }, - "node_modules/cross-env": { - "version": "7.0.3", + "node_modules/@xhmikosr/downloader": { + "version": "16.2.0", "dev": true, "license": "MIT", "dependencies": { - "cross-spawn": "^7.0.1" - }, - "bin": { - "cross-env": "src/bin/cross-env.js", - "cross-env-shell": "src/bin/cross-env-shell.js" + "@xhmikosr/archive-type": "^8.0.1", + "@xhmikosr/decompress": "^11.1.3", + "content-disposition": "^2.0.1", + "ext-name": "^5.0.0", + "file-type": "^21.3.4", + "filenamify": "^7.0.1", + "got": "^14.6.6" }, "engines": { - "node": ">=10.14", - "npm": ">=6", - "yarn": ">=1" + "node": ">=20" } }, - "node_modules/cross-spawn": { - "version": "7.0.6", + "node_modules/@xhmikosr/os-filter-obj": { + "version": "4.1.0", "dev": true, "license": "MIT", "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" + "system-architecture": "^1.0.0" }, "engines": { - "node": ">= 8" + "node": ">=20" } }, - "node_modules/css.escape": { - "version": "1.5.1", - "dev": true, - "license": "MIT" - }, - "node_modules/cssstyle": { - "version": "4.6.0", + "node_modules/accepts": { + "version": "1.3.8", "dev": true, "license": "MIT", "dependencies": { - "@asamuzakjp/css-color": "^3.2.0", - "rrweb-cssom": "^0.8.0" + "mime-types": "~2.1.34", + "negotiator": "0.6.3" }, "engines": { - "node": ">=18" + "node": ">= 0.6" } }, - "node_modules/csstype": { - "version": "3.2.3", - "license": "MIT" - }, - "node_modules/damerau-levenshtein": { - "version": "1.0.8", + "node_modules/acorn": { + "version": "8.17.0", "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/data-uri-to-buffer": { - "version": "4.0.1", - "devOptional": true, "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, "engines": { - "node": ">= 12" + "node": ">=0.4.0" } }, - "node_modules/data-urls": { - "version": "5.0.0", + "node_modules/acorn-walk": { + "version": "8.3.5", "dev": true, "license": "MIT", "dependencies": { - "whatwg-mimetype": "^4.0.0", - "whatwg-url": "^14.0.0" + "acorn": "^8.11.0" }, "engines": { - "node": ">=18" + "node": ">=0.4.0" } }, - "node_modules/data-view-buffer": { - "version": "1.0.2", + "node_modules/adm-zip": { + "version": "0.5.10", "dev": true, "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=6.0" } }, - "node_modules/data-view-byte-length": { - "version": "1.0.2", + "node_modules/agent-base": { + "version": "7.1.4", "dev": true, "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/inspect-js" + "node": ">= 14" } }, - "node_modules/data-view-byte-offset": { - "version": "1.0.1", - "dev": true, + "node_modules/ajv-formats": { + "version": "2.1.1", "license": "MIT", "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" + "ajv": "^8.0.0" }, - "engines": { - "node": ">= 0.4" + "peerDependencies": { + "ajv": "^8.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "peerDependenciesMeta": { + "ajv": { + "optional": true + } } }, - "node_modules/date-fns": { - "version": "4.4.0", + "node_modules/ajv-formats/node_modules/ajv": { + "version": "8.20.0", "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, "funding": { "type": "github", - "url": "https://github.com/sponsors/kossnocorp" + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/date-fns-tz": { - "version": "3.2.0", + "node_modules/ajv-formats/node_modules/json-schema-traverse": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/ansi_up": { + "version": "6.0.6", "license": "MIT", - "peerDependencies": { - "date-fns": "^3.0.0 || ^4.0.0" + "engines": { + "node": "*" } }, - "node_modules/debug": { - "version": "4.4.3", + "node_modules/ansi-colors": { + "version": "4.1.3", + "dev": true, "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": ">=6" } }, - "node_modules/decimal.js": { - "version": "10.6.0", - "license": "MIT" - }, - "node_modules/decompress-response": { - "version": "10.0.0", + "node_modules/ansi-escapes": { + "version": "4.3.2", "dev": true, "license": "MIT", "dependencies": { - "mimic-response": "^4.0.0" + "type-fest": "^0.21.3" }, "engines": { - "node": ">=20" + "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/dedent": { - "version": "1.7.2", + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", "dev": true, - "license": "MIT", - "peerDependencies": { - "babel-plugin-macros": "^3.1.0" + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" }, - "peerDependenciesMeta": { - "babel-plugin-macros": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/deep-is": { - "version": "0.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/deepmerge": { - "version": "4.3.1", + "node_modules/ansi-regex": { + "version": "5.0.1", "dev": true, "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/define-data-property": { - "version": "1.1.4", + "node_modules/ansi-styles": { + "version": "4.3.0", "dev": true, "license": "MIT", "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" + "color-convert": "^2.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/define-properties": { - "version": "1.2.1", + "node_modules/anymatch": { + "version": "3.1.3", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 8" } }, - "node_modules/depd": { - "version": "2.0.0", + "node_modules/anymatch/node_modules/picomatch": { + "version": "2.3.2", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.8" + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/dequal": { - "version": "2.0.3", + "node_modules/arg": { + "version": "4.1.3", "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } + "license": "MIT" }, - "node_modules/destroy": { - "version": "1.2.0", + "node_modules/aria-query": { + "version": "5.3.0", "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" + "license": "Apache-2.0", + "dependencies": { + "dequal": "^2.0.3" } }, - "node_modules/detect-newline": { - "version": "3.1.0", + "node_modules/array-flatten": { + "version": "1.1.1", + "dev": true, + "license": "MIT" + }, + "node_modules/babel-jest": { + "version": "30.4.1", "dev": true, "license": "MIT", + "dependencies": { + "@jest/transform": "30.4.1", + "@types/babel__core": "^7.20.5", + "babel-plugin-istanbul": "^7.0.1", + "babel-preset-jest": "30.4.0", + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", + "slash": "^3.0.0" + }, "engines": { - "node": ">=8" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.11.0 || ^8.0.0-0" } }, - "node_modules/diff": { - "version": "4.0.4", + "node_modules/babel-plugin-istanbul": { + "version": "7.0.1", "dev": true, "license": "BSD-3-Clause", + "workspaces": [ + "test/babel-8" + ], + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-instrument": "^6.0.2", + "test-exclude": "^6.0.0" + }, "engines": { - "node": ">=0.3.1" + "node": ">=12" } }, - "node_modules/doctrine": { - "version": "3.0.0", + "node_modules/babel-plugin-jest-hoist": { + "version": "30.4.0", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { - "esutils": "^2.0.2" + "@types/babel__core": "^7.20.5" }, "engines": { - "node": ">=6.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/dom-accessibility-api": { - "version": "0.5.16", - "dev": true, - "license": "MIT" - }, - "node_modules/dom-helpers": { - "version": "5.2.1", + "node_modules/babel-plugin-macros": { + "version": "3.1.0", "license": "MIT", + "peer": true, "dependencies": { - "@babel/runtime": "^7.8.7", - "csstype": "^3.0.2" - } - }, - "node_modules/dompurify": { - "version": "3.4.11", - "license": "(MPL-2.0 OR Apache-2.0)", - "optionalDependencies": { - "@types/trusted-types": "^2.0.7" + "@babel/runtime": "^7.12.5", + "cosmiconfig": "^7.0.0", + "resolve": "^1.19.0" + }, + "engines": { + "node": ">=10", + "npm": ">=6" } }, - "node_modules/dunder-proto": { - "version": "1.0.1", + "node_modules/babel-preset-current-node-syntax": { + "version": "1.2.0", + "dev": true, "license": "MIT", "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" }, - "engines": { - "node": ">= 0.4" + "peerDependencies": { + "@babel/core": "^7.0.0 || ^8.0.0-0" } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", + "node_modules/babel-preset-jest": { + "version": "30.4.0", "dev": true, - "license": "MIT" - }, - "node_modules/echarts": { - "version": "5.5.0", - "license": "Apache-2.0", + "license": "MIT", "dependencies": { - "tslib": "2.3.0", - "zrender": "5.5.0" + "babel-plugin-jest-hoist": "30.4.0", + "babel-preset-current-node-syntax": "^1.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.11.0 || ^8.0.0-beta.1" } }, - "node_modules/echarts/node_modules/tslib": { - "version": "2.3.0", - "license": "0BSD" - }, - "node_modules/ee-first": { - "version": "1.1.1", + "node_modules/balanced-match": { + "version": "1.0.2", "dev": true, "license": "MIT" }, - "node_modules/electron-to-chromium": { - "version": "1.5.384", - "dev": true, - "license": "ISC" - }, - "node_modules/emittery": { - "version": "0.13.1", + "node_modules/bare-events": { + "version": "2.9.1", "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" + "license": "Apache-2.0", + "peerDependencies": { + "bare-abort-controller": "*" }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" + "peerDependenciesMeta": { + "bare-abort-controller": { + "optional": true + } } }, - "node_modules/emoji-regex": { - "version": "9.2.2", + "node_modules/base64-js": { + "version": "1.5.1", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "license": "MIT" }, - "node_modules/encodeurl": { - "version": "2.0.0", + "node_modules/baseline-browser-mapping": { + "version": "2.10.40", "dev": true, - "license": "MIT", + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, "engines": { - "node": ">= 0.8" + "node": ">=6.0.0" } }, - "node_modules/encoding": { - "version": "0.1.13", - "dev": true, + "node_modules/bignumber.js": { + "version": "9.3.1", "license": "MIT", - "dependencies": { - "iconv-lite": "^0.6.2" + "engines": { + "node": "*" } }, - "node_modules/entities": { - "version": "6.0.1", + "node_modules/binary-version": { + "version": "7.1.0", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", + "dependencies": { + "execa": "^8.0.1", + "find-versions": "^6.0.0" + }, "engines": { - "node": ">=0.12" + "node": ">=18" }, "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/error-ex": { - "version": "1.3.4", - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.2.1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/error-stack-parser": { - "version": "2.1.4", + "node_modules/binary-version-check": { + "version": "6.1.0", "dev": true, "license": "MIT", "dependencies": { - "stackframe": "^1.3.4" + "binary-version": "^7.1.0", + "semver": "^7.6.0", + "semver-truncate": "^3.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/es-abstract": { - "version": "1.24.2", + "node_modules/binary-version/node_modules/execa": { + "version": "8.0.1", "dev": true, "license": "MIT", "dependencies": { - "array-buffer-byte-length": "^1.0.2", - "arraybuffer.prototype.slice": "^1.0.4", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "data-view-buffer": "^1.0.2", - "data-view-byte-length": "^1.0.2", - "data-view-byte-offset": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "es-set-tostringtag": "^2.1.0", - "es-to-primitive": "^1.3.0", - "function.prototype.name": "^1.1.8", - "get-intrinsic": "^1.3.0", - "get-proto": "^1.0.1", - "get-symbol-description": "^1.1.0", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "internal-slot": "^1.1.0", - "is-array-buffer": "^3.0.5", - "is-callable": "^1.2.7", - "is-data-view": "^1.0.2", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.2.1", - "is-set": "^2.0.3", - "is-shared-array-buffer": "^1.0.4", - "is-string": "^1.1.1", - "is-typed-array": "^1.1.15", - "is-weakref": "^1.1.1", - "math-intrinsics": "^1.1.0", - "object-inspect": "^1.13.4", - "object-keys": "^1.1.1", - "object.assign": "^4.1.7", - "own-keys": "^1.0.1", - "regexp.prototype.flags": "^1.5.4", - "safe-array-concat": "^1.1.3", - "safe-push-apply": "^1.0.0", - "safe-regex-test": "^1.1.0", - "set-proto": "^1.0.0", - "stop-iteration-iterator": "^1.1.0", - "string.prototype.trim": "^1.2.10", - "string.prototype.trimend": "^1.0.9", - "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.3", - "typed-array-byte-length": "^1.0.3", - "typed-array-byte-offset": "^1.0.4", - "typed-array-length": "^1.0.7", - "unbox-primitive": "^1.1.0", - "which-typed-array": "^1.1.19" + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">=16.17" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/es-abstract-get": { - "version": "1.0.0", + "node_modules/binary-version/node_modules/get-stream": { + "version": "8.0.1", "dev": true, "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.2", - "is-callable": "^1.2.7", - "object-inspect": "^1.13.4" - }, "engines": { - "node": ">= 0.4" + "node": ">=16" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/es-define-property": { - "version": "1.0.1", - "license": "MIT", + "node_modules/binary-version/node_modules/human-signals": { + "version": "5.0.0", + "dev": true, + "license": "Apache-2.0", "engines": { - "node": ">= 0.4" + "node": ">=16.17.0" } }, - "node_modules/es-errors": { - "version": "1.3.0", + "node_modules/binary-version/node_modules/is-stream": { + "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { - "node": ">= 0.4" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/es-iterator-helpers": { - "version": "1.3.3", + "node_modules/binary-version/node_modules/npm-run-path": { + "version": "5.3.0", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.24.2", - "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.1.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.3.0", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "internal-slot": "^1.1.0", - "iterator.prototype": "^1.1.5", - "math-intrinsics": "^1.1.0" + "path-key": "^4.0.0" }, "engines": { - "node": ">= 0.4" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/es-object-atoms": { - "version": "1.1.2", + "node_modules/binary-version/node_modules/path-key": { + "version": "4.0.0", + "dev": true, "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, "engines": { - "node": ">= 0.4" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/es-set-tostringtag": { - "version": "2.1.0", + "node_modules/binary-version/node_modules/strip-final-newline": { + "version": "3.0.0", "dev": true, "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, "engines": { - "node": ">= 0.4" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/es-shim-unscopables": { - "version": "1.1.0", + "node_modules/bind-event-listener": { + "version": "3.0.0", + "license": "MIT" + }, + "node_modules/body-parser": { + "version": "1.20.5", "dev": true, "license": "MIT", "dependencies": { - "hasown": "^2.0.2" + "bytes": "~3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "~1.2.0", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "on-finished": "~2.4.1", + "qs": "~6.15.1", + "raw-body": "~2.5.3", + "type-is": "~1.6.18", + "unpipe": "~1.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/es-to-primitive": { - "version": "1.3.4", + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", "dev": true, "license": "MIT", "dependencies": { - "es-abstract-get": "^1.0.0", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "is-callable": "^1.2.7", - "is-date-object": "^1.1.0", - "is-symbol": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "ms": "2.0.0" } }, - "node_modules/escalade": { - "version": "3.2.0", + "node_modules/body-parser/node_modules/iconv-lite": { + "version": "0.4.24", "dev": true, "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, - "node_modules/escape-html": { - "version": "1.0.3", + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", "dev": true, "license": "MIT" }, - "node_modules/escape-latex": { - "version": "1.2.0", - "license": "MIT" - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", + "node_modules/brace-expansion": { + "version": "2.1.1", + "dev": true, "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "dependencies": { + "balanced-match": "^1.0.0" } }, - "node_modules/eslint": { - "version": "8.57.1", + "node_modules/browserslist": { + "version": "4.28.4", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "baseline-browser-mapping": "^2.10.38", + "caniuse-lite": "^1.0.30001799", + "electron-to-chromium": "^1.5.376", + "node-releases": "^2.0.48", + "update-browserslist-db": "^1.2.3" }, "bin": { - "eslint": "bin/eslint.js" + "browserslist": "cli.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/eslint-config-prettier": { - "version": "9.1.2", + "node_modules/bser": { + "version": "2.1.1", "dev": true, - "license": "MIT", - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=7.0.0" + "license": "Apache-2.0", + "dependencies": { + "node-int64": "^0.4.0" } }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.10", + "node_modules/buffer": { + "version": "5.7.1", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "license": "MIT", "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.16.1", - "resolve": "^2.0.0-next.6" + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", + "node_modules/buffer-from": { + "version": "1.1.2", "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } + "license": "MIT" }, - "node_modules/eslint-import-resolver-node/node_modules/resolve": { - "version": "2.0.0-next.7", + "node_modules/byte-counter": { + "version": "0.1.0", "dev": true, "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "is-core-module": "^2.16.2", - "node-exports-info": "^1.6.0", - "object-keys": "^1.1.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, "engines": { - "node": ">= 0.4" + "node": ">=20" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint-module-utils": { - "version": "2.13.0", + "node_modules/bytes": { + "version": "3.1.2", "dev": true, "license": "MIT", - "dependencies": { - "debug": "^3.2.7" - }, "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } + "node": ">= 0.8" } }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", + "node_modules/cacheable-lookup": { + "version": "7.0.0", "dev": true, "license": "MIT", - "dependencies": { - "ms": "^2.1.1" + "engines": { + "node": ">=14.16" } }, - "node_modules/eslint-plugin-import": { - "version": "2.32.0", + "node_modules/cacheable-request": { + "version": "13.0.19", "dev": true, "license": "MIT", "dependencies": { - "@rtsao/scc": "^1.1.0", - "array-includes": "^3.1.9", - "array.prototype.findlastindex": "^1.2.6", - "array.prototype.flat": "^1.3.3", - "array.prototype.flatmap": "^1.3.3", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.12.1", - "hasown": "^2.0.2", - "is-core-module": "^2.16.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "object.groupby": "^1.0.3", - "object.values": "^1.2.1", - "semver": "^6.3.1", - "string.prototype.trimend": "^1.0.9", - "tsconfig-paths": "^3.15.0" + "@types/http-cache-semantics": "^4.2.0", + "get-stream": "^9.0.1", + "http-cache-semantics": "^4.2.0", + "keyv": "^5.6.0", + "mimic-response": "^4.0.0", + "normalize-url": "^8.1.1", + "responselike": "^4.0.2" }, "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" + "node": ">=18" } }, - "node_modules/eslint-plugin-import/node_modules/brace-expansion": { - "version": "1.1.15", + "node_modules/cacheable-request/node_modules/keyv": { + "version": "5.6.0", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "@keyv/serialize": "^1.1.1" } }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "dev": true, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", "license": "MIT", "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-import/node_modules/minimatch": { - "version": "3.1.5", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" }, "engines": { - "node": "*" - } - }, - "node_modules/eslint-plugin-import/node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" + "node": ">= 0.4" } }, - "node_modules/eslint-plugin-jsx-a11y": { - "version": "6.10.2", - "dev": true, + "node_modules/call-bound": { + "version": "1.0.4", "license": "MIT", "dependencies": { - "aria-query": "^5.3.2", - "array-includes": "^3.1.8", - "array.prototype.flatmap": "^1.3.2", - "ast-types-flow": "^0.0.8", - "axe-core": "^4.10.0", - "axobject-query": "^4.1.0", - "damerau-levenshtein": "^1.0.8", - "emoji-regex": "^9.2.2", - "hasown": "^2.0.2", - "jsx-ast-utils": "^3.3.5", - "language-tags": "^1.0.9", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "safe-regex-test": "^1.0.3", - "string.prototype.includes": "^2.0.1" + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" }, "engines": { - "node": ">=4.0" + "node": ">= 0.4" }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/eslint-plugin-jsx-a11y/node_modules/aria-query": { - "version": "5.3.2", - "dev": true, - "license": "Apache-2.0", + "node_modules/callsites": { + "version": "3.1.0", + "license": "MIT", "engines": { - "node": ">= 0.4" + "node": ">=6" } }, - "node_modules/eslint-plugin-jsx-a11y/node_modules/brace-expansion": { - "version": "1.1.15", + "node_modules/camelcase": { + "version": "5.3.1", "dev": true, "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint-plugin-jsx-a11y/node_modules/minimatch": { - "version": "3.1.5", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, "engines": { - "node": "*" + "node": ">=6" } }, - "node_modules/eslint-plugin-prettier": { - "version": "5.5.6", + "node_modules/caniuse-lite": { + "version": "1.0.30001800", "dev": true, - "license": "MIT", - "dependencies": { - "prettier-linter-helpers": "^1.0.1", - "synckit": "^0.11.13" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint-plugin-prettier" - }, - "peerDependencies": { - "@types/eslint": ">=8.0.0", - "eslint": ">=8.0.0", - "eslint-config-prettier": ">= 7.0.0 <10.0.0 || >=10.1.0", - "prettier": ">=3.0.0" - }, - "peerDependenciesMeta": { - "@types/eslint": { - "optional": true + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" }, - "eslint-config-prettier": { - "optional": true + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } - } + ], + "license": "CC-BY-4.0" }, - "node_modules/eslint-plugin-react": { - "version": "7.37.5", + "node_modules/chalk": { + "version": "4.1.2", "dev": true, "license": "MIT", "dependencies": { - "array-includes": "^3.1.8", - "array.prototype.findlast": "^1.2.5", - "array.prototype.flatmap": "^1.3.3", - "array.prototype.tosorted": "^1.1.4", - "doctrine": "^2.1.0", - "es-iterator-helpers": "^1.2.1", - "estraverse": "^5.3.0", - "hasown": "^2.0.2", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "minimatch": "^3.1.2", - "object.entries": "^1.1.9", - "object.fromentries": "^2.0.8", - "object.values": "^1.2.1", - "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.5", - "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.12", - "string.prototype.repeat": "^1.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=4" + "node": ">=10" }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/eslint-plugin-react-hooks": { - "version": "4.6.2", + "node_modules/char-regex": { + "version": "1.0.2", "dev": true, "license": "MIT", "engines": { "node": ">=10" - }, - "peerDependencies": { - "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" } }, - "node_modules/eslint-plugin-react/node_modules/brace-expansion": { - "version": "1.1.15", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } + "node_modules/chroma-js": { + "version": "3.2.0", + "license": "(BSD-3-Clause AND Apache-2.0)" }, - "node_modules/eslint-plugin-react/node_modules/doctrine": { - "version": "2.1.0", + "node_modules/ci-info": { + "version": "4.4.0", "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/eslint-plugin-react/node_modules/minimatch": { - "version": "3.1.5", + "node_modules/cjs-module-lexer": { + "version": "2.2.0", "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } + "license": "MIT" }, - "node_modules/eslint-plugin-react/node_modules/resolve": { - "version": "2.0.0-next.7", + "node_modules/cliui": { + "version": "9.0.1", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "es-errors": "^1.3.0", - "is-core-module": "^2.16.2", - "node-exports-info": "^1.6.0", - "object-keys": "^1.1.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/eslint-plugin-react/node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" + "node": ">=20" } }, - "node_modules/eslint-scope": { - "version": "7.2.2", + "node_modules/cliui/node_modules/ansi-regex": { + "version": "6.2.2", "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, + "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=12" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", + "node_modules/cliui/node_modules/ansi-styles": { + "version": "6.2.3", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=12" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.15", + "node_modules/cliui/node_modules/emoji-regex": { + "version": "10.6.0", "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } + "license": "MIT" }, - "node_modules/eslint/node_modules/ignore": { - "version": "5.3.2", + "node_modules/cliui/node_modules/string-width": { + "version": "7.2.0", "dev": true, "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, "engines": { - "node": ">= 4" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/minimatch": { - "version": "3.1.5", + "node_modules/cliui/node_modules/strip-ansi": { + "version": "7.2.0", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "brace-expansion": "^1.1.7" + "ansi-regex": "^6.2.2" }, "engines": { - "node": "*" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/espree": { - "version": "9.6.1", + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "9.0.2", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=18" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/esprima": { - "version": "4.0.1", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, + "node_modules/clsx": { + "version": "2.1.1", + "license": "MIT", "engines": { - "node": ">=4" + "node": ">=6" } }, - "node_modules/esquery": { - "version": "1.7.0", + "node_modules/co": { + "version": "4.6.0", "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, + "license": "MIT", "engines": { - "node": ">=0.10" + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" } }, - "node_modules/esrecurse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", + "node_modules/codemirror": { + "version": "6.0.2", + "license": "MIT", "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/commands": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/lint": "^6.0.0", + "@codemirror/search": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0" } }, - "node_modules/estraverse": { - "version": "5.3.0", + "node_modules/collect-v8-coverage": { + "version": "1.0.3", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT" + }, + "node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, "engines": { - "node": ">=4.0" + "node": ">=7.0.0" } }, - "node_modules/esutils": { - "version": "2.0.3", + "node_modules/color-hash": { + "version": "2.0.2", + "license": "MIT" + }, + "node_modules/color-name": { + "version": "1.1.4", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT" + }, + "node_modules/commander": { + "version": "11.1.0", + "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=16" } }, - "node_modules/etag": { - "version": "1.8.1", - "dev": true, + "node_modules/complex.js": { + "version": "2.4.3", "license": "MIT", "engines": { - "node": ">= 0.6" + "node": "*" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/rawify" } }, - "node_modules/events-universal": { - "version": "1.0.1", + "node_modules/concat-map": { + "version": "0.0.1", "dev": true, - "license": "Apache-2.0", - "dependencies": { - "bare-events": "^2.7.0" - } + "license": "MIT" }, - "node_modules/execa": { - "version": "9.6.1", + "node_modules/concurrently": { + "version": "10.0.3", "dev": true, "license": "MIT", "dependencies": { - "@sindresorhus/merge-streams": "^4.0.0", - "cross-spawn": "^7.0.6", - "figures": "^6.1.0", - "get-stream": "^9.0.0", - "human-signals": "^8.0.1", - "is-plain-obj": "^4.1.0", - "is-stream": "^4.0.1", - "npm-run-path": "^6.0.0", - "pretty-ms": "^9.2.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^4.0.0", - "yoctocolors": "^2.1.1" + "chalk": "5.6.2", + "rxjs": "7.8.2", + "shell-quote": "1.8.4", + "supports-color": "10.2.2", + "tree-kill": "1.2.2", + "yargs": "18.0.0" + }, + "bin": { + "conc": "dist/bin/index.js", + "concurrently": "dist/bin/index.js" }, "engines": { - "node": "^18.19.0 || >=20.5.0" + "node": ">=22" }, "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" + "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" } }, - "node_modules/exit-x": { - "version": "0.2.2", + "node_modules/concurrently/node_modules/chalk": { + "version": "5.6.2", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.8.0" + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/expand-tilde": { - "version": "2.0.2", + "node_modules/concurrently/node_modules/supports-color": { + "version": "10.2.2", "dev": true, "license": "MIT", - "dependencies": { - "homedir-polyfill": "^1.0.1" - }, "engines": { - "node": ">=0.10.0" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/expect": { - "version": "30.4.1", + "node_modules/content-disposition": { + "version": "2.0.1", "dev": true, "license": "MIT", - "dependencies": { - "@jest/expect-utils": "30.4.1", - "@jest/get-type": "30.1.0", - "jest-matcher-utils": "30.4.1", - "jest-message-util": "30.4.1", - "jest-mock": "30.4.1", - "jest-util": "30.4.1" + "engines": { + "node": ">=18" }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "dev": true, + "license": "MIT", "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + "node": ">= 0.6" } }, - "node_modules/express": { - "version": "4.22.2", + "node_modules/convert-hrtime": { + "version": "5.0.0", "dev": true, "license": "MIT", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "~1.20.5", - "content-disposition": "~0.5.4", - "content-type": "~1.0.4", - "cookie": "~0.7.1", - "cookie-signature": "~1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.3.1", - "fresh": "~0.5.2", - "http-errors": "~2.0.0", - "merge-descriptors": "1.0.3", - "methods": "~1.1.2", - "on-finished": "~2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "~0.1.12", - "proxy-addr": "~2.0.7", - "qs": "~6.15.1", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "~0.19.0", - "serve-static": "~1.16.2", - "setprototypeof": "1.2.0", - "statuses": "~2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, "engines": { - "node": ">= 0.10.0" + "node": ">=12" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/express/node_modules/content-disposition": { - "version": "0.5.4", - "dev": true, + "node_modules/convert-source-map": { + "version": "1.9.0", "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } + "peer": true }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", + "node_modules/cookie": { + "version": "0.7.2", "dev": true, "license": "MIT", - "dependencies": { - "ms": "2.0.0" + "engines": { + "node": ">= 0.6" } }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", + "node_modules/cookie-signature": { + "version": "1.0.7", "dev": true, "license": "MIT" }, - "node_modules/ext-list": { - "version": "2.2.2", + "node_modules/core-js": { + "version": "3.47.0", "dev": true, + "hasInstallScript": true, "license": "MIT", - "dependencies": { - "mime-db": "^1.28.0" - }, - "engines": { - "node": ">=0.10.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" } }, - "node_modules/ext-name": { - "version": "5.0.0", - "dev": true, + "node_modules/cosmiconfig": { + "version": "7.1.0", "license": "MIT", + "peer": true, "dependencies": { - "ext-list": "^2.0.0", - "sort-keys-length": "^1.0.0" + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" }, "engines": { - "node": ">=4" + "node": ">=10" } }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "license": "MIT" - }, - "node_modules/fast-diff": { - "version": "1.3.0", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/fast-equals": { - "version": "4.0.3", - "license": "MIT" + "node_modules/cosmiconfig/node_modules/yaml": { + "version": "1.10.3", + "license": "ISC", + "peer": true, + "engines": { + "node": ">= 6" + } }, - "node_modules/fast-fifo": { - "version": "1.3.2", + "node_modules/create-require": { + "version": "1.1.1", "dev": true, "license": "MIT" }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true, + "node_modules/crelt": { + "version": "1.0.7", "license": "MIT" }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", + "node_modules/cron-parser": { + "version": "4.9.0", "dev": true, - "license": "MIT" - }, - "node_modules/fast-uri": { - "version": "3.1.3", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fastify" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fastify" - } - ], - "license": "BSD-3-Clause" + "license": "MIT", + "dependencies": { + "luxon": "^3.2.1" + }, + "engines": { + "node": ">=12.0.0" + } }, - "node_modules/fastq": { - "version": "1.20.1", + "node_modules/cross-env": { + "version": "7.0.3", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "reusify": "^1.0.4" + "cross-spawn": "^7.0.1" + }, + "bin": { + "cross-env": "src/bin/cross-env.js", + "cross-env-shell": "src/bin/cross-env-shell.js" + }, + "engines": { + "node": ">=10.14", + "npm": ">=6", + "yarn": ">=1" } }, - "node_modules/fb-watchman": { - "version": "2.0.2", + "node_modules/cross-spawn": { + "version": "7.0.6", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { - "bser": "2.1.1" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" } }, - "node_modules/fdir": { - "version": "6.5.0", + "node_modules/css.escape": { + "version": "1.5.1", + "dev": true, + "license": "MIT" + }, + "node_modules/cssstyle": { + "version": "4.6.0", "dev": true, "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" + "dependencies": { + "@asamuzakjp/css-color": "^3.2.0", + "rrweb-cssom": "^0.8.0" }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } + "engines": { + "node": ">=18" } }, - "node_modules/fetch-blob": { - "version": "3.2.0", + "node_modules/csstype": { + "version": "3.2.3", + "license": "MIT" + }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", "devOptional": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "paypal", - "url": "https://paypal.me/jimmywarting" - } - ], "license": "MIT", - "dependencies": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - }, "engines": { - "node": "^12.20 || >= 14.13" + "node": ">= 12" } }, - "node_modules/figures": { - "version": "6.1.0", + "node_modules/data-urls": { + "version": "5.0.0", "dev": true, "license": "MIT", "dependencies": { - "is-unicode-supported": "^2.0.0" + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0" }, "engines": { "node": ">=18" - }, + } + }, + "node_modules/date-fns": { + "version": "4.4.0", + "license": "MIT", "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "github", + "url": "https://github.com/sponsors/kossnocorp" } }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "dev": true, + "node_modules/date-fns-tz": { + "version": "3.2.0", + "license": "MIT", + "peerDependencies": { + "date-fns": "^3.0.0 || ^4.0.0" + } + }, + "node_modules/debug": { + "version": "4.4.3", "license": "MIT", "dependencies": { - "flat-cache": "^3.0.4" + "ms": "^2.1.3" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/file-type": { - "version": "21.3.4", + "node_modules/decimal.js": { + "version": "10.6.0", + "license": "MIT" + }, + "node_modules/decompress-response": { + "version": "10.0.0", "dev": true, "license": "MIT", "dependencies": { - "@tokenizer/inflate": "^0.4.1", - "strtok3": "^10.3.4", - "token-types": "^6.1.1", - "uint8array-extras": "^1.4.0" + "mimic-response": "^4.0.0" }, "engines": { "node": ">=20" }, "funding": { - "url": "https://github.com/sindresorhus/file-type?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/filename-reserved-regex": { - "version": "4.0.0", + "node_modules/dedent": { + "version": "1.7.2", "dev": true, "license": "MIT", - "engines": { - "node": ">=20" + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } } }, - "node_modules/filenamify": { - "version": "7.0.2", + "node_modules/deepmerge": { + "version": "4.3.1", "dev": true, "license": "MIT", - "dependencies": { - "filename-reserved-regex": "^4.0.0" - }, "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.10.0" } }, - "node_modules/finalhandler": { - "version": "1.3.2", + "node_modules/depd": { + "version": "2.0.0", "dev": true, "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "on-finished": "~2.4.1", - "parseurl": "~1.3.3", - "statuses": "~2.0.2", - "unpipe": "~1.0.0" - }, "engines": { "node": ">= 0.8" } }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", + "node_modules/dequal": { + "version": "2.0.3", "dev": true, "license": "MIT", - "dependencies": { - "ms": "2.0.0" + "engines": { + "node": ">=6" } }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/find-file-up": { - "version": "2.0.1", + "node_modules/destroy": { + "version": "1.2.0", "dev": true, "license": "MIT", - "dependencies": { - "resolve-dir": "^1.0.1" - }, "engines": { - "node": ">=8" + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/find-pkg": { - "version": "2.0.0", + "node_modules/detect-newline": { + "version": "3.1.0", "dev": true, "license": "MIT", - "dependencies": { - "find-file-up": "^2.0.1" - }, "engines": { "node": ">=8" } }, - "node_modules/find-root": { - "version": "1.1.0", - "license": "MIT", - "peer": true + "node_modules/diff": { + "version": "4.0.4", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } }, - "node_modules/find-up": { - "version": "5.0.0", + "node_modules/dom-accessibility-api": { + "version": "0.5.16", "dev": true, + "license": "MIT" + }, + "node_modules/dom-helpers": { + "version": "5.2.1", "license": "MIT", "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" } }, - "node_modules/find-versions": { - "version": "6.0.0", - "dev": true, + "node_modules/dompurify": { + "version": "3.4.11", + "license": "(MPL-2.0 OR Apache-2.0)", + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", "license": "MIT", "dependencies": { - "semver-regex": "^4.0.5", - "super-regex": "^1.0.0" + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" }, "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 0.4" } }, - "node_modules/flat-cache": { - "version": "3.2.0", + "node_modules/eastasianwidth": { + "version": "0.2.0", "dev": true, - "license": "MIT", + "license": "MIT" + }, + "node_modules/echarts": { + "version": "5.5.0", + "license": "Apache-2.0", "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" + "tslib": "2.3.0", + "zrender": "5.5.0" } }, - "node_modules/flatted": { - "version": "3.4.2", + "node_modules/echarts/node_modules/tslib": { + "version": "2.3.0", + "license": "0BSD" + }, + "node_modules/ee-first": { + "version": "1.1.1", + "dev": true, + "license": "MIT" + }, + "node_modules/electron-to-chromium": { + "version": "1.5.384", "dev": true, "license": "ISC" }, - "node_modules/for-each": { - "version": "0.3.5", + "node_modules/emittery": { + "version": "0.13.1", "dev": true, "license": "MIT", - "dependencies": { - "is-callable": "^1.2.7" - }, "engines": { - "node": ">= 0.4" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sindresorhus/emittery?sponsor=1" } }, - "node_modules/foreground-child": { - "version": "3.3.1", + "node_modules/emoji-regex": { + "version": "9.2.2", "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.6", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } + "license": "MIT" }, - "node_modules/form-data-encoder": { - "version": "4.1.0", + "node_modules/encodeurl": { + "version": "2.0.0", "dev": true, "license": "MIT", "engines": { - "node": ">= 18" + "node": ">= 0.8" } }, - "node_modules/formdata-polyfill": { - "version": "4.0.10", - "devOptional": true, + "node_modules/encoding": { + "version": "0.1.13", + "dev": true, "license": "MIT", "dependencies": { - "fetch-blob": "^3.1.2" - }, - "engines": { - "node": ">=12.20.0" + "iconv-lite": "^0.6.2" } }, - "node_modules/forwarded": { - "version": "0.2.0", + "node_modules/entities": { + "version": "6.0.1", "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fraction.js": { - "version": "4.3.7", - "license": "MIT", + "license": "BSD-2-Clause", "engines": { - "node": "*" + "node": ">=0.12" }, "funding": { - "type": "patreon", - "url": "https://github.com/sponsors/rawify" + "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/fresh": { - "version": "0.5.2", - "dev": true, + "node_modules/error-ex": { + "version": "1.3.4", "license": "MIT", - "engines": { - "node": ">= 0.6" + "dependencies": { + "is-arrayish": "^0.2.1" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.3", + "node_modules/error-stack-parser": { + "version": "2.1.4", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + "dependencies": { + "stackframe": "^1.3.4" } }, - "node_modules/function-bind": { - "version": "1.1.2", + "node_modules/es-define-property": { + "version": "1.0.1", "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">= 0.4" } }, - "node_modules/function-timeout": { - "version": "1.0.2", - "dev": true, + "node_modules/es-errors": { + "version": "1.3.0", "license": "MIT", "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 0.4" } }, - "node_modules/function.prototype.name": { - "version": "1.2.0", - "dev": true, + "node_modules/es-object-atoms": { + "version": "1.1.2", "license": "MIT", "dependencies": { - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2", - "hasown": "^2.0.4", - "is-callable": "^1.2.7", - "is-document.all": "^1.0.0" + "es-errors": "^1.3.0" }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/functions-have-names": { - "version": "1.2.3", + "node_modules/escalade": { + "version": "3.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", "dev": true, + "license": "MIT" + }, + "node_modules/escape-latex": { + "version": "1.2.0", + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/generator-function": { - "version": "2.0.1", + "node_modules/esprima": { + "version": "4.0.1", "dev": true, - "license": "MIT", + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, "engines": { - "node": ">= 0.4" + "node": ">=4" } }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", + "node_modules/etag": { + "version": "1.8.1", "dev": true, "license": "MIT", "engines": { - "node": ">=6.9.0" + "node": ">= 0.6" } }, - "node_modules/get-caller-file": { - "version": "2.0.5", + "node_modules/events-universal": { + "version": "1.0.1", "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" + "license": "Apache-2.0", + "dependencies": { + "bare-events": "^2.7.0" } }, - "node_modules/get-east-asian-width": { - "version": "1.6.0", + "node_modules/execa": { + "version": "9.6.1", "dev": true, "license": "MIT", + "dependencies": { + "@sindresorhus/merge-streams": "^4.0.0", + "cross-spawn": "^7.0.6", + "figures": "^6.1.0", + "get-stream": "^9.0.0", + "human-signals": "^8.0.1", + "is-plain-obj": "^4.1.0", + "is-stream": "^4.0.1", + "npm-run-path": "^6.0.0", + "pretty-ms": "^9.2.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^4.0.0", + "yoctocolors": "^2.1.1" + }, "engines": { - "node": ">=18" + "node": "^18.19.0 || >=20.5.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/get-intrinsic": { - "version": "1.3.0", + "node_modules/exit-x": { + "version": "0.2.2", + "dev": true, "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.8.0" } }, - "node_modules/get-package-type": { - "version": "0.1.0", + "node_modules/expand-tilde": { + "version": "2.0.2", "dev": true, "license": "MIT", + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, "engines": { - "node": ">=8.0.0" + "node": ">=0.10.0" } }, - "node_modules/get-proto": { - "version": "1.0.1", + "node_modules/expect": { + "version": "30.4.1", + "dev": true, "license": "MIT", "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" + "@jest/expect-utils": "30.4.1", + "@jest/get-type": "30.1.0", + "jest-matcher-utils": "30.4.1", + "jest-message-util": "30.4.1", + "jest-mock": "30.4.1", + "jest-util": "30.4.1" }, "engines": { - "node": ">= 0.4" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/get-stream": { - "version": "9.0.1", + "node_modules/express": { + "version": "4.22.2", "dev": true, "license": "MIT", "dependencies": { - "@sec-ant/readable-stream": "^0.4.1", - "is-stream": "^4.0.1" + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "~1.20.5", + "content-disposition": "~0.5.4", + "content-type": "~1.0.4", + "cookie": "~0.7.1", + "cookie-signature": "~1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.3.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "~2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "~0.1.12", + "proxy-addr": "~2.0.7", + "qs": "~6.15.1", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "~0.19.0", + "serve-static": "~1.16.2", + "setprototypeof": "1.2.0", + "statuses": "~2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" }, "engines": { - "node": ">=18" + "node": ">= 0.10.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/express" } }, - "node_modules/get-symbol-description": { - "version": "1.1.0", + "node_modules/express/node_modules/content-disposition": { + "version": "0.5.4", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6" + "safe-buffer": "5.2.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.6" } }, - "node_modules/glob": { - "version": "10.5.0", + "node_modules/express/node_modules/debug": { + "version": "2.6.9", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "ms": "2.0.0" } }, - "node_modules/glob-parent": { - "version": "6.0.2", + "node_modules/express/node_modules/ms": { + "version": "2.0.0", "dev": true, - "license": "ISC", + "license": "MIT" + }, + "node_modules/ext-list": { + "version": "2.2.2", + "dev": true, + "license": "MIT", "dependencies": { - "is-glob": "^4.0.3" + "mime-db": "^1.28.0" }, "engines": { - "node": ">=10.13.0" + "node": ">=0.10.0" } }, - "node_modules/global-modules": { - "version": "1.0.0", + "node_modules/ext-name": { + "version": "5.0.0", "dev": true, "license": "MIT", "dependencies": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" + "ext-list": "^2.0.0", + "sort-keys-length": "^1.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/global-prefix": { - "version": "1.0.2", + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "license": "MIT" + }, + "node_modules/fast-equals": { + "version": "4.0.3", + "license": "MIT" + }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.1.3", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/fb-watchman": { + "version": "2.0.2", "dev": true, + "license": "Apache-2.0", + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "devOptional": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], "license": "MIT", "dependencies": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/global-prefix/node_modules/isexe": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "node_modules/global-prefix/node_modules/which": { - "version": "1.3.1", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" + "node": "^12.20 || >= 14.13" } }, - "node_modules/globals": { - "version": "13.24.0", + "node_modules/figures": { + "version": "6.1.0", "dev": true, "license": "MIT", "dependencies": { - "type-fest": "^0.20.2" + "is-unicode-supported": "^2.0.0" }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globalthis": { - "version": "1.0.4", + "node_modules/file-type": { + "version": "21.3.4", "dev": true, "license": "MIT", "dependencies": { - "define-properties": "^1.2.1", - "gopd": "^1.0.1" + "@tokenizer/inflate": "^0.4.1", + "strtok3": "^10.3.4", + "token-types": "^6.1.1", + "uint8array-extras": "^1.4.0" }, "engines": { - "node": ">= 0.4" + "node": ">=20" }, "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/goober": { - "version": "2.1.19", - "license": "MIT", - "peerDependencies": { - "csstype": "^3.0.10" + "url": "https://github.com/sindresorhus/file-type?sponsor=1" } }, - "node_modules/gopd": { - "version": "1.2.0", + "node_modules/filename-reserved-regex": { + "version": "4.0.0", + "dev": true, "license": "MIT", "engines": { - "node": ">= 0.4" + "node": ">=20" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/got": { - "version": "14.6.6", + "node_modules/filenamify": { + "version": "7.0.2", "dev": true, "license": "MIT", "dependencies": { - "@sindresorhus/is": "^7.0.1", - "byte-counter": "^0.1.0", - "cacheable-lookup": "^7.0.0", - "cacheable-request": "^13.0.12", - "decompress-response": "^10.0.0", - "form-data-encoder": "^4.0.2", - "http2-wrapper": "^2.2.1", - "keyv": "^5.5.3", - "lowercase-keys": "^3.0.0", - "p-cancelable": "^4.0.1", - "responselike": "^4.0.2", - "type-fest": "^4.26.1" + "filename-reserved-regex": "^4.0.0" }, "engines": { "node": ">=20" }, "funding": { - "url": "https://github.com/sindresorhus/got?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/got/node_modules/keyv": { - "version": "5.6.0", + "node_modules/finalhandler": { + "version": "1.3.2", "dev": true, "license": "MIT", "dependencies": { - "@keyv/serialize": "^1.1.1" - } - }, - "node_modules/got/node_modules/type-fest": { - "version": "4.41.0", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=16" + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "~2.4.1", + "parseurl": "~1.3.3", + "statuses": "~2.0.2", + "unpipe": "~1.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">= 0.8" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", "dev": true, - "license": "ISC" + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } }, - "node_modules/graphemer": { - "version": "1.4.0", + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", "dev": true, "license": "MIT" }, - "node_modules/has-bigints": { - "version": "1.1.0", + "node_modules/find-file-up": { + "version": "2.0.1", "dev": true, "license": "MIT", - "engines": { - "node": ">= 0.4" + "dependencies": { + "resolve-dir": "^1.0.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", + "node_modules/find-pkg": { + "version": "2.0.0", "dev": true, "license": "MIT", "dependencies": { - "es-define-property": "^1.0.0" + "find-file-up": "^2.0.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8" } }, - "node_modules/has-proto": { - "version": "1.2.0", + "node_modules/find-root": { + "version": "1.1.0", + "license": "MIT", + "peer": true + }, + "node_modules/find-versions": { + "version": "6.0.0", "dev": true, "license": "MIT", "dependencies": { - "dunder-proto": "^1.0.0" + "semver-regex": "^4.0.5", + "super-regex": "^1.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">=18" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/has-symbols": { - "version": "1.1.0", - "license": "MIT", + "node_modules/foreground-child": { + "version": "3.3.1", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, "engines": { - "node": ">= 0.4" + "node": ">=14" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/has-tostringtag": { - "version": "1.0.2", + "node_modules/form-data-encoder": { + "version": "4.1.0", "dev": true, "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 18" } }, - "node_modules/hasown": { - "version": "2.0.4", + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "devOptional": true, "license": "MIT", "dependencies": { - "function-bind": "^1.1.2" + "fetch-blob": "^3.1.2" }, "engines": { - "node": ">= 0.4" - } - }, - "node_modules/hoist-non-react-statics": { - "version": "3.3.2", - "license": "BSD-3-Clause", - "peer": true, - "dependencies": { - "react-is": "^16.7.0" + "node": ">=12.20.0" } }, - "node_modules/hoist-non-react-statics/node_modules/react-is": { - "version": "16.13.1", - "license": "MIT", - "peer": true - }, - "node_modules/homedir-polyfill": { - "version": "1.0.3", + "node_modules/forwarded": { + "version": "0.2.0", "dev": true, "license": "MIT", - "dependencies": { - "parse-passwd": "^1.0.0" - }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.6" } }, - "node_modules/html-encoding-sniffer": { - "version": "4.0.0", - "dev": true, + "node_modules/fraction.js": { + "version": "4.3.7", "license": "MIT", - "dependencies": { - "whatwg-encoding": "^3.1.1" - }, "engines": { - "node": ">=18" + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://github.com/sponsors/rawify" } }, - "node_modules/html-escaper": { - "version": "2.0.2", + "node_modules/fresh": { + "version": "0.5.2", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">= 0.6" + } }, - "node_modules/http-cache-semantics": { - "version": "4.2.0", + "node_modules/fs.realpath": { + "version": "1.0.0", "dev": true, - "license": "BSD-2-Clause" + "license": "ISC" }, - "node_modules/http-errors": { - "version": "2.0.1", + "node_modules/fsevents": { + "version": "2.3.3", "dev": true, "license": "MIT", - "dependencies": { - "depd": "~2.0.0", - "inherits": "~2.0.4", - "setprototypeof": "~1.2.0", - "statuses": "~2.0.2", - "toidentifier": "~1.0.1" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">= 0.8" - }, + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "license": "MIT", "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/http-proxy-agent": { - "version": "7.0.2", + "node_modules/function-timeout": { + "version": "1.0.2", "dev": true, "license": "MIT", - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, "engines": { - "node": ">= 14" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/http2-wrapper": { - "version": "2.2.1", + "node_modules/gensync": { + "version": "1.0.0-beta.2", "dev": true, "license": "MIT", - "dependencies": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.2.0" - }, "engines": { - "node": ">=10.19.0" + "node": ">=6.9.0" } }, - "node_modules/https-proxy-agent": { - "version": "7.0.6", + "node_modules/get-caller-file": { + "version": "2.0.5", "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.2", - "debug": "4" - }, + "license": "ISC", "engines": { - "node": ">= 14" + "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/human-signals": { - "version": "8.0.1", + "node_modules/get-east-asian-width": { + "version": "1.6.0", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "engines": { - "node": ">=18.18.0" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "dev": true, + "node_modules/get-intrinsic": { + "version": "1.3.0", "license": "MIT", "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/ignore": { - "version": "7.0.5", + "node_modules/get-package-type": { + "version": "0.1.0", "dev": true, "license": "MIT", "engines": { - "node": ">= 4" + "node": ">=8.0.0" } }, - "node_modules/immer": { - "version": "10.2.0", + "node_modules/get-proto": { + "version": "1.0.1", "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/immer" + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" } }, - "node_modules/import-fresh": { - "version": "3.3.1", + "node_modules/get-stream": { + "version": "9.0.1", + "dev": true, "license": "MIT", "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" + "@sec-ant/readable-stream": "^0.4.1", + "is-stream": "^4.0.1" }, "engines": { - "node": ">=6" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/import-local": { - "version": "3.2.0", + "node_modules/glob": { + "version": "10.5.0", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" + "glob": "dist/esm/bin.mjs" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/imurmurhash": { - "version": "0.1.4", + "node_modules/global-modules": { + "version": "1.0.0", "dev": true, "license": "MIT", + "dependencies": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + }, "engines": { - "node": ">=0.8.19" + "node": ">=0.10.0" } }, - "node_modules/indent-string": { - "version": "4.0.0", + "node_modules/global-prefix": { + "version": "1.0.2", "dev": true, "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", "dependencies": { - "once": "^1.3.0", - "wrappy": "1" + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/inherits": { - "version": "2.0.4", - "dev": true, - "license": "ISC" - }, - "node_modules/ini": { - "version": "1.3.8", + "node_modules/global-prefix/node_modules/isexe": { + "version": "2.0.0", "dev": true, "license": "ISC" }, - "node_modules/inspect-with-kind": { - "version": "1.0.5", + "node_modules/global-prefix/node_modules/which": { + "version": "1.3.1", "dev": true, "license": "ISC", "dependencies": { - "kind-of": "^6.0.2" - } - }, - "node_modules/internal-slot": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.2", - "side-channel": "^1.1.0" + "isexe": "^2.0.0" }, - "engines": { - "node": ">= 0.4" + "bin": { + "which": "bin/which" } }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "dev": true, + "node_modules/goober": { + "version": "2.1.19", "license": "MIT", - "engines": { - "node": ">= 0.10" + "peerDependencies": { + "csstype": "^3.0.10" } }, - "node_modules/is-array-buffer": { - "version": "3.0.5", - "dev": true, + "node_modules/gopd": { + "version": "1.2.0", "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, "engines": { "node": ">= 0.4" }, @@ -9803,74 +8502,66 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "license": "MIT" - }, - "node_modules/is-async-function": { - "version": "2.1.1", + "node_modules/got": { + "version": "14.6.6", "dev": true, "license": "MIT", "dependencies": { - "async-function": "^1.0.0", - "call-bound": "^1.0.3", - "get-proto": "^1.0.1", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" + "@sindresorhus/is": "^7.0.1", + "byte-counter": "^0.1.0", + "cacheable-lookup": "^7.0.0", + "cacheable-request": "^13.0.12", + "decompress-response": "^10.0.0", + "form-data-encoder": "^4.0.2", + "http2-wrapper": "^2.2.1", + "keyv": "^5.5.3", + "lowercase-keys": "^3.0.0", + "p-cancelable": "^4.0.1", + "responselike": "^4.0.2", + "type-fest": "^4.26.1" }, "engines": { - "node": ">= 0.4" + "node": ">=20" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sindresorhus/got?sponsor=1" } }, - "node_modules/is-bigint": { - "version": "1.1.0", + "node_modules/got/node_modules/keyv": { + "version": "5.6.0", "dev": true, "license": "MIT", "dependencies": { - "has-bigints": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "@keyv/serialize": "^1.1.1" } }, - "node_modules/is-boolean-object": { - "version": "1.2.2", + "node_modules/got/node_modules/type-fest": { + "version": "4.41.0", "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, + "license": "(MIT OR CC0-1.0)", "engines": { - "node": ">= 0.4" + "node": ">=16" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-callable": { - "version": "1.2.7", + "node_modules/graceful-fs": { + "version": "4.2.11", + "dev": true, + "license": "ISC" + }, + "node_modules/has-flag": { + "version": "4.0.0", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, - "node_modules/is-core-module": { - "version": "2.16.2", + "node_modules/has-symbols": { + "version": "1.1.0", "license": "MIT", - "dependencies": { - "hasown": "^2.0.3" - }, "engines": { "node": ">= 0.4" }, @@ -9878,255 +8569,255 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-data-view": { - "version": "1.0.2", - "dev": true, + "node_modules/hasown": { + "version": "2.0.4", "license": "MIT", "dependencies": { - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "is-typed-array": "^1.1.13" + "function-bind": "^1.1.2" }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-date-object": { - "version": "1.1.0", + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/hoist-non-react-statics/node_modules/react-is": { + "version": "16.13.1", + "license": "MIT", + "peer": true + }, + "node_modules/homedir-polyfill": { + "version": "1.0.3", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" + "parse-passwd": "^1.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/is-document.all": { - "version": "1.0.0", + "node_modules/html-encoding-sniffer": { + "version": "4.0.0", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.4" + "whatwg-encoding": "^3.1.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=18" } }, - "node_modules/is-extglob": { - "version": "2.1.1", + "node_modules/html-escaper": { + "version": "2.0.2", "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } + "license": "MIT" }, - "node_modules/is-finalizationregistry": { - "version": "1.1.1", + "node_modules/http-cache-semantics": { + "version": "4.2.0", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/http-errors": { + "version": "2.0.1", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.3" + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">= 0.8" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/express" } }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", + "node_modules/http-proxy-agent": { + "version": "7.0.2", "dev": true, "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, "engines": { - "node": ">=8" + "node": ">= 14" } }, - "node_modules/is-generator-fn": { - "version": "2.1.0", + "node_modules/http2-wrapper": { + "version": "2.2.1", "dev": true, "license": "MIT", + "dependencies": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.2.0" + }, "engines": { - "node": ">=6" + "node": ">=10.19.0" } }, - "node_modules/is-generator-function": { - "version": "1.1.2", + "node_modules/https-proxy-agent": { + "version": "7.0.6", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.4", - "generator-function": "^2.0.0", - "get-proto": "^1.0.1", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" + "agent-base": "^7.1.2", + "debug": "4" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 14" } }, - "node_modules/is-glob": { - "version": "4.0.3", + "node_modules/human-signals": { + "version": "8.0.1", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", "dev": true, "license": "MIT", "dependencies": { - "is-extglob": "^2.1.1" + "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/is-map": { - "version": "2.0.3", + "node_modules/ieee754": { + "version": "1.2.1", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/immer": { + "version": "10.2.0", "license": "MIT", - "engines": { - "node": ">= 0.4" - }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/immer" } }, - "node_modules/is-negative-zero": { - "version": "2.0.3", - "dev": true, + "node_modules/import-fresh": { + "version": "3.3.1", "license": "MIT", + "peer": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, "engines": { - "node": ">= 0.4" + "node": ">=6" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-number-object": { - "version": "1.1.1", + "node_modules/import-local": { + "version": "3.2.0", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" }, "engines": { - "node": ">= 0.4" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", + "node_modules/imurmurhash": { + "version": "0.1.4", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=0.8.19" } }, - "node_modules/is-plain-obj": { - "version": "4.1.0", + "node_modules/indent-string": { + "version": "4.0.0", "dev": true, "license": "MIT", "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, - "node_modules/is-potential-custom-element-name": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/is-regex": { - "version": "1.2.1", + "node_modules/inflight": { + "version": "1.0.6", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "call-bound": "^1.0.2", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "once": "^1.3.0", + "wrappy": "1" } }, - "node_modules/is-set": { - "version": "2.0.3", + "node_modules/inherits": { + "version": "2.0.4", "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "license": "ISC" }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.4", + "node_modules/ini": { + "version": "1.3.8", "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "license": "ISC" }, - "node_modules/is-stream": { - "version": "4.0.1", + "node_modules/inspect-with-kind": { + "version": "1.0.5", "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "license": "ISC", + "dependencies": { + "kind-of": "^6.0.2" } }, - "node_modules/is-string": { - "version": "1.1.1", + "node_modules/ipaddr.js": { + "version": "1.9.1", "dev": true, "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.10" } }, - "node_modules/is-symbol": { - "version": "1.1.1", - "dev": true, + "node_modules/is-arrayish": { + "version": "0.2.1", + "license": "MIT" + }, + "node_modules/is-core-module": { + "version": "2.16.2", "license": "MIT", "dependencies": { - "call-bound": "^1.0.2", - "has-symbols": "^1.1.0", - "safe-regex-test": "^1.1.0" + "hasown": "^2.0.3" }, "engines": { "node": ">= 0.4" @@ -10135,69 +8826,58 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-typed-array": { - "version": "1.1.15", + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", "dev": true, "license": "MIT", - "dependencies": { - "which-typed-array": "^1.1.16" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, - "node_modules/is-unicode-supported": { + "node_modules/is-generator-fn": { "version": "2.1.0", "dev": true, "license": "MIT", "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=6" } }, - "node_modules/is-weakmap": { - "version": "2.0.2", + "node_modules/is-plain-obj": { + "version": "4.1.0", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.4" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-weakref": { - "version": "1.1.1", + "node_modules/is-potential-custom-element-name": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/is-stream": { + "version": "4.0.1", "dev": true, "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, "engines": { - "node": ">= 0.4" + "node": ">=18" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-weakset": { - "version": "2.0.4", + "node_modules/is-unicode-supported": { + "version": "2.1.0", "dev": true, "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, "engines": { - "node": ">= 0.4" + "node": ">=18" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-windows": { @@ -10208,11 +8888,6 @@ "node": ">=0.10.0" } }, - "node_modules/isarray": { - "version": "2.0.5", - "dev": true, - "license": "MIT" - }, "node_modules/isexe": { "version": "4.0.0", "dev": true, @@ -10289,22 +8964,6 @@ "node": ">=8" } }, - "node_modules/iterator.prototype": { - "version": "1.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.6", - "get-proto": "^1.0.0", - "has-symbols": "^1.1.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/jackspeak": { "version": "3.4.3", "dev": true, @@ -11287,27 +9946,6 @@ "version": "4.0.0", "license": "MIT" }, - "node_modules/js-yaml": { - "version": "4.3.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/puzrin" - }, - { - "type": "github", - "url": "https://github.com/sponsors/nodeca" - } - ], - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/jsdom": { "version": "26.1.0", "dev": true, @@ -11356,25 +9994,10 @@ "node": ">=6" } }, - "node_modules/json-buffer": { - "version": "3.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "license": "MIT" }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/json5": { "version": "2.2.3", "dev": true, @@ -11391,28 +10014,6 @@ "dev": true, "license": "MIT" }, - "node_modules/jsx-ast-utils": { - "version": "3.3.5", - "dev": true, - "license": "MIT", - "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flat": "^1.3.1", - "object.assign": "^4.1.4", - "object.values": "^1.1.6" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, "node_modules/kind-of": { "version": "6.0.3", "dev": true, @@ -11421,22 +10022,6 @@ "node": ">=0.10.0" } }, - "node_modules/language-subtag-registry": { - "version": "0.3.23", - "dev": true, - "license": "CC0-1.0" - }, - "node_modules/language-tags": { - "version": "1.0.9", - "dev": true, - "license": "MIT", - "dependencies": { - "language-subtag-registry": "^0.3.20" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/leven": { "version": "3.1.0", "dev": true, @@ -11445,45 +10030,14 @@ "node": ">=6" } }, - "node_modules/levn": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/lines-and-columns": { "version": "1.2.4", "license": "MIT" }, - "node_modules/locate-path": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/lodash": { "version": "4.18.1", "license": "MIT" }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "dev": true, - "license": "MIT" - }, "node_modules/long-timeout": { "version": "0.1.1", "dev": true, @@ -11745,14 +10299,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/minimist": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/minipass": { "version": "7.1.3", "dev": true, @@ -11810,31 +10356,6 @@ "node": ">=10.5.0" } }, - "node_modules/node-exports-info": { - "version": "1.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "array.prototype.flatmap": "^1.3.3", - "es-errors": "^1.3.0", - "object.entries": "^1.1.9", - "semver": "^6.3.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/node-exports-info/node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/node-fetch": { "version": "3.3.2", "devOptional": true, @@ -11982,94 +10503,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object-keys": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.7", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0", - "has-symbols": "^1.1.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.entries": { - "version": "1.1.9", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.fromentries": { - "version": "2.0.8", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.groupby": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.values": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/on-finished": { "version": "2.4.1", "dev": true, @@ -12103,36 +10536,105 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/optionator": { - "version": "0.9.4", + "node_modules/oxfmt": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/oxfmt/-/oxfmt-0.55.0.tgz", + "integrity": "sha512-jSj2wCTakwgPMxkfiVZX0jf+nX+Nz6xlyAZjqNE0qXTFdCBPYlP6JAN+ODjmealw7DXBjOzYbdsqwBMAZnPZ6A==", "dev": true, "license": "MIT", "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" + "tinypool": "2.1.0" + }, + "bin": { + "oxfmt": "bin/oxfmt" }, "engines": { - "node": ">= 0.8.0" + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/Boshen" + }, + "optionalDependencies": { + "@oxfmt/binding-android-arm-eabi": "0.55.0", + "@oxfmt/binding-android-arm64": "0.55.0", + "@oxfmt/binding-darwin-arm64": "0.55.0", + "@oxfmt/binding-darwin-x64": "0.55.0", + "@oxfmt/binding-freebsd-x64": "0.55.0", + "@oxfmt/binding-linux-arm-gnueabihf": "0.55.0", + "@oxfmt/binding-linux-arm-musleabihf": "0.55.0", + "@oxfmt/binding-linux-arm64-gnu": "0.55.0", + "@oxfmt/binding-linux-arm64-musl": "0.55.0", + "@oxfmt/binding-linux-ppc64-gnu": "0.55.0", + "@oxfmt/binding-linux-riscv64-gnu": "0.55.0", + "@oxfmt/binding-linux-riscv64-musl": "0.55.0", + "@oxfmt/binding-linux-s390x-gnu": "0.55.0", + "@oxfmt/binding-linux-x64-gnu": "0.55.0", + "@oxfmt/binding-linux-x64-musl": "0.55.0", + "@oxfmt/binding-openharmony-arm64": "0.55.0", + "@oxfmt/binding-win32-arm64-msvc": "0.55.0", + "@oxfmt/binding-win32-ia32-msvc": "0.55.0", + "@oxfmt/binding-win32-x64-msvc": "0.55.0" + }, + "peerDependencies": { + "svelte": "^5.0.0", + "vite-plus": "*" + }, + "peerDependenciesMeta": { + "svelte": { + "optional": true + }, + "vite-plus": { + "optional": true + } } }, - "node_modules/own-keys": { - "version": "1.0.1", + "node_modules/oxlint": { + "version": "1.70.0", + "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.70.0.tgz", + "integrity": "sha512-D6JgHtzkhRwvEC+A0Nw5AEc5bk8x5i1pHzvZIEf/a0C4hOzmAACNGtkDGPyFaxxX3ZVGxCPeig3P3rMM8XU3/g==", "dev": true, "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.6", - "object-keys": "^1.1.1", - "safe-push-apply": "^1.0.0" + "bin": { + "oxlint": "bin/oxlint" }, "engines": { - "node": ">= 0.4" + "node": "^20.19.0 || >=22.12.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/Boshen" + }, + "optionalDependencies": { + "@oxlint/binding-android-arm-eabi": "1.70.0", + "@oxlint/binding-android-arm64": "1.70.0", + "@oxlint/binding-darwin-arm64": "1.70.0", + "@oxlint/binding-darwin-x64": "1.70.0", + "@oxlint/binding-freebsd-x64": "1.70.0", + "@oxlint/binding-linux-arm-gnueabihf": "1.70.0", + "@oxlint/binding-linux-arm-musleabihf": "1.70.0", + "@oxlint/binding-linux-arm64-gnu": "1.70.0", + "@oxlint/binding-linux-arm64-musl": "1.70.0", + "@oxlint/binding-linux-ppc64-gnu": "1.70.0", + "@oxlint/binding-linux-riscv64-gnu": "1.70.0", + "@oxlint/binding-linux-riscv64-musl": "1.70.0", + "@oxlint/binding-linux-s390x-gnu": "1.70.0", + "@oxlint/binding-linux-x64-gnu": "1.70.0", + "@oxlint/binding-linux-x64-musl": "1.70.0", + "@oxlint/binding-openharmony-arm64": "1.70.0", + "@oxlint/binding-win32-arm64-msvc": "1.70.0", + "@oxlint/binding-win32-ia32-msvc": "1.70.0", + "@oxlint/binding-win32-x64-msvc": "1.70.0" + }, + "peerDependencies": { + "oxlint-tsgolint": ">=0.22.1", + "vite-plus": "*" + }, + "peerDependenciesMeta": { + "oxlint-tsgolint": { + "optional": true + }, + "vite-plus": { + "optional": true + } } }, "node_modules/p-cancelable": { @@ -12171,20 +10673,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-locate": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/p-timeout": { "version": "6.1.4", "dev": true, @@ -12212,6 +10700,7 @@ "node_modules/parent-module": { "version": "1.0.1", "license": "MIT", + "peer": true, "dependencies": { "callsites": "^3.0.0" }, @@ -12469,48 +10958,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/possible-typed-array-names": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "3.9.4", - "dev": true, - "license": "MIT", - "peer": true, - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/prettier-linter-helpers": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-diff": "^1.1.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/pretty-format": { "version": "27.5.1", "dev": true, @@ -12616,25 +11063,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, "node_modules/quick-lru": { "version": "5.1.1", "dev": true, @@ -12879,46 +11307,6 @@ "node": ">=8" } }, - "node_modules/reflect.getprototypeof": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.7", - "get-proto": "^1.0.1", - "which-builtin-type": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.4", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/remove-accents": { "version": "0.5.0", "license": "MIT" @@ -13000,6 +11388,7 @@ "node_modules/resolve-from": { "version": "4.0.0", "license": "MIT", + "peer": true, "engines": { "node": ">=4" } @@ -13018,68 +11407,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/reusify": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/brace-expansion": { - "version": "1.1.15", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/minimatch": { - "version": "3.1.5", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/rrweb-cssom": { "version": "0.8.0", "dev": true, @@ -13113,28 +11440,6 @@ } } }, - "node_modules/run-parallel": { - "version": "1.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, "node_modules/rxjs": { "version": "7.8.2", "dev": true, @@ -13143,24 +11448,6 @@ "tslib": "^2.1.0" } }, - "node_modules/safe-array-concat": { - "version": "1.1.4", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "get-intrinsic": "^1.3.0", - "has-symbols": "^1.1.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/safe-buffer": { "version": "5.2.1", "dev": true, @@ -13180,37 +11467,6 @@ ], "license": "MIT" }, - "node_modules/safe-push-apply": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-regex-test": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-regex": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/safer-buffer": { "version": "2.1.2", "dev": true, @@ -13393,49 +11649,6 @@ "node": ">= 0.8.0" } }, - "node_modules/set-function-length": { - "version": "1.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-function-name": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-proto": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/setprototypeof": { "version": "1.2.0", "dev": true, @@ -13651,18 +11864,6 @@ "node": ">= 0.8" } }, - "node_modules/stop-iteration-iterator": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "internal-slot": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/streamx": { "version": "2.28.0", "dev": true, @@ -13745,108 +11946,6 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/string.prototype.includes": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/string.prototype.matchall": { - "version": "4.0.12", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.6", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.6", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "internal-slot": "^1.1.0", - "regexp.prototype.flags": "^1.5.3", - "set-function-name": "^2.0.2", - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.repeat": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "node_modules/string.prototype.trim": { - "version": "1.2.11", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "define-data-property": "^1.1.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.24.2", - "es-object-atoms": "^1.1.2", - "has-property-descriptors": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.8", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/strip-ansi": { "version": "6.0.1", "dev": true, @@ -14126,11 +12225,6 @@ } } }, - "node_modules/text-table": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, "node_modules/through": { "version": "2.3.8", "dev": true, @@ -14169,6 +12263,16 @@ "url": "https://github.com/sponsors/SuperchupuDev" } }, + "node_modules/tinypool": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-2.1.0.tgz", + "integrity": "sha512-Pugqs6M0m7Lv1I7FtxN4aoyToKg1C4tu+/381vH35y8oENM/Ai7f7C4StcoK4/+BSw9ebcS8jRiVrORFKCALLw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.0.0 || >=22.0.0" + } + }, "node_modules/tldts": { "version": "6.1.86", "dev": true, @@ -14245,17 +12349,6 @@ "tree-kill": "cli.js" } }, - "node_modules/ts-api-utils": { - "version": "2.5.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.12" - }, - "peerDependencies": { - "typescript": ">=4.8.4" - } - }, "node_modules/ts-node": { "version": "10.9.2", "dev": true, @@ -14298,36 +12391,6 @@ } } }, - "node_modules/tsconfig-paths": { - "version": "3.15.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, - "node_modules/tsconfig-paths/node_modules/json5": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/tsconfig-paths/node_modules/strip-bom": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/tslib": { "version": "2.8.1", "devOptional": true, @@ -14349,17 +12412,6 @@ "@turbo/windows-arm64": "2.10.2" } }, - "node_modules/type-check": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/type-detect": { "version": "4.0.8", "dev": true, @@ -14368,17 +12420,6 @@ "node": ">=4" } }, - "node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/type-is": { "version": "1.6.18", "dev": true, @@ -14391,76 +12432,6 @@ "node": ">= 0.6" } }, - "node_modules/typed-array-buffer": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/typed-array-byte-length": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-byte-offset": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.15", - "reflect.getprototypeof": "^1.0.9" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-length": { - "version": "1.0.8", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.9", - "for-each": "^0.3.5", - "gopd": "^1.2.0", - "is-typed-array": "^1.1.15", - "possible-typed-array-names": "^1.1.0", - "reflect.getprototypeof": "^1.0.10" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/typed-function": { "version": "2.1.0", "engines": { @@ -14489,23 +12460,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/unbox-primitive": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-bigints": "^1.0.2", - "has-symbols": "^1.1.0", - "which-boxed-primitive": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/unbzip2-stream": { "version": "1.4.3", "dev": true, @@ -14621,14 +12575,6 @@ "browserslist": ">= 4.21.0" } }, - "node_modules/uri-js": { - "version": "4.4.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, "node_modules/use-immer": { "version": "0.11.0", "license": "MIT", @@ -14804,100 +12750,11 @@ "node": ">= 8" } }, - "node_modules/which-boxed-primitive": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-bigint": "^1.1.0", - "is-boolean-object": "^1.2.1", - "is-number-object": "^1.1.1", - "is-string": "^1.1.1", - "is-symbol": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-builtin-type": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "function.prototype.name": "^1.1.6", - "has-tostringtag": "^1.0.2", - "is-async-function": "^2.0.0", - "is-date-object": "^1.1.0", - "is-finalizationregistry": "^1.1.0", - "is-generator-function": "^1.0.10", - "is-regex": "^1.2.1", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.1.0", - "which-collection": "^1.0.2", - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-collection": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.22", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "for-each": "^0.3.5", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/which/node_modules/isexe": { "version": "2.0.0", "dev": true, "license": "ISC" }, - "node_modules/word-wrap": { - "version": "1.2.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/wrap-ansi": { "version": "8.1.0", "dev": true, diff --git a/package.json b/package.json index 812c9f3b1..5b2aa75d4 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,10 @@ "dev": "turbo run dev --concurrency 20", "build": "turbo run build", "lint": "turbo run lint", + "lint:ci": "oxlint */src --max-warnings=1494", "lint:fix": "turbo run lint -- --fix", + "format": "oxfmt", + "format:check": "oxfmt --check", "test": "turbo run test", "type-check": "turbo run type-check" }, @@ -69,20 +72,14 @@ "@types/express": "^5.0.0", "@types/jest": "^30.0.0", "@types/lodash": "^4.17.5", - "@typescript-eslint/eslint-plugin": "^8.18.0", "concurrently": "^10.0.3", "cross-env": "^7.0.3", - "eslint": "^8.57.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-import": "^2.29.1", - "eslint-plugin-jsx-a11y": "^6.8.0", - "eslint-plugin-prettier": "^5.1.3", - "eslint-plugin-react": "^7.34.1", - "eslint-plugin-react-hooks": "^4.6.2", "express": "^4.21.2", "jest": "^30.4.2", "jest-environment-jsdom": "^30.4.1", "mdi-material-ui": "^7.9.2", + "oxfmt": "0.55.0", + "oxlint": "1.70.0", "react-router": "^6.30.3", "react-router-dom": "^6.30.3", "rsbuild-plugin-dts": "^0.18.0", diff --git a/piechart/jest.config.ts b/piechart/jest.config.ts index 5190fb4de..16027133b 100644 --- a/piechart/jest.config.ts +++ b/piechart/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/piechart/package.json b/piechart/package.json index 0456bb9d6..03d15b3be 100644 --- a/piechart/package.json +++ b/piechart/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/piechart/rsbuild.config.ts b/piechart/rsbuild.config.ts index c204957b6..76c72a82b 100644 --- a/piechart/rsbuild.config.ts +++ b/piechart/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/piechart/schemas/migrate/tests/basic/expected.json b/piechart/schemas/migrate/tests/basic/expected.json index ff131403c..5bb902294 100644 --- a/piechart/schemas/migrate/tests/basic/expected.json +++ b/piechart/schemas/migrate/tests/basic/expected.json @@ -10,4 +10,4 @@ "colorPalette": ["#e02f44"], "radius": 50 } -} \ No newline at end of file +} diff --git a/piechart/schemas/migrate/tests/basic/input.json b/piechart/schemas/migrate/tests/basic/input.json index 4f6b0843b..5c47a00ec 100644 --- a/piechart/schemas/migrate/tests/basic/input.json +++ b/piechart/schemas/migrate/tests/basic/input.json @@ -31,9 +31,7 @@ }, "pieType": "pie", "reduceOptions": { - "calcs": [ - "lastNotNull" - ], + "calcs": ["lastNotNull"], "fields": "", "values": false }, @@ -41,9 +39,7 @@ "mode": "single", "sort": "none" }, - "displayLabels": [ - "name" - ] + "displayLabels": ["name"] }, "pluginVersion": "11.3.0-pre", "targets": [ @@ -60,4 +56,4 @@ ], "title": "Piechart sample", "type": "piechart" -} \ No newline at end of file +} diff --git a/piechart/schemas/tests/valid/pie.json b/piechart/schemas/tests/valid/pie.json index eabb9548e..17b19f435 100644 --- a/piechart/schemas/tests/valid/pie.json +++ b/piechart/schemas/tests/valid/pie.json @@ -15,4 +15,4 @@ "radius": 50, "showLabels": true } -} \ No newline at end of file +} diff --git a/piechart/src/PieChart.ts b/piechart/src/PieChart.ts index d64d1dde5..bb63d6d31 100644 --- a/piechart/src/PieChart.ts +++ b/piechart/src/PieChart.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PanelPlugin } from '@perses-dev/plugin-system'; + import { createInitialPieChartOptions, PieChartOptions } from './pie-chart-model'; import { PieChartOptionsEditorSettings } from './PieChartOptionsEditorSettings'; import { PieChartPanel, PieChartPanelProps } from './PieChartPanel'; diff --git a/piechart/src/PieChartBase.tsx b/piechart/src/PieChartBase.tsx index 42386b69a..9c3f002c8 100644 --- a/piechart/src/PieChartBase.tsx +++ b/piechart/src/PieChartBase.tsx @@ -11,16 +11,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { use } from 'echarts/core'; +import { Box, useTheme } from '@mui/material'; +import { EChart, FormatOptions, ModeOption, useChartsTheme } from '@perses-dev/components'; import { PieChart as EChartsPieChart } from 'echarts/charts'; import { DatasetComponent, GridComponent, LegendComponent, TitleComponent, TooltipComponent } from 'echarts/components'; +import { use as registerECharts } from 'echarts/core'; import { CanvasRenderer } from 'echarts/renderers'; -import { Box, useTheme } from '@mui/material'; import { ReactElement } from 'react'; -import { EChart, FormatOptions, ModeOption, useChartsTheme } from '@perses-dev/components'; + import { getLabelFormatter, getTooltipFormatter } from './utils'; -use([ +registerECharts([ EChartsPieChart, GridComponent, DatasetComponent, diff --git a/piechart/src/PieChartOptionsEditorSettings.tsx b/piechart/src/PieChartOptionsEditorSettings.tsx index 8eb56594c..5d6935d26 100644 --- a/piechart/src/PieChartOptionsEditorSettings.tsx +++ b/piechart/src/PieChartOptionsEditorSettings.tsx @@ -11,16 +11,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -import merge from 'lodash/merge'; -import omit from 'lodash/omit'; import { - CalculationSelector, - CalculationSelectorProps, - CalculationType, - LegendOptionsEditor, - LegendOptionsEditorProps, -} from '@perses-dev/plugin-system'; -import { produce } from 'immer'; + Button, + FormControl, + InputLabel, + MenuItem, + Select, + Stack, + Switch, + SwitchProps, + Typography, +} from '@mui/material'; import { FormatControls, FormatControlsProps, @@ -41,17 +42,17 @@ import { isUnitWithShortValues, } from '@perses-dev/components'; import { - Button, - FormControl, - InputLabel, - MenuItem, - Select, - Stack, - Switch, - SwitchProps, - Typography, -} from '@mui/material'; + CalculationSelector, + CalculationSelectorProps, + CalculationType, + LegendOptionsEditor, + LegendOptionsEditorProps, +} from '@perses-dev/plugin-system'; +import { produce } from 'immer'; +import merge from 'lodash/merge'; +import omit from 'lodash/omit'; import { ReactElement, useMemo } from 'react'; + import { PieChartOptions, PieChartOptionsEditorProps, DEFAULT_FORMAT } from './pie-chart-model'; export function PieChartOptionsEditorSettings(props: PieChartOptionsEditorProps): ReactElement { @@ -136,7 +137,10 @@ export function PieChartOptionsEditorSettings(props: PieChartOptionsEditorProps) type ColorScheme = 'default' | 'theme' | 'gradient'; const colorScheme: ColorScheme = useMemo(() => { - return Array.isArray(colorPalette) ? (colorPalette.length === 1 ? 'gradient' : 'theme') : 'default'; + if (!Array.isArray(colorPalette)) { + return 'default'; + } + return colorPalette.length === 1 ? 'gradient' : 'theme'; }, [colorPalette]); const handleColorSchemeChange = (scheme: ColorScheme): void => { diff --git a/piechart/src/PieChartPanel.tsx b/piechart/src/PieChartPanel.tsx index f60e66547..e092e1a4c 100644 --- a/piechart/src/PieChartPanel.tsx +++ b/piechart/src/PieChartPanel.tsx @@ -22,19 +22,20 @@ import { useId, } from '@perses-dev/components'; import { CalculationsMap, CalculationType, PanelProps, validateLegendSpec } from '@perses-dev/plugin-system'; +import { TimeSeriesData } from '@perses-dev/spec'; import merge from 'lodash/merge'; import { ReactElement, useMemo, useRef, useState } from 'react'; -import { TimeSeriesData } from '@perses-dev/spec'; -import { PieChartOptions } from './pie-chart-model'; -import { PieChartLegendMapper, PieChartListLegendMapper, PieChartTableLegendMapper, sortSeriesData } from './utils'; + import { getSeriesColor } from './colors'; +import { PieChartOptions } from './pie-chart-model'; import { PieChartBase, PieChartData } from './PieChartBase'; +import { PieChartLegendMapper, PieChartListLegendMapper, PieChartTableLegendMapper, sortSeriesData } from './utils'; export type PieChartPanelProps = PanelProps; export function PieChartPanel(props: PieChartPanelProps): ReactElement | null { const { - spec: { calculation, sort, mode, format: formatOptions, legend: pieChartLegend, colorPalette: colorPalette }, + spec: { calculation, sort, mode, format: formatOptions, legend: pieChartLegend, colorPalette }, contentDimensions, queryResults, } = props; diff --git a/piechart/src/colors.ts b/piechart/src/colors.ts index 6be745cb3..8cdd31c4d 100644 --- a/piechart/src/colors.ts +++ b/piechart/src/colors.ts @@ -117,7 +117,7 @@ export function getSeriesColor(seriesNames: string[], colorPalette?: string[]): colors.push(generateGradientColor(baseColor, gradientFactor)); } } - return colors.sort((a, b) => { + return colors.toSorted((a, b) => { const seedA = stringToSeed(seriesNames[colors.indexOf(a)] || 'fallback'); const seedB = stringToSeed(seriesNames[colors.indexOf(b)] || 'fallback'); return seedA - seedB; @@ -131,7 +131,7 @@ export function getSeriesColor(seriesNames: string[], colorPalette?: string[]): } if (totalSeries > colorPalette.length) { - return colors.sort((a, b) => { + return colors.toSorted((a, b) => { const seedA = stringToSeed(seriesNames[colors.indexOf(a)] || 'fallback'); const seedB = stringToSeed(seriesNames[colors.indexOf(b)] || 'fallback'); return seedA - seedB; diff --git a/piechart/src/getPluginModule.ts b/piechart/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/piechart/src/getPluginModule.ts +++ b/piechart/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/piechart/src/utils.test.ts b/piechart/src/utils.test.ts index 8a895f152..f613beffe 100644 --- a/piechart/src/utils.test.ts +++ b/piechart/src/utils.test.ts @@ -12,6 +12,7 @@ // limitations under the License. import { CellContext, ColumnDefTemplate } from '@tanstack/react-table'; + import { PieChartData } from './PieChartBase'; import { PieChartListLegendMapper, PieChartTableLegendMapper, sortSeriesData } from './utils'; diff --git a/piechart/src/utils.ts b/piechart/src/utils.ts index 388223454..e2dbce262 100644 --- a/piechart/src/utils.ts +++ b/piechart/src/utils.ts @@ -19,13 +19,14 @@ import { SortOption, TableColumnConfig, } from '@perses-dev/components'; -import { format } from 'echarts'; import { comparisonLegends, ComparisonValues, LegendValue } from '@perses-dev/plugin-system'; -import { PieChartData } from './PieChartBase'; +import { format } from 'echarts'; + import { DEFAULT_SORT } from './pie-chart-model'; +import { PieChartData } from './PieChartBase'; export function sortSeriesData(data: T[], sortOrder: SortOption = DEFAULT_SORT): T[] { - return data.sort((a, b) => { + return data.toSorted((a, b) => { // Handle null values - push them to the end regardless of sort order if (a.value === null && b.value === null) return 0; if (a.value === null) return 1; diff --git a/prometheus/jest.config.ts b/prometheus/jest.config.ts index 5190fb4de..16027133b 100644 --- a/prometheus/jest.config.ts +++ b/prometheus/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/prometheus/package.json b/prometheus/package.json index dfecd2b08..8b388036f 100644 --- a/prometheus/package.json +++ b/prometheus/package.json @@ -18,7 +18,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/prometheus/rsbuild.config.ts b/prometheus/rsbuild.config.ts index c4956cbb4..c535200b1 100644 --- a/prometheus/rsbuild.config.ts +++ b/prometheus/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/prometheus/schemas/datasource/tests/valid/prometheus-proxy-with-query-params.json b/prometheus/schemas/datasource/tests/valid/prometheus-proxy-with-query-params.json index 4ec7368a9..50e42545e 100644 --- a/prometheus/schemas/datasource/tests/valid/prometheus-proxy-with-query-params.json +++ b/prometheus/schemas/datasource/tests/valid/prometheus-proxy-with-query-params.json @@ -13,4 +13,4 @@ "tenant": "default" } } -} \ No newline at end of file +} diff --git a/prometheus/schemas/datasource/tests/valid/prometheus-with-query-params.json b/prometheus/schemas/datasource/tests/valid/prometheus-with-query-params.json index d59185e51..a7fe65d70 100644 --- a/prometheus/schemas/datasource/tests/valid/prometheus-with-query-params.json +++ b/prometheus/schemas/datasource/tests/valid/prometheus-with-query-params.json @@ -8,4 +8,4 @@ "timeout": "30s" } } -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-label-names/migrate/tests/basic/expected.json b/prometheus/schemas/prometheus-label-names/migrate/tests/basic/expected.json index cbcd24edb..74d5052c5 100644 --- a/prometheus/schemas/prometheus-label-names/migrate/tests/basic/expected.json +++ b/prometheus/schemas/prometheus-label-names/migrate/tests/basic/expected.json @@ -3,4 +3,4 @@ "spec": { "matchers": [] } -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-label-names/migrate/tests/basic/input.json b/prometheus/schemas/prometheus-label-names/migrate/tests/basic/input.json index 709d6b100..3eeedd799 100644 --- a/prometheus/schemas/prometheus-label-names/migrate/tests/basic/input.json +++ b/prometheus/schemas/prometheus-label-names/migrate/tests/basic/input.json @@ -1,4 +1,3 @@ - { "current": {}, "datasource": { @@ -20,4 +19,4 @@ "skipUrlSync": false, "sort": 0, "type": "query" -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-label-names/tests/valid/prometheus-label-names.json b/prometheus/schemas/prometheus-label-names/tests/valid/prometheus-label-names.json index a27e70b5a..889274946 100644 --- a/prometheus/schemas/prometheus-label-names/tests/valid/prometheus-label-names.json +++ b/prometheus/schemas/prometheus-label-names/tests/valid/prometheus-label-names.json @@ -1,9 +1,6 @@ - { "kind": "PrometheusLabelNamesVariable", "spec": { - "matchers": [ - "up{job=\"$job\"}" - ] + "matchers": ["up{job=\"$job\"}"] } } diff --git a/prometheus/schemas/prometheus-label-values/migrate/tests/basic-2/expected.json b/prometheus/schemas/prometheus-label-values/migrate/tests/basic-2/expected.json index 66ad27bf3..89c44f838 100644 --- a/prometheus/schemas/prometheus-label-values/migrate/tests/basic-2/expected.json +++ b/prometheus/schemas/prometheus-label-values/migrate/tests/basic-2/expected.json @@ -2,8 +2,6 @@ "kind": "PrometheusLabelValuesVariable", "spec": { "labelName": "stack", - "matchers": [ - "thanos_build_info" - ] + "matchers": ["thanos_build_info"] } -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-label-values/migrate/tests/basic-2/input.json b/prometheus/schemas/prometheus-label-values/migrate/tests/basic-2/input.json index 4ffa50fe7..02167ab29 100644 --- a/prometheus/schemas/prometheus-label-values/migrate/tests/basic-2/input.json +++ b/prometheus/schemas/prometheus-label-values/migrate/tests/basic-2/input.json @@ -1,4 +1,3 @@ - { "current": {}, "datasource": { @@ -22,4 +21,4 @@ "skipUrlSync": false, "sort": 0, "type": "query" -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-label-values/migrate/tests/basic-3/expected.json b/prometheus/schemas/prometheus-label-values/migrate/tests/basic-3/expected.json index 02f0bda36..c0ca6ca02 100644 --- a/prometheus/schemas/prometheus-label-values/migrate/tests/basic-3/expected.json +++ b/prometheus/schemas/prometheus-label-values/migrate/tests/basic-3/expected.json @@ -2,8 +2,6 @@ "kind": "PrometheusLabelValuesVariable", "spec": { "labelName": "stack", - "matchers": [ - "thanos_build_info{stack=~\"erd.+\"}" - ] + "matchers": ["thanos_build_info{stack=~\"erd.+\"}"] } -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-label-values/migrate/tests/basic-3/input.json b/prometheus/schemas/prometheus-label-values/migrate/tests/basic-3/input.json index 0bef37b38..baba78cd0 100644 --- a/prometheus/schemas/prometheus-label-values/migrate/tests/basic-3/input.json +++ b/prometheus/schemas/prometheus-label-values/migrate/tests/basic-3/input.json @@ -1,4 +1,3 @@ - { "current": {}, "datasource": { @@ -22,4 +21,4 @@ "skipUrlSync": false, "sort": 1, "type": "query" -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-label-values/migrate/tests/basic-4/expected.json b/prometheus/schemas/prometheus-label-values/migrate/tests/basic-4/expected.json index 70861bfc9..b13688668 100644 --- a/prometheus/schemas/prometheus-label-values/migrate/tests/basic-4/expected.json +++ b/prometheus/schemas/prometheus-label-values/migrate/tests/basic-4/expected.json @@ -2,8 +2,6 @@ "kind": "PrometheusLabelValuesVariable", "spec": { "labelName": "stack", - "matchers": [ - "thanos_build_info{stack=~\"$lv1\"}" - ] + "matchers": ["thanos_build_info{stack=~\"$lv1\"}"] } -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-label-values/migrate/tests/basic-4/input.json b/prometheus/schemas/prometheus-label-values/migrate/tests/basic-4/input.json index ed216b59e..7e752f7dd 100644 --- a/prometheus/schemas/prometheus-label-values/migrate/tests/basic-4/input.json +++ b/prometheus/schemas/prometheus-label-values/migrate/tests/basic-4/input.json @@ -1,4 +1,3 @@ - { "current": {}, "datasource": { @@ -22,4 +21,4 @@ "skipUrlSync": false, "sort": 2, "type": "query" -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-label-values/migrate/tests/basic/expected.json b/prometheus/schemas/prometheus-label-values/migrate/tests/basic/expected.json index 48db1b9bc..454cf393f 100644 --- a/prometheus/schemas/prometheus-label-values/migrate/tests/basic/expected.json +++ b/prometheus/schemas/prometheus-label-values/migrate/tests/basic/expected.json @@ -4,4 +4,4 @@ "labelName": "stack", "matchers": [] } -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-label-values/migrate/tests/basic/input.json b/prometheus/schemas/prometheus-label-values/migrate/tests/basic/input.json index 31f21812c..bd6feb7c4 100644 --- a/prometheus/schemas/prometheus-label-values/migrate/tests/basic/input.json +++ b/prometheus/schemas/prometheus-label-values/migrate/tests/basic/input.json @@ -22,4 +22,4 @@ "skipUrlSync": false, "sort": 0, "type": "query" -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-label-values/tests/valid/prometheus-label-values.json b/prometheus/schemas/prometheus-label-values/tests/valid/prometheus-label-values.json index 1006dd090..6829b113c 100644 --- a/prometheus/schemas/prometheus-label-values/tests/valid/prometheus-label-values.json +++ b/prometheus/schemas/prometheus-label-values/tests/valid/prometheus-label-values.json @@ -1,10 +1,7 @@ - { "kind": "PrometheusLabelValuesVariable", "spec": { "labelName": "job", - "matchers": [ - "up{job=\"$job\"}" - ] + "matchers": ["up{job=\"$job\"}"] } } diff --git a/prometheus/schemas/prometheus-promql/migrate/tests/basic/expected.json b/prometheus/schemas/prometheus-promql/migrate/tests/basic/expected.json index cae1b7783..e8ea635ac 100644 --- a/prometheus/schemas/prometheus-promql/migrate/tests/basic/expected.json +++ b/prometheus/schemas/prometheus-promql/migrate/tests/basic/expected.json @@ -4,4 +4,4 @@ "expr": "group by(type) (up{osname=~\".*Linux.*\", job=~\"node-exporter.*\", prometheus=~\"system\"})", "labelName": "type" } -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-promql/migrate/tests/basic/input.json b/prometheus/schemas/prometheus-promql/migrate/tests/basic/input.json index 76d94797a..2f9f2aa41 100644 --- a/prometheus/schemas/prometheus-promql/migrate/tests/basic/input.json +++ b/prometheus/schemas/prometheus-promql/migrate/tests/basic/input.json @@ -1,4 +1,3 @@ - { "current": {}, "datasource": { @@ -22,4 +21,4 @@ "skipUrlSync": false, "sort": 5, "type": "query" -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-promql/migrate/tests/legacy-format/expected.json b/prometheus/schemas/prometheus-promql/migrate/tests/legacy-format/expected.json index 8cc4bcaf1..81e661366 100644 --- a/prometheus/schemas/prometheus-promql/migrate/tests/legacy-format/expected.json +++ b/prometheus/schemas/prometheus-promql/migrate/tests/legacy-format/expected.json @@ -4,4 +4,4 @@ "expr": "max by (cluster) (thanos_build_info{prometheus=\"app\",federation=\"\"}) or ( label_replace(vector(1), \"cluster\", \"EU\", \"\", \"\") ) ", "labelName": "cluster" } -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-promql/migrate/tests/legacy-format/input.json b/prometheus/schemas/prometheus-promql/migrate/tests/legacy-format/input.json index d9d1cb003..4cb54e3c2 100644 --- a/prometheus/schemas/prometheus-promql/migrate/tests/legacy-format/input.json +++ b/prometheus/schemas/prometheus-promql/migrate/tests/legacy-format/input.json @@ -24,4 +24,4 @@ "tagsQuery": "", "type": "query", "useTags": false -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-promql/migrate/tests/no-aggr/expected.json b/prometheus/schemas/prometheus-promql/migrate/tests/no-aggr/expected.json index 7a77b7453..4058655d5 100644 --- a/prometheus/schemas/prometheus-promql/migrate/tests/no-aggr/expected.json +++ b/prometheus/schemas/prometheus-promql/migrate/tests/no-aggr/expected.json @@ -4,4 +4,4 @@ "expr": "query_result(present_over_time(up{osname=~\".*Linux.*\", job=~\"node-exporter\", prometheus=~\"system\"}[$__range]))", "labelName": "migration_from_grafana_not_supported" } -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-promql/migrate/tests/no-aggr/input.json b/prometheus/schemas/prometheus-promql/migrate/tests/no-aggr/input.json index 97c21922d..5187e3380 100644 --- a/prometheus/schemas/prometheus-promql/migrate/tests/no-aggr/input.json +++ b/prometheus/schemas/prometheus-promql/migrate/tests/no-aggr/input.json @@ -1,4 +1,3 @@ - { "current": {}, "datasource": { @@ -21,4 +20,4 @@ "skipUrlSync": false, "sort": 0, "type": "query" -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-promql/migrate/tests/volatile/expected.json b/prometheus/schemas/prometheus-promql/migrate/tests/volatile/expected.json index 54f32dbbc..80e417c24 100644 --- a/prometheus/schemas/prometheus-promql/migrate/tests/volatile/expected.json +++ b/prometheus/schemas/prometheus-promql/migrate/tests/volatile/expected.json @@ -4,4 +4,4 @@ "expr": "group by(type) (present_over_time(up{osname=~\".*Linux.*\", job=~\"node-exporter\", prometheus=~\"system\"}[$__range]))", "labelName": "type" } -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-promql/migrate/tests/volatile/input.json b/prometheus/schemas/prometheus-promql/migrate/tests/volatile/input.json index 83291a46e..165b3f118 100644 --- a/prometheus/schemas/prometheus-promql/migrate/tests/volatile/input.json +++ b/prometheus/schemas/prometheus-promql/migrate/tests/volatile/input.json @@ -1,4 +1,3 @@ - { "current": {}, "datasource": { @@ -21,4 +20,4 @@ "skipUrlSync": false, "sort": 6, "type": "query" -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-time-series-query/migrate/tests/basic/expected.json b/prometheus/schemas/prometheus-time-series-query/migrate/tests/basic/expected.json index d55e7ba65..e22f3baa7 100644 --- a/prometheus/schemas/prometheus-time-series-query/migrate/tests/basic/expected.json +++ b/prometheus/schemas/prometheus-time-series-query/migrate/tests/basic/expected.json @@ -3,4 +3,4 @@ "spec": { "query": "up{env=\"demo\",instance=~\"demo.do.prometheus.io.*\"}" } -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-time-series-query/migrate/tests/basic/input.json b/prometheus/schemas/prometheus-time-series-query/migrate/tests/basic/input.json index 012ecffbb..104243b96 100644 --- a/prometheus/schemas/prometheus-time-series-query/migrate/tests/basic/input.json +++ b/prometheus/schemas/prometheus-time-series-query/migrate/tests/basic/input.json @@ -1,4 +1,4 @@ { "expr": "up{env=\"demo\",instance=~\"demo.do.prometheus.io.*\"}", "refID": "A" -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-time-series-query/migrate/tests/legend-format/expected.json b/prometheus/schemas/prometheus-time-series-query/migrate/tests/legend-format/expected.json index d57f0ba29..b93bc289d 100644 --- a/prometheus/schemas/prometheus-time-series-query/migrate/tests/legend-format/expected.json +++ b/prometheus/schemas/prometheus-time-series-query/migrate/tests/legend-format/expected.json @@ -9,4 +9,4 @@ "query": "avg without (instance) (hadoop_hdfs_datanode_capacity{bar_stack_id=\"$bar_stack_id\", _target=~\"$datanode\"})", "seriesNameFormat": "{{_target}}" } -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-time-series-query/migrate/tests/legend-format/input.json b/prometheus/schemas/prometheus-time-series-query/migrate/tests/legend-format/input.json index 1cb215da9..c02673a3b 100644 --- a/prometheus/schemas/prometheus-time-series-query/migrate/tests/legend-format/input.json +++ b/prometheus/schemas/prometheus-time-series-query/migrate/tests/legend-format/input.json @@ -9,4 +9,4 @@ "legendFormat": "{{_target}}", "range": true, "refId": "A" -} \ No newline at end of file +} diff --git a/prometheus/schemas/prometheus-time-series-query/tests/valid/prometheus-time-series-query.json b/prometheus/schemas/prometheus-time-series-query/tests/valid/prometheus-time-series-query.json index 61139fe0c..d0b98a89e 100644 --- a/prometheus/schemas/prometheus-time-series-query/tests/valid/prometheus-time-series-query.json +++ b/prometheus/schemas/prometheus-time-series-query/tests/valid/prometheus-time-series-query.json @@ -1,10 +1,9 @@ - { "kind": "PrometheusTimeSeriesQuery", "spec": { "datasource": { - "kind": "PrometheusDatasource", - "name": "MyDemoDatasource" + "kind": "PrometheusDatasource", + "name": "MyDemoDatasource" }, "query": "max by (job, instance) (up)", "seriesNameFormat": "{{ job }}/{{ instance }}", diff --git a/prometheus/src/annotations/PrometheusPromQLAnnotation.tsx b/prometheus/src/annotations/PrometheusPromQLAnnotation.tsx index bc47e69ea..362539474 100644 --- a/prometheus/src/annotations/PrometheusPromQLAnnotation.tsx +++ b/prometheus/src/annotations/PrometheusPromQLAnnotation.tsx @@ -12,9 +12,10 @@ // limitations under the License. import { AnnotationPlugin, AnnotationQueryPluginDependencies, parseVariables } from '@perses-dev/plugin-system'; + import { PrometheusPromQLAnnotationOptions } from '../plugins'; -import { PrometheusPromQLAnnotationOptionEditor } from './PrometheusPromQLAnnotationOptionEditor'; import { getAnnotationData } from './get-annotation-data'; +import { PrometheusPromQLAnnotationOptionEditor } from './PrometheusPromQLAnnotationOptionEditor'; export const PrometheusPromQLAnnotation: AnnotationPlugin = { getAnnotationData: getAnnotationData, diff --git a/prometheus/src/annotations/PrometheusPromQLAnnotationOptionEditor.tsx b/prometheus/src/annotations/PrometheusPromQLAnnotationOptionEditor.tsx index f92e17e1a..38e63fc89 100644 --- a/prometheus/src/annotations/PrometheusPromQLAnnotationOptionEditor.tsx +++ b/prometheus/src/annotations/PrometheusPromQLAnnotationOptionEditor.tsx @@ -11,10 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement } from 'react'; -import { useId } from '@perses-dev/components'; -import { produce } from 'immer'; import { Autocomplete, FormControl, Stack, TextField } from '@mui/material'; +import { useId } from '@perses-dev/components'; import { DatasourceSelect, DatasourceSelectProps, @@ -23,6 +21,10 @@ import { useDatasourceClient, useDatasourceSelectValueToSelector, } from '@perses-dev/plugin-system'; +import { produce } from 'immer'; +import { ReactElement } from 'react'; + +import { PromQLEditor } from '../components'; import { DEFAULT_PROM, isDefaultPromSelector, @@ -32,8 +34,6 @@ import { PrometheusDatasourceSelector, } from '../model'; -import { PromQLEditor } from '../components'; - export interface PrometheusAnnotationsQuerySpec { expr: string; datasource?: DatasourceSelectValue; diff --git a/prometheus/src/annotations/get-annotation-data.ts b/prometheus/src/annotations/get-annotation-data.ts index 82344b83e..42244d65e 100644 --- a/prometheus/src/annotations/get-annotation-data.ts +++ b/prometheus/src/annotations/get-annotation-data.ts @@ -11,13 +11,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { AnnotationData, DatasourceSpec, parseDurationString } from '@perses-dev/spec'; import { AnnotationContext, datasourceSelectValueToSelector, replaceVariables } from '@perses-dev/plugin-system'; +import { AnnotationData, DatasourceSpec, parseDurationString } from '@perses-dev/spec'; import { milliseconds } from 'date-fns'; -import { DEFAULT_SCRAPE_INTERVAL, PrometheusDatasourceSpec, PrometheusPromQLAnnotationOptions } from '../plugins'; + import { DEFAULT_PROM, getPrometheusTimeRange, getRangeStep, PROM_DATASOURCE_KIND, PrometheusClient } from '../model'; -import { formatSeriesName } from '../utils'; +import { DEFAULT_SCRAPE_INTERVAL, PrometheusDatasourceSpec, PrometheusPromQLAnnotationOptions } from '../plugins'; import { interpolateDatasourceProxyParams } from '../plugins/interpolation'; +import { formatSeriesName } from '../utils'; export const getAnnotationData = async ( spec: PrometheusPromQLAnnotationOptions, diff --git a/prometheus/src/components/PromQLEditor.tsx b/prometheus/src/components/PromQLEditor.tsx index 0629a98c1..50858c387 100644 --- a/prometheus/src/components/PromQLEditor.tsx +++ b/prometheus/src/components/PromQLEditor.tsx @@ -11,15 +11,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -import CodeMirror, { ReactCodeMirrorProps } from '@uiw/react-codemirror'; -import { PromQLExtension, CompleteConfiguration } from '@prometheus-io/codemirror-promql'; import { EditorView } from '@codemirror/view'; import { useTheme, CircularProgress, InputLabel, Stack, IconButton, Tooltip } from '@mui/material'; -import FileTreeIcon from 'mdi-material-ui/FileTree'; -import { ReactElement, useMemo, useState } from 'react'; import { ErrorAlert } from '@perses-dev/components'; -import CloseIcon from 'mdi-material-ui/Close'; import { useReplaceVariablesInString } from '@perses-dev/plugin-system'; +import { PromQLExtension, CompleteConfiguration } from '@prometheus-io/codemirror-promql'; +import CodeMirror, { ReactCodeMirrorProps } from '@uiw/react-codemirror'; +import CloseIcon from 'mdi-material-ui/Close'; +import FileTreeIcon from 'mdi-material-ui/FileTree'; +import { ReactElement, useMemo, useState } from 'react'; + import { PrometheusDatasourceSelector } from '../model'; import { replacePromBuiltinVariables } from '../plugins/prometheus-time-series-query/replace-prom-builtin-variables'; import { useParseQuery } from './query'; @@ -150,11 +151,10 @@ export function PromQLEditor({ backgroundColor: theme.palette.background.default, }} > - {isLoading ? ( - - ) : parseQueryResponse?.data ? ( + {isLoading && } + {!isLoading && parseQueryResponse?.data && ( - ) : null} + )} )} diff --git a/prometheus/src/components/TreeNode.tsx b/prometheus/src/components/TreeNode.tsx index 1b2748505..d9e32b926 100644 --- a/prometheus/src/components/TreeNode.tsx +++ b/prometheus/src/components/TreeNode.tsx @@ -14,17 +14,17 @@ // Forked from https://github.com/prometheus/prometheus/blob/65f610353919b1c7b42d3776c3a95b68046a6bba/web/ui/mantine-ui/src/pages/query/TreeNode.tsx import { Box, CircularProgress, List, ListItem, Stack, Tooltip, Typography, useTheme } from '@mui/material'; +import { StatusError } from '@perses-dev/client'; +import AlertCircle from 'mdi-material-ui/AlertCircle'; import CircleIcon from 'mdi-material-ui/Circle'; import { ReactElement, useCallback, useEffect, useLayoutEffect, useMemo, useState } from 'react'; -import AlertCircle from 'mdi-material-ui/AlertCircle'; -import { StatusError } from '@perses-dev/client'; import { PrometheusDatasourceSelector } from '../model'; import ASTNode, { nodeType } from './promql/ast'; -import { escapeString, getNodeChildren } from './promql/utils'; import { formatNode } from './promql/format'; -import serializeNode from './promql/serialize'; import { functionSignatures } from './promql/functionSignatures'; +import serializeNode from './promql/serialize'; +import { escapeString, getNodeChildren } from './promql/utils'; import { useInstantQuery } from './query'; // The indentation factor for each level of the tree. @@ -226,14 +226,14 @@ export default function TreeNode({ labelCardinalities[ln] = Object.keys(lvs).length; // Sort label values by their number of occurrences within this label name. labelExamples[ln] = Object.entries(lvs) - .sort(([, aCnt], [, bCnt]) => bCnt - aCnt) + .toSorted(([, aCnt], [, bCnt]) => bCnt - aCnt) .slice(0, maxLabelValues) .map(([lv, cnt]) => ({ value: lv, count: cnt })); }); setResultStats({ numSeries: resultSeries, - sortedLabelCards: Object.entries(labelCardinalities).sort((a, b) => b[1] - a[1]), + sortedLabelCards: Object.entries(labelCardinalities).toSorted((a, b) => b[1] - a[1]), labelExamples, }); }, [instantQueryResponse, reportNodeState, childIdx]); diff --git a/prometheus/src/components/promql/format.tsx b/prometheus/src/components/promql/format.tsx index c8bdcd849..c28fec944 100644 --- a/prometheus/src/components/promql/format.tsx +++ b/prometheus/src/components/promql/format.tsx @@ -13,10 +13,10 @@ // Forked from https://github.com/prometheus/prometheus/blob/65f610353919b1c7b42d3776c3a95b68046a6bba/web/ui/mantine-ui/src/promql/format.tsx -import React, { ReactElement, ReactNode } from 'react'; import { styled } from '@mui/material'; - import { convertTimeToDuration, formatDuration } from '@perses-dev/spec'; +import React, { ReactElement, ReactNode } from 'react'; + import ASTNode, { VectorSelector, matchType, @@ -80,40 +80,52 @@ export const labelNameList = (labels: string[]): React.ReactNode[] => { }); }; -const formatAtAndOffset = (timestamp: number | null, startOrEnd: StartOrEnd, offset: number): ReactNode => ( - <> - {timestamp !== null ? ( +const formatAtAndOffset = (timestamp: number | null, startOrEnd: StartOrEnd, offset: number): ReactNode => { + let at: ReactNode = null; + if (timestamp !== null) { + at = ( <> {' '} @ {(timestamp / 1000).toFixed(3)} - ) : startOrEnd !== null ? ( + ); + } else if (startOrEnd !== null) { + at = ( <> {' '} @ {startOrEnd} ( ) - ) : ( - <> - )} - {offset === 0 ? ( - <> - ) : offset > 0 ? ( + ); + } + + let formattedOffset: ReactNode = null; + if (offset > 0) { + formattedOffset = ( <> {' '} offset{' '} {formatDuration(convertTimeToDuration(offset))} - ) : ( + ); + } else if (offset < 0) { + formattedOffset = ( <> {' '} offset{' '} -{formatDuration(convertTimeToDuration(-offset))} - )} - -); + ); + } + + return ( + <> + {at} + {formattedOffset} + + ); +}; const formatSelector = (node: VectorSelector | MatrixSelector): ReactElement => { const matchLabels = node.matchers @@ -208,17 +220,17 @@ const formatNodeInternal = (node: ASTNode, showChildren: boolean, maxDepth?: num ); case nodeType.call: { - const children = - childMaxDepth === undefined || childMaxDepth > 0 - ? node.args.map((arg, i) => ( - - {i !== 0 && ', '} - {formatNode(arg, showChildren)} - - )) - : node.args.length > 0 - ? ellipsis - : ''; + let children: ReactNode = ''; + if (childMaxDepth === undefined || childMaxDepth > 0) { + children = node.args.map((arg, i) => ( + + {i !== 0 && ', '} + {formatNode(arg, showChildren)} + + )); + } else if (node.args.length > 0) { + children = ellipsis; + } return ( <> diff --git a/prometheus/src/components/promql/serialize.ts b/prometheus/src/components/promql/serialize.ts index b94c8e414..678796f6b 100644 --- a/prometheus/src/components/promql/serialize.ts +++ b/prometheus/src/components/promql/serialize.ts @@ -14,6 +14,7 @@ // Forked from https://github.com/prometheus/prometheus/blob/65f610353919b1c7b42d3776c3a95b68046a6bba/web/ui/mantine-ui/src/promql/serialize.ts import { convertTimeToDuration, formatDuration } from '@perses-dev/spec'; + import ASTNode, { VectorSelector, matchType, @@ -24,14 +25,23 @@ import ASTNode, { } from './ast'; import { aggregatorsWithParam, maybeParenthesizeBinopChild, escapeString } from './utils'; -const serializeAtAndOffset = (timestamp: number | null, startOrEnd: StartOrEnd, offset: number): string => - `${timestamp !== null ? ` @ ${(timestamp / 1000).toFixed(3)}` : startOrEnd !== null ? ` @ ${startOrEnd}()` : ''}${ - offset === 0 - ? '' - : offset > 0 - ? ` offset ${formatDuration(convertTimeToDuration(offset))}` - : ` offset -${formatDuration(convertTimeToDuration(-offset))}` - }`; +const serializeAtAndOffset = (timestamp: number | null, startOrEnd: StartOrEnd, offset: number): string => { + let at = ''; + if (timestamp !== null) { + at = ` @ ${(timestamp / 1000).toFixed(3)}`; + } else if (startOrEnd !== null) { + at = ` @ ${startOrEnd}()`; + } + + let formattedOffset = ''; + if (offset > 0) { + formattedOffset = ` offset ${formatDuration(convertTimeToDuration(offset))}`; + } else if (offset < 0) { + formattedOffset = ` offset -${formatDuration(convertTimeToDuration(-offset))}`; + } + + return `${at}${formattedOffset}`; +}; const serializeSelector = (node: VectorSelector | MatrixSelector): string => { const matchers = node.matchers @@ -53,18 +63,20 @@ const serializeNode = (node: ASTNode, indent = 0, pretty = false, initialIndent const initialInd = initialIndent ? ind : ''; switch (node.type) { - case nodeType.aggregation: - return `${initialInd}${node.op}${ - node.without - ? ` without(${node.grouping.join(', ')}) ` - : node.grouping.length > 0 - ? ` by(${node.grouping.join(', ')}) ` - : '' - }(${childListSeparator}${ + case nodeType.aggregation: { + let grouping = ''; + if (node.without) { + grouping = ` without(${node.grouping.join(', ')}) `; + } else if (node.grouping.length > 0) { + grouping = ` by(${node.grouping.join(', ')}) `; + } + + return `${initialInd}${node.op}${grouping}(${childListSeparator}${ aggregatorsWithParam.includes(node.op) && node.param !== null ? `${serializeNode(node.param, childIndent, pretty)},${childSeparator}` : '' }${serializeNode(node.expr, childIndent, pretty)}${childListSeparator}${ind})`; + } case nodeType.subquery: return `${initialInd}${serializeNode(node.expr, indent, pretty)}[${formatDuration(convertTimeToDuration(node.range))}:${ diff --git a/prometheus/src/components/query.ts b/prometheus/src/components/query.ts index fe613b932..f920b5922 100644 --- a/prometheus/src/components/query.ts +++ b/prometheus/src/components/query.ts @@ -11,10 +11,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { StatusError } from '@perses-dev/client'; import { useDatasourceClient, useDatasourceStore, useVariableValues } from '@perses-dev/plugin-system'; -import { useQuery, UseQueryResult } from '@tanstack/react-query'; import { DatasourceSelector } from '@perses-dev/spec'; -import { StatusError } from '@perses-dev/client'; +import { useQuery, UseQueryResult } from '@tanstack/react-query'; + import { InstantQueryRequestParameters, MonitoredInstantQueryResponse, diff --git a/prometheus/src/explore/PrometheusExplorer.tsx b/prometheus/src/explore/PrometheusExplorer.tsx index ab43657b6..8938b1429 100644 --- a/prometheus/src/explore/PrometheusExplorer.tsx +++ b/prometheus/src/explore/PrometheusExplorer.tsx @@ -12,15 +12,16 @@ // limitations under the License. import { Box, Stack, Tab, Tabs, ToggleButton, ToggleButtonGroup } from '@mui/material'; -import { DataQueriesProvider, MultiQueryEditor, useSuggestedStepMs } from '@perses-dev/plugin-system'; -import { useExplorerManagerContext } from '@perses-dev/explore'; -import useResizeObserver from 'use-resize-observer'; import { Panel } from '@perses-dev/dashboards'; -import { ReactElement, useState } from 'react'; +import { useExplorerManagerContext } from '@perses-dev/explore'; +import { DataQueriesProvider, MultiQueryEditor, useSuggestedStepMs } from '@perses-dev/plugin-system'; import { QueryDefinition } from '@perses-dev/spec'; +import { ReactElement, useState } from 'react'; +import useResizeObserver from 'use-resize-observer'; + import { DEFAULT_PROM } from '../model/prometheus-selectors'; -import { FinderQueryParams } from './PrometheusMetricsFinder/types'; import { PrometheusMetricsFinder } from './PrometheusMetricsFinder'; +import { FinderQueryParams } from './PrometheusMetricsFinder/types'; interface MetricsExplorerQueryParams extends FinderQueryParams { tab?: string; diff --git a/prometheus/src/explore/PrometheusMetricsFinder/PrometheusMetricsFinder.tsx b/prometheus/src/explore/PrometheusMetricsFinder/PrometheusMetricsFinder.tsx index 8b72ac640..a9b9849d9 100644 --- a/prometheus/src/explore/PrometheusMetricsFinder/PrometheusMetricsFinder.tsx +++ b/prometheus/src/explore/PrometheusMetricsFinder/PrometheusMetricsFinder.tsx @@ -28,12 +28,13 @@ import { } from '@mui/material'; import { Fuzzy, FuzzyMatchingInterval } from '@nexucis/fuzzy'; import { useExplorerQueryParams } from '@perses-dev/explore'; +import { DatasourceSelector } from '@perses-dev/spec'; import ArrowLeftIcon from 'mdi-material-ui/ArrowLeft'; import CogIcon from 'mdi-material-ui/Cog'; import Magnify from 'mdi-material-ui/Magnify'; import { MouseEvent, ReactElement, useMemo, useState } from 'react'; import { Link as RouterLink } from 'react-router-dom'; -import { DatasourceSelector } from '@perses-dev/spec'; + import { DEFAULT_PROM } from '../../model'; import { MetricList } from './display/list/MetricList'; import { FinderFilters } from './filter/FinderFilters'; @@ -105,7 +106,7 @@ export function MetricNameExplorer({ const filteredResults: Array<{ original: string; intervals?: FuzzyMatchingInterval[] }> | undefined = useMemo(() => { if (search && data?.data) { - return fuzzy.filter(search, data.data).sort((a, b) => b.score - a.score); + return fuzzy.filter(search, data.data).toSorted((a, b) => b.score - a.score); } return undefined; }, [data, fuzzy, search]); diff --git a/prometheus/src/explore/PrometheusMetricsFinder/display/list/MetricList.test.tsx b/prometheus/src/explore/PrometheusMetricsFinder/display/list/MetricList.test.tsx index d9e8de1ce..db4b7f7aa 100644 --- a/prometheus/src/explore/PrometheusMetricsFinder/display/list/MetricList.test.tsx +++ b/prometheus/src/explore/PrometheusMetricsFinder/display/list/MetricList.test.tsx @@ -14,6 +14,7 @@ import { render, RenderResult, screen } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; import { VirtuosoMockContext } from 'react-virtuoso'; + import { DEFAULT_PROM } from '../../../../model/prometheus-selectors'; import { MetricList, MetricListProps } from './MetricList'; diff --git a/prometheus/src/explore/PrometheusMetricsFinder/display/list/MetricList.tsx b/prometheus/src/explore/PrometheusMetricsFinder/display/list/MetricList.tsx index ccb3ff260..fdbe341cc 100644 --- a/prometheus/src/explore/PrometheusMetricsFinder/display/list/MetricList.tsx +++ b/prometheus/src/explore/PrometheusMetricsFinder/display/list/MetricList.tsx @@ -14,11 +14,12 @@ import { Button, Divider, Skeleton, Stack, StackProps, TableCell, Typography } from '@mui/material'; import { Fuzzy, FuzzyMatchingInterval } from '@nexucis/fuzzy'; import { useExplorerQueryParams } from '@perses-dev/explore'; +import { DatasourceSelector } from '@perses-dev/spec'; import CompassIcon from 'mdi-material-ui/Compass'; import { ReactElement, ReactNode, useMemo } from 'react'; import { Link as RouterLink } from 'react-router-dom'; import { TableVirtuoso } from 'react-virtuoso'; -import { DatasourceSelector } from '@perses-dev/spec'; + import { LabelFilter } from '../../types'; import { useMetricMetadata } from '../../utils'; import { MetricChip } from '../MetricChip'; diff --git a/prometheus/src/explore/PrometheusMetricsFinder/filter/FilterInputs.test.tsx b/prometheus/src/explore/PrometheusMetricsFinder/filter/FilterInputs.test.tsx index d8dc3115e..f6c099ec0 100644 --- a/prometheus/src/explore/PrometheusMetricsFinder/filter/FilterInputs.test.tsx +++ b/prometheus/src/explore/PrometheusMetricsFinder/filter/FilterInputs.test.tsx @@ -12,6 +12,7 @@ // limitations under the License. import { act, fireEvent, render, screen } from '@testing-library/react'; + import { RawFilterInput, RawFilterInputProps } from './FilterInputs'; describe('FilterInputs', () => { diff --git a/prometheus/src/explore/PrometheusMetricsFinder/filter/FilterInputs.tsx b/prometheus/src/explore/PrometheusMetricsFinder/filter/FilterInputs.tsx index d26afd2cc..45210b82d 100644 --- a/prometheus/src/explore/PrometheusMetricsFinder/filter/FilterInputs.tsx +++ b/prometheus/src/explore/PrometheusMetricsFinder/filter/FilterInputs.tsx @@ -11,16 +11,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { - cloneElement, - forwardRef, - HTMLAttributes, - ReactElement, - SyntheticEvent, - useMemo, - useRef, - useState, -} from 'react'; import { Autocomplete, CircularProgress, @@ -32,9 +22,20 @@ import { Stack, TextField, } from '@mui/material'; +import { DatasourceSelector } from '@perses-dev/spec'; import DeleteIcon from 'mdi-material-ui/Delete'; +import { + cloneElement, + forwardRef, + HTMLAttributes, + ReactElement, + SyntheticEvent, + useMemo, + useRef, + useState, +} from 'react'; import { Virtuoso } from 'react-virtuoso'; -import { DatasourceSelector } from '@perses-dev/spec'; + import { LabelFilter, Operator } from '../types'; import { useLabels, useLabelValues } from '../utils'; diff --git a/prometheus/src/explore/PrometheusMetricsFinder/filter/FinderFilters.tsx b/prometheus/src/explore/PrometheusMetricsFinder/filter/FinderFilters.tsx index 80060b2e9..b479845de 100644 --- a/prometheus/src/explore/PrometheusMetricsFinder/filter/FinderFilters.tsx +++ b/prometheus/src/explore/PrometheusMetricsFinder/filter/FinderFilters.tsx @@ -12,16 +12,16 @@ // limitations under the License. import { Button, FormControl, Stack, StackProps } from '@mui/material'; - import { DatasourceSelect, DatasourceSelectValue, datasourceSelectValueToSelector, useListDatasourceSelectItems, } from '@perses-dev/plugin-system'; +import { DatasourceSelector } from '@perses-dev/spec'; import PlusIcon from 'mdi-material-ui/Plus'; import { ReactElement } from 'react'; -import { DatasourceSelector } from '@perses-dev/spec'; + import { PROM_DATASOURCE_KIND } from '../../../model/prometheus-selectors'; import { LabelFilter } from '../types'; import { LabelFilterInput } from './FilterInputs'; diff --git a/prometheus/src/explore/PrometheusMetricsFinder/overview/MetricOverview.tsx b/prometheus/src/explore/PrometheusMetricsFinder/overview/MetricOverview.tsx index e0f0c40f7..f5d49e9dd 100644 --- a/prometheus/src/explore/PrometheusMetricsFinder/overview/MetricOverview.tsx +++ b/prometheus/src/explore/PrometheusMetricsFinder/overview/MetricOverview.tsx @@ -12,17 +12,17 @@ // limitations under the License. import { Checkbox, FormControlLabel, Skeleton, Stack, StackProps, Tab, Tabs, Tooltip } from '@mui/material'; -import { ReactElement, useMemo, useState } from 'react'; - import { Panel } from '@perses-dev/dashboards'; -import useResizeObserver from 'use-resize-observer'; import { DataQueriesProvider, useSuggestedStepMs } from '@perses-dev/plugin-system'; -import HelpCircleOutlineIcon from 'mdi-material-ui/HelpCircleOutline'; import { DatasourceSelector, QueryDefinition } from '@perses-dev/spec'; +import HelpCircleOutlineIcon from 'mdi-material-ui/HelpCircleOutline'; +import { ReactElement, useMemo, useState } from 'react'; +import useResizeObserver from 'use-resize-observer'; + import { computeFilterExpr, LabelFilter } from '../types'; import { useMetricMetadata } from '../utils'; -import { OverviewTab } from './tabs/OverviewTab'; import { JobTab } from './tabs/JobTab'; +import { OverviewTab } from './tabs/OverviewTab'; import { SimilarTab } from './tabs/SimilarTab'; export interface OverviewPanelProps extends StackProps { diff --git a/prometheus/src/explore/PrometheusMetricsFinder/overview/tabs/JobTab.tsx b/prometheus/src/explore/PrometheusMetricsFinder/overview/tabs/JobTab.tsx index 03bd9dceb..484b9de03 100644 --- a/prometheus/src/explore/PrometheusMetricsFinder/overview/tabs/JobTab.tsx +++ b/prometheus/src/explore/PrometheusMetricsFinder/overview/tabs/JobTab.tsx @@ -21,8 +21,9 @@ import { StackProps, Typography, } from '@mui/material'; -import { ReactElement, useMemo, useState } from 'react'; import { DatasourceSelector } from '@perses-dev/spec'; +import { ReactElement, useMemo, useState } from 'react'; + import { MetricList } from '../../display/list/MetricList'; import { LabelFilter } from '../../types'; import { useLabelValues } from '../../utils'; diff --git a/prometheus/src/explore/PrometheusMetricsFinder/overview/tabs/OverviewTab.tsx b/prometheus/src/explore/PrometheusMetricsFinder/overview/tabs/OverviewTab.tsx index ea1534f24..d91fcfcaa 100644 --- a/prometheus/src/explore/PrometheusMetricsFinder/overview/tabs/OverviewTab.tsx +++ b/prometheus/src/explore/PrometheusMetricsFinder/overview/tabs/OverviewTab.tsx @@ -11,7 +11,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, useMemo, useState } from 'react'; import { Autocomplete, Button, @@ -30,15 +29,17 @@ import { useMediaQuery, useTheme, } from '@mui/material'; -import PlusIcon from 'mdi-material-ui/Plus'; -import CheckIcon from 'mdi-material-ui/Check'; -import CloseIcon from 'mdi-material-ui/Close'; import { ErrorAlert } from '@perses-dev/components'; import { DatasourceSelector } from '@perses-dev/spec'; -import { LabelFilter, LabelValueCounter, Operator } from '../../types'; +import CheckIcon from 'mdi-material-ui/Check'; +import CloseIcon from 'mdi-material-ui/Close'; +import PlusIcon from 'mdi-material-ui/Plus'; +import { ReactElement, useMemo, useState } from 'react'; + +import { MetricChip } from '../../display/MetricChip'; import { ListboxComponent } from '../../filter/FilterInputs'; +import { LabelFilter, LabelValueCounter, Operator } from '../../types'; import { useMetricMetadata, useSeriesStates } from '../../utils'; -import { MetricChip } from '../../display/MetricChip'; export interface LabelValuesRowProps extends StackProps { label: string; @@ -197,7 +198,7 @@ export function LabelValuesTable({ ...props }: LabelValuesTableProps): ReactElement { const labels: string[] = useMemo(() => { - return [...labelValueCounters.keys()].sort(); + return [...labelValueCounters.keys()].toSorted(); }, [labelValueCounters]); if (isLoading) { @@ -264,40 +265,35 @@ export function OverviewTab({ )} - {isMetadataLoading ? ( - - ) : metadataError ? ( + {isMetadataLoading && } + {!isMetadataLoading && metadataError && ( - ) : ( - )} + {!isMetadataLoading && !metadataError && } - Result:{' '} - {isLoading ? ( - - ) : error ? ( - failed to fetch series - ) : ( - {series?.length ?? 'unknown'} series - )} + Result: {isLoading && } + {!isLoading && error && failed to fetch series} + {!isLoading && !error && {series?.length ?? 'unknown'} series} - {error ? ( + {error && ( - ) : series?.length === 0 ? ( + )} + {!error && series?.length === 0 && ( theme.palette.warning.main }}> No series found with current filters. - ) : ( + )} + {!error && series?.length !== 0 && ( )} diff --git a/prometheus/src/explore/PrometheusMetricsFinder/overview/tabs/SimilarTab.tsx b/prometheus/src/explore/PrometheusMetricsFinder/overview/tabs/SimilarTab.tsx index 158be7232..5f56d5279 100644 --- a/prometheus/src/explore/PrometheusMetricsFinder/overview/tabs/SimilarTab.tsx +++ b/prometheus/src/explore/PrometheusMetricsFinder/overview/tabs/SimilarTab.tsx @@ -12,8 +12,9 @@ // limitations under the License. import { CircularProgress, Stack, StackProps } from '@mui/material'; -import { ReactElement, useMemo } from 'react'; import { DatasourceSelector } from '@perses-dev/spec'; +import { ReactElement, useMemo } from 'react'; + import { MetricList } from '../../display/list/MetricList'; import { LabelFilter } from '../../types'; import { useLabelValues } from '../../utils'; diff --git a/prometheus/src/explore/PrometheusMetricsFinder/utils.ts b/prometheus/src/explore/PrometheusMetricsFinder/utils.ts index 3f704c714..601809109 100644 --- a/prometheus/src/explore/PrometheusMetricsFinder/utils.ts +++ b/prometheus/src/explore/PrometheusMetricsFinder/utils.ts @@ -11,11 +11,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { StatusError } from '@perses-dev/client'; import { useDatasourceClient, useTimeRange, useVariableValues, useDatasourceStore } from '@perses-dev/plugin-system'; +import { DatasourceSelector } from '@perses-dev/spec'; import { useQuery, UseQueryResult } from '@tanstack/react-query'; import { useMemo } from 'react'; -import { DatasourceSelector } from '@perses-dev/spec'; -import { StatusError } from '@perses-dev/client'; + import { LabelNamesRequestParameters, LabelValuesRequestParameters, diff --git a/prometheus/src/getPluginModule.ts b/prometheus/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/prometheus/src/getPluginModule.ts +++ b/prometheus/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/prometheus/src/model/api-types.ts b/prometheus/src/model/api-types.ts index 31b4a069b..994e780e2 100644 --- a/prometheus/src/model/api-types.ts +++ b/prometheus/src/model/api-types.ts @@ -12,6 +12,7 @@ // limitations under the License. import { DurationString } from '@perses-dev/spec'; + import ASTNode from '../components/promql/ast'; // Just reuse dashboard model's type and re-export diff --git a/prometheus/src/model/prometheus-client.ts b/prometheus/src/model/prometheus-client.ts index bc2ce34df..18ef1eec7 100644 --- a/prometheus/src/model/prometheus-client.ts +++ b/prometheus/src/model/prometheus-client.ts @@ -11,9 +11,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { fetchJson, RequestHeaders } from '@perses-dev/client'; import { QueryParamValues } from '@perses-dev/components'; import { DatasourceClient } from '@perses-dev/plugin-system'; -import { fetchJson, RequestHeaders } from '@perses-dev/client'; + import { InstantQueryRequestParameters, InstantQueryResponse, diff --git a/prometheus/src/model/time.ts b/prometheus/src/model/time.ts index cbb9e70f1..b4f4d95b6 100644 --- a/prometheus/src/model/time.ts +++ b/prometheus/src/model/time.ts @@ -11,8 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { milliseconds, getUnixTime } from 'date-fns'; import { AbsoluteTimeRange, DurationString, parseDurationString } from '@perses-dev/spec'; +import { milliseconds, getUnixTime } from 'date-fns'; + import { UnixTimestampSeconds } from './api-types'; export interface PrometheusTimeRange { diff --git a/prometheus/src/plugins/PrometheusDatasourceEditor.tsx b/prometheus/src/plugins/PrometheusDatasourceEditor.tsx index f19340e99..f4df21a72 100644 --- a/prometheus/src/plugins/PrometheusDatasourceEditor.tsx +++ b/prometheus/src/plugins/PrometheusDatasourceEditor.tsx @@ -14,10 +14,11 @@ import { Box, IconButton, TextField, Typography } from '@mui/material'; import { QueryParamValues } from '@perses-dev/components'; import { HTTPSettingsEditor } from '@perses-dev/plugin-system'; +import { DurationString } from '@perses-dev/spec'; import MinusIcon from 'mdi-material-ui/Minus'; import PlusIcon from 'mdi-material-ui/Plus'; import { ReactElement, useRef, useState } from 'react'; -import { DurationString } from '@perses-dev/spec'; + import { DEFAULT_SCRAPE_INTERVAL, PrometheusDatasourceSpec } from './types'; interface QueryParamEntry { diff --git a/prometheus/src/plugins/PrometheusLabelNamesVariable.tsx b/prometheus/src/plugins/PrometheusLabelNamesVariable.tsx index f374c63fc..cd9be316f 100644 --- a/prometheus/src/plugins/PrometheusLabelNamesVariable.tsx +++ b/prometheus/src/plugins/PrometheusLabelNamesVariable.tsx @@ -19,9 +19,10 @@ import { datasourceSelectValueToSelector, isVariableDatasource, } from '@perses-dev/plugin-system'; + import { DEFAULT_PROM, getPrometheusTimeRange, PROM_DATASOURCE_KIND } from '../model'; -import { stringArrayToVariableOptions, PrometheusLabelNamesVariableEditor } from './prometheus-variables'; import { resolvePrometheusDatasource } from './interpolation'; +import { stringArrayToVariableOptions, PrometheusLabelNamesVariableEditor } from './prometheus-variables'; import { PrometheusLabelNamesVariableOptions } from './types'; export const PrometheusLabelNamesVariable: VariablePlugin = { @@ -46,7 +47,7 @@ export const PrometheusLabelNamesVariable: VariablePlugin { - const matcherVariables = spec.matchers?.map((m) => parseVariables(m)).flat() || []; + const matcherVariables = spec.matchers?.flatMap((m) => parseVariables(m)) || []; const datasourceVariables = spec.datasource && isVariableDatasource(spec.datasource) ? parseVariables(spec.datasource) : []; return { variables: [...matcherVariables, ...datasourceVariables] }; diff --git a/prometheus/src/plugins/PrometheusLabelValuesVariable.tsx b/prometheus/src/plugins/PrometheusLabelValuesVariable.tsx index ec64d4142..b82d86bf1 100644 --- a/prometheus/src/plugins/PrometheusLabelValuesVariable.tsx +++ b/prometheus/src/plugins/PrometheusLabelValuesVariable.tsx @@ -21,9 +21,10 @@ import { DatasourceStore, } from '@perses-dev/plugin-system'; import { DatasourceSelector, DatasourceSpec } from '@perses-dev/spec'; + import { DEFAULT_PROM, getPrometheusTimeRange, PROM_DATASOURCE_KIND } from '../model'; -import { stringArrayToVariableOptions, PrometheusLabelValuesVariableEditor } from './prometheus-variables'; import { resolvePrometheusDatasource } from './interpolation'; +import { stringArrayToVariableOptions, PrometheusLabelValuesVariableEditor } from './prometheus-variables'; import { PrometheusLabelValuesVariableOptions, PrometheusDatasourceSpec } from './types'; function extractDatasourceVariables(datasourceSpec: DatasourceSpec): string[] { @@ -87,7 +88,8 @@ function getDatasourceVariablesFromCache( if (!datasourceStore.getDatasourceSpecSync) return []; const datasourceSpec = datasourceStore.getDatasourceSpecSync(datasourceSelector) as - DatasourceSpec | undefined; + | DatasourceSpec + | undefined; return datasourceSpec ? extractDatasourceVariables(datasourceSpec) : []; } catch { return []; @@ -126,7 +128,7 @@ export const PrometheusLabelValuesVariable: VariablePlugin { - const matcherVariables = spec.matchers?.map((m) => parseVariables(m)).flat() || []; + const matcherVariables = spec.matchers?.flatMap((m) => parseVariables(m)) || []; const labelVariables = parseVariables(spec.labelName); const datasourceVariables = spec.datasource && isVariableDatasource(spec.datasource) ? parseVariables(spec.datasource) : []; diff --git a/prometheus/src/plugins/PrometheusPromQLVariable.tsx b/prometheus/src/plugins/PrometheusPromQLVariable.tsx index 2a0bc9fe2..4b9ccc74b 100644 --- a/prometheus/src/plugins/PrometheusPromQLVariable.tsx +++ b/prometheus/src/plugins/PrometheusPromQLVariable.tsx @@ -19,14 +19,15 @@ import { datasourceSelectValueToSelector, isVariableDatasource, } from '@perses-dev/plugin-system'; + import { DEFAULT_PROM, PROM_DATASOURCE_KIND } from '../model'; +import { resolvePrometheusDatasource } from './interpolation'; import { capturingMatrix, capturingVector, stringArrayToVariableOptions, PrometheusPromQLVariableEditor, } from './prometheus-variables'; -import { resolvePrometheusDatasource } from './interpolation'; import { PrometheusPromQLVariableOptions } from './types'; export const PrometheusPromQLVariable: VariablePlugin = { diff --git a/prometheus/src/plugins/interpolation.ts b/prometheus/src/plugins/interpolation.ts index bec02ddbc..84afeabac 100644 --- a/prometheus/src/plugins/interpolation.ts +++ b/prometheus/src/plugins/interpolation.ts @@ -14,6 +14,7 @@ import { interpolateHeaders, interpolateQueryParams, VariableStateMap } from '@perses-dev/components'; import { DatasourceStore } from '@perses-dev/plugin-system'; import { DatasourceSelector, DatasourceSpec } from '@perses-dev/spec'; + import { ClientRequestOptions, PrometheusClient } from '../model'; import { PrometheusDatasourceSpec } from './types'; diff --git a/prometheus/src/plugins/prometheus-datasource.tsx b/prometheus/src/plugins/prometheus-datasource.tsx index 53fc53293..398e68635 100644 --- a/prometheus/src/plugins/prometheus-datasource.tsx +++ b/prometheus/src/plugins/prometheus-datasource.tsx @@ -11,10 +11,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { RequestHeaders } from '@perses-dev/client'; import { QueryParamValues } from '@perses-dev/components'; import { DatasourcePlugin } from '@perses-dev/plugin-system'; import { BuiltinVariableDefinition } from '@perses-dev/spec'; -import { RequestHeaders } from '@perses-dev/client'; + import { ClientRequestOptions, healthCheck, diff --git a/prometheus/src/plugins/prometheus-time-series-query/PrometheusTimeSeriesQuery.ts b/prometheus/src/plugins/prometheus-time-series-query/PrometheusTimeSeriesQuery.ts index e4c5708fb..101964be6 100644 --- a/prometheus/src/plugins/prometheus-time-series-query/PrometheusTimeSeriesQuery.ts +++ b/prometheus/src/plugins/prometheus-time-series-query/PrometheusTimeSeriesQuery.ts @@ -12,6 +12,7 @@ // limitations under the License. import { TimeSeriesQueryPlugin, isVariableDatasource, parseVariables } from '@perses-dev/plugin-system'; + import { getTimeSeriesData } from './get-time-series-data'; import { PrometheusTimeSeriesQueryEditor } from './PrometheusTimeSeriesQueryEditor'; import { PrometheusTimeSeriesQuerySpec } from './time-series-query-model'; diff --git a/prometheus/src/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.tsx b/prometheus/src/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.tsx index 5a75faf24..1b7ce4ed2 100644 --- a/prometheus/src/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.tsx +++ b/prometheus/src/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.tsx @@ -11,7 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { produce } from 'immer'; +import { FormControl, Stack, TextField } from '@mui/material'; +import { useId } from '@perses-dev/components'; +import { PanelEditorContext } from '@perses-dev/dashboards'; import { DatasourceSelect, DatasourceSelectProps, @@ -23,10 +25,10 @@ import { useSuggestedStepMs, useTimeRange, } from '@perses-dev/plugin-system'; -import { useId } from '@perses-dev/components'; -import { FormControl, Stack, TextField } from '@mui/material'; +import { produce } from 'immer'; import { ReactElement, useContext, useMemo } from 'react'; -import { PanelEditorContext } from '@perses-dev/dashboards'; + +import { PromQLEditor } from '../../components'; import { DEFAULT_PROM, DurationString, @@ -40,7 +42,6 @@ import { PrometheusDatasourceSelector, } from '../../model'; import { DEFAULT_SCRAPE_INTERVAL, PrometheusDatasourceSpec } from '../types'; -import { PromQLEditor } from '../../components'; import { PrometheusTimeSeriesQueryEditorProps, useQueryState, @@ -76,7 +77,7 @@ export function PrometheusTimeSeriesQueryEditor(props: PrometheusTimeSeriesQuery const { minStep, handleMinStepChange, handleMinStepBlur } = useMinStepState(props); const minStepPlaceholder = minStep ?? - (datasourceResource && (datasourceResource?.plugin.spec as PrometheusDatasourceSpec).scrapeInterval) ?? + (datasourceResource && (datasourceResource.plugin.spec as PrometheusDatasourceSpec).scrapeInterval) ?? DEFAULT_SCRAPE_INTERVAL; const handleDatasourceChange: DatasourceSelectProps['onChange'] = (next) => { diff --git a/prometheus/src/plugins/prometheus-time-series-query/get-time-series-data.ts b/prometheus/src/plugins/prometheus-time-series-query/get-time-series-data.ts index 6b480ade2..d783a1a25 100644 --- a/prometheus/src/plugins/prometheus-time-series-query/get-time-series-data.ts +++ b/prometheus/src/plugins/prometheus-time-series-query/get-time-series-data.ts @@ -12,7 +12,6 @@ // limitations under the License. import { TimeSeriesQueryPlugin, datasourceSelectValueToSelector, replaceVariables } from '@perses-dev/plugin-system'; -import { fromUnixTime, milliseconds } from 'date-fns'; import { DatasourceSpec, DurationString, @@ -21,6 +20,8 @@ import { TimeSeries, TimeSeriesData, } from '@perses-dev/spec'; +import { fromUnixTime, milliseconds } from 'date-fns'; + import { parseValueTuple, PrometheusClient, @@ -37,8 +38,8 @@ import { import { getFormattedPrometheusSeriesName } from '../../utils'; import { interpolateDatasourceProxyParams } from '../interpolation'; import { DEFAULT_SCRAPE_INTERVAL, PrometheusDatasourceSpec } from '../types'; -import { PrometheusTimeSeriesQuerySpec } from './time-series-query-model'; import { replacePromBuiltinVariables } from './replace-prom-builtin-variables'; +import { PrometheusTimeSeriesQuerySpec } from './time-series-query-model'; export const getTimeSeriesData: TimeSeriesQueryPlugin['getTimeSeriesData'] = async ( spec, diff --git a/prometheus/src/plugins/prometheus-time-series-query/plugin.test.ts b/prometheus/src/plugins/prometheus-time-series-query/plugin.test.ts index 5d9d469da..af7470199 100644 --- a/prometheus/src/plugins/prometheus-time-series-query/plugin.test.ts +++ b/prometheus/src/plugins/prometheus-time-series-query/plugin.test.ts @@ -17,6 +17,7 @@ jest.mock('echarts/core'); import { TimeSeriesQueryContext } from '@perses-dev/plugin-system'; import { DatasourceSpec } from '@perses-dev/spec'; + import { RangeQueryResponse } from '../../model'; import { PrometheusDatasource } from '../prometheus-datasource'; import { PrometheusDatasourceSpec } from '../types'; diff --git a/prometheus/src/plugins/prometheus-time-series-query/query-editor-model.ts b/prometheus/src/plugins/prometheus-time-series-query/query-editor-model.ts index e7581ab10..c9bfbfed3 100644 --- a/prometheus/src/plugins/prometheus-time-series-query/query-editor-model.ts +++ b/prometheus/src/plugins/prometheus-time-series-query/query-editor-model.ts @@ -11,10 +11,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { useState } from 'react'; -import { produce } from 'immer'; import { OptionsEditorProps } from '@perses-dev/plugin-system'; import { DurationString } from '@perses-dev/spec'; +import { produce } from 'immer'; +import { useState } from 'react'; + import { PrometheusTimeSeriesQuerySpec } from './time-series-query-model'; export type PrometheusTimeSeriesQueryEditorProps = OptionsEditorProps; diff --git a/prometheus/src/plugins/prometheus-time-series-query/time-series-query-model.ts b/prometheus/src/plugins/prometheus-time-series-query/time-series-query-model.ts index 8dc68f213..8f718e4a9 100644 --- a/prometheus/src/plugins/prometheus-time-series-query/time-series-query-model.ts +++ b/prometheus/src/plugins/prometheus-time-series-query/time-series-query-model.ts @@ -13,6 +13,7 @@ import { DatasourceSelectValue } from '@perses-dev/plugin-system'; import { DurationString } from '@perses-dev/spec'; + import { PrometheusDatasourceSelector } from '../../model'; /** * The spec/options for the PrometheusTimeSeriesQuery plugin. diff --git a/prometheus/src/plugins/prometheus-variables.tsx b/prometheus/src/plugins/prometheus-variables.tsx index 362732993..996af7999 100644 --- a/prometheus/src/plugins/prometheus-variables.tsx +++ b/prometheus/src/plugins/prometheus-variables.tsx @@ -22,6 +22,7 @@ import { } from '@perses-dev/plugin-system'; import { produce } from 'immer'; import { ReactElement, useCallback, ChangeEvent, FocusEvent } from 'react'; + import { PromQLEditor } from '../components'; import { DEFAULT_PROM, diff --git a/prometheus/src/plugins/types.ts b/prometheus/src/plugins/types.ts index 5a0286a21..f87cae989 100644 --- a/prometheus/src/plugins/types.ts +++ b/prometheus/src/plugins/types.ts @@ -14,6 +14,7 @@ import { QueryParamValues } from '@perses-dev/components'; import { DatasourceSelectValue } from '@perses-dev/plugin-system'; import { DurationString, HTTPProxy } from '@perses-dev/spec'; + import { PrometheusDatasourceSelector } from '../model'; export const DEFAULT_SCRAPE_INTERVAL: DurationString = '1m'; diff --git a/prometheus/src/plugins/variable.tsx b/prometheus/src/plugins/variable.tsx index 2744d0d4a..1bf34f395 100644 --- a/prometheus/src/plugins/variable.tsx +++ b/prometheus/src/plugins/variable.tsx @@ -11,8 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { VariablePlugin, VariableOption, OptionsEditorProps } from '@perses-dev/plugin-system'; import { Autocomplete, TextField } from '@mui/material'; +import { VariablePlugin, VariableOption, OptionsEditorProps } from '@perses-dev/plugin-system'; import { ReactElement } from 'react'; type StaticListOption = string | VariableOption; diff --git a/prometheus/src/utils/utils.ts b/prometheus/src/utils/utils.ts index 5ff42e211..4b63f7101 100644 --- a/prometheus/src/utils/utils.ts +++ b/prometheus/src/utils/utils.ts @@ -37,7 +37,7 @@ export function formatSeriesName(inputFormat: string, seriesLabels: SeriesLabels function stringifyPrometheusMetricLabels(labels: { [key: string]: unknown }, removeExprWrap?: boolean): string { const labelStrings: string[] = []; Object.keys(labels) - .sort() + .toSorted() .forEach((labelName) => { const labelValue = labels[labelName]; if (labelValue !== undefined) { diff --git a/pyroscope/jest.config.ts b/pyroscope/jest.config.ts index 5190fb4de..16027133b 100644 --- a/pyroscope/jest.config.ts +++ b/pyroscope/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/pyroscope/package.json b/pyroscope/package.json index 39c38dc09..f824b9639 100644 --- a/pyroscope/package.json +++ b/pyroscope/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/pyroscope/rsbuild.config.ts b/pyroscope/rsbuild.config.ts index 9ceb874e4..af722f05f 100644 --- a/pyroscope/rsbuild.config.ts +++ b/pyroscope/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/pyroscope/schemas/pyroscope-profile-query/tests/valid/pyroscope-profile-query.json b/pyroscope/schemas/pyroscope-profile-query/tests/valid/pyroscope-profile-query.json index dbcd30728..4425ba8f9 100644 --- a/pyroscope/schemas/pyroscope-profile-query/tests/valid/pyroscope-profile-query.json +++ b/pyroscope/schemas/pyroscope-profile-query/tests/valid/pyroscope-profile-query.json @@ -1,10 +1,9 @@ - { "kind": "PyroscopeProfileQuery", "spec": { "datasource": { - "kind": "PyroscopeDatasource", - "name": "MyDemoDatasource" + "kind": "PyroscopeDatasource", + "name": "MyDemoDatasource" }, "maxNodes": 3, "profileType": "idk" diff --git a/pyroscope/src/components/AddFilterItem.tsx b/pyroscope/src/components/AddFilterItem.tsx index 1aa0ac30b..d480d34ad 100644 --- a/pyroscope/src/components/AddFilterItem.tsx +++ b/pyroscope/src/components/AddFilterItem.tsx @@ -11,9 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement } from 'react'; -import PlusIcon from 'mdi-material-ui/Plus'; import { ToolbarIconButton } from '@perses-dev/components'; +import PlusIcon from 'mdi-material-ui/Plus'; +import { ReactElement } from 'react'; export interface AddFilterItemProps { onClick: () => void; diff --git a/pyroscope/src/components/DeleteFilterItem.tsx b/pyroscope/src/components/DeleteFilterItem.tsx index 8d89da7f1..87d1ca418 100644 --- a/pyroscope/src/components/DeleteFilterItem.tsx +++ b/pyroscope/src/components/DeleteFilterItem.tsx @@ -11,9 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement } from 'react'; -import CloseIcon from 'mdi-material-ui/Close'; import { ToolbarIconButton } from '@perses-dev/components'; +import CloseIcon from 'mdi-material-ui/Close'; +import { ReactElement } from 'react'; export interface DeleteFilterItemProps { onClick: () => void; diff --git a/pyroscope/src/components/FilterItem.tsx b/pyroscope/src/components/FilterItem.tsx index 15a6ce66f..36bf064ae 100644 --- a/pyroscope/src/components/FilterItem.tsx +++ b/pyroscope/src/components/FilterItem.tsx @@ -11,14 +11,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement } from 'react'; import { Grid2 as Grid, Stack } from '@mui/material'; +import { ReactElement } from 'react'; + import { PyroscopeDatasourceSelector } from '../model'; import { LabelFilter, OperatorType } from '../utils/types'; +import { DeleteFilterItem } from './DeleteFilterItem'; import { LabelName } from './LabelName'; -import { Operator } from './Operator'; import { LabelValue } from './LabelValue'; -import { DeleteFilterItem } from './DeleteFilterItem'; +import { Operator } from './Operator'; export interface FilterItemProps { datasource: PyroscopeDatasourceSelector; diff --git a/pyroscope/src/components/Filters.tsx b/pyroscope/src/components/Filters.tsx index c863b5c05..d470925b3 100644 --- a/pyroscope/src/components/Filters.tsx +++ b/pyroscope/src/components/Filters.tsx @@ -11,12 +11,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement } from 'react'; import { InputLabel, Stack, useTheme } from '@mui/material'; +import { ReactElement } from 'react'; + import { PyroscopeDatasourceSelector } from '../model'; import { LabelFilter } from '../utils/types'; -import { FilterItem } from './FilterItem'; import { AddFilterItem } from './AddFilterItem'; +import { FilterItem } from './FilterItem'; export interface FiltersProps { datasource: PyroscopeDatasourceSelector; diff --git a/pyroscope/src/components/LabelName.tsx b/pyroscope/src/components/LabelName.tsx index 5a9b4420b..d8fd68036 100644 --- a/pyroscope/src/components/LabelName.tsx +++ b/pyroscope/src/components/LabelName.tsx @@ -11,8 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, useMemo } from 'react'; import { TextField, Autocomplete } from '@mui/material'; +import { ReactElement, useMemo } from 'react'; + import { PyroscopeDatasourceSelector } from '../model'; import { useLabelNames, filterLabelNamesOptions } from '../utils/use-query'; diff --git a/pyroscope/src/components/LabelValue.tsx b/pyroscope/src/components/LabelValue.tsx index 025b8a9a0..aa91003fd 100644 --- a/pyroscope/src/components/LabelValue.tsx +++ b/pyroscope/src/components/LabelValue.tsx @@ -11,8 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement } from 'react'; import { TextField, Autocomplete } from '@mui/material'; +import { ReactElement } from 'react'; + import { PyroscopeDatasourceSelector } from '../model'; import { useLabelValues } from '../utils/use-query'; diff --git a/pyroscope/src/components/Operator.tsx b/pyroscope/src/components/Operator.tsx index d1316e24c..baa6c4096 100644 --- a/pyroscope/src/components/Operator.tsx +++ b/pyroscope/src/components/Operator.tsx @@ -11,8 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement } from 'react'; import { Select, MenuItem } from '@mui/material'; +import { ReactElement } from 'react'; export interface OperatorProps { value: string; diff --git a/pyroscope/src/components/ProfileTypeSelector.tsx b/pyroscope/src/components/ProfileTypeSelector.tsx index 8284a1921..506fe8a7a 100644 --- a/pyroscope/src/components/ProfileTypeSelector.tsx +++ b/pyroscope/src/components/ProfileTypeSelector.tsx @@ -11,8 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement } from 'react'; import { Stack, TextField, MenuItem, CircularProgress } from '@mui/material'; +import { ReactElement } from 'react'; + import { PyroscopeDatasourceSelector } from '../model'; import { useProfileTypes } from '../utils/use-query'; diff --git a/pyroscope/src/components/Service.tsx b/pyroscope/src/components/Service.tsx index 4e731100e..88b8ef786 100644 --- a/pyroscope/src/components/Service.tsx +++ b/pyroscope/src/components/Service.tsx @@ -11,8 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, SyntheticEvent } from 'react'; import { Stack, TextField, Autocomplete } from '@mui/material'; +import { ReactElement, SyntheticEvent } from 'react'; + import { PyroscopeDatasourceSelector } from '../model'; import { useServices } from '../utils/use-query'; diff --git a/pyroscope/src/explore/PyroscopeExplorer.tsx b/pyroscope/src/explore/PyroscopeExplorer.tsx index 88d90a194..ec9a55c71 100644 --- a/pyroscope/src/explore/PyroscopeExplorer.tsx +++ b/pyroscope/src/explore/PyroscopeExplorer.tsx @@ -12,11 +12,12 @@ // limitations under the License. import { Alert, Box, Stack } from '@mui/material'; -import { ReactElement, useState } from 'react'; -import { DataQueriesProvider, MultiQueryEditor } from '@perses-dev/plugin-system'; import { Panel } from '@perses-dev/dashboards'; import { useExplorerManagerContext } from '@perses-dev/explore'; +import { DataQueriesProvider, MultiQueryEditor } from '@perses-dev/plugin-system'; import { QueryDefinition } from '@perses-dev/spec'; +import { ReactElement, useState } from 'react'; + import { isProfileQueryComplete, PyroscopeProfileQuerySpec } from '../model'; interface ProfilesExplorerQueryParams { diff --git a/pyroscope/src/getPluginModule.ts b/pyroscope/src/getPluginModule.ts index cab8b384b..515511f2f 100644 --- a/pyroscope/src/getPluginModule.ts +++ b/pyroscope/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/pyroscope/src/model/pyroscope-client.ts b/pyroscope/src/model/pyroscope-client.ts index ec4fa06bb..860f6c916 100644 --- a/pyroscope/src/model/pyroscope-client.ts +++ b/pyroscope/src/model/pyroscope-client.ts @@ -11,8 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { DatasourceClient } from '@perses-dev/plugin-system'; import { RequestHeaders } from '@perses-dev/client'; +import { DatasourceClient } from '@perses-dev/plugin-system'; + import { SearchProfilesParameters, SearchProfilesResponse, @@ -65,7 +66,7 @@ export const executeRequest = async (...args: Parameters return await response.json(); } catch (e) { console.error('Invalid response from server', e); - throw new Error('Invalid response from server'); + throw new Error('Invalid response from server', { cause: e }); } }; diff --git a/pyroscope/src/plugins/PyroscopeDatasourceEditor.tsx b/pyroscope/src/plugins/PyroscopeDatasourceEditor.tsx index 328622257..3250330f3 100644 --- a/pyroscope/src/plugins/PyroscopeDatasourceEditor.tsx +++ b/pyroscope/src/plugins/PyroscopeDatasourceEditor.tsx @@ -13,6 +13,7 @@ import { HTTPSettingsEditor } from '@perses-dev/plugin-system'; import React, { ReactElement } from 'react'; + import { PyroscopeDatasourceSpec } from './pyroscope-datasource-types'; export interface PyroscopeDatasourceEditorProps { diff --git a/pyroscope/src/plugins/pyroscope-datasource.tsx b/pyroscope/src/plugins/pyroscope-datasource.tsx index 26d44cbeb..c60c515dc 100644 --- a/pyroscope/src/plugins/pyroscope-datasource.tsx +++ b/pyroscope/src/plugins/pyroscope-datasource.tsx @@ -12,6 +12,7 @@ // limitations under the License. import { DatasourcePlugin } from '@perses-dev/plugin-system'; + import { PyroscopeClient, searchProfiles, diff --git a/pyroscope/src/plugins/pyroscope-profile-query/PyroscopeProfileQueryEditor.tsx b/pyroscope/src/plugins/pyroscope-profile-query/PyroscopeProfileQueryEditor.tsx index 5eb9da747..7cf8950d1 100644 --- a/pyroscope/src/plugins/pyroscope-profile-query/PyroscopeProfileQueryEditor.tsx +++ b/pyroscope/src/plugins/pyroscope-profile-query/PyroscopeProfileQueryEditor.tsx @@ -11,11 +11,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { DatasourceSelect, DatasourceSelectProps, useDatasourceSelectValueToSelector } from '@perses-dev/plugin-system'; +import { FormControl, InputLabel, Stack, TextField, useTheme } from '@mui/material'; import { useId } from '@perses-dev/components'; +import { DatasourceSelect, DatasourceSelectProps, useDatasourceSelectValueToSelector } from '@perses-dev/plugin-system'; import { produce } from 'immer'; -import { FormControl, InputLabel, Stack, TextField, useTheme } from '@mui/material'; import { ReactElement } from 'react'; + +import { ProfileTypeSelector, Service, Filters } from '../../components'; import { DEFAULT_PYROSCOPE, isDefaultPyroscopeSelector, @@ -23,7 +25,6 @@ import { PYROSCOPE_DATASOURCE_KIND, PyroscopeDatasourceSelector, } from '../../model'; -import { ProfileTypeSelector, Service, Filters } from '../../components'; import { ProfileQueryEditorProps, useMaxNodesState, diff --git a/pyroscope/src/plugins/pyroscope-profile-query/get-profile-data.test.ts b/pyroscope/src/plugins/pyroscope-profile-query/get-profile-data.test.ts index 09be0ec53..e86b00c69 100644 --- a/pyroscope/src/plugins/pyroscope-profile-query/get-profile-data.test.ts +++ b/pyroscope/src/plugins/pyroscope-profile-query/get-profile-data.test.ts @@ -12,6 +12,7 @@ // limitations under the License. import { ProfileData, StackTrace } from '@perses-dev/spec'; + import { SearchProfilesResponse } from '../../model'; import { transformProfileResponse } from './get-profile-data'; diff --git a/pyroscope/src/plugins/pyroscope-profile-query/get-profile-data.ts b/pyroscope/src/plugins/pyroscope-profile-query/get-profile-data.ts index 9507e8191..a29fb6b42 100644 --- a/pyroscope/src/plugins/pyroscope-profile-query/get-profile-data.ts +++ b/pyroscope/src/plugins/pyroscope-profile-query/get-profile-data.ts @@ -12,8 +12,9 @@ // limitations under the License. import { ProfileQueryPlugin } from '@perses-dev/plugin-system'; -import { getUnixTime } from 'date-fns'; import { AbsoluteTimeRange, ProfileData, StackTrace } from '@perses-dev/spec'; +import { getUnixTime } from 'date-fns'; + import { PyroscopeProfileQuerySpec, PYROSCOPE_DATASOURCE_KIND, diff --git a/pyroscope/src/plugins/pyroscope-profile-query/query-editor-model.ts b/pyroscope/src/plugins/pyroscope-profile-query/query-editor-model.ts index f1239afe3..b0517f888 100644 --- a/pyroscope/src/plugins/pyroscope-profile-query/query-editor-model.ts +++ b/pyroscope/src/plugins/pyroscope-profile-query/query-editor-model.ts @@ -11,9 +11,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { useState } from 'react'; -import { produce } from 'immer'; import { OptionsEditorProps } from '@perses-dev/plugin-system'; +import { produce } from 'immer'; +import { useState } from 'react'; + import { PyroscopeProfileQuerySpec } from '../../model/profile-query-model'; import { LabelFilter } from '../../utils/types'; diff --git a/pyroscope/src/utils/use-query.ts b/pyroscope/src/utils/use-query.ts index 78296a74e..712304cb1 100644 --- a/pyroscope/src/utils/use-query.ts +++ b/pyroscope/src/utils/use-query.ts @@ -11,11 +11,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { StatusError } from '@perses-dev/client'; import { useDatasourceClient, useTimeRange } from '@perses-dev/plugin-system'; - -import { useQuery, UseQueryResult } from '@tanstack/react-query'; import { DatasourceSelector } from '@perses-dev/spec'; -import { StatusError } from '@perses-dev/client'; +import { useQuery, UseQueryResult } from '@tanstack/react-query'; + import { SearchLabelNamesResponse, SearchLabelValuesResponse, diff --git a/scatterchart/jest.config.ts b/scatterchart/jest.config.ts index 5190fb4de..16027133b 100644 --- a/scatterchart/jest.config.ts +++ b/scatterchart/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/scatterchart/package.json b/scatterchart/package.json index c16eeb9eb..8a8c87c1e 100644 --- a/scatterchart/package.json +++ b/scatterchart/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/scatterchart/rsbuild.config.ts b/scatterchart/rsbuild.config.ts index ed785439a..d51732446 100644 --- a/scatterchart/rsbuild.config.ts +++ b/scatterchart/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/scatterchart/src/ScatterChart.ts b/scatterchart/src/ScatterChart.ts index 83ffb811f..ea7306eb7 100644 --- a/scatterchart/src/ScatterChart.ts +++ b/scatterchart/src/ScatterChart.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PanelPlugin } from '@perses-dev/plugin-system'; + import { createInitialScatterChartOptions, ScatterChartOptions } from './scatter-chart-model'; import { ScatterChartPanel, ScatterChartPanelProps } from './ScatterChartPanel'; diff --git a/scatterchart/src/ScatterChartPanel.test.tsx b/scatterchart/src/ScatterChartPanel.test.tsx index 5ed74c06a..eb2c5ce96 100644 --- a/scatterchart/src/ScatterChartPanel.test.tsx +++ b/scatterchart/src/ScatterChartPanel.test.tsx @@ -11,13 +11,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { PanelData, ReactRouterProvider, TimeRangeProviderBasic } from '@perses-dev/plugin-system'; -import { screen, render } from '@testing-library/react'; import { ChartsProvider, testChartsTheme } from '@perses-dev/components'; -import { MemoryRouter } from 'react-router-dom'; import { VariableProvider } from '@perses-dev/dashboards'; -import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { PanelData, ReactRouterProvider, TimeRangeProviderBasic } from '@perses-dev/plugin-system'; import { TraceData } from '@perses-dev/spec'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { screen, render } from '@testing-library/react'; +import { MemoryRouter } from 'react-router-dom'; + import { MOCK_TRACE_SEARCH_RESULT_QUERY_RESULT, MOCK_TRACE_SEARCH_RESULT_QUERY_RESULT_EMPTY } from './mock-trace-data'; import { getSymbolSize, ScatterChartPanel, ScatterChartPanelProps } from './ScatterChartPanel'; diff --git a/scatterchart/src/ScatterChartPanel.tsx b/scatterchart/src/ScatterChartPanel.tsx index 8c6a07f73..4d8dba905 100644 --- a/scatterchart/src/ScatterChartPanel.tsx +++ b/scatterchart/src/ScatterChartPanel.tsx @@ -11,13 +11,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { PanelProps } from '@perses-dev/plugin-system'; -import { ReactElement, useMemo } from 'react'; -import { EChartsOption, SeriesOption } from 'echarts'; import { NoDataOverlay, useChartsTheme } from '@perses-dev/components'; +import { PanelProps } from '@perses-dev/plugin-system'; import { TraceData, TraceSearchResult } from '@perses-dev/spec'; -import { Scatterplot } from './Scatterplot'; +import { EChartsOption, SeriesOption } from 'echarts'; +import { ReactElement, useMemo } from 'react'; + import { ScatterChartOptions } from './scatter-chart-model'; +import { Scatterplot } from './Scatterplot'; export interface EChartTraceValue extends Omit { name: string; diff --git a/scatterchart/src/Scatterplot.tsx b/scatterchart/src/Scatterplot.tsx index efba503f8..fe52484fd 100644 --- a/scatterchart/src/Scatterplot.tsx +++ b/scatterchart/src/Scatterplot.tsx @@ -11,9 +11,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, useCallback, useMemo } from 'react'; import { EChart, formatValue, OnEventsType, useChartsTheme, useTimeZone } from '@perses-dev/components'; -import { use, EChartsCoreOption } from 'echarts/core'; +import { + replaceVariablesInString, + useAllVariableValues, + useRouterContext, + useTimeRange, +} from '@perses-dev/plugin-system'; +import { EChartsOption, ScatterSeriesOption } from 'echarts'; import { ScatterChart as EChartsScatterChart } from 'echarts/charts'; import { DatasetComponent, @@ -23,18 +28,14 @@ import { TitleComponent, TooltipComponent, } from 'echarts/components'; +import { use as registerECharts, EChartsCoreOption } from 'echarts/core'; import { CanvasRenderer } from 'echarts/renderers'; -import { EChartsOption, ScatterSeriesOption } from 'echarts'; -import { - replaceVariablesInString, - useAllVariableValues, - useRouterContext, - useTimeRange, -} from '@perses-dev/plugin-system'; +import { ReactElement, useCallback, useMemo } from 'react'; + import { EChartTraceValue } from './ScatterChartPanel'; import { createTimezoneAwareAxisFormatter } from './utils/timezone-formatter'; -use([ +registerECharts([ DatasetComponent, DataZoomComponent, LegendComponent, diff --git a/scatterchart/src/getPluginModule.ts b/scatterchart/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/scatterchart/src/getPluginModule.ts +++ b/scatterchart/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/splunk/jest.config.ts b/splunk/jest.config.ts index 5190fb4de..16027133b 100644 --- a/splunk/jest.config.ts +++ b/splunk/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/splunk/package.json b/splunk/package.json index 61f5041e5..c96ac0b0b 100644 --- a/splunk/package.json +++ b/splunk/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/splunk/rsbuild.config.ts b/splunk/rsbuild.config.ts index ad24f5169..3933ed71e 100644 --- a/splunk/rsbuild.config.ts +++ b/splunk/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/splunk/src/datasources/splunk-datasource/SplunkDatasource.tsx b/splunk/src/datasources/splunk-datasource/SplunkDatasource.tsx index 7262c9da2..7ee9593b1 100644 --- a/splunk/src/datasources/splunk-datasource/SplunkDatasource.tsx +++ b/splunk/src/datasources/splunk-datasource/SplunkDatasource.tsx @@ -12,6 +12,7 @@ // limitations under the License. import { DatasourcePlugin } from '@perses-dev/plugin-system'; + import { SplunkClient, createJob, diff --git a/splunk/src/datasources/splunk-datasource/SplunkDatasourceEditor.tsx b/splunk/src/datasources/splunk-datasource/SplunkDatasourceEditor.tsx index 23e3892ee..c88d389af 100644 --- a/splunk/src/datasources/splunk-datasource/SplunkDatasourceEditor.tsx +++ b/splunk/src/datasources/splunk-datasource/SplunkDatasourceEditor.tsx @@ -13,6 +13,7 @@ import { HTTPSettingsEditor } from '@perses-dev/plugin-system'; import { ReactElement } from 'react'; + import { SplunkDatasourceSpec } from './splunk-datasource-types'; export interface SplunkDatasourceEditorProps { diff --git a/splunk/src/getPluginModule.ts b/splunk/src/getPluginModule.ts index cab8b384b..515511f2f 100644 --- a/splunk/src/getPluginModule.ts +++ b/splunk/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/splunk/src/model/splunk-client.ts b/splunk/src/model/splunk-client.ts index e0db9b3f5..58bce086b 100644 --- a/splunk/src/model/splunk-client.ts +++ b/splunk/src/model/splunk-client.ts @@ -12,6 +12,7 @@ // limitations under the License. import { fetchJson } from '@perses-dev/client'; + import { SplunkJobCreateResponse, SplunkJobStatusResponse, diff --git a/splunk/src/queries/splunk-log-query/SplunkLogQuery.test.ts b/splunk/src/queries/splunk-log-query/SplunkLogQuery.test.ts index 89d32d5e9..d7aaf7505 100644 --- a/splunk/src/queries/splunk-log-query/SplunkLogQuery.test.ts +++ b/splunk/src/queries/splunk-log-query/SplunkLogQuery.test.ts @@ -11,8 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { SplunkLogQuery } from './SplunkLogQuery'; import { LogQueryContext } from './log-query-plugin-interface'; +import { SplunkLogQuery } from './SplunkLogQuery'; const createStubContext = (): LogQueryContext => ({ datasourceStore: { diff --git a/splunk/src/queries/splunk-log-query/SplunkLogQuery.tsx b/splunk/src/queries/splunk-log-query/SplunkLogQuery.tsx index aac5d8625..d1a84a969 100644 --- a/splunk/src/queries/splunk-log-query/SplunkLogQuery.tsx +++ b/splunk/src/queries/splunk-log-query/SplunkLogQuery.tsx @@ -12,10 +12,11 @@ // limitations under the License. import { parseVariables } from '@perses-dev/plugin-system'; + import { getSplunkLogData } from './get-splunk-log-data'; -import { SplunkLogQueryEditor } from './SplunkLogQueryEditor'; -import { SplunkLogQuerySpec } from './splunk-log-query-types'; import { LogQueryPlugin } from './log-query-plugin-interface'; +import { SplunkLogQuerySpec } from './splunk-log-query-types'; +import { SplunkLogQueryEditor } from './SplunkLogQueryEditor'; export const SplunkLogQuery: LogQueryPlugin = { getLogData: getSplunkLogData, @@ -23,7 +24,7 @@ export const SplunkLogQuery: LogQueryPlugin = { createInitialOptions: () => ({ query: '' }), dependsOn: (spec) => { const queryVariables = parseVariables(spec.query); - const allVariables = [...new Set([...queryVariables])]; + const allVariables = [...new Set(queryVariables)]; return { variables: allVariables, }; diff --git a/splunk/src/queries/splunk-log-query/SplunkLogQueryEditor.tsx b/splunk/src/queries/splunk-log-query/SplunkLogQueryEditor.tsx index d9799c7cf..bb8f3f696 100644 --- a/splunk/src/queries/splunk-log-query/SplunkLogQueryEditor.tsx +++ b/splunk/src/queries/splunk-log-query/SplunkLogQueryEditor.tsx @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { Box, InputLabel, Stack, TextField } from '@mui/material'; import { DatasourceSelect, DatasourceSelectProps, @@ -18,9 +19,9 @@ import { OptionsEditorProps, useDatasourceSelectValueToSelector, } from '@perses-dev/plugin-system'; -import { Box, InputLabel, Stack, TextField } from '@mui/material'; -import { ReactElement } from 'react'; import { produce } from 'immer'; +import { ReactElement } from 'react'; + import { SplunkLogQuerySpec } from './splunk-log-query-types'; const DATASOURCE_KIND = 'SplunkDatasource'; diff --git a/splunk/src/queries/splunk-log-query/get-splunk-log-data.ts b/splunk/src/queries/splunk-log-query/get-splunk-log-data.ts index e10cf16bc..e1ead8397 100644 --- a/splunk/src/queries/splunk-log-query/get-splunk-log-data.ts +++ b/splunk/src/queries/splunk-log-query/get-splunk-log-data.ts @@ -13,17 +13,18 @@ import { replaceVariables } from '@perses-dev/plugin-system'; import { HTTPAllowedEndpoint, LogData, LogEntry } from '@perses-dev/spec'; -import { SplunkClient } from '../../model/splunk-client'; + import { SplunkDatasourceSpec } from '../../datasources/splunk-datasource/splunk-datasource-types'; -import { DEFAULT_DATASOURCE } from '../constants'; +import { SplunkClient } from '../../model/splunk-client'; import { SplunkIndexResponse, SplunkJobCreateResponse, SplunkJobStatusResponse, SplunkResultsResponse, } from '../../model/splunk-client-types'; -import { SplunkLogQuerySpec } from './splunk-log-query-types'; +import { DEFAULT_DATASOURCE } from '../constants'; import { LogQueryPlugin, LogQueryContext } from './log-query-plugin-interface'; +import { SplunkLogQuerySpec } from './splunk-log-query-types'; function convertResultsToLogs( results: diff --git a/splunk/src/queries/splunk-log-query/splunk-log-query-types.ts b/splunk/src/queries/splunk-log-query/splunk-log-query-types.ts index b0544bca5..16209b050 100644 --- a/splunk/src/queries/splunk-log-query/splunk-log-query-types.ts +++ b/splunk/src/queries/splunk-log-query/splunk-log-query-types.ts @@ -12,6 +12,7 @@ // limitations under the License. import { DatasourceSelector } from '@perses-dev/spec'; + import { SplunkLogResults } from '../../model/splunk-client-types'; export interface SplunkLogQuerySpec { diff --git a/splunk/src/queries/splunk-time-series-query/SplunkTimeSeriesQuery.tsx b/splunk/src/queries/splunk-time-series-query/SplunkTimeSeriesQuery.tsx index da88d5cc5..0970f56a8 100644 --- a/splunk/src/queries/splunk-time-series-query/SplunkTimeSeriesQuery.tsx +++ b/splunk/src/queries/splunk-time-series-query/SplunkTimeSeriesQuery.tsx @@ -12,9 +12,10 @@ // limitations under the License. import { TimeSeriesQueryPlugin, parseVariables } from '@perses-dev/plugin-system'; + import { getSplunkTimeSeriesData } from './get-splunk-time-series-data'; -import { SplunkTimeSeriesQueryEditor } from './SplunkTimeSeriesQueryEditor'; import { SplunkTimeSeriesQuerySpec } from './splunk-time-series-query-types'; +import { SplunkTimeSeriesQueryEditor } from './SplunkTimeSeriesQueryEditor'; export const SplunkTimeSeriesQuery: TimeSeriesQueryPlugin = { getTimeSeriesData: getSplunkTimeSeriesData, @@ -22,7 +23,7 @@ export const SplunkTimeSeriesQuery: TimeSeriesQueryPlugin ({ query: '' }), dependsOn: (spec) => { const queryVariables = parseVariables(spec.query); - const allVariables = [...new Set([...queryVariables])]; + const allVariables = [...new Set(queryVariables)]; return { variables: allVariables, }; diff --git a/splunk/src/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.tsx b/splunk/src/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.tsx index f928b48b3..9370674f0 100644 --- a/splunk/src/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.tsx +++ b/splunk/src/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.tsx @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { Box, InputLabel, Stack, TextField } from '@mui/material'; import { DatasourceSelect, DatasourceSelectProps, @@ -18,9 +19,9 @@ import { OptionsEditorProps, useDatasourceSelectValueToSelector, } from '@perses-dev/plugin-system'; -import { Box, InputLabel, Stack, TextField } from '@mui/material'; -import { ReactElement } from 'react'; import { produce } from 'immer'; +import { ReactElement } from 'react'; + import { SplunkTimeSeriesQuerySpec } from './splunk-time-series-query-types'; const DATASOURCE_KIND = 'SplunkDatasource'; diff --git a/splunk/src/queries/splunk-time-series-query/get-splunk-time-series-data.ts b/splunk/src/queries/splunk-time-series-query/get-splunk-time-series-data.ts index a3b88e5fe..4f467c3a3 100644 --- a/splunk/src/queries/splunk-time-series-query/get-splunk-time-series-data.ts +++ b/splunk/src/queries/splunk-time-series-query/get-splunk-time-series-data.ts @@ -13,10 +13,11 @@ import { TimeSeriesQueryPlugin, replaceVariables } from '@perses-dev/plugin-system'; import { HTTPAllowedEndpoint, TimeSeries } from '@perses-dev/spec'; -import { SplunkClient } from '../../model/splunk-client'; + import { SplunkDatasourceSpec } from '../../datasources/splunk-datasource/splunk-datasource-types'; -import { DEFAULT_DATASOURCE } from '../constants'; import { SplunkJobCreateResponse, SplunkJobStatusResponse, SplunkResultsResponse } from '../../model'; +import { SplunkClient } from '../../model/splunk-client'; +import { DEFAULT_DATASOURCE } from '../constants'; import { SplunkTimeSeriesQuerySpec } from './splunk-time-series-query-types'; function convertResultsToTimeSeries( diff --git a/splunk/src/queries/splunk-time-series-query/splunk-time-series-query-types.ts b/splunk/src/queries/splunk-time-series-query/splunk-time-series-query-types.ts index e535cd09f..46bc70edc 100644 --- a/splunk/src/queries/splunk-time-series-query/splunk-time-series-query-types.ts +++ b/splunk/src/queries/splunk-time-series-query/splunk-time-series-query-types.ts @@ -12,6 +12,7 @@ // limitations under the License. import { DatasourceSelector } from '@perses-dev/spec'; + import { SplunkTimeSeriesResults } from '../../model/splunk-client-types'; export interface SplunkTimeSeriesQuerySpec { diff --git a/statchart/jest.config.ts b/statchart/jest.config.ts index 5190fb4de..16027133b 100644 --- a/statchart/jest.config.ts +++ b/statchart/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/statchart/package.json b/statchart/package.json index 3e3f8fad1..a699f1eac 100644 --- a/statchart/package.json +++ b/statchart/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/statchart/rsbuild.config.ts b/statchart/rsbuild.config.ts index 332163f4e..6ab798968 100644 --- a/statchart/rsbuild.config.ts +++ b/statchart/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/statchart/schemas/migrate/tests/basic/input.json b/statchart/schemas/migrate/tests/basic/input.json index f9ada9c9e..12429767e 100644 --- a/statchart/schemas/migrate/tests/basic/input.json +++ b/statchart/schemas/migrate/tests/basic/input.json @@ -41,9 +41,7 @@ "justifyMode": "auto", "orientation": "auto", "reduceOptions": { - "calcs": [ - "lastNotNull" - ], + "calcs": ["lastNotNull"], "fields": "", "values": false }, @@ -65,4 +63,4 @@ ], "title": "My Stat chart", "type": "stat" -} \ No newline at end of file +} diff --git a/statchart/schemas/migrate/tests/label-display-from-legend/input.json b/statchart/schemas/migrate/tests/label-display-from-legend/input.json index aca94badf..de1562e51 100644 --- a/statchart/schemas/migrate/tests/label-display-from-legend/input.json +++ b/statchart/schemas/migrate/tests/label-display-from-legend/input.json @@ -44,9 +44,7 @@ "options": { "reduceOptions": { "values": false, - "calcs": [ - "mean" - ], + "calcs": ["mean"], "fields": "" }, "orientation": "auto", @@ -58,4 +56,4 @@ "showPercentChange": false, "percentChangeColorMode": "standard" } -} \ No newline at end of file +} diff --git a/statchart/schemas/migrate/tests/label-display-from-options/input.json b/statchart/schemas/migrate/tests/label-display-from-options/input.json index a0b57e6c8..007e2b68c 100644 --- a/statchart/schemas/migrate/tests/label-display-from-options/input.json +++ b/statchart/schemas/migrate/tests/label-display-from-options/input.json @@ -44,9 +44,7 @@ "options": { "reduceOptions": { "values": false, - "calcs": [ - "lastNotNull" - ], + "calcs": ["lastNotNull"], "fields": "/^version$/" }, "orientation": "auto", diff --git a/statchart/schemas/migrate/tests/mappings/expected.json b/statchart/schemas/migrate/tests/mappings/expected.json index 069e6aded..4dc38d9cf 100644 --- a/statchart/schemas/migrate/tests/mappings/expected.json +++ b/statchart/schemas/migrate/tests/mappings/expected.json @@ -71,4 +71,4 @@ ] } } -} \ No newline at end of file +} diff --git a/statchart/schemas/migrate/tests/overrides_to_mappings/input.json b/statchart/schemas/migrate/tests/overrides_to_mappings/input.json index 66a2afda7..5f77d743b 100644 --- a/statchart/schemas/migrate/tests/overrides_to_mappings/input.json +++ b/statchart/schemas/migrate/tests/overrides_to_mappings/input.json @@ -98,9 +98,7 @@ "options": { "reduceOptions": { "values": false, - "calcs": [ - "mean" - ], + "calcs": ["mean"], "fields": "" }, "orientation": "auto", @@ -112,4 +110,4 @@ "showPercentChange": false, "percentChangeColorMode": "standard" } -} \ No newline at end of file +} diff --git a/statchart/schemas/migrate/tests/special_mapping_without_match/expected.json b/statchart/schemas/migrate/tests/special_mapping_without_match/expected.json index e0cc3e524..747adc7c2 100644 --- a/statchart/schemas/migrate/tests/special_mapping_without_match/expected.json +++ b/statchart/schemas/migrate/tests/special_mapping_without_match/expected.json @@ -44,4 +44,4 @@ ] } } -} \ No newline at end of file +} diff --git a/statchart/schemas/migrate/tests/special_mapping_without_match/input.json b/statchart/schemas/migrate/tests/special_mapping_without_match/input.json index dea76a10c..3b5bddba9 100644 --- a/statchart/schemas/migrate/tests/special_mapping_without_match/input.json +++ b/statchart/schemas/migrate/tests/special_mapping_without_match/input.json @@ -1,88 +1,96 @@ { - "datasource" : { - "uid" : "$datasource" + "datasource": { + "uid": "$datasource" }, - "description" : " - Dynamic Load Balancing: Dynamic load balancing enabled state for the selected stack and namespace", - "fieldConfig" : { - "defaults" : { - "color" : { - "mode" : "thresholds" + "description": " - Dynamic Load Balancing: Dynamic load balancing enabled state for the selected stack and namespace", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" }, - "links" : [ ], - "mappings" : [ { - "options" : { - "0" : { - "color" : "#F2495C", - "index" : 0, - "text" : "NO" + "links": [], + "mappings": [ + { + "options": { + "0": { + "color": "#F2495C", + "index": 0, + "text": "NO" + }, + "1": { + "color": "#73BF69", + "index": 1, + "text": "YES" + } }, - "1" : { - "color" : "#73BF69", - "index" : 1, - "text" : "YES" - } + "type": "value" }, - "type" : "value" - }, { - "options" : { - "result" : { - "color" : "#5794F2", - "index" : 2, - "text" : "No data" + { + "options": { + "result": { + "color": "#5794F2", + "index": 2, + "text": "No data" + } + }, + "type": "special" + } + ], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#F2495C" + }, + { + "color": "#73BF69", + "value": 1 } - }, - "type" : "special" - } ], - "max" : 1, - "min" : 0, - "thresholds" : { - "mode" : "absolute", - "steps" : [ { - "color" : "#F2495C" - }, { - "color" : "#73BF69", - "value" : 1 - } ] + ] }, - "unit" : "" + "unit": "" }, - "overrides" : [ ] + "overrides": [] }, - "gridPos" : { - "h" : 4, - "w" : 3, - "x" : 6, - "y" : 16 + "gridPos": { + "h": 4, + "w": 3, + "x": 6, + "y": 16 }, - "id" : 88, - "options" : { - "colorMode" : "value", - "graphMode" : "none", - "justifyMode" : "auto", - "orientation" : "auto", - "reduceOptions" : { - "calcs" : [ "lastNotNull" ], - "fields" : "", - "values" : false + "id": 88, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false }, - "textMode" : "auto" + "textMode": "auto" }, - "pluginVersion" : "7", - "targets" : [ { - "datasource" : { - "type" : "prometheus", - "uid" : "" - }, - "exemplar" : false, - "expr" : "myquery", - "format" : "time_series", - "hide" : false, - "instant" : false, - "interval" : "$sampling", - "intervalFactor" : 1, - "legendFormat" : "Dynamic Load Balancing", - "refId" : "dynamic_load_balancing" - } ], - "title" : "Dynamic Load Balancing", - "type" : "stat" -} \ No newline at end of file + "pluginVersion": "7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "" + }, + "exemplar": false, + "expr": "myquery", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "$sampling", + "intervalFactor": 1, + "legendFormat": "Dynamic Load Balancing", + "refId": "dynamic_load_balancing" + } + ], + "title": "Dynamic Load Balancing", + "type": "stat" +} diff --git a/statchart/schemas/tests/valid/misc_with_null_value.json b/statchart/schemas/tests/valid/misc_with_null_value.json index e0cc3e524..747adc7c2 100644 --- a/statchart/schemas/tests/valid/misc_with_null_value.json +++ b/statchart/schemas/tests/valid/misc_with_null_value.json @@ -44,4 +44,4 @@ ] } } -} \ No newline at end of file +} diff --git a/statchart/src/StatChart.ts b/statchart/src/StatChart.ts index efa3cf8c3..074a8ac50 100644 --- a/statchart/src/StatChart.ts +++ b/statchart/src/StatChart.ts @@ -12,10 +12,11 @@ // limitations under the License. import { PanelPlugin } from '@perses-dev/plugin-system'; + import { createInitialStatChartOptions, StatChartOptions } from './stat-chart-model'; -import { StatChartValueMappingEditor } from './StatChartValueMappingEditor'; import { StatChartOptionsEditorSettings } from './StatChartOptionsEditorSettings'; import { StatChartPanel, StatChartPanelProps } from './StatChartPanel'; +import { StatChartValueMappingEditor } from './StatChartValueMappingEditor'; /** * The core StatChart panel plugin for Perses. diff --git a/statchart/src/StatChartBase.test.tsx b/statchart/src/StatChartBase.test.tsx index 207240654..6eb7ba547 100644 --- a/statchart/src/StatChartBase.test.tsx +++ b/statchart/src/StatChartBase.test.tsx @@ -11,9 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { ChartsProvider, FormatOptions, testChartsTheme } from '@perses-dev/components'; import { render, screen } from '@testing-library/react'; -import { ChartsProvider, FormatOptions, testChartsTheme } from '@perses-dev/components'; import { StatChartBase, StatChartData } from './StatChartBase'; jest.mock('./utils/calculate-font-size', () => ({ diff --git a/statchart/src/StatChartBase.tsx b/statchart/src/StatChartBase.tsx index 461a87204..66d0f59bb 100644 --- a/statchart/src/StatChartBase.tsx +++ b/statchart/src/StatChartBase.tsx @@ -11,20 +11,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { FC, ReactNode, useMemo } from 'react'; import { Box, Typography, styled, useTheme } from '@mui/material'; -import merge from 'lodash/merge'; -import { use, EChartsCoreOption } from 'echarts/core'; +import { EChart, FontSizeOption, FormatOptions, GraphSeries, useChartsTheme } from '@perses-dev/components'; +import chroma from 'chroma-js'; import { LineChart as EChartsLineChart, LineSeriesOption } from 'echarts/charts'; import { GridComponent, DatasetComponent, TitleComponent, TooltipComponent } from 'echarts/components'; +import { use as registerECharts, EChartsCoreOption } from 'echarts/core'; import { CanvasRenderer } from 'echarts/renderers'; -import { EChart, FontSizeOption, FormatOptions, GraphSeries, useChartsTheme } from '@perses-dev/components'; -import chroma from 'chroma-js'; +import merge from 'lodash/merge'; +import { FC, ReactNode, useMemo } from 'react'; + +import { ColorMode } from './stat-chart-model'; import { useOptimalFontSize } from './utils/calculate-font-size'; import { formatStatChartValue } from './utils/format-stat-chart-value'; -import { ColorMode } from './stat-chart-model'; -use([EChartsLineChart, GridComponent, DatasetComponent, TitleComponent, TooltipComponent, CanvasRenderer]); +registerECharts([EChartsLineChart, GridComponent, DatasetComponent, TitleComponent, TooltipComponent, CanvasRenderer]); const LINE_HEIGHT = 1.2; const SERIES_NAME_MAX_FONT_SIZE = 30; diff --git a/statchart/src/StatChartOptionsEditorSettings.test.tsx b/statchart/src/StatChartOptionsEditorSettings.test.tsx index b6e755f0e..d3a21bade 100644 --- a/statchart/src/StatChartOptionsEditorSettings.test.tsx +++ b/statchart/src/StatChartOptionsEditorSettings.test.tsx @@ -14,6 +14,7 @@ import { ChartsProvider, testChartsTheme } from '@perses-dev/components'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; + import { StatChartOptions } from './stat-chart-model'; import { StatChartOptionsEditorSettings } from './StatChartOptionsEditorSettings'; diff --git a/statchart/src/StatChartOptionsEditorSettings.tsx b/statchart/src/StatChartOptionsEditorSettings.tsx index 1126a8846..40396d4c5 100644 --- a/statchart/src/StatChartOptionsEditorSettings.tsx +++ b/statchart/src/StatChartOptionsEditorSettings.tsx @@ -36,6 +36,7 @@ import { import { produce } from 'immer'; import merge from 'lodash/merge'; import { ReactElement, useCallback, useMemo } from 'react'; + import { COLOR_MODE_LABELS, ColorModeLabelItem, diff --git a/statchart/src/StatChartPanel.tsx b/statchart/src/StatChartPanel.tsx index 030734b77..caedcb96d 100644 --- a/statchart/src/StatChartPanel.tsx +++ b/statchart/src/StatChartPanel.tsx @@ -11,7 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { TitleComponentOption } from 'echarts'; +import { Stack, Typography, SxProps } from '@mui/material'; import { useChartsTheme, GraphSeries, @@ -20,15 +20,16 @@ import { applyValueMapping, createRegexFromString, } from '@perses-dev/components'; -import { Stack, Typography, SxProps } from '@mui/material'; -import { FC, useMemo } from 'react'; import { PanelProps, PanelData } from '@perses-dev/plugin-system'; import { Labels, TimeSeriesData } from '@perses-dev/spec'; +import { TitleComponentOption } from 'echarts'; +import { FC, useMemo } from 'react'; + import { StatChartOptions } from './stat-chart-model'; -import { convertSparkline } from './utils/data-transform'; +import { StatChartBase, StatChartData } from './StatChartBase'; import { calculateValue } from './utils/calculate-value'; +import { convertSparkline } from './utils/data-transform'; import { getStatChartColor } from './utils/get-color'; -import { StatChartBase, StatChartData } from './StatChartBase'; const MIN_WIDTH = 100; const SPACING = 2; @@ -38,14 +39,19 @@ export type StatChartPanelProps = PanelProps; export const StatChartPanel: FC = (props) => { const { spec, contentDimensions, queryResults } = props; - const { format, sparkline, valueFontSize: valueFontSize, colorMode } = spec; + const { format, sparkline, valueFontSize, colorMode } = spec; const chartsTheme = useChartsTheme(); const statChartData = useStatChartData(queryResults, spec, chartsTheme); const isMultiSeries = statChartData.length > 1; // Handle three-state showLegend: 'on' | 'off' | 'auto' (or undefined for backward compatibility) - const shouldShowLegend = spec.legendMode === 'on' ? true : spec.legendMode === 'off' ? false : isMultiSeries; + let shouldShowLegend = isMultiSeries; + if (spec.legendMode === 'on') { + shouldShowLegend = true; + } else if (spec.legendMode === 'off') { + shouldShowLegend = false; + } if (!contentDimensions) return null; diff --git a/statchart/src/StatChartValueMappingEditor.tsx b/statchart/src/StatChartValueMappingEditor.tsx index e5cfae356..37ea15070 100644 --- a/statchart/src/StatChartValueMappingEditor.tsx +++ b/statchart/src/StatChartValueMappingEditor.tsx @@ -11,9 +11,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { OptionsEditorProps } from '@perses-dev/plugin-system'; import { ValueMapping, ValueMappingsEditor } from '@perses-dev/components'; +import { OptionsEditorProps } from '@perses-dev/plugin-system'; import { FC } from 'react'; + import { StatChartOptions } from './stat-chart-model'; export type StatChartValueMappingEditorProps = OptionsEditorProps; diff --git a/statchart/src/getPluginModule.ts b/statchart/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/statchart/src/getPluginModule.ts +++ b/statchart/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/statchart/src/utils/calculate-font-size.ts b/statchart/src/utils/calculate-font-size.ts index 9b2d52a85..0d2fd5523 100644 --- a/statchart/src/utils/calculate-font-size.ts +++ b/statchart/src/utils/calculate-font-size.ts @@ -56,7 +56,7 @@ export function useOptimalFontSize({ } const textStyle = echartsTheme.textStyle; - const fontSize = Number(textStyle?.fontSize) ?? 12; + const fontSize = Number(textStyle?.fontSize ?? 12); const fontFamily = textStyle?.fontFamily ?? 'Lato'; // set the font on the canvas context diff --git a/statchart/src/utils/data-transform.test.ts b/statchart/src/utils/data-transform.test.ts index 6d11e2696..691b40946 100644 --- a/statchart/src/utils/data-transform.test.ts +++ b/statchart/src/utils/data-transform.test.ts @@ -13,6 +13,7 @@ import { testChartsTheme, ThresholdOptions } from '@perses-dev/components'; import { LineSeriesOption } from 'echarts'; + import { StatChartOptions, StatChartSparklineOptions } from '../stat-chart-model'; import { convertSparkline } from './data-transform'; import { getStatChartColor } from './get-color'; diff --git a/statchart/src/utils/data-transform.ts b/statchart/src/utils/data-transform.ts index 1f1862e23..f2a6db88f 100644 --- a/statchart/src/utils/data-transform.ts +++ b/statchart/src/utils/data-transform.ts @@ -13,6 +13,7 @@ import { PersesChartsTheme } from '@perses-dev/components'; import { LineSeriesOption } from 'echarts/charts'; + import { StatChartSparklineOptions } from '../stat-chart-model'; export function convertSparkline( diff --git a/statchart/src/utils/get-color.ts b/statchart/src/utils/get-color.ts index 892ff12ef..eea4da52c 100644 --- a/statchart/src/utils/get-color.ts +++ b/statchart/src/utils/get-color.ts @@ -12,6 +12,7 @@ // limitations under the License. import { applyValueMapping, PersesChartsTheme, ThresholdOptions, ValueMapping } from '@perses-dev/components'; + import { StatChartOptions } from '../stat-chart-model'; type StatChartValue = number | string | null; diff --git a/staticlistvariable/package.json b/staticlistvariable/package.json index 7e2d4e326..d934bddaa 100644 --- a/staticlistvariable/package.json +++ b/staticlistvariable/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest --passWithNoTests", "type-check": "tsc --noEmit" }, diff --git a/staticlistvariable/rsbuild.config.ts b/staticlistvariable/rsbuild.config.ts index ebfc9455a..e9278ad55 100644 --- a/staticlistvariable/rsbuild.config.ts +++ b/staticlistvariable/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/staticlistvariable/schemas/migrate/tests/custom-complex/expected.json b/staticlistvariable/schemas/migrate/tests/custom-complex/expected.json index bdd5f8c00..83a4ea1c5 100644 --- a/staticlistvariable/schemas/migrate/tests/custom-complex/expected.json +++ b/staticlistvariable/schemas/migrate/tests/custom-complex/expected.json @@ -16,4 +16,4 @@ } ] } -} \ No newline at end of file +} diff --git a/staticlistvariable/schemas/migrate/tests/custom-complex/input.json b/staticlistvariable/schemas/migrate/tests/custom-complex/input.json index 90ea142d4..5edce5adc 100644 --- a/staticlistvariable/schemas/migrate/tests/custom-complex/input.json +++ b/staticlistvariable/schemas/migrate/tests/custom-complex/input.json @@ -30,4 +30,4 @@ "query": "All : on(cluster\\,name\\,namespace) group_left()(0*(sum by(cluster\\,namespace\\,name)(kubevirt_vm_info))), stopped : on(cluster\\,name\\,namespace) group_left()(0*(sum by(cluster\\,namespace\\,name)(kubevirt_vm_info{status_group=\"non_running\"}>0))), starting : on(cluster\\,name\\,namespace) group_left()(0*(sum by(cluster\\,namespace\\,name)(kubevirt_vm_info{status_group=\"starting\"} > 0)))", "skipUrlSync": false, "type": "custom" -} \ No newline at end of file +} diff --git a/staticlistvariable/schemas/migrate/tests/custom/expected.json b/staticlistvariable/schemas/migrate/tests/custom/expected.json index 721a81f21..5175355fe 100644 --- a/staticlistvariable/schemas/migrate/tests/custom/expected.json +++ b/staticlistvariable/schemas/migrate/tests/custom/expected.json @@ -10,4 +10,4 @@ } ] } -} \ No newline at end of file +} diff --git a/staticlistvariable/schemas/migrate/tests/custom/input.json b/staticlistvariable/schemas/migrate/tests/custom/input.json index 9534a8a65..5abcffbdf 100644 --- a/staticlistvariable/schemas/migrate/tests/custom/input.json +++ b/staticlistvariable/schemas/migrate/tests/custom/input.json @@ -30,4 +30,4 @@ "query": "one, two ,three : 3 ", "skipUrlSync": false, "type": "custom" -} \ No newline at end of file +} diff --git a/staticlistvariable/schemas/migrate/tests/interval-auto/expected.json b/staticlistvariable/schemas/migrate/tests/interval-auto/expected.json index 53134715b..83ab9b70a 100644 --- a/staticlistvariable/schemas/migrate/tests/interval-auto/expected.json +++ b/staticlistvariable/schemas/migrate/tests/interval-auto/expected.json @@ -1,17 +1,6 @@ { "kind": "StaticListVariable", "spec": { - "values": [ - "1m", - "10m", - "30m", - "1h", - "6h", - "12h", - "1d", - "7d", - "14d", - "30d" - ] + "values": ["1m", "10m", "30m", "1h", "6h", "12h", "1d", "7d", "14d", "30d"] } -} \ No newline at end of file +} diff --git a/staticlistvariable/schemas/migrate/tests/interval-auto/input.json b/staticlistvariable/schemas/migrate/tests/interval-auto/input.json index 1d0b4f9ed..5f43a2989 100644 --- a/staticlistvariable/schemas/migrate/tests/interval-auto/input.json +++ b/staticlistvariable/schemas/migrate/tests/interval-auto/input.json @@ -62,4 +62,4 @@ "query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d", "refresh": 2, "type": "interval" -} \ No newline at end of file +} diff --git a/staticlistvariable/schemas/migrate/tests/interval-no-options/expected.json b/staticlistvariable/schemas/migrate/tests/interval-no-options/expected.json index e54a62d0a..108f60183 100644 --- a/staticlistvariable/schemas/migrate/tests/interval-no-options/expected.json +++ b/staticlistvariable/schemas/migrate/tests/interval-no-options/expected.json @@ -1,16 +1,6 @@ { "kind": "StaticListVariable", "spec": { - "values": [ - "15s", - "30s", - "1m", - "5m", - "10m", - "30m", - "1h", - "6h", - "1d" - ] + "values": ["15s", "30s", "1m", "5m", "10m", "30m", "1h", "6h", "1d"] } -} \ No newline at end of file +} diff --git a/staticlistvariable/schemas/migrate/tests/interval-no-options/input.json b/staticlistvariable/schemas/migrate/tests/interval-no-options/input.json index 60e388a35..b65fcd1bd 100644 --- a/staticlistvariable/schemas/migrate/tests/interval-no-options/input.json +++ b/staticlistvariable/schemas/migrate/tests/interval-no-options/input.json @@ -10,4 +10,4 @@ "query": "15s,30s,1m,5m,10m,30m,1h,6h,1d", "refresh": 2, "type": "interval" -} \ No newline at end of file +} diff --git a/staticlistvariable/schemas/migrate/tests/interval/expected.json b/staticlistvariable/schemas/migrate/tests/interval/expected.json index 53134715b..83ab9b70a 100644 --- a/staticlistvariable/schemas/migrate/tests/interval/expected.json +++ b/staticlistvariable/schemas/migrate/tests/interval/expected.json @@ -1,17 +1,6 @@ { "kind": "StaticListVariable", "spec": { - "values": [ - "1m", - "10m", - "30m", - "1h", - "6h", - "12h", - "1d", - "7d", - "14d", - "30d" - ] + "values": ["1m", "10m", "30m", "1h", "6h", "12h", "1d", "7d", "14d", "30d"] } -} \ No newline at end of file +} diff --git a/staticlistvariable/schemas/migrate/tests/interval/input.json b/staticlistvariable/schemas/migrate/tests/interval/input.json index 5b2978cbc..d3ea330de 100644 --- a/staticlistvariable/schemas/migrate/tests/interval/input.json +++ b/staticlistvariable/schemas/migrate/tests/interval/input.json @@ -66,4 +66,4 @@ "refresh": 2, "skipUrlSync": false, "type": "interval" -} \ No newline at end of file +} diff --git a/staticlistvariable/schemas/tests/valid/static-list.json b/staticlistvariable/schemas/tests/valid/static-list.json index a15ef39dc..0f36bd855 100644 --- a/staticlistvariable/schemas/tests/valid/static-list.json +++ b/staticlistvariable/schemas/tests/valid/static-list.json @@ -16,4 +16,4 @@ } ] } -} \ No newline at end of file +} diff --git a/staticlistvariable/src/StaticListVariable.tsx b/staticlistvariable/src/StaticListVariable.tsx index 75ec134c4..feea4195c 100644 --- a/staticlistvariable/src/StaticListVariable.tsx +++ b/staticlistvariable/src/StaticListVariable.tsx @@ -11,11 +11,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { Autocomplete, Chip, IconButton, TextField, Typography } from '@mui/material'; /* eslint-disable jsx-a11y/no-autofocus */ import { VariablePlugin, VariableOption, OptionsEditorProps } from '@perses-dev/plugin-system'; -import { Autocomplete, Chip, IconButton, TextField, Typography } from '@mui/material'; -import { ReactElement, useCallback, useState } from 'react'; import PlusCircleIcon from 'mdi-material-ui/PlusCircle'; +import { ReactElement, useCallback, useState } from 'react'; type StaticListOption = string | VariableOption; diff --git a/staticlistvariable/src/getPluginModule.ts b/staticlistvariable/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/staticlistvariable/src/getPluginModule.ts +++ b/staticlistvariable/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/statushistorychart/jest.config.ts b/statushistorychart/jest.config.ts index 5190fb4de..16027133b 100644 --- a/statushistorychart/jest.config.ts +++ b/statushistorychart/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/statushistorychart/package.json b/statushistorychart/package.json index a738854a0..d14599731 100644 --- a/statushistorychart/package.json +++ b/statushistorychart/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/statushistorychart/rsbuild.config.ts b/statushistorychart/rsbuild.config.ts index 39feb9407..c040b99ae 100644 --- a/statushistorychart/rsbuild.config.ts +++ b/statushistorychart/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/statushistorychart/schemas/migrate/tests/mappings/input.json b/statushistorychart/schemas/migrate/tests/mappings/input.json index 857eccdb1..8d256dde3 100644 --- a/statushistorychart/schemas/migrate/tests/mappings/input.json +++ b/statushistorychart/schemas/migrate/tests/mappings/input.json @@ -110,4 +110,4 @@ ], "title": "Network interfaces status", "type": "status-history" -} \ No newline at end of file +} diff --git a/statushistorychart/schemas/tests/valid/status-history.json b/statushistorychart/schemas/tests/valid/status-history.json index f948d2c9b..e120729a4 100644 --- a/statushistorychart/schemas/tests/valid/status-history.json +++ b/statushistorychart/schemas/tests/valid/status-history.json @@ -1,9 +1,9 @@ { - "kind": "StatusHistoryChart", - "spec": { - "legend": { - "position": "bottom" - }, - "sorting": "asc" - } -} \ No newline at end of file + "kind": "StatusHistoryChart", + "spec": { + "legend": { + "position": "bottom" + }, + "sorting": "asc" + } +} diff --git a/statushistorychart/src/StatusHistoryChartBase.tsx b/statushistorychart/src/StatusHistoryChartBase.tsx index 115a1e756..0562f8653 100644 --- a/statushistorychart/src/StatusHistoryChartBase.tsx +++ b/statushistorychart/src/StatusHistoryChartBase.tsx @@ -12,6 +12,9 @@ // limitations under the License. import { Box, SxProps, Typography, useTheme } from '@mui/material'; +import { EChart, useChartsTheme, useTimeZone } from '@perses-dev/components'; +import { TimeScale } from '@perses-dev/spec'; +import { EChartsCoreOption, TitleComponentOption } from 'echarts'; import { HeatmapChart as EChartsHeatmapChart } from 'echarts/charts'; import { GridComponent, @@ -21,16 +24,14 @@ import { VisualMapComponent, LegendComponentOption, } from 'echarts/components'; -import { use } from 'echarts/core'; +import { use as registerECharts } from 'echarts/core'; import { CanvasRenderer } from 'echarts/renderers'; -import { EChartsCoreOption, TitleComponentOption } from 'echarts'; import { FC } from 'react'; -import { EChart, useChartsTheme, useTimeZone } from '@perses-dev/components'; -import { TimeScale } from '@perses-dev/spec'; -import { getFormattedStatusHistoryAxisLabel } from './utils/get-formatted-axis-label'; + import { generateTooltipHTML } from './StatusHistoryTooltip'; +import { getFormattedStatusHistoryAxisLabel } from './utils/get-formatted-axis-label'; -use([ +registerECharts([ EChartsHeatmapChart, VisualMapComponent, GridComponent, diff --git a/statushistorychart/src/StatusHistoryChartOptionsEditorSettings.tsx b/statushistorychart/src/StatusHistoryChartOptionsEditorSettings.tsx index 5dec4c19f..574de6a77 100644 --- a/statushistorychart/src/StatusHistoryChartOptionsEditorSettings.tsx +++ b/statushistorychart/src/StatusHistoryChartOptionsEditorSettings.tsx @@ -11,8 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { LegendOptionsEditor, LegendOptionsEditorProps } from '@perses-dev/plugin-system'; -import { produce } from 'immer'; +import { Button } from '@mui/material'; import { OptionsEditorGroup, OptionsEditorGrid, @@ -21,8 +20,10 @@ import { SortOption, SortSelectorProps, } from '@perses-dev/components'; -import { Button } from '@mui/material'; +import { LegendOptionsEditor, LegendOptionsEditorProps } from '@perses-dev/plugin-system'; +import { produce } from 'immer'; import { ReactElement } from 'react'; + import { StatusHistoryChartOptions, StatusHistroyChartEditorProps } from './status-history-model.js'; export function StatusHistoryChartOptionsEditorSettings(props: StatusHistroyChartEditorProps): ReactElement { diff --git a/statushistorychart/src/StatusHistoryPanel.tsx b/statushistorychart/src/StatusHistoryPanel.tsx index 1a2ab2b85..1b6868094 100644 --- a/statushistorychart/src/StatusHistoryPanel.tsx +++ b/statushistorychart/src/StatusHistoryPanel.tsx @@ -14,12 +14,13 @@ import { Box } from '@mui/material'; import { ContentWithLegend, useChartsTheme } from '@perses-dev/components'; import { PanelProps, validateLegendSpec } from '@perses-dev/plugin-system'; +import { TimeSeriesData } from '@perses-dev/spec'; import { merge } from 'lodash'; import { ReactElement, useMemo } from 'react'; -import { TimeSeriesData } from '@perses-dev/spec'; -import { useStatusHistoryDataModel } from './utils/data-transform'; + import { StatusHistoryChartOptions } from './status-history-model.js'; import { StatusHistoryChartBase } from './StatusHistoryChartBase'; +import { useStatusHistoryDataModel } from './utils/data-transform'; export type StatusHistoryChartPanelProps = PanelProps; diff --git a/statushistorychart/src/StatusHistoryTooltip.ts b/statushistorychart/src/StatusHistoryTooltip.ts index f7d45485a..d19e929f4 100644 --- a/statushistorychart/src/StatusHistoryTooltip.ts +++ b/statushistorychart/src/StatusHistoryTooltip.ts @@ -13,6 +13,7 @@ import { css, Theme } from '@mui/material'; import { getDateAndTime } from '@perses-dev/components'; + import { StatusHistoryData } from './StatusHistoryChartBase'; interface CustomTooltipProps { diff --git a/statushistorychart/src/StatusHistoryValueMappingEditor.tsx b/statushistorychart/src/StatusHistoryValueMappingEditor.tsx index 08ab60a50..ee2bf28ec 100644 --- a/statushistorychart/src/StatusHistoryValueMappingEditor.tsx +++ b/statushistorychart/src/StatusHistoryValueMappingEditor.tsx @@ -11,9 +11,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { OptionsEditorProps } from '@perses-dev/plugin-system'; import { ValueMapping, ValueMappingsEditor } from '@perses-dev/components'; +import { OptionsEditorProps } from '@perses-dev/plugin-system'; import { FC } from 'react'; + import { StatusHistoryChartOptions } from './status-history-model'; export type StatusHistoryValueMappingEditorProps = OptionsEditorProps; diff --git a/statushistorychart/src/getPluginModule.ts b/statushistorychart/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/statushistorychart/src/getPluginModule.ts +++ b/statushistorychart/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/statushistorychart/src/utils/data-transform.test.ts b/statushistorychart/src/utils/data-transform.test.ts index 7fd75235e..231cc534f 100644 --- a/statushistorychart/src/utils/data-transform.test.ts +++ b/statushistorychart/src/utils/data-transform.test.ts @@ -12,8 +12,9 @@ // limitations under the License. import { PanelData } from '@perses-dev/plugin-system'; -import { renderHook } from '@testing-library/react'; import { TimeSeriesData } from '@perses-dev/spec'; +import { renderHook } from '@testing-library/react'; + import { useStatusHistoryDataModel } from './data-transform'; describe('useStatusHistoryDataModel', () => { diff --git a/statushistorychart/src/utils/data-transform.ts b/statushistorychart/src/utils/data-transform.ts index f8b8ab42d..427c9e771 100644 --- a/statushistorychart/src/utils/data-transform.ts +++ b/statushistorychart/src/utils/data-transform.ts @@ -13,8 +13,9 @@ import { applyValueMapping, LegendItem } from '@perses-dev/components'; import { PanelData } from '@perses-dev/plugin-system'; -import { useMemo } from 'react'; import { TimeScale, TimeSeriesData } from '@perses-dev/spec'; +import { useMemo } from 'react'; + import { StatusHistoryChartOptions } from '../status-history-model'; import { StatusHistoryDataItem } from '../StatusHistoryChartBase'; import { FALLBACK_COLOR, getColorsForValues } from './get-color'; diff --git a/table/jest.config.ts b/table/jest.config.ts index 5190fb4de..16027133b 100644 --- a/table/jest.config.ts +++ b/table/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/table/package.json b/table/package.json index 9481346cd..a3e938146 100644 --- a/table/package.json +++ b/table/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/table/rsbuild.config.ts b/table/rsbuild.config.ts index 8f57fa01f..ac06d56e5 100644 --- a/table/rsbuild.config.ts +++ b/table/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/table/schemas/migrate/tests/conflicting-rename-using-organize/expected.json b/table/schemas/migrate/tests/conflicting-rename-using-organize/expected.json index 0daa52127..c9dff4d77 100644 --- a/table/schemas/migrate/tests/conflicting-rename-using-organize/expected.json +++ b/table/schemas/migrate/tests/conflicting-rename-using-organize/expected.json @@ -9,4 +9,4 @@ ], "density": "compact" } -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/conflicting-rename-using-organize/input.json b/table/schemas/migrate/tests/conflicting-rename-using-organize/input.json index 8f6be34aa..5f786963d 100644 --- a/table/schemas/migrate/tests/conflicting-rename-using-organize/input.json +++ b/table/schemas/migrate/tests/conflicting-rename-using-organize/input.json @@ -27,4 +27,4 @@ } } ] -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/legacy-panel/expected.json b/table/schemas/migrate/tests/legacy-panel/expected.json index f4db5f267..8e9d5ec34 100644 --- a/table/schemas/migrate/tests/legacy-panel/expected.json +++ b/table/schemas/migrate/tests/legacy-panel/expected.json @@ -14,4 +14,4 @@ } ] } -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/legacy-panel/input.json b/table/schemas/migrate/tests/legacy-panel/input.json index 2bdc35ea0..6e992183f 100644 --- a/table/schemas/migrate/tests/legacy-panel/input.json +++ b/table/schemas/migrate/tests/legacy-panel/input.json @@ -32,11 +32,7 @@ "$$hashKey": "object:282", "alias": "APP Component", "align": "right", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], + "colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "mappingType": 1, @@ -65,4 +61,4 @@ "title": "My table-old panel", "transform": "table", "type": "table-old" -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/override-width-undefined-value/expected.json b/table/schemas/migrate/tests/override-width-undefined-value/expected.json index 08c785e8a..bf9c31397 100644 --- a/table/schemas/migrate/tests/override-width-undefined-value/expected.json +++ b/table/schemas/migrate/tests/override-width-undefined-value/expected.json @@ -9,4 +9,4 @@ } ] } -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/override-width-undefined-value/input.json b/table/schemas/migrate/tests/override-width-undefined-value/input.json index 3fab809ba..08a3e5a63 100644 --- a/table/schemas/migrate/tests/override-width-undefined-value/input.json +++ b/table/schemas/migrate/tests/override-width-undefined-value/input.json @@ -43,9 +43,7 @@ "footer": { "countRows": false, "fields": "", - "reducer": [ - "sum" - ], + "reducer": ["sum"], "show": false }, "showHeader": true @@ -70,4 +68,4 @@ "title": "Override width but doesnt define a value", "description": "When there is a width override that doesn't define a value, it falls back to auto => we should set auto explicitly in Perses", "type": "table" -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/rename-and-width-using-overrides/expected.json b/table/schemas/migrate/tests/rename-and-width-using-overrides/expected.json index 9acd3399b..c8be2b36d 100644 --- a/table/schemas/migrate/tests/rename-and-width-using-overrides/expected.json +++ b/table/schemas/migrate/tests/rename-and-width-using-overrides/expected.json @@ -15,4 +15,4 @@ ], "density": "compact" } -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/rename-and-width-using-overrides/input.json b/table/schemas/migrate/tests/rename-and-width-using-overrides/input.json index 42098f75e..776b95f40 100644 --- a/table/schemas/migrate/tests/rename-and-width-using-overrides/input.json +++ b/table/schemas/migrate/tests/rename-and-width-using-overrides/input.json @@ -77,9 +77,7 @@ "footer": { "countRows": false, "fields": "", - "reducer": [ - "sum" - ], + "reducer": ["sum"], "show": false }, "showHeader": true @@ -104,4 +102,4 @@ "title": "Rename+width using overrides", "transformations": [], "type": "table" -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/rename-same-using-both/expected.json b/table/schemas/migrate/tests/rename-same-using-both/expected.json index 52336626d..fb49ba590 100644 --- a/table/schemas/migrate/tests/rename-same-using-both/expected.json +++ b/table/schemas/migrate/tests/rename-same-using-both/expected.json @@ -13,4 +13,4 @@ ], "density": "compact" } -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/rename-same-using-both/input.json b/table/schemas/migrate/tests/rename-same-using-both/input.json index 2fb293fdb..16896d22d 100644 --- a/table/schemas/migrate/tests/rename-same-using-both/input.json +++ b/table/schemas/migrate/tests/rename-same-using-both/input.json @@ -69,9 +69,7 @@ "footer": { "countRows": false, "fields": "", - "reducer": [ - "sum" - ], + "reducer": ["sum"], "show": false }, "showHeader": true @@ -108,4 +106,4 @@ } ], "type": "table" -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/rename-twice-using-overrides/expected.json b/table/schemas/migrate/tests/rename-twice-using-overrides/expected.json index 8fd870e37..c782feb60 100644 --- a/table/schemas/migrate/tests/rename-twice-using-overrides/expected.json +++ b/table/schemas/migrate/tests/rename-twice-using-overrides/expected.json @@ -9,4 +9,4 @@ ], "density": "compact" } -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/rename-twice-using-overrides/input.json b/table/schemas/migrate/tests/rename-twice-using-overrides/input.json index 26119aeee..5d6db5d37 100644 --- a/table/schemas/migrate/tests/rename-twice-using-overrides/input.json +++ b/table/schemas/migrate/tests/rename-twice-using-overrides/input.json @@ -69,9 +69,7 @@ "footer": { "countRows": false, "fields": "", - "reducer": [ - "sum" - ], + "reducer": ["sum"], "show": false }, "showHeader": true @@ -95,4 +93,4 @@ ], "title": "Duplicated rename using field overrides", "type": "table" -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/rename-twice-using-transform/expected.json b/table/schemas/migrate/tests/rename-twice-using-transform/expected.json index e58c4fcc7..03a9311a8 100644 --- a/table/schemas/migrate/tests/rename-twice-using-transform/expected.json +++ b/table/schemas/migrate/tests/rename-twice-using-transform/expected.json @@ -21,4 +21,4 @@ ], "density": "compact" } -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/rename-twice-using-transform/input.json b/table/schemas/migrate/tests/rename-twice-using-transform/input.json index b85713aa7..2e837462f 100644 --- a/table/schemas/migrate/tests/rename-twice-using-transform/input.json +++ b/table/schemas/migrate/tests/rename-twice-using-transform/input.json @@ -44,9 +44,7 @@ "footer": { "countRows": false, "fields": "", - "reducer": [ - "sum" - ], + "reducer": ["sum"], "show": false }, "showHeader": true @@ -94,4 +92,4 @@ } ], "type": "table" -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/rename-using-overrides/expected.json b/table/schemas/migrate/tests/rename-using-overrides/expected.json index 31f675250..8e0d49b37 100644 --- a/table/schemas/migrate/tests/rename-using-overrides/expected.json +++ b/table/schemas/migrate/tests/rename-using-overrides/expected.json @@ -45,4 +45,4 @@ ], "density": "compact" } -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/rename-using-overrides/input.json b/table/schemas/migrate/tests/rename-using-overrides/input.json index 1cf268172..c69dc01bb 100644 --- a/table/schemas/migrate/tests/rename-using-overrides/input.json +++ b/table/schemas/migrate/tests/rename-using-overrides/input.json @@ -96,9 +96,7 @@ "footer": { "countRows": false, "fields": "", - "reducer": [ - "sum" - ], + "reducer": ["sum"], "show": false }, "showHeader": true @@ -122,4 +120,4 @@ ], "title": "Rename using field overrides", "type": "table" -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/rename-using-transform/expected.json b/table/schemas/migrate/tests/rename-using-transform/expected.json index dcc1faaee..280de1275 100644 --- a/table/schemas/migrate/tests/rename-using-transform/expected.json +++ b/table/schemas/migrate/tests/rename-using-transform/expected.json @@ -13,4 +13,4 @@ ], "density": "compact" } -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/rename-using-transform/input.json b/table/schemas/migrate/tests/rename-using-transform/input.json index a6f27683c..f0e310967 100644 --- a/table/schemas/migrate/tests/rename-using-transform/input.json +++ b/table/schemas/migrate/tests/rename-using-transform/input.json @@ -44,9 +44,7 @@ "footer": { "countRows": false, "fields": "", - "reducer": [ - "sum" - ], + "reducer": ["sum"], "show": false }, "showHeader": true @@ -83,4 +81,4 @@ } ], "type": "table" -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/several-settings-using-both-2/expected.json b/table/schemas/migrate/tests/several-settings-using-both-2/expected.json index fbe536ddd..de88f5785 100644 --- a/table/schemas/migrate/tests/several-settings-using-both-2/expected.json +++ b/table/schemas/migrate/tests/several-settings-using-both-2/expected.json @@ -22,4 +22,4 @@ ], "density": "compact" } -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/several-settings-using-both-2/input.json b/table/schemas/migrate/tests/several-settings-using-both-2/input.json index 93c94027b..c6cdbf208 100644 --- a/table/schemas/migrate/tests/several-settings-using-both-2/input.json +++ b/table/schemas/migrate/tests/several-settings-using-both-2/input.json @@ -57,9 +57,7 @@ "footer": { "countRows": false, "fields": "", - "reducer": [ - "sum" - ], + "reducer": ["sum"], "show": false }, "showHeader": true @@ -107,4 +105,4 @@ } ], "type": "table" -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/several-settings-using-both-3/expected.json b/table/schemas/migrate/tests/several-settings-using-both-3/expected.json index 2c48c3da9..71a11cff2 100644 --- a/table/schemas/migrate/tests/several-settings-using-both-3/expected.json +++ b/table/schemas/migrate/tests/several-settings-using-both-3/expected.json @@ -27,4 +27,4 @@ ], "density": "compact" } -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/several-settings-using-both-3/input.json b/table/schemas/migrate/tests/several-settings-using-both-3/input.json index 34819db6f..7fa9e1286 100644 --- a/table/schemas/migrate/tests/several-settings-using-both-3/input.json +++ b/table/schemas/migrate/tests/several-settings-using-both-3/input.json @@ -69,9 +69,7 @@ "footer": { "countRows": false, "fields": "", - "reducer": [ - "sum" - ], + "reducer": ["sum"], "show": false }, "showHeader": true @@ -126,4 +124,4 @@ } ], "type": "table" -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/several-settings-using-both/expected.json b/table/schemas/migrate/tests/several-settings-using-both/expected.json index b395c48c2..5dd29995a 100644 --- a/table/schemas/migrate/tests/several-settings-using-both/expected.json +++ b/table/schemas/migrate/tests/several-settings-using-both/expected.json @@ -15,4 +15,4 @@ ], "density": "compact" } -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/several-settings-using-both/input.json b/table/schemas/migrate/tests/several-settings-using-both/input.json index 6ff4e9d2a..72b4f44c7 100644 --- a/table/schemas/migrate/tests/several-settings-using-both/input.json +++ b/table/schemas/migrate/tests/several-settings-using-both/input.json @@ -57,9 +57,7 @@ "footer": { "countRows": false, "fields": "", - "reducer": [ - "sum" - ], + "reducer": ["sum"], "show": false }, "showHeader": true @@ -98,4 +96,4 @@ } ], "type": "table" -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/width-twice-using-overrides/expected.json b/table/schemas/migrate/tests/width-twice-using-overrides/expected.json index bc4c317a6..60cda4d5a 100644 --- a/table/schemas/migrate/tests/width-twice-using-overrides/expected.json +++ b/table/schemas/migrate/tests/width-twice-using-overrides/expected.json @@ -9,4 +9,4 @@ ], "density": "compact" } -} \ No newline at end of file +} diff --git a/table/schemas/migrate/tests/width-twice-using-overrides/input.json b/table/schemas/migrate/tests/width-twice-using-overrides/input.json index ad924893f..e1648cab4 100644 --- a/table/schemas/migrate/tests/width-twice-using-overrides/input.json +++ b/table/schemas/migrate/tests/width-twice-using-overrides/input.json @@ -69,9 +69,7 @@ "footer": { "countRows": false, "fields": "", - "reducer": [ - "sum" - ], + "reducer": ["sum"], "show": false }, "showHeader": true @@ -95,4 +93,4 @@ ], "title": "Duplicated width using field overrides", "type": "table" -} \ No newline at end of file +} diff --git a/table/schemas/tests/valid/table.json b/table/schemas/tests/valid/table.json index 66d5cf478..8334c2cf8 100644 --- a/table/schemas/tests/valid/table.json +++ b/table/schemas/tests/valid/table.json @@ -2,7 +2,7 @@ "kind": "Table", "spec": { "density": "compact", - "columnSettings" : [ + "columnSettings": [ { "name": "value", "header": "Value", diff --git a/table/src/Table.ts b/table/src/Table.ts index 0c9df73a3..af02d8021 100644 --- a/table/src/Table.ts +++ b/table/src/Table.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PanelPlugin } from '@perses-dev/plugin-system'; + import { getTablePanelQueryOptions, TableCellsEditor, diff --git a/table/src/TableExportAction.test.ts b/table/src/TableExportAction.test.ts index 522dd3348..59f067783 100644 --- a/table/src/TableExportAction.test.ts +++ b/table/src/TableExportAction.test.ts @@ -13,6 +13,7 @@ import { PanelData } from '@perses-dev/plugin-system'; import { TimeSeriesData } from '@perses-dev/spec'; + import { TableOptions } from './models'; import { buildTableData } from './TableExportAction'; diff --git a/table/src/TableExportAction.tsx b/table/src/TableExportAction.tsx index 4bbea6d42..870e80d33 100644 --- a/table/src/TableExportAction.tsx +++ b/table/src/TableExportAction.tsx @@ -11,12 +11,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -import React, { useCallback, useMemo } from 'react'; -import { escapeCsvValue, PanelData, sanitizeFilename } from '@perses-dev/plugin-system'; -import { InfoTooltip, transformData } from '@perses-dev/components'; import { IconButton } from '@mui/material'; -import DownloadIcon from 'mdi-material-ui/Download'; +import { InfoTooltip, transformData } from '@perses-dev/components'; +import { escapeCsvValue, PanelData, sanitizeFilename } from '@perses-dev/plugin-system'; import { TimeSeriesData } from '@perses-dev/spec'; +import DownloadIcon from 'mdi-material-ui/Download'; +import React, { useCallback, useMemo } from 'react'; + import { TableProps } from './components'; import type { TableOptions } from './models'; import { buildRawTableData } from './table-data-utils'; diff --git a/table/src/components/CellsEditor/CellsEditor.tsx b/table/src/components/CellsEditor/CellsEditor.tsx index 860875ac0..a3bf4ba87 100644 --- a/table/src/components/CellsEditor/CellsEditor.tsx +++ b/table/src/components/CellsEditor/CellsEditor.tsx @@ -12,6 +12,7 @@ // limitations under the License. import { ReactElement } from 'react'; + import { CellSettings } from '../../models'; import { ConditionalPanel } from '../ConditionalPanel'; diff --git a/table/src/components/ColumnsEditor/ColumnEditor.tsx b/table/src/components/ColumnsEditor/ColumnEditor.tsx index d8d2a2b11..6745f352d 100644 --- a/table/src/components/ColumnsEditor/ColumnEditor.tsx +++ b/table/src/components/ColumnsEditor/ColumnEditor.tsx @@ -12,7 +12,6 @@ // limitations under the License. import { Button, ButtonGroup, Stack, StackProps, Switch, TextField, Typography } from '@mui/material'; -import { ReactElement, useState } from 'react'; import { AlignSelector, FormatControls, @@ -24,6 +23,7 @@ import { SortSelectorButtons, } from '@perses-dev/components'; import { PluginKindSelect } from '@perses-dev/plugin-system'; +import { ReactElement, useState } from 'react'; import { ColumnSettings } from '../../models'; import { ConditionalPanel } from '../ConditionalPanel'; diff --git a/table/src/components/ColumnsEditor/ColumnEditorContainer.tsx b/table/src/components/ColumnsEditor/ColumnEditorContainer.tsx index 35faf282c..741e4370f 100644 --- a/table/src/components/ColumnsEditor/ColumnEditorContainer.tsx +++ b/table/src/components/ColumnsEditor/ColumnEditorContainer.tsx @@ -12,13 +12,14 @@ // limitations under the License. import { Divider, IconButton, Stack, Tooltip, Typography } from '@mui/material'; -import ChevronRight from 'mdi-material-ui/ChevronRight'; +import { DragAndDropElement, DragButton } from '@perses-dev/components'; import ChevronDown from 'mdi-material-ui/ChevronDown'; +import ChevronRight from 'mdi-material-ui/ChevronRight'; import DeleteIcon from 'mdi-material-ui/DeleteOutline'; -import EyeIcon from 'mdi-material-ui/EyeOutline'; import EyeOffIcon from 'mdi-material-ui/EyeOffOutline'; -import { DragAndDropElement, DragButton } from '@perses-dev/components'; +import EyeIcon from 'mdi-material-ui/EyeOutline'; import { ReactElement } from 'react'; + import { ColumnEditor, ColumnEditorProps } from './ColumnEditor'; export interface ColumnEditorContainerProps extends ColumnEditorProps { diff --git a/table/src/components/ColumnsEditor/ColumnsEditor.tsx b/table/src/components/ColumnsEditor/ColumnsEditor.tsx index f8f81c3b8..7fe77cc47 100644 --- a/table/src/components/ColumnsEditor/ColumnsEditor.tsx +++ b/table/src/components/ColumnsEditor/ColumnsEditor.tsx @@ -12,9 +12,10 @@ // limitations under the License. import { Button, Stack } from '@mui/material'; -import { ReactElement, useState } from 'react'; -import AddIcon from 'mdi-material-ui/Plus'; import { handleMoveDown, handleMoveUp, useDragAndDropMonitor } from '@perses-dev/components'; +import AddIcon from 'mdi-material-ui/Plus'; +import { ReactElement, useState } from 'react'; + import { ColumnSettings } from '../../models'; import { ColumnEditorContainer } from './ColumnEditorContainer'; diff --git a/table/src/components/ColumnsEditor/DataLinkEditorDialog.tsx b/table/src/components/ColumnsEditor/DataLinkEditorDialog.tsx index f77746ba1..a12ab1cfc 100644 --- a/table/src/components/ColumnsEditor/DataLinkEditorDialog.tsx +++ b/table/src/components/ColumnsEditor/DataLinkEditorDialog.tsx @@ -11,11 +11,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { LinkEditorForm } from '@perses-dev/components'; -import { ReactElement } from 'react'; import { IconButton, Stack, Typography } from '@mui/material'; -import PlusIcon from 'mdi-material-ui/Plus'; +import { LinkEditorForm } from '@perses-dev/components'; import MinusIcon from 'mdi-material-ui/Minus'; +import PlusIcon from 'mdi-material-ui/Plus'; +import { ReactElement } from 'react'; + import { ColumnEditorProps } from './ColumnEditor'; export type Props = Pick; diff --git a/table/src/components/ConditionalPanel.tsx b/table/src/components/ConditionalPanel.tsx index d7eadf90c..afbfb46c9 100644 --- a/table/src/components/ConditionalPanel.tsx +++ b/table/src/components/ConditionalPanel.tsx @@ -11,7 +11,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -import React, { ReactElement } from 'react'; import { Button, Divider, @@ -24,9 +23,11 @@ import { Typography, Grid2 as Grid, } from '@mui/material'; +import { OptionsColorPicker } from '@perses-dev/components'; import DeleteIcon from 'mdi-material-ui/DeleteOutline'; import AddIcon from 'mdi-material-ui/Plus'; -import { OptionsColorPicker } from '@perses-dev/components'; +import React, { ReactElement } from 'react'; + import { CellSettings, renderConditionEditor } from '../models'; // Individual conditional formatting rule component diff --git a/table/src/components/EmbeddedPanel.tsx b/table/src/components/EmbeddedPanel.tsx index 33d8bbcb6..d0ffbe262 100644 --- a/table/src/components/EmbeddedPanel.tsx +++ b/table/src/components/EmbeddedPanel.tsx @@ -11,12 +11,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { PanelData } from '@perses-dev/plugin-system'; -import { PanelPluginLoader } from '@perses-dev/dashboards'; -import useResizeObserver from 'use-resize-observer'; import { ErrorAlert, ErrorBoundary } from '@perses-dev/components'; -import { ReactElement } from 'react'; +import { PanelPluginLoader } from '@perses-dev/dashboards'; +import { PanelData } from '@perses-dev/plugin-system'; import { QueryDataType, UnknownSpec } from '@perses-dev/spec'; +import { ReactElement } from 'react'; +import useResizeObserver from 'use-resize-observer'; interface EmbeddedPanelProps { kind: string; diff --git a/table/src/components/TableCellsEditor.tsx b/table/src/components/TableCellsEditor.tsx index c8e45adaf..add90d78a 100644 --- a/table/src/components/TableCellsEditor.tsx +++ b/table/src/components/TableCellsEditor.tsx @@ -13,6 +13,7 @@ import { OptionsEditorProps } from '@perses-dev/plugin-system'; import { ReactElement } from 'react'; + import { CellSettings, TableOptions } from '../models'; import { CellsEditor } from './CellsEditor'; diff --git a/table/src/components/TableColumnsEditor.test.tsx b/table/src/components/TableColumnsEditor.test.tsx index 4af298aa1..ddd0f26f6 100644 --- a/table/src/components/TableColumnsEditor.test.tsx +++ b/table/src/components/TableColumnsEditor.test.tsx @@ -12,6 +12,7 @@ // limitations under the License. import { fireEvent, render, screen } from '@testing-library/react'; + import { TableOptions } from '../models'; import { TableColumnsEditor } from './TableColumnsEditor'; diff --git a/table/src/components/TableColumnsEditor.tsx b/table/src/components/TableColumnsEditor.tsx index bb055fd97..73e7186c0 100644 --- a/table/src/components/TableColumnsEditor.tsx +++ b/table/src/components/TableColumnsEditor.tsx @@ -13,6 +13,7 @@ import { OptionsEditorProps } from '@perses-dev/plugin-system'; import { ReactElement } from 'react'; + import { ColumnSettings, TableOptions } from '../models'; import { ColumnsEditor } from './ColumnsEditor'; diff --git a/table/src/components/TableItemSelectionActionsEditor.tsx b/table/src/components/TableItemSelectionActionsEditor.tsx index 088bf62b2..eeb0d2ac5 100644 --- a/table/src/components/TableItemSelectionActionsEditor.tsx +++ b/table/src/components/TableItemSelectionActionsEditor.tsx @@ -13,6 +13,7 @@ import { ActionOptions, ItemSelectionActionsEditor, SelectionOptions } from '@perses-dev/plugin-system'; import { ReactElement } from 'react'; + import { TableSettingsEditorProps } from '../models'; export function TableItemSelectionActionsEditor({ value, onChange }: TableSettingsEditorProps): ReactElement { diff --git a/table/src/components/TablePanel.test.tsx b/table/src/components/TablePanel.test.tsx index 841071a1f..c48e63f42 100644 --- a/table/src/components/TablePanel.test.tsx +++ b/table/src/components/TablePanel.test.tsx @@ -19,11 +19,12 @@ import { PluginRegistry, VariableStateMap, } from '@perses-dev/plugin-system'; +import { TimeSeriesData } from '@perses-dev/spec'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { render, screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { VirtuosoMockContext } from 'react-virtuoso'; -import { TimeSeriesData } from '@perses-dev/spec'; + import { TableOptions, TimeSeriesTableProps } from '../models'; import { MOCK_MULTI_QUERY_DATA_EMPTY, diff --git a/table/src/components/TablePanel.tsx b/table/src/components/TablePanel.tsx index 586e90364..8d0f38c2e 100644 --- a/table/src/components/TablePanel.tsx +++ b/table/src/components/TablePanel.tsx @@ -31,10 +31,11 @@ import { useAllVariableValues, VariableStateMap, } from '@perses-dev/plugin-system'; +import { QueryDataType, TimeSeriesData } from '@perses-dev/spec'; import { ColumnFiltersState, PaginationState, RowSelectionState, SortingState } from '@tanstack/react-table'; import { ReactElement, useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import { QueryDataType, TimeSeriesData } from '@perses-dev/spec'; import { createPortal } from 'react-dom'; + import { CellSettings, ColumnSettings, evaluateConditionalFormatting, TableOptions } from '../models'; import { buildRawTableData, getTablePanelQueryMode } from '../table-data-utils'; import { EmbeddedPanel } from './EmbeddedPanel'; @@ -219,7 +220,7 @@ function ColumnFilterDropdown({ theme, }: ColumnFilterDropdownProps): ReactElement { const [searchTerm, setSearchTerm] = useState(''); - const values = [...new Set(allValues)].filter((v) => v !== null).sort(); + const values = [...new Set(allValues)].filter((v) => v !== null).toSorted(); const filteredValues = searchTerm ? values.filter((v) => String(v.formatted).toLowerCase().includes(searchTerm.toLowerCase())) : values; @@ -292,19 +293,17 @@ function ColumnFilterDropdown({ /> {filteredValues.map((value, index) => (
- +
))} diff --git a/table/src/components/TableSettingsEditor.tsx b/table/src/components/TableSettingsEditor.tsx index 4d2b8658d..2d865dd1f 100644 --- a/table/src/components/TableSettingsEditor.tsx +++ b/table/src/components/TableSettingsEditor.tsx @@ -23,6 +23,7 @@ import { TableDensity, } from '@perses-dev/components'; import { ChangeEvent, ReactElement } from 'react'; + import { TableSettingsEditorProps } from '../models'; interface DefaultColumnsDimensionsControlProps { diff --git a/table/src/components/TableTransformsEditor.tsx b/table/src/components/TableTransformsEditor.tsx index a42ed66da..f689ce2df 100644 --- a/table/src/components/TableTransformsEditor.tsx +++ b/table/src/components/TableTransformsEditor.tsx @@ -13,6 +13,7 @@ import { Transform, TransformsEditor } from '@perses-dev/components'; import { ReactElement } from 'react'; + import { TableSettingsEditorProps } from '../models'; export function TableTransformsEditor({ value, onChange }: TableSettingsEditorProps): ReactElement { diff --git a/table/src/getPluginModule.ts b/table/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/table/src/getPluginModule.ts +++ b/table/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/table/src/models/table-model.ts b/table/src/models/table-model.ts index 9dab6882f..087d395ff 100644 --- a/table/src/models/table-model.ts +++ b/table/src/models/table-model.ts @@ -11,11 +11,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { TextField, Stack, MenuItem, Typography } from '@mui/material'; import { TableDensity, TableCellConfig, FormatOptions, Transform } from '@perses-dev/components'; import { ActionOptions, OptionsEditorProps, SelectionOptions } from '@perses-dev/plugin-system'; -import React from 'react'; -import { TextField, Stack, MenuItem, Typography } from '@mui/material'; import { Definition, UnknownSpec } from '@perses-dev/spec'; +import React from 'react'; export interface ColumnSettings { name: string; diff --git a/table/src/table-data-utils.ts b/table/src/table-data-utils.ts index cf1f28e61..55f4ab07f 100644 --- a/table/src/table-data-utils.ts +++ b/table/src/table-data-utils.ts @@ -13,6 +13,7 @@ import { Labels, PanelData } from '@perses-dev/plugin-system'; import { TimeSeries, TimeSeriesData } from '@perses-dev/spec'; + import { TableOptions } from './models'; /** diff --git a/tempo/jest.config.ts b/tempo/jest.config.ts index 5190fb4de..16027133b 100644 --- a/tempo/jest.config.ts +++ b/tempo/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/tempo/package.json b/tempo/package.json index 01817fbfe..7932c9f87 100644 --- a/tempo/package.json +++ b/tempo/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/tempo/rsbuild.config.ts b/tempo/rsbuild.config.ts index bc7a693f8..da1af1576 100644 --- a/tempo/rsbuild.config.ts +++ b/tempo/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/tempo/schemas/tempo-trace-query/tests/valid/tempo-trace-query.json b/tempo/schemas/tempo-trace-query/tests/valid/tempo-trace-query.json index a9bd6211d..a24c81b72 100644 --- a/tempo/schemas/tempo-trace-query/tests/valid/tempo-trace-query.json +++ b/tempo/schemas/tempo-trace-query/tests/valid/tempo-trace-query.json @@ -1,10 +1,9 @@ - { "kind": "TempoTraceQuery", "spec": { "datasource": { - "kind": "TempoDatasource", - "name": "MyDemoDatasource" + "kind": "TempoDatasource", + "name": "MyDemoDatasource" }, "query": "{}", "limit": 100 diff --git a/tempo/src/components/AttributeFilters.tsx b/tempo/src/components/AttributeFilters.tsx index 02ec27701..fabb81767 100644 --- a/tempo/src/components/AttributeFilters.tsx +++ b/tempo/src/components/AttributeFilters.tsx @@ -11,10 +11,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, SyntheticEvent, useCallback, useEffect, useState } from 'react'; import { Autocomplete, Checkbox, Stack, TextField, TextFieldProps } from '@mui/material'; import { useTimeRange } from '@perses-dev/plugin-system'; import { useQuery, UseQueryResult } from '@tanstack/react-query'; +import { ReactElement, SyntheticEvent, useCallback, useEffect, useState } from 'react'; + import { TempoClient } from '../model'; import { getUnixTimeRange } from '../plugins'; import { filterToTraceQL, traceQLToFilter, DurationField, Filter, splitByUnquotedWhitespace } from './filter'; @@ -254,7 +255,7 @@ function useTagValues( queryFn: async function () { if (!client) return; const values = await client.searchTagValues({ tag, q: query, start, end }); - return values.tagValues.map((tagValue) => tagValue.value ?? '').sort(); + return values.tagValues.map((tagValue) => tagValue.value ?? '').toSorted(); }, staleTime: 60 * 1000, // cache tag value response for 1m }); diff --git a/tempo/src/components/ClosableAlert.tsx b/tempo/src/components/ClosableAlert.tsx index cfecff582..659e9d518 100644 --- a/tempo/src/components/ClosableAlert.tsx +++ b/tempo/src/components/ClosableAlert.tsx @@ -11,8 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, useCallback, useState } from 'react'; import { Alert, AlertProps } from '@mui/material'; +import { ReactElement, useCallback, useState } from 'react'; export function ClosableAlert(props: AlertProps): ReactElement | null { const [isVisible, setVisible] = useState(true); diff --git a/tempo/src/components/TraceQLEditor.tsx b/tempo/src/components/TraceQLEditor.tsx index f4b7f93a3..50ddefdc5 100644 --- a/tempo/src/components/TraceQLEditor.tsx +++ b/tempo/src/components/TraceQLEditor.tsx @@ -11,11 +11,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, useMemo } from 'react'; import { InputLabel, Stack, useTheme } from '@mui/material'; -import CodeMirror, { EditorView, ReactCodeMirrorProps } from '@uiw/react-codemirror'; import { useTimeRange } from '@perses-dev/plugin-system'; import { isValidTraceId } from '@perses-dev/spec'; +import CodeMirror, { EditorView, ReactCodeMirrorProps } from '@uiw/react-codemirror'; +import { ReactElement, useMemo } from 'react'; + import { TempoClient } from '../model'; import { TraceQLExtension } from './TraceQLExtension'; diff --git a/tempo/src/components/TraceQLExtension.ts b/tempo/src/components/TraceQLExtension.ts index 54cf5c8c7..a10dd9145 100644 --- a/tempo/src/components/TraceQLExtension.ts +++ b/tempo/src/components/TraceQLExtension.ts @@ -11,14 +11,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { CompletionContext } from '@codemirror/autocomplete'; import { LRLanguage } from '@codemirror/language'; import { parser } from '@grafana/lezer-traceql'; -import { CompletionContext } from '@codemirror/autocomplete'; -import { Extension } from '@uiw/react-codemirror'; import { AbsoluteTimeRange } from '@perses-dev/spec'; +import { Extension } from '@uiw/react-codemirror'; + import { TempoClient } from '../model/tempo-client'; -import { traceQLHighlight } from './highlight'; import { complete } from './complete'; +import { traceQLHighlight } from './highlight'; function traceQLLanguage(): LRLanguage { return LRLanguage.define({ diff --git a/tempo/src/components/complete.test.ts b/tempo/src/components/complete.test.ts index d7d838ba6..60b539a62 100644 --- a/tempo/src/components/complete.test.ts +++ b/tempo/src/components/complete.test.ts @@ -11,9 +11,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { EditorState, EditorView } from '@uiw/react-codemirror'; -import { parser } from '@grafana/lezer-traceql'; import { LRLanguage, ensureSyntaxTree } from '@codemirror/language'; +import { parser } from '@grafana/lezer-traceql'; +import { EditorState, EditorView } from '@uiw/react-codemirror'; + import { identifyCompletions, applyQuotedCompletion } from './complete'; const traceQLExtension = LRLanguage.define({ parser: parser }); diff --git a/tempo/src/components/complete.ts b/tempo/src/components/complete.ts index d7ce957ac..4b3116754 100644 --- a/tempo/src/components/complete.ts +++ b/tempo/src/components/complete.ts @@ -14,7 +14,6 @@ import { Completion, CompletionContext, CompletionResult, insertCompletionText } from '@codemirror/autocomplete'; import { syntaxTree } from '@codemirror/language'; import { EditorState } from '@codemirror/state'; -import { Tree } from '@lezer/common'; import { String as StringType, FieldExpression, @@ -25,7 +24,9 @@ import { SpansetFilter, FieldOp, } from '@grafana/lezer-traceql'; +import { Tree } from '@lezer/common'; import { EditorView } from '@uiw/react-codemirror'; + import { getUnixTimeRange } from '../plugins'; import { CompletionConfig } from './TraceQLExtension'; @@ -45,7 +46,7 @@ export interface Completions { to?: number; } -const quoteChars = ['"', '`']; +const quoteChars = new Set(['"', '`']); const defaultQuoteChar = '"'; export async function complete( @@ -182,7 +183,7 @@ export function identifyCompletions(state: EditorState, pos: number, tree: Tree) const fieldExpr = node.parent.firstChild; const attribute = state.sliceDoc(fieldExpr.from, fieldExpr.to); // ignore leading " in { name="HT - const from = quoteChars.includes(state.sliceDoc(node.from, node.from + 1)) ? node.from + 1 : node.from; + const from = quoteChars.has(state.sliceDoc(node.from, node.from + 1)) ? node.from + 1 : node.from; return { scopes: [{ kind: 'TagValue', tag: attribute }], from }; } @@ -263,11 +264,11 @@ function escapeString(input: string, quoteChar: string): string { */ export function applyQuotedCompletion(view: EditorView, completion: Completion, from: number, to: number): void { let quoteChar = defaultQuoteChar; - if (quoteChars.includes(view.state.sliceDoc(from - 1, from))) { + if (quoteChars.has(view.state.sliceDoc(from - 1, from))) { quoteChar = view.state.sliceDoc(from - 1, from); from--; } - if (quoteChars.includes(view.state.sliceDoc(to, to + 1))) { + if (quoteChars.has(view.state.sliceDoc(to, to + 1))) { quoteChar = view.state.sliceDoc(to, to + 1); to++; } diff --git a/tempo/src/components/filter/traceql_to_filter.ts b/tempo/src/components/filter/traceql_to_filter.ts index 6f7de6652..7577e57fb 100644 --- a/tempo/src/components/filter/traceql_to_filter.ts +++ b/tempo/src/components/filter/traceql_to_filter.ts @@ -12,6 +12,7 @@ // limitations under the License. import { AttributeField, FieldExpression, FieldOp, IntrinsicField, Static, parser } from '@grafana/lezer-traceql'; + import { DurationField, Filter } from './filter'; interface Matcher { diff --git a/tempo/src/explore/TempoExplorer.tsx b/tempo/src/explore/TempoExplorer.tsx index 3a80d772b..30dae7419 100644 --- a/tempo/src/explore/TempoExplorer.tsx +++ b/tempo/src/explore/TempoExplorer.tsx @@ -16,10 +16,11 @@ import { ErrorAlert, ErrorBoundary, LoadingOverlay, NoDataOverlay, useTimeZone } import { Panel } from '@perses-dev/dashboards'; import { useExplorerManagerContext } from '@perses-dev/explore'; import { DataQueriesProvider, MultiQueryEditor, useDataQueries } from '@perses-dev/plugin-system'; -import { ReactElement, useState } from 'react'; import { isValidTraceId, QueryDefinition } from '@perses-dev/spec'; -import { TempoTraceQuerySpec } from '../model'; +import { ReactElement, useState } from 'react'; + import { ClosableAlert } from '../components/ClosableAlert'; +import { TempoTraceQuerySpec } from '../model'; import { linkToSpan, linkToTrace } from './links'; interface TracesExplorerQueryParams { diff --git a/tempo/src/getPluginModule.ts b/tempo/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/tempo/src/getPluginModule.ts +++ b/tempo/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/tempo/src/model/tempo-client.test.ts b/tempo/src/model/tempo-client.test.ts index fba6b842b..d1ab717a9 100644 --- a/tempo/src/model/tempo-client.test.ts +++ b/tempo/src/model/tempo-client.test.ts @@ -12,6 +12,7 @@ // limitations under the License. import { UserFriendlyError } from '@perses-dev/client'; + import { MOCK_TRACE_RESPONSE } from '../test'; import { query, search, searchTagValues } from './tempo-client'; diff --git a/tempo/src/model/tempo-client.ts b/tempo/src/model/tempo-client.ts index e587a9f55..8c1b0d10f 100644 --- a/tempo/src/model/tempo-client.ts +++ b/tempo/src/model/tempo-client.ts @@ -11,8 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { DatasourceClient } from '@perses-dev/plugin-system'; import { fetchJson, RequestHeaders, UserFriendlyError } from '@perses-dev/client'; +import { DatasourceClient } from '@perses-dev/plugin-system'; + import { QueryRequestParameters, SearchRequestParameters, diff --git a/tempo/src/model/trace-query-model.ts b/tempo/src/model/trace-query-model.ts index 84b4849e9..b3cdbfaf3 100644 --- a/tempo/src/model/trace-query-model.ts +++ b/tempo/src/model/trace-query-model.ts @@ -12,6 +12,7 @@ // limitations under the License. import { DatasourceSelectValue } from '@perses-dev/plugin-system'; + import { TempoDatasourceSelector } from './tempo-selectors'; /** * The spec/options for the TempoTraceQuery plugin. diff --git a/tempo/src/plugins/TempoDatasourceEditor.tsx b/tempo/src/plugins/TempoDatasourceEditor.tsx index 6d77c7402..b157491a3 100644 --- a/tempo/src/plugins/TempoDatasourceEditor.tsx +++ b/tempo/src/plugins/TempoDatasourceEditor.tsx @@ -13,6 +13,7 @@ import { HTTPSettingsEditor } from '@perses-dev/plugin-system'; import React, { ReactElement } from 'react'; + import { TempoDatasourceSpec } from './tempo-datasource-types'; export interface TempoDatasourceEditorProps { diff --git a/tempo/src/plugins/plugin.test.ts b/tempo/src/plugins/plugin.test.ts index 0a80ee18c..671852ea0 100644 --- a/tempo/src/plugins/plugin.test.ts +++ b/tempo/src/plugins/plugin.test.ts @@ -13,9 +13,10 @@ import { TraceQueryContext } from '@perses-dev/plugin-system'; import { DatasourceSpec } from '@perses-dev/spec'; + import { MOCK_SEARCH_RESPONSE_VPARQUET4, MOCK_TRACE_DATA_SEARCHRESULT, MOCK_TRACE_RESPONSE_SMALL } from '../test'; -import { TempoDatasourceSpec } from './tempo-datasource-types'; import { TempoDatasource } from './tempo-datasource'; +import { TempoDatasourceSpec } from './tempo-datasource-types'; import { TempoTraceQuery } from './tempo-trace-query/TempoTraceQuery'; jest.mock('echarts/core'); diff --git a/tempo/src/plugins/tempo-datasource.tsx b/tempo/src/plugins/tempo-datasource.tsx index 15a2252dc..b7bd5e5ca 100644 --- a/tempo/src/plugins/tempo-datasource.tsx +++ b/tempo/src/plugins/tempo-datasource.tsx @@ -12,6 +12,7 @@ // limitations under the License. import { DatasourcePlugin } from '@perses-dev/plugin-system'; + import { TempoClient, query, search, searchTagValues, searchTags } from '../model/tempo-client'; import { TempoDatasourceSpec } from './tempo-datasource-types'; import { TempoDatasourceEditor } from './TempoDatasourceEditor'; diff --git a/tempo/src/plugins/tempo-trace-query/TempoTraceQuery.ts b/tempo/src/plugins/tempo-trace-query/TempoTraceQuery.ts index 55a63967e..b2ed8649e 100644 --- a/tempo/src/plugins/tempo-trace-query/TempoTraceQuery.ts +++ b/tempo/src/plugins/tempo-trace-query/TempoTraceQuery.ts @@ -12,6 +12,7 @@ // limitations under the License. import { isVariableDatasource, parseVariables, TraceQueryPlugin } from '@perses-dev/plugin-system'; + import { TempoTraceQuerySpec } from '../../model'; import { getTraceData } from './get-trace-data'; import { TempoTraceQueryEditor } from './TempoTraceQueryEditor'; diff --git a/tempo/src/plugins/tempo-trace-query/TempoTraceQueryEditor.tsx b/tempo/src/plugins/tempo-trace-query/TempoTraceQueryEditor.tsx index 3eea09ea8..3ecb88637 100644 --- a/tempo/src/plugins/tempo-trace-query/TempoTraceQueryEditor.tsx +++ b/tempo/src/plugins/tempo-trace-query/TempoTraceQueryEditor.tsx @@ -21,6 +21,9 @@ import { } from '@perses-dev/plugin-system'; import { produce } from 'immer'; import { ReactElement, useCallback, useState } from 'react'; + +import { TraceQLEditor, filterToTraceQL, traceQLToFilter } from '../../components'; +import { AttributeFilters } from '../../components/AttributeFilters'; import { TempoClient, DEFAULT_TEMPO, @@ -28,8 +31,6 @@ import { isTempoDatasourceSelector, TEMPO_DATASOURCE_KIND, } from '../../model'; -import { AttributeFilters } from '../../components/AttributeFilters'; -import { TraceQLEditor, filterToTraceQL, traceQLToFilter } from '../../components'; import { TraceQueryEditorProps, useQueryState } from './query-editor-model'; export function TempoTraceQueryEditor(props: TraceQueryEditorProps): ReactElement { diff --git a/tempo/src/plugins/tempo-trace-query/get-trace-data.test.ts b/tempo/src/plugins/tempo-trace-query/get-trace-data.test.ts index 14073a8c0..62dc56d64 100644 --- a/tempo/src/plugins/tempo-trace-query/get-trace-data.test.ts +++ b/tempo/src/plugins/tempo-trace-query/get-trace-data.test.ts @@ -13,10 +13,11 @@ import { TraceQueryContext, replaceVariables } from '@perses-dev/plugin-system'; import { DatasourceSpec } from '@perses-dev/spec'; -import { TempoDatasourceSpec } from '../tempo-datasource-types'; -import { TempoDatasource } from '../tempo-datasource'; -import { DEFAULT_SEARCH_LIMIT, SearchResponse } from '../../model/api-types'; + import { TempoClient } from '../../model'; +import { DEFAULT_SEARCH_LIMIT, SearchResponse } from '../../model/api-types'; +import { TempoDatasource } from '../tempo-datasource'; +import { TempoDatasourceSpec } from '../tempo-datasource-types'; import { getTraceData } from './get-trace-data'; jest.mock('@perses-dev/plugin-system', () => { diff --git a/tempo/src/plugins/tempo-trace-query/get-trace-data.ts b/tempo/src/plugins/tempo-trace-query/get-trace-data.ts index c09516596..723b1da05 100644 --- a/tempo/src/plugins/tempo-trace-query/get-trace-data.ts +++ b/tempo/src/plugins/tempo-trace-query/get-trace-data.ts @@ -12,9 +12,10 @@ // limitations under the License. import { datasourceSelectValueToSelector, replaceVariables, TraceQueryPlugin } from '@perses-dev/plugin-system'; -import { getUnixTime } from 'date-fns'; import { AbsoluteTimeRange, isValidTraceId, Notice, TraceSearchResult } from '@perses-dev/spec'; import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; +import { getUnixTime } from 'date-fns'; + import { TEMPO_DATASOURCE_KIND, TempoDatasourceSelector, diff --git a/tempo/src/plugins/tempo-trace-query/query-editor-model.ts b/tempo/src/plugins/tempo-trace-query/query-editor-model.ts index d7e51cca2..1b68dfd9e 100644 --- a/tempo/src/plugins/tempo-trace-query/query-editor-model.ts +++ b/tempo/src/plugins/tempo-trace-query/query-editor-model.ts @@ -11,9 +11,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { useState } from 'react'; -import { produce } from 'immer'; import { OptionsEditorProps } from '@perses-dev/plugin-system'; +import { produce } from 'immer'; +import { useState } from 'react'; + import { TempoTraceQuerySpec } from '../../model/trace-query-model'; export type TraceQueryEditorProps = OptionsEditorProps; diff --git a/tempo/src/test/mock-data.ts b/tempo/src/test/mock-data.ts index ed032481d..307bff7b8 100644 --- a/tempo/src/test/mock-data.ts +++ b/tempo/src/test/mock-data.ts @@ -12,6 +12,7 @@ // limitations under the License. import { TraceData } from '@perses-dev/spec'; + import { QueryResponse, SearchResponse } from '../model/api-types'; export const MOCK_TRACE_RESPONSE: QueryResponse = { diff --git a/timeserieschart/jest.config.ts b/timeserieschart/jest.config.ts index 5190fb4de..16027133b 100644 --- a/timeserieschart/jest.config.ts +++ b/timeserieschart/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/timeserieschart/package.json b/timeserieschart/package.json index 559495e32..5da43354b 100644 --- a/timeserieschart/package.json +++ b/timeserieschart/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/timeserieschart/rsbuild.config.ts b/timeserieschart/rsbuild.config.ts index 1b19a3d52..1ca0f2364 100644 --- a/timeserieschart/rsbuild.config.ts +++ b/timeserieschart/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/timeserieschart/schemas/migrate/tests/basic-with-calcs/expected.json b/timeserieschart/schemas/migrate/tests/basic-with-calcs/expected.json index 21e578520..aaf028e10 100644 --- a/timeserieschart/schemas/migrate/tests/basic-with-calcs/expected.json +++ b/timeserieschart/schemas/migrate/tests/basic-with-calcs/expected.json @@ -4,16 +4,7 @@ "legend": { "mode": "list", "position": "bottom", - "values": [ - "min", - "max", - "first", - "first-number", - "last", - "last-number", - "mean", - "sum" - ] + "values": ["min", "max", "first", "first-number", "last", "last-number", "mean", "sum"] }, "visual": { "areaOpacity": 0, @@ -28,4 +19,4 @@ } } } -} \ No newline at end of file +} diff --git a/timeserieschart/schemas/migrate/tests/basic-with-calcs/input.json b/timeserieschart/schemas/migrate/tests/basic-with-calcs/input.json index 7ddf051d6..51272e84c 100644 --- a/timeserieschart/schemas/migrate/tests/basic-with-calcs/input.json +++ b/timeserieschart/schemas/migrate/tests/basic-with-calcs/input.json @@ -67,16 +67,7 @@ "id": 2, "options": { "legend": { - "calcs": [ - "min", - "max", - "first", - "firstNotNull", - "last", - "lastNotNull", - "mean", - "sum" - ], + "calcs": ["min", "max", "first", "firstNotNull", "last", "lastNotNull", "mean", "sum"], "displayMode": "list", "placement": "bottom", "showLegend": true @@ -101,4 +92,4 @@ ], "title": "My 1rst panel", "type": "timeseries" -} \ No newline at end of file +} diff --git a/timeserieschart/schemas/migrate/tests/basic-with-thresholds/expected.json b/timeserieschart/schemas/migrate/tests/basic-with-thresholds/expected.json index 101fc0389..983081cbc 100644 --- a/timeserieschart/schemas/migrate/tests/basic-with-thresholds/expected.json +++ b/timeserieschart/schemas/migrate/tests/basic-with-thresholds/expected.json @@ -32,4 +32,4 @@ ] } } -} \ No newline at end of file +} diff --git a/timeserieschart/schemas/migrate/tests/basic-with-thresholds/input.json b/timeserieschart/schemas/migrate/tests/basic-with-thresholds/input.json index 300e6c143..968fcba63 100644 --- a/timeserieschart/schemas/migrate/tests/basic-with-thresholds/input.json +++ b/timeserieschart/schemas/migrate/tests/basic-with-thresholds/input.json @@ -95,4 +95,4 @@ ], "title": "datanode_capacity", "type": "timeseries" -} \ No newline at end of file +} diff --git a/timeserieschart/schemas/migrate/tests/basic-with-ymax-and-dotted/input.json b/timeserieschart/schemas/migrate/tests/basic-with-ymax-and-dotted/input.json index bbd6f8c8d..b9fd4adc1 100644 --- a/timeserieschart/schemas/migrate/tests/basic-with-ymax-and-dotted/input.json +++ b/timeserieschart/schemas/migrate/tests/basic-with-ymax-and-dotted/input.json @@ -44,10 +44,7 @@ }, "lineStyle": { "fill": "dot", - "dash": [ - 0, - 10 - ] + "dash": [0, 10] } }, "color": { @@ -101,4 +98,4 @@ }, "dataLinks": [] } -} \ No newline at end of file +} diff --git a/timeserieschart/schemas/migrate/tests/color-based-on-legend-text/expected.json b/timeserieschart/schemas/migrate/tests/color-based-on-legend-text/expected.json index 671679d66..e5fe7658e 100644 --- a/timeserieschart/schemas/migrate/tests/color-based-on-legend-text/expected.json +++ b/timeserieschart/schemas/migrate/tests/color-based-on-legend-text/expected.json @@ -47,4 +47,4 @@ "min": 0 } } -} \ No newline at end of file +} diff --git a/timeserieschart/schemas/migrate/tests/color-based-on-legend-text/input.json b/timeserieschart/schemas/migrate/tests/color-based-on-legend-text/input.json index 5c6c95aeb..056c4f41d 100644 --- a/timeserieschart/schemas/migrate/tests/color-based-on-legend-text/input.json +++ b/timeserieschart/schemas/migrate/tests/color-based-on-legend-text/input.json @@ -228,4 +228,4 @@ "width": 250 } } -} \ No newline at end of file +} diff --git a/timeserieschart/schemas/migrate/tests/legacy-panel/expected.json b/timeserieschart/schemas/migrate/tests/legacy-panel/expected.json index 7cd93020e..d4e9766f1 100644 --- a/timeserieschart/schemas/migrate/tests/legacy-panel/expected.json +++ b/timeserieschart/schemas/migrate/tests/legacy-panel/expected.json @@ -1,4 +1,4 @@ { "kind": "TimeSeriesChart", "spec": {} -} \ No newline at end of file +} diff --git a/timeserieschart/schemas/migrate/tests/legacy-panel/input.json b/timeserieschart/schemas/migrate/tests/legacy-panel/input.json index e7aa49e29..719aedc0f 100644 --- a/timeserieschart/schemas/migrate/tests/legacy-panel/input.json +++ b/timeserieschart/schemas/migrate/tests/legacy-panel/input.json @@ -135,4 +135,4 @@ "yaxis": { "align": false } -} \ No newline at end of file +} diff --git a/timeserieschart/schemas/migrate/tests/multiple-overrides/expected.json b/timeserieschart/schemas/migrate/tests/multiple-overrides/expected.json index decea5929..d5010a537 100644 --- a/timeserieschart/schemas/migrate/tests/multiple-overrides/expected.json +++ b/timeserieschart/schemas/migrate/tests/multiple-overrides/expected.json @@ -4,11 +4,7 @@ "legend": { "position": "right", "mode": "table", - "values": [ - "min", - "max", - "mean" - ] + "values": ["min", "max", "mean"] }, "yAxis": { "format": { diff --git a/timeserieschart/schemas/migrate/tests/multiple-overrides/input.json b/timeserieschart/schemas/migrate/tests/multiple-overrides/input.json index 8eaf1cdd1..02cbcebaf 100644 --- a/timeserieschart/schemas/migrate/tests/multiple-overrides/input.json +++ b/timeserieschart/schemas/migrate/tests/multiple-overrides/input.json @@ -104,10 +104,7 @@ { "id": "custom.lineStyle", "value": { - "dash": [ - 8, - 10 - ], + "dash": [8, 10], "fill": "dash" } } @@ -133,10 +130,7 @@ { "id": "custom.lineStyle", "value": { - "dash": [ - 10, - 10 - ], + "dash": [10, 10], "fill": "dash" } } @@ -249,13 +243,9 @@ "showLegend": true, "displayMode": "table", "placement": "right", - "calcs": [ - "min", - "max", - "mean" - ], + "calcs": ["min", "max", "mean"], "sortBy": "Max", "sortDesc": true } } -} \ No newline at end of file +} diff --git a/timeserieschart/schemas/migrate/tests/undefined-refId/expected.json b/timeserieschart/schemas/migrate/tests/undefined-refId/expected.json index 8bd602c48..a61dad8dc 100644 --- a/timeserieschart/schemas/migrate/tests/undefined-refId/expected.json +++ b/timeserieschart/schemas/migrate/tests/undefined-refId/expected.json @@ -1,15 +1,10 @@ { "kind": "TimeSeriesChart", "spec": { - "legend": { - "mode": "table", + "legend": { + "mode": "table", "position": "bottom", - "values": [ - "first", - "min", - "max", - "last" - ] + "values": ["first", "min", "max", "last"] }, "visual": { "connectNulls": false @@ -20,4 +15,4 @@ } } } -} \ No newline at end of file +} diff --git a/timeserieschart/schemas/migrate/tests/undefined-refId/input.json b/timeserieschart/schemas/migrate/tests/undefined-refId/input.json index 5d448b0cb..80c4aef5d 100644 --- a/timeserieschart/schemas/migrate/tests/undefined-refId/input.json +++ b/timeserieschart/schemas/migrate/tests/undefined-refId/input.json @@ -38,12 +38,7 @@ "id": 50, "options": { "legend": { - "calcs": [ - "first", - "min", - "max", - "last" - ], + "calcs": ["first", "min", "max", "last"], "displayMode": "table", "placement": "bottom", "showLegend": true, @@ -70,4 +65,4 @@ ], "title": "inodes count in /run", "type": "timeseries" -} \ No newline at end of file +} diff --git a/timeserieschart/src/GeneralSettingsEditor.tsx b/timeserieschart/src/GeneralSettingsEditor.tsx index 495ea6db3..e27b344c7 100644 --- a/timeserieschart/src/GeneralSettingsEditor.tsx +++ b/timeserieschart/src/GeneralSettingsEditor.tsx @@ -12,7 +12,6 @@ // limitations under the License. import { Button } from '@mui/material'; -import { produce } from 'immer'; import { OptionsEditorGroup, OptionsEditorGrid, @@ -21,7 +20,9 @@ import { ThresholdsEditorProps, } from '@perses-dev/components'; import { LegendOptionsEditor, LegendOptionsEditorProps } from '@perses-dev/plugin-system'; +import { produce } from 'immer'; import { ReactElement } from 'react'; + import { TimeSeriesChartOptions, DEFAULT_VISUAL, diff --git a/timeserieschart/src/QuerySettingsEditor.tsx b/timeserieschart/src/QuerySettingsEditor.tsx index cca49c845..51a08f934 100644 --- a/timeserieschart/src/QuerySettingsEditor.tsx +++ b/timeserieschart/src/QuerySettingsEditor.tsx @@ -27,12 +27,13 @@ import { useTheme, } from '@mui/material'; import { FormatControls, FormatOptions, OptionsColorPicker } from '@perses-dev/components'; -import React, { ReactElement, useEffect, useMemo, useRef, useState } from 'react'; +import { generateQueryNames, useDataQueriesContext } from '@perses-dev/plugin-system'; +import { produce } from 'immer'; +import CloseIcon from 'mdi-material-ui/Close'; import DeleteIcon from 'mdi-material-ui/DeleteOutline'; import AddIcon from 'mdi-material-ui/Plus'; -import CloseIcon from 'mdi-material-ui/Close'; -import { produce } from 'immer'; -import { generateQueryNames, useDataQueriesContext } from '@perses-dev/plugin-system'; +import React, { ReactElement, useEffect, useMemo, useRef, useState } from 'react'; + import { DEFAULT_AREA_OPACITY, LINE_STYLE_CONFIG, @@ -376,8 +377,8 @@ function QuerySettingsInput({ onAreaOpacityChange, onDelete, inputRef, - onAddColor: onAddColor, - onRemoveColor: onRemoveColor, + onAddColor, + onRemoveColor, onAddLineStyle, onRemoveLineStyle, onAddAreaOpacity, @@ -392,7 +393,7 @@ function QuerySettingsInput({ onStackChange, }: QuerySettingsInputProps): ReactElement { // current query index should also be selectable - const selectableQueryIndexes = availableQueryIndexes.concat(queryIndex).sort((a, b) => a - b); + const selectableQueryIndexes = availableQueryIndexes.concat(queryIndex).toSorted((a, b) => a - b); // State for dropdown menu const [anchorEl, setAnchorEl] = useState(null); diff --git a/timeserieschart/src/TimeSeriesChart.ts b/timeserieschart/src/TimeSeriesChart.ts index 8939a717c..366db5866 100644 --- a/timeserieschart/src/TimeSeriesChart.ts +++ b/timeserieschart/src/TimeSeriesChart.ts @@ -12,9 +12,10 @@ // limitations under the License. import { PanelPlugin } from '@perses-dev/plugin-system'; -import { createInitialTimeSeriesChartOptions, TimeSeriesChartOptions } from './time-series-chart-model'; + import { TimeSeriesChartGeneralSettings } from './GeneralSettingsEditor'; import { QuerySettingsEditor } from './QuerySettingsEditor'; +import { createInitialTimeSeriesChartOptions, TimeSeriesChartOptions } from './time-series-chart-model'; import { TimeSeriesChartPanel, TimeSeriesChartProps } from './TimeSeriesChartPanel'; import { TimeSeriesExportAction } from './TimeSeriesExportAction'; diff --git a/timeserieschart/src/TimeSeriesChartBase.tsx b/timeserieschart/src/TimeSeriesChartBase.tsx index 3a212dd39..4bc532f71 100644 --- a/timeserieschart/src/TimeSeriesChartBase.tsx +++ b/timeserieschart/src/TimeSeriesChartBase.tsx @@ -11,32 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { forwardRef, MouseEvent, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'; import { Box } from '@mui/material'; -import merge from 'lodash/merge'; -import isEqual from 'lodash/isEqual'; - -import type { - EChartsCoreOption, - GridComponentOption, - LineSeriesOption, - YAXisComponentOption, - TooltipComponentOption, -} from 'echarts'; -import { ECharts as EChartsInstance, use } from 'echarts/core'; -import { LineChart as EChartsLineChart, BarChart as EChartsBarChart } from 'echarts/charts'; -import { - GridComponent, - DatasetComponent, - DataZoomComponent, - MarkAreaComponent, - MarkLineComponent, - MarkPointComponent, - TitleComponent, - ToolboxComponent, - TooltipComponent, -} from 'echarts/components'; -import { CanvasRenderer } from 'echarts/renderers'; import { ChartInstance, ChartInstanceFocusOpts, @@ -60,13 +35,38 @@ import { useTimeZone, ZoomEventData, } from '@perses-dev/components'; -import { DatasetOption } from 'echarts/types/dist/shared'; import { TimeScale, TimeSeries } from '@perses-dev/spec'; -import { createTimezoneAwareAxisFormatter } from './utils/timezone-formatter'; -import { TimeSeriesAnnotation } from './utils/annotation'; +import type { + EChartsCoreOption, + GridComponentOption, + LineSeriesOption, + YAXisComponentOption, + TooltipComponentOption, +} from 'echarts'; +import { LineChart as EChartsLineChart, BarChart as EChartsBarChart } from 'echarts/charts'; +import { + GridComponent, + DatasetComponent, + DataZoomComponent, + MarkAreaComponent, + MarkLineComponent, + MarkPointComponent, + TitleComponent, + ToolboxComponent, + TooltipComponent, +} from 'echarts/components'; +import { ECharts as EChartsInstance, use as registerECharts } from 'echarts/core'; +import { CanvasRenderer } from 'echarts/renderers'; +import { DatasetOption } from 'echarts/types/dist/shared'; +import isEqual from 'lodash/isEqual'; +import merge from 'lodash/merge'; +import { forwardRef, MouseEvent, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'; + import { AnnotationTooltip, buildAnnotationSeries } from './annotations/AnnotationTooltip'; +import { TimeSeriesAnnotation } from './utils/annotation'; +import { createTimezoneAwareAxisFormatter } from './utils/timezone-formatter'; -use([ +registerECharts([ EChartsLineChart, EChartsBarChart, GridComponent, diff --git a/timeserieschart/src/TimeSeriesChartPanel.test.tsx b/timeserieschart/src/TimeSeriesChartPanel.test.tsx index b56ee0eda..8d2a65366 100644 --- a/timeserieschart/src/TimeSeriesChartPanel.test.tsx +++ b/timeserieschart/src/TimeSeriesChartPanel.test.tsx @@ -11,13 +11,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { screen, render } from '@testing-library/react'; -import userEvent from '@testing-library/user-event'; import { ChartsProvider, testChartsTheme } from '@perses-dev/components'; +import { AnnotationSpecWithData } from '@perses-dev/dashboards'; import { TimeRangeContext } from '@perses-dev/plugin-system'; -import { VirtuosoMockContext } from 'react-virtuoso'; import { TimeRangeValue, toAbsoluteTimeRange } from '@perses-dev/spec'; -import { AnnotationSpecWithData } from '@perses-dev/dashboards'; +import { screen, render } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; +import { VirtuosoMockContext } from 'react-virtuoso'; + import { MOCK_TIME_SERIES_DATA_MULTIVALUE } from './test/mock-query-results'; import { TimeSeriesChartPanel, TimeSeriesChartProps } from './TimeSeriesChartPanel'; diff --git a/timeserieschart/src/TimeSeriesChartPanel.tsx b/timeserieschart/src/TimeSeriesChartPanel.tsx index a22502839..f967029c1 100644 --- a/timeserieschart/src/TimeSeriesChartPanel.tsx +++ b/timeserieschart/src/TimeSeriesChartPanel.tsx @@ -11,19 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, useMemo, useRef, useState } from 'react'; import { Box, useTheme } from '@mui/material'; -import type { GridComponentOption } from 'echarts'; -import merge from 'lodash/merge'; -import { - LEGEND_VALUE_CONFIG, - PanelProps, - useTimeRange, - validateLegendSpec, - legendValues, - getCalculations, - CalculationType, -} from '@perses-dev/plugin-system'; import { ChartInstance, YAxisLabel, @@ -44,8 +32,21 @@ import { formatValue, getTimeSeriesValues, } from '@perses-dev/components'; -import { TimeSeries, TimeSeriesData, TimeSeriesValueTuple } from '@perses-dev/spec'; import { usePanelAnnotationsWithData } from '@perses-dev/dashboards'; +import { + LEGEND_VALUE_CONFIG, + PanelProps, + useTimeRange, + validateLegendSpec, + legendValues, + getCalculations, + CalculationType, +} from '@perses-dev/plugin-system'; +import { TimeSeries, TimeSeriesData, TimeSeriesValueTuple } from '@perses-dev/spec'; +import type { GridComponentOption } from 'echarts'; +import merge from 'lodash/merge'; +import { ReactElement, useMemo, useRef, useState } from 'react'; + import { TimeSeriesChartOptions, DEFAULT_FORMAT, @@ -53,6 +54,8 @@ import { THRESHOLD_PLOT_INTERVAL, QuerySettingsOptions, } from './time-series-chart-model'; +import { TimeSeriesChartBase } from './TimeSeriesChartBase'; +import { convertAnnotationToTimeSeriesAnnotation, TimeSeriesAnnotation } from './utils/annotation'; import { getTimeSeries, getCommonTimeScaleForQueries, @@ -61,8 +64,6 @@ import { convertPercentThreshold, } from './utils/data-transform'; import { getSeriesColor } from './utils/palette-gen'; -import { TimeSeriesChartBase } from './TimeSeriesChartBase'; -import { convertAnnotationToTimeSeriesAnnotation, TimeSeriesAnnotation } from './utils/annotation'; export type TimeSeriesChartProps = PanelProps; diff --git a/timeserieschart/src/TimeSeriesExportAction.tsx b/timeserieschart/src/TimeSeriesExportAction.tsx index b6acdd602..d79015b27 100644 --- a/timeserieschart/src/TimeSeriesExportAction.tsx +++ b/timeserieschart/src/TimeSeriesExportAction.tsx @@ -13,9 +13,10 @@ import { IconButton } from '@mui/material'; import { InfoTooltip } from '@perses-dev/components'; +import { exportDataAsCSV, extractExportableData, isExportableData, sanitizeFilename } from '@perses-dev/plugin-system'; import DownloadIcon from 'mdi-material-ui/Download'; import React, { useCallback, useMemo } from 'react'; -import { exportDataAsCSV, extractExportableData, isExportableData, sanitizeFilename } from '@perses-dev/plugin-system'; + import { TimeSeriesChartProps } from './TimeSeriesChartPanel'; export const TimeSeriesExportAction: React.FC = ({ queryResults, definition }) => { diff --git a/timeserieschart/src/VisualOptionsEditor.test.tsx b/timeserieschart/src/VisualOptionsEditor.test.tsx index da1f082aa..3402e56d2 100644 --- a/timeserieschart/src/VisualOptionsEditor.test.tsx +++ b/timeserieschart/src/VisualOptionsEditor.test.tsx @@ -12,6 +12,7 @@ // limitations under the License. import { render, screen, fireEvent } from '@testing-library/react'; + import { TimeSeriesChartVisualOptions, VISUAL_CONFIG } from './time-series-chart-model'; import { VisualOptionsEditor } from './VisualOptionsEditor'; diff --git a/timeserieschart/src/VisualOptionsEditor.tsx b/timeserieschart/src/VisualOptionsEditor.tsx index 6bab71caa..41c1f5cb7 100644 --- a/timeserieschart/src/VisualOptionsEditor.tsx +++ b/timeserieschart/src/VisualOptionsEditor.tsx @@ -11,10 +11,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { produce } from 'immer'; import { Slider, Switch, ToggleButton, ToggleButtonGroup } from '@mui/material'; import { OptionsEditorControl, OptionsEditorGroup, SettingsAutocomplete } from '@perses-dev/components'; +import { produce } from 'immer'; import { ReactElement } from 'react'; + import { DEFAULT_AREA_OPACITY, DEFAULT_CONNECT_NULLS, diff --git a/timeserieschart/src/YAxisOptionsEditor.tsx b/timeserieschart/src/YAxisOptionsEditor.tsx index eb7c82bc4..7e77b3d36 100644 --- a/timeserieschart/src/YAxisOptionsEditor.tsx +++ b/timeserieschart/src/YAxisOptionsEditor.tsx @@ -12,9 +12,9 @@ // limitations under the License. import { Switch, TextField } from '@mui/material'; - import { OptionsEditorControl, OptionsEditorGroup, FormatControls, SettingsAutocomplete } from '@perses-dev/components'; import { ReactElement } from 'react'; + import { DEFAULT_FORMAT, DEFAULT_Y_AXIS, diff --git a/timeserieschart/src/annotations/AnnotationTooltip.tsx b/timeserieschart/src/annotations/AnnotationTooltip.tsx index fd6e5b44a..cd9a43d8f 100644 --- a/timeserieschart/src/annotations/AnnotationTooltip.tsx +++ b/timeserieschart/src/annotations/AnnotationTooltip.tsx @@ -12,10 +12,6 @@ // limitations under the License. import { Box, Divider, Portal, Stack, Typography } from '@mui/material'; -import Pin from 'mdi-material-ui/Pin'; -import PinOutline from 'mdi-material-ui/PinOutline'; -import useResizeObserver from 'use-resize-observer'; -import type { LineSeriesOption } from 'echarts'; import { assembleTransform, CursorCoordinates, @@ -28,6 +24,11 @@ import { useMousePosition, } from '@perses-dev/components'; import { DEFAULT_ANNOTATION_COLOR } from '@perses-dev/plugin-system'; +import type { LineSeriesOption } from 'echarts'; +import Pin from 'mdi-material-ui/Pin'; +import PinOutline from 'mdi-material-ui/PinOutline'; +import useResizeObserver from 'use-resize-observer'; + import { TimeSeriesAnnotation } from '../utils/annotation'; export interface AnnotationTooltipProps { diff --git a/timeserieschart/src/getPluginModule.ts b/timeserieschart/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/timeserieschart/src/getPluginModule.ts +++ b/timeserieschart/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/timeserieschart/src/utils/annotation.ts b/timeserieschart/src/utils/annotation.ts index 6fa2cc51d..6259af079 100644 --- a/timeserieschart/src/utils/annotation.ts +++ b/timeserieschart/src/utils/annotation.ts @@ -11,8 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { AnnotationData, AnnotationDisplay } from '@perses-dev/spec'; import { AnnotationSpecWithData } from '@perses-dev/dashboards'; +import { AnnotationData, AnnotationDisplay } from '@perses-dev/spec'; export type TimeSeriesAnnotation = AnnotationData & AnnotationDisplay; diff --git a/timeserieschart/src/utils/data-transform.test.ts b/timeserieschart/src/utils/data-transform.test.ts index 68634aa1a..e6a159bd4 100644 --- a/timeserieschart/src/utils/data-transform.test.ts +++ b/timeserieschart/src/utils/data-transform.test.ts @@ -13,6 +13,7 @@ import { LegacyTimeSeries } from '@perses-dev/components'; import { TimeScale } from '@perses-dev/spec'; + import { TimeSeriesChartVisualOptions, TimeSeriesChartYAxisOptions } from '../time-series-chart-model'; import { convertPercentThreshold, convertPanelYAxis, getTimeSeries, roundDown } from './data-transform'; diff --git a/timeserieschart/src/utils/data-transform.ts b/timeserieschart/src/utils/data-transform.ts index caa8441bc..810510ae1 100644 --- a/timeserieschart/src/utils/data-transform.ts +++ b/timeserieschart/src/utils/data-transform.ts @@ -11,8 +11,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -import type { YAXisComponentOption } from 'echarts'; -import { LineSeriesOption, BarSeriesOption } from 'echarts/charts'; import { OPTIMIZED_MODE_SERIES_LIMIT, LegacyTimeSeries, @@ -24,6 +22,9 @@ import { } from '@perses-dev/components'; import { useTimeSeriesQueries, PanelData } from '@perses-dev/plugin-system'; import { TimeScale, TimeSeries, TimeSeriesData, TimeSeriesValueTuple } from '@perses-dev/spec'; +import type { YAXisComponentOption } from 'echarts'; +import { LineSeriesOption, BarSeriesOption } from 'echarts/charts'; + import { DEFAULT_AREA_OPACITY, DEFAULT_CONNECT_NULLS, diff --git a/timeseriestable/jest.config.ts b/timeseriestable/jest.config.ts index 5190fb4de..16027133b 100644 --- a/timeseriestable/jest.config.ts +++ b/timeseriestable/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/timeseriestable/package.json b/timeseriestable/package.json index a3bc39d0c..b61d38fd8 100644 --- a/timeseriestable/package.json +++ b/timeseriestable/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/timeseriestable/rsbuild.config.ts b/timeseriestable/rsbuild.config.ts index 1153c618b..3049e4cf6 100644 --- a/timeseriestable/rsbuild.config.ts +++ b/timeseriestable/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/timeseriestable/src/TimeSeriesTable.ts b/timeseriestable/src/TimeSeriesTable.ts index b08836aaf..5036bc683 100644 --- a/timeseriestable/src/TimeSeriesTable.ts +++ b/timeseriestable/src/TimeSeriesTable.ts @@ -12,9 +12,10 @@ // limitations under the License. import { PanelPlugin } from '@perses-dev/plugin-system'; -import { TimeSeriesTablePanel, TimeSeriesTableProps } from './TimeSeriesTablePanel'; + import { TimeSeriesTableItemSelectionActionsEditor } from './components'; import { TimeSeriesTableOptions } from './model'; +import { TimeSeriesTablePanel, TimeSeriesTableProps } from './TimeSeriesTablePanel'; /** * The core TimeSeriesTable panel plugin for Perses. diff --git a/timeseriestable/src/TimeSeriesTablePanel.test.tsx b/timeseriestable/src/TimeSeriesTablePanel.test.tsx index 2c389e06e..3864374d8 100644 --- a/timeseriestable/src/TimeSeriesTablePanel.test.tsx +++ b/timeseriestable/src/TimeSeriesTablePanel.test.tsx @@ -20,10 +20,11 @@ import { } from '@perses-dev/components'; import { VariableProvider } from '@perses-dev/dashboards'; import { TimeRangeProviderBasic, WebhookAction } from '@perses-dev/plugin-system'; +import { TimeSeriesData } from '@perses-dev/spec'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { TimeSeriesData } from '@perses-dev/spec'; + import { TimeSeriesTableOptions } from './model'; import { MOCK_TIME_SERIES_DATA_MULTIVALUE, diff --git a/timeseriestable/src/TimeSeriesTablePanel.tsx b/timeseriestable/src/TimeSeriesTablePanel.tsx index 3251ef3a5..6123e1e10 100644 --- a/timeseriestable/src/TimeSeriesTablePanel.tsx +++ b/timeseriestable/src/TimeSeriesTablePanel.tsx @@ -13,12 +13,12 @@ import { Box } from '@mui/material'; import { useChartsTheme } from '@perses-dev/components'; -import { ReactElement } from 'react'; import { PanelProps } from '@perses-dev/plugin-system'; - import { TimeSeriesData } from '@perses-dev/spec'; -import { TimeSeriesTableOptions } from './model'; +import { ReactElement } from 'react'; + import { DataTable } from './components'; +import { TimeSeriesTableOptions } from './model'; export type TimeSeriesTableProps = PanelProps; diff --git a/timeseriestable/src/components/DataTable.tsx b/timeseriestable/src/components/DataTable.tsx index 3e51d38c6..53f2257ac 100644 --- a/timeseriestable/src/components/DataTable.tsx +++ b/timeseriestable/src/components/DataTable.tsx @@ -26,8 +26,9 @@ import { import { useSelection } from '@perses-dev/components'; import { useSelectionItemActions } from '@perses-dev/dashboards'; import { ActionOptions, PanelData, useAllVariableValues } from '@perses-dev/plugin-system'; -import { ReactElement, ReactNode, useCallback, useMemo } from 'react'; import { BucketTuple, HistogramValue, TimeSeries, TimeSeriesData, TimeSeriesHistogramTuple } from '@perses-dev/spec'; +import { ReactElement, ReactNode, useCallback, useMemo } from 'react'; + import { TimeSeriesTableOptions } from '../model'; import { EmbeddedPanel } from './EmbeddedPanel'; import { SeriesName } from './SeriesName'; diff --git a/timeseriestable/src/components/EmbeddedPanel.tsx b/timeseriestable/src/components/EmbeddedPanel.tsx index 33d8bbcb6..d0ffbe262 100644 --- a/timeseriestable/src/components/EmbeddedPanel.tsx +++ b/timeseriestable/src/components/EmbeddedPanel.tsx @@ -11,12 +11,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { PanelData } from '@perses-dev/plugin-system'; -import { PanelPluginLoader } from '@perses-dev/dashboards'; -import useResizeObserver from 'use-resize-observer'; import { ErrorAlert, ErrorBoundary } from '@perses-dev/components'; -import { ReactElement } from 'react'; +import { PanelPluginLoader } from '@perses-dev/dashboards'; +import { PanelData } from '@perses-dev/plugin-system'; import { QueryDataType, UnknownSpec } from '@perses-dev/spec'; +import { ReactElement } from 'react'; +import useResizeObserver from 'use-resize-observer'; interface EmbeddedPanelProps { kind: string; diff --git a/timeseriestable/src/components/SeriesName.tsx b/timeseriestable/src/components/SeriesName.tsx index dd102c024..28bba9096 100644 --- a/timeseriestable/src/components/SeriesName.tsx +++ b/timeseriestable/src/components/SeriesName.tsx @@ -11,10 +11,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, MouseEvent } from 'react'; -import { useSnackbar } from '@perses-dev/components'; import { Typography } from '@mui/material'; +import { useSnackbar } from '@perses-dev/components'; import { Labels } from '@perses-dev/spec'; +import { ReactElement, MouseEvent } from 'react'; interface SeriesNameProps { name: string; diff --git a/timeseriestable/src/components/TimeSeriesTableItemSelectionActionsEditor.tsx b/timeseriestable/src/components/TimeSeriesTableItemSelectionActionsEditor.tsx index e8ca51f03..2d5948d71 100644 --- a/timeseriestable/src/components/TimeSeriesTableItemSelectionActionsEditor.tsx +++ b/timeseriestable/src/components/TimeSeriesTableItemSelectionActionsEditor.tsx @@ -13,6 +13,7 @@ import { ActionOptions, ItemSelectionActionsEditor, SelectionOptions } from '@perses-dev/plugin-system'; import { ReactElement } from 'react'; + import { TimeSeriesTableSettingsEditorProps } from '../model'; export function TimeSeriesTableItemSelectionActionsEditor({ diff --git a/timeseriestable/src/getPluginModule.ts b/timeseriestable/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/timeseriestable/src/getPluginModule.ts +++ b/timeseriestable/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/tracetable/jest.config.ts b/tracetable/jest.config.ts index 5190fb4de..16027133b 100644 --- a/tracetable/jest.config.ts +++ b/tracetable/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/tracetable/package.json b/tracetable/package.json index 9517dcbde..8ae000a38 100644 --- a/tracetable/package.json +++ b/tracetable/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/tracetable/rsbuild.config.ts b/tracetable/rsbuild.config.ts index e6b062f0c..51925b72c 100644 --- a/tracetable/rsbuild.config.ts +++ b/tracetable/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/tracetable/src/DataTable.tsx b/tracetable/src/DataTable.tsx index a8918fb23..3d05acd90 100644 --- a/tracetable/src/DataTable.tsx +++ b/tracetable/src/DataTable.tsx @@ -12,12 +12,10 @@ // limitations under the License. import { Avatar, Box, Chip, Link, Tooltip, Typography, useTheme } from '@mui/material'; -import { PanelData, replaceVariablesInString, useAllVariableValues, useRouterContext } from '@perses-dev/plugin-system'; -import { useSelectionItemActions } from '@perses-dev/dashboards'; -import InformationIcon from 'mdi-material-ui/Information'; -import { useChartsTheme, useSelection, useTimeZone } from '@perses-dev/components'; import { DataGrid, GridColDef, GridRowSelectionModel } from '@mui/x-data-grid'; -import { ReactElement, ReactNode, useCallback, useMemo } from 'react'; +import { useChartsTheme, useSelection, useTimeZone } from '@perses-dev/components'; +import { useSelectionItemActions } from '@perses-dev/dashboards'; +import { PanelData, replaceVariablesInString, useAllVariableValues, useRouterContext } from '@perses-dev/plugin-system'; import { convertTimeToDuration, formatDuration, @@ -26,8 +24,11 @@ import { TraceData, TraceSearchResult, } from '@perses-dev/spec'; -import { getServiceColor } from './utils/utils'; +import InformationIcon from 'mdi-material-ui/Information'; +import { ReactElement, ReactNode, useCallback, useMemo } from 'react'; + import { TraceTableOptions } from './trace-table-model'; +import { getServiceColor } from './utils/utils'; const DATE_FORMAT_OPTIONS: Intl.DateTimeFormatOptions = { year: 'numeric', diff --git a/tracetable/src/TraceTable.ts b/tracetable/src/TraceTable.ts index 52d75d1a3..c4e6fdf72 100644 --- a/tracetable/src/TraceTable.ts +++ b/tracetable/src/TraceTable.ts @@ -12,9 +12,10 @@ // limitations under the License. import { PanelPlugin } from '@perses-dev/plugin-system'; + +import { TraceTableOptions, createInitialTraceTableOptions } from './trace-table-model'; import { TraceTableItemSelectionActionsEditor } from './TraceTableItemSelectionActionsEditor'; import { TraceTablePanel, TraceTablePanelProps } from './TraceTablePanel'; -import { TraceTableOptions, createInitialTraceTableOptions } from './trace-table-model'; /** * The core TraceTable panel plugin for Perses. diff --git a/tracetable/src/TraceTableItemSelectionActionsEditor.tsx b/tracetable/src/TraceTableItemSelectionActionsEditor.tsx index a8bcaf124..f9c4e87ed 100644 --- a/tracetable/src/TraceTableItemSelectionActionsEditor.tsx +++ b/tracetable/src/TraceTableItemSelectionActionsEditor.tsx @@ -18,6 +18,7 @@ import { SelectionOptions, } from '@perses-dev/plugin-system'; import { ReactElement } from 'react'; + import { TraceTableOptions } from './trace-table-model'; type TraceTableItemSelectionActionsEditorProps = OptionsEditorProps; diff --git a/tracetable/src/TraceTablePanel.test.tsx b/tracetable/src/TraceTablePanel.test.tsx index d0a244f69..41b8bb1b0 100644 --- a/tracetable/src/TraceTablePanel.test.tsx +++ b/tracetable/src/TraceTablePanel.test.tsx @@ -12,12 +12,13 @@ // limitations under the License. import { ChartsProvider, testChartsTheme } from '@perses-dev/components'; +import { VariableProvider } from '@perses-dev/dashboards'; import { PanelData, ReactRouterProvider, TimeRangeProviderBasic } from '@perses-dev/plugin-system'; +import { TraceData } from '@perses-dev/spec'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { render, screen } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; -import { VariableProvider } from '@perses-dev/dashboards'; -import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import { TraceData } from '@perses-dev/spec'; + import { MOCK_TRACE_SEARCH_RESULT_QUERY_RESULT } from './test/mock-trace-data'; import { TraceTablePanel, TraceTablePanelProps } from './TraceTablePanel'; diff --git a/tracetable/src/TraceTablePanel.tsx b/tracetable/src/TraceTablePanel.tsx index 5fa38a99e..893f4cb9f 100644 --- a/tracetable/src/TraceTablePanel.tsx +++ b/tracetable/src/TraceTablePanel.tsx @@ -11,11 +11,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { PanelProps } from '@perses-dev/plugin-system'; import { Box } from '@mui/material'; import { NoDataOverlay, useChartsTheme } from '@perses-dev/components'; -import { ReactElement } from 'react'; +import { PanelProps } from '@perses-dev/plugin-system'; import { TraceData } from '@perses-dev/spec'; +import { ReactElement } from 'react'; + import { DataTable } from './DataTable'; import { TraceTableOptions } from './trace-table-model'; diff --git a/tracetable/src/getPluginModule.ts b/tracetable/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/tracetable/src/getPluginModule.ts +++ b/tracetable/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/tracetable/src/utils/utils.ts b/tracetable/src/utils/utils.ts index 9aef85ede..0b30895e1 100644 --- a/tracetable/src/utils/utils.ts +++ b/tracetable/src/utils/utils.ts @@ -11,8 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { PersesChartsTheme } from '@perses-dev/components'; import { Theme } from '@mui/material'; +import { PersesChartsTheme } from '@perses-dev/components'; + import { getConsistentCategoricalColor, getConsistentColor } from './palette'; export function getServiceColor( diff --git a/tracingganttchart/jest.config.ts b/tracingganttchart/jest.config.ts index 5190fb4de..16027133b 100644 --- a/tracingganttchart/jest.config.ts +++ b/tracingganttchart/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/tracingganttchart/package.json b/tracingganttchart/package.json index 65353a7be..4e831e892 100644 --- a/tracingganttchart/package.json +++ b/tracingganttchart/package.json @@ -17,7 +17,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/tracingganttchart/rsbuild.config.ts b/tracingganttchart/rsbuild.config.ts index 3f1fc2465..f2888e30b 100644 --- a/tracingganttchart/rsbuild.config.ts +++ b/tracingganttchart/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/tracingganttchart/schemas/tests/valid/tracing-gantt-chart.json b/tracingganttchart/schemas/tests/valid/tracing-gantt-chart.json index a187891a2..7569bea8c 100644 --- a/tracingganttchart/schemas/tests/valid/tracing-gantt-chart.json +++ b/tracingganttchart/schemas/tests/valid/tracing-gantt-chart.json @@ -8,9 +8,7 @@ }, "links": { "trace": "/datasource/${datasourceName}/trace/${traceId}", - "attributes": [ - { "name": "k8s.pod.name", "link": "/namespace/${k8s_namespace_name}/pod/${k8s_pod_name}" } - ] + "attributes": [{ "name": "k8s.pod.name", "link": "/namespace/${k8s_namespace_name}/pod/${k8s_pod_name}" }] } } } diff --git a/tracingganttchart/src/PanelActions.test.ts b/tracingganttchart/src/PanelActions.test.ts index 1d384b28a..e49aa3b6a 100644 --- a/tracingganttchart/src/PanelActions.test.ts +++ b/tracingganttchart/src/PanelActions.test.ts @@ -12,8 +12,9 @@ // limitations under the License. import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; -import * as otlpTrace from './test/traces/example_otlp.json'; + import { getFilename } from './PanelActions'; +import * as otlpTrace from './test/traces/example_otlp.json'; describe('PanelActions', () => { it('renders trace filename', () => { diff --git a/tracingganttchart/src/PanelActions.tsx b/tracingganttchart/src/PanelActions.tsx index c5f9cdbf8..8c35380ce 100644 --- a/tracingganttchart/src/PanelActions.tsx +++ b/tracingganttchart/src/PanelActions.tsx @@ -12,11 +12,11 @@ // limitations under the License. import { InfoTooltip } from '@perses-dev/components'; - -import DownloadIcon from 'mdi-material-ui/DownloadOutline'; -import { ReactElement, useCallback } from 'react'; import { HeaderIconButton } from '@perses-dev/dashboards'; import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; +import DownloadIcon from 'mdi-material-ui/DownloadOutline'; +import { ReactElement, useCallback } from 'react'; + import { TracingGanttChartPanelProps } from './TracingGanttChartPanel'; export function DownloadTraceAction(props: TracingGanttChartPanelProps): ReactElement | null { diff --git a/tracingganttchart/src/TracingGanttChart.ts b/tracingganttchart/src/TracingGanttChart.ts index 666770935..7e862dbb1 100644 --- a/tracingganttchart/src/TracingGanttChart.ts +++ b/tracingganttchart/src/TracingGanttChart.ts @@ -12,9 +12,10 @@ // limitations under the License. import { PanelPlugin } from '@perses-dev/plugin-system'; + import { createInitialTracingGanttChartOptions, TracingGanttChartOptions } from './gantt-chart-model'; -import { TracingGanttChartPanel, TracingGanttChartPanelProps } from './TracingGanttChartPanel'; import { DownloadTraceAction } from './PanelActions'; +import { TracingGanttChartPanel, TracingGanttChartPanelProps } from './TracingGanttChartPanel'; export const TracingGanttChart: PanelPlugin = { PanelComponent: TracingGanttChartPanel, diff --git a/tracingganttchart/src/TracingGanttChart/DetailPane/Attributes.test.tsx b/tracingganttchart/src/TracingGanttChart/DetailPane/Attributes.test.tsx index d46b28b84..c4f33f811 100644 --- a/tracingganttchart/src/TracingGanttChart/DetailPane/Attributes.test.tsx +++ b/tracingganttchart/src/TracingGanttChart/DetailPane/Attributes.test.tsx @@ -11,16 +11,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { render, RenderResult } from '@testing-library/react'; -import { screen } from '@testing-library/dom'; -import { MemoryRouter } from 'react-router-dom'; import { VariableProvider } from '@perses-dev/dashboards'; import { ReactRouterProvider, TimeRangeProviderBasic } from '@perses-dev/plugin-system'; -import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { screen } from '@testing-library/dom'; +import { render, RenderResult } from '@testing-library/react'; +import { MemoryRouter } from 'react-router-dom'; + +import { CustomLinks } from '../../gantt-chart-model'; import * as exampleTrace from '../../test/traces/example_otlp.json'; import { getTraceModel } from '../trace'; -import { CustomLinks } from '../../gantt-chart-model'; import { AttributeList, AttributeListProps, TraceAttributes, TraceAttributesProps } from './Attributes'; describe('Attributes', () => { diff --git a/tracingganttchart/src/TracingGanttChart/DetailPane/Attributes.tsx b/tracingganttchart/src/TracingGanttChart/DetailPane/Attributes.tsx index bde5662e0..0f3636394 100644 --- a/tracingganttchart/src/TracingGanttChart/DetailPane/Attributes.tsx +++ b/tracingganttchart/src/TracingGanttChart/DetailPane/Attributes.tsx @@ -11,13 +11,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, useMemo } from 'react'; import { Divider, Link, List, ListItem, ListItemText } from '@mui/material'; import { replaceVariablesInString, useAllVariableValues, useRouterContext } from '@perses-dev/plugin-system'; import * as oltpcommonv1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/common/v1/common'; +import { ReactElement, useMemo } from 'react'; + +import { CustomLinks } from '../../gantt-chart-model'; import { Span, Trace } from '../trace'; import { formatDuration } from '../utils'; -import { CustomLinks } from '../../gantt-chart-model'; export interface TraceAttributesProps { customLinks?: CustomLinks; diff --git a/tracingganttchart/src/TracingGanttChart/DetailPane/DetailPane.tsx b/tracingganttchart/src/TracingGanttChart/DetailPane/DetailPane.tsx index b6a3d650e..b60ba1a7c 100644 --- a/tracingganttchart/src/TracingGanttChart/DetailPane/DetailPane.tsx +++ b/tracingganttchart/src/TracingGanttChart/DetailPane/DetailPane.tsx @@ -12,10 +12,11 @@ // limitations under the License. import { Box, Chip, IconButton, Tab, Tabs, Typography } from '@mui/material'; -import { ReactElement, useState } from 'react'; import CloseIcon from 'mdi-material-ui/Close'; -import { Span, Trace } from '../trace'; +import { ReactElement, useState } from 'react'; + import { CustomLinks } from '../../gantt-chart-model'; +import { Span, Trace } from '../trace'; import { TraceAttributes } from './Attributes'; import { SpanEventList } from './SpanEvents'; import { SpanLinkList } from './SpanLinks'; diff --git a/tracingganttchart/src/TracingGanttChart/DetailPane/SpanEvents.test.tsx b/tracingganttchart/src/TracingGanttChart/DetailPane/SpanEvents.test.tsx index f649b1716..5050423e8 100644 --- a/tracingganttchart/src/TracingGanttChart/DetailPane/SpanEvents.test.tsx +++ b/tracingganttchart/src/TracingGanttChart/DetailPane/SpanEvents.test.tsx @@ -11,14 +11,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { fireEvent, screen } from '@testing-library/dom'; -import { render, RenderResult } from '@testing-library/react'; - import { VariableProvider } from '@perses-dev/dashboards'; import { ReactRouterProvider, TimeRangeProviderBasic } from '@perses-dev/plugin-system'; -import { MemoryRouter } from 'react-router-dom'; -import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { fireEvent, screen } from '@testing-library/dom'; +import { render, RenderResult } from '@testing-library/react'; +import { MemoryRouter } from 'react-router-dom'; + import * as exampleTrace from '../../test/traces/example_otlp.json'; import { getTraceModel } from '../trace'; import { SpanEventList, SpanEventListProps } from './SpanEvents'; diff --git a/tracingganttchart/src/TracingGanttChart/DetailPane/SpanEvents.tsx b/tracingganttchart/src/TracingGanttChart/DetailPane/SpanEvents.tsx index 5e39fac95..4f7e390bb 100644 --- a/tracingganttchart/src/TracingGanttChart/DetailPane/SpanEvents.tsx +++ b/tracingganttchart/src/TracingGanttChart/DetailPane/SpanEvents.tsx @@ -12,12 +12,13 @@ // limitations under the License. import { Collapse, Divider, List, ListItemButton, ListItemText } from '@mui/material'; -import { Fragment, ReactElement, useState } from 'react'; -import ChevronUp from 'mdi-material-ui/ChevronUp'; import ChevronDown from 'mdi-material-ui/ChevronDown'; -import { formatDuration } from '../utils'; -import { Trace, Span, Event } from '../trace'; +import ChevronUp from 'mdi-material-ui/ChevronUp'; +import { Fragment, ReactElement, useState } from 'react'; + import { CustomLinks } from '../../gantt-chart-model'; +import { Trace, Span, Event } from '../trace'; +import { formatDuration } from '../utils'; import { AttributeItems, AttributeItem } from './Attributes'; export interface SpanEventListProps { @@ -32,7 +33,7 @@ export function SpanEventList(props: SpanEventListProps): ReactElement { return ( <> {span.events - .sort((a, b) => a.timeUnixMs - b.timeUnixMs) + .toSorted((a, b) => a.timeUnixMs - b.timeUnixMs) .map((event, i) => ( {i > 0 && } diff --git a/tracingganttchart/src/TracingGanttChart/DetailPane/SpanLinks.test.tsx b/tracingganttchart/src/TracingGanttChart/DetailPane/SpanLinks.test.tsx index 2dc8d7f60..268608ff3 100644 --- a/tracingganttchart/src/TracingGanttChart/DetailPane/SpanLinks.test.tsx +++ b/tracingganttchart/src/TracingGanttChart/DetailPane/SpanLinks.test.tsx @@ -11,16 +11,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { screen } from '@testing-library/dom'; -import { render, RenderResult } from '@testing-library/react'; -import { MemoryRouter } from 'react-router-dom'; import { VariableProvider } from '@perses-dev/dashboards'; import { ReactRouterProvider, TimeRangeProviderBasic } from '@perses-dev/plugin-system'; -import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { screen } from '@testing-library/dom'; +import { render, RenderResult } from '@testing-library/react'; +import { MemoryRouter } from 'react-router-dom'; + import { CustomLinks } from '../../gantt-chart-model'; -import { getTraceModel } from '../trace'; import * as exampleTrace from '../../test/traces/example_otlp.json'; +import { getTraceModel } from '../trace'; import { SpanLinkList, SpanLinkListProps } from './SpanLinks'; describe('SpanLinks', () => { diff --git a/tracingganttchart/src/TracingGanttChart/DetailPane/SpanLinks.tsx b/tracingganttchart/src/TracingGanttChart/DetailPane/SpanLinks.tsx index c21df314d..dcd343390 100644 --- a/tracingganttchart/src/TracingGanttChart/DetailPane/SpanLinks.tsx +++ b/tracingganttchart/src/TracingGanttChart/DetailPane/SpanLinks.tsx @@ -12,10 +12,11 @@ // limitations under the License. import { Divider, List } from '@mui/material'; -import { Fragment, ReactElement } from 'react'; import { replaceVariablesInString, useAllVariableValues } from '@perses-dev/plugin-system'; -import { Span, Link } from '../trace'; +import { Fragment, ReactElement } from 'react'; + import { CustomLinks } from '../../gantt-chart-model'; +import { Span, Link } from '../trace'; import { AttributeItem, AttributeItems } from './Attributes'; export interface SpanLinkListProps { diff --git a/tracingganttchart/src/TracingGanttChart/GanttTable/GanttTable.test.tsx b/tracingganttchart/src/TracingGanttChart/GanttTable/GanttTable.test.tsx index b9ed96541..73e095334 100644 --- a/tracingganttchart/src/TracingGanttChart/GanttTable/GanttTable.test.tsx +++ b/tracingganttchart/src/TracingGanttChart/GanttTable/GanttTable.test.tsx @@ -12,10 +12,11 @@ // limitations under the License. import { ChartsProvider, testChartsTheme } from '@perses-dev/components'; +import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; import { fireEvent, screen } from '@testing-library/dom'; import { render, RenderResult } from '@testing-library/react'; import { VirtuosoMockContext } from 'react-virtuoso'; -import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; + import * as exampleTrace from '../../test/traces/example_otlp.json'; import { getTraceModel } from '../trace'; import { GanttTable, GanttTableProps } from './GanttTable'; diff --git a/tracingganttchart/src/TracingGanttChart/GanttTable/GanttTable.tsx b/tracingganttchart/src/TracingGanttChart/GanttTable/GanttTable.tsx index 558ac9eef..d8b8e150f 100644 --- a/tracingganttchart/src/TracingGanttChart/GanttTable/GanttTable.tsx +++ b/tracingganttchart/src/TracingGanttChart/GanttTable/GanttTable.tsx @@ -11,15 +11,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { Virtuoso, VirtuosoHandle, ListRange } from 'react-virtuoso'; -import { ReactElement, useEffect, useMemo, useRef, useState } from 'react'; import { Box, useTheme } from '@mui/material'; -import { Viewport } from '../utils'; +import { ReactElement, useEffect, useMemo, useRef, useState } from 'react'; +import { Virtuoso, VirtuosoHandle, ListRange } from 'react-virtuoso'; + import { CustomLinks, TracingGanttChartOptions } from '../../gantt-chart-model'; import { Span, Trace, forEachSpan } from '../trace'; +import { Viewport } from '../utils'; +import { GanttTableHeader } from './GanttTableHeader'; import { useGanttTableContext } from './GanttTableProvider'; import { GanttTableRow } from './GanttTableRow'; -import { GanttTableHeader } from './GanttTableHeader'; import { ResizableDivider } from './ResizableDivider'; export interface GanttTableProps { diff --git a/tracingganttchart/src/TracingGanttChart/GanttTable/GanttTableHeader.tsx b/tracingganttchart/src/TracingGanttChart/GanttTable/GanttTableHeader.tsx index d44a36e66..b4c9fae60 100644 --- a/tracingganttchart/src/TracingGanttChart/GanttTable/GanttTableHeader.tsx +++ b/tracingganttchart/src/TracingGanttChart/GanttTable/GanttTableHeader.tsx @@ -13,9 +13,10 @@ import { Box, Stack, useTheme } from '@mui/material'; import { ReactElement } from 'react'; -import { Viewport, rowHeight } from '../utils'; + import { TicksHeader } from '../Ticks'; import { Trace } from '../trace'; +import { Viewport, rowHeight } from '../utils'; interface GanttTableHeaderProps { trace: Trace; diff --git a/tracingganttchart/src/TracingGanttChart/GanttTable/GanttTableRow.tsx b/tracingganttchart/src/TracingGanttChart/GanttTable/GanttTableRow.tsx index c8742de7f..d3d52f99a 100644 --- a/tracingganttchart/src/TracingGanttChart/GanttTable/GanttTableRow.tsx +++ b/tracingganttchart/src/TracingGanttChart/GanttTable/GanttTableRow.tsx @@ -13,11 +13,12 @@ import { Stack, styled, useTheme } from '@mui/material'; import { memo } from 'react'; -import { Viewport, rowHeight } from '../utils'; + import { CustomLinks, TracingGanttChartOptions } from '../../gantt-chart-model'; import { Span } from '../trace'; -import { SpanName } from './SpanName'; +import { Viewport, rowHeight } from '../utils'; import { SpanDuration } from './SpanDuration'; +import { SpanName } from './SpanName'; interface GanttTableRowProps { options: TracingGanttChartOptions; diff --git a/tracingganttchart/src/TracingGanttChart/GanttTable/ResizableDivider.tsx b/tracingganttchart/src/TracingGanttChart/GanttTable/ResizableDivider.tsx index 8f502edbb..8cdc134c5 100644 --- a/tracingganttchart/src/TracingGanttChart/GanttTable/ResizableDivider.tsx +++ b/tracingganttchart/src/TracingGanttChart/GanttTable/ResizableDivider.tsx @@ -11,9 +11,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { MouseEvent as ReactMouseEvent, ReactElement, useEffect, useState } from 'react'; import { Box, styled } from '@mui/material'; import { useEvent } from '@perses-dev/plugin-system'; +import { MouseEvent as ReactMouseEvent, ReactElement, useEffect, useState } from 'react'; interface ResizableDividerProps { parentRef: React.RefObject; diff --git a/tracingganttchart/src/TracingGanttChart/GanttTable/SpanDuration.test.tsx b/tracingganttchart/src/TracingGanttChart/GanttTable/SpanDuration.test.tsx index ce36a318c..32494e602 100644 --- a/tracingganttchart/src/TracingGanttChart/GanttTable/SpanDuration.test.tsx +++ b/tracingganttchart/src/TracingGanttChart/GanttTable/SpanDuration.test.tsx @@ -12,9 +12,10 @@ // limitations under the License. import { ChartsProvider, testChartsTheme } from '@perses-dev/components'; +import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; import { screen } from '@testing-library/dom'; import { render, RenderResult } from '@testing-library/react'; -import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; + import * as exampleTrace from '../../test/traces/example_otlp.json'; import { getTraceModel } from '../trace'; import { GanttTableProvider } from './GanttTableProvider'; diff --git a/tracingganttchart/src/TracingGanttChart/GanttTable/SpanDuration.tsx b/tracingganttchart/src/TracingGanttChart/GanttTable/SpanDuration.tsx index aab07eb9f..6924753ad 100644 --- a/tracingganttchart/src/TracingGanttChart/GanttTable/SpanDuration.tsx +++ b/tracingganttchart/src/TracingGanttChart/GanttTable/SpanDuration.tsx @@ -14,10 +14,11 @@ import { Box, useTheme } from '@mui/material'; import { useChartsTheme } from '@perses-dev/components'; import { ReactElement } from 'react'; -import { Viewport, formatDuration, getSpanColor, minSpanWidthPx } from '../utils'; -import { Ticks } from '../Ticks'; + import { TracingGanttChartOptions } from '../../gantt-chart-model'; +import { Ticks } from '../Ticks'; import { Span } from '../trace'; +import { Viewport, formatDuration, getSpanColor, minSpanWidthPx } from '../utils'; export interface SpanDurationProps { options: TracingGanttChartOptions; diff --git a/tracingganttchart/src/TracingGanttChart/GanttTable/SpanIndents.tsx b/tracingganttchart/src/TracingGanttChart/GanttTable/SpanIndents.tsx index 0f075db97..9d4d30c74 100644 --- a/tracingganttchart/src/TracingGanttChart/GanttTable/SpanIndents.tsx +++ b/tracingganttchart/src/TracingGanttChart/GanttTable/SpanIndents.tsx @@ -15,6 +15,7 @@ import { styled, useTheme } from '@mui/material'; import ChevronDownIcon from 'mdi-material-ui/ChevronDown'; import ChevronRightIcon from 'mdi-material-ui/ChevronRight'; import { MouseEvent, ReactElement, useCallback } from 'react'; + import { Span } from '../trace'; import { useGanttTableContext } from './GanttTableProvider'; diff --git a/tracingganttchart/src/TracingGanttChart/GanttTable/SpanLinksButton.tsx b/tracingganttchart/src/TracingGanttChart/GanttTable/SpanLinksButton.tsx index ee6d9d66f..3b658c98a 100644 --- a/tracingganttchart/src/TracingGanttChart/GanttTable/SpanLinksButton.tsx +++ b/tracingganttchart/src/TracingGanttChart/GanttTable/SpanLinksButton.tsx @@ -12,12 +12,13 @@ // limitations under the License. import { IconButton, Menu, MenuItem } from '@mui/material'; -import { MouseEvent, ReactElement, useState } from 'react'; -import LaunchIcon from 'mdi-material-ui/Launch'; import { InfoTooltip } from '@perses-dev/components'; import { replaceVariablesInString, useAllVariableValues, useRouterContext } from '@perses-dev/plugin-system'; -import { Span } from '../trace'; +import LaunchIcon from 'mdi-material-ui/Launch'; +import { MouseEvent, ReactElement, useState } from 'react'; + import { CustomLinks } from '../../gantt-chart-model'; +import { Span } from '../trace'; export interface SpanLinksButtonProps { customLinks: CustomLinks; diff --git a/tracingganttchart/src/TracingGanttChart/GanttTable/SpanName.test.tsx b/tracingganttchart/src/TracingGanttChart/GanttTable/SpanName.test.tsx index 3e534dac9..705b02a92 100644 --- a/tracingganttchart/src/TracingGanttChart/GanttTable/SpanName.test.tsx +++ b/tracingganttchart/src/TracingGanttChart/GanttTable/SpanName.test.tsx @@ -11,13 +11,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; import { screen } from '@testing-library/dom'; import { render, RenderResult } from '@testing-library/react'; -import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; + import * as exampleTrace from '../../test/traces/example_otlp.json'; import { getTraceModel } from '../trace'; -import { SpanName, SpanNameProps } from './SpanName'; import { GanttTableProvider } from './GanttTableProvider'; +import { SpanName, SpanNameProps } from './SpanName'; describe('SpanName', () => { const trace = getTraceModel(exampleTrace as otlptracev1.TracesData); diff --git a/tracingganttchart/src/TracingGanttChart/GanttTable/SpanName.tsx b/tracingganttchart/src/TracingGanttChart/GanttTable/SpanName.tsx index 4548573b2..6209511d4 100644 --- a/tracingganttchart/src/TracingGanttChart/GanttTable/SpanName.tsx +++ b/tracingganttchart/src/TracingGanttChart/GanttTable/SpanName.tsx @@ -14,9 +14,10 @@ import { Box, Stack } from '@mui/material'; import AlertIcon from 'mdi-material-ui/AlertCircleOutline'; import { ReactElement } from 'react'; -import { spanHasError } from '../utils'; -import { Span } from '../trace'; + import { CustomLinks } from '../../gantt-chart-model'; +import { Span } from '../trace'; +import { spanHasError } from '../utils'; import { SpanIndents } from './SpanIndents'; import { SpanLinksButton } from './SpanLinksButton'; diff --git a/tracingganttchart/src/TracingGanttChart/MiniGanttChart/Canvas.tsx b/tracingganttchart/src/TracingGanttChart/MiniGanttChart/Canvas.tsx index 677a153a2..32a614c58 100644 --- a/tracingganttchart/src/TracingGanttChart/MiniGanttChart/Canvas.tsx +++ b/tracingganttchart/src/TracingGanttChart/MiniGanttChart/Canvas.tsx @@ -12,14 +12,15 @@ // limitations under the License. import { Box, styled, useTheme } from '@mui/material'; -import useResizeObserver from 'use-resize-observer'; -import { useEffect, useRef, MouseEvent as ReactMouseEvent, useState, useCallback, ReactElement } from 'react'; -import { useEvent } from '@perses-dev/plugin-system'; import { useChartsTheme } from '@perses-dev/components'; -import { Ticks } from '../Ticks'; -import { getSpanColor, Viewport } from '../utils'; +import { useEvent } from '@perses-dev/plugin-system'; +import { useEffect, useRef, MouseEvent as ReactMouseEvent, useState, useCallback, ReactElement } from 'react'; +import useResizeObserver from 'use-resize-observer'; + import { TracingGanttChartOptions } from '../../gantt-chart-model'; +import { Ticks } from '../Ticks'; import { Span, Trace } from '../trace'; +import { getSpanColor, Viewport } from '../utils'; import { drawSpans } from './draw'; const CANVAS_HEIGHT = 60; @@ -32,7 +33,9 @@ interface CanvasProps { } type MouseState = - { type: 'none' } | { type: 'resize'; fixedPoint: number } | { type: 'drag'; start: number; end: number }; + | { type: 'none' } + | { type: 'resize'; fixedPoint: number } + | { type: 'drag'; start: number; end: number }; export function Canvas(props: CanvasProps): ReactElement { const { options, trace, viewport, setViewport } = props; diff --git a/tracingganttchart/src/TracingGanttChart/MiniGanttChart/MiniGanttChart.tsx b/tracingganttchart/src/TracingGanttChart/MiniGanttChart/MiniGanttChart.tsx index 45f41e883..03c49c8a6 100644 --- a/tracingganttchart/src/TracingGanttChart/MiniGanttChart/MiniGanttChart.tsx +++ b/tracingganttchart/src/TracingGanttChart/MiniGanttChart/MiniGanttChart.tsx @@ -13,10 +13,11 @@ import { Box, useTheme } from '@mui/material'; import { ReactElement } from 'react'; -import { TicksHeader } from '../Ticks'; -import { Viewport, rowHeight } from '../utils'; + import { TracingGanttChartOptions } from '../../gantt-chart-model'; +import { TicksHeader } from '../Ticks'; import { Trace } from '../trace'; +import { Viewport, rowHeight } from '../utils'; import { Canvas } from './Canvas'; interface MiniGanttChartProps { diff --git a/tracingganttchart/src/TracingGanttChart/Search.test.tsx b/tracingganttchart/src/TracingGanttChart/Search.test.tsx index a09664608..a190424b5 100644 --- a/tracingganttchart/src/TracingGanttChart/Search.test.tsx +++ b/tracingganttchart/src/TracingGanttChart/Search.test.tsx @@ -12,13 +12,14 @@ // limitations under the License. import { ChartsProvider, testChartsTheme } from '@perses-dev/components'; +import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; import { fireEvent, screen } from '@testing-library/dom'; import { render, renderHook, act, RenderResult } from '@testing-library/react'; import { ReactElement } from 'react'; -import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; + import * as exampleTrace from '../test/traces/example_otlp.json'; -import { getTraceModel } from './trace'; import { SearchBar, useSpanSearch } from './Search'; +import { getTraceModel } from './trace'; const trace = getTraceModel(exampleTrace as otlptracev1.TracesData); diff --git a/tracingganttchart/src/TracingGanttChart/Search.tsx b/tracingganttchart/src/TracingGanttChart/Search.tsx index 39e796684..ded8dfb15 100644 --- a/tracingganttchart/src/TracingGanttChart/Search.tsx +++ b/tracingganttchart/src/TracingGanttChart/Search.tsx @@ -12,11 +12,12 @@ // limitations under the License. import { IconButton, InputAdornment, Stack, TextField } from '@mui/material'; -import ChevronUp from 'mdi-material-ui/ChevronUp'; +import * as otlpcommonv1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/common/v1/common'; import ChevronDown from 'mdi-material-ui/ChevronDown'; +import ChevronUp from 'mdi-material-ui/ChevronUp'; import Close from 'mdi-material-ui/Close'; import { ReactElement, useCallback, useMemo, useState } from 'react'; -import * as otlpcommonv1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/common/v1/common'; + import { renderAttributeValue } from './DetailPane/Attributes'; import { Span, Trace, forEachSpan } from './trace'; diff --git a/tracingganttchart/src/TracingGanttChart/Ticks.test.tsx b/tracingganttchart/src/TracingGanttChart/Ticks.test.tsx index 218aef63c..a68f17d98 100644 --- a/tracingganttchart/src/TracingGanttChart/Ticks.test.tsx +++ b/tracingganttchart/src/TracingGanttChart/Ticks.test.tsx @@ -11,9 +11,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; import { screen } from '@testing-library/dom'; import { render, RenderResult } from '@testing-library/react'; -import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; + import * as otlpTrace from '../test/traces/example_otlp.json'; import { TicksHeader, TicksHeaderProps } from './Ticks'; import { getTraceModel } from './trace'; diff --git a/tracingganttchart/src/TracingGanttChart/Ticks.tsx b/tracingganttchart/src/TracingGanttChart/Ticks.tsx index 4c3c5e635..9cd893fe6 100644 --- a/tracingganttchart/src/TracingGanttChart/Ticks.tsx +++ b/tracingganttchart/src/TracingGanttChart/Ticks.tsx @@ -13,8 +13,9 @@ import { Box, styled } from '@mui/material'; import { ReactElement } from 'react'; -import { Viewport, formatDuration } from './utils'; + import { Trace } from './trace'; +import { Viewport, formatDuration } from './utils'; export interface TicksHeaderProps { trace: Trace; @@ -32,7 +33,7 @@ export function TicksHeader(props: TicksHeaderProps): ReactElement { return ( <> - {formatDuration(startAt + duration * 0)} + {formatDuration(startAt)} {formatDuration(startAt + duration * 0.25)} {formatDuration(startAt + duration * 0.5)} {formatDuration(startAt + duration * 0.75)} diff --git a/tracingganttchart/src/TracingGanttChart/TraceHeaderBar.test.tsx b/tracingganttchart/src/TracingGanttChart/TraceHeaderBar.test.tsx index ac5150e0a..3b3c32bd3 100644 --- a/tracingganttchart/src/TracingGanttChart/TraceHeaderBar.test.tsx +++ b/tracingganttchart/src/TracingGanttChart/TraceHeaderBar.test.tsx @@ -11,14 +11,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { render, RenderResult } from '@testing-library/react'; +import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; import { screen } from '@testing-library/dom'; +import { render, RenderResult } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; -import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; + import * as exampleTrace from '../test/traces/example_otlp.json'; +import { SpanSearch } from './Search'; import { getTraceModel } from './trace'; import { TraceHeaderBar, TraceHeaderBarProps } from './TraceHeaderBar'; -import { SpanSearch } from './Search'; describe('TraceHeaderBar', () => { const trace = getTraceModel(exampleTrace as otlptracev1.TracesData); diff --git a/tracingganttchart/src/TracingGanttChart/TraceHeaderBar.tsx b/tracingganttchart/src/TracingGanttChart/TraceHeaderBar.tsx index d73b40dd0..911133f4e 100644 --- a/tracingganttchart/src/TracingGanttChart/TraceHeaderBar.tsx +++ b/tracingganttchart/src/TracingGanttChart/TraceHeaderBar.tsx @@ -12,12 +12,13 @@ // limitations under the License. import { IconButton, Stack, Tooltip, Typography } from '@mui/material'; +import { useTimeZone } from '@perses-dev/components'; import MagnifyIcon from 'mdi-material-ui/Magnify'; import { ReactElement, useMemo, useState } from 'react'; -import { useTimeZone } from '@perses-dev/components'; -import { formatDuration } from './utils'; -import { Trace } from './trace'; + import { SearchBar, SpanSearch } from './Search'; +import { Trace } from './trace'; +import { formatDuration } from './utils'; const DATE_FORMAT_OPTIONS: Intl.DateTimeFormatOptions = { year: 'numeric', diff --git a/tracingganttchart/src/TracingGanttChart/TracingGanttChart.tsx b/tracingganttchart/src/TracingGanttChart/TracingGanttChart.tsx index aa2f8bca7..5a6f6dabb 100644 --- a/tracingganttchart/src/TracingGanttChart/TracingGanttChart.tsx +++ b/tracingganttchart/src/TracingGanttChart/TracingGanttChart.tsx @@ -11,19 +11,20 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, useMemo, useRef, useState } from 'react'; import { Box, Stack } from '@mui/material'; import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; +import { ReactElement, useMemo, useRef, useState } from 'react'; + import { CustomLinks, TracingGanttChartOptions } from '../gantt-chart-model'; -import { MiniGanttChart } from './MiniGanttChart/MiniGanttChart'; import { DetailPane } from './DetailPane/DetailPane'; -import { Viewport } from './utils'; import { GanttTable } from './GanttTable/GanttTable'; import { GanttTableProvider } from './GanttTable/GanttTableProvider'; import { ResizableDivider } from './GanttTable/ResizableDivider'; +import { MiniGanttChart } from './MiniGanttChart/MiniGanttChart'; +import { useSpanSearch } from './Search'; import { getTraceModel, Span } from './trace'; import { TraceHeaderBar } from './TraceHeaderBar'; -import { useSpanSearch } from './Search'; +import { Viewport } from './utils'; export interface TracingGanttChartProps { options: TracingGanttChartOptions; @@ -44,7 +45,7 @@ export function TracingGanttChart(props: TracingGanttChartProps): ReactElement { try { return getTraceModel(otlpTrace); } catch (e) { - throw new Error(`Error: unable to parse trace: ${e}`); + throw new Error(`Error: unable to parse trace: ${e}`, { cause: e }); } }, [otlpTrace]); const [viewport, setViewport] = useState({ diff --git a/tracingganttchart/src/TracingGanttChart/trace.test.ts b/tracingganttchart/src/TracingGanttChart/trace.test.ts index 812f64848..930d26208 100644 --- a/tracingganttchart/src/TracingGanttChart/trace.test.ts +++ b/tracingganttchart/src/TracingGanttChart/trace.test.ts @@ -12,11 +12,12 @@ // limitations under the License. import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; + +import { JaegerTrace, jaegerTraceToOTLP } from '../test/convert/jaeger'; +import * as asyncTrace from '../test/traces/async_jaeger.json'; import * as exampleTrace from '../test/traces/example_otlp.json'; -import * as missingRootSpanTrace from '../test/traces/pushbytes_no_root_span_otlp.json'; import * as incompleteTrace from '../test/traces/pushbytes_incomplete_otlp.json'; -import * as asyncTrace from '../test/traces/async_jaeger.json'; -import { JaegerTrace, jaegerTraceToOTLP } from '../test/convert/jaeger'; +import * as missingRootSpanTrace from '../test/traces/pushbytes_no_root_span_otlp.json'; import { forEachSpan, getTraceModel, Span } from './trace'; describe('trace', () => { diff --git a/tracingganttchart/src/TracingGanttChart/trace.ts b/tracingganttchart/src/TracingGanttChart/trace.ts index 0e00c722c..146d368dc 100644 --- a/tracingganttchart/src/TracingGanttChart/trace.ts +++ b/tracingganttchart/src/TracingGanttChart/trace.ts @@ -12,8 +12,8 @@ // limitations under the License. import * as otlpcommonv1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/common/v1/common'; -import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; import * as otlpresourcev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/resource/v1/resource'; +import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; import { sortedIndexBy } from 'lodash'; /** holds the trace and computed properties required for the Gantt chart */ diff --git a/tracingganttchart/src/TracingGanttChart/utils.ts b/tracingganttchart/src/TracingGanttChart/utils.ts index 11a64f52a..736ccf7c4 100644 --- a/tracingganttchart/src/TracingGanttChart/utils.ts +++ b/tracingganttchart/src/TracingGanttChart/utils.ts @@ -11,9 +11,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { PersesChartsTheme } from '@perses-dev/components'; import { Theme } from '@mui/material'; +import { PersesChartsTheme } from '@perses-dev/components'; import * as otlptracev1 from '@perses-dev/spec/dist/dashboard/query-type/otlp/trace/v1/trace'; + import { getConsistentCategoricalColor, getConsistentColor } from './palette'; import { Span } from './trace'; diff --git a/tracingganttchart/src/TracingGanttChartPanel.tsx b/tracingganttchart/src/TracingGanttChartPanel.tsx index e034b4e81..68a744b3e 100644 --- a/tracingganttchart/src/TracingGanttChartPanel.tsx +++ b/tracingganttchart/src/TracingGanttChartPanel.tsx @@ -11,11 +11,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { PanelProps } from '@perses-dev/plugin-system'; -import { NoDataOverlay, TextOverlay, useChartsTheme } from '@perses-dev/components'; import { Box } from '@mui/material'; -import { ReactElement } from 'react'; +import { NoDataOverlay, TextOverlay, useChartsTheme } from '@perses-dev/components'; +import { PanelProps } from '@perses-dev/plugin-system'; import { TraceData } from '@perses-dev/spec'; +import { ReactElement } from 'react'; + import { CustomLinks, TracingGanttChartOptions } from './gantt-chart-model'; import { TracingGanttChart } from './TracingGanttChart/TracingGanttChart'; diff --git a/tracingganttchart/src/getPluginModule.ts b/tracingganttchart/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/tracingganttchart/src/getPluginModule.ts +++ b/tracingganttchart/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/tracingganttchart/src/test/traces/async_jaeger.json b/tracingganttchart/src/test/traces/async_jaeger.json index 9ea798e5e..a44273773 100644 --- a/tracingganttchart/src/test/traces/async_jaeger.json +++ b/tracingganttchart/src/test/traces/async_jaeger.json @@ -1,755 +1,684 @@ { - "traceID":"7d73f3ae841bf59a74cf5b52a328cfca", - "spans":[ - { - "traceID":"7d73f3ae841bf59a74cf5b52a328cfca", - "spanID":"b93f60c81f2a4ce0", - "operationName":"script", - "references":[ - - ], - "startTime":1729001599633602, - "duration":3, - "tags":[ - { - "key":"span.kind", - "type":"string", - "value":"client" - } - ], - "logs":[ - - ], - "processID":"p1", - "warnings":[ - - ], - "process":{ - "serviceName":"hermes", - "tags":[ - { - "key":"otel.library.name", - "type":"string", - "value":"hermes_client" - }, - { - "key":"telemetry.sdk.language", - "type":"string", - "value":"cpp" - }, - { - "key":"telemetry.sdk.name", - "type":"string", - "value":"opentelemetry" - }, - { - "key":"telemetry.sdk.version", - "type":"string", - "value":"1.12.0" - } - ] + "traceID": "7d73f3ae841bf59a74cf5b52a328cfca", + "spans": [ + { + "traceID": "7d73f3ae841bf59a74cf5b52a328cfca", + "spanID": "b93f60c81f2a4ce0", + "operationName": "script", + "references": [], + "startTime": 1729001599633602, + "duration": 3, + "tags": [ + { + "key": "span.kind", + "type": "string", + "value": "client" + } + ], + "logs": [], + "processID": "p1", + "warnings": [], + "process": { + "serviceName": "hermes", + "tags": [ + { + "key": "otel.library.name", + "type": "string", + "value": "hermes_client" }, - "relativeStartTime":0, - "depth":0, - "hasChildren":true, - "childSpanIds":[ - "4653459b582b47cb", - "8a83db29894c10c4", - "0bd40fdf749d38af", - "5b6c5367c8f55a07" - ] - }, - { - "traceID":"7d73f3ae841bf59a74cf5b52a328cfca", - "spanID":"5b6c5367c8f55a07", - "operationName":"post1", - "references":[ - { - "refType":"CHILD_OF", - "traceID":"7d73f3ae841bf59a74cf5b52a328cfca", - "spanID":"b93f60c81f2a4ce0", - "span":{ - "traceID":"7d73f3ae841bf59a74cf5b52a328cfca", - "spanID":"b93f60c81f2a4ce0", - "operationName":"script", - "references":[ - - ], - "startTime":1729001599633602, - "duration":3, - "tags":[ - { - "key":"span.kind", - "type":"string", - "value":"client" - } - ], - "logs":[ - - ], - "processID":"p1", - "warnings":[ - - ], - "process":{ - "serviceName":"hermes", - "tags":[ - { - "key":"otel.library.name", - "type":"string", - "value":"hermes_client" - }, - { - "key":"telemetry.sdk.language", - "type":"string", - "value":"cpp" - }, - { - "key":"telemetry.sdk.name", - "type":"string", - "value":"opentelemetry" - }, - { - "key":"telemetry.sdk.version", - "type":"string", - "value":"1.12.0" - } - ] - }, - "relativeStartTime":0, - "depth":0, - "hasChildren":true, - "childSpanIds":[ - "4653459b582b47cb", - "8a83db29894c10c4", - "0bd40fdf749d38af", - "5b6c5367c8f55a07" - ] - } - } - ], - "startTime":1729001599633651, - "duration":3081, - "tags":[ - { - "key":"http.request.method", - "type":"string", - "value":"POST" - }, - { - "key":"http.response.status_code", - "type":"int64", - "value":200 - }, - { - "key":"otel.status_code", - "type":"string", - "value":"OK" - }, - { - "key":"span.kind", - "type":"string", - "value":"client" - }, - { - "key":"url.full", - "type":"string", - "value":"http://server-mock:8080/url/example/path/id-24" - } - ], - "logs":[ - { - "timestamp":1729001599633766, - "fields":[ - { - "key":"event", - "type":"string", - "value":"Request sent" - } - ] - }, - { - "timestamp":1729001599636650, - "fields":[ - { - "key":"event", - "type":"string", - "value":"Response received" - } - ] - }, - { - "timestamp":1729001599636673, - "fields":[ - { - "key":"event", - "type":"string", - "value":"Body received" - } - ] - } - ], - "processID":"p1", - "warnings":[ - - ], - "process":{ - "serviceName":"hermes", - "tags":[ + { + "key": "telemetry.sdk.language", + "type": "string", + "value": "cpp" + }, + { + "key": "telemetry.sdk.name", + "type": "string", + "value": "opentelemetry" + }, + { + "key": "telemetry.sdk.version", + "type": "string", + "value": "1.12.0" + } + ] + }, + "relativeStartTime": 0, + "depth": 0, + "hasChildren": true, + "childSpanIds": ["4653459b582b47cb", "8a83db29894c10c4", "0bd40fdf749d38af", "5b6c5367c8f55a07"] + }, + { + "traceID": "7d73f3ae841bf59a74cf5b52a328cfca", + "spanID": "5b6c5367c8f55a07", + "operationName": "post1", + "references": [ + { + "refType": "CHILD_OF", + "traceID": "7d73f3ae841bf59a74cf5b52a328cfca", + "spanID": "b93f60c81f2a4ce0", + "span": { + "traceID": "7d73f3ae841bf59a74cf5b52a328cfca", + "spanID": "b93f60c81f2a4ce0", + "operationName": "script", + "references": [], + "startTime": 1729001599633602, + "duration": 3, + "tags": [ + { + "key": "span.kind", + "type": "string", + "value": "client" + } + ], + "logs": [], + "processID": "p1", + "warnings": [], + "process": { + "serviceName": "hermes", + "tags": [ { - "key":"otel.library.name", - "type":"string", - "value":"hermes_client" + "key": "otel.library.name", + "type": "string", + "value": "hermes_client" }, { - "key":"telemetry.sdk.language", - "type":"string", - "value":"cpp" + "key": "telemetry.sdk.language", + "type": "string", + "value": "cpp" }, { - "key":"telemetry.sdk.name", - "type":"string", - "value":"opentelemetry" + "key": "telemetry.sdk.name", + "type": "string", + "value": "opentelemetry" }, { - "key":"telemetry.sdk.version", - "type":"string", - "value":"1.12.0" + "key": "telemetry.sdk.version", + "type": "string", + "value": "1.12.0" } - ] - }, - "relativeStartTime":49, - "depth":1, - "hasChildren":false, - "childSpanIds":[ - + ] + }, + "relativeStartTime": 0, + "depth": 0, + "hasChildren": true, + "childSpanIds": ["4653459b582b47cb", "8a83db29894c10c4", "0bd40fdf749d38af", "5b6c5367c8f55a07"] + } + } + ], + "startTime": 1729001599633651, + "duration": 3081, + "tags": [ + { + "key": "http.request.method", + "type": "string", + "value": "POST" + }, + { + "key": "http.response.status_code", + "type": "int64", + "value": 200 + }, + { + "key": "otel.status_code", + "type": "string", + "value": "OK" + }, + { + "key": "span.kind", + "type": "string", + "value": "client" + }, + { + "key": "url.full", + "type": "string", + "value": "http://server-mock:8080/url/example/path/id-24" + } + ], + "logs": [ + { + "timestamp": 1729001599633766, + "fields": [ + { + "key": "event", + "type": "string", + "value": "Request sent" + } ] - }, - { - "traceID":"7d73f3ae841bf59a74cf5b52a328cfca", - "spanID":"0bd40fdf749d38af", - "operationName":"get1", - "references":[ - { - "refType":"CHILD_OF", - "traceID":"7d73f3ae841bf59a74cf5b52a328cfca", - "spanID":"b93f60c81f2a4ce0", - "span":{ - "traceID":"7d73f3ae841bf59a74cf5b52a328cfca", - "spanID":"b93f60c81f2a4ce0", - "operationName":"script", - "references":[ - - ], - "startTime":1729001599633602, - "duration":3, - "tags":[ - { - "key":"span.kind", - "type":"string", - "value":"client" - } - ], - "logs":[ - - ], - "processID":"p1", - "warnings":[ - - ], - "process":{ - "serviceName":"hermes", - "tags":[ - { - "key":"otel.library.name", - "type":"string", - "value":"hermes_client" - }, - { - "key":"telemetry.sdk.language", - "type":"string", - "value":"cpp" - }, - { - "key":"telemetry.sdk.name", - "type":"string", - "value":"opentelemetry" - }, - { - "key":"telemetry.sdk.version", - "type":"string", - "value":"1.12.0" - } - ] - }, - "relativeStartTime":0, - "depth":0, - "hasChildren":true, - "childSpanIds":[ - "4653459b582b47cb", - "8a83db29894c10c4", - "0bd40fdf749d38af", - "5b6c5367c8f55a07" - ] - } - } - ], - "startTime":1729001599733700, - "duration":2719, - "tags":[ - { - "key":"http.request.method", - "type":"string", - "value":"GET" - }, - { - "key":"http.response.status_code", - "type":"int64", - "value":200 - }, - { - "key":"otel.status_code", - "type":"string", - "value":"OK" - }, - { - "key":"span.kind", - "type":"string", - "value":"client" - }, - { - "key":"url.full", - "type":"string", - "value":"http://server-mock:8080/url/example/path?id=id-24" - } - ], - "logs":[ - { - "timestamp":1729001599733877, - "fields":[ - { - "key":"event", - "type":"string", - "value":"Request sent" - } - ] - }, - { - "timestamp":1729001599736343, - "fields":[ - { - "key":"event", - "type":"string", - "value":"Response received" - } - ] - }, - { - "timestamp":1729001599736364, - "fields":[ - { - "key":"event", - "type":"string", - "value":"Body received" - } - ] - } - ], - "processID":"p1", - "warnings":[ - - ], - "process":{ - "serviceName":"hermes", - "tags":[ + }, + { + "timestamp": 1729001599636650, + "fields": [ + { + "key": "event", + "type": "string", + "value": "Response received" + } + ] + }, + { + "timestamp": 1729001599636673, + "fields": [ + { + "key": "event", + "type": "string", + "value": "Body received" + } + ] + } + ], + "processID": "p1", + "warnings": [], + "process": { + "serviceName": "hermes", + "tags": [ + { + "key": "otel.library.name", + "type": "string", + "value": "hermes_client" + }, + { + "key": "telemetry.sdk.language", + "type": "string", + "value": "cpp" + }, + { + "key": "telemetry.sdk.name", + "type": "string", + "value": "opentelemetry" + }, + { + "key": "telemetry.sdk.version", + "type": "string", + "value": "1.12.0" + } + ] + }, + "relativeStartTime": 49, + "depth": 1, + "hasChildren": false, + "childSpanIds": [] + }, + { + "traceID": "7d73f3ae841bf59a74cf5b52a328cfca", + "spanID": "0bd40fdf749d38af", + "operationName": "get1", + "references": [ + { + "refType": "CHILD_OF", + "traceID": "7d73f3ae841bf59a74cf5b52a328cfca", + "spanID": "b93f60c81f2a4ce0", + "span": { + "traceID": "7d73f3ae841bf59a74cf5b52a328cfca", + "spanID": "b93f60c81f2a4ce0", + "operationName": "script", + "references": [], + "startTime": 1729001599633602, + "duration": 3, + "tags": [ + { + "key": "span.kind", + "type": "string", + "value": "client" + } + ], + "logs": [], + "processID": "p1", + "warnings": [], + "process": { + "serviceName": "hermes", + "tags": [ { - "key":"otel.library.name", - "type":"string", - "value":"hermes_client" + "key": "otel.library.name", + "type": "string", + "value": "hermes_client" }, { - "key":"telemetry.sdk.language", - "type":"string", - "value":"cpp" + "key": "telemetry.sdk.language", + "type": "string", + "value": "cpp" }, { - "key":"telemetry.sdk.name", - "type":"string", - "value":"opentelemetry" + "key": "telemetry.sdk.name", + "type": "string", + "value": "opentelemetry" }, { - "key":"telemetry.sdk.version", - "type":"string", - "value":"1.12.0" + "key": "telemetry.sdk.version", + "type": "string", + "value": "1.12.0" } - ] - }, - "relativeStartTime":100098, - "depth":1, - "hasChildren":false, - "childSpanIds":[ - + ] + }, + "relativeStartTime": 0, + "depth": 0, + "hasChildren": true, + "childSpanIds": ["4653459b582b47cb", "8a83db29894c10c4", "0bd40fdf749d38af", "5b6c5367c8f55a07"] + } + } + ], + "startTime": 1729001599733700, + "duration": 2719, + "tags": [ + { + "key": "http.request.method", + "type": "string", + "value": "GET" + }, + { + "key": "http.response.status_code", + "type": "int64", + "value": 200 + }, + { + "key": "otel.status_code", + "type": "string", + "value": "OK" + }, + { + "key": "span.kind", + "type": "string", + "value": "client" + }, + { + "key": "url.full", + "type": "string", + "value": "http://server-mock:8080/url/example/path?id=id-24" + } + ], + "logs": [ + { + "timestamp": 1729001599733877, + "fields": [ + { + "key": "event", + "type": "string", + "value": "Request sent" + } ] - }, - { - "traceID":"7d73f3ae841bf59a74cf5b52a328cfca", - "spanID":"8a83db29894c10c4", - "operationName":"put1", - "references":[ - { - "refType":"CHILD_OF", - "traceID":"7d73f3ae841bf59a74cf5b52a328cfca", - "spanID":"b93f60c81f2a4ce0", - "span":{ - "traceID":"7d73f3ae841bf59a74cf5b52a328cfca", - "spanID":"b93f60c81f2a4ce0", - "operationName":"script", - "references":[ - - ], - "startTime":1729001599633602, - "duration":3, - "tags":[ - { - "key":"span.kind", - "type":"string", - "value":"client" - } - ], - "logs":[ - - ], - "processID":"p1", - "warnings":[ - - ], - "process":{ - "serviceName":"hermes", - "tags":[ - { - "key":"otel.library.name", - "type":"string", - "value":"hermes_client" - }, - { - "key":"telemetry.sdk.language", - "type":"string", - "value":"cpp" - }, - { - "key":"telemetry.sdk.name", - "type":"string", - "value":"opentelemetry" - }, - { - "key":"telemetry.sdk.version", - "type":"string", - "value":"1.12.0" - } - ] - }, - "relativeStartTime":0, - "depth":0, - "hasChildren":true, - "childSpanIds":[ - "4653459b582b47cb", - "8a83db29894c10c4", - "0bd40fdf749d38af", - "5b6c5367c8f55a07" - ] - } - } - ], - "startTime":1729001599833654, - "duration":2803, - "tags":[ - { - "key":"http.request.method", - "type":"string", - "value":"PUT" - }, - { - "key":"http.response.status_code", - "type":"int64", - "value":200 - }, - { - "key":"otel.status_code", - "type":"string", - "value":"OK" - }, - { - "key":"span.kind", - "type":"string", - "value":"client" - }, - { - "key":"url.full", - "type":"string", - "value":"http://server-mock:8080/url/example/path/id-24" - } - ], - "logs":[ - { - "timestamp":1729001599833794, - "fields":[ - { - "key":"event", - "type":"string", - "value":"Request sent" - } - ] - }, - { - "timestamp":1729001599836396, - "fields":[ - { - "key":"event", - "type":"string", - "value":"Response received" - } - ] - }, - { - "timestamp":1729001599836408, - "fields":[ - { - "key":"event", - "type":"string", - "value":"Body received" - } - ] - } - ], - "processID":"p1", - "warnings":[ - - ], - "process":{ - "serviceName":"hermes", - "tags":[ + }, + { + "timestamp": 1729001599736343, + "fields": [ + { + "key": "event", + "type": "string", + "value": "Response received" + } + ] + }, + { + "timestamp": 1729001599736364, + "fields": [ + { + "key": "event", + "type": "string", + "value": "Body received" + } + ] + } + ], + "processID": "p1", + "warnings": [], + "process": { + "serviceName": "hermes", + "tags": [ + { + "key": "otel.library.name", + "type": "string", + "value": "hermes_client" + }, + { + "key": "telemetry.sdk.language", + "type": "string", + "value": "cpp" + }, + { + "key": "telemetry.sdk.name", + "type": "string", + "value": "opentelemetry" + }, + { + "key": "telemetry.sdk.version", + "type": "string", + "value": "1.12.0" + } + ] + }, + "relativeStartTime": 100098, + "depth": 1, + "hasChildren": false, + "childSpanIds": [] + }, + { + "traceID": "7d73f3ae841bf59a74cf5b52a328cfca", + "spanID": "8a83db29894c10c4", + "operationName": "put1", + "references": [ + { + "refType": "CHILD_OF", + "traceID": "7d73f3ae841bf59a74cf5b52a328cfca", + "spanID": "b93f60c81f2a4ce0", + "span": { + "traceID": "7d73f3ae841bf59a74cf5b52a328cfca", + "spanID": "b93f60c81f2a4ce0", + "operationName": "script", + "references": [], + "startTime": 1729001599633602, + "duration": 3, + "tags": [ + { + "key": "span.kind", + "type": "string", + "value": "client" + } + ], + "logs": [], + "processID": "p1", + "warnings": [], + "process": { + "serviceName": "hermes", + "tags": [ { - "key":"otel.library.name", - "type":"string", - "value":"hermes_client" + "key": "otel.library.name", + "type": "string", + "value": "hermes_client" }, { - "key":"telemetry.sdk.language", - "type":"string", - "value":"cpp" + "key": "telemetry.sdk.language", + "type": "string", + "value": "cpp" }, { - "key":"telemetry.sdk.name", - "type":"string", - "value":"opentelemetry" + "key": "telemetry.sdk.name", + "type": "string", + "value": "opentelemetry" }, { - "key":"telemetry.sdk.version", - "type":"string", - "value":"1.12.0" + "key": "telemetry.sdk.version", + "type": "string", + "value": "1.12.0" } - ] - }, - "relativeStartTime":200052, - "depth":1, - "hasChildren":false, - "childSpanIds":[ - + ] + }, + "relativeStartTime": 0, + "depth": 0, + "hasChildren": true, + "childSpanIds": ["4653459b582b47cb", "8a83db29894c10c4", "0bd40fdf749d38af", "5b6c5367c8f55a07"] + } + } + ], + "startTime": 1729001599833654, + "duration": 2803, + "tags": [ + { + "key": "http.request.method", + "type": "string", + "value": "PUT" + }, + { + "key": "http.response.status_code", + "type": "int64", + "value": 200 + }, + { + "key": "otel.status_code", + "type": "string", + "value": "OK" + }, + { + "key": "span.kind", + "type": "string", + "value": "client" + }, + { + "key": "url.full", + "type": "string", + "value": "http://server-mock:8080/url/example/path/id-24" + } + ], + "logs": [ + { + "timestamp": 1729001599833794, + "fields": [ + { + "key": "event", + "type": "string", + "value": "Request sent" + } ] - }, - { - "traceID":"7d73f3ae841bf59a74cf5b52a328cfca", - "spanID":"4653459b582b47cb", - "operationName":"delete1", - "references":[ - { - "refType":"CHILD_OF", - "traceID":"7d73f3ae841bf59a74cf5b52a328cfca", - "spanID":"b93f60c81f2a4ce0", - "span":{ - "traceID":"7d73f3ae841bf59a74cf5b52a328cfca", - "spanID":"b93f60c81f2a4ce0", - "operationName":"script", - "references":[ - - ], - "startTime":1729001599633602, - "duration":3, - "tags":[ - { - "key":"span.kind", - "type":"string", - "value":"client" - } - ], - "logs":[ - - ], - "processID":"p1", - "warnings":[ - - ], - "process":{ - "serviceName":"hermes", - "tags":[ - { - "key":"otel.library.name", - "type":"string", - "value":"hermes_client" - }, - { - "key":"telemetry.sdk.language", - "type":"string", - "value":"cpp" - }, - { - "key":"telemetry.sdk.name", - "type":"string", - "value":"opentelemetry" - }, - { - "key":"telemetry.sdk.version", - "type":"string", - "value":"1.12.0" - } - ] - }, - "relativeStartTime":0, - "depth":0, - "hasChildren":true, - "childSpanIds":[ - "4653459b582b47cb", - "8a83db29894c10c4", - "0bd40fdf749d38af", - "5b6c5367c8f55a07" - ] - } - } - ], - "startTime":1729001599944592, - "duration":20156, - "tags":[ - { - "key":"http.request.method", - "type":"string", - "value":"DELETE" - }, - { - "key":"http.response.status_code", - "type":"int64", - "value":200 - }, - { - "key":"otel.status_code", - "type":"string", - "value":"OK" - }, - { - "key":"span.kind", - "type":"string", - "value":"client" - }, - { - "key":"url.full", - "type":"string", - "value":"http://server-mock:8080/url/example/path/id-24" - } - ], - "logs":[ - { - "timestamp":1729001599944786, - "fields":[ - { - "key":"event", - "type":"string", - "value":"Request sent" - } - ] - }, - { - "timestamp":1729001599964619, - "fields":[ - { - "key":"event", - "type":"string", - "value":"Response received" - } - ] - }, - { - "timestamp":1729001599964650, - "fields":[ - { - "key":"event", - "type":"string", - "value":"Body received" - } - ] - } - ], - "processID":"p1", - "warnings":[ - - ], - "process":{ - "serviceName":"hermes", - "tags":[ + }, + { + "timestamp": 1729001599836396, + "fields": [ + { + "key": "event", + "type": "string", + "value": "Response received" + } + ] + }, + { + "timestamp": 1729001599836408, + "fields": [ + { + "key": "event", + "type": "string", + "value": "Body received" + } + ] + } + ], + "processID": "p1", + "warnings": [], + "process": { + "serviceName": "hermes", + "tags": [ + { + "key": "otel.library.name", + "type": "string", + "value": "hermes_client" + }, + { + "key": "telemetry.sdk.language", + "type": "string", + "value": "cpp" + }, + { + "key": "telemetry.sdk.name", + "type": "string", + "value": "opentelemetry" + }, + { + "key": "telemetry.sdk.version", + "type": "string", + "value": "1.12.0" + } + ] + }, + "relativeStartTime": 200052, + "depth": 1, + "hasChildren": false, + "childSpanIds": [] + }, + { + "traceID": "7d73f3ae841bf59a74cf5b52a328cfca", + "spanID": "4653459b582b47cb", + "operationName": "delete1", + "references": [ + { + "refType": "CHILD_OF", + "traceID": "7d73f3ae841bf59a74cf5b52a328cfca", + "spanID": "b93f60c81f2a4ce0", + "span": { + "traceID": "7d73f3ae841bf59a74cf5b52a328cfca", + "spanID": "b93f60c81f2a4ce0", + "operationName": "script", + "references": [], + "startTime": 1729001599633602, + "duration": 3, + "tags": [ + { + "key": "span.kind", + "type": "string", + "value": "client" + } + ], + "logs": [], + "processID": "p1", + "warnings": [], + "process": { + "serviceName": "hermes", + "tags": [ { - "key":"otel.library.name", - "type":"string", - "value":"hermes_client" + "key": "otel.library.name", + "type": "string", + "value": "hermes_client" }, { - "key":"telemetry.sdk.language", - "type":"string", - "value":"cpp" + "key": "telemetry.sdk.language", + "type": "string", + "value": "cpp" }, { - "key":"telemetry.sdk.name", - "type":"string", - "value":"opentelemetry" + "key": "telemetry.sdk.name", + "type": "string", + "value": "opentelemetry" }, { - "key":"telemetry.sdk.version", - "type":"string", - "value":"1.12.0" + "key": "telemetry.sdk.version", + "type": "string", + "value": "1.12.0" } - ] - }, - "relativeStartTime":310990, - "depth":1, - "hasChildren":false, - "childSpanIds":[ - + ] + }, + "relativeStartTime": 0, + "depth": 0, + "hasChildren": true, + "childSpanIds": ["4653459b582b47cb", "8a83db29894c10c4", "0bd40fdf749d38af", "5b6c5367c8f55a07"] + } + } + ], + "startTime": 1729001599944592, + "duration": 20156, + "tags": [ + { + "key": "http.request.method", + "type": "string", + "value": "DELETE" + }, + { + "key": "http.response.status_code", + "type": "int64", + "value": 200 + }, + { + "key": "otel.status_code", + "type": "string", + "value": "OK" + }, + { + "key": "span.kind", + "type": "string", + "value": "client" + }, + { + "key": "url.full", + "type": "string", + "value": "http://server-mock:8080/url/example/path/id-24" + } + ], + "logs": [ + { + "timestamp": 1729001599944786, + "fields": [ + { + "key": "event", + "type": "string", + "value": "Request sent" + } ] - } - ], - "processes":{ - "p1":{ - "serviceName":"hermes", - "tags":[ - { - "key":"otel.library.name", - "type":"string", - "value":"hermes_client" - }, - { - "key":"telemetry.sdk.language", - "type":"string", - "value":"cpp" - }, - { - "key":"telemetry.sdk.name", - "type":"string", - "value":"opentelemetry" - }, - { - "key":"telemetry.sdk.version", - "type":"string", - "value":"1.12.0" - } + }, + { + "timestamp": 1729001599964619, + "fields": [ + { + "key": "event", + "type": "string", + "value": "Response received" + } ] - } - }, - "warnings":null - } + }, + { + "timestamp": 1729001599964650, + "fields": [ + { + "key": "event", + "type": "string", + "value": "Body received" + } + ] + } + ], + "processID": "p1", + "warnings": [], + "process": { + "serviceName": "hermes", + "tags": [ + { + "key": "otel.library.name", + "type": "string", + "value": "hermes_client" + }, + { + "key": "telemetry.sdk.language", + "type": "string", + "value": "cpp" + }, + { + "key": "telemetry.sdk.name", + "type": "string", + "value": "opentelemetry" + }, + { + "key": "telemetry.sdk.version", + "type": "string", + "value": "1.12.0" + } + ] + }, + "relativeStartTime": 310990, + "depth": 1, + "hasChildren": false, + "childSpanIds": [] + } + ], + "processes": { + "p1": { + "serviceName": "hermes", + "tags": [ + { + "key": "otel.library.name", + "type": "string", + "value": "hermes_client" + }, + { + "key": "telemetry.sdk.language", + "type": "string", + "value": "cpp" + }, + { + "key": "telemetry.sdk.name", + "type": "string", + "value": "opentelemetry" + }, + { + "key": "telemetry.sdk.version", + "type": "string", + "value": "1.12.0" + } + ] + } + }, + "warnings": null +} diff --git a/tracingganttchart/src/test/traces/authenticate_error_jaeger.json b/tracingganttchart/src/test/traces/authenticate_error_jaeger.json index b8ec80d52..e256b32b5 100644 --- a/tracingganttchart/src/test/traces/authenticate_error_jaeger.json +++ b/tracingganttchart/src/test/traces/authenticate_error_jaeger.json @@ -1,629 +1,629 @@ { - "data": [ + "data": [ + { + "traceID": "1dbb08e65f2d951d7d092bcc45e2364f", + "spans": [ { - "traceID": "1dbb08e65f2d951d7d092bcc45e2364f", - "spans": [ + "traceID": "1dbb08e65f2d951d7d092bcc45e2364f", + "spanID": "443992792095ddd1", + "operationName": "get-inventory", + "references": [], + "startTime": 1744817139545250, + "duration": 732529, + "tags": [ + { + "key": "http.flavor", + "type": "string", + "value": "1.1" + }, + { + "key": "http.method", + "type": "string", + "value": "POST" + }, + { + "key": "http.request_content_length", + "type": "int64", + "value": 38146 + }, + { + "key": "http.response.header.content-type", + "type": "string", + "value": "[\"text/plain\"]" + }, + { + "key": "http.response_content_length", + "type": "int64", + "value": 628631 + }, + { + "key": "http.scheme", + "type": "string", + "value": "https" + }, + { + "key": "http.status_code", + "type": "int64", + "value": 403 + }, + { + "key": "http.target", + "type": "string", + "value": "/get-inventory" + }, + { + "key": "http.url", + "type": "string", + "value": "https://shop-backend.local:8923/get-inventory" + }, + { + "key": "k6.NiWmVaWJbQFvxRm", + "type": "string", + "value": "yMbfLBYg7NSPS2wKKSpTpa94RdRreJ" + }, + { + "key": "k6.x43leDoDD1jBklm", + "type": "string", + "value": "IXSKq8CfyPi39sqjQg4LF7mtzmG7DO" + }, + { + "key": "net.host.name", + "type": "string", + "value": "shop-backend.local" + }, + { + "key": "net.host.port", + "type": "int64", + "value": 8923 + }, + { + "key": "net.sock.family", + "type": "string", + "value": "inet" + }, + { + "key": "net.sock.host.addr", + "type": "string", + "value": "192.168.222.186" + }, + { + "key": "net.transport", + "type": "string", + "value": "ip_tcp" + }, + { + "key": "one", + "type": "string", + "value": "three" + }, + { + "key": "otel.scope.name", + "type": "string", + "value": "k6" + }, + { + "key": "span.kind", + "type": "string", + "value": "server" + } + ], + "logs": [ + { + "timestamp": 1744817140239737, + "fields": [ + { + "key": "event", + "type": "string", + "value": "exception" + }, + { + "key": "exception.escape", + "type": "bool", + "value": false + }, + { + "key": "exception.message", + "type": "string", + "value": "error: k6.6XeI3oO9MPbEZDfHG5kB" + }, + { + "key": "exception.stacktrace", + "type": "string", + "value": "panic: runtime error: can't divide by 0\npayment.collect()" + }, + { + "key": "exception.type", + "type": "string", + "value": "error.type_k6.V6CRNrmIaj" + }, + { + "key": "k6.AFF9lt9TolyUhoT", + "type": "string", + "value": "6ta36Dy5vyFkJIOkHoEnsbt56X0AM6" + }, + { + "key": "k6.WAmGYs15FvKL8rn", + "type": "string", + "value": "4VwKtwuj6mVV5fLjc9GbvpjZmfehUS" + }, + { + "key": "k6.X5oNsNbwsavliRv", + "type": "string", + "value": "cGfrNF0wvEg9VkdrGdaoOI9JQLugt0" + }, + { + "key": "k6.lXD5EmurzieCcfI", + "type": "string", + "value": "2Sn80mG3W8n9mIyCC2hxnevxixxMSH" + }, + { + "key": "k6.q5W5pyx3QiobhrM", + "type": "string", + "value": "H6xPDzIYBWnlMjDt1OUKQxv1WXgmFM" + }, + { + "key": "k6.vJMnC6LuLPhwSR0", + "type": "string", + "value": "b1UAJsi2SG0ZX45MdF17aV4hR0t2An" + } + ] + } + ], + "processID": "p1", + "warnings": null + }, + { + "traceID": "1dbb08e65f2d951d7d092bcc45e2364f", + "spanID": "5119a61959f64c4b", + "operationName": "authenticate", + "references": [ + { + "refType": "CHILD_OF", + "traceID": "1dbb08e65f2d951d7d092bcc45e2364f", + "spanID": "443992792095ddd1" + } + ], + "startTime": 1744817139584814, + "duration": 492035, + "tags": [ + { + "key": "error", + "type": "bool", + "value": true + }, + { + "key": "http.flavor", + "type": "string", + "value": "1.1" + }, + { + "key": "http.method", + "type": "string", + "value": "GET" + }, + { + "key": "http.request.header.accept", + "type": "string", + "value": "[\"application/json\"]" + }, + { + "key": "http.response_content_length", + "type": "int64", + "value": 259572 + }, + { + "key": "http.status_code", + "type": "int64", + "value": 403 + }, + { + "key": "http.url", + "type": "string", + "value": "https://auth-service.local:8233/authenticate" + }, + { + "key": "k6.NiWmVaWJbQFvxRm", + "type": "string", + "value": "yMbfLBYg7NSPS2wKKSpTpa94RdRreJ" + }, + { + "key": "k6.x43leDoDD1jBklm", + "type": "string", + "value": "IXSKq8CfyPi39sqjQg4LF7mtzmG7DO" + }, + { + "key": "net.peer.name", + "type": "string", + "value": "auth-service.local" + }, + { + "key": "net.peer.port", + "type": "int64", + "value": 8891 + }, + { + "key": "net.sock.family", + "type": "string", + "value": "inet" + }, + { + "key": "net.sock.peer.addr", + "type": "string", + "value": "192.168.239.110" + }, + { + "key": "net.transport", + "type": "string", + "value": "ip_tcp" + }, + { + "key": "one", + "type": "string", + "value": "three" + }, + { + "key": "otel.scope.name", + "type": "string", + "value": "k6" + }, + { + "key": "otel.status_code", + "type": "string", + "value": "ERROR" + }, + { + "key": "otel.status_description", + "type": "string", + "value": "Forbidden" + }, + { + "key": "span.kind", + "type": "string", + "value": "client" + } + ], + "logs": [], + "processID": "p1", + "warnings": null + }, + { + "traceID": "1dbb08e65f2d951d7d092bcc45e2364f", + "spanID": "9aa2b72a65bee63b", + "operationName": "authenticate", + "references": [ + { + "refType": "CHILD_OF", + "traceID": "1dbb08e65f2d951d7d092bcc45e2364f", + "spanID": "5119a61959f64c4b" + } + ], + "startTime": 1744817139615856, + "duration": 333141, + "tags": [ + { + "key": "http.flavor", + "type": "string", + "value": "1.1" + }, + { + "key": "http.method", + "type": "string", + "value": "GET" + }, + { + "key": "http.response.header.content-type", + "type": "string", + "value": "[\"application/json\"]" + }, + { + "key": "http.response_content_length", + "type": "int64", + "value": 259572 + }, + { + "key": "http.scheme", + "type": "string", + "value": "https" + }, + { + "key": "http.status_code", + "type": "int64", + "value": 403 + }, + { + "key": "http.target", + "type": "string", + "value": "/authenticate" + }, + { + "key": "http.url", + "type": "string", + "value": "https://auth-service.local:8233/authenticate" + }, + { + "key": "k6.NiWmVaWJbQFvxRm", + "type": "string", + "value": "yMbfLBYg7NSPS2wKKSpTpa94RdRreJ" + }, + { + "key": "k6.x43leDoDD1jBklm", + "type": "string", + "value": "IXSKq8CfyPi39sqjQg4LF7mtzmG7DO" + }, + { + "key": "net.host.name", + "type": "string", + "value": "auth-service.local" + }, + { + "key": "net.host.port", + "type": "int64", + "value": 8233 + }, + { + "key": "net.sock.family", + "type": "string", + "value": "inet" + }, + { + "key": "net.sock.host.addr", + "type": "string", + "value": "192.168.239.110" + }, + { + "key": "net.transport", + "type": "string", + "value": "ip_tcp" + }, + { + "key": "one", + "type": "string", + "value": "three" + }, + { + "key": "otel.scope.name", + "type": "string", + "value": "k6" + }, + { + "key": "span.kind", + "type": "string", + "value": "server" + } + ], + "logs": [ + { + "timestamp": 1744817139789721, + "fields": [ + { + "key": "event", + "type": "string", + "value": "exception" + }, + { + "key": "exception.escape", + "type": "bool", + "value": false + }, + { + "key": "exception.message", + "type": "string", + "value": "error: k6.3Q3VR93FSppHK8bvvOKS" + }, + { + "key": "exception.stacktrace", + "type": "string", + "value": "panic: runtime error: can't divide by 0\naccount.login()" + }, + { + "key": "exception.type", + "type": "string", + "value": "error.type_k6.up7wyR970H" + }, + { + "key": "k6.CA9ruAp9oOWD62o", + "type": "string", + "value": "NvjAY6KgX1HPLkzLcRN9MSwcmDVGrc" + }, + { + "key": "k6.aIUepzjHTVxZysu", + "type": "string", + "value": "TDYxLuPe19D6vx2XqB99eEGmIa8AAf" + }, { - "traceID": "1dbb08e65f2d951d7d092bcc45e2364f", - "spanID": "443992792095ddd1", - "operationName": "get-inventory", - "references": [], - "startTime": 1744817139545250, - "duration": 732529, - "tags": [ - { - "key": "http.flavor", - "type": "string", - "value": "1.1" - }, - { - "key": "http.method", - "type": "string", - "value": "POST" - }, - { - "key": "http.request_content_length", - "type": "int64", - "value": 38146 - }, - { - "key": "http.response.header.content-type", - "type": "string", - "value": "[\"text/plain\"]" - }, - { - "key": "http.response_content_length", - "type": "int64", - "value": 628631 - }, - { - "key": "http.scheme", - "type": "string", - "value": "https" - }, - { - "key": "http.status_code", - "type": "int64", - "value": 403 - }, - { - "key": "http.target", - "type": "string", - "value": "/get-inventory" - }, - { - "key": "http.url", - "type": "string", - "value": "https://shop-backend.local:8923/get-inventory" - }, - { - "key": "k6.NiWmVaWJbQFvxRm", - "type": "string", - "value": "yMbfLBYg7NSPS2wKKSpTpa94RdRreJ" - }, - { - "key": "k6.x43leDoDD1jBklm", - "type": "string", - "value": "IXSKq8CfyPi39sqjQg4LF7mtzmG7DO" - }, - { - "key": "net.host.name", - "type": "string", - "value": "shop-backend.local" - }, - { - "key": "net.host.port", - "type": "int64", - "value": 8923 - }, - { - "key": "net.sock.family", - "type": "string", - "value": "inet" - }, - { - "key": "net.sock.host.addr", - "type": "string", - "value": "192.168.222.186" - }, - { - "key": "net.transport", - "type": "string", - "value": "ip_tcp" - }, - { - "key": "one", - "type": "string", - "value": "three" - }, - { - "key": "otel.scope.name", - "type": "string", - "value": "k6" - }, - { - "key": "span.kind", - "type": "string", - "value": "server" - } - ], - "logs": [ - { - "timestamp": 1744817140239737, - "fields": [ - { - "key": "event", - "type": "string", - "value": "exception" - }, - { - "key": "exception.escape", - "type": "bool", - "value": false - }, - { - "key": "exception.message", - "type": "string", - "value": "error: k6.6XeI3oO9MPbEZDfHG5kB" - }, - { - "key": "exception.stacktrace", - "type": "string", - "value": "panic: runtime error: can't divide by 0\npayment.collect()" - }, - { - "key": "exception.type", - "type": "string", - "value": "error.type_k6.V6CRNrmIaj" - }, - { - "key": "k6.AFF9lt9TolyUhoT", - "type": "string", - "value": "6ta36Dy5vyFkJIOkHoEnsbt56X0AM6" - }, - { - "key": "k6.WAmGYs15FvKL8rn", - "type": "string", - "value": "4VwKtwuj6mVV5fLjc9GbvpjZmfehUS" - }, - { - "key": "k6.X5oNsNbwsavliRv", - "type": "string", - "value": "cGfrNF0wvEg9VkdrGdaoOI9JQLugt0" - }, - { - "key": "k6.lXD5EmurzieCcfI", - "type": "string", - "value": "2Sn80mG3W8n9mIyCC2hxnevxixxMSH" - }, - { - "key": "k6.q5W5pyx3QiobhrM", - "type": "string", - "value": "H6xPDzIYBWnlMjDt1OUKQxv1WXgmFM" - }, - { - "key": "k6.vJMnC6LuLPhwSR0", - "type": "string", - "value": "b1UAJsi2SG0ZX45MdF17aV4hR0t2An" - } - ] - } - ], - "processID": "p1", - "warnings": null + "key": "k6.fqxLpBCUHkrug9D", + "type": "string", + "value": "wkqaKu6Ja2u2QWo5PVRrjI7Wcij4Jg" }, { - "traceID": "1dbb08e65f2d951d7d092bcc45e2364f", - "spanID": "5119a61959f64c4b", - "operationName": "authenticate", - "references": [ - { - "refType": "CHILD_OF", - "traceID": "1dbb08e65f2d951d7d092bcc45e2364f", - "spanID": "443992792095ddd1" - } - ], - "startTime": 1744817139584814, - "duration": 492035, - "tags": [ - { - "key": "error", - "type": "bool", - "value": true - }, - { - "key": "http.flavor", - "type": "string", - "value": "1.1" - }, - { - "key": "http.method", - "type": "string", - "value": "GET" - }, - { - "key": "http.request.header.accept", - "type": "string", - "value": "[\"application/json\"]" - }, - { - "key": "http.response_content_length", - "type": "int64", - "value": 259572 - }, - { - "key": "http.status_code", - "type": "int64", - "value": 403 - }, - { - "key": "http.url", - "type": "string", - "value": "https://auth-service.local:8233/authenticate" - }, - { - "key": "k6.NiWmVaWJbQFvxRm", - "type": "string", - "value": "yMbfLBYg7NSPS2wKKSpTpa94RdRreJ" - }, - { - "key": "k6.x43leDoDD1jBklm", - "type": "string", - "value": "IXSKq8CfyPi39sqjQg4LF7mtzmG7DO" - }, - { - "key": "net.peer.name", - "type": "string", - "value": "auth-service.local" - }, - { - "key": "net.peer.port", - "type": "int64", - "value": 8891 - }, - { - "key": "net.sock.family", - "type": "string", - "value": "inet" - }, - { - "key": "net.sock.peer.addr", - "type": "string", - "value": "192.168.239.110" - }, - { - "key": "net.transport", - "type": "string", - "value": "ip_tcp" - }, - { - "key": "one", - "type": "string", - "value": "three" - }, - { - "key": "otel.scope.name", - "type": "string", - "value": "k6" - }, - { - "key": "otel.status_code", - "type": "string", - "value": "ERROR" - }, - { - "key": "otel.status_description", - "type": "string", - "value": "Forbidden" - }, - { - "key": "span.kind", - "type": "string", - "value": "client" - } - ], - "logs": [], - "processID": "p1", - "warnings": null + "key": "k6.t0fRGurc8O43FqV", + "type": "string", + "value": "J5Fsgp4VKsJotpSn1szNipIDdlm9YE" }, { - "traceID": "1dbb08e65f2d951d7d092bcc45e2364f", - "spanID": "9aa2b72a65bee63b", - "operationName": "authenticate", - "references": [ - { - "refType": "CHILD_OF", - "traceID": "1dbb08e65f2d951d7d092bcc45e2364f", - "spanID": "5119a61959f64c4b" - } - ], - "startTime": 1744817139615856, - "duration": 333141, - "tags": [ - { - "key": "http.flavor", - "type": "string", - "value": "1.1" - }, - { - "key": "http.method", - "type": "string", - "value": "GET" - }, - { - "key": "http.response.header.content-type", - "type": "string", - "value": "[\"application/json\"]" - }, - { - "key": "http.response_content_length", - "type": "int64", - "value": 259572 - }, - { - "key": "http.scheme", - "type": "string", - "value": "https" - }, - { - "key": "http.status_code", - "type": "int64", - "value": 403 - }, - { - "key": "http.target", - "type": "string", - "value": "/authenticate" - }, - { - "key": "http.url", - "type": "string", - "value": "https://auth-service.local:8233/authenticate" - }, - { - "key": "k6.NiWmVaWJbQFvxRm", - "type": "string", - "value": "yMbfLBYg7NSPS2wKKSpTpa94RdRreJ" - }, - { - "key": "k6.x43leDoDD1jBklm", - "type": "string", - "value": "IXSKq8CfyPi39sqjQg4LF7mtzmG7DO" - }, - { - "key": "net.host.name", - "type": "string", - "value": "auth-service.local" - }, - { - "key": "net.host.port", - "type": "int64", - "value": 8233 - }, - { - "key": "net.sock.family", - "type": "string", - "value": "inet" - }, - { - "key": "net.sock.host.addr", - "type": "string", - "value": "192.168.239.110" - }, - { - "key": "net.transport", - "type": "string", - "value": "ip_tcp" - }, - { - "key": "one", - "type": "string", - "value": "three" - }, - { - "key": "otel.scope.name", - "type": "string", - "value": "k6" - }, - { - "key": "span.kind", - "type": "string", - "value": "server" - } - ], - "logs": [ - { - "timestamp": 1744817139789721, - "fields": [ - { - "key": "event", - "type": "string", - "value": "exception" - }, - { - "key": "exception.escape", - "type": "bool", - "value": false - }, - { - "key": "exception.message", - "type": "string", - "value": "error: k6.3Q3VR93FSppHK8bvvOKS" - }, - { - "key": "exception.stacktrace", - "type": "string", - "value": "panic: runtime error: can't divide by 0\naccount.login()" - }, - { - "key": "exception.type", - "type": "string", - "value": "error.type_k6.up7wyR970H" - }, - { - "key": "k6.CA9ruAp9oOWD62o", - "type": "string", - "value": "NvjAY6KgX1HPLkzLcRN9MSwcmDVGrc" - }, - { - "key": "k6.aIUepzjHTVxZysu", - "type": "string", - "value": "TDYxLuPe19D6vx2XqB99eEGmIa8AAf" - }, - { - "key": "k6.fqxLpBCUHkrug9D", - "type": "string", - "value": "wkqaKu6Ja2u2QWo5PVRrjI7Wcij4Jg" - }, - { - "key": "k6.t0fRGurc8O43FqV", - "type": "string", - "value": "J5Fsgp4VKsJotpSn1szNipIDdlm9YE" - }, - { - "key": "k6.zWe8l5JQ2wjwRcv", - "type": "string", - "value": "mnKLtHjOpHOeuCKB8jdoj7uJ6Ud3ur" - } - ] - }, - { - "timestamp": 1744817139890995, - "fields": [ - { - "key": "event", - "type": "string", - "value": "exception" - }, - { - "key": "exception.escape", - "type": "bool", - "value": false - }, - { - "key": "exception.message", - "type": "string", - "value": "error: k6.ftifKuB0kP6IJCx5GSi2" - }, - { - "key": "exception.stacktrace", - "type": "string", - "value": "panic: runtime error: can't divide by 0\npayment.collect()" - }, - { - "key": "exception.type", - "type": "string", - "value": "error.type_k6.Z8EEAqaHKw" - }, - { - "key": "k6.AylDHApZfitA57G", - "type": "string", - "value": "b9zizL1vfEe6okzCxSjIpb67Ki8bk0" - }, - { - "key": "k6.Kx3BULeW9jtSv28", - "type": "string", - "value": "ucw8lXCr2DNFAULZqPT1kgbBWjRhbo" - }, - { - "key": "k6.diJE0SBJgg5roRk", - "type": "string", - "value": "nNArNW24Vy62a0clOG3LlxIlcVR0eJ" - }, - { - "key": "k6.rJRKzRnfimM91Nd", - "type": "string", - "value": "mqfTWvOHh6kYH3BMP4lmXi5G8Ys73Q" - }, - { - "key": "k6.vXrG60SYEtzqoAq", - "type": "string", - "value": "K7x1D8gmx0ToBys776kb7UFezBjIBh" - } - ] - } - ], - "processID": "p2", - "warnings": null + "key": "k6.zWe8l5JQ2wjwRcv", + "type": "string", + "value": "mnKLtHjOpHOeuCKB8jdoj7uJ6Ud3ur" } - ], - "processes": { - "p1": { - "serviceName": "shop-backend", - "tags": [ - { - "key": "container.image.name", - "type": "string", - "value": "ghcr.io/grafana/xk6-client-tracing" - }, - { - "key": "container.image.tag", - "type": "string", - "value": "v0.0.5" - }, - { - "key": "k6", - "type": "string", - "value": "true" - }, - { - "key": "k8s.deployment.name", - "type": "string", - "value": "k6-tracing" - }, - { - "key": "k8s.namespace.name", - "type": "string", - "value": "tracing-app-k6" - }, - { - "key": "k8s.node.name", - "type": "string", - "value": "minikube" - }, - { - "key": "k8s.pod.ip", - "type": "string", - "value": "10.244.0.65" - }, - { - "key": "k8s.pod.name", - "type": "string", - "value": "k6-tracing-697b6ddfd7-vvcsd" - }, - { - "key": "k8s.pod.start_time", - "type": "string", - "value": "2025-03-31T16:09:18Z" - }, - { - "key": "k8s.pod.uid", - "type": "string", - "value": "40ddac83-e7e2-4621-a164-4f2321f4fa20" - } - ] + ] + }, + { + "timestamp": 1744817139890995, + "fields": [ + { + "key": "event", + "type": "string", + "value": "exception" + }, + { + "key": "exception.escape", + "type": "bool", + "value": false + }, + { + "key": "exception.message", + "type": "string", + "value": "error: k6.ftifKuB0kP6IJCx5GSi2" + }, + { + "key": "exception.stacktrace", + "type": "string", + "value": "panic: runtime error: can't divide by 0\npayment.collect()" + }, + { + "key": "exception.type", + "type": "string", + "value": "error.type_k6.Z8EEAqaHKw" + }, + { + "key": "k6.AylDHApZfitA57G", + "type": "string", + "value": "b9zizL1vfEe6okzCxSjIpb67Ki8bk0" + }, + { + "key": "k6.Kx3BULeW9jtSv28", + "type": "string", + "value": "ucw8lXCr2DNFAULZqPT1kgbBWjRhbo" + }, + { + "key": "k6.diJE0SBJgg5roRk", + "type": "string", + "value": "nNArNW24Vy62a0clOG3LlxIlcVR0eJ" + }, + { + "key": "k6.rJRKzRnfimM91Nd", + "type": "string", + "value": "mqfTWvOHh6kYH3BMP4lmXi5G8Ys73Q" }, - "p2": { - "serviceName": "auth-service", - "tags": [ - { - "key": "container.image.name", - "type": "string", - "value": "ghcr.io/grafana/xk6-client-tracing" - }, - { - "key": "container.image.tag", - "type": "string", - "value": "v0.0.5" - }, - { - "key": "k6", - "type": "string", - "value": "true" - }, - { - "key": "k8s.deployment.name", - "type": "string", - "value": "k6-tracing" - }, - { - "key": "k8s.namespace.name", - "type": "string", - "value": "tracing-app-k6" - }, - { - "key": "k8s.node.name", - "type": "string", - "value": "minikube" - }, - { - "key": "k8s.pod.ip", - "type": "string", - "value": "10.244.0.65" - }, - { - "key": "k8s.pod.name", - "type": "string", - "value": "k6-tracing-697b6ddfd7-vvcsd" - }, - { - "key": "k8s.pod.start_time", - "type": "string", - "value": "2025-03-31T16:09:18Z" - }, - { - "key": "k8s.pod.uid", - "type": "string", - "value": "40ddac83-e7e2-4621-a164-4f2321f4fa20" - } - ] + { + "key": "k6.vXrG60SYEtzqoAq", + "type": "string", + "value": "K7x1D8gmx0ToBys776kb7UFezBjIBh" } + ] + } + ], + "processID": "p2", + "warnings": null + } + ], + "processes": { + "p1": { + "serviceName": "shop-backend", + "tags": [ + { + "key": "container.image.name", + "type": "string", + "value": "ghcr.io/grafana/xk6-client-tracing" + }, + { + "key": "container.image.tag", + "type": "string", + "value": "v0.0.5" + }, + { + "key": "k6", + "type": "string", + "value": "true" + }, + { + "key": "k8s.deployment.name", + "type": "string", + "value": "k6-tracing" + }, + { + "key": "k8s.namespace.name", + "type": "string", + "value": "tracing-app-k6" + }, + { + "key": "k8s.node.name", + "type": "string", + "value": "minikube" + }, + { + "key": "k8s.pod.ip", + "type": "string", + "value": "10.244.0.65" + }, + { + "key": "k8s.pod.name", + "type": "string", + "value": "k6-tracing-697b6ddfd7-vvcsd" + }, + { + "key": "k8s.pod.start_time", + "type": "string", + "value": "2025-03-31T16:09:18Z" + }, + { + "key": "k8s.pod.uid", + "type": "string", + "value": "40ddac83-e7e2-4621-a164-4f2321f4fa20" + } + ] + }, + "p2": { + "serviceName": "auth-service", + "tags": [ + { + "key": "container.image.name", + "type": "string", + "value": "ghcr.io/grafana/xk6-client-tracing" + }, + { + "key": "container.image.tag", + "type": "string", + "value": "v0.0.5" + }, + { + "key": "k6", + "type": "string", + "value": "true" + }, + { + "key": "k8s.deployment.name", + "type": "string", + "value": "k6-tracing" + }, + { + "key": "k8s.namespace.name", + "type": "string", + "value": "tracing-app-k6" + }, + { + "key": "k8s.node.name", + "type": "string", + "value": "minikube" + }, + { + "key": "k8s.pod.ip", + "type": "string", + "value": "10.244.0.65" + }, + { + "key": "k8s.pod.name", + "type": "string", + "value": "k6-tracing-697b6ddfd7-vvcsd" + }, + { + "key": "k8s.pod.start_time", + "type": "string", + "value": "2025-03-31T16:09:18Z" }, - "warnings": null + { + "key": "k8s.pod.uid", + "type": "string", + "value": "40ddac83-e7e2-4621-a164-4f2321f4fa20" + } + ] } - ], - "total": 0, - "limit": 0, - "offset": 0, - "errors": null + }, + "warnings": null + } + ], + "total": 0, + "limit": 0, + "offset": 0, + "errors": null } diff --git a/tracingganttchart/src/test/traces/example_otlp.json b/tracingganttchart/src/test/traces/example_otlp.json index fdf146c36..506deff34 100644 --- a/tracingganttchart/src/test/traces/example_otlp.json +++ b/tracingganttchart/src/test/traces/example_otlp.json @@ -1,100 +1,99 @@ { - "resourceSpans": [ - { - "resource": { - "attributes": [ - { - "key": "service.name", - "value": { - "stringValue": "shop-backend" - } - } - ] - }, - "scopeSpans": [ + "resourceSpans": [ + { + "resource": { + "attributes": [ { - "scope": { - "name": "k6" + "key": "service.name", + "value": { + "stringValue": "shop-backend" + } + } + ] + }, + "scopeSpans": [ + { + "scope": { + "name": "k6" + }, + "spans": [ + { + "traceId": "5B8EFFF798038103D269B633813FC60C", + "spanId": "sid1", + "name": "testRootSpan", + "kind": "SPAN_KIND_SERVER", + "startTimeUnixNano": "1000000000", + "endTimeUnixNano": "2000000000" }, - "spans": [ - { - "traceId": "5B8EFFF798038103D269B633813FC60C", - "spanId": "sid1", - "name": "testRootSpan", - "kind": "SPAN_KIND_SERVER", - "startTimeUnixNano": "1000000000", - "endTimeUnixNano": "2000000000" - }, - { - "traceId": "5B8EFFF798038103D269B633813FC60C", - "spanId": "sid2", - "parentSpanId": "sid1", - "name": "testChildSpan2", - "kind": "SPAN_KIND_CLIENT", - "startTimeUnixNano": "1100000000", - "endTimeUnixNano": "1200000000", - "attributes": [ - { - "key": "http.method", - "value": { - "stringValue": "DELETE" - } - } - ], - "events": [ - { - "timeUnixNano": "1150000000", - "name": "event1_name", - "attributes": [ - { - "key": "event1_key", - "value": { - "stringValue": "event1_value" - } - } - ] + { + "traceId": "5B8EFFF798038103D269B633813FC60C", + "spanId": "sid2", + "parentSpanId": "sid1", + "name": "testChildSpan2", + "kind": "SPAN_KIND_CLIENT", + "startTimeUnixNano": "1100000000", + "endTimeUnixNano": "1200000000", + "attributes": [ + { + "key": "http.method", + "value": { + "stringValue": "DELETE" } - ], - "status": { - "message": "Forbidden", - "code": "STATUS_CODE_ERROR" } - }, - { - "traceId": "5B8EFFF798038103D269B633813FC60C", - "spanId": "sid3", - "parentSpanId": "sid2", - "name": "testChildSpan3", - "kind": "SPAN_KIND_CLIENT", - "startTimeUnixNano": "1300000000", - "endTimeUnixNano": "1450000000", - "attributes": [ - { - "key": "http.method", - "value": { - "stringValue": "PUT" + ], + "events": [ + { + "timeUnixNano": "1150000000", + "name": "event1_name", + "attributes": [ + { + "key": "event1_key", + "value": { + "stringValue": "event1_value" + } } + ] + } + ], + "status": { + "message": "Forbidden", + "code": "STATUS_CODE_ERROR" + } + }, + { + "traceId": "5B8EFFF798038103D269B633813FC60C", + "spanId": "sid3", + "parentSpanId": "sid2", + "name": "testChildSpan3", + "kind": "SPAN_KIND_CLIENT", + "startTimeUnixNano": "1300000000", + "endTimeUnixNano": "1450000000", + "attributes": [ + { + "key": "http.method", + "value": { + "stringValue": "PUT" } - ], - "links": [ - { - "traceId": "tid1", - "spanId": "sid1", - "attributes": [ - { - "key": "link-key1", - "value": { - "stringValue": "link-value1" - } + } + ], + "links": [ + { + "traceId": "tid1", + "spanId": "sid1", + "attributes": [ + { + "key": "link-key1", + "value": { + "stringValue": "link-value1" } - ] - } - ] - } - ] - } - ] - } - ] - } - \ No newline at end of file + } + ] + } + ] + } + ] + } + ] + } + ] +} diff --git a/victorialogs/jest.config.ts b/victorialogs/jest.config.ts index 5190fb4de..16027133b 100644 --- a/victorialogs/jest.config.ts +++ b/victorialogs/jest.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import type { Config } from '@jest/types'; + import shared from '../jest.shared'; const jestConfig: Config.InitialOptions = { diff --git a/victorialogs/package.json b/victorialogs/package.json index 823ce12f4..189d140c8 100644 --- a/victorialogs/package.json +++ b/victorialogs/package.json @@ -9,7 +9,7 @@ "build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc", "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", - "lint": "eslint src --ext .ts,.tsx", + "lint": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/victorialogs/rsbuild.config.ts b/victorialogs/rsbuild.config.ts index 88978a77d..cb62a6d68 100644 --- a/victorialogs/rsbuild.config.ts +++ b/victorialogs/rsbuild.config.ts @@ -12,6 +12,7 @@ // limitations under the License. import { pluginReact } from '@rsbuild/plugin-react'; + import { createConfigForPlugin } from '../rsbuild.shared'; export default createConfigForPlugin({ diff --git a/victorialogs/src/components/logsql-editor.tsx b/victorialogs/src/components/logsql-editor.tsx index 1e44831c7..65a018183 100644 --- a/victorialogs/src/components/logsql-editor.tsx +++ b/victorialogs/src/components/logsql-editor.tsx @@ -11,9 +11,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ReactElement, useMemo } from 'react'; import { useTheme } from '@mui/material'; import CodeMirror, { EditorView, ReactCodeMirrorProps } from '@uiw/react-codemirror'; +import { ReactElement, useMemo } from 'react'; + import { LogsQLExtension } from './logsql-extension'; export type LogsQLEditorProps = Omit; diff --git a/victorialogs/src/components/logsql-extension.ts b/victorialogs/src/components/logsql-extension.ts index c9ff2fdd5..89ec87308 100644 --- a/victorialogs/src/components/logsql-extension.ts +++ b/victorialogs/src/components/logsql-extension.ts @@ -14,6 +14,7 @@ import { LRLanguage } from '@codemirror/language'; import { parser } from '@grafana/lezer-logql'; import { Extension } from '@uiw/react-codemirror'; + import { logsqlHighlight } from './logsql-highlight'; function logsqlLanguage(): LRLanguage { diff --git a/victorialogs/src/datasources/victorialogs-datasource/VictoriaLogsDatasource.tsx b/victorialogs/src/datasources/victorialogs-datasource/VictoriaLogsDatasource.tsx index 5f1f6e852..94471d267 100644 --- a/victorialogs/src/datasources/victorialogs-datasource/VictoriaLogsDatasource.tsx +++ b/victorialogs/src/datasources/victorialogs-datasource/VictoriaLogsDatasource.tsx @@ -12,6 +12,7 @@ // limitations under the License. import { DatasourcePlugin } from '@perses-dev/plugin-system'; + import { VictoriaLogsClient, streamQueryRange, statsQueryRange, fieldNames, fieldValues } from '../../model/client'; import { VictoriaLogsDatasourceSpec } from './types'; import { VictoriaLogsDatasourceEditor } from './VictoriaLogsDatasourceEditor'; diff --git a/victorialogs/src/datasources/victorialogs-datasource/VictoriaLogsDatasourceEditor.tsx b/victorialogs/src/datasources/victorialogs-datasource/VictoriaLogsDatasourceEditor.tsx index db0384e1d..c29b6a198 100644 --- a/victorialogs/src/datasources/victorialogs-datasource/VictoriaLogsDatasourceEditor.tsx +++ b/victorialogs/src/datasources/victorialogs-datasource/VictoriaLogsDatasourceEditor.tsx @@ -13,6 +13,7 @@ import { HTTPSettingsEditor } from '@perses-dev/plugin-system'; import { ReactElement } from 'react'; + import { VictoriaLogsDatasourceSpec } from './types'; export interface VictoriaLogsDatasourceEditorProps { diff --git a/victorialogs/src/getPluginModule.ts b/victorialogs/src/getPluginModule.ts index ee2f25a74..5e96075ae 100644 --- a/victorialogs/src/getPluginModule.ts +++ b/victorialogs/src/getPluginModule.ts @@ -12,6 +12,7 @@ // limitations under the License. import { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system'; + import packageJson from '../package.json'; /** diff --git a/victorialogs/src/queries/victorialogs-log-query/VictoriaLogsLogQuery.tsx b/victorialogs/src/queries/victorialogs-log-query/VictoriaLogsLogQuery.tsx index a90f7e7bb..973ecf757 100644 --- a/victorialogs/src/queries/victorialogs-log-query/VictoriaLogsLogQuery.tsx +++ b/victorialogs/src/queries/victorialogs-log-query/VictoriaLogsLogQuery.tsx @@ -11,11 +11,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { QueryDefinition } from '@perses-dev/spec'; import { LogQueryPlugin, LogQueryContext, calculateVolumeInterval, parseVariables } from '@perses-dev/plugin-system'; +import { QueryDefinition } from '@perses-dev/spec'; + import { getVictoriaLogsLogData } from './query'; -import { VictoriaLogsLogQueryEditor } from './VictoriaLogsLogQueryEditor'; import { VictoriaLogsLogQuerySpec } from './types'; +import { VictoriaLogsLogQueryEditor } from './VictoriaLogsLogQueryEditor'; export const VictoriaLogsLogQuery: LogQueryPlugin = { getLogData: getVictoriaLogsLogData, @@ -23,7 +24,7 @@ export const VictoriaLogsLogQuery: LogQueryPlugin = { createInitialOptions: () => ({ query: '' }), dependsOn: (spec) => { const queryVariables = parseVariables(spec.query); - const allVariables = [...new Set([...queryVariables])]; + const allVariables = [...new Set(queryVariables)]; return { variables: allVariables, }; diff --git a/victorialogs/src/queries/victorialogs-log-query/VictoriaLogsLogQueryEditor.tsx b/victorialogs/src/queries/victorialogs-log-query/VictoriaLogsLogQueryEditor.tsx index 0b242272e..e4f34d683 100644 --- a/victorialogs/src/queries/victorialogs-log-query/VictoriaLogsLogQueryEditor.tsx +++ b/victorialogs/src/queries/victorialogs-log-query/VictoriaLogsLogQueryEditor.tsx @@ -11,6 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { InputLabel, Stack } from '@mui/material'; +import { createModEnterHandler } from '@perses-dev/dashboards'; import { DatasourceSelect, DatasourceSelectProps, @@ -18,9 +20,8 @@ import { OptionsEditorProps, useDatasourceSelectValueToSelector, } from '@perses-dev/plugin-system'; -import { InputLabel, Stack } from '@mui/material'; import { ReactElement, useCallback, useState, useEffect } from 'react'; -import { createModEnterHandler } from '@perses-dev/dashboards'; + import { LogsQLEditor } from '../../components/logsql-editor'; import { VICTORIALOGS_DATASOURCE_KIND, VictoriaLogsDatasourceSelector } from '../../model'; import { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants'; diff --git a/victorialogs/src/queries/victorialogs-log-query/query.ts b/victorialogs/src/queries/victorialogs-log-query/query.ts index 62abe5b69..bb38dd6d9 100644 --- a/victorialogs/src/queries/victorialogs-log-query/query.ts +++ b/victorialogs/src/queries/victorialogs-log-query/query.ts @@ -13,8 +13,9 @@ import { replaceVariables, LogQueryPlugin, LogQueryContext } from '@perses-dev/plugin-system'; import { LogData, LogEntry } from '@perses-dev/spec'; -import { VictoriaLogsStreamQueryRangeResponse } from '../../model/types'; + import { VictoriaLogsClient } from '../../model/client'; +import { VictoriaLogsStreamQueryRangeResponse } from '../../model/types'; import { DEFAULT_DATASOURCE } from '../constants'; import { VictoriaLogsLogQuerySpec } from './types'; diff --git a/victorialogs/src/queries/victorialogs-log-query/types.test.ts b/victorialogs/src/queries/victorialogs-log-query/types.test.ts index 8800e5cf1..7b92444eb 100644 --- a/victorialogs/src/queries/victorialogs-log-query/types.test.ts +++ b/victorialogs/src/queries/victorialogs-log-query/types.test.ts @@ -12,9 +12,10 @@ // limitations under the License. import { LogQueryContext } from '@perses-dev/plugin-system'; -import { VictoriaLogsStreamQueryRangeResponse } from '../../model/types'; + import { VictoriaLogsDatasource } from '../../datasources/victorialogs-datasource'; import { VictoriaLogsDatasourceSpec } from '../../datasources/victorialogs-datasource/types'; +import { VictoriaLogsStreamQueryRangeResponse } from '../../model/types'; import { VictoriaLogsLogQuery } from './VictoriaLogsLogQuery'; const datasource: VictoriaLogsDatasourceSpec = { diff --git a/victorialogs/src/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQuery.tsx b/victorialogs/src/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQuery.tsx index b5a672303..8b0ae86d8 100644 --- a/victorialogs/src/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQuery.tsx +++ b/victorialogs/src/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQuery.tsx @@ -12,9 +12,10 @@ // limitations under the License. import { TimeSeriesQueryPlugin, parseVariables } from '@perses-dev/plugin-system'; + import { getVictoriaLogsTimeSeriesData } from './query'; -import { VictoriaLogsQueryEditor } from './VictoriaLogsTimeSeriesQueryEditor'; import { VictoriaLogsTimeSeriesQuerySpec } from './types'; +import { VictoriaLogsQueryEditor } from './VictoriaLogsTimeSeriesQueryEditor'; export const VictoriaLogsTimeSeriesQuery: TimeSeriesQueryPlugin = { getTimeSeriesData: getVictoriaLogsTimeSeriesData, @@ -22,7 +23,7 @@ export const VictoriaLogsTimeSeriesQuery: TimeSeriesQueryPlugin ({ query: '' }), dependsOn: (spec) => { const queryVariables = parseVariables(spec.query); - const allVariables = [...new Set([...queryVariables])]; + const allVariables = [...new Set(queryVariables)]; return { variables: allVariables, }; diff --git a/victorialogs/src/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQueryEditor.tsx b/victorialogs/src/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQueryEditor.tsx index 63b714ca7..06f079ad5 100644 --- a/victorialogs/src/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQueryEditor.tsx +++ b/victorialogs/src/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQueryEditor.tsx @@ -11,6 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { InputLabel, Stack } from '@mui/material'; +import { createModEnterHandler } from '@perses-dev/dashboards'; import { DatasourceSelect, DatasourceSelectProps, @@ -18,9 +20,8 @@ import { OptionsEditorProps, useDatasourceSelectValueToSelector, } from '@perses-dev/plugin-system'; -import { InputLabel, Stack } from '@mui/material'; import { ReactElement, useCallback, useState, useEffect } from 'react'; -import { createModEnterHandler } from '@perses-dev/dashboards'; + import { LogsQLEditor } from '../../components/logsql-editor'; import { VICTORIALOGS_DATASOURCE_KIND, VictoriaLogsDatasourceSelector } from '../../model'; import { DATASOURCE_KIND, DEFAULT_DATASOURCE } from '../constants'; diff --git a/victorialogs/src/queries/victorialogs-time-series-query/query.ts b/victorialogs/src/queries/victorialogs-time-series-query/query.ts index deffa3875..876466652 100644 --- a/victorialogs/src/queries/victorialogs-time-series-query/query.ts +++ b/victorialogs/src/queries/victorialogs-time-series-query/query.ts @@ -12,8 +12,9 @@ // limitations under the License. import { TimeSeriesQueryPlugin, replaceVariables } from '@perses-dev/plugin-system'; -import { milliseconds } from 'date-fns'; import { DurationString, parseDurationString, TimeSeries } from '@perses-dev/spec'; +import { milliseconds } from 'date-fns'; + import { VictoriaLogsClient } from '../../model/client'; import { VictoriaLogsStatsQueryRangeResponse } from '../../model/types'; import { DEFAULT_DATASOURCE } from '../constants'; diff --git a/victorialogs/src/queries/victorialogs-time-series-query/types.test.ts b/victorialogs/src/queries/victorialogs-time-series-query/types.test.ts index 7cf9b0a03..0cd9df9bc 100644 --- a/victorialogs/src/queries/victorialogs-time-series-query/types.test.ts +++ b/victorialogs/src/queries/victorialogs-time-series-query/types.test.ts @@ -15,9 +15,10 @@ jest.mock('echarts/core'); import { TimeSeriesQueryContext } from '@perses-dev/plugin-system'; import { DatasourceSpec } from '@perses-dev/spec'; -import { VictoriaLogsStatsQueryRangeResponse } from '../../model/types'; + import { VictoriaLogsDatasource } from '../../datasources/victorialogs-datasource'; import { VictoriaLogsDatasourceSpec } from '../../datasources/victorialogs-datasource/types'; +import { VictoriaLogsStatsQueryRangeResponse } from '../../model/types'; import { VictoriaLogsTimeSeriesQuery } from './VictoriaLogsTimeSeriesQuery'; const datasource: VictoriaLogsDatasourceSpec = { diff --git a/victorialogs/src/variables/types.ts b/victorialogs/src/variables/types.ts index afee5f344..13c815a17 100644 --- a/victorialogs/src/variables/types.ts +++ b/victorialogs/src/variables/types.ts @@ -12,6 +12,7 @@ // limitations under the License. import { DatasourceSelectValue } from '@perses-dev/plugin-system'; + import { VictoriaLogsDatasourceSelector } from '../model'; export interface VictoriaLogsVariableOptionsBase { diff --git a/victorialogs/src/variables/utils.ts b/victorialogs/src/variables/utils.ts index a88ca3daf..ece9caae4 100644 --- a/victorialogs/src/variables/utils.ts +++ b/victorialogs/src/variables/utils.ts @@ -11,10 +11,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { StatusError } from '@perses-dev/client'; import { VariableOption, useDatasourceClient, useTimeRange } from '@perses-dev/plugin-system'; -import { useQuery, UseQueryResult } from '@tanstack/react-query'; import { AbsoluteTimeRange, DatasourceSelector } from '@perses-dev/spec'; -import { StatusError } from '@perses-dev/client'; +import { useQuery, UseQueryResult } from '@tanstack/react-query'; + import { VictoriaLogsClient, VictoriaLogsFieldItem, diff --git a/victorialogs/src/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariable.tsx b/victorialogs/src/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariable.tsx index 2d701b7e7..b6f541e88 100644 --- a/victorialogs/src/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariable.tsx +++ b/victorialogs/src/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariable.tsx @@ -19,9 +19,10 @@ import { datasourceSelectValueToSelector, isVariableDatasource, } from '@perses-dev/plugin-system'; + import { VictoriaLogsClient, DEFAULT_VICTORIALOGS, VICTORIALOGS_DATASOURCE_KIND } from '../../model'; -import { fieldItemsToVariableOptions, getVictoriaLogsTimeRange } from '../utils'; import { VictoriaLogsFieldNamesVariableOptions } from '../types'; +import { fieldItemsToVariableOptions, getVictoriaLogsTimeRange } from '../utils'; import { VictoriaLogsFieldNamesVariableEditor } from './VictoriaLogsFieldNamesVariableEditor'; export const VictoriaLogsFieldNamesVariable: VariablePlugin = { diff --git a/victorialogs/src/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariableEditor.tsx b/victorialogs/src/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariableEditor.tsx index 9462655ba..ece2cf253 100644 --- a/victorialogs/src/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariableEditor.tsx +++ b/victorialogs/src/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariableEditor.tsx @@ -20,6 +20,7 @@ import { } from '@perses-dev/plugin-system'; import { produce } from 'immer'; import { ReactElement, useCallback } from 'react'; + import { DEFAULT_VICTORIALOGS, isDefaultVictoriaLogsSelector, diff --git a/victorialogs/src/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariable.tsx b/victorialogs/src/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariable.tsx index 9fda5f6c1..27e800fb3 100644 --- a/victorialogs/src/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariable.tsx +++ b/victorialogs/src/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariable.tsx @@ -19,6 +19,7 @@ import { datasourceSelectValueToSelector, isVariableDatasource, } from '@perses-dev/plugin-system'; + import { VictoriaLogsClient, DEFAULT_VICTORIALOGS, VICTORIALOGS_DATASOURCE_KIND } from '../../model'; import { VictoriaLogsFieldValuesVariableOptions } from '../types'; import { fieldItemsToVariableOptions, getVictoriaLogsTimeRange } from '../utils'; diff --git a/victorialogs/src/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariableEditor.tsx b/victorialogs/src/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariableEditor.tsx index 8ee9bb131..1c3f356ba 100644 --- a/victorialogs/src/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariableEditor.tsx +++ b/victorialogs/src/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariableEditor.tsx @@ -20,6 +20,7 @@ import { } from '@perses-dev/plugin-system'; import { produce } from 'immer'; import { ReactElement, useCallback, useMemo, SyntheticEvent } from 'react'; + import { DEFAULT_VICTORIALOGS, isDefaultVictoriaLogsSelector, From ef23fe70e48eeaf2e9bc0dffc3771387ed5c117a Mon Sep 17 00:00:00 2001 From: Guillaume Date: Sat, 15 Aug 2026 22:05:40 +0000 Subject: [PATCH 2/7] Add AI docs Signed-off-by: Guillaume LADORME --- .github/copilot-instructions.md | 14 +++++ .github/instructions/ui.instructions.md | 71 +++++++++++++++++++++ AGENTS.md | 84 +++++++++++++++++++++++++ 3 files changed, 169 insertions(+) create mode 100644 .github/copilot-instructions.md create mode 100644 .github/instructions/ui.instructions.md create mode 100644 AGENTS.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 000000000..6a6a12e3e --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,14 @@ +# Perses plugins repository instructions + +Follow [`AGENTS.md`](../AGENTS.md) for architecture, validation, compatibility, and completion requirements. For every +TypeScript or React file, also follow the path-specific UI instructions in `.github/instructions/ui.instructions.md`. + +- Treat each lower-case top-level directory as a cohesive, independently published plugin workspace. +- Keep runtime code, editor UI, CUE schema, Go SDK, documentation, examples, and tests aligned when a contract changes. +- Preserve plugin identities, serialized fields, defaults, package metadata, and public APIs unless a breaking change is + explicitly requested. +- Use public exports from `@perses-dev/*`; do not deep-import other repositories or duplicate shared contracts. +- Do not edit upper-case built plugin directories, `dist/`, `cue.mod/pkg/`, or other generated output. +- Add focused tests, Apache headers on new source files, and run the affected workspace checks before root checks. +- Do not add Oxlint warnings, raise warning ceilings, use broad suppressions, or change dependency versions without a + task-specific reason. diff --git a/.github/instructions/ui.instructions.md b/.github/instructions/ui.instructions.md new file mode 100644 index 000000000..872308b83 --- /dev/null +++ b/.github/instructions/ui.instructions.md @@ -0,0 +1,71 @@ +--- +applyTo: "**/*.ts,**/*.tsx" +--- + +# Perses UI quality instructions + +Use these rules for new and modified TypeScript/React code. Older code may not follow every rule; improve the code you +touch without expanding the task into unrelated cleanup. + +## Design and package boundaries + +- Inspect neighboring code and the package's public entry point before adding a new pattern. +- Keep feature-specific code beside its feature. Move code to a shared component or utility only when there is a proven + cross-feature use case. +- Respect package dependency direction and public exports. Do not deep-import another package's internal files. +- Prefer small, composable components and pure utilities over components that combine rendering, data transformation, + network access, and orchestration. +- Do not add a dependency when an existing Perses package, current dependency, or small local helper solves the problem. + +## TypeScript and public APIs + +- Preserve strict typing. Prefer `unknown` plus narrowing over `any`, unchecked casts, non-null assertions, or blanket + TypeScript suppressions. +- Give exported functions and module boundaries explicit return types. Model invalid states out of the type system when + practical. +- Component prop types use `ComponentNameProps`; export them when the component is public. +- Use named exports. Update the package's public barrel only when the symbol is intentionally part of its supported API. +- Prefer optional properties and `undefined` unless `null` has explicit domain meaning. +- Validate untrusted or persisted input at a boundary; do not assume a TypeScript type validates runtime data. + +## React, compiler, and rendering performance + +- Follow the Rules of Hooks. Hooks are called unconditionally at component top level and have complete dependencies. +- Keep render pure: do not mutate props, state, hook-returned values, module globals, or refs during render. +- Do not read `ref.current` to calculate rendered output. Read or write refs in effects, layout effects, or event + handlers. +- Derive values during render instead of synchronously setting derived state in an effect. Use effects only to + synchronize with external systems and always clean up subscriptions, timers, and requests. +- Define components at module scope, not inside another component's render path. +- Keep props stable when identity affects rendering: hoist static objects and arrays, and use `useMemo` or `useCallback` + for dynamic values passed across memoized boundaries. Do not add memoization blindly or omit dependencies. +- Memoize React context values when they contain objects or functions whose identity would otherwise change each render. +- Avoid array-index keys when a stable domain identifier exists. +- Treat `react/react-compiler` and `react-perf` diagnostics as design feedback. Fix new warnings rather than disabling + the rule or increasing the repository warning ceiling. + +## Components, state, and accessibility + +- Start with existing Perses and Material UI components. Use theme tokens and `sx`; avoid hard-coded colors and + arbitrary spacing when a theme value exists. +- Import Material Design icons directly from their icon module instead of the `mdi-material-ui` package barrel. +- Keep state as close as possible to its consumers. Use TanStack Query for server state and avoid copying query data + into local state without a clear reason. +- Introduce context only for genuinely cross-cutting state. Library components should allow consumers to own + application-level state. +- Provide loading, empty, error, and disabled states where applicable. Preserve error causes and never expose secrets or + credentials in UI messages or logs. +- Use semantic HTML, labels, keyboard interaction, and correct ARIA relationships. Do not silence accessibility rules + when the markup can be corrected. + +## Tests and quality gates + +- Add or update tests for new behavior and regressions. Keep tests beside source as `*.test.ts` or `*.test.tsx`. +- Test observable behavior with React Testing Library and `user-event`. Prefer role, name, label, and visible-text + queries; use test IDs only as a last resort. +- Use Playwright for critical end-to-end flows or browser behavior that unit/integration tests cannot cover. +- Run a focused test while iterating, then the affected workspace's type-check and test commands. +- Before completion, run repository-level `npm run lint:ci`, `npm run format:check`, and `npm run type-check`. +- Oxfmt owns formatting and import sorting. Do not manually fight its output. +- A lint suppression must be narrow, name the rule, and include a nearby explanation of why the exception is necessary. + Do not enable type-aware linting or change lint configuration unless the task explicitly concerns repository tooling. diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..3ebadaaa0 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,84 @@ +# AI contributor guide + +## Purpose and instruction scope + +This repository contains the official Perses plugins. Each lower-case top-level plugin directory is an independently +published workspace that can include a TypeScript runtime, CUE schemas, a Go SDK, documentation, and tests. Keep those +representations coherent and preserve the contracts consumed by Perses installations and dashboards. + +Before editing: + +- Read `README.md` and `.github/pull_request_template.md` for repository and pull-request conventions. +- Read the affected plugin's `README.md`, `package.json`, and neighboring implementations. +- For TypeScript or React work, also follow `.github/instructions/ui.instructions.md`. + +## Architecture map + +- `/src/`: plugin runtime and editor UI. `getPluginModule.ts` is normally the public registration boundary. +- `/schemas/`: CUE definitions for plugin configuration and data models. +- `/sdk/`: public Go builders and helpers for Dashboard-as-Code users. +- `/cue.mod/`: CUE module metadata and dependencies. +- `e2e/`: Playwright coverage for integrated plugin behavior. +- `scripts/` and the root `Makefile`: plugin validation, generation, packaging, schema tests, and documentation checks. +- Upper-case plugin directories, `dist/`, `.turbo/`, `node_modules/`, and `cue.mod/pkg/` are generated or downloaded + outputs. Do not edit or commit them unless a documented release process explicitly requires it. + +Reusable UI primitives and plugin APIs belong in `perses/shared`; canonical resource contracts belong in `perses/spec`. +Consume their public exports instead of copying their internals or deep-importing source files. + +## Engineering rules + +- Make a plugin change across every affected representation: runtime, editor, schema, Go SDK, docs, examples, and tests. +- Preserve plugin names, kinds, package metadata, serialized field names, defaults, and schema compatibility unless a + breaking change is explicit and documented. +- Keep runtime modules focused on registering a plugin. Put substantial UI and data logic in cohesive components, + hooks, and utilities within the plugin workspace. +- Never hand-edit generated or built output. Update the source and use the repository generator or build command. +- New source files need the repository's Apache license header. +- Do not bump package versions, peer ranges, or shared dependencies unless the task explicitly requires it. +- Do not raise lint warning ceilings or add broad suppressions. New code must not add Oxlint warnings. +- Update user-facing documentation when configuration, defaults, queries, transformations, or visual behavior changes. + +## Validation + +Use Go 1.26.x, Node.js from `.nvmrc`, and npm from `package.json`. While iterating, run the affected workspace first: + +```sh +npm ci +npm run lint -w +npm run type-check -w +npm run test -w +``` + +Before completion of a TypeScript change, run the relevant repository checks: + +```sh +npm run lint:ci +npm run format:check +npm run type-check +npm run test +``` + +For schema, SDK, or repository-wide changes, select the relevant Make targets: + +```sh +make lint-plugins +make test-schemas-plugins +make golangci-lint +make checkformat-cue +make test +make checklicense +make checkdocs +``` + +Run Playwright tests when a plugin contract, editor workflow, fixture, or integrated browser behavior changes. Some +broad targets require CUE, Go tooling, built packages, or linked Perses repositories; report unavailable prerequisites +rather than weakening validation. + +## Completion checklist + +- Runtime, schema, SDK, documentation, and examples remain aligned where applicable. +- Public package and persisted-dashboard compatibility has been considered. +- New behavior and important failures have focused test coverage. +- Relevant lint, format, type, test, CUE, Go, E2E, and documentation checks pass. +- The final diff contains no build output, credentials, warning-ceiling increases, version bumps, or unrelated edits. From 0a1905542d13456abb61dfb1ff6eb69827e78fe1 Mon Sep 17 00:00:00 2001 From: Guillaume LADORME Date: Sun, 16 Aug 2026 17:12:06 +0200 Subject: [PATCH 3/7] Add React Doctor + upgrade TypeScript Signed-off-by: Guillaume LADORME --- .github/workflows/react-doctor.yml | 53 ++ .oxlintrc.json | 3 + README.md | 6 + logexplorer/tsconfig.json | 19 +- package-lock.json | 789 +++++++++++++++++++++++++++++ package.json | 8 +- tsconfig.base.json | 2 +- 7 files changed, 859 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/react-doctor.yml diff --git a/.github/workflows/react-doctor.yml b/.github/workflows/react-doctor.yml new file mode 100644 index 000000000..a8727fa5a --- /dev/null +++ b/.github/workflows/react-doctor.yml @@ -0,0 +1,53 @@ +# React Doctor — finds security, performance, correctness, accessibility, +# bundle-size, and architecture issues in React codebases. +# +# Docs: https://www.react.doctor/ci +# Source: https://github.com/millionco/react-doctor + +name: React Doctor + +on: + # Scans the PR's changed files and posts a sticky summary comment listing only the new issues introduced relative to the merge base of the target branch. + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + # Scans `main` on every push to track the health-score trend and catch regressions that slipped past PR review. + push: + branches: ["main"] + +permissions: + contents: read + pull-requests: write + issues: write + statuses: write + +# Cancels any in-flight scan for the same PR (or branch, on push) the moment a new commit arrives, so reviewers only ever see the latest run. +concurrency: + group: react-doctor-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + react-doctor: + runs-on: ubuntu-latest + steps: + # fetch-depth: 0 gives React Doctor the full git history it needs to find the merge base with the target branch. Without it a shallow checkout has no merge base, so PR runs can't compare against the base and fall back to reporting every issue in the changed files (pre-existing ones included) instead of only the ones the PR introduced. + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - uses: millionco/react-doctor@v2 + # Advisory by default: React Doctor reports findings on every PR — a + # sticky summary comment, inline review comments, and a commit status + # with the health score — but never fails the check, so it won't red-X + # a teammate's PR on day one. When your team trusts the signal, graduate + # the gate: uncomment the block below and set blocking to "error" (fail + # on new error-severity findings) or "warning" (fail on any finding). + # Full reference: https://www.react.doctor/ci + # with: + # blocking: error # Gate level: "none" (advisory, the default) | "warning" | "error" + # scope: full # On PRs, scan the whole project instead of just changed files + # comment: false # Disable the sticky PR summary comment + # review-comments: false # Disable inline review comments on changed lines + # commit-status: false # Disable the commit status (score + counts, links to the run) + # version: "0.4.0" # Pin to a specific react-doctor version instead of "latest" + # directory: apps/web # Scan a sub-directory (default: ".") + # project: "web,admin" # In a monorepo, scan specific workspace project(s) diff --git a/.oxlintrc.json b/.oxlintrc.json index 819f09ecf..9826e6d46 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -1,6 +1,7 @@ { "$schema": "./node_modules/oxlint/configuration_schema.json", "plugins": ["eslint", "typescript", "unicorn", "oxc", "import", "react", "react-perf", "jsx-a11y"], + "jsPlugins": [{ "name": "react-doctor", "specifier": "oxlint-plugin-react-doctor" }], "categories": { "correctness": "error", "suspicious": "warn", @@ -36,6 +37,8 @@ "react/no-unescaped-entities": "error", "react/exhaustive-deps": "error", "react/react-compiler": "warn", + "react-doctor/no-fetch-in-effect": "warn", + "react-doctor/no-derived-state": "warn", "react/jsx-curly-brace-presence": [ "error", { "props": "never", "children": "never", "propElementValues": "always" } diff --git a/README.md b/README.md index cd61e545c..d0231bcea 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,12 @@ Then in [`perses`](https://github.com/perses/perses) repository: 3. Login percli to the backend `percli login http://localhost:8080` 4. Start the plugin development server: `percli plugin start /path/to/the/plugin/dir` +### Code quality + +Run `npm run lint` for the regular Oxlint checks, including the React Doctor rules configured in `.oxlintrc.json`. Run +`npm run doctor` for the full React Doctor project scan. Pull requests and pushes to `main` also run the scan in GitHub +Actions. + ### Working with Snapshots This will allow you to use the updates from perses core in your plugin so you can test the changes. diff --git a/logexplorer/tsconfig.json b/logexplorer/tsconfig.json index d8471c931..98221344c 100644 --- a/logexplorer/tsconfig.json +++ b/logexplorer/tsconfig.json @@ -1,23 +1,8 @@ { + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "./dist/lib", - "rootDir": "./src", - "target": "es2022", - "lib": ["dom", "dom.iterable", "esnext"], - "module": "esnext", - "jsx": "react-jsx", - "skipLibCheck": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "noUncheckedIndexedAccess": true, - "declaration": true, - "declarationMap": true, - "pretty": true + "rootDir": "./src" }, "include": ["src"] } diff --git a/package-lock.json b/package-lock.json index a526b79af..d809e357e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -69,6 +69,7 @@ "mdi-material-ui": "^7.9.2", "oxfmt": "0.55.0", "oxlint": "1.70.0", + "oxlint-plugin-react-doctor": "0.9.12", "react": "^18.3.1", "react-dom": "^18.3.1", "react-router": "^6.30.3", @@ -3012,6 +3013,363 @@ "version": "0.5.1", "license": "MIT" }, + "node_modules/@oxc-parser/binding-android-arm-eabi": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-android-arm-eabi/-/binding-android-arm-eabi-0.143.0.tgz", + "integrity": "sha512-n9uozULWflPqBtdmI8lAabLqGKNgLVNN0ZH8HfgCwpKGNtzRzauB76jTiW/3YLkcA7N1zskpi9GdVnZuu1SAvg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-android-arm64": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-android-arm64/-/binding-android-arm64-0.143.0.tgz", + "integrity": "sha512-9BbdjHETk6O3zH/DDid9IgBtF0GlpLabNKN231uraXpRDSfY+iiZxTP5bk1Z63GBownVdhdINFIeddmMz4MzpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-darwin-arm64": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-darwin-arm64/-/binding-darwin-arm64-0.143.0.tgz", + "integrity": "sha512-gh+6ecoHUy4/sUcolBl/1qPXKBbYNxFY0Pk0ujgQvINTMSftJY7o4yb8gOkDJPeZeB8+a+u7xTe6umoP8N5HFA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-darwin-x64": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-darwin-x64/-/binding-darwin-x64-0.143.0.tgz", + "integrity": "sha512-qd1hl2d+lXgHv/VQ/M9qm8TrMC5T4RqDBwtOnl+1D0QMjwcz+8AaB4JSg8STgeag0GP6a6L74XEGAsrTSJWNzQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-freebsd-x64": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-freebsd-x64/-/binding-freebsd-x64-0.143.0.tgz", + "integrity": "sha512-M5XXcNa7aOqLPKTR41msfghKu2yQ4xWvCm11/gwU0JzOzHNk5sgW//rVEjJ+LO48+VDAMzXTSzurUVxIDKwozw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-linux-arm-gnueabihf": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.143.0.tgz", + "integrity": "sha512-T/GXusuOkPNQhCQCSBbcU/N8j0rAypuDBl1IyFK+lyYT594XsVz80clPC/OtbSSpBGyJxj8uYEfctxVuxVYoww==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-linux-arm-musleabihf": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.143.0.tgz", + "integrity": "sha512-oKu4RcBlXSqo3OC62dp6YTnQaZIurNDpCX3BnAM3+bJxt7s8J2TJKMnC0UYer1qhlRaDCg6wkTaTw+2IlsZ12w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-linux-arm64-gnu": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.143.0.tgz", + "integrity": "sha512-WJBbD186AZmMGaSIhlktC+rPl8L3peCTXAh88Ih9uEvK0en2mPojGyCGYiL6mHtV1RPV3JyfJW5t6n5hh0lXhA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-linux-arm64-musl": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.143.0.tgz", + "integrity": "sha512-t1AcYOwEzgceadT4v5e+vaCCb0AncCA3v5AyzfBAz/tMq11qzVccXKzNHtkWdjBsgvTKwRkaUF3QvT4kot8vcQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-linux-ppc64-gnu": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-0.143.0.tgz", + "integrity": "sha512-RsnO/NoD8376LMJq8JS8TwI0ieNaFRTuNe2GVJntQg6gwZNMENZsEbknHdVwjpOmxdGLGodcwaGSbAeRr5Bgjw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-linux-riscv64-gnu": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.143.0.tgz", + "integrity": "sha512-48fSVfR9TZi5CASZFyv0VC6z6BCoeihFsX031mAD/oSH7d9PYsPgIqza7d9mjP7Z2KTEpTFyH6SIu0Ui6R1vdg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-linux-riscv64-musl": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-0.143.0.tgz", + "integrity": "sha512-T8CpdD+SfE01DnIOD4HpVxu0ZJOfMJ/VhCvikKfaXAxkZ+9veyLM/D2hpi7Y2hFUyPmVQO3FNZHmYzV/WlVR4g==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-linux-s390x-gnu": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.143.0.tgz", + "integrity": "sha512-QLdeMsCcacenPEFsfxnBUDF1y6opyz5+fmOz9bfD5Y7fiGCMupUCuB3KTPQhNwshIG1P9fPqar9MHxuBDd4bwQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-linux-x64-gnu": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.143.0.tgz", + "integrity": "sha512-659ujfqLy6k7cuH3sbzhd8b+ztSq+i6E2E9pG78Q0BmHjAExfGIdgc8cGgMdwAozDXeZFHkJ+LXYJdWsaGdgyw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-linux-x64-musl": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-x64-musl/-/binding-linux-x64-musl-0.143.0.tgz", + "integrity": "sha512-/Mw/9j4TfZcnKphPrzOE6t4MMknXadcAAuVUlDRTF/ETWB5xOgQvOJV2Mh9We/bWxZdoxaGAdc+hy4GuYwQ2yQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-openharmony-arm64": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-openharmony-arm64/-/binding-openharmony-arm64-0.143.0.tgz", + "integrity": "sha512-8rIKWR2BFuifbIK/1XB9wTaSdtuJ25dlE7ZQYDnEwj/2xH2vHsxnvIjHT3ZjSVuLLwGGlSslIG/fbOJ8TV8rTw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-win32-arm64-msvc": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.143.0.tgz", + "integrity": "sha512-5U9kQYMfRRI6Zq7KDxgbIP0RMnKrfn3gLepRMgJuRkPSUALTiRCk9d/uyhb4lGDjUdzwK7mBkKqhLgzBPCmLpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-win32-ia32-msvc": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-0.143.0.tgz", + "integrity": "sha512-25P7AaHk4R88Yv2XH4gToDVmh0cOu+bEURQU10CRrmvgabfRArSGAP5osmwUKeSUHj0VS50upbpbRWWW/m7mHA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-win32-x64-msvc": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.143.0.tgz", + "integrity": "sha512-ORMh3JE1s6V7ySicdRK7vgaDQnn5o+UHg9ct989PlWHbel8O9ARrmWXM6kZjrBMtNucxNayQ8g69G0VfWzhANw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.143.0.tgz", + "integrity": "sha512-u6JZdLBTLotrNC9Vd6vPssINdzcCzleKAH6EJKImQb7GtYvX5keN2dxkoK44stCc4tffE6QQRtZTXVSzsLUlWA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + } + }, "node_modules/@oxfmt/binding-android-arm-eabi": { "version": "0.55.0", "resolved": "https://registry.npmjs.org/@oxfmt/binding-android-arm-eabi/-/binding-android-arm-eabi-0.55.0.tgz", @@ -4845,6 +5203,16 @@ "dev": true, "license": "MIT" }, + "node_modules/@shaderfrog/glsl-parser": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@shaderfrog/glsl-parser/-/glsl-parser-7.0.1.tgz", + "integrity": "sha512-8mpfsoPeRhesY3pOrzNZBL8uG6N5GVX1EHLBYbd4gzKs+c7vaEIqpTNK5VrffU33qQN4cwpP2v3u4aPPBU32sw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16" + } + }, "node_modules/@sinclair/typebox": { "version": "0.34.49", "dev": true, @@ -5680,6 +6048,20 @@ "@types/node": "*" } }, + "node_modules/@types/esrecurse": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", + "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/express": { "version": "5.0.6", "dev": true, @@ -5886,6 +6268,20 @@ "dev": true, "license": "MIT" }, + "node_modules/@typescript-eslint/types": { + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.67.0.tgz", + "integrity": "sha512-sBtgslww8nsMYUjhdPBiSyUqSzT8uR6g93A2QXnQC8+cGdjz0CyaOdqHDRJb1AtORbZCNUJBBeFA/tNR2uQmww==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@uiw/codemirror-extensions-basic-setup": { "version": "4.25.10", "license": "MIT", @@ -7672,6 +8068,16 @@ "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, "node_modules/detect-newline": { "version": "3.1.0", "dev": true, @@ -7857,6 +8263,38 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/eslint-scope": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", + "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@types/esrecurse": "^4.3.1", + "@types/estree": "^1.0.8", + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/esprima": { "version": "4.0.1", "dev": true, @@ -7869,6 +8307,29 @@ "node": ">=4" } }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, "node_modules/etag": { "version": "1.8.1", "dev": true, @@ -10030,6 +10491,279 @@ "node": ">=6" } }, + "node_modules/lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, "node_modules/lines-and-columns": { "version": "1.2.4", "license": "MIT" @@ -10536,6 +11270,43 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/oxc-parser": { + "version": "0.143.0", + "resolved": "https://registry.npmjs.org/oxc-parser/-/oxc-parser-0.143.0.tgz", + "integrity": "sha512-ov0NzaDCOInknS7mP1cwKdJERt3utPW8ldjtdUXQ8Ty0GEFD08wk422vCUN0d7pST6kqtV7dxoI9w1Zi0l/9TA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "^0.143.0" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/Boshen" + }, + "optionalDependencies": { + "@oxc-parser/binding-android-arm-eabi": "0.143.0", + "@oxc-parser/binding-android-arm64": "0.143.0", + "@oxc-parser/binding-darwin-arm64": "0.143.0", + "@oxc-parser/binding-darwin-x64": "0.143.0", + "@oxc-parser/binding-freebsd-x64": "0.143.0", + "@oxc-parser/binding-linux-arm-gnueabihf": "0.143.0", + "@oxc-parser/binding-linux-arm-musleabihf": "0.143.0", + "@oxc-parser/binding-linux-arm64-gnu": "0.143.0", + "@oxc-parser/binding-linux-arm64-musl": "0.143.0", + "@oxc-parser/binding-linux-ppc64-gnu": "0.143.0", + "@oxc-parser/binding-linux-riscv64-gnu": "0.143.0", + "@oxc-parser/binding-linux-riscv64-musl": "0.143.0", + "@oxc-parser/binding-linux-s390x-gnu": "0.143.0", + "@oxc-parser/binding-linux-x64-gnu": "0.143.0", + "@oxc-parser/binding-linux-x64-musl": "0.143.0", + "@oxc-parser/binding-openharmony-arm64": "0.143.0", + "@oxc-parser/binding-win32-arm64-msvc": "0.143.0", + "@oxc-parser/binding-win32-ia32-msvc": "0.143.0", + "@oxc-parser/binding-win32-x64-msvc": "0.143.0" + } + }, "node_modules/oxfmt": { "version": "0.55.0", "resolved": "https://registry.npmjs.org/oxfmt/-/oxfmt-0.55.0.tgz", @@ -10637,6 +11408,24 @@ } } }, + "node_modules/oxlint-plugin-react-doctor": { + "version": "0.9.12", + "resolved": "https://registry.npmjs.org/oxlint-plugin-react-doctor/-/oxlint-plugin-react-doctor-0.9.12.tgz", + "integrity": "sha512-BplcCUU/tGByFGgY1YIax6evUmjk0K8zOGGrdPs3A3dqamrzjUvVuJdYpM1Ftyt/B5fFx6+VwRrWi3YZbIz4VQ==", + "dev": true, + "license": "SEE LICENSE IN LICENSE", + "dependencies": { + "@shaderfrog/glsl-parser": "^7.0.1", + "@typescript-eslint/types": "^8.59.3", + "eslint-scope": "^9.1.2", + "eslint-visitor-keys": "^5.0.1", + "lightningcss": "^1.33.0", + "oxc-parser": "^0.143.0" + }, + "engines": { + "node": "^20.19.0 || >=22.13.0" + } + }, "node_modules/p-cancelable": { "version": "4.0.1", "dev": true, diff --git a/package.json b/package.json index 5b2aa75d4..c38b6abcc 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "format": "oxfmt", "format:check": "oxfmt --check", "test": "turbo run test", - "type-check": "turbo run type-check" + "type-check": "turbo run type-check", + "doctor": "npx react-doctor@latest" }, "workspaces": [ "alertmanager", @@ -80,12 +81,13 @@ "mdi-material-ui": "^7.9.2", "oxfmt": "0.55.0", "oxlint": "1.70.0", + "oxlint-plugin-react-doctor": "0.9.12", + "react": "^18.3.1", + "react-dom": "^18.3.1", "react-router": "^6.30.3", "react-router-dom": "^6.30.3", "rsbuild-plugin-dts": "^0.18.0", "ts-node": "^10.9.2", - "react": "^18.3.1", - "react-dom": "^18.3.1", "turbo": "^2.6.1", "typescript": "^5.4.2" }, diff --git a/tsconfig.base.json b/tsconfig.base.json index 02b5fd406..aa9dff7c1 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es2022", + "target": "es2023", "lib": ["dom", "dom.iterable", "esnext"], "module": "esnext", "jsx": "react-jsx", From 33b33ee9884946451dfde9bc06167006809eed1e Mon Sep 17 00:00:00 2001 From: Guillaume LADORME Date: Sun, 16 Aug 2026 18:20:09 +0200 Subject: [PATCH 4/7] Fix CI Signed-off-by: Guillaume LADORME --- .github/workflows/react-doctor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/react-doctor.yml b/.github/workflows/react-doctor.yml index a8727fa5a..d4e6f8501 100644 --- a/.github/workflows/react-doctor.yml +++ b/.github/workflows/react-doctor.yml @@ -12,7 +12,7 @@ on: types: [opened, synchronize, reopened, ready_for_review] # Scans `main` on every push to track the health-score trend and catch regressions that slipped past PR review. push: - branches: ["main"] + branches: ['main'] permissions: contents: read From 46512f2ae026ace85b15eb6cc17e45ddfb875674 Mon Sep 17 00:00:00 2001 From: Guillaume LADORME Date: Mon, 17 Aug 2026 14:50:15 +0200 Subject: [PATCH 5/7] Apply review feedbacks Signed-off-by: Guillaume LADORME --- .github/copilot-instructions.md | 14 ---- .github/instructions/ui.instructions.md | 70 +------------------ .oxfmtrc.json | 2 +- AGENTS.md | 2 +- STYLEGUIDE.md | 67 ++++++++++++++++++ alertmanager/package.json | 1 + alertmanager/src/components/ColumnsEditor.tsx | 6 +- .../src/components/MatchersList.test.tsx | 2 +- alertmanager/src/components/SilenceForm.tsx | 2 +- .../explore/AlertManagerSilencesExplorer.tsx | 2 +- .../src/model/alertmanager-client.test.ts | 14 ++-- alertmanager/src/model/alertmanager-client.ts | 8 +-- .../src/model/alertmanager-selectors.ts | 2 +- .../alert-table/AlertTableColumnsEditor.tsx | 18 ++--- .../AlertTableDeduplicationEditor.tsx | 8 +-- .../alert-table/AlertTableLabelsEditor.tsx | 14 ++-- .../alert-table/AlertTableOptionsEditor.tsx | 12 ++-- .../plugins/alert-table/AlertTablePanel.tsx | 12 ++-- .../alert-table/alert-table-sorting.test.ts | 2 +- .../alert-table/alert-table-sorting.ts | 2 +- .../AlertManagerAlertsQueryEditor.tsx | 14 ++-- .../get-alerts-data.test.ts | 4 +- .../get-alerts-data.ts | 6 +- .../src/plugins/alertmanager-datasource.tsx | 2 +- .../AlertManagerSilencesQueryEditor.tsx | 6 +- .../get-silences-data.test.ts | 4 +- .../get-silences-data.ts | 6 +- .../SilenceTableColumnsEditor.tsx | 18 ++--- .../SilenceTableOptionsEditor.tsx | 4 +- .../silence-table/SilenceTablePanel.tsx | 2 +- barchart/package.json | 1 + barchart/src/BarChartBase.tsx | 4 +- .../BarChartOptionsEditorSettings.test.tsx | 14 ++-- .../src/BarChartOptionsEditorSettings.tsx | 18 ++--- barchart/src/tresholds.ts | 2 +- clickhouse/package.json | 1 + .../ClickHouseDatasource.tsx | 4 +- .../src/model/click-house-client.test.ts | 8 +-- clickhouse/src/model/click-house-client.ts | 2 +- .../ClickHouseLogQueryEditor.tsx | 6 +- .../click-house-log-query-types.test.ts | 6 +- .../get-click-house-log-data.ts | 4 +- .../ClickHouseQueryEditor.tsx | 6 +- .../click-house-query-types.test.ts | 10 +-- .../get-click-house-data.ts | 4 +- clickhouse/src/queries/query-editor-model.ts | 4 +- datasourcevariable/package.json | 1 + datasourcevariable/src/DatasourceVariable.tsx | 2 +- e2e/package.json | 3 +- flamechart/package.json | 1 + flamechart/src/components/FlameChart.tsx | 4 +- flamechart/src/components/FlameChartPanel.tsx | 2 +- flamechart/src/components/SeriesChart.tsx | 4 +- flamechart/src/utils/data-transform.ts | 2 +- flamechart/src/utils/series-tooltip.ts | 2 +- flamechart/src/utils/utils.ts | 14 ++-- gaugechart/package.json | 1 + .../GaugeChartOptionsEditorSettings.test.tsx | 12 ++-- .../src/GaugeChartOptionsEditorSettings.tsx | 10 +-- gaugechart/src/GaugeChartPanel.tsx | 4 +- gaugechart/src/thresholds.ts | 2 +- greptimedb/package.json | 1 + .../GreptimeDBDatasource.test.ts | 10 +-- .../GreptimeDBDatasource.tsx | 4 +- greptimedb/src/model/greptimedb-client.ts | 2 +- .../GreptimeDBLogQueryEditor.tsx | 6 +- .../get-greptimedb-log-data.ts | 2 +- .../greptimedb-log-query-types.test.ts | 4 +- .../queries/greptimedb-query-data-model.ts | 2 +- .../GreptimeDBQueryEditor.tsx | 6 +- .../get-greptimedb-data.ts | 8 +-- .../greptimedb-query-types.test.ts | 6 +- .../GreptimeDBTraceQueryEditor.tsx | 6 +- .../get-greptimedb-trace-data.ts | 10 +-- .../greptimedb-trace-query.test.ts | 10 +-- greptimedb/src/queries/query-editor-model.ts | 2 +- heatmapchart/package.json | 1 + heatmapchart/src/components/HeatMapChart.tsx | 4 +- ...HeatMapChartOptionsEditorSettings.test.tsx | 12 ++-- .../HeatMapChartOptionsEditorSettings.tsx | 12 ++-- heatmapchart/src/utils/thresholds.ts | 2 +- histogramchart/package.json | 1 + .../src/components/HistogramChart.tsx | 4 +- ...stogramChartOptionsEditorSettings.test.tsx | 18 ++--- .../HistogramChartOptionsEditorSettings.tsx | 10 +-- histogramchart/src/utils/thresholds.ts | 2 +- jaeger/package.json | 1 + jaeger/src/model/jaeger-client.test.ts | 4 +- jaeger/src/model/jaeger-client.ts | 8 +-- jaeger/src/model/jaeger-selectors.ts | 2 +- .../plugins/JaegerTraceQueryEditor.test.tsx | 8 +-- jaeger/src/plugins/JaegerTraceQueryEditor.tsx | 14 ++-- jaeger/src/plugins/get-trace-data.test.ts | 8 +-- jaeger/src/plugins/get-trace-data.ts | 10 +-- jaeger/src/plugins/plugin.test.ts | 4 +- logexplorer/package.json | 1 + .../src/explore/log-explorer/LogExplorer.tsx | 6 +- logstable/package.json | 1 + logstable/src/LogsTablePanel.test.tsx | 2 +- .../src/components/LogRow/LogRow.test.tsx | 2 +- logstable/src/components/LogRow/LogRow.tsx | 6 +- .../src/components/LogRow/LogsStyles.tsx | 2 +- .../src/components/VirtualizedLogsList.tsx | 4 +- loki/package.json | 1 + loki/src/components/complete.test.ts | 2 +- loki/src/components/complete.ts | 2 +- loki/src/model/loki-client.test.ts | 4 +- loki/src/model/loki-client.ts | 10 +-- loki/src/model/loki-selectors.ts | 2 +- .../loki-log-query/LokiLogQueryEditor.tsx | 10 +-- .../loki-log-query/get-loki-log-data.ts | 4 +- .../loki-log-query-types.test.ts | 2 +- .../LokiTimeSeriesQueryEditor.tsx | 8 +-- .../get-loki-time-series-data.ts | 6 +- .../loki-time-series-query-types.test.ts | 4 +- loki/src/queries/query-editor-model.ts | 4 +- loki/src/variables/LokiLabelNamesVariable.tsx | 2 +- .../src/variables/LokiLabelValuesVariable.tsx | 2 +- loki/src/variables/LokiLogQLVariable.tsx | 2 +- loki/src/variables/loki-variables.tsx | 28 ++++---- markdown/package.json | 1 + opensearch/package.json | 1 + .../src/model/opensearch-client.test.ts | 10 +-- opensearch/src/model/opensearch-client.ts | 6 +- opensearch/src/model/opensearch-selectors.ts | 2 +- .../OpenSearchLogQueryEditor.tsx | 12 ++-- .../get-opensearch-log-data.test.ts | 38 +++++----- .../get-opensearch-log-data.ts | 8 +-- opensearch/src/queries/query-editor-model.ts | 4 +- package.json | 8 ++- piechart/package.json | 1 + .../src/PieChartOptionsEditorSettings.tsx | 18 ++--- piechart/src/utils.test.ts | 4 +- piechart/src/utils.ts | 10 +-- prometheus/package.json | 1 + ...PrometheusPromQLAnnotationOptionEditor.tsx | 12 ++-- .../src/annotations/get-annotation-data.ts | 10 +-- prometheus/src/components/TreeNode.tsx | 2 +- prometheus/src/components/promql/serialize.ts | 4 +- prometheus/src/components/query.ts | 4 +- .../PrometheusMetricsFinder.tsx | 2 +- .../display/list/MetricList.test.tsx | 2 +- .../filter/FilterInputs.test.tsx | 2 +- .../filter/FilterInputs.tsx | 6 +- .../explore/PrometheusMetricsFinder/utils.ts | 8 +-- prometheus/src/model/prometheus-client.ts | 20 +++--- prometheus/src/model/prometheus-selectors.ts | 4 +- prometheus/src/model/time.test.ts | 4 +- prometheus/src/model/time.ts | 2 +- .../plugins/PrometheusLabelNamesVariable.tsx | 4 +- .../plugins/PrometheusLabelValuesVariable.tsx | 8 +-- .../src/plugins/PrometheusPromQLVariable.tsx | 6 +- prometheus/src/plugins/interpolation.ts | 6 +- .../src/plugins/prometheus-datasource.test.ts | 2 +- .../src/plugins/prometheus-datasource.tsx | 2 +- .../PrometheusTimeSeriesQueryEditor.tsx | 6 +- .../get-time-series-data.ts | 10 +-- .../plugin.test.ts | 4 +- .../query-editor-model.ts | 6 +- .../replace-prom-builtin-variables.ts | 2 +- .../src/plugins/prometheus-variables.tsx | 40 +++++------ prometheus/src/utils/utils.ts | 6 +- pyroscope/package.json | 1 + pyroscope/src/components/LabelName.tsx | 2 +- pyroscope/src/explore/PyroscopeExplorer.tsx | 2 +- pyroscope/src/model/profile-query-model.ts | 2 +- pyroscope/src/model/pyroscope-client.ts | 28 ++++---- .../PyroscopeProfileQueryEditor.tsx | 4 +- .../get-profile-data.test.ts | 2 +- .../get-profile-data.ts | 4 +- .../query-editor-model.ts | 8 +-- pyroscope/src/utils/use-query.ts | 12 ++-- rsbuild.shared.ts | 2 +- scatterchart/package.json | 1 + scatterchart/src/ScatterChartPanel.test.tsx | 2 +- scatterchart/src/ScatterChartPanel.tsx | 2 +- splunk/package.json | 1 + splunk/src/model/splunk-client.ts | 12 ++-- .../splunk-log-query/SplunkLogQuery.test.ts | 4 +- .../splunk-log-query/SplunkLogQueryEditor.tsx | 4 +- .../splunk-log-query/get-splunk-log-data.ts | 14 ++-- .../SplunkTimeSeriesQuery.test.ts | 2 +- .../SplunkTimeSeriesQueryEditor.tsx | 4 +- .../get-splunk-time-series-data.ts | 8 +-- statchart/package.json | 1 + statchart/src/StatChartBase.test.tsx | 2 +- statchart/src/StatChartBase.tsx | 2 +- .../StatChartOptionsEditorSettings.test.tsx | 18 ++--- .../src/StatChartOptionsEditorSettings.tsx | 20 +++--- statchart/src/StatChartPanel.tsx | 4 +- statchart/src/utils/calculate-value.ts | 2 +- statchart/src/utils/data-transform.ts | 2 +- statchart/src/utils/get-color.ts | 4 +- staticlistvariable/package.json | 1 + staticlistvariable/src/StaticListVariable.tsx | 10 +-- statushistorychart/package.json | 1 + ...tatusHistoryChartOptionsEditorSettings.tsx | 6 +- .../src/utils/data-transform.ts | 2 +- statushistorychart/src/utils/get-color.ts | 2 +- table/package.json | 1 + table/src/TableExportAction.tsx | 2 +- .../components/ColumnsEditor/ColumnEditor.tsx | 2 +- table/src/components/ConditionalPanel.tsx | 2 +- table/src/components/TablePanel.test.tsx | 34 ++++----- table/src/components/TablePanel.tsx | 18 ++--- table/src/models/table-model.ts | 12 ++-- table/src/table-data-utils.ts | 4 +- tempo/package.json | 1 + tempo/src/components/AttributeFilters.tsx | 6 +- tempo/src/components/complete.ts | 4 +- .../components/filter/traceql_to_filter.ts | 2 +- tempo/src/model/tempo-client.test.ts | 4 +- tempo/src/model/tempo-client.ts | 10 +-- tempo/src/model/tempo-selectors.ts | 2 +- tempo/src/plugins/plugin.test.ts | 4 +- .../TempoTraceQueryEditor.tsx | 8 +-- .../tempo-trace-query/get-trace-data.test.ts | 8 +-- .../tempo-trace-query/query-editor-model.ts | 2 +- timeserieschart/package.json | 1 + timeserieschart/src/GeneralSettingsEditor.tsx | 10 +-- timeserieschart/src/QuerySettingsEditor.tsx | 16 ++--- timeserieschart/src/TimeSeriesChartBase.tsx | 4 +- .../src/TimeSeriesChartPanel.test.tsx | 6 +- timeserieschart/src/TimeSeriesChartPanel.tsx | 8 +-- timeserieschart/src/VisualOptionsEditor.tsx | 4 +- timeserieschart/src/utils/data-transform.ts | 4 +- timeserieschart/src/utils/palette-gen.test.ts | 2 +- timeserieschart/src/utils/palette.ts | 2 +- timeseriestable/package.json | 1 + .../src/TimeSeriesTablePanel.test.tsx | 2 +- timeseriestable/src/components/DataTable.tsx | 4 +- timeseriestable/src/components/SeriesName.tsx | 2 +- tracetable/package.json | 1 + tracetable/src/DataTable.tsx | 6 +- tracetable/src/TraceTablePanel.test.tsx | 2 +- tracetable/src/utils/palette.ts | 2 +- tracetable/src/utils/utils.ts | 2 +- tracingganttchart/package.json | 1 + .../DetailPane/Attributes.test.tsx | 6 +- .../DetailPane/SpanEvents.test.tsx | 2 +- .../DetailPane/SpanLinks.test.tsx | 4 +- .../GanttTable/GanttTable.test.tsx | 2 +- .../GanttTable/SpanDuration.test.tsx | 2 +- .../GanttTable/SpanIndents.tsx | 2 +- .../GanttTable/SpanName.test.tsx | 2 +- .../MiniGanttChart/Canvas.tsx | 2 +- .../TracingGanttChart/MiniGanttChart/draw.ts | 4 +- .../src/TracingGanttChart/Search.test.tsx | 2 +- .../TracingGanttChart/TraceHeaderBar.test.tsx | 2 +- .../TracingGanttChart/TracingGanttChart.tsx | 2 +- .../src/TracingGanttChart/palette.ts | 2 +- .../src/TracingGanttChart/utils.ts | 4 +- turbo.json | 9 +++ victorialogs/package.json | 1 + .../VictoriaLogsDatasource.tsx | 2 +- victorialogs/src/model/client.ts | 16 ++--- victorialogs/src/model/selectors.ts | 4 +- .../VictoriaLogsLogQueryEditor.tsx | 4 +- .../queries/victorialogs-log-query/query.ts | 4 +- .../victorialogs-log-query/types.test.ts | 2 +- .../VictoriaLogsTimeSeriesQueryEditor.tsx | 4 +- .../victorialogs-time-series-query/query.ts | 6 +- .../types.test.ts | 2 +- victorialogs/src/variables/utils.ts | 4 +- .../VictoriaLogsFieldNamesVariable.tsx | 2 +- .../VictoriaLogsFieldNamesVariableEditor.tsx | 12 ++-- .../VictoriaLogsFieldValuesVariable.tsx | 2 +- .../VictoriaLogsFieldValuesVariableEditor.tsx | 16 ++--- 268 files changed, 837 insertions(+), 808 deletions(-) delete mode 100644 .github/copilot-instructions.md create mode 100644 STYLEGUIDE.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md deleted file mode 100644 index 6a6a12e3e..000000000 --- a/.github/copilot-instructions.md +++ /dev/null @@ -1,14 +0,0 @@ -# Perses plugins repository instructions - -Follow [`AGENTS.md`](../AGENTS.md) for architecture, validation, compatibility, and completion requirements. For every -TypeScript or React file, also follow the path-specific UI instructions in `.github/instructions/ui.instructions.md`. - -- Treat each lower-case top-level directory as a cohesive, independently published plugin workspace. -- Keep runtime code, editor UI, CUE schema, Go SDK, documentation, examples, and tests aligned when a contract changes. -- Preserve plugin identities, serialized fields, defaults, package metadata, and public APIs unless a breaking change is - explicitly requested. -- Use public exports from `@perses-dev/*`; do not deep-import other repositories or duplicate shared contracts. -- Do not edit upper-case built plugin directories, `dist/`, `cue.mod/pkg/`, or other generated output. -- Add focused tests, Apache headers on new source files, and run the affected workspace checks before root checks. -- Do not add Oxlint warnings, raise warning ceilings, use broad suppressions, or change dependency versions without a - task-specific reason. diff --git a/.github/instructions/ui.instructions.md b/.github/instructions/ui.instructions.md index 872308b83..be21f4766 100644 --- a/.github/instructions/ui.instructions.md +++ b/.github/instructions/ui.instructions.md @@ -1,71 +1,5 @@ --- -applyTo: "**/*.ts,**/*.tsx" +applyTo: '**/*.ts,**/*.tsx' --- -# Perses UI quality instructions - -Use these rules for new and modified TypeScript/React code. Older code may not follow every rule; improve the code you -touch without expanding the task into unrelated cleanup. - -## Design and package boundaries - -- Inspect neighboring code and the package's public entry point before adding a new pattern. -- Keep feature-specific code beside its feature. Move code to a shared component or utility only when there is a proven - cross-feature use case. -- Respect package dependency direction and public exports. Do not deep-import another package's internal files. -- Prefer small, composable components and pure utilities over components that combine rendering, data transformation, - network access, and orchestration. -- Do not add a dependency when an existing Perses package, current dependency, or small local helper solves the problem. - -## TypeScript and public APIs - -- Preserve strict typing. Prefer `unknown` plus narrowing over `any`, unchecked casts, non-null assertions, or blanket - TypeScript suppressions. -- Give exported functions and module boundaries explicit return types. Model invalid states out of the type system when - practical. -- Component prop types use `ComponentNameProps`; export them when the component is public. -- Use named exports. Update the package's public barrel only when the symbol is intentionally part of its supported API. -- Prefer optional properties and `undefined` unless `null` has explicit domain meaning. -- Validate untrusted or persisted input at a boundary; do not assume a TypeScript type validates runtime data. - -## React, compiler, and rendering performance - -- Follow the Rules of Hooks. Hooks are called unconditionally at component top level and have complete dependencies. -- Keep render pure: do not mutate props, state, hook-returned values, module globals, or refs during render. -- Do not read `ref.current` to calculate rendered output. Read or write refs in effects, layout effects, or event - handlers. -- Derive values during render instead of synchronously setting derived state in an effect. Use effects only to - synchronize with external systems and always clean up subscriptions, timers, and requests. -- Define components at module scope, not inside another component's render path. -- Keep props stable when identity affects rendering: hoist static objects and arrays, and use `useMemo` or `useCallback` - for dynamic values passed across memoized boundaries. Do not add memoization blindly or omit dependencies. -- Memoize React context values when they contain objects or functions whose identity would otherwise change each render. -- Avoid array-index keys when a stable domain identifier exists. -- Treat `react/react-compiler` and `react-perf` diagnostics as design feedback. Fix new warnings rather than disabling - the rule or increasing the repository warning ceiling. - -## Components, state, and accessibility - -- Start with existing Perses and Material UI components. Use theme tokens and `sx`; avoid hard-coded colors and - arbitrary spacing when a theme value exists. -- Import Material Design icons directly from their icon module instead of the `mdi-material-ui` package barrel. -- Keep state as close as possible to its consumers. Use TanStack Query for server state and avoid copying query data - into local state without a clear reason. -- Introduce context only for genuinely cross-cutting state. Library components should allow consumers to own - application-level state. -- Provide loading, empty, error, and disabled states where applicable. Preserve error causes and never expose secrets or - credentials in UI messages or logs. -- Use semantic HTML, labels, keyboard interaction, and correct ARIA relationships. Do not silence accessibility rules - when the markup can be corrected. - -## Tests and quality gates - -- Add or update tests for new behavior and regressions. Keep tests beside source as `*.test.ts` or `*.test.tsx`. -- Test observable behavior with React Testing Library and `user-event`. Prefer role, name, label, and visible-text - queries; use test IDs only as a last resort. -- Use Playwright for critical end-to-end flows or browser behavior that unit/integration tests cannot cover. -- Run a focused test while iterating, then the affected workspace's type-check and test commands. -- Before completion, run repository-level `npm run lint:ci`, `npm run format:check`, and `npm run type-check`. -- Oxfmt owns formatting and import sorting. Do not manually fight its output. -- A lint suppression must be narrow, name the rule, and include a nearby explanation of why the exception is necessary. - Do not enable type-aware linting or change lint configuration unless the task explicitly concerns repository tooling. +Follow the TypeScript and React guidance in [`STYLEGUIDE.md`](../../STYLEGUIDE.md). diff --git a/.oxfmtrc.json b/.oxfmtrc.json index 60c475e65..5ab41a97e 100644 --- a/.oxfmtrc.json +++ b/.oxfmtrc.json @@ -2,7 +2,7 @@ "$schema": "./node_modules/oxfmt/configuration_schema.json", "printWidth": 120, "singleQuote": true, - "trailingComma": "es5", + "trailingComma": "all", "sortImports": {}, "sortPackageJson": false, "ignorePatterns": [ diff --git a/AGENTS.md b/AGENTS.md index 3ebadaaa0..0c10fa554 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -10,7 +10,7 @@ Before editing: - Read `README.md` and `.github/pull_request_template.md` for repository and pull-request conventions. - Read the affected plugin's `README.md`, `package.json`, and neighboring implementations. -- For TypeScript or React work, also follow `.github/instructions/ui.instructions.md`. +- For TypeScript or React work, also follow `STYLEGUIDE.md`. ## Architecture map diff --git a/STYLEGUIDE.md b/STYLEGUIDE.md new file mode 100644 index 000000000..62624b2bc --- /dev/null +++ b/STYLEGUIDE.md @@ -0,0 +1,67 @@ +# Perses UI quality instructions + +Use these rules for new and modified TypeScript/React code. Older code may not follow every rule; improve the code you +touch without expanding the task into unrelated cleanup. + +## Design and package boundaries + +- Inspect neighboring code and the package's public entry point before adding a new pattern. +- Keep feature-specific code beside its feature. Move code to a shared component or utility only when there is a proven + cross-feature use case. +- Respect package dependency direction and public exports. Do not deep-import another package's internal files. +- Prefer small, composable components and pure utilities over components that combine rendering, data transformation, + network access, and orchestration. +- Do not add a dependency when an existing Perses package, current dependency, or small local helper solves the problem. + +## TypeScript and public APIs + +- Preserve strict typing. Prefer `unknown` plus narrowing over `any`, unchecked casts, non-null assertions, or blanket + TypeScript suppressions. +- Give exported functions and module boundaries explicit return types. Model invalid states out of the type system when + practical. +- Component prop types use `ComponentNameProps`; export them when the component is public. +- Use named exports. Update the package's public barrel only when the symbol is intentionally part of its supported API. +- Prefer optional properties and `undefined` unless `null` has explicit domain meaning. +- Validate untrusted or persisted input at a boundary; do not assume a TypeScript type validates runtime data. + +## React, compiler, and rendering performance + +- Follow the Rules of Hooks. Hooks are called unconditionally at component top level and have complete dependencies. +- Keep render pure: do not mutate props, state, hook-returned values, module globals, or refs during render. +- Do not read `ref.current` to calculate rendered output. Read or write refs in effects, layout effects, or event + handlers. +- Derive values during render instead of synchronously setting derived state in an effect. Use effects only to + synchronize with external systems and always clean up subscriptions, timers, and requests. +- Define components at module scope, not inside another component's render path. +- Keep props stable when identity affects rendering: hoist static objects and arrays, and use `useMemo` or `useCallback` + for dynamic values passed across memoized boundaries. Do not add memoization blindly or omit dependencies. +- Memoize React context values when they contain objects or functions whose identity would otherwise change each render. +- Avoid array-index keys when a stable domain identifier exists. +- Treat `react/react-compiler` and `react-perf` diagnostics as design feedback. Fix new warnings rather than disabling + the rule or increasing the repository warning ceiling. + +## Components, state, and accessibility + +- Start with existing Perses and Material UI components. Use theme tokens and `sx`; avoid hard-coded colors and + arbitrary spacing when a theme value exists. +- Import Material Design icons directly from their icon module instead of the `mdi-material-ui` package barrel. +- Keep state as close as possible to its consumers. Use TanStack Query for server state and avoid copying query data + into local state without a clear reason. +- Introduce context only for genuinely cross-cutting state. Library components should allow consumers to own + application-level state. +- Provide loading, empty, error, and disabled states where applicable. Preserve error causes and never expose secrets or + credentials in UI messages or logs. +- Use semantic HTML, labels, keyboard interaction, and correct ARIA relationships. Do not silence accessibility rules + when the markup can be corrected. + +## Tests and quality gates + +- Add or update tests for new behavior and regressions. Keep tests beside source as `*.test.ts` or `*.test.tsx`. +- Test observable behavior with React Testing Library and `user-event`. Prefer role, name, label, and visible-text + queries; use test IDs only as a last resort. +- Use Playwright for critical end-to-end flows or browser behavior that unit/integration tests cannot cover. +- Run a focused test while iterating, then the affected workspace's type-check and test commands. +- Before completion, run repository-level `npm run lint:ci`, `npm run format:check`, and `npm run type-check`. +- Oxfmt owns formatting and import sorting. Do not manually fight its output. +- A lint suppression must be narrow, name the rule, and include a nearby explanation of why the exception is necessary. + Do not enable type-aware linting or change lint configuration unless the task explicitly concerns repository tooling. diff --git a/alertmanager/package.json b/alertmanager/package.json index ae4e331da..2b0aa2e75 100644 --- a/alertmanager/package.json +++ b/alertmanager/package.json @@ -19,6 +19,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/alertmanager/src/components/ColumnsEditor.tsx b/alertmanager/src/components/ColumnsEditor.tsx index 91aaab7c8..4274c0f8a 100644 --- a/alertmanager/src/components/ColumnsEditor.tsx +++ b/alertmanager/src/components/ColumnsEditor.tsx @@ -219,7 +219,7 @@ export function ColumnsEditor(props: ColumnsEdit idsRef.current.splice(index, 1); onRemove(index); }, - [onRemove] + [onRemove], ); const handleMoveUp = useCallback( @@ -230,7 +230,7 @@ export function ColumnsEditor(props: ColumnsEdit ids.splice(index - 1, 0, id); onMoveUp(index); }, - [onMoveUp] + [onMoveUp], ); const handleMoveDown = useCallback( @@ -241,7 +241,7 @@ export function ColumnsEditor(props: ColumnsEdit ids.splice(index + 1, 0, id); onMoveDown(index); }, - [onMoveDown] + [onMoveDown], ); return ( diff --git a/alertmanager/src/components/MatchersList.test.tsx b/alertmanager/src/components/MatchersList.test.tsx index 08a025d6d..91a98919a 100644 --- a/alertmanager/src/components/MatchersList.test.tsx +++ b/alertmanager/src/components/MatchersList.test.tsx @@ -43,7 +43,7 @@ describe('MatchersList', () => { { name: 'alertname', value: 'HighMemory', isEqual: true, isRegex: false }, { name: 'severity', value: 'critical', isEqual: true, isRegex: false }, ]} - /> + />, ); expect(screen.getByText('alertname="HighMemory"')).toBeInTheDocument(); expect(screen.getByText('severity="critical"')).toBeInTheDocument(); diff --git a/alertmanager/src/components/SilenceForm.tsx b/alertmanager/src/components/SilenceForm.tsx index 34a575766..60e25a588 100644 --- a/alertmanager/src/components/SilenceForm.tsx +++ b/alertmanager/src/components/SilenceForm.tsx @@ -59,7 +59,7 @@ export function SilenceForm({ open, onClose, onSubmit, initialSilence }: Silence isEqual: m.isEqual, isRegex: m.isRegex, })) - : [{ ...DEFAULT_MATCHER }] + : [{ ...DEFAULT_MATCHER }], ); const [startsAt, setStartsAt] = useState(initialSilence?.startsAt?.slice(0, 16) ?? getNowLocalISO()); const [endsAt, setEndsAt] = useState(initialSilence?.endsAt?.slice(0, 16) ?? getDefaultEndTime()); diff --git a/alertmanager/src/explore/AlertManagerSilencesExplorer.tsx b/alertmanager/src/explore/AlertManagerSilencesExplorer.tsx index 83cb8c619..500c35900 100644 --- a/alertmanager/src/explore/AlertManagerSilencesExplorer.tsx +++ b/alertmanager/src/explore/AlertManagerSilencesExplorer.tsx @@ -67,7 +67,7 @@ function CreateSilenceButton({ queries }: { queries: QueryDefinition[] }): React exceptionSnackbar(err); } }, - [amClient, queryClient, successSnackbar, exceptionSnackbar] + [amClient, queryClient, successSnackbar, exceptionSnackbar], ); return ( diff --git a/alertmanager/src/model/alertmanager-client.test.ts b/alertmanager/src/model/alertmanager-client.test.ts index 751171be3..8a9c5ec86 100644 --- a/alertmanager/src/model/alertmanager-client.test.ts +++ b/alertmanager/src/model/alertmanager-client.test.ts @@ -75,7 +75,7 @@ describe('alertmanager-client', () => { active: true, receiver: 'team-a', }, - { datasourceUrl: 'http://am.example' } + { datasourceUrl: 'http://am.example' }, ); expect(fetchMock).toHaveBeenCalledWith( @@ -83,7 +83,7 @@ describe('alertmanager-client', () => { { method: 'GET', headers: {}, - } + }, ); }); @@ -124,7 +124,7 @@ describe('alertmanager-client', () => { it('throws on non-ok response with JSON error body', async () => { fetchMock.mockResolvedValueOnce( - mockErrorResponse(500, 'Internal Server Error', { message: 'backend overloaded' }) + mockErrorResponse(500, 'Internal Server Error', { message: 'backend overloaded' }), ); await expect(getAlerts(undefined, { datasourceUrl: 'http://am.example' })).rejects.toThrow('backend overloaded'); @@ -168,7 +168,7 @@ describe('alertmanager-client', () => { id: 'silence-123', status: { state: 'active' }, matchers: [], - }) + }), ); await getSilence('silence/123', { datasourceUrl: 'http://am.example' }); @@ -219,7 +219,7 @@ describe('alertmanager-client', () => { fetchMock.mockResolvedValueOnce(mockErrorResponse(400, 'Bad Request', { message: 'silence already expired' })); await expect(deleteSilence('silence-456', { datasourceUrl: 'http://am.example' })).rejects.toThrow( - 'silence already expired' + 'silence already expired', ); }); @@ -227,7 +227,7 @@ describe('alertmanager-client', () => { fetchMock.mockResolvedValueOnce(mockErrorResponse(500, 'Internal Server Error')); await expect(deleteSilence('silence-456', { datasourceUrl: 'http://am.example' })).rejects.toThrow( - 'Internal Server Error' + 'Internal Server Error', ); }); @@ -275,7 +275,7 @@ describe('alertmanager-client', () => { }); await expect(getAlerts(undefined, { datasourceUrl: 'http://am.example' })).rejects.toThrow( - 'Invalid response from server' + 'Invalid response from server', ); }); }); diff --git a/alertmanager/src/model/alertmanager-client.ts b/alertmanager/src/model/alertmanager-client.ts index 4890a96e7..68d52ece2 100644 --- a/alertmanager/src/model/alertmanager-client.ts +++ b/alertmanager/src/model/alertmanager-client.ts @@ -80,7 +80,7 @@ function buildSearchParams(params: Record | object): URLSearchP function fetchWithGet( apiURI: string, params: Record | object, - queryOptions: AlertManagerQueryOptions + queryOptions: AlertManagerQueryOptions, ): Promise { const { datasourceUrl, headers = {} } = queryOptions; @@ -98,7 +98,7 @@ function fetchWithGet( export function getAlerts( params?: AlertsQueryParams, - queryOptions?: AlertManagerQueryOptions + queryOptions?: AlertManagerQueryOptions, ): Promise { const opts = queryOptions ?? { datasourceUrl: '' }; return fetchWithGet('/api/v2/alerts', params ?? {}, opts); @@ -106,7 +106,7 @@ export function getAlerts( export function getSilences( params?: SilencesQueryParams, - queryOptions?: AlertManagerQueryOptions + queryOptions?: AlertManagerQueryOptions, ): Promise { const opts = queryOptions ?? { datasourceUrl: '' }; return fetchWithGet('/api/v2/silences', params ?? {}, opts); @@ -118,7 +118,7 @@ export function getSilence(id: string, queryOptions: AlertManagerQueryOptions): export function createSilence( silence: PostableSilence, - queryOptions: AlertManagerQueryOptions + queryOptions: AlertManagerQueryOptions, ): Promise<{ silenceID: string }> { const { datasourceUrl, headers = {} } = queryOptions; diff --git a/alertmanager/src/model/alertmanager-selectors.ts b/alertmanager/src/model/alertmanager-selectors.ts index 382e191ee..49e30ca9e 100644 --- a/alertmanager/src/model/alertmanager-selectors.ts +++ b/alertmanager/src/model/alertmanager-selectors.ts @@ -27,7 +27,7 @@ export function isDefaultAlertManagerSelector(datasourceSelectValue: DatasourceS } export function isAlertManagerDatasourceSelector( - datasourceSelectValue: DatasourceSelectValue + datasourceSelectValue: DatasourceSelectValue, ): datasourceSelectValue is AlertManagerDatasourceSelector { return isVariableDatasource(datasourceSelectValue) || datasourceSelectValue.kind === ALERTMANAGER_DATASOURCE_KIND; } diff --git a/alertmanager/src/plugins/alert-table/AlertTableColumnsEditor.tsx b/alertmanager/src/plugins/alert-table/AlertTableColumnsEditor.tsx index b8c550577..d59180666 100644 --- a/alertmanager/src/plugins/alert-table/AlertTableColumnsEditor.tsx +++ b/alertmanager/src/plugins/alert-table/AlertTableColumnsEditor.tsx @@ -35,7 +35,7 @@ export function AlertTableColumnsEditor(props: OptionsEditorProps { if (!draft.columns) draft.columns = []; draft.columns.push({ name: '' }); - }) + }), ); }, [value, onChange]); @@ -44,10 +44,10 @@ export function AlertTableColumnsEditor(props: OptionsEditorProps { draft.columns?.splice(index, 1); - }) + }), ); }, - [value, onChange] + [value, onChange], ); const handleUpdateColumn = useCallback( @@ -58,10 +58,10 @@ export function AlertTableColumnsEditor(props: OptionsEditorProps= draft.columns.length - 1) return; const item = draft.columns.splice(index, 1)[0]!; draft.columns.splice(index + 1, 0, item); - }) + }), ); }, - [value, onChange] + [value, onChange], ); return ( diff --git a/alertmanager/src/plugins/alert-table/AlertTableDeduplicationEditor.tsx b/alertmanager/src/plugins/alert-table/AlertTableDeduplicationEditor.tsx index 2ab83ca3a..b56a58beb 100644 --- a/alertmanager/src/plugins/alert-table/AlertTableDeduplicationEditor.tsx +++ b/alertmanager/src/plugins/alert-table/AlertTableDeduplicationEditor.tsx @@ -37,10 +37,10 @@ export function AlertTableDeduplicationEditor(props: OptionsEditorProps 0 ? newLabels : undefined; - }) + }), ); }, - [value, onChange] + [value, onChange], ); return ( diff --git a/alertmanager/src/plugins/alert-table/AlertTableLabelsEditor.tsx b/alertmanager/src/plugins/alert-table/AlertTableLabelsEditor.tsx index 72c8b1b4c..87f6e97ef 100644 --- a/alertmanager/src/plugins/alert-table/AlertTableLabelsEditor.tsx +++ b/alertmanager/src/plugins/alert-table/AlertTableLabelsEditor.tsx @@ -65,7 +65,7 @@ function LabelMappingEntry({ draft.overrides?.splice(overrideIndex, 1); }); }, - [index, onUpdate] + [index, onUpdate], ); const handleUpdateOverride = useCallback( @@ -81,7 +81,7 @@ function LabelMappingEntry({ } }); }, - [index, onUpdate] + [index, onUpdate], ); return ( @@ -181,7 +181,7 @@ export function AlertTableLabelsEditor(props: OptionsEditorProps { if (!draft.labelColorMappings) draft.labelColorMappings = []; draft.labelColorMappings.push({ labelKey: '', mode: 'auto' }); - }) + }), ); }, [value, onChange]); @@ -190,10 +190,10 @@ export function AlertTableLabelsEditor(props: OptionsEditorProps { draft.labelColorMappings?.splice(index, 1); - }) + }), ); }, - [value, onChange] + [value, onChange], ); const handleUpdateMapping = useCallback( @@ -204,10 +204,10 @@ export function AlertTableLabelsEditor(props: OptionsEditorProps { draft.defaultGroupBy = newValue.length > 0 ? newValue : undefined; - }) + }), ); }, - [value, onChange] + [value, onChange], ); const handleRunbookKeyChange = useCallback( @@ -46,10 +46,10 @@ export function AlertTableOptionsEditor(props: OptionsEditorProps { const trimmed = e.target.value.trim(); draft.runbookAnnotationKey = trimmed || undefined; - }) + }), ); }, - [value, onChange] + [value, onChange], ); const handleToggle = useCallback( @@ -64,10 +64,10 @@ export function AlertTableOptionsEditor(props: OptionsEditorProps= 0) current.splice(idx, 1); } draft.allowedActions = current; - }) + }), ); }, - [value, onChange] + [value, onChange], ); return ( diff --git a/alertmanager/src/plugins/alert-table/AlertTablePanel.tsx b/alertmanager/src/plugins/alert-table/AlertTablePanel.tsx index 4192f00bd..fe71967b2 100644 --- a/alertmanager/src/plugins/alert-table/AlertTablePanel.tsx +++ b/alertmanager/src/plugins/alert-table/AlertTablePanel.tsx @@ -363,7 +363,7 @@ export function AlertTablePanel({ spec, queryResults, contentDimensions }: Alert exceptionSnackbar(err); } }, - [amClient, queryClient, successSnackbar, exceptionSnackbar] + [amClient, queryClient, successSnackbar, exceptionSnackbar], ); const silenceInitial = useMemo(() => { @@ -381,7 +381,7 @@ export function AlertTablePanel({ spec, queryResults, contentDimensions }: Alert const defaultGroupBy = useMemo(() => spec.defaultGroupBy ?? ['alertname'], [spec.defaultGroupBy]); const variableNames = useMemo( () => [...new Set(defaultGroupBy.flatMap((entry) => parseVariables(entry)))], - [defaultGroupBy] + [defaultGroupBy], ); const variableState = useAllVariableValues(variableNames); @@ -416,7 +416,7 @@ export function AlertTablePanel({ spec, queryResults, contentDimensions }: Alert const effectiveActions = useMemo( () => spec.allowedActions ?? ALL_ALERT_ACTIONS, - [spec.allowedActions] + [spec.allowedActions], ); const showActionsColumn = effectiveActions.length > 0; const runbookAnnotationKey = spec.runbookAnnotationKey || 'runbook_url'; @@ -428,7 +428,7 @@ export function AlertTablePanel({ spec, queryResults, contentDimensions }: Alert const allTrackedKeys = useMemo( () => [...new Set([...labelKeys, ...columnDefs.map((c) => c.name)])], - [labelKeys, columnDefs] + [labelKeys, columnDefs], ); const initialSort = useMemo(() => { @@ -505,8 +505,8 @@ export function AlertTablePanel({ spec, queryResults, contentDimensions }: Alert compareGroupsByColumn( a.summary.labelCounts?.[sortState.columnName], b.summary.labelCounts?.[sortState.columnName], - sortState - ) + sortState, + ), ); } diff --git a/alertmanager/src/plugins/alert-table/alert-table-sorting.test.ts b/alertmanager/src/plugins/alert-table/alert-table-sorting.test.ts index 527d1a207..26f3c2d45 100644 --- a/alertmanager/src/plugins/alert-table/alert-table-sorting.test.ts +++ b/alertmanager/src/plugins/alert-table/alert-table-sorting.test.ts @@ -23,7 +23,7 @@ import { const makeAlert = ( labels: Record, - overrides?: Partial> + overrides?: Partial>, ): Alert => ({ id: 'fp', name: overrides?.name ?? labels['alertname'] ?? '', diff --git a/alertmanager/src/plugins/alert-table/alert-table-sorting.ts b/alertmanager/src/plugins/alert-table/alert-table-sorting.ts index 0a75c8de2..d620e07c3 100644 --- a/alertmanager/src/plugins/alert-table/alert-table-sorting.ts +++ b/alertmanager/src/plugins/alert-table/alert-table-sorting.ts @@ -142,7 +142,7 @@ function getMostCriticalSeverity(counts: Record): { weight: numb export function compareGroupsByColumn( aCounts: Record | undefined, bCounts: Record | undefined, - sort: SortState + sort: SortState, ): number { const emptyA = !aCounts || Object.keys(aCounts).length === 0; const emptyB = !bCounts || Object.keys(bCounts).length === 0; diff --git a/alertmanager/src/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.tsx b/alertmanager/src/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.tsx index b4d75cf2c..2c3d4027f 100644 --- a/alertmanager/src/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.tsx +++ b/alertmanager/src/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.tsx @@ -41,7 +41,7 @@ export function AlertManagerAlertsQueryEditor(props: AlertManagerAlertsQueryEdit onChange( produce(value, (draft) => { draft.datasource = isDefaultAlertManagerSelector(next) ? undefined : next; - }) + }), ); return; } @@ -57,10 +57,10 @@ export function AlertManagerAlertsQueryEditor(props: AlertManagerAlertsQueryEdit .split('\n') .map((f) => f.trim()) .filter((f) => f !== ''); - }) + }), ); }, - [onChange, value] + [onChange, value], ); const handleBooleanChange = useCallback( @@ -68,10 +68,10 @@ export function AlertManagerAlertsQueryEditor(props: AlertManagerAlertsQueryEdit onChange( produce(value, (draft) => { draft[field] = checked; - }) + }), ); }, - [onChange, value] + [onChange, value], ); const handleReceiverChange = useCallback( @@ -79,10 +79,10 @@ export function AlertManagerAlertsQueryEditor(props: AlertManagerAlertsQueryEdit onChange( produce(value, (draft) => { draft.receiver = receiver.trim() === '' ? undefined : receiver.trim(); - }) + }), ); }, - [onChange, value] + [onChange, value], ); return ( diff --git a/alertmanager/src/plugins/alertmanager-alerts-query/get-alerts-data.test.ts b/alertmanager/src/plugins/alertmanager-alerts-query/get-alerts-data.test.ts index 4855b91b9..21235485f 100644 --- a/alertmanager/src/plugins/alertmanager-alerts-query/get-alerts-data.test.ts +++ b/alertmanager/src/plugins/alertmanager-alerts-query/get-alerts-data.test.ts @@ -56,7 +56,7 @@ function createContext(client: AlertManagerClient): AlertsQueryContext { datasourceStore: { getDatasource: jest.fn(), getDatasourceClient: jest.fn(() => - Promise.resolve(client) + Promise.resolve(client), ) as AlertsQueryContext['datasourceStore']['getDatasourceClient'], listDatasourceSelectItems: jest.fn(async () => []), getLocalDatasources: jest.fn(), @@ -154,7 +154,7 @@ describe('getAlertsData', () => { expect.objectContaining({ filter: ['team="ops"'], receiver: 'slack-ops', - }) + }), ); }); }); diff --git a/alertmanager/src/plugins/alertmanager-alerts-query/get-alerts-data.ts b/alertmanager/src/plugins/alertmanager-alerts-query/get-alerts-data.ts index 50f8cf884..9b676f8e1 100644 --- a/alertmanager/src/plugins/alertmanager-alerts-query/get-alerts-data.ts +++ b/alertmanager/src/plugins/alertmanager-alerts-query/get-alerts-data.ts @@ -94,7 +94,7 @@ function transformAlert(apiAlert: GettableAlert): Alert { */ export async function getAlertsData( spec: AlertManagerAlertsQuerySpec, - context: AlertsQueryContext + context: AlertsQueryContext, ): Promise { const listDatasourceSelectItems = await context.datasourceStore.listDatasourceSelectItems(ALERTMANAGER_DATASOURCE_KIND); @@ -134,7 +134,7 @@ function buildQueryString(spec: AlertManagerAlertsQuerySpec): string { silenced: spec.silenced, inhibited: spec.inhibited, receiver: spec.receiver, - }).filter(([, value]) => value !== undefined) - ) + }).filter(([, value]) => value !== undefined), + ), ); } diff --git a/alertmanager/src/plugins/alertmanager-datasource.tsx b/alertmanager/src/plugins/alertmanager-datasource.tsx index 652c9a938..1044659e1 100644 --- a/alertmanager/src/plugins/alertmanager-datasource.tsx +++ b/alertmanager/src/plugins/alertmanager-datasource.tsx @@ -27,7 +27,7 @@ import { AlertManagerDatasourceSpec } from './types'; const createClient: DatasourcePlugin['createClient'] = ( spec, - options + options, ) => { const { directUrl, proxy } = spec; const { proxyUrl } = options; diff --git a/alertmanager/src/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.tsx b/alertmanager/src/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.tsx index 525da3a29..196a9ad56 100644 --- a/alertmanager/src/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.tsx +++ b/alertmanager/src/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.tsx @@ -41,7 +41,7 @@ export function AlertManagerSilencesQueryEditor(props: AlertManagerSilencesQuery onChange( produce(value, (draft) => { draft.datasource = isDefaultAlertManagerSelector(next) ? undefined : next; - }) + }), ); return; } @@ -57,10 +57,10 @@ export function AlertManagerSilencesQueryEditor(props: AlertManagerSilencesQuery .split('\n') .map((f) => f.trim()) .filter((f) => f !== ''); - }) + }), ); }, - [onChange, value] + [onChange, value], ); return ( diff --git a/alertmanager/src/plugins/alertmanager-silences-query/get-silences-data.test.ts b/alertmanager/src/plugins/alertmanager-silences-query/get-silences-data.test.ts index ad2214653..a3f4695d9 100644 --- a/alertmanager/src/plugins/alertmanager-silences-query/get-silences-data.test.ts +++ b/alertmanager/src/plugins/alertmanager-silences-query/get-silences-data.test.ts @@ -58,7 +58,7 @@ function createContext(client: AlertManagerClient): SilencesQueryContext { datasourceStore: { getDatasource: jest.fn(), getDatasourceClient: jest.fn(() => - Promise.resolve(client) + Promise.resolve(client), ) as SilencesQueryContext['datasourceStore']['getDatasourceClient'], listDatasourceSelectItems: jest.fn(async () => []), getLocalDatasources: jest.fn(), @@ -142,7 +142,7 @@ describe('getSilencesData', () => { expect(client.getSilences).toHaveBeenCalledWith( expect.objectContaining({ filter: ['team="ops"'], - }) + }), ); }); }); diff --git a/alertmanager/src/plugins/alertmanager-silences-query/get-silences-data.ts b/alertmanager/src/plugins/alertmanager-silences-query/get-silences-data.ts index 0c40dfcea..a074c0e4d 100644 --- a/alertmanager/src/plugins/alertmanager-silences-query/get-silences-data.ts +++ b/alertmanager/src/plugins/alertmanager-silences-query/get-silences-data.ts @@ -42,7 +42,7 @@ function transformSilence(apiSilence: GettableSilence): Silence { */ export async function getSilencesData( spec: AlertManagerSilencesQuerySpec, - context: SilencesQueryContext + context: SilencesQueryContext, ): Promise { const listDatasourceSelectItems = await context.datasourceStore.listDatasourceSelectItems(ALERTMANAGER_DATASOURCE_KIND); @@ -72,7 +72,7 @@ function buildQueryString(spec: AlertManagerSilencesQuerySpec): string { Object.fromEntries( Object.entries({ filters: spec.filters, - }).filter(([, value]) => value !== undefined) - ) + }).filter(([, value]) => value !== undefined), + ), ); } diff --git a/alertmanager/src/plugins/silence-table/SilenceTableColumnsEditor.tsx b/alertmanager/src/plugins/silence-table/SilenceTableColumnsEditor.tsx index 2dfce0580..70678604e 100644 --- a/alertmanager/src/plugins/silence-table/SilenceTableColumnsEditor.tsx +++ b/alertmanager/src/plugins/silence-table/SilenceTableColumnsEditor.tsx @@ -57,7 +57,7 @@ export function SilenceTableColumnsEditor(props: OptionsEditorProps { if (!draft.columns) draft.columns = []; draft.columns.push({ name: FIELD_OPTIONS[0] ?? 'updatedAt' }); - }) + }), ); }, [value, onChange]); @@ -66,10 +66,10 @@ export function SilenceTableColumnsEditor(props: OptionsEditorProps { draft.columns?.splice(index, 1); - }) + }), ); }, - [value, onChange] + [value, onChange], ); const handleUpdateColumn = useCallback( @@ -80,10 +80,10 @@ export function SilenceTableColumnsEditor(props: OptionsEditorProps= draft.columns.length - 1) return; const item = draft.columns.splice(index, 1)[0]!; draft.columns.splice(index + 1, 0, item); - }) + }), ); }, - [value, onChange] + [value, onChange], ); return ( diff --git a/alertmanager/src/plugins/silence-table/SilenceTableOptionsEditor.tsx b/alertmanager/src/plugins/silence-table/SilenceTableOptionsEditor.tsx index 6fa317d3d..fd12f8bca 100644 --- a/alertmanager/src/plugins/silence-table/SilenceTableOptionsEditor.tsx +++ b/alertmanager/src/plugins/silence-table/SilenceTableOptionsEditor.tsx @@ -39,10 +39,10 @@ export function SilenceTableOptionsEditor(props: OptionsEditorProps= 0) current.splice(idx, 1); } draft.allowedActions = current; - }) + }), ); }, - [value, onChange] + [value, onChange], ); return ( diff --git a/alertmanager/src/plugins/silence-table/SilenceTablePanel.tsx b/alertmanager/src/plugins/silence-table/SilenceTablePanel.tsx index 1aaf8df25..9aa38cde2 100644 --- a/alertmanager/src/plugins/silence-table/SilenceTablePanel.tsx +++ b/alertmanager/src/plugins/silence-table/SilenceTablePanel.tsx @@ -159,7 +159,7 @@ export function SilenceTablePanel({ spec, queryResults, contentDimensions }: Sil const effectiveActions = useMemo( () => spec?.allowedActions ?? ALL_SILENCE_ACTIONS, - [spec?.allowedActions] + [spec?.allowedActions], ); const showActionsColumn = effectiveActions.length > 0; diff --git a/barchart/package.json b/barchart/package.json index a33174756..6bd359a37 100644 --- a/barchart/package.json +++ b/barchart/package.json @@ -18,6 +18,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/barchart/src/BarChartBase.tsx b/barchart/src/BarChartBase.tsx index 317f2d548..8c85d3edd 100644 --- a/barchart/src/BarChartBase.tsx +++ b/barchart/src/BarChartBase.tsx @@ -117,7 +117,7 @@ export function BarChartBase(props: BarChartBaseProps): ReactElement { appendToBody: true, confine: true, formatter: ( - params: Array<{ seriesName: string; data: number | null; name: string; color: string }> + params: Array<{ seriesName: string; data: number | null; name: string; color: string }>, ): string => { if (!params.length) return ''; const header = `${params[0]?.name}
`; @@ -126,7 +126,7 @@ export function BarChartBase(props: BarChartBaseProps): ReactElement { .map( (p) => `` + - `${p.seriesName}: ${formatValue(p.data, format)}` + `${p.seriesName}: ${formatValue(p.data, format)}`, ) .join('
'); return header + rows; diff --git a/barchart/src/BarChartOptionsEditorSettings.test.tsx b/barchart/src/BarChartOptionsEditorSettings.test.tsx index 9a1ecb8af..bc71140af 100644 --- a/barchart/src/BarChartOptionsEditorSettings.test.tsx +++ b/barchart/src/BarChartOptionsEditorSettings.test.tsx @@ -35,7 +35,7 @@ describe('BarChartOptionsEditorSettings', () => { } onChange={onChange} /> - + , ); }; @@ -53,7 +53,7 @@ describe('BarChartOptionsEditorSettings', () => { format: { unit: 'years', }, - }) + }), ); }); @@ -69,7 +69,7 @@ describe('BarChartOptionsEditorSettings', () => { expect(onChange).toHaveBeenCalledWith( expect.objectContaining({ calculation: 'mean', - }) + }), ); }); @@ -85,7 +85,7 @@ describe('BarChartOptionsEditorSettings', () => { expect(onChange).toHaveBeenCalledWith( expect.objectContaining({ sort: 'asc', - }) + }), ); }); @@ -101,7 +101,7 @@ describe('BarChartOptionsEditorSettings', () => { expect(onChange).toHaveBeenCalledWith( expect.objectContaining({ mode: 'percentage', - }) + }), ); }); @@ -146,7 +146,7 @@ describe('BarChartOptionsEditorSettings', () => { sort: 'asc', mode: 'percentage', }, - onChange + onChange, ); const resetButton = screen.getByRole('button', { name: 'Reset To Defaults' }); userEvent.click(resetButton); @@ -159,7 +159,7 @@ describe('BarChartOptionsEditorSettings', () => { calculation: 'last', sort: 'desc', mode: 'value', - }) + }), ); }); }); diff --git a/barchart/src/BarChartOptionsEditorSettings.tsx b/barchart/src/BarChartOptionsEditorSettings.tsx index 777042adc..54d8aefba 100644 --- a/barchart/src/BarChartOptionsEditorSettings.tsx +++ b/barchart/src/BarChartOptionsEditorSettings.tsx @@ -66,7 +66,7 @@ export function BarChartOptionsEditorSettings(props: BarChartOptionsEditorProps) onChange( produce(value, (draft: BarChartOptions) => { draft.calculation = newCalculation; - }) + }), ); }; @@ -74,7 +74,7 @@ export function BarChartOptionsEditorSettings(props: BarChartOptionsEditorProps) onChange( produce(value, (draft: BarChartOptions) => { draft.format = newFormat; - }) + }), ); }; @@ -82,7 +82,7 @@ export function BarChartOptionsEditorSettings(props: BarChartOptionsEditorProps) onChange( produce(value, (draft: BarChartOptions) => { draft.sort = newSort; - }) + }), ); }; @@ -90,7 +90,7 @@ export function BarChartOptionsEditorSettings(props: BarChartOptionsEditorProps) onChange( produce(value, (draft: BarChartOptions) => { draft.mode = newMode; - }) + }), ); }; @@ -104,7 +104,7 @@ export function BarChartOptionsEditorSettings(props: BarChartOptionsEditorProps) draft.groupBy = DEFAULT_GROUP_BY; draft.isStacked = DEFAULT_IS_STACKED; draft.orientation = DEFAULT_ORIENTATION; - }) + }), ); }; @@ -112,7 +112,7 @@ export function BarChartOptionsEditorSettings(props: BarChartOptionsEditorProps) const format = merge( {}, !value.format || isUnitWithShortValues(value.format) ? DEFAULT_FORMAT : omit(DEFAULT_FORMAT, ['shortValues']), - value.format + value.format, ); const groupBy = value.groupBy ?? DEFAULT_GROUP_BY; const isStacked = value.isStacked ?? DEFAULT_IS_STACKED; @@ -134,7 +134,7 @@ export function BarChartOptionsEditorSettings(props: BarChartOptionsEditorProps) onChange( produce(value, (draft: BarChartOptions) => { draft.orientation = v; - }) + }), ) } > @@ -153,7 +153,7 @@ export function BarChartOptionsEditorSettings(props: BarChartOptionsEditorProps) produce(value, (draft: BarChartOptions) => { draft.groupBy = filtered; if (filtered.length === 0) draft.isStacked = false; - }) + }), ); }} options={[]} @@ -176,7 +176,7 @@ export function BarChartOptionsEditorSettings(props: BarChartOptionsEditorProps) onChange( produce(value, (draft: BarChartOptions) => { draft.isStacked = e.target.checked; - }) + }), ) } /> diff --git a/barchart/src/tresholds.ts b/barchart/src/tresholds.ts index 6b7292b4b..afe2d9d52 100644 --- a/barchart/src/tresholds.ts +++ b/barchart/src/tresholds.ts @@ -24,7 +24,7 @@ export function convertThresholds( thresholds: ThresholdOptions, unit: FormatOptions, max: number, - palette: ThresholdColorPalette + palette: ThresholdColorPalette, ): EChartsAxisLineColors { const defaultThresholdColor = thresholds.defaultColor ?? palette.defaultColor; const defaultThresholdSteps: EChartsAxisLineColors = [[0, defaultThresholdColor]]; diff --git a/clickhouse/package.json b/clickhouse/package.json index ba46e1932..a030b0965 100644 --- a/clickhouse/package.json +++ b/clickhouse/package.json @@ -10,6 +10,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/clickhouse/src/datasources/click-house-datasource/ClickHouseDatasource.tsx b/clickhouse/src/datasources/click-house-datasource/ClickHouseDatasource.tsx index 162073865..0a6ef9a96 100644 --- a/clickhouse/src/datasources/click-house-datasource/ClickHouseDatasource.tsx +++ b/clickhouse/src/datasources/click-house-datasource/ClickHouseDatasource.tsx @@ -19,7 +19,7 @@ import { ClickHouseDatasourceEditor } from './ClickHouseDatasourceEditor'; const createClient: DatasourcePlugin['createClient'] = ( spec, - options + options, ) => { const { directUrl, proxy } = spec; const { proxyUrl } = options; @@ -27,7 +27,7 @@ const createClient: DatasourcePlugin { replaceTimeRangePlaceholders( "SELECT * FROM logs WHERE timestamp BETWEEN '{start}' AND '{end}'", '2025-01-01 00:00:00', - '2025-01-02 00:00:00' - ) + '2025-01-02 00:00:00', + ), ).toEqual("SELECT * FROM logs WHERE timestamp BETWEEN '2025-01-01 00:00:00' AND '2025-01-02 00:00:00'"); }); @@ -47,14 +47,14 @@ describe('ClickHouse client', () => { }, { datasourceUrl: 'http://clickhouse.example.com', - } + }, ); expect(fetchMock).toHaveBeenCalledTimes(1); const [calledUrl] = fetchMock.mock.calls[0]!; const url = new URL(calledUrl); expect(url.searchParams.get('query')).toBe( - "SELECT * FROM logs WHERE timestamp BETWEEN '2025-01-01 00:00:00' AND '2025-01-02 00:00:00' FORMAT JSON" + "SELECT * FROM logs WHERE timestamp BETWEEN '2025-01-01 00:00:00' AND '2025-01-02 00:00:00' FORMAT JSON", ); }); }); diff --git a/clickhouse/src/model/click-house-client.ts b/clickhouse/src/model/click-house-client.ts index cbc1b0fdd..2576575f6 100644 --- a/clickhouse/src/model/click-house-client.ts +++ b/clickhouse/src/model/click-house-client.ts @@ -47,7 +47,7 @@ export function formatClickHouseDateTime(date: Date): string { export async function query( params: ClickHouseQueryParams, - queryOptions: ClickHouseQueryOptions + queryOptions: ClickHouseQueryOptions, ): Promise { const { datasourceUrl, headers } = queryOptions; diff --git a/clickhouse/src/queries/click-house-log-query/ClickHouseLogQueryEditor.tsx b/clickhouse/src/queries/click-house-log-query/ClickHouseLogQueryEditor.tsx index 97c9fa144..76f87a03c 100644 --- a/clickhouse/src/queries/click-house-log-query/ClickHouseLogQueryEditor.tsx +++ b/clickhouse/src/queries/click-house-log-query/ClickHouseLogQueryEditor.tsx @@ -41,7 +41,7 @@ export function ClickHouseLogQueryEditor(props: ClickHouseQueryEditorProps): Rea onChange( produce(value, (draft) => { draft.datasource = newDatasourceSelection; - }) + }), ); return; } @@ -53,7 +53,7 @@ export function ClickHouseLogQueryEditor(props: ClickHouseQueryEditorProps): Rea onChange( produce(value, (draft) => { draft.query = query; - }) + }), ); }; @@ -61,7 +61,7 @@ export function ClickHouseLogQueryEditor(props: ClickHouseQueryEditorProps): Rea (e: string) => { handleQueryChange(e); }, - [handleQueryChange] + [handleQueryChange], ); const examplesStyle: React.CSSProperties = { diff --git a/clickhouse/src/queries/click-house-log-query/click-house-log-query-types.test.ts b/clickhouse/src/queries/click-house-log-query/click-house-log-query-types.test.ts index a16f27368..ef723eec7 100644 --- a/clickhouse/src/queries/click-house-log-query/click-house-log-query-types.test.ts +++ b/clickhouse/src/queries/click-house-log-query/click-house-log-query-types.test.ts @@ -64,7 +64,7 @@ describe('ClickHouseLogQuery', () => { { query: '"SELECT * FROM otel_logs WHERE foo="$foo" AND bar="$bar"', }, - createStubContext() + createStubContext(), ); expect(variables).toEqual(['foo', 'bar']); }); @@ -79,7 +79,7 @@ describe('ClickHouseLogQuery', () => { { query: "SELECT * FROM application_logs WHERE timestamp >= '{start}' AND timestamp <= '{end}'", }, - createStubContext() + createStubContext(), ); expect(clickhouseStubClient.query).toHaveBeenCalledWith({ @@ -89,7 +89,7 @@ describe('ClickHouseLogQuery', () => { "SELECT * FROM application_logs WHERE timestamp >= '2025-01-01 00:00:00' AND timestamp <= '2025-01-02 00:00:00'", }); expect(response.metadata?.executedQueryString).toBe( - "SELECT * FROM application_logs WHERE timestamp >= '2025-01-01 00:00:00' AND timestamp <= '2025-01-02 00:00:00'" + "SELECT * FROM application_logs WHERE timestamp >= '2025-01-01 00:00:00' AND timestamp <= '2025-01-02 00:00:00'", ); }); }); diff --git a/clickhouse/src/queries/click-house-log-query/get-click-house-log-data.ts b/clickhouse/src/queries/click-house-log-query/get-click-house-log-data.ts index 3a05342d6..1ccd96889 100644 --- a/clickhouse/src/queries/click-house-log-query/get-click-house-log-data.ts +++ b/clickhouse/src/queries/click-house-log-query/get-click-house-log-data.ts @@ -26,7 +26,7 @@ import { ClickHouseLogQuerySpec } from './click-house-log-query-types'; function flattenObject( obj: Record, parentKey = '', - result: Record = {} + result: Record = {}, ): Record { for (const [key, value] of Object.entries(obj)) { const newKey = parentKey ? `${parentKey}.${key}` : key; @@ -84,7 +84,7 @@ export const getClickHouseLogData: LogQueryPlugin['getLo const query = replaceVariables(spec.query, context.variableState); const client = (await context.datasourceStore.getDatasourceClient( - spec.datasource ?? DEFAULT_DATASOURCE + spec.datasource ?? DEFAULT_DATASOURCE, )) as ClickHouseClient; const { start, end } = context.timeRange; diff --git a/clickhouse/src/queries/click-house-time-series-query/ClickHouseQueryEditor.tsx b/clickhouse/src/queries/click-house-time-series-query/ClickHouseQueryEditor.tsx index 6e6ca5040..dbf7e3ff0 100644 --- a/clickhouse/src/queries/click-house-time-series-query/ClickHouseQueryEditor.tsx +++ b/clickhouse/src/queries/click-house-time-series-query/ClickHouseQueryEditor.tsx @@ -41,7 +41,7 @@ export function ClickHouseTimeSeriesQueryEditor(props: ClickHouseTimeSeriesQuery onChange( produce(value, (draft) => { draft.datasource = newDatasourceSelection; - }) + }), ); return; } @@ -53,7 +53,7 @@ export function ClickHouseTimeSeriesQueryEditor(props: ClickHouseTimeSeriesQuery onChange( produce(value, (draft) => { draft.query = query; - }) + }), ); }; @@ -61,7 +61,7 @@ export function ClickHouseTimeSeriesQueryEditor(props: ClickHouseTimeSeriesQuery (e: string) => { handleQueryChange(e); }, - [handleQueryChange] + [handleQueryChange], ); const examplesStyle: React.CSSProperties = { diff --git a/clickhouse/src/queries/click-house-time-series-query/click-house-query-types.test.ts b/clickhouse/src/queries/click-house-time-series-query/click-house-query-types.test.ts index 7a091c8c8..c3db093d2 100644 --- a/clickhouse/src/queries/click-house-time-series-query/click-house-query-types.test.ts +++ b/clickhouse/src/queries/click-house-time-series-query/click-house-query-types.test.ts @@ -81,7 +81,7 @@ describe('ClickHouseTimeSeriesQuery', () => { { query: '"SELECT * FROM otel_logs WHERE foo="$foo" AND bar="$bar"', }, - createStubContext() + createStubContext(), ); expect(variables).toEqual(['foo', 'bar']); }); @@ -97,7 +97,7 @@ describe('ClickHouseTimeSeriesQuery', () => { query: "SELECT toStartOfMinute(timestamp) as time, avg(cpu_usage) as avg_cpu, max(memory_usage) as max_memory FROM system_metrics WHERE timestamp BETWEEN '{start}' AND '{end}' GROUP BY time ORDER BY time", }, - createStubContext() + createStubContext(), ); expect(clickhouseStubClient.query).toHaveBeenCalledWith({ @@ -124,7 +124,7 @@ describe('ClickHouseTimeSeriesQuery', () => { ]); expect(response.stepMs).toBe(60 * 1000); expect(response.metadata?.executedQueryString).toBe( - "SELECT toStartOfMinute(timestamp) as time, avg(cpu_usage) as avg_cpu, max(memory_usage) as max_memory FROM system_metrics WHERE timestamp BETWEEN '2025-01-01 00:00:00' AND '2025-01-02 00:00:00' GROUP BY time ORDER BY time" + "SELECT toStartOfMinute(timestamp) as time, avg(cpu_usage) as avg_cpu, max(memory_usage) as max_memory FROM system_metrics WHERE timestamp BETWEEN '2025-01-01 00:00:00' AND '2025-01-02 00:00:00' GROUP BY time ORDER BY time", ); }); @@ -143,7 +143,7 @@ describe('ClickHouseTimeSeriesQuery', () => { query: "SELECT toStartOfDay(timestamp) as time, sum(flights_count) as flights FROM flight WHERE timestamp BETWEEN '{start}' AND '{end}' GROUP BY time ORDER BY time", }, - createStubContext() + createStubContext(), ); expect(response.stepMs).toBe(24 * 60 * 60 * 1000); @@ -174,7 +174,7 @@ describe('ClickHouseTimeSeriesQuery', () => { query: "SELECT toStartOfDay(timestamp) as time, sum(flights_count) as flights FROM flight WHERE timestamp BETWEEN '{start}' AND '{end}' GROUP BY time ORDER BY time", }, - createStubContext() + createStubContext(), ); expect(response.stepMs).toBe(24 * 60 * 60 * 1000); diff --git a/clickhouse/src/queries/click-house-time-series-query/get-click-house-data.ts b/clickhouse/src/queries/click-house-time-series-query/get-click-house-data.ts index 8e186ba75..8a54695e0 100644 --- a/clickhouse/src/queries/click-house-time-series-query/get-click-house-data.ts +++ b/clickhouse/src/queries/click-house-time-series-query/get-click-house-data.ts @@ -105,7 +105,7 @@ function inferStepMs(response?: DatasourceQueryResponse): number { export const getTimeSeriesData: TimeSeriesQueryPlugin['getTimeSeriesData'] = async ( spec, - context + context, ) => { if (spec.query === undefined || spec.query === null || spec.query === '') { return { series: [] }; @@ -114,7 +114,7 @@ export const getTimeSeriesData: TimeSeriesQueryPlugin( - props: OptionsEditorProps + props: OptionsEditorProps, ): { query: string; handleQueryChange: (e: string) => void; @@ -60,7 +60,7 @@ export function useQueryState( onChange( produce(value, (draft) => { draft.query = query; - }) + }), ); }; diff --git a/datasourcevariable/package.json b/datasourcevariable/package.json index f7d39a04e..8009033df 100644 --- a/datasourcevariable/package.json +++ b/datasourcevariable/package.json @@ -18,6 +18,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest --passWithNoTests", "type-check": "tsc --noEmit" }, diff --git a/datasourcevariable/src/DatasourceVariable.tsx b/datasourcevariable/src/DatasourceVariable.tsx index 1a993cd91..27a0971b8 100644 --- a/datasourcevariable/src/DatasourceVariable.tsx +++ b/datasourcevariable/src/DatasourceVariable.tsx @@ -28,7 +28,7 @@ export const DatasourceVariableOptionEditor = (props: OptionsEditorProps new Set(datasourcePlugins?.map((plugin) => plugin.spec.name)), - [datasourcePlugins] + [datasourcePlugins], ); const options = Array.from(datasourcePluginKindSet).map((kind) => ({ diff --git a/e2e/package.json b/e2e/package.json index 178c25c7e..a9ff32b51 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -7,7 +7,8 @@ "test:ci": "npx playwright test --workers=1 --reporter=github,list", "test:install": "npx playwright install --with-deps", "test:local": "npx playwright test --ui", - "build": "echo 'Skipping build for e2e tests'" + "build": "echo 'Skipping build for e2e tests'", + "lint:ci": "oxlint src" }, "devDependencies": { "@playwright/test": "^1.58.2", diff --git a/flamechart/package.json b/flamechart/package.json index 0e6a0386e..776ef215c 100644 --- a/flamechart/package.json +++ b/flamechart/package.json @@ -18,6 +18,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/flamechart/src/components/FlameChart.tsx b/flamechart/src/components/FlameChart.tsx index 1b63c0488..8a69679d9 100644 --- a/flamechart/src/components/FlameChart.tsx +++ b/flamechart/src/components/FlameChart.tsx @@ -58,7 +58,7 @@ export function FlameChart(props: FlameChartProps): ReactElement { const seriesData = useMemo( () => buildSamples(palette, data.metadata, data.profile.stackTrace, searchValue, selectedId), - [palette, data.metadata, data.profile.stackTrace, selectedId, searchValue] + [palette, data.metadata, data.profile.stackTrace, selectedId, searchValue], ); const handleItemClick = (params: MouseEventsParameters): void => { @@ -232,7 +232,7 @@ export function FlameChart(props: FlameChartProps): ReactElement { }} /> ), - [chartsTheme.echartsTheme, height, option, width] + [chartsTheme.echartsTheme, height, option, width], ); return ( diff --git a/flamechart/src/components/FlameChartPanel.tsx b/flamechart/src/components/FlameChartPanel.tsx index c5b92b7e1..0db2ddd58 100644 --- a/flamechart/src/components/FlameChartPanel.tsx +++ b/flamechart/src/components/FlameChartPanel.tsx @@ -64,7 +64,7 @@ export const FlameChartPanel: FC = (props) => { const maxDepth: number = useMemo( () => (selectedStackTrace ? getMaxDepth(selectedStackTrace) : 0), - [selectedStackTrace] + [selectedStackTrace], ); const noDataTextStyle = (chartsTheme.noDataOption.title as TitleComponentOption).textStyle as SxProps; diff --git a/flamechart/src/components/SeriesChart.tsx b/flamechart/src/components/SeriesChart.tsx index e739f8e35..96a545826 100644 --- a/flamechart/src/components/SeriesChart.tsx +++ b/flamechart/src/components/SeriesChart.tsx @@ -132,7 +132,7 @@ export function SeriesChart(props: SeriesChartProps): ReactElement { data.metadata?.units || '', data.metadata?.name || '', theme.palette.primary.main, - theme.palette.divider + theme.palette.divider, ), }, axisPointer: { @@ -174,7 +174,7 @@ export function SeriesChart(props: SeriesChartProps): ReactElement { _instance={chartRef} /> ), - [chartsTheme.echartsTheme, height, option, width, handleEvents] + [chartsTheme.echartsTheme, height, option, width, handleEvents], ); return ( diff --git a/flamechart/src/utils/data-transform.ts b/flamechart/src/utils/data-transform.ts index 0ca4c8fa3..b0b9ffda9 100644 --- a/flamechart/src/utils/data-transform.ts +++ b/flamechart/src/utils/data-transform.ts @@ -85,7 +85,7 @@ export function buildSamples( metadata: ProfileMetaData | undefined, traces: StackTrace, searchValue: string, - id?: number + id?: number, ): Sample[] { const data: Sample[] = []; const filteredJson = filterStackTraceById(traces, id); diff --git a/flamechart/src/utils/series-tooltip.ts b/flamechart/src/utils/series-tooltip.ts index 4ee8ad3e9..650d6e2f3 100644 --- a/flamechart/src/utils/series-tooltip.ts +++ b/flamechart/src/utils/series-tooltip.ts @@ -19,7 +19,7 @@ export function getSeriesTooltip( unit: string, name: string, color: string, - divColor: string + divColor: string, ): string { const date = new Date(data.value[0]); const formattedDate = date.toLocaleDateString('en-US', { month: 'short', day: '2-digit', year: 'numeric' }); diff --git a/flamechart/src/utils/utils.ts b/flamechart/src/utils/utils.ts index 5c1192ab0..b54cdcdde 100644 --- a/flamechart/src/utils/utils.ts +++ b/flamechart/src/utils/utils.ts @@ -28,7 +28,7 @@ export function usePaletteState(props: FlameChartOptionsEditorProps): { onChange( produce(value, (draft) => { draft.palette = newPalette; - }) + }), ); }; @@ -47,7 +47,7 @@ export function useTraceHeightState(props: FlameChartOptionsEditorProps): { onChange( produce(value, (draft) => { draft.traceHeight = event.target.value ? Number(event.target.value) : undefined; - }) + }), ); }; @@ -66,7 +66,7 @@ export function useShowSettingsState(props: FlameChartOptionsEditorProps): { onChange( produce(value, (draft) => { draft.showSettings = newValue; - }) + }), ); }; @@ -85,7 +85,7 @@ export function useShowSeriesState(props: FlameChartOptionsEditorProps): { onChange( produce(value, (draft) => { draft.showSeries = newValue; - }) + }), ); }; @@ -104,7 +104,7 @@ export function useShowTableState(props: FlameChartOptionsEditorProps): { onChange( produce(value, (draft) => { draft.showTable = newValue; - }) + }), ); }; @@ -123,7 +123,7 @@ export function useShowFlameGraphState(props: FlameChartOptionsEditorProps): { onChange( produce(value, (draft) => { draft.showFlameGraph = newValue; - }) + }), ); }; @@ -143,6 +143,6 @@ export function resetSettings(props: FlameChartOptionsEditorProps): void { draft.showSeries = false; draft.showTable = true; draft.showFlameGraph = true; - }) + }), ); } diff --git a/gaugechart/package.json b/gaugechart/package.json index c20fc7eaa..f7e46761b 100644 --- a/gaugechart/package.json +++ b/gaugechart/package.json @@ -18,6 +18,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/gaugechart/src/GaugeChartOptionsEditorSettings.test.tsx b/gaugechart/src/GaugeChartOptionsEditorSettings.test.tsx index 348418fd6..4593d21a1 100644 --- a/gaugechart/src/GaugeChartOptionsEditorSettings.test.tsx +++ b/gaugechart/src/GaugeChartOptionsEditorSettings.test.tsx @@ -24,7 +24,7 @@ describe('GaugeChartOptionsEditorSettings', () => { render( - + , ); }; @@ -37,7 +37,7 @@ describe('GaugeChartOptionsEditorSettings', () => { }, calculation: 'first', }, - onChange + onChange, ); const unitSelector = screen.getByRole('combobox', { name: 'Unit' }); userEvent.click(unitSelector); @@ -50,7 +50,7 @@ describe('GaugeChartOptionsEditorSettings', () => { format: { unit: 'years', }, - }) + }), ); }); @@ -63,7 +63,7 @@ describe('GaugeChartOptionsEditorSettings', () => { }, calculation: 'first', }, - onChange + onChange, ); const calcSelector = screen.getByRole('combobox', { name: 'Calculation' }); userEvent.click(calcSelector); @@ -74,7 +74,7 @@ describe('GaugeChartOptionsEditorSettings', () => { expect(onChange).toHaveBeenCalledWith( expect.objectContaining({ calculation: 'mean', - }) + }), ); }); @@ -91,7 +91,7 @@ describe('GaugeChartOptionsEditorSettings', () => { max: 1, calculation: 'last-number', }, - onChange + onChange, ); const maxInput = await screen.findByRole('spinbutton', { name: /Max/ }); expect(maxInput).toBeInTheDocument(); diff --git a/gaugechart/src/GaugeChartOptionsEditorSettings.tsx b/gaugechart/src/GaugeChartOptionsEditorSettings.tsx index e249bf9e8..6a9ef6c20 100644 --- a/gaugechart/src/GaugeChartOptionsEditorSettings.tsx +++ b/gaugechart/src/GaugeChartOptionsEditorSettings.tsx @@ -46,7 +46,7 @@ export function GaugeChartOptionsEditorSettings(props: GaugeChartOptionsEditorPr onChange( produce(value, (draft: GaugeChartOptions) => { draft.calculation = newCalculation; - }) + }), ); }; @@ -54,7 +54,7 @@ export function GaugeChartOptionsEditorSettings(props: GaugeChartOptionsEditorPr onChange( produce(value, (draft: GaugeChartOptions) => { draft.format = newFormat; - }) + }), ); }; @@ -73,7 +73,7 @@ export function GaugeChartOptionsEditorSettings(props: GaugeChartOptionsEditorPr onChange( produce(value, (draft: GaugeChartOptions) => { draft.thresholds = thresholds; - }) + }), ); }; @@ -95,7 +95,7 @@ export function GaugeChartOptionsEditorSettings(props: GaugeChartOptionsEditorPr onChange( produce(value, (draft: GaugeChartOptions) => { draft.max = newValue; - }) + }), ); }} placeholder={maxPlaceholder} @@ -114,7 +114,7 @@ export function GaugeChartOptionsEditorSettings(props: GaugeChartOptionsEditorPr onChange( produce(value, (draft: GaugeChartOptions) => { draft.legend = { ...draft.legend, show: !showLegend }; - }) + }), ); }} checked={showLegend} diff --git a/gaugechart/src/GaugeChartPanel.tsx b/gaugechart/src/GaugeChartPanel.tsx index 5b84a064d..3f3afe823 100644 --- a/gaugechart/src/GaugeChartPanel.tsx +++ b/gaugechart/src/GaugeChartPanel.tsx @@ -54,7 +54,7 @@ function getResponsiveValueFontSize( value: number | null, format: FormatOptions, width: number, - height: number + height: number, ): string { const MIN_SIZE = 8; const MAX_SIZE = 64; @@ -155,7 +155,7 @@ export function GaugeChartPanel(props: GaugeChartPanelProps): ReactElement | nul null, format, contentDimensions.width, - contentDimensions.height + contentDimensions.height, ); const emptyProgressWidth = getResponsiveProgressWidth(contentDimensions.width, contentDimensions.height); const emptyTitleFontSize = getResponsiveTitleFontSize(contentDimensions.width, contentDimensions.height); diff --git a/gaugechart/src/thresholds.ts b/gaugechart/src/thresholds.ts index 2d636ca92..a03106983 100644 --- a/gaugechart/src/thresholds.ts +++ b/gaugechart/src/thresholds.ts @@ -24,7 +24,7 @@ export function convertThresholds( thresholds: ThresholdOptions, unit: FormatOptions, max: number, - palette: ThresholdColorPalette + palette: ThresholdColorPalette, ): EChartsAxisLineColors { const defaultThresholdColor = thresholds.defaultColor ?? palette.defaultColor; const defaultThresholdSteps: EChartsAxisLineColors = [[0, defaultThresholdColor]]; diff --git a/greptimedb/package.json b/greptimedb/package.json index 3817900e4..d0a350519 100644 --- a/greptimedb/package.json +++ b/greptimedb/package.json @@ -10,6 +10,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/greptimedb/src/datasources/greptimedb-datasource/GreptimeDBDatasource.test.ts b/greptimedb/src/datasources/greptimedb-datasource/GreptimeDBDatasource.test.ts index d059f4306..a5ad60414 100644 --- a/greptimedb/src/datasources/greptimedb-datasource/GreptimeDBDatasource.test.ts +++ b/greptimedb/src/datasources/greptimedb-datasource/GreptimeDBDatasource.test.ts @@ -35,7 +35,7 @@ describe('GreptimeDBDatasource.createClient', () => { 'x-greptime-db-name': 'metrics', }, }, - {} + {}, ); await client.query({ @@ -50,7 +50,7 @@ describe('GreptimeDBDatasource.createClient', () => { Authorization: 'Bearer direct-token', 'x-greptime-db-name': 'metrics', }, - } + }, ); }); @@ -62,7 +62,7 @@ describe('GreptimeDBDatasource.createClient', () => { Authorization: 'Bearer from-spec', }, }, - {} + {}, ); await client.query( @@ -71,7 +71,7 @@ describe('GreptimeDBDatasource.createClient', () => { }, { Authorization: 'Bearer runtime', - } + }, ); expect(mockedQuery).toHaveBeenCalledWith( @@ -81,7 +81,7 @@ describe('GreptimeDBDatasource.createClient', () => { headers: { Authorization: 'Bearer runtime', }, - } + }, ); }); }); diff --git a/greptimedb/src/datasources/greptimedb-datasource/GreptimeDBDatasource.tsx b/greptimedb/src/datasources/greptimedb-datasource/GreptimeDBDatasource.tsx index 2ccbbef90..723440917 100644 --- a/greptimedb/src/datasources/greptimedb-datasource/GreptimeDBDatasource.tsx +++ b/greptimedb/src/datasources/greptimedb-datasource/GreptimeDBDatasource.tsx @@ -19,7 +19,7 @@ import { GreptimeDBDatasourceEditor } from './GreptimeDBDatasourceEditor'; const createClient: DatasourcePlugin['createClient'] = ( spec, - options + options, ) => { const { directUrl, headers, proxy } = spec; const { proxyUrl } = options; @@ -27,7 +27,7 @@ const createClient: DatasourcePlugin { export async function greptimedbQuery( params: GreptimeDBQueryRequestParameters, - queryOptions: GreptimeDBQueryOptions + queryOptions: GreptimeDBQueryOptions, ): Promise { const { datasourceUrl, headers } = queryOptions; const url = buildSqlUrl(datasourceUrl); diff --git a/greptimedb/src/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.tsx b/greptimedb/src/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.tsx index 321855d7e..3cde6a09e 100644 --- a/greptimedb/src/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.tsx +++ b/greptimedb/src/queries/greptimedb-log-query/GreptimeDBLogQueryEditor.tsx @@ -42,7 +42,7 @@ export function GreptimeDBLogQueryEditor(props: GreptimeDBLogQueryEditorProps): onChange( produce(value, (draft) => { draft.datasource = newDatasourceSelection; - }) + }), ); return; } @@ -53,7 +53,7 @@ export function GreptimeDBLogQueryEditor(props: GreptimeDBLogQueryEditorProps): onChange( produce(value, (draft) => { draft.query = queryValue; - }) + }), ); }; @@ -61,7 +61,7 @@ export function GreptimeDBLogQueryEditor(props: GreptimeDBLogQueryEditorProps): (e: string) => { handleQueryChange(e); }, - [handleQueryChange] + [handleQueryChange], ); const examplesStyle = { diff --git a/greptimedb/src/queries/greptimedb-log-query/get-greptimedb-log-data.ts b/greptimedb/src/queries/greptimedb-log-query/get-greptimedb-log-data.ts index 9a2b66320..7c2f69c09 100644 --- a/greptimedb/src/queries/greptimedb-log-query/get-greptimedb-log-data.ts +++ b/greptimedb/src/queries/greptimedb-log-query/get-greptimedb-log-data.ts @@ -91,7 +91,7 @@ export const getGreptimeDBLogData: LogQueryPlugin['getLo const query = replaceQueryVariables(spec.query, context.variableState, context.timeRange); const client = (await context.datasourceStore.getDatasourceClient( - spec.datasource ?? DEFAULT_DATASOURCE + spec.datasource ?? DEFAULT_DATASOURCE, )) as GreptimeDBClient; const response: GreptimeDBQueryResponse = await client.query({ diff --git a/greptimedb/src/queries/greptimedb-log-query/greptimedb-log-query-types.test.ts b/greptimedb/src/queries/greptimedb-log-query/greptimedb-log-query-types.test.ts index de5961ea6..4896c36f7 100644 --- a/greptimedb/src/queries/greptimedb-log-query/greptimedb-log-query-types.test.ts +++ b/greptimedb/src/queries/greptimedb-log-query/greptimedb-log-query-types.test.ts @@ -71,7 +71,7 @@ describe('GreptimeDBLogQuery', () => { { query: 'SELECT * FROM logs WHERE foo="$foo" AND bar="$bar"', }, - createStubContext() + createStubContext(), ); expect(variables).toEqual(['foo', 'bar']); }); @@ -109,7 +109,7 @@ describe('GreptimeDBLogQuery', () => { { query: 'SELECT * FROM logs', }, - createStubContext() + createStubContext(), ); expect(result.logs.totalCount).toBe(2); diff --git a/greptimedb/src/queries/greptimedb-query-data-model.ts b/greptimedb/src/queries/greptimedb-query-data-model.ts index 4f98957ac..aed85126c 100644 --- a/greptimedb/src/queries/greptimedb-query-data-model.ts +++ b/greptimedb/src/queries/greptimedb-query-data-model.ts @@ -30,7 +30,7 @@ export type { GreptimeDBColumnSchema, GreptimeDBRecords, GreptimeDBResponseData export function replaceQueryVariables( query: string, variableState: VariableStateMap, - timeRange: AbsoluteTimeRange + timeRange: AbsoluteTimeRange, ): string { const { start, end } = timeRange; const rangeMs = end.valueOf() - start.valueOf(); diff --git a/greptimedb/src/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.tsx b/greptimedb/src/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.tsx index 5a514b812..8907558d1 100644 --- a/greptimedb/src/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.tsx +++ b/greptimedb/src/queries/greptimedb-time-series-query/GreptimeDBQueryEditor.tsx @@ -41,7 +41,7 @@ export function GreptimeDBTimeSeriesQueryEditor(props: GreptimeDBTimeSeriesQuery onChange( produce(value, (draft) => { draft.datasource = newDatasourceSelection; - }) + }), ); return; } @@ -52,7 +52,7 @@ export function GreptimeDBTimeSeriesQueryEditor(props: GreptimeDBTimeSeriesQuery onChange( produce(value, (draft) => { draft.query = queryValue; - }) + }), ); }; @@ -60,7 +60,7 @@ export function GreptimeDBTimeSeriesQueryEditor(props: GreptimeDBTimeSeriesQuery (e: string) => { handleQueryChange(e); }, - [handleQueryChange] + [handleQueryChange], ); const examplesStyle = { diff --git a/greptimedb/src/queries/greptimedb-time-series-query/get-greptimedb-data.ts b/greptimedb/src/queries/greptimedb-time-series-query/get-greptimedb-data.ts index 8c1560db2..29613fe12 100644 --- a/greptimedb/src/queries/greptimedb-time-series-query/get-greptimedb-data.ts +++ b/greptimedb/src/queries/greptimedb-time-series-query/get-greptimedb-data.ts @@ -43,7 +43,7 @@ function buildSeriesName(valueColumnName: string, labels: Record function buildTimeSeries( records: GreptimeDBRecords | undefined, - fallbackTimestampMs: number + fallbackTimestampMs: number, ): Array<{ name: string; labels: Record; values: Array<[number, number]> }> { const columnSchemas = records?.schema?.column_schemas ?? []; const rows = records?.rows ?? []; @@ -148,7 +148,7 @@ function buildTimeSeries( function inferStepMsFromSeries( series: Array<{ name: string; labels: Record; values: Array<[number, number]> }>, - fallbackStepMs: number + fallbackStepMs: number, ): number { let minDeltaMs = Number.POSITIVE_INFINITY; @@ -167,7 +167,7 @@ function inferStepMsFromSeries( export const getTimeSeriesData: TimeSeriesQueryPlugin['getTimeSeriesData'] = async ( spec, - context + context, ) => { if (!spec.query) { return { @@ -179,7 +179,7 @@ export const getTimeSeriesData: TimeSeriesQueryPlugin { { query: 'SELECT * FROM metrics WHERE foo="$foo" AND bar="$bar"', }, - createStubContext() + createStubContext(), ); expect(variables).toEqual(['foo', 'bar']); }); @@ -124,7 +124,7 @@ describe('GreptimeDBTimeSeriesQuery', () => { const result = await GreptimeDBTimeSeriesQuery.getTimeSeriesData( { query: 'SELECT count(*) FROM logs' }, - createStubContext() + createStubContext(), ); expect(result.series).toHaveLength(1); expect(result.series[0]?.name).toBe('count(*)'); @@ -167,7 +167,7 @@ describe('GreptimeDBTimeSeriesQuery', () => { { query: "SELECT date_bin(INTERVAL '1 minute', ts) AS time, host, avg(cpu_usage) AS value FROM cpu_metrics_30", }, - createStubContext() + createStubContext(), ); expect(result.series).toHaveLength(2); diff --git a/greptimedb/src/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.tsx b/greptimedb/src/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.tsx index f29652fc6..31cc19bc6 100644 --- a/greptimedb/src/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.tsx +++ b/greptimedb/src/queries/greptimedb-trace-query/GreptimeDBTraceQueryEditor.tsx @@ -39,7 +39,7 @@ export function GreptimeDBTraceQueryEditor(props: GreptimeDBTraceQueryEditorProp onChange( produce(value, (draft) => { draft.datasource = newDatasourceSelection; - }) + }), ); return; } @@ -50,7 +50,7 @@ export function GreptimeDBTraceQueryEditor(props: GreptimeDBTraceQueryEditorProp onChange( produce(value, (draft) => { draft.query = queryValue; - }) + }), ); }; @@ -58,7 +58,7 @@ export function GreptimeDBTraceQueryEditor(props: GreptimeDBTraceQueryEditorProp (next: string) => { handleQueryChange(next); }, - [handleQueryChange] + [handleQueryChange], ); return ( diff --git a/greptimedb/src/queries/greptimedb-trace-query/get-greptimedb-trace-data.ts b/greptimedb/src/queries/greptimedb-trace-query/get-greptimedb-trace-data.ts index 31ea015bb..7e0be61b0 100644 --- a/greptimedb/src/queries/greptimedb-trace-query/get-greptimedb-trace-data.ts +++ b/greptimedb/src/queries/greptimedb-trace-query/get-greptimedb-trace-data.ts @@ -41,7 +41,7 @@ interface MutableTraceResult { export const getGreptimeDBTraceData: TraceQueryPlugin['getTraceData'] = async ( spec, - context + context, ) => { const rawQuery = replaceVariables(spec.query ?? '', context.variableState).trim(); if (rawQuery.length === 0) { @@ -50,7 +50,7 @@ export const getGreptimeDBTraceData: TraceQueryPlugin[ const datasourceSelector = normalizeDatasourceSelector(spec.datasource); const client = (await context.datasourceStore.getDatasourceClient( - datasourceSelector ?? DEFAULT_DATASOURCE + datasourceSelector ?? DEFAULT_DATASOURCE, )) as GreptimeDBClient; const start = context.absoluteTimeRange?.start.getTime().toString() ?? '0'; const end = context.absoluteTimeRange?.end.getTime().toString() ?? '0'; @@ -81,7 +81,7 @@ export const getGreptimeDBTraceData: TraceQueryPlugin[ }; function normalizeDatasourceSelector( - datasource: GreptimeDBTraceQuerySpec['datasource'] + datasource: GreptimeDBTraceQuerySpec['datasource'], ): GreptimeDBTraceQuerySpec['datasource'] | undefined { if (!datasource) { return undefined; @@ -392,7 +392,7 @@ function convertRowsToTrace(records: GreptimeDBRecords | undefined): otlptracev1 (durationIndex !== undefined ? String( BigInt(startTimeUnixNano) + - BigInt(toNanoString(row[durationIndex], getColumnDataType(columns, durationIndex)) ?? '0') + BigInt(toNanoString(row[durationIndex], getColumnDataType(columns, durationIndex)) ?? '0'), ) : startTimeUnixNano); @@ -485,7 +485,7 @@ function convertRowsToTrace(records: GreptimeDBRecords | undefined): otlptracev1 ([_, value]) => ({ resource: { attributes: value.resourceAttrs }, scopeSpans: Array.from(value.scopeSpans.values()), - }) + }), ); return { diff --git a/greptimedb/src/queries/greptimedb-trace-query/greptimedb-trace-query.test.ts b/greptimedb/src/queries/greptimedb-trace-query/greptimedb-trace-query.test.ts index ee69c7f2e..078fa1670 100644 --- a/greptimedb/src/queries/greptimedb-trace-query/greptimedb-trace-query.test.ts +++ b/greptimedb/src/queries/greptimedb-trace-query/greptimedb-trace-query.test.ts @@ -97,7 +97,7 @@ describe('GreptimeDBTraceQuery', () => { { query: 'SELECT * FROM public.opentelemetry_traces', }, - createStubContext() + createStubContext(), ); expect(result.searchResult).toHaveLength(1); @@ -184,7 +184,7 @@ describe('GreptimeDBTraceQuery', () => { { query: detailsQuery, }, - createStubContext() + createStubContext(), ); expect(mockedQuery).toHaveBeenCalledWith({ @@ -216,7 +216,7 @@ describe('GreptimeDBTraceQuery', () => { name: '', }, }, - createStubContext() + createStubContext(), ); expect(getDatasourceClient).toHaveBeenCalledWith({ @@ -241,13 +241,13 @@ describe('GreptimeDBTraceQuery', () => { value: 'a1b2c3d4e5f60123456789abcdef0001', loading: false, }, - }) + }), ); expect(mockedQuery).toHaveBeenCalledWith( expect.objectContaining({ query: "SELECT * FROM public.web_trace_demo WHERE trace_id = 'a1b2c3d4e5f60123456789abcdef0001'", - }) + }), ); }); }); diff --git a/greptimedb/src/queries/query-editor-model.ts b/greptimedb/src/queries/query-editor-model.ts index 9d55ac4ce..b4916eeed 100644 --- a/greptimedb/src/queries/query-editor-model.ts +++ b/greptimedb/src/queries/query-editor-model.ts @@ -51,7 +51,7 @@ export function useQueryState(props: { onChange( produce(value, (draft) => { draft.query = query; - }) + }), ); }; diff --git a/heatmapchart/package.json b/heatmapchart/package.json index 2181726d8..662f2ea2d 100644 --- a/heatmapchart/package.json +++ b/heatmapchart/package.json @@ -18,6 +18,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/heatmapchart/src/components/HeatMapChart.tsx b/heatmapchart/src/components/HeatMapChart.tsx index 89cf4ad22..cb90d33cf 100644 --- a/heatmapchart/src/components/HeatMapChart.tsx +++ b/heatmapchart/src/components/HeatMapChart.tsx @@ -158,7 +158,7 @@ export function HeatMapChart({ type: 'custom', renderItem: function ( params: CustomSeriesRenderItemParams, - api: CustomSeriesRenderItemAPI + api: CustomSeriesRenderItemAPI, ): CustomSeriesRenderItemReturn { const xIndex = api.value(0) as number; const yLower = api.value(1) as number; @@ -231,7 +231,7 @@ export function HeatMapChart({ theme={chartsTheme.echartsTheme} /> ), - [chartsTheme.container.padding.default, chartsTheme.echartsTheme, height, option, width] + [chartsTheme.container.padding.default, chartsTheme.echartsTheme, height, option, width], ); return <>{chart}; diff --git a/heatmapchart/src/components/HeatMapChartOptionsEditorSettings.test.tsx b/heatmapchart/src/components/HeatMapChartOptionsEditorSettings.test.tsx index a4d8d3124..e8d2cfc5a 100644 --- a/heatmapchart/src/components/HeatMapChartOptionsEditorSettings.test.tsx +++ b/heatmapchart/src/components/HeatMapChartOptionsEditorSettings.test.tsx @@ -24,7 +24,7 @@ describe('HeatMapChartOptionsEditorSettings', () => { render( - + , ); }; @@ -39,7 +39,7 @@ describe('HeatMapChartOptionsEditorSettings', () => { countFormat: DEFAULT_FORMAT, showVisualMap: false, }, - onChange + onChange, ); const showVisualMapSwitch = await screen.findByRole('checkbox', { name: /Show Visual Map/ }); expect(showVisualMapSwitch).toBeInTheDocument(); @@ -57,7 +57,7 @@ describe('HeatMapChartOptionsEditorSettings', () => { yAxisFormat: DEFAULT_FORMAT, countFormat: DEFAULT_FORMAT, }, - onChange + onChange, ); const logBaseSelector = screen.getByRole('combobox', { name: 'Log Base' }); userEvent.click(logBaseSelector); @@ -68,7 +68,7 @@ describe('HeatMapChartOptionsEditorSettings', () => { expect(onChange).toHaveBeenCalledWith( expect.objectContaining({ logBase: 10, - }) + }), ); }); @@ -80,7 +80,7 @@ describe('HeatMapChartOptionsEditorSettings', () => { countFormat: DEFAULT_FORMAT, logBase: 10, }, - onChange + onChange, ); const logBaseSelector = screen.getByRole('combobox', { name: 'Log Base' }); userEvent.click(logBaseSelector); @@ -91,7 +91,7 @@ describe('HeatMapChartOptionsEditorSettings', () => { expect(onChange).toHaveBeenCalledWith( expect.objectContaining({ logBase: undefined, - }) + }), ); }); }); diff --git a/heatmapchart/src/components/HeatMapChartOptionsEditorSettings.tsx b/heatmapchart/src/components/HeatMapChartOptionsEditorSettings.tsx index d19f36eb7..a4ef9752d 100644 --- a/heatmapchart/src/components/HeatMapChartOptionsEditorSettings.tsx +++ b/heatmapchart/src/components/HeatMapChartOptionsEditorSettings.tsx @@ -40,7 +40,7 @@ export function HeatMapChartOptionsEditorSettings(props: HeatMapChartOptionsEdit onChange( produce(value, (draft: HeatMapChartOptions) => { draft.yAxisFormat = newFormat; - }) + }), ); }; @@ -48,7 +48,7 @@ export function HeatMapChartOptionsEditorSettings(props: HeatMapChartOptionsEdit onChange( produce(value, (draft: HeatMapChartOptions) => { draft.countFormat = newFormat; - }) + }), ); }; @@ -56,7 +56,7 @@ export function HeatMapChartOptionsEditorSettings(props: HeatMapChartOptionsEdit onChange( produce(value, (draft: HeatMapChartOptions) => { draft.showVisualMap = checked; - }) + }), ); }; @@ -93,7 +93,7 @@ export function HeatMapChartOptionsEditorSettings(props: HeatMapChartOptionsEdit onChange( produce(value, (draft: HeatMapChartOptions) => { draft.min = newValue; - }) + }), ); }} placeholder="Auto" @@ -112,7 +112,7 @@ export function HeatMapChartOptionsEditorSettings(props: HeatMapChartOptionsEdit onChange( produce(value, (draft: HeatMapChartOptions) => { draft.max = newValue; - }) + }), ); }} placeholder="Auto" @@ -130,7 +130,7 @@ export function HeatMapChartOptionsEditorSettings(props: HeatMapChartOptionsEdit onChange( produce(value, (draft: HeatMapChartOptions) => { draft.logBase = newValue.log; - }) + }), ); }} disableClearable diff --git a/heatmapchart/src/utils/thresholds.ts b/heatmapchart/src/utils/thresholds.ts index 334101fbc..a19f7c4ee 100644 --- a/heatmapchart/src/utils/thresholds.ts +++ b/heatmapchart/src/utils/thresholds.ts @@ -17,7 +17,7 @@ export function getColorFromThresholds( value: number, thresholds: ThresholdOptions | undefined, chartsTheme: PersesChartsTheme, - defaultColor: string + defaultColor: string, ): string | null { if (thresholds?.steps) { const matchingColors = thresholds.steps diff --git a/histogramchart/package.json b/histogramchart/package.json index 17c65732c..36a1e6a28 100644 --- a/histogramchart/package.json +++ b/histogramchart/package.json @@ -18,6 +18,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/histogramchart/src/components/HistogramChart.tsx b/histogramchart/src/components/HistogramChart.tsx index 23fa4532b..5d86428af 100644 --- a/histogramchart/src/components/HistogramChart.tsx +++ b/histogramchart/src/components/HistogramChart.tsx @@ -78,7 +78,7 @@ export function HistogramChart({ parseFloat(lowerBound), // Use original lower bound for threshold coloring thresholds, chartsTheme, - chartsTheme.echartsTheme[0] as string + chartsTheme.echartsTheme[0] as string, ), }, }; @@ -141,7 +141,7 @@ export function HistogramChart({ type: 'custom', renderItem: function ( params: CustomSeriesRenderItemParams, - api: CustomSeriesRenderItemAPI + api: CustomSeriesRenderItemAPI, ): CustomSeriesRenderItemReturn { const lowerBound = api.value(0) as number; const upperBound = api.value(1) as number; diff --git a/histogramchart/src/components/HistogramChartOptionsEditorSettings.test.tsx b/histogramchart/src/components/HistogramChartOptionsEditorSettings.test.tsx index acf0a3c84..211a3897d 100644 --- a/histogramchart/src/components/HistogramChartOptionsEditorSettings.test.tsx +++ b/histogramchart/src/components/HistogramChartOptionsEditorSettings.test.tsx @@ -23,7 +23,7 @@ describe('HistogramChartOptionsEditorSettings', () => { render( - + , ); }; @@ -35,7 +35,7 @@ describe('HistogramChartOptionsEditorSettings', () => { unit: 'decimal', }, }, - onChange + onChange, ); const unitSelector = screen.getByRole('combobox', { name: 'Unit' }); userEvent.click(unitSelector); @@ -48,7 +48,7 @@ describe('HistogramChartOptionsEditorSettings', () => { format: { unit: 'years', }, - }) + }), ); }); @@ -64,7 +64,7 @@ describe('HistogramChartOptionsEditorSettings', () => { }, min: 1, }, - onChange + onChange, ); const minInput = await screen.findByRole('spinbutton', { name: /Min/ }); expect(minInput).toBeInTheDocument(); @@ -86,7 +86,7 @@ describe('HistogramChartOptionsEditorSettings', () => { }, max: 1, }, - onChange + onChange, ); const maxInput = await screen.findByRole('spinbutton', { name: /Max/ }); expect(maxInput).toBeInTheDocument(); @@ -104,7 +104,7 @@ describe('HistogramChartOptionsEditorSettings', () => { unit: 'decimal', }, }, - onChange + onChange, ); const logBaseSelector = screen.getByRole('combobox', { name: 'Log Base' }); userEvent.click(logBaseSelector); @@ -115,7 +115,7 @@ describe('HistogramChartOptionsEditorSettings', () => { expect(onChange).toHaveBeenCalledWith( expect.objectContaining({ logBase: 10, - }) + }), ); }); @@ -128,7 +128,7 @@ describe('HistogramChartOptionsEditorSettings', () => { }, logBase: 10, }, - onChange + onChange, ); const logBaseSelector = screen.getByRole('combobox', { name: 'Log Base' }); userEvent.click(logBaseSelector); @@ -139,7 +139,7 @@ describe('HistogramChartOptionsEditorSettings', () => { expect(onChange).toHaveBeenCalledWith( expect.objectContaining({ logBase: undefined, - }) + }), ); }); }); diff --git a/histogramchart/src/components/HistogramChartOptionsEditorSettings.tsx b/histogramchart/src/components/HistogramChartOptionsEditorSettings.tsx index ca8789656..0f0486193 100644 --- a/histogramchart/src/components/HistogramChartOptionsEditorSettings.tsx +++ b/histogramchart/src/components/HistogramChartOptionsEditorSettings.tsx @@ -47,7 +47,7 @@ export function HistogramChartOptionsEditorSettings(props: HistogramChartOptions onChange( produce(value, (draft: HistogramChartOptions) => { draft.format = newFormat; - }) + }), ); }; @@ -55,7 +55,7 @@ export function HistogramChartOptionsEditorSettings(props: HistogramChartOptions onChange( produce(value, (draft: HistogramChartOptions) => { draft.thresholds = thresholds; - }) + }), ); }; @@ -99,7 +99,7 @@ export function HistogramChartOptionsEditorSettings(props: HistogramChartOptions onChange( produce(value, (draft: HistogramChartOptions) => { draft.min = newValue; - }) + }), ); }} placeholder={minPlaceholder} @@ -119,7 +119,7 @@ export function HistogramChartOptionsEditorSettings(props: HistogramChartOptions onChange( produce(value, (draft: HistogramChartOptions) => { draft.max = newValue; - }) + }), ); }} placeholder={maxPlaceholder} @@ -140,7 +140,7 @@ export function HistogramChartOptionsEditorSettings(props: HistogramChartOptions onChange( produce(value, (draft: HistogramChartOptions) => { draft.logBase = newValue.log; - }) + }), ); }} disableClearable diff --git a/histogramchart/src/utils/thresholds.ts b/histogramchart/src/utils/thresholds.ts index 334101fbc..a19f7c4ee 100644 --- a/histogramchart/src/utils/thresholds.ts +++ b/histogramchart/src/utils/thresholds.ts @@ -17,7 +17,7 @@ export function getColorFromThresholds( value: number, thresholds: ThresholdOptions | undefined, chartsTheme: PersesChartsTheme, - defaultColor: string + defaultColor: string, ): string | null { if (thresholds?.steps) { const matchingColors = thresholds.steps diff --git a/jaeger/package.json b/jaeger/package.json index 3e5856281..48be586e2 100644 --- a/jaeger/package.json +++ b/jaeger/package.json @@ -18,6 +18,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/jaeger/src/model/jaeger-client.test.ts b/jaeger/src/model/jaeger-client.test.ts index f78b067ef..f7259bf40 100644 --- a/jaeger/src/model/jaeger-client.test.ts +++ b/jaeger/src/model/jaeger-client.test.ts @@ -31,7 +31,7 @@ describe('jaeger-client', () => { limit: 25, start: 1000, }, - { datasourceUrl: 'http://jaeger.example' } + { datasourceUrl: 'http://jaeger.example' }, ); expect(fetchMock).toHaveBeenCalledWith( @@ -39,7 +39,7 @@ describe('jaeger-client', () => { { headers: {}, method: 'GET', - } + }, ); }); diff --git a/jaeger/src/model/jaeger-client.ts b/jaeger/src/model/jaeger-client.ts index ea28738bc..22606f74e 100644 --- a/jaeger/src/model/jaeger-client.ts +++ b/jaeger/src/model/jaeger-client.ts @@ -26,7 +26,7 @@ export interface JaegerClient extends DatasourceClient { getTrace(traceId: string, headers?: RequestHeaders): Promise>; searchTraces( params: JaegerSearchRequestParameters, - headers?: RequestHeaders + headers?: RequestHeaders, ): Promise>; searchServices(headers?: RequestHeaders): Promise>; searchOperations(service: string, headers?: RequestHeaders): Promise>; @@ -65,7 +65,7 @@ function buildSearchParams(params: JaegerSearchRequestParameters): URLSearchPara function fetchWithGet( apiURI: string, params: JaegerSearchRequestParameters, - queryOptions: QueryOptions + queryOptions: QueryOptions, ): Promise { const { datasourceUrl, headers = {} } = queryOptions; @@ -87,7 +87,7 @@ export function getTrace(traceId: string, queryOptions: QueryOptions): Promise> { return fetchWithGet>('/api/traces', params, queryOptions); } @@ -98,7 +98,7 @@ export function searchServices(queryOptions: QueryOptions): Promise> { return fetchWithGet>('/api/operations', { service }, queryOptions); } diff --git a/jaeger/src/model/jaeger-selectors.ts b/jaeger/src/model/jaeger-selectors.ts index d239d2646..1b181e18c 100644 --- a/jaeger/src/model/jaeger-selectors.ts +++ b/jaeger/src/model/jaeger-selectors.ts @@ -27,7 +27,7 @@ export function isDefaultJaegerSelector(datasourceSelectValue: DatasourceSelectV } export function isJaegerDatasourceSelector( - datasourceSelectValue: DatasourceSelectValue + datasourceSelectValue: DatasourceSelectValue, ): datasourceSelectValue is JaegerDatasourceSelector { return isVariableDatasource(datasourceSelectValue) || datasourceSelectValue.kind === JAEGER_DATASOURCE_KIND; } diff --git a/jaeger/src/plugins/JaegerTraceQueryEditor.test.tsx b/jaeger/src/plugins/JaegerTraceQueryEditor.test.tsx index d6be24308..89b13108e 100644 --- a/jaeger/src/plugins/JaegerTraceQueryEditor.test.tsx +++ b/jaeger/src/plugins/JaegerTraceQueryEditor.test.tsx @@ -37,7 +37,7 @@ describe('JaegerTraceQueryEditor', () => { () => ({ kind: 'JaegerDatasource', - }) as never + }) as never, ); }); @@ -63,7 +63,7 @@ describe('JaegerTraceQueryEditor', () => { expect(onChange).toHaveBeenCalledWith({ service: 'frontend', traceId: '7d73f3ae841bf59a', - }) + }), ); }); @@ -84,7 +84,7 @@ describe('JaegerTraceQueryEditor', () => { minDuration: ' 50ms ', }} onChange={onChange} - /> + />, ); await waitFor(() => @@ -92,7 +92,7 @@ describe('JaegerTraceQueryEditor', () => { minDuration: '50ms', operation: undefined, service: undefined, - }) + }), ); }); diff --git a/jaeger/src/plugins/JaegerTraceQueryEditor.tsx b/jaeger/src/plugins/JaegerTraceQueryEditor.tsx index f30101c11..fd375d7fa 100644 --- a/jaeger/src/plugins/JaegerTraceQueryEditor.tsx +++ b/jaeger/src/plugins/JaegerTraceQueryEditor.tsx @@ -82,7 +82,7 @@ export function JaegerTraceQueryEditor(props: JaegerTraceQueryEditorProps): Reac onChange( produce(value, (draft) => { draft.datasource = isDefaultJaegerSelector(next) ? undefined : next; - }) + }), ); return; } @@ -95,10 +95,10 @@ export function JaegerTraceQueryEditor(props: JaegerTraceQueryEditorProps): Reac onChange( produce(value, (draft) => { draft[field] = normalizeFieldValue(nextValue); - }) + }), ); }, - [onChange, value] + [onChange, value], ); return ( @@ -146,7 +146,7 @@ export function JaegerTraceQueryEditor(props: JaegerTraceQueryEditorProps): Reac onChange( produce(value, (draft) => { draft.spanKind = event.target.value === '' ? undefined : event.target.value; - }) + }), ) } > @@ -168,7 +168,7 @@ export function JaegerTraceQueryEditor(props: JaegerTraceQueryEditorProps): Reac produce(value, (draft) => { draft.limit = typeof event.target.value === 'number' ? event.target.value : parseInt(event.target.value); - }) + }), ) } > @@ -253,7 +253,7 @@ function LazyAutocompleteTextField(props: LazyAutocompleteTextFieldProps): React setDraftValue(normalizedValue); onCommit(toOptionalString(normalizedValue)); }, - [onCommit] + [onCommit], ); const handleInputChange = useCallback((_event: SyntheticEvent, nextValue: string, reason: string): void => { @@ -266,7 +266,7 @@ function LazyAutocompleteTextField(props: LazyAutocompleteTextFieldProps): React (_event: SyntheticEvent, nextValue: string | null): void => { commitValue(nextValue ?? ''); }, - [commitValue] + [commitValue], ); const handleBlur = useCallback((): void => { diff --git a/jaeger/src/plugins/get-trace-data.test.ts b/jaeger/src/plugins/get-trace-data.test.ts index e24b7eee9..96d1a8cd5 100644 --- a/jaeger/src/plugins/get-trace-data.test.ts +++ b/jaeger/src/plugins/get-trace-data.test.ts @@ -94,7 +94,7 @@ const getDatasource: jest.Mock = jest.fn( kind: 'JaegerDatasource', spec: datasource, }, - }) + }), ); function createContext(client: JaegerClient): TraceQueryContext { @@ -166,7 +166,7 @@ describe('getTraceData', () => { minDuration: '20ms', limit: 25, }, - context + context, ); expect(client.searchTraces).toHaveBeenCalledWith({ @@ -202,10 +202,10 @@ describe('getTraceData', () => { const client = makeClient(); await expect(getTraceData({ tags: '[]' }, createContext(client))).rejects.toThrow( - 'Jaeger tags must be a JSON object.' + 'Jaeger tags must be a JSON object.', ); await expect(getTraceData({ operation: 'GET /api/cart' }, createContext(client))).rejects.toThrow( - 'Jaeger trace searches require a service when Trace ID is not provided.' + 'Jaeger trace searches require a service when Trace ID is not provided.', ); }); diff --git a/jaeger/src/plugins/get-trace-data.ts b/jaeger/src/plugins/get-trace-data.ts index fc0d95a8a..b68010675 100644 --- a/jaeger/src/plugins/get-trace-data.ts +++ b/jaeger/src/plugins/get-trace-data.ts @@ -132,7 +132,7 @@ export const getTraceData: TraceQueryPlugin['getTraceData' function resolveSpec( spec: JaegerTraceQuerySpec, - variableState: VariableStateMap + variableState: VariableStateMap, ): Omit & { tags?: string } { const traceId = trimToUndefined(replaceVariables(spec.traceId ?? '', variableState)); const service = trimToUndefined(replaceVariables(spec.service ?? '', variableState)); @@ -187,8 +187,8 @@ function buildExecutedQueryString(spec: JaegerTraceQuerySpec): string { minDuration: spec.minDuration, maxDuration: spec.maxDuration, limit: spec.limit, - }).filter(([, value]) => value !== undefined && value !== '') - ) + }).filter(([, value]) => value !== undefined && value !== ''), + ), ); } @@ -230,7 +230,7 @@ function getTraceBounds(spans: JaegerSpan[]): { startTimeUnixMs: number; endTime const [startTime, endTime] = spans.reduce<[number, number]>( (acc, span) => [Math.min(acc[0], span.startTime), Math.max(acc[1], span.startTime + span.duration)], - [spans[0]!.startTime, spans[0]!.startTime + spans[0]!.duration] + [spans[0]!.startTime, spans[0]!.startTime + spans[0]!.duration], ); return { @@ -271,7 +271,7 @@ export function jaegerTraceToOTLP(trace: JaegerTrace): otlptracev1.TracesData { function getOrCreateResourceSpan( resourceSpanByProcessID: Map, processID: string, - process?: JaegerProcess + process?: JaegerProcess, ): otlptracev1.ResourceSpan { const existing = resourceSpanByProcessID.get(processID); if (existing) { diff --git a/jaeger/src/plugins/plugin.test.ts b/jaeger/src/plugins/plugin.test.ts index 0b40b711a..e616e63fe 100644 --- a/jaeger/src/plugins/plugin.test.ts +++ b/jaeger/src/plugins/plugin.test.ts @@ -22,8 +22,8 @@ describe('JaegerTraceQuery', () => { service: '$service', tags: '{"env":"$env"}', }, - {} as never - ) + {} as never, + ), ).toEqual({ variables: ['trace_ds', 'service', 'env'], }); diff --git a/logexplorer/package.json b/logexplorer/package.json index 8780e2229..1cc9554de 100644 --- a/logexplorer/package.json +++ b/logexplorer/package.json @@ -17,6 +17,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest --passWithNoTests", "type-check": "tsc --noEmit" }, diff --git a/logexplorer/src/explore/log-explorer/LogExplorer.tsx b/logexplorer/src/explore/log-explorer/LogExplorer.tsx index 7ba3be788..d2bc0c446 100644 --- a/logexplorer/src/explore/log-explorer/LogExplorer.tsx +++ b/logexplorer/src/explore/log-explorer/LogExplorer.tsx @@ -113,7 +113,7 @@ export function LogExplorer(): ReactElement { datasourceStore, refreshKey: '', }), - [absoluteTimeRange, variableState, datasourceStore] + [absoluteTimeRange, variableState, datasourceStore], ); // Get all datasource plugins that support LogQuery @@ -127,7 +127,7 @@ export function LogExplorer(): ReactElement { return pluginSpec?.supportedQueryTypes?.includes('LogQuery'); }) .map((p) => p.kind) ?? [], - [datasourcePlugins] + [datasourcePlugins], ); const { data: volumeQueries = EMPTY_QUERIES } = useQuery({ @@ -143,7 +143,7 @@ export function LogExplorer(): ReactElement { console.error(`[LogExplorer] Failed to create volume query for ${query.spec.plugin.kind}:`, error); return null; } - }) + }), ); return results.filter((q): q is QueryDefinition => q !== null); }, diff --git a/logstable/package.json b/logstable/package.json index 68d91c9fb..4e8268173 100644 --- a/logstable/package.json +++ b/logstable/package.json @@ -18,6 +18,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/logstable/src/LogsTablePanel.test.tsx b/logstable/src/LogsTablePanel.test.tsx index aa795626f..34d47605b 100644 --- a/logstable/src/LogsTablePanel.test.tsx +++ b/logstable/src/LogsTablePanel.test.tsx @@ -69,7 +69,7 @@ describe('LogsTablePanel', () => { - + , ); }; diff --git a/logstable/src/components/LogRow/LogRow.test.tsx b/logstable/src/components/LogRow/LogRow.test.tsx index 31cd69ec3..92a2d86cf 100644 --- a/logstable/src/components/LogRow/LogRow.test.tsx +++ b/logstable/src/components/LogRow/LogRow.test.tsx @@ -39,7 +39,7 @@ describe('LogRow', () => { onToggle={jest.fn()} isSelected={isSelected} onSelect={onSelect} - /> + />, ); }; diff --git a/logstable/src/components/LogRow/LogRow.tsx b/logstable/src/components/LogRow/LogRow.tsx index 6ae07dc05..5f4f35315 100644 --- a/logstable/src/components/LogRow/LogRow.tsx +++ b/logstable/src/components/LogRow/LogRow.tsx @@ -92,7 +92,7 @@ const DefaultLogRow: React.FC = ({ onToggle(index); } }, - [isExpandable, onToggle, index] + [isExpandable, onToggle, index], ); const handleRowMouseDown = useCallback( @@ -101,7 +101,7 @@ const DefaultLogRow: React.FC = ({ onSelect(index, e); } }, - [onSelect, index] + [onSelect, index], ); const handleOpenMenu = useCallback((e: React.MouseEvent) => { @@ -145,7 +145,7 @@ const DefaultLogRow: React.FC = ({ setCopySuccess(false); }, COPY_SUCCESS_DURATION_MS); }, - [log, handleCloseMenu] + [log, handleCloseMenu], ); if (!log) return null; diff --git a/logstable/src/components/LogRow/LogsStyles.tsx b/logstable/src/components/LogRow/LogsStyles.tsx index 69a7e9dd8..ba5c005c5 100644 --- a/logstable/src/components/LogRow/LogsStyles.tsx +++ b/logstable/src/components/LogRow/LogsStyles.tsx @@ -41,7 +41,7 @@ export const LogRowContent = styled(Box, { '&:hover': { backgroundColor: isSelected ? theme.palette.action.focus : theme.palette.action.hover, }, - }) + }), ); export const ExpandButton = styled(IconButton, { diff --git a/logstable/src/components/VirtualizedLogsList.tsx b/logstable/src/components/VirtualizedLogsList.tsx index 35ec53384..1ef92e47a 100644 --- a/logstable/src/components/VirtualizedLogsList.tsx +++ b/logstable/src/components/VirtualizedLogsList.tsx @@ -153,7 +153,7 @@ export const VirtualizedLogsList: React.FC = ({ await navigator.clipboard.writeText(text); showCopyPopover(format, selectedLogs.length); }, - [logs, showCopyPopover] + [logs, showCopyPopover], ); const handleRowSelect = useCallback( @@ -198,7 +198,7 @@ export const VirtualizedLogsList: React.FC = ({ setLastSelectedIndex(index); } }, - [selectedRows, lastSelectedIndex] + [selectedRows, lastSelectedIndex], ); const renderLogRow = (index: number): ReactNode | null => { diff --git a/loki/package.json b/loki/package.json index 728e724e2..a5b8b4e55 100644 --- a/loki/package.json +++ b/loki/package.json @@ -10,6 +10,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/loki/src/components/complete.test.ts b/loki/src/components/complete.test.ts index 606c9b215..efca07532 100644 --- a/loki/src/components/complete.test.ts +++ b/loki/src/components/complete.test.ts @@ -360,7 +360,7 @@ describe('complete', () => { const view = new EditorView({ state }); applyQuotedCompletion(view, { label: completion }, from, to ?? from); expect(view.state.doc.toString()).toBe(expected); - } + }, ); }); }); diff --git a/loki/src/components/complete.ts b/loki/src/components/complete.ts index cf4f801ad..33e6f3efb 100644 --- a/loki/src/components/complete.ts +++ b/loki/src/components/complete.ts @@ -53,7 +53,7 @@ const ERROR_NODE = 0; // Lezer parser creates error nodes for incomplete/malform export async function complete( completionCfg: CompletionConfig, - { state, pos }: CompletionContext + { state, pos }: CompletionContext, ): Promise { // First, identify the completion scope const completion = identifyCompletion(state, pos, syntaxTree(state)); diff --git a/loki/src/model/loki-client.test.ts b/loki/src/model/loki-client.test.ts index b0ad89e7c..f77f4a6b0 100644 --- a/loki/src/model/loki-client.test.ts +++ b/loki/src/model/loki-client.test.ts @@ -154,7 +154,7 @@ describe('handleErrorResponse', () => { }); await expect(labels({}, options)).rejects.toThrow( - 'Loki query_range error: 400 Bad Request - {"message":"parse error","status":"error"}' + 'Loki query_range error: 400 Bad Request - {"message":"parse error","status":"error"}', ); }); @@ -168,7 +168,7 @@ describe('handleErrorResponse', () => { }); await expect(labels({}, options)).rejects.toThrow( - 'Loki query_range error: 500 Internal Server Error - upstream timeout' + 'Loki query_range error: 500 Internal Server Error - upstream timeout', ); }); diff --git a/loki/src/model/loki-client.ts b/loki/src/model/loki-client.ts index 375744e7b..6131b129b 100644 --- a/loki/src/model/loki-client.ts +++ b/loki/src/model/loki-client.ts @@ -82,7 +82,7 @@ export interface LokiClient { query: string, start?: string, end?: string, - headers?: LokiRequestHeaders + headers?: LokiRequestHeaders, ) => Promise; } @@ -152,7 +152,7 @@ export function toUnixSeconds(val: string | number | Date): string { export async function queryRange( params: LokiQueryRangeParams, - options: LokiApiOptions + options: LokiApiOptions, ): Promise { const url = buildUrl('/loki/api/v1/query_range', options.datasourceUrl); url.searchParams.append('query', params.query); @@ -201,7 +201,7 @@ export async function labels(params: LokiLabelsParams, options: LokiApiOptions): export async function labelValues( params: LokiLabelValuesParams, - options: LokiApiOptions + options: LokiApiOptions, ): Promise { const url = buildUrl(`/loki/api/v1/label/${params.labelName}/values`, options.datasourceUrl); if (params.start) url.searchParams.append('start', params.start); @@ -227,7 +227,7 @@ export async function series( match: string[], start: string | undefined, end: string | undefined, - options: LokiApiOptions + options: LokiApiOptions, ): Promise { const url = buildUrl('/loki/api/v1/series', options.datasourceUrl); match.forEach((m) => url.searchParams.append('match[]', m)); @@ -299,7 +299,7 @@ export async function indexStats( query: string, start: string | undefined, end: string | undefined, - options: LokiApiOptions + options: LokiApiOptions, ): Promise { const url = buildUrl('/loki/api/v1/index/stats', options.datasourceUrl); url.searchParams.append('query', query); diff --git a/loki/src/model/loki-selectors.ts b/loki/src/model/loki-selectors.ts index a476dadf8..f3340e7fd 100644 --- a/loki/src/model/loki-selectors.ts +++ b/loki/src/model/loki-selectors.ts @@ -27,7 +27,7 @@ export function isDefaultLokiSelector(datasourceSelectValue: DatasourceSelectVal } export function isLokiDatasourceSelector( - datasourceSelectValue: DatasourceSelectValue + datasourceSelectValue: DatasourceSelectValue, ): datasourceSelectValue is LokiDatasourceSelector { return isVariableDatasource(datasourceSelectValue) || datasourceSelectValue.kind === LOKI_DATASOURCE_KIND; } diff --git a/loki/src/queries/loki-log-query/LokiLogQueryEditor.tsx b/loki/src/queries/loki-log-query/LokiLogQueryEditor.tsx index 0555fa708..8e9644f9a 100644 --- a/loki/src/queries/loki-log-query/LokiLogQueryEditor.tsx +++ b/loki/src/queries/loki-log-query/LokiLogQueryEditor.tsx @@ -40,7 +40,7 @@ export function LokiLogQueryEditor(props: LokiQueryEditorProps): ReactElement { const datasourceSelectValue = datasource ?? DEFAULT_DATASOURCE; const selectedDatasource = useDatasourceSelectValueToSelector( datasourceSelectValue, - LOKI_DATASOURCE_KIND + LOKI_DATASOURCE_KIND, ) as LokiDatasourceSelector; const { query, handleQueryChange, handleQueryBlur } = useQueryState(props); @@ -64,7 +64,7 @@ export function LokiLogQueryEditor(props: LokiQueryEditorProps): ReactElement { // If they're using the default, just omit the datasource prop (i.e. set to undefined) const nextDatasource = isDefaultLokiSelector(newDatasourceSelection) ? undefined : newDatasourceSelection; draft.datasource = nextDatasource; - }) + }), ); return; } @@ -76,7 +76,7 @@ export function LokiLogQueryEditor(props: LokiQueryEditorProps): ReactElement { onChange( produce(value, (draft: LokiLogQuerySpec) => { draft.direction = v; - }) + }), ); // Immediate query execution on Enter or blur @@ -84,7 +84,7 @@ export function LokiLogQueryEditor(props: LokiQueryEditorProps): ReactElement { onChange( produce(value, (draft) => { draft.query = query; - }) + }), ); }; @@ -92,7 +92,7 @@ export function LokiLogQueryEditor(props: LokiQueryEditorProps): ReactElement { (e: string) => { handleQueryChange(e); }, - [handleQueryChange] + [handleQueryChange], ); return ( diff --git a/loki/src/queries/loki-log-query/get-loki-log-data.ts b/loki/src/queries/loki-log-query/get-loki-log-data.ts index 181e73aca..8e36f84f4 100644 --- a/loki/src/queries/loki-log-query/get-loki-log-data.ts +++ b/loki/src/queries/loki-log-query/get-loki-log-data.ts @@ -40,7 +40,7 @@ function convertStreamsToLogs(streams: LokiStreamResult[]): LogData { export const getLokiLogData: LogQueryPlugin['getLogData'] = async ( spec: LokiLogQuerySpec, - context: LogQueryContext + context: LogQueryContext, ) => { if (!spec.query) { return { @@ -51,7 +51,7 @@ export const getLokiLogData: LogQueryPlugin['getLogData'] = as const query = replaceVariables(spec.query, context.variableState); const client = (await context.datasourceStore.getDatasourceClient( - spec.datasource ?? DEFAULT_DATASOURCE + spec.datasource ?? DEFAULT_DATASOURCE, )) as LokiClient; const { start, end } = context.timeRange; diff --git a/loki/src/queries/loki-log-query/loki-log-query-types.test.ts b/loki/src/queries/loki-log-query/loki-log-query-types.test.ts index 658bf5d67..300281acc 100644 --- a/loki/src/queries/loki-log-query/loki-log-query-types.test.ts +++ b/loki/src/queries/loki-log-query/loki-log-query-types.test.ts @@ -76,7 +76,7 @@ describe('LokiLogQuery', () => { { query: '{service="$service", level="$level"} |= "error"', }, - createStubContext() + createStubContext(), ); expect(variables).toEqual(['service', 'level']); }); diff --git a/loki/src/queries/loki-time-series-query/LokiTimeSeriesQueryEditor.tsx b/loki/src/queries/loki-time-series-query/LokiTimeSeriesQueryEditor.tsx index ec59aacdd..7125b9530 100644 --- a/loki/src/queries/loki-time-series-query/LokiTimeSeriesQueryEditor.tsx +++ b/loki/src/queries/loki-time-series-query/LokiTimeSeriesQueryEditor.tsx @@ -37,7 +37,7 @@ export function LokiQueryEditor(props: LokiQueryEditorProps): ReactElement { const datasourceSelectValue = datasource ?? DEFAULT_DATASOURCE; const selectedDatasource = useDatasourceSelectValueToSelector( datasourceSelectValue, - LOKI_DATASOURCE_KIND + LOKI_DATASOURCE_KIND, ) as LokiDatasourceSelector; const { query, handleQueryChange, handleQueryBlur } = useQueryState(props); @@ -46,7 +46,7 @@ export function LokiQueryEditor(props: LokiQueryEditorProps): ReactElement { onChange( produce(value, (draft) => { draft.datasource = newDatasourceSelection; - }) + }), ); return; } @@ -59,7 +59,7 @@ export function LokiQueryEditor(props: LokiQueryEditorProps): ReactElement { onChange( produce(value, (draft) => { draft.query = query; - }) + }), ); }; @@ -67,7 +67,7 @@ export function LokiQueryEditor(props: LokiQueryEditorProps): ReactElement { (e: string) => { handleQueryChange(e); }, - [handleQueryChange] + [handleQueryChange], ); return ( diff --git a/loki/src/queries/loki-time-series-query/get-loki-time-series-data.ts b/loki/src/queries/loki-time-series-query/get-loki-time-series-data.ts index 47adc99df..82f95ef6a 100644 --- a/loki/src/queries/loki-time-series-query/get-loki-time-series-data.ts +++ b/loki/src/queries/loki-time-series-query/get-loki-time-series-data.ts @@ -47,7 +47,7 @@ function getLokiRangeStep( startMs: number, endMs: number, minStepSeconds = DEFAULT_MIN_STEP_SECONDS, - suggestedStepMs = 0 + suggestedStepMs = 0, ): number { const suggestedStepSeconds = suggestedStepMs / 1000; const queryRangeSeconds = (endMs - startMs) / 1000; @@ -104,7 +104,7 @@ function convertVectorToTimeSeries(vector: LokiVectorResult[]): TimeSeries[] { export const getLokiTimeSeriesData: TimeSeriesQueryPlugin['getTimeSeriesData'] = async ( spec, - context + context, ) => { if (!spec.query) { return { @@ -116,7 +116,7 @@ export const getLokiTimeSeriesData: TimeSeriesQueryPlugin( - spec.datasource ?? DEFAULT_DATASOURCE + spec.datasource ?? DEFAULT_DATASOURCE, )) as LokiClient; const { start, end } = context.timeRange; diff --git a/loki/src/queries/loki-time-series-query/loki-time-series-query-types.test.ts b/loki/src/queries/loki-time-series-query/loki-time-series-query-types.test.ts index feaf36260..0191373f6 100644 --- a/loki/src/queries/loki-time-series-query/loki-time-series-query-types.test.ts +++ b/loki/src/queries/loki-time-series-query/loki-time-series-query-types.test.ts @@ -108,7 +108,7 @@ describe('LokiTimeSeriesQuery', () => { { query: 'rate({service="$service", instance="$instance"}[5m])', }, - createStubContext() + createStubContext(), ); expect(variables).toEqual(['service', 'instance']); }); @@ -127,7 +127,7 @@ describe('LokiTimeSeriesQuery', () => { const context = createStubContext({ mode: 'instant' }); const result = await LokiTimeSeriesQuery.getTimeSeriesData( { query: 'count_over_time({service="api"} [1h])' }, - context + context, ); expect(lokiStubClient.query).toHaveBeenCalledTimes(1); diff --git a/loki/src/queries/query-editor-model.ts b/loki/src/queries/query-editor-model.ts index a9a92ed12..c14dee91d 100644 --- a/loki/src/queries/query-editor-model.ts +++ b/loki/src/queries/query-editor-model.ts @@ -29,7 +29,7 @@ type LokiQuerySpec = { * every time the user types. */ export function useQueryState( - props: OptionsEditorProps + props: OptionsEditorProps, ): { query: string; handleQueryChange: (e: string) => void; @@ -60,7 +60,7 @@ export function useQueryState( onChange( produce(value, (draft) => { draft.query = query; - }) + }), ); }; diff --git a/loki/src/variables/LokiLabelNamesVariable.tsx b/loki/src/variables/LokiLabelNamesVariable.tsx index 5690fc88a..fc4c06911 100644 --- a/loki/src/variables/LokiLabelNamesVariable.tsx +++ b/loki/src/variables/LokiLabelNamesVariable.tsx @@ -29,7 +29,7 @@ export const LokiLabelNamesVariable: VariablePlugin = { datasourceSelectValueToSelector( spec.datasource ?? DEFAULT_LOKI, ctx.variables, - await ctx.datasourceStore.listDatasourceSelectItems(LOKI_DATASOURCE_KIND) + await ctx.datasourceStore.listDatasourceSelectItems(LOKI_DATASOURCE_KIND), ) ?? DEFAULT_LOKI; const client: LokiClient = await ctx.datasourceStore.getDatasourceClient(datasourceSelector); const timeRange = getLokiTimeRange(ctx.timeRange); diff --git a/loki/src/variables/loki-variables.tsx b/loki/src/variables/loki-variables.tsx index 751535365..51f644c8d 100644 --- a/loki/src/variables/loki-variables.tsx +++ b/loki/src/variables/loki-variables.tsx @@ -46,7 +46,7 @@ const EMPTY_MATCHERS: string[] = []; function useLokiDatasourceChangeHandler( value: T, - onChange: (value: T) => void + onChange: (value: T) => void, ): DatasourceSelectProps['onChange'] { return useCallback( (next) => { @@ -55,13 +55,13 @@ function useLokiDatasourceChangeHandler( onChange( produce(value, (draft) => { draft.datasource = !isVariableDatasource(next) && isDefaultLokiSelector(next) ? undefined : next; - }) + }), ); return; } throw new Error('Got unexpected non-Loki datasource selector'); }, - [onChange, value] + [onChange, value], ); } @@ -80,10 +80,10 @@ export function LokiLabelValuesVariableEditor(props: OptionsEditorProps { draft.labelName = e.target.value; - }) + }), ); }, - [onChange, value] + [onChange, value], ); const handleMatchEditorsChange = useCallback( @@ -91,10 +91,10 @@ export function LokiLabelValuesVariableEditor(props: OptionsEditorProps { draft.matchers = matchers; - }) + }), ); }, - [onChange, value] + [onChange, value], ); return ( @@ -144,10 +144,10 @@ export function LokiLabelNamesVariableEditor(props: OptionsEditorProps { draft.matchers = matchers; - }) + }), ); }, - [onChange, value] + [onChange, value], ); return ( @@ -180,7 +180,7 @@ export function LokiLogQLVariableEditor(props: OptionsEditorProps(selectedDatasource); @@ -192,10 +192,10 @@ export function LokiLogQLVariableEditor(props: OptionsEditorProps { draft.expr = e.target.textContent ?? ''; - }) + }), ); }, - [onChange, value] + [onChange, value], ); const handleLabelNameChange = useCallback( @@ -203,10 +203,10 @@ export function LokiLogQLVariableEditor(props: OptionsEditorProps { draft.labelName = e.target.value; - }) + }), ); }, - [onChange, value] + [onChange, value], ); return ( diff --git a/markdown/package.json b/markdown/package.json index 9d98b8365..8deb59ca4 100644 --- a/markdown/package.json +++ b/markdown/package.json @@ -18,6 +18,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest --passWithNoTests", "type-check": "tsc --noEmit" }, diff --git a/opensearch/package.json b/opensearch/package.json index cd08beccc..230d0d80b 100644 --- a/opensearch/package.json +++ b/opensearch/package.json @@ -11,6 +11,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/opensearch/src/model/opensearch-client.test.ts b/opensearch/src/model/opensearch-client.test.ts index 60bfd50a3..e5d30ac79 100644 --- a/opensearch/src/model/opensearch-client.test.ts +++ b/opensearch/src/model/opensearch-client.test.ts @@ -54,7 +54,7 @@ describe('opensearch-client', () => { const mock = mockFetch({ ok: true, status: 200, body: { schema: [], datarows: [] } }); await ppl( { query: 'source=logs-*' }, - { datasourceUrl: 'http://localhost:9200', headers: { Authorization: 'Basic xyz' } } + { datasourceUrl: 'http://localhost:9200', headers: { Authorization: 'Basic xyz' } }, ); const [, init] = mock.mock.calls[0] as [string, RequestInit]; expect((init.headers as Record).Authorization).toBe('Basic xyz'); @@ -68,7 +68,7 @@ describe('opensearch-client', () => { body: '{"error":{"reason":"bad PPL"}}', }); await expect(ppl({ query: 'broken' }, { datasourceUrl: 'http://localhost:9200' })).rejects.toBeInstanceOf( - OpenSearchPPLError + OpenSearchPPLError, ); }); @@ -105,10 +105,10 @@ describe('opensearch-client', () => { it('combines reason and details when both are present and differ', () => { const err = new OpenSearchPPLError( 400, - '{"error":{"reason":"Invalid Query","details":"can\'t resolve Symbol(name=@timestamp)"}}' + '{"error":{"reason":"Invalid Query","details":"can\'t resolve Symbol(name=@timestamp)"}}', ); expect(err.message).toBe( - "OpenSearch PPL request failed (400): Invalid Query — can't resolve Symbol(name=@timestamp)" + "OpenSearch PPL request failed (400): Invalid Query — can't resolve Symbol(name=@timestamp)", ); }); @@ -125,7 +125,7 @@ describe('opensearch-client', () => { it('falls through to details when reason is an empty string', () => { const err = new OpenSearchPPLError( 400, - '{"error":{"reason":"","details":"can\'t resolve Symbol(name=@timestamp)"}}' + '{"error":{"reason":"","details":"can\'t resolve Symbol(name=@timestamp)"}}', ); expect(err.message).toBe("OpenSearch PPL request failed (400): can't resolve Symbol(name=@timestamp)"); }); diff --git a/opensearch/src/model/opensearch-client.ts b/opensearch/src/model/opensearch-client.ts index 8f2f4bfb6..8a286eaa5 100644 --- a/opensearch/src/model/opensearch-client.ts +++ b/opensearch/src/model/opensearch-client.ts @@ -29,7 +29,7 @@ export interface OpenSearchClient { ppl: ( params: OpenSearchPPLParams, headers?: OpenSearchRequestHeaders, - signal?: AbortSignal + signal?: AbortSignal, ) => Promise; } @@ -37,7 +37,7 @@ export class OpenSearchPPLError extends Error { constructor( public readonly status: number, public readonly body: string, - message?: string + message?: string, ) { super(message ?? buildShortMessage(status, body)); this.name = 'OpenSearchPPLError'; @@ -82,7 +82,7 @@ function buildUrl(path: string, datasourceUrl: string): URL { export async function ppl( params: OpenSearchPPLParams, options: OpenSearchApiOptions, - signal?: AbortSignal + signal?: AbortSignal, ): Promise { const url = buildUrl('/_plugins/_ppl', options.datasourceUrl); diff --git a/opensearch/src/model/opensearch-selectors.ts b/opensearch/src/model/opensearch-selectors.ts index b348f4162..1fe6356a4 100644 --- a/opensearch/src/model/opensearch-selectors.ts +++ b/opensearch/src/model/opensearch-selectors.ts @@ -27,7 +27,7 @@ export function isDefaultOpenSearchSelector(datasourceSelectValue: DatasourceSel } export function isOpenSearchDatasourceSelector( - datasourceSelectValue: DatasourceSelectValue + datasourceSelectValue: DatasourceSelectValue, ): datasourceSelectValue is OpenSearchDatasourceSelector { return isVariableDatasource(datasourceSelectValue) || datasourceSelectValue.kind === OPENSEARCH_DATASOURCE_KIND; } diff --git a/opensearch/src/queries/opensearch-log-query/OpenSearchLogQueryEditor.tsx b/opensearch/src/queries/opensearch-log-query/OpenSearchLogQueryEditor.tsx index 63e14add1..9400e50c7 100644 --- a/opensearch/src/queries/opensearch-log-query/OpenSearchLogQueryEditor.tsx +++ b/opensearch/src/queries/opensearch-log-query/OpenSearchLogQueryEditor.tsx @@ -47,7 +47,7 @@ export function OpenSearchLogQueryEditor(props: OpenSearchQueryEditorProps): Rea const datasourceSelectValue = datasource ?? DEFAULT_DATASOURCE; const selectedDatasource = useDatasourceSelectValueToSelector( datasourceSelectValue, - OPENSEARCH_DATASOURCE_KIND + OPENSEARCH_DATASOURCE_KIND, ) as OpenSearchDatasourceSelector; const { query, handleQueryChange, handleQueryBlur } = useQueryState(props); @@ -57,7 +57,7 @@ export function OpenSearchLogQueryEditor(props: OpenSearchQueryEditorProps): Rea onChange( produce(value, (draft) => { draft.datasource = isDefaultOpenSearchSelector(newDatasourceSelection) ? undefined : newDatasourceSelection; - }) + }), ); return; } @@ -69,7 +69,7 @@ export function OpenSearchLogQueryEditor(props: OpenSearchQueryEditorProps): Rea onChange( produce(value, (draft) => { draft.index = next.length > 0 ? next : undefined; - }) + }), ); }; @@ -80,7 +80,7 @@ export function OpenSearchLogQueryEditor(props: OpenSearchQueryEditorProps): Rea onChange( produce(value, (draft) => { draft[field] = next.length > 0 ? next : undefined; - }) + }), ); }; @@ -89,7 +89,7 @@ export function OpenSearchLogQueryEditor(props: OpenSearchQueryEditorProps): Rea onChange( produce(value, (draft) => { draft.disableTimeFilter = checked ? true : undefined; - }) + }), ); }; @@ -98,7 +98,7 @@ export function OpenSearchLogQueryEditor(props: OpenSearchQueryEditorProps): Rea onChange( produce(value, (draft) => { draft.query = query; - }) + }), ); }; diff --git a/opensearch/src/queries/opensearch-log-query/get-opensearch-log-data.test.ts b/opensearch/src/queries/opensearch-log-query/get-opensearch-log-data.test.ts index 008b8a317..59f549004 100644 --- a/opensearch/src/queries/opensearch-log-query/get-opensearch-log-data.test.ts +++ b/opensearch/src/queries/opensearch-log-query/get-opensearch-log-data.test.ts @@ -80,7 +80,7 @@ describe('OpenSearchLogQuery', () => { query: 'source=$index | where service="$service" and level="$level"', index: '$index', }, - createStubContext() + createStubContext(), ); expect(variables?.toSorted()).toEqual(['index', 'level', 'service']); }); @@ -103,7 +103,7 @@ describe('OpenSearchLogQuery', () => { if (!OpenSearchLogQuery.dependsOn) throw new Error('dependsOn is not defined'); const { variables } = OpenSearchLogQuery.dependsOn( { query: "source=logs-* | where traceId='$traceId'" }, - createStubContext() + createStubContext(), ); expect(variables).toContain('traceId'); }); @@ -124,7 +124,7 @@ describe('OpenSearchLogQuery', () => { timestampField: 'time', messageField: 'body', }, - createStubContext() + createStubContext(), ); const sentQuery = pplMock.mock.calls[0]?.[0]?.query as string; @@ -143,7 +143,7 @@ describe('OpenSearchLogQuery', () => { variableState: { traceId: { value: 'abc123', loading: false }, } as unknown as LogQueryContext['variableState'], - } + }, ); const sentQuery = pplMock.mock.calls[0]?.[0]?.query as string; @@ -153,7 +153,7 @@ describe('OpenSearchLogQuery', () => { it('executes a PPL query and maps rows to log entries', async () => { const result = await OpenSearchLogQuery.getLogData( { query: 'source=logs-* | where level="error"' }, - createStubContext() + createStubContext(), ); expect(stubClient.ppl).toHaveBeenCalledTimes(1); @@ -174,28 +174,28 @@ describe('buildBoundedPPL', () => { it('injects the time-range filter immediately after the source clause', () => { const q = buildBoundedPPL('source=logs-* | where level="error"', start, end); expect(q).toBe( - "source=logs-* | where `@timestamp` >= '2025-01-01T00:00:00.000Z' and `@timestamp` <= '2025-01-01T01:00:00.000Z' | where level=\"error\"" + "source=logs-* | where `@timestamp` >= '2025-01-01T00:00:00.000Z' and `@timestamp` <= '2025-01-01T01:00:00.000Z' | where level=\"error\"", ); }); it('prepends source= when the user query does not declare one', () => { const q = buildBoundedPPL('where level="error"', start, end, { index: 'logs-*' }); expect(q).toBe( - "source=logs-* | where `@timestamp` >= '2025-01-01T00:00:00.000Z' and `@timestamp` <= '2025-01-01T01:00:00.000Z' | where level=\"error\"" + "source=logs-* | where `@timestamp` >= '2025-01-01T00:00:00.000Z' and `@timestamp` <= '2025-01-01T01:00:00.000Z' | where level=\"error\"", ); }); it('leaves the user source clause alone when already present and ignores the spec.index hint', () => { const q = buildBoundedPPL('source=other-* | head 10', start, end, { index: 'logs-*' }); expect(q).toBe( - "source=other-* | where `@timestamp` >= '2025-01-01T00:00:00.000Z' and `@timestamp` <= '2025-01-01T01:00:00.000Z' | head 10" + "source=other-* | where `@timestamp` >= '2025-01-01T00:00:00.000Z' and `@timestamp` <= '2025-01-01T01:00:00.000Z' | head 10", ); }); it('uses a custom timestamp field name in the injected where clause', () => { const q = buildBoundedPPL('source=logs-* | head 10', start, end, { timestampField: 'time' }); expect(q).toBe( - "source=logs-* | where `time` >= '2025-01-01T00:00:00.000Z' and `time` <= '2025-01-01T01:00:00.000Z' | head 10" + "source=logs-* | where `time` >= '2025-01-01T00:00:00.000Z' and `time` <= '2025-01-01T01:00:00.000Z' | head 10", ); }); @@ -204,35 +204,35 @@ describe('buildBoundedPPL', () => { // each backtick is doubled so the value stays a single backtick-quoted identifier const quoted = '```inject`` x`'; expect(q).toBe( - `source=logs-* | where ${quoted} >= '2025-01-01T00:00:00.000Z' and ${quoted} <= '2025-01-01T01:00:00.000Z' | head 10` + `source=logs-* | where ${quoted} >= '2025-01-01T00:00:00.000Z' and ${quoted} <= '2025-01-01T01:00:00.000Z' | head 10`, ); }); it('runs the bound BEFORE a stats command (otherwise @timestamp is gone)', () => { const q = buildBoundedPPL('source=logs-* | stats count() by service', start, end); expect(q).toBe( - "source=logs-* | where `@timestamp` >= '2025-01-01T00:00:00.000Z' and `@timestamp` <= '2025-01-01T01:00:00.000Z' | stats count() by service" + "source=logs-* | where `@timestamp` >= '2025-01-01T00:00:00.000Z' and `@timestamp` <= '2025-01-01T01:00:00.000Z' | stats count() by service", ); }); it('runs the bound BEFORE a fields command that excludes @timestamp', () => { const q = buildBoundedPPL('source=logs-* | fields service, body', start, end); expect(q).toBe( - "source=logs-* | where `@timestamp` >= '2025-01-01T00:00:00.000Z' and `@timestamp` <= '2025-01-01T01:00:00.000Z' | fields service, body" + "source=logs-* | where `@timestamp` >= '2025-01-01T00:00:00.000Z' and `@timestamp` <= '2025-01-01T01:00:00.000Z' | fields service, body", ); }); it('runs the bound BEFORE a top command (which collapses to top-N rows without @timestamp)', () => { const q = buildBoundedPPL('source=logs-* | top 3 service', start, end); expect(q).toBe( - "source=logs-* | where `@timestamp` >= '2025-01-01T00:00:00.000Z' and `@timestamp` <= '2025-01-01T01:00:00.000Z' | top 3 service" + "source=logs-* | where `@timestamp` >= '2025-01-01T00:00:00.000Z' and `@timestamp` <= '2025-01-01T01:00:00.000Z' | top 3 service", ); }); it('appends a single where pipe when the user query has no other pipes', () => { const q = buildBoundedPPL('source=logs-*', start, end); expect(q).toBe( - "source=logs-* | where `@timestamp` >= '2025-01-01T00:00:00.000Z' and `@timestamp` <= '2025-01-01T01:00:00.000Z'" + "source=logs-* | where `@timestamp` >= '2025-01-01T00:00:00.000Z' and `@timestamp` <= '2025-01-01T01:00:00.000Z'", ); }); @@ -258,10 +258,10 @@ describe('buildBoundedPPL', () => { const q = buildBoundedPPL( "source=logs-* | where `@timestamp` >= '2024-12-31T00:00:00Z' | stats count() by service", start, - end + end, ); expect(q).toBe( - "source=logs-* | where `@timestamp` >= '2025-01-01T00:00:00.000Z' and `@timestamp` <= '2025-01-01T01:00:00.000Z' | where `@timestamp` >= '2024-12-31T00:00:00Z' | stats count() by service" + "source=logs-* | where `@timestamp` >= '2025-01-01T00:00:00.000Z' and `@timestamp` <= '2025-01-01T01:00:00.000Z' | where `@timestamp` >= '2024-12-31T00:00:00Z' | stats count() by service", ); }); @@ -290,7 +290,7 @@ describe('buildBoundedPPL', () => { it('does not emit a dangling pipe when the query is just a source clause with a trailing pipe', () => { const q = buildBoundedPPL('source=logs-* |', start, end); expect(q).toBe( - "source=logs-* | where `@timestamp` >= '2025-01-01T00:00:00.000Z' and `@timestamp` <= '2025-01-01T01:00:00.000Z'" + "source=logs-* | where `@timestamp` >= '2025-01-01T00:00:00.000Z' and `@timestamp` <= '2025-01-01T01:00:00.000Z'", ); expect(q.trimEnd().endsWith('|')).toBe(false); }); @@ -398,7 +398,7 @@ describe('convertPPLToLogs', () => { ], datarows: [['2025-01-01T00:00:00.000Z', 'OTel body wins', 'noise']], }, - { timestampField: 'time', messageField: 'body' } + { timestampField: 'time', messageField: 'body' }, ); expect(logs.entries[0]?.line).toBe('OTel body wins'); expect(logs.entries[0]?.labels).toEqual({ message: 'noise' }); @@ -414,7 +414,7 @@ describe('convertPPLToLogs', () => { ], datarows: [['2025-01-01T00:00:00.000Z', 'hello']], }, - { timestampField: 'nope', messageField: 'also-missing' } + { timestampField: 'nope', messageField: 'also-missing' }, ); expect(logs.entries[0]?.line).toBe('hello'); }); diff --git a/opensearch/src/queries/opensearch-log-query/get-opensearch-log-data.ts b/opensearch/src/queries/opensearch-log-query/get-opensearch-log-data.ts index 5e38aafbd..c37c16bf3 100644 --- a/opensearch/src/queries/opensearch-log-query/get-opensearch-log-data.ts +++ b/opensearch/src/queries/opensearch-log-query/get-opensearch-log-data.ts @@ -64,7 +64,7 @@ export function buildBoundedPPL( userQuery: string, start: Date, end: Date, - { index, timestampField = '@timestamp', disableTimeFilter = false }: BoundedPPLOptions = {} + { index, timestampField = '@timestamp', disableTimeFilter = false }: BoundedPPLOptions = {}, ): string { let trimmed = userQuery.trim(); @@ -187,7 +187,7 @@ export function parseTimestamp(v: unknown): number { function rowToObject( schema: OpenSearchPPLResponse['schema'], - row: Array + row: Array, ): Record { const out: Record = {}; schema.forEach((col, i) => { @@ -199,7 +199,7 @@ function rowToObject( export const getOpenSearchLogData: LogQueryPlugin['getLogData'] = async ( spec: OpenSearchLogQuerySpec, context: LogQueryContext, - abortSignal?: AbortSignal + abortSignal?: AbortSignal, ) => { // Treat a blank or whitespace-only query as "no query": trimming it would leave // an empty string that produces invalid PPL, so short-circuit before hitting the API. @@ -213,7 +213,7 @@ export const getOpenSearchLogData: LogQueryPlugin['getLo const query = replaceVariables(spec.query, context.variableState); const resolvedIndex = spec.index ? replaceVariables(spec.index, context.variableState) : undefined; const client = (await context.datasourceStore.getDatasourceClient( - spec.datasource ?? DEFAULT_DATASOURCE + spec.datasource ?? DEFAULT_DATASOURCE, )) as OpenSearchClient; const { start, end } = context.timeRange; diff --git a/opensearch/src/queries/query-editor-model.ts b/opensearch/src/queries/query-editor-model.ts index 7381d3479..01289460a 100644 --- a/opensearch/src/queries/query-editor-model.ts +++ b/opensearch/src/queries/query-editor-model.ts @@ -24,7 +24,7 @@ type OpenSearchQuerySpec = { * Changes are propagated to the spec on blur. */ export function useQueryState( - props: OptionsEditorProps + props: OptionsEditorProps, ): { query: string; handleQueryChange: (e: string) => void; @@ -48,7 +48,7 @@ export function useQueryState( onChange( produce(value, (draft) => { draft.query = query; - }) + }), ); }; diff --git a/package.json b/package.json index c38b6abcc..c6a27ea28 100644 --- a/package.json +++ b/package.json @@ -6,10 +6,12 @@ "dev": "turbo run dev --concurrency 20", "build": "turbo run build", "lint": "turbo run lint", - "lint:ci": "oxlint */src --max-warnings=1494", + "lint:ci": "turbo run lint:ci", "lint:fix": "turbo run lint -- --fix", - "format": "oxfmt", - "format:check": "oxfmt --check", + "format": "turbo run format:root", + "format:check": "turbo run format:root:check", + "format:root": "oxfmt", + "format:root:check": "oxfmt --check", "test": "turbo run test", "type-check": "turbo run type-check", "doctor": "npx react-doctor@latest" diff --git a/piechart/package.json b/piechart/package.json index 03d15b3be..6097f86a1 100644 --- a/piechart/package.json +++ b/piechart/package.json @@ -18,6 +18,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/piechart/src/PieChartOptionsEditorSettings.tsx b/piechart/src/PieChartOptionsEditorSettings.tsx index 5d6935d26..ccae3f772 100644 --- a/piechart/src/PieChartOptionsEditorSettings.tsx +++ b/piechart/src/PieChartOptionsEditorSettings.tsx @@ -62,7 +62,7 @@ export function PieChartOptionsEditorSettings(props: PieChartOptionsEditorProps) onChange( produce(value, (draft: PieChartOptions) => { draft.calculation = newCalculation; - }) + }), ); }; @@ -70,7 +70,7 @@ export function PieChartOptionsEditorSettings(props: PieChartOptionsEditorProps) onChange( produce(value, (draft: PieChartOptions) => { draft.legend = newLegend; - }) + }), ); }; @@ -78,7 +78,7 @@ export function PieChartOptionsEditorSettings(props: PieChartOptionsEditorProps) onChange( produce(value, (draft: PieChartOptions) => { draft.format = newFormat; - }) + }), ); }; @@ -86,7 +86,7 @@ export function PieChartOptionsEditorSettings(props: PieChartOptionsEditorProps) onChange( produce(value, (draft: PieChartOptions) => { draft.sort = newSort; - }) + }), ); }; @@ -94,7 +94,7 @@ export function PieChartOptionsEditorSettings(props: PieChartOptionsEditorProps) onChange( produce(value, (draft: PieChartOptions) => { draft.mode = newMode; - }) + }), ); }; @@ -102,7 +102,7 @@ export function PieChartOptionsEditorSettings(props: PieChartOptionsEditorProps) onChange( produce(value, (draft: PieChartOptions) => { draft.showLabels = checked; - }) + }), ); }; @@ -123,7 +123,7 @@ export function PieChartOptionsEditorSettings(props: PieChartOptionsEditorProps) } else { draft.colorPalette = undefined; } - }) + }), ); }; @@ -131,7 +131,7 @@ export function PieChartOptionsEditorSettings(props: PieChartOptionsEditorProps) const format = merge( {}, !value.format || isUnitWithShortValues(value.format) ? DEFAULT_FORMAT : omit(DEFAULT_FORMAT, ['shortValues']), - value.format + value.format, ); type ColorScheme = 'default' | 'theme' | 'gradient'; @@ -227,7 +227,7 @@ export function PieChartOptionsEditorSettings(props: PieChartOptionsEditorProps) // reset button removes all optional panel options draft.legend = undefined; draft.colorPalette = undefined; - }) + }), ); }} > diff --git a/piechart/src/utils.test.ts b/piechart/src/utils.test.ts index f613beffe..33e9b7feb 100644 --- a/piechart/src/utils.test.ts +++ b/piechart/src/utils.test.ts @@ -110,7 +110,7 @@ describe('PieChartTableLegendMapper', () => { id: '5', label: 'Label 5', }, - ].map((v, index) => ({ ...v, data: expectedData[index] })) + ].map((v, index) => ({ ...v, data: expectedData[index] })), ); }); @@ -158,7 +158,7 @@ describe('PieChartTableLegendMapper', () => { } else { throw new Error('Cell formatter is not defined'); } - } + }, ); }); diff --git a/piechart/src/utils.ts b/piechart/src/utils.ts index e2dbce262..ff82196e5 100644 --- a/piechart/src/utils.ts +++ b/piechart/src/utils.ts @@ -50,7 +50,7 @@ export const getTooltipFormatter = (formatOptions?: FormatOptions): ((props: for }; export const getLabelFormatter = ( mode?: ModeOption, - formatOptions?: FormatOptions + formatOptions?: FormatOptions, ): ((props: formatterProps) => string) => { if (mode === 'percentage') { return percentageLabelFormatter(formatOptions); @@ -77,11 +77,11 @@ const percentageLabelFormatter = (formatOptions?: FormatOptions) => { export interface PieChartLegendMapper { mapToLegendItems: ( pieChartData: Array>, - selectedValues?: Array + selectedValues?: Array, ) => LegendItem[]; mapToLegendColumns: ( selectedValues?: Array, - formatOptions?: FormatOptions + formatOptions?: FormatOptions, ) => Array>; } @@ -97,7 +97,7 @@ export class PieChartListLegendMapper implements PieChartLegendMapper { export class PieChartTableLegendMapper implements PieChartLegendMapper { mapToLegendItems( pieChartData: Array>, - selectedValues?: Array + selectedValues?: Array, ): LegendItem[] { const relativePieChartData = calculatePercentages(pieChartData); const absoluteValueSelected = selectedValues?.includes('abs'); @@ -124,7 +124,7 @@ export class PieChartTableLegendMapper implements PieChartLegendMapper { mapToLegendColumns( selectedValues?: Array, - formatOptions?: FormatOptions + formatOptions?: FormatOptions, ): Array> { const relativeFormatOptions = { unit: 'percent', decimalPlaces: formatOptions?.decimalPlaces } as const; return ( diff --git a/prometheus/package.json b/prometheus/package.json index 8b388036f..096f0b260 100644 --- a/prometheus/package.json +++ b/prometheus/package.json @@ -19,6 +19,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/prometheus/src/annotations/PrometheusPromQLAnnotationOptionEditor.tsx b/prometheus/src/annotations/PrometheusPromQLAnnotationOptionEditor.tsx index 38e63fc89..14bf28e13 100644 --- a/prometheus/src/annotations/PrometheusPromQLAnnotationOptionEditor.tsx +++ b/prometheus/src/annotations/PrometheusPromQLAnnotationOptionEditor.tsx @@ -58,7 +58,7 @@ export function PrometheusPromQLAnnotationOptionEditor(props: PrometheusAnnotati const selectedDatasource = useDatasourceSelectValueToSelector( datasourceSelectValue, - PROM_DATASOURCE_KIND + PROM_DATASOURCE_KIND, ) as PrometheusDatasourceSelector; const { data: client } = useDatasourceClient(selectedDatasource); @@ -75,7 +75,7 @@ export function PrometheusPromQLAnnotationOptionEditor(props: PrometheusAnnotati // If they're using the default, just omit the datasource prop (i.e. set to undefined) const nextDatasource = isDefaultPromSelector(next) ? undefined : next; draft.datasource = nextDatasource; - }) + }), ); return; } @@ -87,7 +87,7 @@ export function PrometheusPromQLAnnotationOptionEditor(props: PrometheusAnnotati onChange( produce(value, (draft) => { draft.expr = next; - }) + }), ); }; @@ -95,7 +95,7 @@ export function PrometheusPromQLAnnotationOptionEditor(props: PrometheusAnnotati onChange( produce(value, (draft) => { draft.title = next || undefined; - }) + }), ); }; @@ -103,7 +103,7 @@ export function PrometheusPromQLAnnotationOptionEditor(props: PrometheusAnnotati onChange( produce(value, (draft) => { draft.legend = next || undefined; - }) + }), ); }; @@ -111,7 +111,7 @@ export function PrometheusPromQLAnnotationOptionEditor(props: PrometheusAnnotati onChange( produce(value, (draft) => { draft.tags = next.length > 0 ? next : undefined; - }) + }), ); }; diff --git a/prometheus/src/annotations/get-annotation-data.ts b/prometheus/src/annotations/get-annotation-data.ts index 42244d65e..a5e992c4b 100644 --- a/prometheus/src/annotations/get-annotation-data.ts +++ b/prometheus/src/annotations/get-annotation-data.ts @@ -23,7 +23,7 @@ import { formatSeriesName } from '../utils'; export const getAnnotationData = async ( spec: PrometheusPromQLAnnotationOptions, context: AnnotationContext, - abortSignal?: AbortSignal + abortSignal?: AbortSignal, ): Promise => { if (!spec.expr) { return []; @@ -35,18 +35,18 @@ export const getAnnotationData = async ( datasourceSelectValueToSelector( spec.datasource ?? DEFAULT_PROM, context.variableState, - listDatasourceSelectItems + listDatasourceSelectItems, ) ?? DEFAULT_PROM; const client: PrometheusClient = await context.datasourceStore.getDatasourceClient(datasourceSelector); const datasource = (await context.datasourceStore.getDatasource( - datasourceSelector + datasourceSelector, )) as DatasourceSpec; const interpolatedOptions = interpolateDatasourceProxyParams(datasource, context.variableState); const datasourceScrapeInterval = Math.trunc( - milliseconds(parseDurationString(datasource.plugin.spec.scrapeInterval ?? DEFAULT_SCRAPE_INTERVAL)) / 1000 + milliseconds(parseDurationString(datasource.plugin.spec.scrapeInterval ?? DEFAULT_SCRAPE_INTERVAL)) / 1000, ); const timeRange = getPrometheusTimeRange(context.absoluteTimeRange); @@ -75,7 +75,7 @@ export const getAnnotationData = async ( end: alignedEnd, step: step, }, - { ...interpolatedOptions, signal: abortSignal } + { ...interpolatedOptions, signal: abortSignal }, ); const result: AnnotationData[] = []; diff --git a/prometheus/src/components/TreeNode.tsx b/prometheus/src/components/TreeNode.tsx index d9e32b926..102ab480f 100644 --- a/prometheus/src/components/TreeNode.tsx +++ b/prometheus/src/components/TreeNode.tsx @@ -149,7 +149,7 @@ export default function TreeNode({ return newStates; }); }, - [setChildStates] + [setChildStates], ); // Update the size and position of tree connector lines based on the node's and its parent's position. diff --git a/prometheus/src/components/promql/serialize.ts b/prometheus/src/components/promql/serialize.ts index 678796f6b..c1d33cb0a 100644 --- a/prometheus/src/components/promql/serialize.ts +++ b/prometheus/src/components/promql/serialize.ts @@ -87,7 +87,7 @@ const serializeNode = (node: ASTNode, indent = 0, pretty = false, initialIndent return `${initialInd}(${childListSeparator}${serializeNode( node.expr, childIndent, - pretty + pretty, )}${childListSeparator}${ind})`; case nodeType.call: { @@ -134,7 +134,7 @@ const serializeNode = (node: ASTNode, indent = 0, pretty = false, initialIndent }${node.bool ? ' bool' : ''}${matching}${grouping}${childSeparator}${serializeNode( maybeParenthesizeBinopChild(node.op, node.rhs), childIndent, - pretty + pretty, )}`; } diff --git a/prometheus/src/components/query.ts b/prometheus/src/components/query.ts index f920b5922..7bd29f565 100644 --- a/prometheus/src/components/query.ts +++ b/prometheus/src/components/query.ts @@ -28,7 +28,7 @@ import { getInterpolatedRequestOptions } from '../plugins/interpolation'; export function useParseQuery( content: string, datasource: DatasourceSelector, - enabled?: boolean + enabled?: boolean, ): UseQueryResult { const { data: client } = useDatasourceClient(datasource); const datasourceStore = useDatasourceStore(); @@ -50,7 +50,7 @@ export function useParseQuery( export function useInstantQuery( content: string, datasource: DatasourceSelector, - enabled?: boolean + enabled?: boolean, ): UseQueryResult { const { data: client } = useDatasourceClient(datasource); const datasourceStore = useDatasourceStore(); diff --git a/prometheus/src/explore/PrometheusMetricsFinder/PrometheusMetricsFinder.tsx b/prometheus/src/explore/PrometheusMetricsFinder/PrometheusMetricsFinder.tsx index a9b9849d9..da286e417 100644 --- a/prometheus/src/explore/PrometheusMetricsFinder/PrometheusMetricsFinder.tsx +++ b/prometheus/src/explore/PrometheusMetricsFinder/PrometheusMetricsFinder.tsx @@ -177,7 +177,7 @@ export function PrometheusMetricsFinder({ }: PrometheusMetricsFinderProps): ReactElement { const settingsStored = localStorage.getItem(PERSES_METRICS_FINDER_SETTINGS); const [settings, setSettings] = useState( - settingsStored ? JSON.parse(settingsStored) : { isMetadataEnabled: true } + settingsStored ? JSON.parse(settingsStored) : { isMetadataEnabled: true }, ); function handleSettingsUpdate(value: Settings): void { diff --git a/prometheus/src/explore/PrometheusMetricsFinder/display/list/MetricList.test.tsx b/prometheus/src/explore/PrometheusMetricsFinder/display/list/MetricList.test.tsx index db4b7f7aa..c0162b7d6 100644 --- a/prometheus/src/explore/PrometheusMetricsFinder/display/list/MetricList.test.tsx +++ b/prometheus/src/explore/PrometheusMetricsFinder/display/list/MetricList.test.tsx @@ -47,7 +47,7 @@ describe('MetricList', () => { onExplore={onExplore} /> - + , ); it('should render metrics', () => { diff --git a/prometheus/src/explore/PrometheusMetricsFinder/filter/FilterInputs.test.tsx b/prometheus/src/explore/PrometheusMetricsFinder/filter/FilterInputs.test.tsx index f6c099ec0..8422243b8 100644 --- a/prometheus/src/explore/PrometheusMetricsFinder/filter/FilterInputs.test.tsx +++ b/prometheus/src/explore/PrometheusMetricsFinder/filter/FilterInputs.test.tsx @@ -34,7 +34,7 @@ describe('FilterInputs', () => { isLabelValuesOptionsLoading={isLabelValuesOptionsLoading} onChange={onChange} onDelete={onDelete} - /> + />, ); }; diff --git a/prometheus/src/explore/PrometheusMetricsFinder/filter/FilterInputs.tsx b/prometheus/src/explore/PrometheusMetricsFinder/filter/FilterInputs.tsx index 45210b82d..da5bfe12e 100644 --- a/prometheus/src/explore/PrometheusMetricsFinder/filter/FilterInputs.tsx +++ b/prometheus/src/explore/PrometheusMetricsFinder/filter/FilterInputs.tsx @@ -56,14 +56,14 @@ export function LabelFilterInput({ }: LabelFilterInputProps): ReactElement { const filtersWithoutCurrent = useMemo( () => filters.filter((filter) => filter.label !== value.label), - [filters, value.label] + [filters, value.label], ); const { data: labelOptions, isLoading: isLabelOptionsLoading } = useLabels(filtersWithoutCurrent, datasource); const { data: labelValuesOptions, isLoading: isLabelValuesOptionsLoading } = useLabelValues( value.label, filtersWithoutCurrent, - datasource + datasource, ); return ( @@ -112,7 +112,7 @@ export const ListboxComponent = forwardRef ); - } + }, ); ListboxComponent.displayName = 'ListboxComponent'; diff --git a/prometheus/src/explore/PrometheusMetricsFinder/utils.ts b/prometheus/src/explore/PrometheusMetricsFinder/utils.ts index 601809109..6626aee99 100644 --- a/prometheus/src/explore/PrometheusMetricsFinder/utils.ts +++ b/prometheus/src/explore/PrometheusMetricsFinder/utils.ts @@ -36,7 +36,7 @@ import { computeFilterExpr, LabelFilter, LabelValueCounter } from './types'; export function useMetricMetadata( metricName: string, datasource: DatasourceSelector, - enabled?: boolean + enabled?: boolean, ): { isLoading: false | true; metadata: MetricMetadata | undefined; @@ -76,7 +76,7 @@ export function useMetricMetadata( export function useLabels( filters: LabelFilter[], - datasource: DatasourceSelector + datasource: DatasourceSelector, ): UseQueryResult { const { absoluteTimeRange: { start, end }, @@ -108,7 +108,7 @@ export function useLabels( export function useLabelValues( labelName: string, filters: LabelFilter[], - datasource: DatasourceSelector + datasource: DatasourceSelector, ): UseQueryResult { const { absoluteTimeRange: { start, end }, @@ -142,7 +142,7 @@ export function useLabelValues( export function useSeriesStates( metricName: string, filters: LabelFilter[], - datasource: DatasourceSelector + datasource: DatasourceSelector, ): { series: Metric[] | undefined; labelValueCounters: Map>; diff --git a/prometheus/src/model/prometheus-client.ts b/prometheus/src/model/prometheus-client.ts index 18ef1eec7..3a6669099 100644 --- a/prometheus/src/model/prometheus-client.ts +++ b/prometheus/src/model/prometheus-client.ts @@ -52,7 +52,7 @@ export interface PrometheusClient extends DatasourceClient { labelValues(params: LabelValuesRequestParameters, options?: ClientRequestOptions): Promise; metricMetadata( params: MetricMetadataRequestParameters, - options?: ClientRequestOptions + options?: ClientRequestOptions, ): Promise; series(params: SeriesRequestParameters, options?: ClientRequestOptions): Promise; parseQuery(params: ParseQueryRequestParameters, options?: ClientRequestOptions): Promise; @@ -91,7 +91,7 @@ function buildQueryString(queryParams?: QueryParamValues, initialParams?: URLSea export function mergeQueryParams( defaults?: QueryParamValues, - overrides?: QueryParamValues + overrides?: QueryParamValues, ): QueryParamValues | undefined { if (!defaults && !overrides) return undefined; return { ...defaults, ...overrides }; @@ -118,7 +118,7 @@ export function healthCheck(queryOptions: QueryOptions) { */ export function instantQuery( params: InstantQueryRequestParameters, - queryOptions: QueryOptions + queryOptions: QueryOptions, ): Promise { return fetchWithPost('/api/v1/query', params, queryOptions); } @@ -128,7 +128,7 @@ export function instantQuery( */ export function rangeQuery( params: RangeQueryRequestParameters, - queryOptions: QueryOptions + queryOptions: QueryOptions, ): Promise { return fetchWithPost('/api/v1/query_range', params, queryOptions); } @@ -138,7 +138,7 @@ export function rangeQuery( */ export function labelNames( params: LabelNamesRequestParameters, - queryOptions: QueryOptions + queryOptions: QueryOptions, ): Promise { return fetchWithPost('/api/v1/labels', params, queryOptions); } @@ -148,7 +148,7 @@ export function labelNames( */ export function labelValues( params: LabelValuesRequestParameters, - queryOptions: QueryOptions + queryOptions: QueryOptions, ): Promise { const { labelName, ...searchParams } = params; @@ -169,7 +169,7 @@ export function labelValues( */ export function metricMetadata( params: MetricMetadataRequestParameters, - queryOptions: QueryOptions + queryOptions: QueryOptions, ): Promise { const apiURI = `/api/v1/metadata`; return fetchWithGet(apiURI, params, queryOptions); @@ -188,7 +188,7 @@ export function series(params: SeriesRequestParameters, queryOptions: QueryOptio */ export function parseQuery( params: ParseQueryRequestParameters, - queryOptions: QueryOptions + queryOptions: QueryOptions, ): Promise { const apiURI = `/api/v1/parse_query`; return fetchWithPost(apiURI, params, queryOptions); @@ -197,7 +197,7 @@ export function parseQuery( function fetchWithGet, TResponse>( apiURI: string, params: T, - queryOptions: QueryOptions + queryOptions: QueryOptions, ): Promise { const { datasourceUrl, headers, queryParams, signal } = queryOptions; const url = `${datasourceUrl}${apiURI}${buildQueryString(queryParams, createSearchParams(params))}`; @@ -207,7 +207,7 @@ function fetchWithGet, TResponse>( function fetchWithPost, TResponse>( apiURI: string, params: T, - queryOptions: QueryOptions + queryOptions: QueryOptions, ): Promise { const { datasourceUrl, headers, signal, queryParams } = queryOptions; const url = `${datasourceUrl}${apiURI}${buildQueryString(queryParams)}`; diff --git a/prometheus/src/model/prometheus-selectors.ts b/prometheus/src/model/prometheus-selectors.ts index b8161c0e1..75300a238 100644 --- a/prometheus/src/model/prometheus-selectors.ts +++ b/prometheus/src/model/prometheus-selectors.ts @@ -32,7 +32,7 @@ export const DEFAULT_PROM: PrometheusDatasourceSelector = { kind: PROM_DATASOURC * Returns true if the provided datasourceSelectValue is the default PrometheusDatasourceSelector. */ export function isDefaultPromSelector( - datasourceSelectValue: DatasourceSelectValue + datasourceSelectValue: DatasourceSelectValue, ): boolean { return !isVariableDatasource(datasourceSelectValue) && datasourceSelectValue.name === undefined; } @@ -41,7 +41,7 @@ export function isDefaultPromSelector( * Type guard to make sure a datasourceSelectValue is a Prometheus one. */ export function isPrometheusDatasourceSelector( - datasourceSelectValue: DatasourceSelectValue + datasourceSelectValue: DatasourceSelectValue, ): datasourceSelectValue is PrometheusDatasourceSelector { return isVariableDatasource(datasourceSelectValue) || datasourceSelectValue.kind === PROM_DATASOURCE_KIND; } diff --git a/prometheus/src/model/time.test.ts b/prometheus/src/model/time.test.ts index 056ae495c..9c980d7b8 100644 --- a/prometheus/src/model/time.test.ts +++ b/prometheus/src/model/time.test.ts @@ -22,7 +22,7 @@ describe('getRangeStep', () => { const resolution = 1; const suggestedStepMs = 200; expect( - getRangeStep({ start: timerangeStart, end: timerangeEnd }, minStepSeconds, resolution, suggestedStepMs) + getRangeStep({ start: timerangeStart, end: timerangeEnd }, minStepSeconds, resolution, suggestedStepMs), ).toEqual(minStepSeconds); }); @@ -34,7 +34,7 @@ describe('getRangeStep', () => { const resolution = 1; const suggestedStepMs = 600000; expect( - getRangeStep({ start: timerangeStart, end: timerangeEnd }, minStepSeconds, resolution, suggestedStepMs) + getRangeStep({ start: timerangeStart, end: timerangeEnd }, minStepSeconds, resolution, suggestedStepMs), ).toEqual(suggestedStepMs / 1000); }); }); diff --git a/prometheus/src/model/time.ts b/prometheus/src/model/time.ts index b4f4d95b6..2de0f912f 100644 --- a/prometheus/src/model/time.ts +++ b/prometheus/src/model/time.ts @@ -45,7 +45,7 @@ export function getRangeStep( timeRange: PrometheusTimeRange, minStepSeconds = 15, resolution = 1, - suggestedStepMs = 0 + suggestedStepMs = 0, ): number { const suggestedStepSeconds = suggestedStepMs / 1000; const queryRangeSeconds = timeRange.end - timeRange.start; diff --git a/prometheus/src/plugins/PrometheusLabelNamesVariable.tsx b/prometheus/src/plugins/PrometheusLabelNamesVariable.tsx index cd9be316f..29e09740a 100644 --- a/prometheus/src/plugins/PrometheusLabelNamesVariable.tsx +++ b/prometheus/src/plugins/PrometheusLabelNamesVariable.tsx @@ -31,12 +31,12 @@ export const PrometheusLabelNamesVariable: VariablePlugin replaceVariables(m, ctx.variables)) : undefined; const timeRange = getPrometheusTimeRange(ctx.timeRange); diff --git a/prometheus/src/plugins/PrometheusLabelValuesVariable.tsx b/prometheus/src/plugins/PrometheusLabelValuesVariable.tsx index b82d86bf1..d9e58464c 100644 --- a/prometheus/src/plugins/PrometheusLabelValuesVariable.tsx +++ b/prometheus/src/plugins/PrometheusLabelValuesVariable.tsx @@ -82,7 +82,7 @@ function extractDatasourceVariables(datasourceSpec: DatasourceSpec replaceVariables(m, ctx.variables)) : undefined; @@ -121,7 +121,7 @@ export const PrometheusLabelValuesVariable: VariablePlugin { const [client, datasource] = await Promise.all([ datasourceStore.getDatasourceClient(selector), @@ -38,7 +38,7 @@ export async function resolvePrometheusDatasource( export function interpolateDatasourceProxyParams( datasource: DatasourceSpec, - variableState: VariableStateMap + variableState: VariableStateMap, ): ClientRequestOptions { const spec = datasource.plugin.spec; const rawHeaders = spec.proxy?.spec?.headers; @@ -53,7 +53,7 @@ export function interpolateDatasourceProxyParams( export async function getInterpolatedRequestOptions( datasourceStore: DatasourceStore, datasource: DatasourceSelector, - variableState: VariableStateMap + variableState: VariableStateMap, ): Promise { const datasourceSpec = (await datasourceStore.getDatasource(datasource)) as DatasourceSpec; return interpolateDatasourceProxyParams(datasourceSpec, variableState); diff --git a/prometheus/src/plugins/prometheus-datasource.test.ts b/prometheus/src/plugins/prometheus-datasource.test.ts index 7ecb3d867..a1ae54290 100644 --- a/prometheus/src/plugins/prometheus-datasource.test.ts +++ b/prometheus/src/plugins/prometheus-datasource.test.ts @@ -60,7 +60,7 @@ describe('PrometheusDatasource query parameters', () => { await healthCheckFn; expect(mockFetch).toHaveBeenCalledWith( 'http://localhost:9090/-/healthy?dedup=false&timeout=30s', - expect.any(Object) + expect.any(Object), ); } diff --git a/prometheus/src/plugins/prometheus-datasource.tsx b/prometheus/src/plugins/prometheus-datasource.tsx index 398e68635..cf7648261 100644 --- a/prometheus/src/plugins/prometheus-datasource.tsx +++ b/prometheus/src/plugins/prometheus-datasource.tsx @@ -37,7 +37,7 @@ function wrapClientMethod( fn: (params: P, opts: QueryOptions) => Promise, datasourceUrl: string, specHeaders?: RequestHeaders, - specQueryParams?: QueryParamValues + specQueryParams?: QueryParamValues, ): (params: P, options?: ClientRequestOptions) => Promise { return (params: P, options?: ClientRequestOptions) => fn(params, { diff --git a/prometheus/src/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.tsx b/prometheus/src/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.tsx index 1b7ce4ed2..bb9ba39b8 100644 --- a/prometheus/src/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.tsx +++ b/prometheus/src/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.tsx @@ -65,7 +65,7 @@ export function PrometheusTimeSeriesQueryEditor(props: PrometheusTimeSeriesQuery const selectedDatasource = useDatasourceSelectValueToSelector( datasourceSelectValue, - PROM_DATASOURCE_KIND + PROM_DATASOURCE_KIND, ) as PrometheusDatasourceSelector; const { data: client } = useDatasourceClient(selectedDatasource); @@ -91,7 +91,7 @@ export function PrometheusTimeSeriesQueryEditor(props: PrometheusTimeSeriesQuery // If they're using the default, just omit the datasource prop (i.e. set to undefined) const nextDatasource = isDefaultPromSelector(next) ? undefined : next; draft.datasource = nextDatasource; - }) + }), ); return; } @@ -108,7 +108,7 @@ export function PrometheusTimeSeriesQueryEditor(props: PrometheusTimeSeriesQuery /* Try catch is necessary, because when the minStep value is being typed, it will be valid when the duration unit is added. Example: 2m = 2 + m */ try { const durationsSeconds = getDurationStringSeconds( - replaceVariables(minStepPlaceholder, variableState) as DurationString + replaceVariables(minStepPlaceholder, variableState) as DurationString, ); return durationsSeconds !== undefined ? durationsSeconds * 1000 : undefined; } catch { diff --git a/prometheus/src/plugins/prometheus-time-series-query/get-time-series-data.ts b/prometheus/src/plugins/prometheus-time-series-query/get-time-series-data.ts index d783a1a25..6ea9ef952 100644 --- a/prometheus/src/plugins/prometheus-time-series-query/get-time-series-data.ts +++ b/prometheus/src/plugins/prometheus-time-series-query/get-time-series-data.ts @@ -44,7 +44,7 @@ import { PrometheusTimeSeriesQuerySpec } from './time-series-query-model'; export const getTimeSeriesData: TimeSeriesQueryPlugin['getTimeSeriesData'] = async ( spec, context, - abortSignal + abortSignal, ) => { if (spec.query === undefined || spec.query === null || spec.query === '') { // Do not make a request to the backend, instead return an empty TimeSeriesData @@ -57,16 +57,16 @@ export const getTimeSeriesData: TimeSeriesQueryPlugin; const interpolatedOptions = interpolateDatasourceProxyParams(datasource, context.variableState); const datasourceScrapeInterval = Math.trunc( - milliseconds(parseDurationString(datasource.plugin.spec.scrapeInterval ?? DEFAULT_SCRAPE_INTERVAL)) / 1000 + milliseconds(parseDurationString(datasource.plugin.spec.scrapeInterval ?? DEFAULT_SCRAPE_INTERVAL)) / 1000, ); // Min step is the lower bound of the interval between data points @@ -75,7 +75,7 @@ export const getTimeSeriesData: TimeSeriesQueryPlugin { query: 'sum(up{job="$job"}) by ($instance)', seriesNameFormat: `$foo - label`, }, - createStubContext() + createStubContext(), ); expect(variables).toEqual(['job', 'instance', 'foo']); }); @@ -110,7 +110,7 @@ describe('PrometheusTimeSeriesQuery', () => { query: 'sum(up{job="$job"}) by ($instance)', seriesNameFormat: `$foo - format`, }, - ctx + ctx, ); expect(results.series[0]?.formattedName).toEqual('bar - format'); diff --git a/prometheus/src/plugins/prometheus-time-series-query/query-editor-model.ts b/prometheus/src/plugins/prometheus-time-series-query/query-editor-model.ts index c9bfbfed3..8543d2c50 100644 --- a/prometheus/src/plugins/prometheus-time-series-query/query-editor-model.ts +++ b/prometheus/src/plugins/prometheus-time-series-query/query-editor-model.ts @@ -56,7 +56,7 @@ export function useQueryState(props: PrometheusTimeSeriesQueryEditorProps): { onChange( produce(value, (draft) => { draft.query = query; - }) + }), ); }; @@ -92,7 +92,7 @@ export function useFormatState(props: PrometheusTimeSeriesQueryEditorProps): { onChange( produce(value, (draft) => { draft.seriesNameFormat = format; - }) + }), ); }; @@ -128,7 +128,7 @@ export function useMinStepState(props: PrometheusTimeSeriesQueryEditorProps): { onChange( produce(value, (draft) => { draft.minStep = minStep; - }) + }), ); }; diff --git a/prometheus/src/plugins/prometheus-time-series-query/replace-prom-builtin-variables.ts b/prometheus/src/plugins/prometheus-time-series-query/replace-prom-builtin-variables.ts index c05cecacc..61378db9e 100644 --- a/prometheus/src/plugins/prometheus-time-series-query/replace-prom-builtin-variables.ts +++ b/prometheus/src/plugins/prometheus-time-series-query/replace-prom-builtin-variables.ts @@ -33,7 +33,7 @@ export function replacePromBuiltinVariables(query: string, minStepMs: number, in updatedQuery = replaceVariable( updatedQuery, '__rate_interval', - formatDuration(convertTimeToDuration(rateIntervalMs)) + formatDuration(convertTimeToDuration(rateIntervalMs)), ); return updatedQuery; diff --git a/prometheus/src/plugins/prometheus-variables.tsx b/prometheus/src/plugins/prometheus-variables.tsx index 996af7999..ccbca741e 100644 --- a/prometheus/src/plugins/prometheus-variables.tsx +++ b/prometheus/src/plugins/prometheus-variables.tsx @@ -42,7 +42,7 @@ import { } from './types'; export function PrometheusLabelValuesVariableEditor( - props: OptionsEditorProps + props: OptionsEditorProps, ): ReactElement { const { onChange, @@ -58,14 +58,14 @@ export function PrometheusLabelValuesVariableEditor( produce(value, (draft) => { // If they're using the default, just omit the datasource prop (i.e. set to undefined) draft.datasource = !isVariableDatasource(next) && isDefaultPromSelector(next) ? undefined : next; - }) + }), ); return; } throw new Error('Got unexpected non-Prometheus datasource selector'); }, - [onChange, value] + [onChange, value], ); const handleLabelChange = useCallback( @@ -73,10 +73,10 @@ export function PrometheusLabelValuesVariableEditor( onChange( produce(value, (draft) => { draft.labelName = e.target.value; - }) + }), ); }, - [onChange, value] + [onChange, value], ); const handleMatchEditorsChange = useCallback( @@ -84,10 +84,10 @@ export function PrometheusLabelValuesVariableEditor( onChange( produce(value, (draft) => { draft.matchers = matchers; - }) + }), ); }, - [onChange, value] + [onChange, value], ); return ( @@ -123,7 +123,7 @@ export function PrometheusLabelValuesVariableEditor( } export function PrometheusLabelNamesVariableEditor( - props: OptionsEditorProps + props: OptionsEditorProps, ): ReactElement { const { onChange, @@ -139,14 +139,14 @@ export function PrometheusLabelNamesVariableEditor( produce(value, (draft) => { // If they're using the default, just omit the datasource prop (i.e. set to undefined) draft.datasource = !isVariableDatasource(next) && isDefaultPromSelector(next) ? undefined : next; - }) + }), ); return; } throw new Error('Got unexpected non-Prometheus datasource selector'); }, - [onChange, value] + [onChange, value], ); const handleMatchEditorChange = useCallback( @@ -154,10 +154,10 @@ export function PrometheusLabelNamesVariableEditor( onChange( produce(value, (draft) => { draft.matchers = matchers; - }) + }), ); }, - [onChange, value] + [onChange, value], ); return ( @@ -182,7 +182,7 @@ export function PrometheusLabelNamesVariableEditor( } export function PrometheusPromQLVariableEditor( - props: OptionsEditorProps + props: OptionsEditorProps, ): ReactElement { const { onChange, @@ -192,7 +192,7 @@ export function PrometheusPromQLVariableEditor( const datasourceSelectValue = datasource ?? DEFAULT_PROM; const selectedDatasource = useDatasourceSelectValueToSelector( datasourceSelectValue, - PROM_DATASOURCE_KIND + PROM_DATASOURCE_KIND, ) as PrometheusDatasourceSelector; const { data: client } = useDatasourceClient(selectedDatasource); @@ -204,14 +204,14 @@ export function PrometheusPromQLVariableEditor( produce(value, (draft) => { // If they're using the default, just omit the datasource prop (i.e. set to undefined) draft.datasource = !isVariableDatasource(next) && isDefaultPromSelector(next) ? undefined : next; - }) + }), ); return; } throw new Error('Got unexpected non-Prometheus datasource selector'); }, - [value, onChange] + [value, onChange], ); const handleOnBlurPromQlChange = useCallback( @@ -219,10 +219,10 @@ export function PrometheusPromQLVariableEditor( onChange( produce(value, (draft) => { draft.expr = e.target.textContent ?? ''; - }) + }), ); }, - [onChange, value] + [onChange, value], ); const handleLabelNameChange = useCallback( @@ -230,10 +230,10 @@ export function PrometheusPromQLVariableEditor( onChange( produce(value, (draft) => { draft.labelName = e.target.value; - }) + }), ); }, - [onChange, value] + [onChange, value], ); return ( diff --git a/prometheus/src/utils/utils.ts b/prometheus/src/utils/utils.ts index 4b63f7101..84109fdee 100644 --- a/prometheus/src/utils/utils.ts +++ b/prometheus/src/utils/utils.ts @@ -58,7 +58,7 @@ export function getUniqueKeyForPrometheusResult( metricLabels: { [key: string]: string; }, - { removeExprWrap }: { removeExprWrap?: boolean } = {} + { removeExprWrap }: { removeExprWrap?: boolean } = {}, ): string { const metricNameKey = '__name__'; if (Object.prototype.hasOwnProperty.call(metricLabels, metricNameKey)) { @@ -67,7 +67,7 @@ export function getUniqueKeyForPrometheusResult( ...metricLabels, [metricNameKey]: undefined, }, - removeExprWrap + removeExprWrap, ); if (removeExprWrap) { return `${stringifiedLabels}`; @@ -84,7 +84,7 @@ export function getUniqueKeyForPrometheusResult( export function getFormattedPrometheusSeriesName( query: string, metric: Metric, - formatter?: string + formatter?: string, ): { name: string; formattedName: string; diff --git a/pyroscope/package.json b/pyroscope/package.json index f824b9639..e4406ef87 100644 --- a/pyroscope/package.json +++ b/pyroscope/package.json @@ -18,6 +18,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/pyroscope/src/components/LabelName.tsx b/pyroscope/src/components/LabelName.tsx index d8fd68036..bcd26b700 100644 --- a/pyroscope/src/components/LabelName.tsx +++ b/pyroscope/src/components/LabelName.tsx @@ -30,7 +30,7 @@ export function LabelName(props: LabelNameProps): ReactElement { const filteredLabelNamesOptions = useMemo( () => filterLabelNamesOptions(labelNamesOptions?.names ?? []), - [labelNamesOptions] + [labelNamesOptions], ); return ( diff --git a/pyroscope/src/explore/PyroscopeExplorer.tsx b/pyroscope/src/explore/PyroscopeExplorer.tsx index ec9a55c71..4d057b64a 100644 --- a/pyroscope/src/explore/PyroscopeExplorer.tsx +++ b/pyroscope/src/explore/PyroscopeExplorer.tsx @@ -57,7 +57,7 @@ export function PyroscopeExplorer(): ReactElement { // A profile query is only executable once a service and a profile type are selected. const hasIncompleteQuery = queries.some( - (query) => !isProfileQueryComplete((query.spec?.plugin?.spec ?? {}) as Partial) + (query) => !isProfileQueryComplete((query.spec?.plugin?.spec ?? {}) as Partial), ); return ( diff --git a/pyroscope/src/model/profile-query-model.ts b/pyroscope/src/model/profile-query-model.ts index a04ee5f9c..cdbf9507a 100644 --- a/pyroscope/src/model/profile-query-model.ts +++ b/pyroscope/src/model/profile-query-model.ts @@ -29,7 +29,7 @@ export interface PyroscopeProfileQuerySpec { * When either is missing, the query is considered incomplete and should not be run. */ export function isProfileQueryComplete( - spec: Partial> + spec: Partial>, ): boolean { return !!spec.service && !!spec.profileType; } diff --git a/pyroscope/src/model/pyroscope-client.ts b/pyroscope/src/model/pyroscope-client.ts index 860f6c916..d5b498059 100644 --- a/pyroscope/src/model/pyroscope-client.ts +++ b/pyroscope/src/model/pyroscope-client.ts @@ -36,22 +36,22 @@ export interface PyroscopeClient extends DatasourceClient { searchProfileTypes( params: SearchProfileTypesParameters, headers: RequestHeaders, - body: Record + body: Record, ): Promise; searchLabelNames( params: SearchLabelNamesParameters, headers: RequestHeaders, - body: Record + body: Record, ): Promise; searchLabelValues( params: SearchLabelValuesParameters, headers: RequestHeaders, - body: Record + body: Record, ): Promise; searchServices( params: SearchLabelValuesParameters, headers: RequestHeaders, - body: Record + body: Record, ): Promise; } @@ -89,7 +89,7 @@ function fetchWithPost( apiURI: string, params: T | null, queryOptions: QueryOptions, - body: Record + body: Record, ): Promise { const { datasourceUrl, headers = {} } = queryOptions; @@ -111,7 +111,7 @@ function fetchWithPost( */ export function searchProfiles( params: SearchProfilesParameters, - queryOptions: QueryOptions + queryOptions: QueryOptions, ): Promise { return fetchWithGet('/pyroscope/render', params, queryOptions); } @@ -122,13 +122,13 @@ export function searchProfiles( export function searchProfileTypes( params: SearchProfileTypesParameters, queryOptions: QueryOptions, - body: Record + body: Record, ): Promise { return fetchWithPost( '/querier.v1.QuerierService/ProfileTypes', params, queryOptions, - body + body, ); } @@ -138,13 +138,13 @@ export function searchProfileTypes( export function searchLabelNames( params: SearchLabelNamesParameters, queryOptions: QueryOptions, - body: Record + body: Record, ): Promise { return fetchWithPost( '/querier.v1.QuerierService/LabelNames', params, queryOptions, - body + body, ); } @@ -154,13 +154,13 @@ export function searchLabelNames( export function searchLabelValues( params: SearchLabelValuesParameters, queryOptions: QueryOptions, - body: Record + body: Record, ): Promise { return fetchWithPost( '/querier.v1.QuerierService/LabelValues', params, queryOptions, - body + body, ); } @@ -171,12 +171,12 @@ export function searchLabelValues( export function searchServices( params: SearchLabelValuesParameters, queryOptions: QueryOptions, - body: Record + body: Record, ): Promise { return fetchWithPost( '/querier.v1.QuerierService/LabelValues', params, queryOptions, - { name: 'service_name', ...body } + { name: 'service_name', ...body }, ); } diff --git a/pyroscope/src/plugins/pyroscope-profile-query/PyroscopeProfileQueryEditor.tsx b/pyroscope/src/plugins/pyroscope-profile-query/PyroscopeProfileQueryEditor.tsx index 7cf8950d1..dee22327b 100644 --- a/pyroscope/src/plugins/pyroscope-profile-query/PyroscopeProfileQueryEditor.tsx +++ b/pyroscope/src/plugins/pyroscope-profile-query/PyroscopeProfileQueryEditor.tsx @@ -39,7 +39,7 @@ export function PyroscopeProfileQueryEditor(props: ProfileQueryEditorProps): Rea const datasourceSelectValue = datasource ?? DEFAULT_PYROSCOPE; const selectedDatasource = useDatasourceSelectValueToSelector( datasourceSelectValue, - PYROSCOPE_DATASOURCE_KIND + PYROSCOPE_DATASOURCE_KIND, ) as PyroscopeDatasourceSelector; const datasourceSelectLabelID = useId('pyroscope-datasource-label'); @@ -56,7 +56,7 @@ export function PyroscopeProfileQueryEditor(props: ProfileQueryEditorProps): Rea produce(value, (draft) => { // If they're using the default, just omit the datasource prop (i.e. set to undefined) draft.datasource = isDefaultPyroscopeSelector(next) ? undefined : next; - }) + }), ); return; } diff --git a/pyroscope/src/plugins/pyroscope-profile-query/get-profile-data.test.ts b/pyroscope/src/plugins/pyroscope-profile-query/get-profile-data.test.ts index e86b00c69..c73f215f1 100644 --- a/pyroscope/src/plugins/pyroscope-profile-query/get-profile-data.test.ts +++ b/pyroscope/src/plugins/pyroscope-profile-query/get-profile-data.test.ts @@ -378,7 +378,7 @@ function buildRandomTree( end: number, depth: number, maxDepth: number, - namePool: string[] + namePool: string[], ): GeneratedNode { const reuseName = namePool.length > 0 && rng() < 0.4; const name = reuseName ? namePool[Math.floor(rng() * namePool.length)]! : `fn-${depth}-${start}-${end}`; diff --git a/pyroscope/src/plugins/pyroscope-profile-query/get-profile-data.ts b/pyroscope/src/plugins/pyroscope-profile-query/get-profile-data.ts index a29fb6b42..b292c021a 100644 --- a/pyroscope/src/plugins/pyroscope-profile-query/get-profile-data.ts +++ b/pyroscope/src/plugins/pyroscope-profile-query/get-profile-data.ts @@ -35,14 +35,14 @@ export function getUnixTimeRange(timeRange: AbsoluteTimeRange): { start: number; export const getProfileData: ProfileQueryPlugin['getProfileData'] = async ( spec, - context + context, ) => { const defaultPyroscopeDatasource: PyroscopeDatasourceSelector = { kind: PYROSCOPE_DATASOURCE_KIND, }; const client: PyroscopeClient = await context.datasourceStore.getDatasourceClient( - spec.datasource ?? defaultPyroscopeDatasource + spec.datasource ?? defaultPyroscopeDatasource, ); const buildQueryString = (): string => { diff --git a/pyroscope/src/plugins/pyroscope-profile-query/query-editor-model.ts b/pyroscope/src/plugins/pyroscope-profile-query/query-editor-model.ts index b0517f888..b2e1b1320 100644 --- a/pyroscope/src/plugins/pyroscope-profile-query/query-editor-model.ts +++ b/pyroscope/src/plugins/pyroscope-profile-query/query-editor-model.ts @@ -50,7 +50,7 @@ export function useMaxNodesState(props: ProfileQueryEditorProps): { onChange( produce(value, (draft) => { draft.maxNodes = e === '' ? undefined : parseInt(e); - }) + }), ); }; @@ -81,7 +81,7 @@ export function useProfileTypeState(props: ProfileQueryEditorProps): { onChange( produce(value, (draft) => { draft.profileType = e; - }) + }), ); }; @@ -112,7 +112,7 @@ export function useServiceState(props: ProfileQueryEditorProps): { onChange( produce(value, (draft) => { draft.service = e; - }) + }), ); }; @@ -136,7 +136,7 @@ export function useFiltersState(props: ProfileQueryEditorProps): { onChange( produce(value, (draft) => { draft.filters = f; - }) + }), ); }; diff --git a/pyroscope/src/utils/use-query.ts b/pyroscope/src/utils/use-query.ts index 712304cb1..a3bd00454 100644 --- a/pyroscope/src/utils/use-query.ts +++ b/pyroscope/src/utils/use-query.ts @@ -39,7 +39,7 @@ export function useLabelNames(datasource: DatasourceSelector): UseQueryResult { const { data: client } = useDatasourceClient(datasource); const { absoluteTimeRange } = useTimeRange(); @@ -60,14 +60,14 @@ export function useLabelValues( return await client!.searchLabelValues( {}, { 'content-type': 'application/json' }, - { name: labelName, start: start * MILLISECONDS, end: end * MILLISECONDS } + { name: labelName, start: start * MILLISECONDS, end: end * MILLISECONDS }, ); }, }); } export function useProfileTypes( - datasource: DatasourceSelector + datasource: DatasourceSelector, ): UseQueryResult { const { data: client } = useDatasourceClient(datasource); const { absoluteTimeRange } = useTimeRange(); @@ -80,7 +80,7 @@ export function useProfileTypes( return await client!.searchProfileTypes( {}, { 'content-type': 'application/json' }, - { start: start * MILLISECONDS, end: end * MILLISECONDS } + { start: start * MILLISECONDS, end: end * MILLISECONDS }, ); }, }); @@ -98,7 +98,7 @@ export function useServices(datasource: DatasourceSelector): UseQueryResult { - + , ); }; diff --git a/scatterchart/src/ScatterChartPanel.tsx b/scatterchart/src/ScatterChartPanel.tsx index 4d8dba905..4aa6daaf0 100644 --- a/scatterchart/src/ScatterChartPanel.tsx +++ b/scatterchart/src/ScatterChartPanel.tsx @@ -165,7 +165,7 @@ export function ScatterChartPanel(props: ScatterChartPanelProps): ReactElement | export function getSymbolSize( spanCount: number, spanCountRange: [number, number], - sizeRange: [number, number] + sizeRange: [number, number], ): number { const [minSize, maxSize] = sizeRange; const [minSpanCount, maxSpanCount] = spanCountRange; diff --git a/splunk/package.json b/splunk/package.json index c96ac0b0b..e48887988 100644 --- a/splunk/package.json +++ b/splunk/package.json @@ -18,6 +18,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/splunk/src/model/splunk-client.ts b/splunk/src/model/splunk-client.ts index 58bce086b..c01bf6e4e 100644 --- a/splunk/src/model/splunk-client.ts +++ b/splunk/src/model/splunk-client.ts @@ -56,12 +56,12 @@ export interface SplunkClient { getJobResults: ( jobId: string, params?: SplunkJobResultsParams, - headers?: SplunkRequestHeaders + headers?: SplunkRequestHeaders, ) => Promise; getJobEvents: ( jobId: string, params?: SplunkJobResultsParams, - headers?: SplunkRequestHeaders + headers?: SplunkRequestHeaders, ) => Promise; exportSearch: (params: SplunkExportSearchParams, headers?: SplunkRequestHeaders) => Promise; getIndexes: (headers?: SplunkRequestHeaders) => Promise; @@ -86,7 +86,7 @@ function buildUrl(path: string, datasourceUrl: string): URL { export async function createJob( params: SplunkJobCreateParams, - options: SplunkApiOptions + options: SplunkApiOptions, ): Promise { const url = buildUrl('/services/search/v2/jobs', options.datasourceUrl); @@ -121,7 +121,7 @@ export async function getJobStatus(jobId: string, options: SplunkApiOptions): Pr export async function getJobResults( jobId: string, params: SplunkJobResultsParams = {}, - options: SplunkApiOptions + options: SplunkApiOptions, ): Promise { const url = buildUrl(`/services/search/v2/jobs/${jobId}/results`, options.datasourceUrl); url.searchParams.append('output_mode', params.output_mode || 'json'); @@ -140,7 +140,7 @@ export async function getJobResults( export async function getJobEvents( jobId: string, params: SplunkJobResultsParams = {}, - options: SplunkApiOptions + options: SplunkApiOptions, ): Promise { const url = buildUrl(`/services/search/v2/jobs/${jobId}/events`, options.datasourceUrl); url.searchParams.append('output_mode', params.output_mode || 'json'); @@ -161,7 +161,7 @@ This is a temporary implementation to unblock plugin development. Refactor later to properly handle streaming responses. */ export async function exportSearch( params: SplunkExportSearchParams, - options: SplunkApiOptions + options: SplunkApiOptions, ): Promise { const url = buildUrl('/services/search/v2/jobs/export', options.datasourceUrl); diff --git a/splunk/src/queries/splunk-log-query/SplunkLogQuery.test.ts b/splunk/src/queries/splunk-log-query/SplunkLogQuery.test.ts index d7aaf7505..c25cbb75c 100644 --- a/splunk/src/queries/splunk-log-query/SplunkLogQuery.test.ts +++ b/splunk/src/queries/splunk-log-query/SplunkLogQuery.test.ts @@ -43,7 +43,7 @@ describe('SplunkLogQuery', () => { { query: 'search index=$index sourcetype=$sourcetype error', }, - createStubContext() + createStubContext(), ); expect(variables).toEqual(expect.arrayContaining(['index', 'sourcetype'])); expect(variables).toHaveLength(2); @@ -55,7 +55,7 @@ describe('SplunkLogQuery', () => { { query: 'search index=main error', }, - createStubContext() + createStubContext(), ); expect(variables).toEqual([]); }); diff --git a/splunk/src/queries/splunk-log-query/SplunkLogQueryEditor.tsx b/splunk/src/queries/splunk-log-query/SplunkLogQueryEditor.tsx index bb8f3f696..837c455c4 100644 --- a/splunk/src/queries/splunk-log-query/SplunkLogQueryEditor.tsx +++ b/splunk/src/queries/splunk-log-query/SplunkLogQueryEditor.tsx @@ -40,7 +40,7 @@ export function SplunkLogQueryEditor(props: SplunkLogQueryEditorProps): ReactEle onChange( produce(value, (draft) => { draft.datasource = newDatasourceSelection; - }) + }), ); return; } @@ -52,7 +52,7 @@ export function SplunkLogQueryEditor(props: SplunkLogQueryEditorProps): ReactEle onChange( produce(value, (draft) => { draft.query = newQuery; - }) + }), ); }; diff --git a/splunk/src/queries/splunk-log-query/get-splunk-log-data.ts b/splunk/src/queries/splunk-log-query/get-splunk-log-data.ts index e1ead8397..e63177f80 100644 --- a/splunk/src/queries/splunk-log-query/get-splunk-log-data.ts +++ b/splunk/src/queries/splunk-log-query/get-splunk-log-data.ts @@ -29,7 +29,7 @@ import { SplunkLogQuerySpec } from './splunk-log-query-types'; function convertResultsToLogs( results: | Array<{ _time: string; _raw: string; [key: string]: string | number }> - | { _time: string; _raw: string; [key: string]: string | number } + | { _time: string; _raw: string; [key: string]: string | number }, ): LogData { const resultsArray = Array.isArray(results) ? results : [results]; @@ -51,7 +51,7 @@ function convertResultsToLogs( export const getSplunkLogData: LogQueryPlugin['getLogData'] = async ( spec: SplunkLogQuerySpec, - context: LogQueryContext + context: LogQueryContext, ) => { if (!spec.query) { return { @@ -62,7 +62,7 @@ export const getSplunkLogData: LogQueryPlugin['getLogData'] const query = replaceVariables(spec.query, context.variableState); const client: SplunkClient = await context.datasourceStore.getDatasourceClient( - spec.datasource ?? DEFAULT_DATASOURCE + spec.datasource ?? DEFAULT_DATASOURCE, ); const datasourceSpec = await context.datasourceStore.getDatasource(spec.datasource ?? DEFAULT_DATASOURCE); @@ -70,11 +70,11 @@ export const getSplunkLogData: LogQueryPlugin['getLogData'] (datasourceSpec.plugin.spec as SplunkDatasourceSpec)?.proxy?.spec?.allowedEndpoints || []; const hasExportEndpoint: boolean = allowedEndpoints.some((ep: HTTPAllowedEndpoint) => - ep.endpointPattern?.includes('/export') + ep.endpointPattern?.includes('/export'), ); //TODO - Ideally this Indexes endpoint to be pushed inside the explorer view. const hasIndexesEndpoint: boolean = allowedEndpoints.some((ep: HTTPAllowedEndpoint) => - ep.endpointPattern?.includes('/indexes') + ep.endpointPattern?.includes('/indexes'), ); const { start, end } = context.timeRange; @@ -102,7 +102,7 @@ export const getSplunkLogData: LogQueryPlugin['getLogData'] labels: Object.fromEntries( Object.entries(index) .filter(([key]) => key !== 'name') - .map(([key, value]) => [key, typeof value === 'object' ? JSON.stringify(value) : String(value)]) + .map(([key, value]) => [key, typeof value === 'object' ? JSON.stringify(value) : String(value)]), ) as Record, })) : []; @@ -140,7 +140,7 @@ export const getSplunkLogData: LogQueryPlugin['getLogData'] } const logs: LogData = convertResultsToLogs( - eventsResponse.results as Array<{ _time: string; _raw: string; [key: string]: string | number }> + eventsResponse.results as Array<{ _time: string; _raw: string; [key: string]: string | number }>, ); return { diff --git a/splunk/src/queries/splunk-time-series-query/SplunkTimeSeriesQuery.test.ts b/splunk/src/queries/splunk-time-series-query/SplunkTimeSeriesQuery.test.ts index c5dc2d6f3..7e4db0aea 100644 --- a/splunk/src/queries/splunk-time-series-query/SplunkTimeSeriesQuery.test.ts +++ b/splunk/src/queries/splunk-time-series-query/SplunkTimeSeriesQuery.test.ts @@ -25,7 +25,7 @@ describe('SplunkTimeSeriesQuery', () => { { query: 'search index=$index sourcetype=$sourcetype | stats count by $index', }, - {} as never + {} as never, ); expect(variables).toEqual(expect.arrayContaining(['index', 'sourcetype'])); expect(variables).toHaveLength(2); diff --git a/splunk/src/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.tsx b/splunk/src/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.tsx index 9370674f0..99260261e 100644 --- a/splunk/src/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.tsx +++ b/splunk/src/queries/splunk-time-series-query/SplunkTimeSeriesQueryEditor.tsx @@ -40,7 +40,7 @@ export function SplunkTimeSeriesQueryEditor(props: SplunkQueryEditorProps): Reac onChange( produce(value, (draft) => { draft.datasource = newDatasourceSelection; - }) + }), ); return; } @@ -52,7 +52,7 @@ export function SplunkTimeSeriesQueryEditor(props: SplunkQueryEditorProps): Reac onChange( produce(value, (draft) => { draft.query = newQuery; - }) + }), ); }; diff --git a/splunk/src/queries/splunk-time-series-query/get-splunk-time-series-data.ts b/splunk/src/queries/splunk-time-series-query/get-splunk-time-series-data.ts index 4f467c3a3..3a91d9190 100644 --- a/splunk/src/queries/splunk-time-series-query/get-splunk-time-series-data.ts +++ b/splunk/src/queries/splunk-time-series-query/get-splunk-time-series-data.ts @@ -21,7 +21,7 @@ import { DEFAULT_DATASOURCE } from '../constants'; import { SplunkTimeSeriesQuerySpec } from './splunk-time-series-query-types'; function convertResultsToTimeSeries( - results: Array<{ _time: string; [key: string]: string | number }> | { _time: string; [key: string]: string | number } + results: Array<{ _time: string; [key: string]: string | number }> | { _time: string; [key: string]: string | number }, ): TimeSeries[] { const resultsArray = Array.isArray(results) ? results : [results]; @@ -45,7 +45,7 @@ function convertResultsToTimeSeries( export const getSplunkTimeSeriesData: TimeSeriesQueryPlugin['getTimeSeriesData'] = async ( spec, - context + context, ) => { if (!spec.query) { return { @@ -57,7 +57,7 @@ export const getSplunkTimeSeriesData: TimeSeriesQueryPlugin( - spec.datasource ?? DEFAULT_DATASOURCE + spec.datasource ?? DEFAULT_DATASOURCE, ); const datasourceSpec = await context.datasourceStore.getDatasource(spec.datasource ?? DEFAULT_DATASOURCE); @@ -102,7 +102,7 @@ export const getSplunkTimeSeriesData: TimeSeriesQueryPlugin + resultsResponse.results as Array<{ _time: string; [key: string]: string | number }>, ); return { diff --git a/statchart/package.json b/statchart/package.json index a699f1eac..a5356c4b0 100644 --- a/statchart/package.json +++ b/statchart/package.json @@ -18,6 +18,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/statchart/src/StatChartBase.test.tsx b/statchart/src/StatChartBase.test.tsx index 6eb7ba547..ad6dc0f5c 100644 --- a/statchart/src/StatChartBase.test.tsx +++ b/statchart/src/StatChartBase.test.tsx @@ -34,7 +34,7 @@ describe('StatChart', () => { data={mockStatData} format={format} /> - + , ); }; diff --git a/statchart/src/StatChartBase.tsx b/statchart/src/StatChartBase.tsx index 66d0f59bb..12d6ae7bc 100644 --- a/statchart/src/StatChartBase.tsx +++ b/statchart/src/StatChartBase.tsx @@ -277,5 +277,5 @@ const Value = styled(Typography, { padding: sparkline ? `${padding}px ${padding}px 0 ${padding}px` : ` 0 ${padding}px`, whiteSpace: 'nowrap', lineHeight: LINE_HEIGHT, - }) + }), ); diff --git a/statchart/src/StatChartOptionsEditorSettings.test.tsx b/statchart/src/StatChartOptionsEditorSettings.test.tsx index d3a21bade..da251b056 100644 --- a/statchart/src/StatChartOptionsEditorSettings.test.tsx +++ b/statchart/src/StatChartOptionsEditorSettings.test.tsx @@ -23,7 +23,7 @@ describe('StatChartOptionsEditorSettings', () => { render( - + , ); }; @@ -36,7 +36,7 @@ describe('StatChartOptionsEditorSettings', () => { }, calculation: 'last', }, - onChange + onChange, ); const unitSelector = screen.getByRole('combobox', { name: 'Unit' }); userEvent.click(unitSelector); @@ -49,7 +49,7 @@ describe('StatChartOptionsEditorSettings', () => { format: { unit: 'percent', }, - }) + }), ); }); @@ -62,7 +62,7 @@ describe('StatChartOptionsEditorSettings', () => { }, calculation: 'sum', }, - onChange + onChange, ); const calcSelector = screen.getByRole('combobox', { name: 'Calculation' }); userEvent.click(calcSelector); @@ -73,7 +73,7 @@ describe('StatChartOptionsEditorSettings', () => { expect(onChange).toHaveBeenCalledWith( expect.objectContaining({ calculation: 'first-number', - }) + }), ); }); @@ -86,7 +86,7 @@ describe('StatChartOptionsEditorSettings', () => { }, calculation: 'sum', }, - onChange + onChange, ); const sparklineSwitch = screen.getByRole('checkbox', { name: 'Sparkline' }); expect(sparklineSwitch).not.toBeChecked(); @@ -95,7 +95,7 @@ describe('StatChartOptionsEditorSettings', () => { expect(onChange).toHaveBeenCalledWith( expect.objectContaining({ sparkline: {}, - }) + }), ); }); @@ -111,7 +111,7 @@ describe('StatChartOptionsEditorSettings', () => { color: '#ff0000', }, }, - onChange + onChange, ); const sparklineSwitch = screen.getByRole('checkbox', { name: 'Sparkline' }); expect(sparklineSwitch).toBeChecked(); @@ -120,7 +120,7 @@ describe('StatChartOptionsEditorSettings', () => { expect(onChange).toHaveBeenCalledWith( expect.objectContaining({ sparkline: undefined, - }) + }), ); }); }); diff --git a/statchart/src/StatChartOptionsEditorSettings.tsx b/statchart/src/StatChartOptionsEditorSettings.tsx index 40396d4c5..38c5a63a7 100644 --- a/statchart/src/StatChartOptionsEditorSettings.tsx +++ b/statchart/src/StatChartOptionsEditorSettings.tsx @@ -58,7 +58,7 @@ export function StatChartOptionsEditorSettings(props: StatChartOptionsEditorProp onChange( produce(value, (draft: StatChartOptions) => { draft.calculation = metricLabel; - }) + }), ); }; @@ -66,7 +66,7 @@ export function StatChartOptionsEditorSettings(props: StatChartOptionsEditorProp onChange( produce(value, (draft: StatChartOptions) => { draft.metricLabel = newCalculation; - }) + }), ); }; @@ -75,17 +75,17 @@ export function StatChartOptionsEditorSettings(props: StatChartOptionsEditorProp onChange( produce(value, (draft: StatChartOptions) => { draft.legendMode = newShowLegend.id; - }) + }), ); }, - [onChange, value] + [onChange, value], ); const handleUnitChange: FormatControlsProps['onChange'] = (newFormat) => { onChange( produce(value, (draft: StatChartOptions) => { draft.format = newFormat; - }) + }), ); }; @@ -96,7 +96,7 @@ export function StatChartOptionsEditorSettings(props: StatChartOptionsEditorProp // uses the default chart color and line styles. In the future, this // will likely be configurable in the UI. draft.sparkline = checked ? {} : undefined; - }) + }), ); }; @@ -104,7 +104,7 @@ export function StatChartOptionsEditorSettings(props: StatChartOptionsEditorProp onChange( produce(value, (draft: StatChartOptions) => { draft.thresholds = thresholds; - }) + }), ); }; @@ -112,7 +112,7 @@ export function StatChartOptionsEditorSettings(props: StatChartOptionsEditorProp onChange( produce(value, (draft: StatChartOptions) => { draft.valueFontSize = fontSize; - }) + }), ); }; @@ -121,10 +121,10 @@ export function StatChartOptionsEditorSettings(props: StatChartOptionsEditorProp onChange( produce(value, (draft: StatChartOptions) => { draft.colorMode = newColorMode.id; - }) + }), ); }, - [onChange, value] + [onChange, value], ); const selectShowLegend = useMemo((): ReactElement => { diff --git a/statchart/src/StatChartPanel.tsx b/statchart/src/StatChartPanel.tsx index caedcb96d..ceda33823 100644 --- a/statchart/src/StatChartPanel.tsx +++ b/statchart/src/StatChartPanel.tsx @@ -104,7 +104,7 @@ export const StatChartPanel: FC = (props) => { const useStatChartData = ( queryResults: Array>, spec: StatChartOptions, - chartsTheme: PersesChartsTheme + chartsTheme: PersesChartsTheme, ): StatChartData[] => { return useMemo(() => { const { calculation, mappings, metricLabel } = spec; @@ -137,7 +137,7 @@ const useStatChartData = ( const getValueOrLabel = ( value?: number | null, mappings?: ValueMapping[], - label?: string + label?: string, ): string | number | undefined | null => { if (label) { return label; diff --git a/statchart/src/utils/calculate-value.ts b/statchart/src/utils/calculate-value.ts index a6322bc6c..76810902b 100644 --- a/statchart/src/utils/calculate-value.ts +++ b/statchart/src/utils/calculate-value.ts @@ -16,7 +16,7 @@ import { TimeSeries } from '@perses-dev/spec'; export const calculateValue = ( calculation: CalculationType, - seriesData: TimeSeries + seriesData: TimeSeries, ): ReturnType<(typeof CalculationsMap)[CalculationType]> => { if (CalculationsMap[calculation] === undefined) { console.warn(`Invalid StatChart panel calculation ${calculation}, fallback to ${DEFAULT_CALCULATION}`); diff --git a/statchart/src/utils/data-transform.ts b/statchart/src/utils/data-transform.ts index f2a6db88f..ec49836d6 100644 --- a/statchart/src/utils/data-transform.ts +++ b/statchart/src/utils/data-transform.ts @@ -19,7 +19,7 @@ import { StatChartSparklineOptions } from '../stat-chart-model'; export function convertSparkline( chartsTheme: PersesChartsTheme, color: string, - sparkline?: StatChartSparklineOptions + sparkline?: StatChartSparklineOptions, ): LineSeriesOption | undefined { if (sparkline === undefined) return; diff --git a/statchart/src/utils/get-color.ts b/statchart/src/utils/get-color.ts index eea4da52c..f4d2ee84f 100644 --- a/statchart/src/utils/get-color.ts +++ b/statchart/src/utils/get-color.ts @@ -20,7 +20,7 @@ type StatChartValue = number | string | null; export function getStatChartColor( chartsTheme: PersesChartsTheme, spec?: StatChartOptions, - value?: StatChartValue + value?: StatChartValue, ): string { const { mappings, thresholds } = spec ?? {}; @@ -63,7 +63,7 @@ function getColorFromThresholds( value: StatChartValue, thresholds: ThresholdOptions, chartsTheme: PersesChartsTheme, - defaultColor: string + defaultColor: string, ): string | null { if (thresholds?.steps && typeof value === 'number') { const matchingColors = thresholds.steps diff --git a/staticlistvariable/package.json b/staticlistvariable/package.json index d934bddaa..f81cfb80f 100644 --- a/staticlistvariable/package.json +++ b/staticlistvariable/package.json @@ -18,6 +18,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest --passWithNoTests", "type-check": "tsc --noEmit" }, diff --git a/staticlistvariable/src/StaticListVariable.tsx b/staticlistvariable/src/StaticListVariable.tsx index feea4195c..cc1c58e67 100644 --- a/staticlistvariable/src/StaticListVariable.tsx +++ b/staticlistvariable/src/StaticListVariable.tsx @@ -47,7 +47,7 @@ function StaticListVariableOptionEditor(props: OptionsEditorProps { const filteredVariables = variables.filter( - (v) => !((v as string) === option || (v as VariableOption)?.value === option) + (v) => !((v as string) === option || (v as VariableOption)?.value === option), ); onChange({ values: [...filteredVariables] }); setEditModeOption(''); }, - [variables, onChange] + [variables, onChange], ); const renderTagsHandler = useCallback( @@ -215,7 +215,7 @@ function StaticListVariableOptionEditor(props: OptionsEditorProps { draft.legend = newLegend; - }) + }), ); }; @@ -42,7 +42,7 @@ export function StatusHistoryChartOptionsEditorSettings(props: StatusHistroyChar onChange( produce(value, (draft: StatusHistoryChartOptions) => { draft.sorting = newSort; - }) + }), ); }; @@ -69,7 +69,7 @@ export function StatusHistoryChartOptionsEditorSettings(props: StatusHistroyChar produce(value, (draft: StatusHistoryChartOptions) => { // reset button removes all optional panel options draft.legend = undefined; - }) + }), ); }} > diff --git a/statushistorychart/src/utils/data-transform.ts b/statushistorychart/src/utils/data-transform.ts index 427c9e771..5ad8c7023 100644 --- a/statushistorychart/src/utils/data-transform.ts +++ b/statushistorychart/src/utils/data-transform.ts @@ -48,7 +48,7 @@ function generateCompleteTimestamps(timescale?: TimeScale): number[] { export function useStatusHistoryDataModel( queryResults: Array>, themeColors: string[], - spec: StatusHistoryChartOptions + spec: StatusHistoryChartOptions, ): StatusHistoryDataModel { return useMemo(() => { if (!queryResults || queryResults.length === 0) { diff --git a/statushistorychart/src/utils/get-color.ts b/statushistorychart/src/utils/get-color.ts index e7e003b17..0f78cd200 100644 --- a/statushistorychart/src/utils/get-color.ts +++ b/statushistorychart/src/utils/get-color.ts @@ -44,7 +44,7 @@ export function getColorForValue(value: number | string, baseColor: string): str const color = hslToHex( Math.abs(newH), Math.min(Math.max(newS, 50), 90), // Keep saturation 50-90% - Math.min(Math.max(newL, 30), 70) // Keep lightness 30-70% + Math.min(Math.max(newL, 30), 70), // Keep lightness 30-70% ); // Validate generated color diff --git a/table/package.json b/table/package.json index a3e938146..2165e5f75 100644 --- a/table/package.json +++ b/table/package.json @@ -18,6 +18,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/table/src/TableExportAction.tsx b/table/src/TableExportAction.tsx index 870e80d33..d33e53ab2 100644 --- a/table/src/TableExportAction.tsx +++ b/table/src/TableExportAction.tsx @@ -34,7 +34,7 @@ export interface ExportColumn { */ export function buildTableData( queryResults: Array>, - spec: TableOptions + spec: TableOptions, ): { data: Array>; columns: ExportColumn[] } { // Use shared utility with forExport=true to get raw scalar values const rawData = buildRawTableData(queryResults, spec, { forExport: true }); diff --git a/table/src/components/ColumnsEditor/ColumnEditor.tsx b/table/src/components/ColumnsEditor/ColumnEditor.tsx index 6745f352d..511dbbeb0 100644 --- a/table/src/components/ColumnsEditor/ColumnEditor.tsx +++ b/table/src/components/ColumnsEditor/ColumnEditor.tsx @@ -50,7 +50,7 @@ export function ColumnEditor({ ...others }: ColumnEditorProps): ReactElement { const [width, setWidth] = useState( - column.width === undefined || column.width === 'auto' ? 100 : column.width + column.width === undefined || column.width === 'auto' ? 100 : column.width, ); const enableSorting = column.enableSorting ?? defaultEnableSorting; diff --git a/table/src/components/ConditionalPanel.tsx b/table/src/components/ConditionalPanel.tsx index afbfb46c9..87397499f 100644 --- a/table/src/components/ConditionalPanel.tsx +++ b/table/src/components/ConditionalPanel.tsx @@ -86,7 +86,7 @@ export function ConditionalRule({ cell, onChange, onDelete, ...props }: Conditio {renderConditionEditor( cell.condition, (updatedCondition) => onChange({ ...cell, condition: updatedCondition }), - 'small' + 'small', )} diff --git a/table/src/components/TablePanel.test.tsx b/table/src/components/TablePanel.test.tsx index c48e63f42..3ab865406 100644 --- a/table/src/components/TablePanel.test.tsx +++ b/table/src/components/TablePanel.test.tsx @@ -74,7 +74,7 @@ describe('TablePanel', () => { - + , ); }; @@ -95,7 +95,7 @@ describe('TablePanel', () => { expect(await screen.findAllByRole('cell')).toHaveLength(16); // 2 time series with 8 columns }, - TEST_TIMEOUT + TEST_TIMEOUT, ); it( @@ -135,7 +135,7 @@ describe('TablePanel', () => { expect(await screen.findAllByRole('cell')).toHaveLength(14); // 2 time series with 7 columns }, - TEST_TIMEOUT + TEST_TIMEOUT, ); it( @@ -156,7 +156,7 @@ describe('TablePanel', () => { const envHeaderCell = await screen.findByRole('columnheader', { name: 'env' }); expect(within(envHeaderCell).queryByTestId('ArrowDownwardIcon')).not.toBeInTheDocument(); }, - TEST_TIMEOUT + TEST_TIMEOUT, ); it('should apply transforms', async () => { @@ -244,7 +244,7 @@ describe('TablePanel', () => { - + , ); // embedded panel is loaded async @@ -279,7 +279,7 @@ describe('TablePanel', () => { expect(within(firstHeader).getByRole('checkbox')).toBeInTheDocument(); } }, - TEST_TIMEOUT + TEST_TIMEOUT, ); it( @@ -292,7 +292,7 @@ describe('TablePanel', () => { // Should not have any checkboxes expect(screen.queryAllByRole('checkbox')).toHaveLength(0); }, - TEST_TIMEOUT + TEST_TIMEOUT, ); it( @@ -303,7 +303,7 @@ describe('TablePanel', () => { // Should not have any checkboxes by default expect(screen.queryAllByRole('checkbox')).toHaveLength(0); }, - TEST_TIMEOUT + TEST_TIMEOUT, ); it( @@ -324,7 +324,7 @@ describe('TablePanel', () => { expect(firstRowCheckbox).toBeChecked(); } }, - TEST_TIMEOUT + TEST_TIMEOUT, ); it( @@ -346,7 +346,7 @@ describe('TablePanel', () => { }); } }, - TEST_TIMEOUT + TEST_TIMEOUT, ); it( @@ -377,7 +377,7 @@ describe('TablePanel', () => { const actionButtons = screen.queryAllByRole('button', { name: 'Test Action' }); expect(actionButtons).toHaveLength(2); // 2 rows with action buttons }, - TEST_TIMEOUT + TEST_TIMEOUT, ); }); @@ -397,7 +397,7 @@ describe('TablePanel', () => { - + , ); }; @@ -435,7 +435,7 @@ describe('TablePanel', () => { expect(await screen.findByRole('cell', { name: '100' })).toBeInTheDocument(); expect(await screen.findByRole('cell', { name: '200' })).toBeInTheDocument(); }, - TEST_TIMEOUT + TEST_TIMEOUT, ); it( @@ -464,7 +464,7 @@ describe('TablePanel', () => { // ns-b's value #1 = 200 should still render correctly (not become N/A) expect(screen.getByRole('cell', { name: '200' })).toBeInTheDocument(); }, - TEST_TIMEOUT + TEST_TIMEOUT, ); it( @@ -484,7 +484,7 @@ describe('TablePanel', () => { // No N/A should appear — all cells have real values (100, 200, 50, 0) expect(screen.queryAllByRole('cell', { name: 'N/A' })).toHaveLength(0); }, - TEST_TIMEOUT + TEST_TIMEOUT, ); it( @@ -511,7 +511,7 @@ describe('TablePanel', () => { // Q1 has data, Q2 has partial data, Q3 is completely empty renderMultiQueryPanel( [MOCK_MULTI_QUERY_DATA_Q1, MOCK_MULTI_QUERY_DATA_Q2, MOCK_MULTI_QUERY_DATA_EMPTY], - options + options, ); // Both namespaces should be present @@ -523,7 +523,7 @@ describe('TablePanel', () => { // At minimum: ns-b missing value #2 (1) + both rows missing value #3 (2) = 3 N/A cells expect(naCells.length).toBeGreaterThanOrEqual(3); }, - TEST_TIMEOUT + TEST_TIMEOUT, ); }); }); diff --git a/table/src/components/TablePanel.tsx b/table/src/components/TablePanel.tsx index 8d0f38c2e..5ffac5299 100644 --- a/table/src/components/TablePanel.tsx +++ b/table/src/components/TablePanel.tsx @@ -155,7 +155,7 @@ function InlineGaugeCellWithRange({ function resolveGaugeFillColor( value: unknown, globalCellSettings: CellSettings[], - columnCellSettings: CellSettings[] | undefined + columnCellSettings: CellSettings[] | undefined, ): string | undefined { let cellConfig = evaluateConditionalFormatting(value, globalCellSettings); if (columnCellSettings?.length) { @@ -170,7 +170,7 @@ function resolveGaugeFillColor( function generateCellContentConfig( column: ColumnSettings, gaugeRange?: GaugeRange, - globalCellSettings: CellSettings[] = [] + globalCellSettings: CellSettings[] = [], ): Pick, 'cellDescription' | 'cell'> { const plugin = column.plugin; if (plugin !== undefined) { @@ -344,7 +344,7 @@ function generateColumnConfig( allVariables: VariableStateMap, gaugeRangeByColumn: Record, globalCellSettings: CellSettings[] = [], - defaultEnableSorting = false + defaultEnableSorting = false, ): TableColumnConfig | undefined { for (const column of columnSettings) { if (column.name === name) { @@ -435,7 +435,7 @@ export function TablePanel({ contentDimensions, spec, queryResults }: TableProps setSelection(newSelection); } }, - [setSelection, clearSelection] + [setSelection, clearSelection], ); // TODO: handle other query types @@ -551,7 +551,7 @@ export function TablePanel({ contentDimensions, spec, queryResults }: TableProps allVariables, gaugeRangeByColumn, spec.cellSettings ?? [], - spec.enableSorting ?? false + spec.enableSorting ?? false, ); if (columnConfig !== undefined) { columns.push(columnConfig); @@ -569,7 +569,7 @@ export function TablePanel({ contentDimensions, spec, queryResults }: TableProps allVariables, gaugeRangeByColumn, spec.cellSettings ?? [], - spec.enableSorting ?? false + spec.enableSorting ?? false, ); if (columnConfig !== undefined) { columns.push(columnConfig); @@ -628,7 +628,7 @@ export function TablePanel({ contentDimensions, spec, queryResults }: TableProps acc[key] = undefined; return acc; }, - {} as Record + {} as Record, ); const extendRow = { @@ -738,7 +738,7 @@ export function TablePanel({ contentDimensions, spec, queryResults }: TableProps filteredDataRef.current = filteredData; const [pagination, setPagination] = useState( - spec.pagination ? { pageIndex: 0, pageSize: 10 } : undefined + spec.pagination ? { pageIndex: 0, pageSize: 10 } : undefined, ); useEffect(() => { @@ -950,7 +950,7 @@ export function TablePanel({ contentDimensions, spec, queryResults }: TableProps theme={theme} /> , - document.body + document.body, )} ); diff --git a/table/src/models/table-model.ts b/table/src/models/table-model.ts index 087d395ff..c28f712a2 100644 --- a/table/src/models/table-model.ts +++ b/table/src/models/table-model.ts @@ -281,7 +281,7 @@ export function evaluateConditionalFormatting(value: unknown, settings: CellSett export function renderConditionEditor( condition: Condition, onChange: (condition: Condition) => void, - size: 'small' | 'medium' = 'small' + size: 'small' | 'medium' = 'small', ): React.ReactElement | null { if (condition.kind === 'Value') { return React.createElement(TextField, { @@ -329,7 +329,7 @@ export function renderConditionEditor( fullWidth: true, size: size, }), - ] + ], ); } else if (condition.kind === 'Regex') { return React.createElement(TextField, { @@ -376,11 +376,11 @@ export function renderConditionEditor( key: 'caption', variant: 'caption', }, - option.caption + option.caption, ), - ]) - ) - ) + ]), + ), + ), ); } return null; diff --git a/table/src/table-data-utils.ts b/table/src/table-data-utils.ts index 55f4ab07f..744bb0399 100644 --- a/table/src/table-data-utils.ts +++ b/table/src/table-data-utils.ts @@ -50,14 +50,14 @@ export function getTablePanelQueryMode(spec: TableOptions): 'instant' | 'range' export function buildRawTableData( queryResults: Array>, spec: TableOptions, - options: BuildRawTableDataOptions = {} + options: BuildRawTableDataOptions = {}, ): Array> { const { forExport = false } = options; const queryMode = getTablePanelQueryMode(spec); return queryResults .flatMap((data: PanelData, queryIndex: number) => - (data.data?.series ?? []).map((ts: TimeSeries) => ({ data, ts, queryIndex })) + (data.data?.series ?? []).map((ts: TimeSeries) => ({ data, ts, queryIndex })), ) .map(({ data, ts, queryIndex }: { data: PanelData; ts: TimeSeries; queryIndex: number }) => { // Pick the last (most recent) data point. For range responses the last diff --git a/tempo/package.json b/tempo/package.json index 7932c9f87..31229007a 100644 --- a/tempo/package.json +++ b/tempo/package.json @@ -18,6 +18,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/tempo/src/components/AttributeFilters.tsx b/tempo/src/components/AttributeFilters.tsx index fabb81767..b308e5ccf 100644 --- a/tempo/src/components/AttributeFilters.tsx +++ b/tempo/src/components/AttributeFilters.tsx @@ -44,14 +44,14 @@ export function AttributeFilters(props: AttributeFiltersProps): ReactElement { 'resource.service.name', filterToTraceQL({ ...filter, serviceName: [] }), start, - end + end, ); const { data: spanNameOptions } = useTagValues( client, 'name', filterToTraceQL({ ...filter, spanName: [] }), start, - end + end, ); return ( @@ -247,7 +247,7 @@ function useTagValues( tag: string, query: string, start?: number, - end?: number + end?: number, ): UseQueryResult { return useQuery({ queryKey: ['useTagValues', client, tag, query, start, end], diff --git a/tempo/src/components/complete.ts b/tempo/src/components/complete.ts index 4b3116754..c37eb95d5 100644 --- a/tempo/src/components/complete.ts +++ b/tempo/src/components/complete.ts @@ -51,7 +51,7 @@ const defaultQuoteChar = '"'; export async function complete( completionCfg: CompletionConfig, - { state, pos }: CompletionContext + { state, pos }: CompletionContext, ): Promise { // First, identify the completion scopes, for example Scopes() and TagName(scope=intrinsic) const completions = identifyCompletions(state, pos, syntaxTree(state)); @@ -229,7 +229,7 @@ async function retrieveOptions(completionCfg: CompletionConfig, completions: Com async function completeTagName( completionCfg: CompletionConfig, - scope: 'resource' | 'span' | 'intrinsic' + scope: 'resource' | 'span' | 'intrinsic', ): Promise { if (!completionCfg.client) { return []; diff --git a/tempo/src/components/filter/traceql_to_filter.ts b/tempo/src/components/filter/traceql_to_filter.ts index 7577e57fb..cae7c2c70 100644 --- a/tempo/src/components/filter/traceql_to_filter.ts +++ b/tempo/src/components/filter/traceql_to_filter.ts @@ -37,7 +37,7 @@ export function traceQLToFilter(query: string): Filter { traceDuration: reverseDurationMatcher(matchers['traceDuration']), customMatchers: reverseCustomMatcher( matchers, - new Set(['resource.service.name', 'name', 'resource.k8s.namespace.name', 'status', 'duration', 'traceDuration']) + new Set(['resource.service.name', 'name', 'resource.k8s.namespace.name', 'status', 'duration', 'traceDuration']), ), }; } diff --git a/tempo/src/model/tempo-client.test.ts b/tempo/src/model/tempo-client.test.ts index d1ab717a9..166d4d2ed 100644 --- a/tempo/src/model/tempo-client.test.ts +++ b/tempo/src/model/tempo-client.test.ts @@ -50,7 +50,7 @@ describe('tempo-client', () => { }); await expect(query({ traceId: 'nonexistent' }, { datasourceUrl: '' })).rejects.toThrow( - new UserFriendlyError('Trace not found', 404) + new UserFriendlyError('Trace not found', 404), ); }); @@ -68,7 +68,7 @@ describe('tempo-client', () => { fetchMock.mockResolvedValueOnce( mockErrorResponse(502, 'Bad Gateway', { headers: new Headers({ 'content-type': 'text/html' }), - }) + }), ); await expect(search({ q: '{}' }, { datasourceUrl: '' })).rejects.toThrow('Invalid response from server'); diff --git a/tempo/src/model/tempo-client.ts b/tempo/src/model/tempo-client.ts index 8c1b0d10f..8337761fe 100644 --- a/tempo/src/model/tempo-client.ts +++ b/tempo/src/model/tempo-client.ts @@ -47,7 +47,7 @@ export interface QueryOptions { async function fetchWithGet, TResponse>( apiURI: string, params: TRequest, - queryOptions: QueryOptions + queryOptions: QueryOptions, ): Promise { const { datasourceUrl, headers = {} } = queryOptions; @@ -110,7 +110,7 @@ export async function query(params: QueryRequestParameters, queryOptions: QueryO const response = await fetchWithGet, QueryResponse>( `/api/v2/traces/${encodeURIComponent(params.traceId)}`, {}, - queryOptions + queryOptions, ); // /api/v2/traces returns an empty trace if trace is not found. @@ -126,7 +126,7 @@ export async function query(params: QueryRequestParameters, queryOptions: QueryO */ export function searchTags( params: SearchTagsRequestParameters, - queryOptions: QueryOptions + queryOptions: QueryOptions, ): Promise { return fetchWithGet('/api/v2/search/tags', params, queryOptions); } @@ -136,12 +136,12 @@ export function searchTags( */ export function searchTagValues( params: SearchTagValuesRequestParameters, - queryOptions: QueryOptions + queryOptions: QueryOptions, ): Promise { const { tag, ...rest } = params; return fetchWithGet, SearchTagValuesResponse>( `/api/v2/search/tag/${encodeURIComponent(tag)}/values`, rest, - queryOptions + queryOptions, ); } diff --git a/tempo/src/model/tempo-selectors.ts b/tempo/src/model/tempo-selectors.ts index a32e2b561..06260029e 100644 --- a/tempo/src/model/tempo-selectors.ts +++ b/tempo/src/model/tempo-selectors.ts @@ -39,7 +39,7 @@ export function isDefaultTempoSelector(datasourceSelectValue: DatasourceSelectVa * Type guard to make sure a datasourceSelectValue is a Tempo one. */ export function isTempoDatasourceSelector( - datasourceSelectValue: DatasourceSelectValue + datasourceSelectValue: DatasourceSelectValue, ): datasourceSelectValue is TempoDatasourceSelector { return isVariableDatasource(datasourceSelectValue) || datasourceSelectValue.kind === TEMPO_DATASOURCE_KIND; } diff --git a/tempo/src/plugins/plugin.test.ts b/tempo/src/plugins/plugin.test.ts index 671852ea0..c94d5f91b 100644 --- a/tempo/src/plugins/plugin.test.ts +++ b/tempo/src/plugins/plugin.test.ts @@ -67,7 +67,7 @@ describe('TempoTraceQuery', () => { { query: 'duration > 900ms', }, - stubTempoContext + stubTempoContext, ); expect(results).toEqual(MOCK_TRACE_DATA_SEARCHRESULT); }); @@ -75,7 +75,7 @@ describe('TempoTraceQuery', () => { it('should convert base64-encoded trace IDs and span IDs in the response to hex format', async () => { const results = await TempoTraceQuery.getTraceData({ query: 'fbd37845209d43cdccd418dc5f9ff021' }, stubTempoContext); expect(results.trace?.resourceSpans[0]?.scopeSpans[0]?.spans[1]?.traceId).toEqual( - 'fbd37845209d43cdccd418dc5f9ff021' + 'fbd37845209d43cdccd418dc5f9ff021', ); expect(results.trace?.resourceSpans[0]?.scopeSpans[0]?.spans[1]?.spanId).toEqual('8467bca11377c166'); expect(results.trace?.resourceSpans[0]?.scopeSpans[0]?.spans[1]?.parentSpanId).toEqual('9c22eb77cb5c14c7'); diff --git a/tempo/src/plugins/tempo-trace-query/TempoTraceQueryEditor.tsx b/tempo/src/plugins/tempo-trace-query/TempoTraceQueryEditor.tsx index 3ecb88637..83ed12dd0 100644 --- a/tempo/src/plugins/tempo-trace-query/TempoTraceQueryEditor.tsx +++ b/tempo/src/plugins/tempo-trace-query/TempoTraceQueryEditor.tsx @@ -55,7 +55,7 @@ export function TempoTraceQueryEditor(props: TraceQueryEditorProps): ReactElemen // If they're using the default, just omit the datasource prop (i.e. set to undefined) const nextDatasource = isDefaultTempoSelector(next) ? undefined : next; draft.datasource = nextDatasource; - }) + }), ); return; } @@ -67,7 +67,7 @@ export function TempoTraceQueryEditor(props: TraceQueryEditorProps): ReactElemen onChange( produce(value, (draft) => { draft.query = newQuery; - }) + }), ); }; @@ -75,7 +75,7 @@ export function TempoTraceQueryEditor(props: TraceQueryEditorProps): ReactElemen (e: string) => { handleQueryChange(e); }, - [handleQueryChange] + [handleQueryChange], ); return ( @@ -105,7 +105,7 @@ export function TempoTraceQueryEditor(props: TraceQueryEditorProps): ReactElemen onChange( produce(value, (draft) => { draft.limit = newLimit; - }) + }), ) } /> diff --git a/tempo/src/plugins/tempo-trace-query/get-trace-data.test.ts b/tempo/src/plugins/tempo-trace-query/get-trace-data.test.ts index 62dc56d64..45e509bf6 100644 --- a/tempo/src/plugins/tempo-trace-query/get-trace-data.test.ts +++ b/tempo/src/plugins/tempo-trace-query/get-trace-data.test.ts @@ -103,7 +103,7 @@ describe('getTraceData', () => { expect(mockClient.search).toHaveBeenCalledWith( expect.objectContaining({ limit: DEFAULT_SEARCH_LIMIT + 1, - }) + }), ); // Verify no notice is shown @@ -134,7 +134,7 @@ describe('getTraceData', () => { expect(mockClient.search).toHaveBeenCalledWith( expect.objectContaining({ limit: customLimit + 1, - }) + }), ); // Verify notice is present @@ -182,7 +182,7 @@ describe('getTraceData', () => { expect(mockClient.search).toHaveBeenCalledWith( expect.objectContaining({ q: '{resource.service.name="frontend"}', - }) + }), ); expect(result.metadata?.executedQueryString).toBe('{resource.service.name="frontend"}'); }); @@ -269,7 +269,7 @@ describe('getTraceData', () => { expect(mockClient.search).toHaveBeenCalledWith( expect.objectContaining({ q: replacedQuery, - }) + }), ); expect(result.metadata?.executedQueryString).toBe(replacedQuery); expect(result.searchResult).toHaveLength(1); diff --git a/tempo/src/plugins/tempo-trace-query/query-editor-model.ts b/tempo/src/plugins/tempo-trace-query/query-editor-model.ts index 1b68dfd9e..652a44aa3 100644 --- a/tempo/src/plugins/tempo-trace-query/query-editor-model.ts +++ b/tempo/src/plugins/tempo-trace-query/query-editor-model.ts @@ -55,7 +55,7 @@ export function useQueryState(props: TraceQueryEditorProps): { onChange( produce(value, (draft) => { draft.query = query; - }) + }), ); }; diff --git a/timeserieschart/package.json b/timeserieschart/package.json index 5da43354b..b16089f68 100644 --- a/timeserieschart/package.json +++ b/timeserieschart/package.json @@ -18,6 +18,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/timeserieschart/src/GeneralSettingsEditor.tsx b/timeserieschart/src/GeneralSettingsEditor.tsx index e27b344c7..c700f7daa 100644 --- a/timeserieschart/src/GeneralSettingsEditor.tsx +++ b/timeserieschart/src/GeneralSettingsEditor.tsx @@ -40,7 +40,7 @@ export function TimeSeriesChartGeneralSettings(props: TimeSeriesChartOptionsEdit onChange( produce(value, (draft: TimeSeriesChartOptions) => { draft.legend = newLegend; - }) + }), ); }; @@ -48,7 +48,7 @@ export function TimeSeriesChartGeneralSettings(props: TimeSeriesChartOptionsEdit onChange( produce(value, (draft: TimeSeriesChartOptions) => { draft.visual = newVisual; - }) + }), ); }; @@ -56,7 +56,7 @@ export function TimeSeriesChartGeneralSettings(props: TimeSeriesChartOptionsEdit onChange( produce(value, (draft: TimeSeriesChartOptions) => { draft.yAxis = newYAxis; - }) + }), ); }; @@ -64,7 +64,7 @@ export function TimeSeriesChartGeneralSettings(props: TimeSeriesChartOptionsEdit onChange( produce(value, (draft: TimeSeriesChartOptions) => { draft.thresholds = thresholds; - }) + }), ); }; @@ -91,7 +91,7 @@ export function TimeSeriesChartGeneralSettings(props: TimeSeriesChartOptionsEdit draft.legend = undefined; draft.visual = undefined; draft.thresholds = undefined; - }) + }), ); }} > diff --git a/timeserieschart/src/QuerySettingsEditor.tsx b/timeserieschart/src/QuerySettingsEditor.tsx index 51a08f934..5547db4bf 100644 --- a/timeserieschart/src/QuerySettingsEditor.tsx +++ b/timeserieschart/src/QuerySettingsEditor.tsx @@ -54,7 +54,7 @@ export function QuerySettingsEditor(props: TimeSeriesChartOptionsEditorProps): R onChange( produce(value, (draft: TimeSeriesChartOptions) => { draft.querySettings = newQuerySettings; - }) + }), ); }; // Every time a new query settings input is added, we want to focus the recently added input @@ -74,7 +74,7 @@ export function QuerySettingsEditor(props: TimeSeriesChartOptionsEditorProps): R if (querySettings) { querySettings.queryIndex = parseInt(e.target.value); } - }) + }), ); } }; @@ -95,7 +95,7 @@ export function QuerySettingsEditor(props: TimeSeriesChartOptionsEditorProps): R } } } - }) + }), ); } }; @@ -110,7 +110,7 @@ export function QuerySettingsEditor(props: TimeSeriesChartOptionsEditorProps): R querySettings.colorValue = colorValue; } } - }) + }), ); } }; @@ -125,7 +125,7 @@ export function QuerySettingsEditor(props: TimeSeriesChartOptionsEditorProps): R querySettings.lineStyle = lineStyle as QuerySettingsOptions['lineStyle']; } } - }) + }), ); } }; @@ -141,7 +141,7 @@ export function QuerySettingsEditor(props: TimeSeriesChartOptionsEditorProps): R querySettings.areaOpacity = newValue; } } - }) + }), ); } }; @@ -155,7 +155,7 @@ export function QuerySettingsEditor(props: TimeSeriesChartOptionsEditorProps): R if (qs) { updater(qs); } - }) + }), ); } }; @@ -283,7 +283,7 @@ export function QuerySettingsEditor(props: TimeSeriesChartOptionsEditorProps): R handleQuerySettingsChange( produce(querySettingsList, (draft) => { draft.push(defaultQuerySettings); - }) + }), ); } }; diff --git a/timeserieschart/src/TimeSeriesChartBase.tsx b/timeserieschart/src/TimeSeriesChartBase.tsx index 4bc532f71..ef2f9a2f5 100644 --- a/timeserieschart/src/TimeSeriesChartBase.tsx +++ b/timeserieschart/src/TimeSeriesChartBase.tsx @@ -122,7 +122,7 @@ export const TimeSeriesChartBase = forwardRef(fun onDoubleClick, __experimentalEChartsOptionsOverride, }, - ref + ref, ) { const { chartsTheme, enablePinning, enableSyncGrouping, lastTooltipPinnedCoords, setLastTooltipPinnedCoords } = useChartsContext(); @@ -140,7 +140,7 @@ export const TimeSeriesChartBase = forwardRef(fun const getTimezoneAwareAxisFormatter = useCallback( (rangeMs: number): ((value: number) => string) => createTimezoneAwareAxisFormatter(rangeMs, timeZone), - [timeZone] + [timeZone], ); let timeScale: TimeScale; diff --git a/timeserieschart/src/TimeSeriesChartPanel.test.tsx b/timeserieschart/src/TimeSeriesChartPanel.test.tsx index 8d2a65366..9bfb7cb69 100644 --- a/timeserieschart/src/TimeSeriesChartPanel.test.tsx +++ b/timeserieschart/src/TimeSeriesChartPanel.test.tsx @@ -93,7 +93,7 @@ describe('TimeSeriesChartPanel', () => { /> - + , ); }; @@ -101,8 +101,8 @@ describe('TimeSeriesChartPanel', () => { renderPanel(); expect( await screen.findByText( - 'device="/dev/vda1", env="demo", fstype="ext4", instance="demo.do.prometheus.io:9100", job="node", mountpoint="/"' - ) + 'device="/dev/vda1", env="demo", fstype="ext4", instance="demo.do.prometheus.io:9100", job="node", mountpoint="/"', + ), ).toBeInTheDocument(); }); diff --git a/timeserieschart/src/TimeSeriesChartPanel.tsx b/timeserieschart/src/TimeSeriesChartPanel.tsx index f967029c1..195ec8c40 100644 --- a/timeserieschart/src/TimeSeriesChartPanel.tsx +++ b/timeserieschart/src/TimeSeriesChartPanel.tsx @@ -161,7 +161,7 @@ export function TimeSeriesChartPanel(props: TimeSeriesChartProps): ReactElement const annotations: TimeSeriesAnnotation[] = useMemo( () => convertAnnotationToTimeSeriesAnnotation(annotationsWithData), - [annotationsWithData] + [annotationsWithData], ); // Populate series data based on query results @@ -269,8 +269,8 @@ export function TimeSeriesChartPanel(props: TimeSeriesChartProps): ReactElement timeScale, seriesColor, querySettings, - yAxisIndex - ) + yAxisIndex, + ), ); // Store the format for this series for tooltip formatting @@ -431,7 +431,7 @@ export function TimeSeriesChartPanel(props: TimeSeriesChartProps): ReactElement return columns; }, - [] as Array> + [] as Array>, ); }, [legend?.values, format]); diff --git a/timeserieschart/src/VisualOptionsEditor.tsx b/timeserieschart/src/VisualOptionsEditor.tsx index 41c1f5cb7..efed36a34 100644 --- a/timeserieschart/src/VisualOptionsEditor.tsx +++ b/timeserieschart/src/VisualOptionsEditor.tsx @@ -45,7 +45,7 @@ export function VisualOptionsEditor({ value, onChange }: VisualOptionsEditorProp produce(value, (draft) => { draft.lineWidth = newValue; draft.pointRadius = symbolSize; - }) + }), ); }; @@ -54,7 +54,7 @@ export function VisualOptionsEditor({ value, onChange }: VisualOptionsEditorProp onChange( produce(value, (draft) => { draft.areaOpacity = newValue; - }) + }), ); }; diff --git a/timeserieschart/src/utils/data-transform.ts b/timeserieschart/src/utils/data-transform.ts index 810510ae1..d576e68b0 100644 --- a/timeserieschart/src/utils/data-transform.ts +++ b/timeserieschart/src/utils/data-transform.ts @@ -71,7 +71,7 @@ export function getTimeSeries( timeScale: TimeScale, paletteColor: string, querySettings?: { lineStyle?: LineStyleType; areaOpacity?: number; stack?: boolean }, - yAxisIndex?: number + yAxisIndex?: number, ): TimeSeriesOption { const lineWidth = visual.lineWidth ?? DEFAULT_LINE_WIDTH; const pointRadius = visual.pointRadius ?? DEFAULT_POINT_RADIUS; @@ -185,7 +185,7 @@ export function convertPercentThreshold( percent: number, data: LegacyTimeSeries[] | TimeSeries[], max?: number, - min?: number + min?: number, ): number { const percentDecimal = percent / 100; const adjustedMax = max ?? findMax(data); diff --git a/timeserieschart/src/utils/palette-gen.test.ts b/timeserieschart/src/utils/palette-gen.test.ts index c1bd6e687..f6650c76f 100644 --- a/timeserieschart/src/utils/palette-gen.test.ts +++ b/timeserieschart/src/utils/palette-gen.test.ts @@ -228,7 +228,7 @@ describe('getAutoPaletteColor', () => { it('should generate a unique color from the series name', () => { const generatedColor = getAutoPaletteColor( 'node_memory_Buffers_bytes{env="demo",instance="demo.do.prometheus.io:9100",job="node"}', - fallbackColor + fallbackColor, ); expect(generatedColor).toEqual('hsla(128.97,50%,35%,0.9)'); }); diff --git a/timeserieschart/src/utils/palette.ts b/timeserieschart/src/utils/palette.ts index 072a11db5..13ac6e9d3 100644 --- a/timeserieschart/src/utils/palette.ts +++ b/timeserieschart/src/utils/palette.ts @@ -49,7 +49,7 @@ export function getConsistentCategoricalColor( name: string, error: boolean, categoricalPalette: string[], - errorPalette: string[] + errorPalette: string[], ): string { const palette = error ? errorPalette : categoricalPalette; if (palette.length === 0) { diff --git a/timeseriestable/package.json b/timeseriestable/package.json index b61d38fd8..c1997b1a1 100644 --- a/timeseriestable/package.json +++ b/timeseriestable/package.json @@ -18,6 +18,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/timeseriestable/src/TimeSeriesTablePanel.test.tsx b/timeseriestable/src/TimeSeriesTablePanel.test.tsx index 3864374d8..199ceee6a 100644 --- a/timeseriestable/src/TimeSeriesTablePanel.test.tsx +++ b/timeseriestable/src/TimeSeriesTablePanel.test.tsx @@ -72,7 +72,7 @@ describe('TimeSeriesTablePanel', () => { - + , ); }; diff --git a/timeseriestable/src/components/DataTable.tsx b/timeseriestable/src/components/DataTable.tsx index 53f2257ac..c860add7d 100644 --- a/timeseriestable/src/components/DataTable.tsx +++ b/timeseriestable/src/components/DataTable.tsx @@ -74,7 +74,7 @@ export const DataTable = ({ queryResults, spec }: DataTableProps): ReactElement const itemActionsConfig = spec.actions ? (spec.actions as ActionOptions) : undefined; const itemActionsListConfig = useMemo( () => (itemActionsConfig?.enabled && itemActionsConfig.displayWithItem ? itemActionsConfig.actionsList : []), - [itemActionsConfig?.enabled, itemActionsConfig?.displayWithItem, itemActionsConfig?.actionsList] + [itemActionsConfig?.enabled, itemActionsConfig?.displayWithItem, itemActionsConfig?.actionsList], ); const { getItemActionButtons, confirmDialog, actionButtons } = useSelectionItemActions({ @@ -113,7 +113,7 @@ export const DataTable = ({ queryResults, spec }: DataTableProps): ReactElement const rowData = buildRowData(ts); toggleSelection(rowData, seriesIdx.toString()); }, - [toggleSelection] + [toggleSelection], ); // Memoize row data for stable references diff --git a/timeseriestable/src/components/SeriesName.tsx b/timeseriestable/src/components/SeriesName.tsx index 28bba9096..62de8ecd2 100644 --- a/timeseriestable/src/components/SeriesName.tsx +++ b/timeseriestable/src/components/SeriesName.tsx @@ -74,7 +74,7 @@ function FormatedSeriesName({ labels }: { labels: Labels }): ReactElement { > {label}="{labels[label]}" - + , ); if (first) { diff --git a/tracetable/package.json b/tracetable/package.json index 8ae000a38..66ac466d3 100644 --- a/tracetable/package.json +++ b/tracetable/package.json @@ -18,6 +18,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/tracetable/src/DataTable.tsx b/tracetable/src/DataTable.tsx index 3d05acd90..cf2bcf571 100644 --- a/tracetable/src/DataTable.tsx +++ b/tracetable/src/DataTable.tsx @@ -88,7 +88,7 @@ export function DataTable(props: DataTableProps): ReactElement { const paletteMode = options.visual?.palette?.mode; const serviceColorGenerator = useCallback( (serviceName: string) => getServiceColor(muiTheme, chartsTheme, paletteMode, serviceName), - [muiTheme, chartsTheme, paletteMode] + [muiTheme, chartsTheme, paletteMode], ); const rows: Row[] = useMemo(() => { @@ -134,7 +134,7 @@ export function DataTable(props: DataTableProps): ReactElement { setSelection(newSelection); } }, - [rowsById, setSelection, clearSelection] + [rowsById, setSelection, clearSelection], ); const columns = useMemo>>( @@ -241,7 +241,7 @@ export function DataTable(props: DataTableProps): ReactElement { ] : []), ], - [serviceColorGenerator, actionsList, getItemActionButtons, dateFormatter] + [serviceColorGenerator, actionsList, getItemActionButtons, dateFormatter], ); return ( diff --git a/tracetable/src/TraceTablePanel.test.tsx b/tracetable/src/TraceTablePanel.test.tsx index 41b8bb1b0..3e366c7a7 100644 --- a/tracetable/src/TraceTablePanel.test.tsx +++ b/tracetable/src/TraceTablePanel.test.tsx @@ -48,7 +48,7 @@ describe('TraceTablePanel', () => { - + , ); }; diff --git a/tracetable/src/utils/palette.ts b/tracetable/src/utils/palette.ts index 072a11db5..13ac6e9d3 100644 --- a/tracetable/src/utils/palette.ts +++ b/tracetable/src/utils/palette.ts @@ -49,7 +49,7 @@ export function getConsistentCategoricalColor( name: string, error: boolean, categoricalPalette: string[], - errorPalette: string[] + errorPalette: string[], ): string { const palette = error ? errorPalette : categoricalPalette; if (palette.length === 0) { diff --git a/tracetable/src/utils/utils.ts b/tracetable/src/utils/utils.ts index 0b30895e1..7d3f8e427 100644 --- a/tracetable/src/utils/utils.ts +++ b/tracetable/src/utils/utils.ts @@ -21,7 +21,7 @@ export function getServiceColor( chartsTheme: PersesChartsTheme, paletteMode: 'auto' | 'categorical' | undefined, serviceName: string, - error = false + error = false, ): string { switch (paletteMode) { case 'categorical': { diff --git a/tracingganttchart/package.json b/tracingganttchart/package.json index 4e831e892..aa6d6d401 100644 --- a/tracingganttchart/package.json +++ b/tracingganttchart/package.json @@ -18,6 +18,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/tracingganttchart/src/TracingGanttChart/DetailPane/Attributes.test.tsx b/tracingganttchart/src/TracingGanttChart/DetailPane/Attributes.test.tsx index c4f33f811..ca8c694de 100644 --- a/tracingganttchart/src/TracingGanttChart/DetailPane/Attributes.test.tsx +++ b/tracingganttchart/src/TracingGanttChart/DetailPane/Attributes.test.tsx @@ -40,7 +40,7 @@ describe('Attributes', () => { - + , ); }; @@ -58,7 +58,7 @@ describe('Attributes', () => { - + , ); }; @@ -117,7 +117,7 @@ describe('Attributes', () => { expect(screen.getByText('testing')).not.toHaveAttribute('href'); expect(screen.getByRole('link', { name: 'hotrod' })).toHaveAttribute( 'href', - '/console/ns/testing/pod/hotrod/detail' + '/console/ns/testing/pod/hotrod/detail', ); }); diff --git a/tracingganttchart/src/TracingGanttChart/DetailPane/SpanEvents.test.tsx b/tracingganttchart/src/TracingGanttChart/DetailPane/SpanEvents.test.tsx index 5050423e8..f929a28c0 100644 --- a/tracingganttchart/src/TracingGanttChart/DetailPane/SpanEvents.test.tsx +++ b/tracingganttchart/src/TracingGanttChart/DetailPane/SpanEvents.test.tsx @@ -39,7 +39,7 @@ describe('SpanEvents', () => { - + , ); }; diff --git a/tracingganttchart/src/TracingGanttChart/DetailPane/SpanLinks.test.tsx b/tracingganttchart/src/TracingGanttChart/DetailPane/SpanLinks.test.tsx index 268608ff3..07f99e451 100644 --- a/tracingganttchart/src/TracingGanttChart/DetailPane/SpanLinks.test.tsx +++ b/tracingganttchart/src/TracingGanttChart/DetailPane/SpanLinks.test.tsx @@ -40,7 +40,7 @@ describe('SpanLinks', () => { - + , ); }; @@ -68,7 +68,7 @@ describe('SpanLinks', () => { expect(screen.getByRole('link', { name: 'tid1' })).toHaveAttribute('href', '/datasource/tempods/trace/tid1'); expect(screen.getByRole('link', { name: 'sid1' })).toHaveAttribute( 'href', - '/datasource/tempods/trace/tid1?span=sid1' + '/datasource/tempods/trace/tid1?span=sid1', ); }); }); diff --git a/tracingganttchart/src/TracingGanttChart/GanttTable/GanttTable.test.tsx b/tracingganttchart/src/TracingGanttChart/GanttTable/GanttTable.test.tsx index 73e095334..8a09ebe91 100644 --- a/tracingganttchart/src/TracingGanttChart/GanttTable/GanttTable.test.tsx +++ b/tracingganttchart/src/TracingGanttChart/GanttTable/GanttTable.test.tsx @@ -33,7 +33,7 @@ describe('GanttTable', () => { - + , ); }; diff --git a/tracingganttchart/src/TracingGanttChart/GanttTable/SpanDuration.test.tsx b/tracingganttchart/src/TracingGanttChart/GanttTable/SpanDuration.test.tsx index 32494e602..2c8b9702f 100644 --- a/tracingganttchart/src/TracingGanttChart/GanttTable/SpanDuration.test.tsx +++ b/tracingganttchart/src/TracingGanttChart/GanttTable/SpanDuration.test.tsx @@ -29,7 +29,7 @@ describe('SpanDuration', () => { - + , ); }; diff --git a/tracingganttchart/src/TracingGanttChart/GanttTable/SpanIndents.tsx b/tracingganttchart/src/TracingGanttChart/GanttTable/SpanIndents.tsx index 9d4d30c74..9ab11b1f3 100644 --- a/tracingganttchart/src/TracingGanttChart/GanttTable/SpanIndents.tsx +++ b/tracingganttchart/src/TracingGanttChart/GanttTable/SpanIndents.tsx @@ -51,7 +51,7 @@ export function SpanIndents(props: SpanIndentsProps): ReactElement { return next; }); }, - [span, setCollapsedSpans] + [span, setCollapsedSpans], ); const handleIconMouseEnter = useCallback(() => { diff --git a/tracingganttchart/src/TracingGanttChart/GanttTable/SpanName.test.tsx b/tracingganttchart/src/TracingGanttChart/GanttTable/SpanName.test.tsx index 705b02a92..c6c98f514 100644 --- a/tracingganttchart/src/TracingGanttChart/GanttTable/SpanName.test.tsx +++ b/tracingganttchart/src/TracingGanttChart/GanttTable/SpanName.test.tsx @@ -26,7 +26,7 @@ describe('SpanName', () => { return render( - + , ); }; diff --git a/tracingganttchart/src/TracingGanttChart/MiniGanttChart/Canvas.tsx b/tracingganttchart/src/TracingGanttChart/MiniGanttChart/Canvas.tsx index 32a614c58..85a2ee895 100644 --- a/tracingganttchart/src/TracingGanttChart/MiniGanttChart/Canvas.tsx +++ b/tracingganttchart/src/TracingGanttChart/MiniGanttChart/Canvas.tsx @@ -54,7 +54,7 @@ export function Canvas(props: CanvasProps): ReactElement { const spanColorGenerator = useCallback( (span: Span) => getSpanColor(muiTheme, chartsTheme, options.visual?.palette?.mode, span), - [muiTheme, chartsTheme, options.visual?.palette?.mode] + [muiTheme, chartsTheme, options.visual?.palette?.mode], ); useEffect(() => { diff --git a/tracingganttchart/src/TracingGanttChart/MiniGanttChart/draw.ts b/tracingganttchart/src/TracingGanttChart/MiniGanttChart/draw.ts index 092e61b7a..851bdddaa 100644 --- a/tracingganttchart/src/TracingGanttChart/MiniGanttChart/draw.ts +++ b/tracingganttchart/src/TracingGanttChart/MiniGanttChart/draw.ts @@ -22,7 +22,7 @@ export function drawSpans( width: number, height: number, trace: Trace, - spanColorGenerator: (span: Span) => string + spanColorGenerator: (span: Span) => string, ): void { // calculate optimal height, enforce min and max bar height and finally round to an integer const numSpans = trace.spanById.size; @@ -43,7 +43,7 @@ export function drawSpans( Math.round(relativeStart * width), Math.round(y), Math.max(minSpanWidthPx, Math.round(relativeDuration * width)), - barHeight + barHeight, ); ctx.fill(); y += yChange; diff --git a/tracingganttchart/src/TracingGanttChart/Search.test.tsx b/tracingganttchart/src/TracingGanttChart/Search.test.tsx index a190424b5..7684d4b1c 100644 --- a/tracingganttchart/src/TracingGanttChart/Search.test.tsx +++ b/tracingganttchart/src/TracingGanttChart/Search.test.tsx @@ -93,7 +93,7 @@ describe('SearchBar', () => { return render( - + , ); }; diff --git a/tracingganttchart/src/TracingGanttChart/TraceHeaderBar.test.tsx b/tracingganttchart/src/TracingGanttChart/TraceHeaderBar.test.tsx index 3b3c32bd3..9fbc6899b 100644 --- a/tracingganttchart/src/TracingGanttChart/TraceHeaderBar.test.tsx +++ b/tracingganttchart/src/TracingGanttChart/TraceHeaderBar.test.tsx @@ -34,7 +34,7 @@ describe('TraceHeaderBar', () => { return render( - + , ); }; diff --git a/tracingganttchart/src/TracingGanttChart/TracingGanttChart.tsx b/tracingganttchart/src/TracingGanttChart/TracingGanttChart.tsx index 5a6f6dabb..9fee5041c 100644 --- a/tracingganttchart/src/TracingGanttChart/TracingGanttChart.tsx +++ b/tracingganttchart/src/TracingGanttChart/TracingGanttChart.tsx @@ -53,7 +53,7 @@ export function TracingGanttChart(props: TracingGanttChartProps): ReactElement { endTimeUnixMs: trace.endTimeUnixMs, }); const [selectedSpan, setSelectedSpan] = useState(() => - options.selectedSpanId ? trace.spanById.get(options.selectedSpanId) : undefined + options.selectedSpanId ? trace.spanById.get(options.selectedSpanId) : undefined, ); const search = useSpanSearch(trace); diff --git a/tracingganttchart/src/TracingGanttChart/palette.ts b/tracingganttchart/src/TracingGanttChart/palette.ts index 072a11db5..13ac6e9d3 100644 --- a/tracingganttchart/src/TracingGanttChart/palette.ts +++ b/tracingganttchart/src/TracingGanttChart/palette.ts @@ -49,7 +49,7 @@ export function getConsistentCategoricalColor( name: string, error: boolean, categoricalPalette: string[], - errorPalette: string[] + errorPalette: string[], ): string { const palette = error ? errorPalette : categoricalPalette; if (palette.length === 0) { diff --git a/tracingganttchart/src/TracingGanttChart/utils.ts b/tracingganttchart/src/TracingGanttChart/utils.ts index 736ccf7c4..7e21cb9a1 100644 --- a/tracingganttchart/src/TracingGanttChart/utils.ts +++ b/tracingganttchart/src/TracingGanttChart/utils.ts @@ -36,7 +36,7 @@ export function getServiceColor( chartsTheme: PersesChartsTheme, paletteMode: 'auto' | 'categorical' | undefined, serviceName: string, - error = false + error = false, ): string { switch (paletteMode) { case 'categorical': { @@ -55,7 +55,7 @@ export function getSpanColor( muiTheme: Theme, chartsTheme: PersesChartsTheme, paletteMode: 'auto' | 'categorical' | undefined, - span: Span + span: Span, ): string { return getServiceColor(muiTheme, chartsTheme, paletteMode, span.resource.serviceName ?? '', spanHasError(span)); } diff --git a/turbo.json b/turbo.json index 59dec158b..ecdd2f268 100644 --- a/turbo.json +++ b/turbo.json @@ -4,6 +4,15 @@ "build": {}, "test": {}, "lint": {}, + "lint:ci": {}, + "//#format:root": { + "cache": false, + "outputs": [] + }, + "//#format:root:check": { + "cache": false, + "outputs": [] + }, "type-check": {}, "dev": { "persistent": true, diff --git a/victorialogs/package.json b/victorialogs/package.json index 189d140c8..71159aa32 100644 --- a/victorialogs/package.json +++ b/victorialogs/package.json @@ -10,6 +10,7 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", + "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/victorialogs/src/datasources/victorialogs-datasource/VictoriaLogsDatasource.tsx b/victorialogs/src/datasources/victorialogs-datasource/VictoriaLogsDatasource.tsx index 94471d267..67caa4cc0 100644 --- a/victorialogs/src/datasources/victorialogs-datasource/VictoriaLogsDatasource.tsx +++ b/victorialogs/src/datasources/victorialogs-datasource/VictoriaLogsDatasource.tsx @@ -19,7 +19,7 @@ import { VictoriaLogsDatasourceEditor } from './VictoriaLogsDatasourceEditor'; const createClient: DatasourcePlugin['createClient'] = ( spec, - options + options, ) => { const { directUrl, proxy } = spec; const { proxyUrl } = options; diff --git a/victorialogs/src/model/client.ts b/victorialogs/src/model/client.ts index 132a406a4..8134d2d1c 100644 --- a/victorialogs/src/model/client.ts +++ b/victorialogs/src/model/client.ts @@ -55,19 +55,19 @@ export interface VictoriaLogsClient { }; streamQueryRange: ( params: VictoriaLogsStreamQueryRangeParams, - headers?: VictoriaLogsRequestHeaders + headers?: VictoriaLogsRequestHeaders, ) => Promise; statsQueryRange: ( params: VictoriaLogsStatsQueryRangeParams, - headers?: VictoriaLogsRequestHeaders + headers?: VictoriaLogsRequestHeaders, ) => Promise; fieldNames: ( params: VictoriaLogsFieldNamesParams, - headers?: VictoriaLogsRequestHeaders + headers?: VictoriaLogsRequestHeaders, ) => Promise; fieldValues: ( params: VictoriaLogsFieldValuesParams, - headers?: VictoriaLogsRequestHeaders + headers?: VictoriaLogsRequestHeaders, ) => Promise; } @@ -91,7 +91,7 @@ function buildUrl(path: string, datasourceUrl: string): URL { export async function streamQueryRange( params: VictoriaLogsStreamQueryRangeParams, - options: VictoriaLogsApiOptions + options: VictoriaLogsApiOptions, ): Promise { const url = buildUrl('/select/logsql/query', options.datasourceUrl); const postData: Record = { @@ -142,7 +142,7 @@ export async function streamQueryRange( export async function statsQueryRange( params: VictoriaLogsStatsQueryRangeParams, - options: VictoriaLogsApiOptions + options: VictoriaLogsApiOptions, ): Promise { const url = buildUrl('/select/logsql/stats_query_range', options.datasourceUrl); const postData: Record = { @@ -167,7 +167,7 @@ export async function statsQueryRange( export async function fieldNames( params: VictoriaLogsFieldNamesParams, - options: VictoriaLogsApiOptions + options: VictoriaLogsApiOptions, ): Promise { const url = buildUrl('/select/logsql/field_names', options.datasourceUrl); const postData: Record = { @@ -191,7 +191,7 @@ export async function fieldNames( export async function fieldValues( params: VictoriaLogsFieldValuesParams, - options: VictoriaLogsApiOptions + options: VictoriaLogsApiOptions, ): Promise { const url = buildUrl(`/select/logsql/field_values`, options.datasourceUrl); const postData: Record = { diff --git a/victorialogs/src/model/selectors.ts b/victorialogs/src/model/selectors.ts index 50d0341fd..c72237b68 100644 --- a/victorialogs/src/model/selectors.ts +++ b/victorialogs/src/model/selectors.ts @@ -23,13 +23,13 @@ export interface VictoriaLogsDatasourceSelector extends DatasourceSelector { export const DEFAULT_VICTORIALOGS: VictoriaLogsDatasourceSelector = { kind: VICTORIALOGS_DATASOURCE_KIND }; export function isDefaultVictoriaLogsSelector( - datasourceSelectValue: DatasourceSelectValue + datasourceSelectValue: DatasourceSelectValue, ): boolean { return !isVariableDatasource(datasourceSelectValue) && datasourceSelectValue.name === undefined; } export function isVictoriaLogsDatasourceSelector( - datasourceSelectValue: DatasourceSelectValue + datasourceSelectValue: DatasourceSelectValue, ): datasourceSelectValue is VictoriaLogsDatasourceSelector { return isVariableDatasource(datasourceSelectValue) || datasourceSelectValue.kind === VICTORIALOGS_DATASOURCE_KIND; } diff --git a/victorialogs/src/queries/victorialogs-log-query/VictoriaLogsLogQueryEditor.tsx b/victorialogs/src/queries/victorialogs-log-query/VictoriaLogsLogQueryEditor.tsx index e4f34d683..56ad347ec 100644 --- a/victorialogs/src/queries/victorialogs-log-query/VictoriaLogsLogQueryEditor.tsx +++ b/victorialogs/src/queries/victorialogs-log-query/VictoriaLogsLogQueryEditor.tsx @@ -35,7 +35,7 @@ export function VictoriaLogsLogQueryEditor(props: VictoriaLogsQueryEditorProps): const datasourceSelectValue = datasource ?? DEFAULT_DATASOURCE; const selectedDatasource = useDatasourceSelectValueToSelector( datasourceSelectValue, - VICTORIALOGS_DATASOURCE_KIND + VICTORIALOGS_DATASOURCE_KIND, ) as VictoriaLogsDatasourceSelector; // const { data: client } = useDatasourceClient(selectedDatasource); @@ -68,7 +68,7 @@ export function VictoriaLogsLogQueryEditor(props: VictoriaLogsQueryEditorProps): (query: string) => { onChange({ ...value, query }); }, - [onChange, value] + [onChange, value], ); return ( diff --git a/victorialogs/src/queries/victorialogs-log-query/query.ts b/victorialogs/src/queries/victorialogs-log-query/query.ts index bb38dd6d9..2d802bb36 100644 --- a/victorialogs/src/queries/victorialogs-log-query/query.ts +++ b/victorialogs/src/queries/victorialogs-log-query/query.ts @@ -40,7 +40,7 @@ function convertStreamToLogs(data: VictoriaLogsStreamQueryRangeResponse, default export const getVictoriaLogsLogData: LogQueryPlugin['getLogData'] = async ( spec: VictoriaLogsLogQuerySpec, - context: LogQueryContext + context: LogQueryContext, ) => { if (!spec.query) { return { @@ -51,7 +51,7 @@ export const getVictoriaLogsLogData: LogQueryPlugin['g const query = replaceVariables(spec.query, context.variableState); const client = (await context.datasourceStore.getDatasourceClient( - spec.datasource ?? DEFAULT_DATASOURCE + spec.datasource ?? DEFAULT_DATASOURCE, )) as VictoriaLogsClient; const { start, end } = context.timeRange; diff --git a/victorialogs/src/queries/victorialogs-log-query/types.test.ts b/victorialogs/src/queries/victorialogs-log-query/types.test.ts index 7b92444eb..3d45f9802 100644 --- a/victorialogs/src/queries/victorialogs-log-query/types.test.ts +++ b/victorialogs/src/queries/victorialogs-log-query/types.test.ts @@ -68,7 +68,7 @@ describe('VictoriaLogsLogQuery', () => { { query: '{service="$service", level="$level"} |= "error"', }, - createStubContext() + createStubContext(), ); expect(variables).toEqual(['service', 'level']); }); diff --git a/victorialogs/src/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQueryEditor.tsx b/victorialogs/src/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQueryEditor.tsx index 06f079ad5..87dbfbf81 100644 --- a/victorialogs/src/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQueryEditor.tsx +++ b/victorialogs/src/queries/victorialogs-time-series-query/VictoriaLogsTimeSeriesQueryEditor.tsx @@ -35,7 +35,7 @@ export function VictoriaLogsQueryEditor(props: VictoriaLogsQueryEditorProps): Re const datasourceSelectValue = datasource ?? DEFAULT_DATASOURCE; const selectedDatasource = useDatasourceSelectValueToSelector( datasourceSelectValue, - VICTORIALOGS_DATASOURCE_KIND + VICTORIALOGS_DATASOURCE_KIND, ) as VictoriaLogsDatasourceSelector; // Local state for editor value to prevent query_range calls on every keystroke @@ -65,7 +65,7 @@ export function VictoriaLogsQueryEditor(props: VictoriaLogsQueryEditorProps): Re (query: string) => { onChange({ ...value, query }); }, - [onChange, value] + [onChange, value], ); return ( diff --git a/victorialogs/src/queries/victorialogs-time-series-query/query.ts b/victorialogs/src/queries/victorialogs-time-series-query/query.ts index 876466652..741555e10 100644 --- a/victorialogs/src/queries/victorialogs-time-series-query/query.ts +++ b/victorialogs/src/queries/victorialogs-time-series-query/query.ts @@ -52,7 +52,7 @@ function getVictoriaLogsRangeStep( startMs: number, endMs: number, minStepSeconds = DEFAULT_MIN_STEP_SECONDS, - suggestedStepMs = 0 + suggestedStepMs = 0, ): number { const suggestedStepSeconds = suggestedStepMs / 1000; const querySeconds = (endMs - startMs) / 1000; @@ -119,7 +119,7 @@ export const getVictoriaLogsTimeSeriesData: TimeSeriesQueryPlugin( - spec.datasource ?? DEFAULT_DATASOURCE + spec.datasource ?? DEFAULT_DATASOURCE, )) as VictoriaLogsClient; const { start, end } = context.timeRange; @@ -131,7 +131,7 @@ export const getVictoriaLogsTimeSeriesData: TimeSeriesQueryPlugin { { query: 'rate({service="$service", instance="$instance"}[5m])', }, - createStubContext() + createStubContext(), ); expect(variables).toEqual(['service', 'instance']); }); diff --git a/victorialogs/src/variables/utils.ts b/victorialogs/src/variables/utils.ts index ece9caae4..74ed926d0 100644 --- a/victorialogs/src/variables/utils.ts +++ b/victorialogs/src/variables/utils.ts @@ -41,7 +41,7 @@ export function getVictoriaLogsTimeRange(timeRange: AbsoluteTimeRange): { start: export function useFieldNames( query: string, - datasource: DatasourceSelector + datasource: DatasourceSelector, ): UseQueryResult { const { absoluteTimeRange: { start, end }, @@ -65,7 +65,7 @@ export function useFieldNames( export function useFieldValues( field: string, query: string, - datasource: DatasourceSelector + datasource: DatasourceSelector, ): UseQueryResult { const { absoluteTimeRange: { start, end }, diff --git a/victorialogs/src/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariable.tsx b/victorialogs/src/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariable.tsx index b6f541e88..8753a921a 100644 --- a/victorialogs/src/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariable.tsx +++ b/victorialogs/src/variables/victorialogs-field-names/VictoriaLogsFieldNamesVariable.tsx @@ -31,7 +31,7 @@ export const VictoriaLogsFieldNamesVariable: VariablePlugin + props: OptionsEditorProps, ): ReactElement { const { onChange, @@ -42,7 +42,7 @@ export function VictoriaLogsFieldNamesVariableEditor( const datasourceSelectValue = datasource ?? DEFAULT_VICTORIALOGS; const selectedDatasource = useDatasourceSelectValueToSelector( datasourceSelectValue, - VICTORIALOGS_DATASOURCE_KIND + VICTORIALOGS_DATASOURCE_KIND, ) as VictoriaLogsDatasourceSelector; const handleDatasourceChange: DatasourceSelectProps['onChange'] = useCallback( (next) => { @@ -50,14 +50,14 @@ export function VictoriaLogsFieldNamesVariableEditor( onChange( produce(value, (draft) => { draft.datasource = !isVariableDatasource(next) && isDefaultVictoriaLogsSelector(next) ? undefined : next; - }) + }), ); return; } throw new Error('Got unexpected non-VictoriaLogs datasource selector'); }, - [onChange, value] + [onChange, value], ); const handleQueryChange = useCallback( @@ -65,10 +65,10 @@ export function VictoriaLogsFieldNamesVariableEditor( onChange( produce(value, (draft) => { draft.query = event.target.value; - }) + }), ); }, - [onChange, value] + [onChange, value], ); return ( diff --git a/victorialogs/src/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariable.tsx b/victorialogs/src/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariable.tsx index 27e800fb3..d4763c2a7 100644 --- a/victorialogs/src/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariable.tsx +++ b/victorialogs/src/variables/victorialogs-field-values/VictoriaLogsFieldValuesVariable.tsx @@ -31,7 +31,7 @@ export const VictoriaLogsFieldValuesVariable: VariablePlugin + props: OptionsEditorProps, ): ReactElement { const { onChange, @@ -42,7 +42,7 @@ export function VictoriaLogsFieldValuesVariableEditor( const datasourceSelectValue = datasource ?? DEFAULT_VICTORIALOGS; const selectedDatasource = useDatasourceSelectValueToSelector( datasourceSelectValue, - VICTORIALOGS_DATASOURCE_KIND + VICTORIALOGS_DATASOURCE_KIND, ) as VictoriaLogsDatasourceSelector; const { data: fieldNames, isLoading: isFieldNamesOptionsLoading } = useFieldNames(query, selectedDatasource); const handleDatasourceChange: DatasourceSelectProps['onChange'] = useCallback( @@ -52,14 +52,14 @@ export function VictoriaLogsFieldValuesVariableEditor( produce(value, (draft) => { // If they're using the default, just omit the datasource prop (i.e. set to undefined) draft.datasource = !isVariableDatasource(next) && isDefaultVictoriaLogsSelector(next) ? undefined : next; - }) + }), ); return; } throw new Error('Got unexpected non-VictoriaLogs datasource selector'); }, - [onChange, value] + [onChange, value], ); const handleQueryChange = useCallback( @@ -67,10 +67,10 @@ export function VictoriaLogsFieldValuesVariableEditor( onChange( produce(value, (draft) => { draft.query = event.target.value; - }) + }), ); }, - [onChange, value] + [onChange, value], ); const handleFieldChange = useCallback( @@ -78,10 +78,10 @@ export function VictoriaLogsFieldValuesVariableEditor( onChange( produce(value, (draft) => { draft.field = newValue || ''; - }) + }), ); }, - [onChange, value] + [onChange, value], ); const fieldNamesOptions = useMemo(() => { From a0b353e6d1dd443729c2483829835d28ff4cc9c7 Mon Sep 17 00:00:00 2001 From: Guillaume LADORME Date: Mon, 17 Aug 2026 14:59:41 +0200 Subject: [PATCH 6/7] Apply review feedbacks Signed-off-by: Guillaume LADORME --- .github/workflows/react.yml | 2 +- AGENTS.md | 2 +- STYLEGUIDE.md | 2 +- alertmanager/package.json | 1 - barchart/package.json | 1 - clickhouse/package.json | 1 - datasourcevariable/package.json | 1 - e2e/package.json | 2 +- flamechart/package.json | 1 - gaugechart/package.json | 1 - greptimedb/package.json | 1 - heatmapchart/package.json | 1 - histogramchart/package.json | 1 - jaeger/package.json | 1 - logexplorer/package.json | 1 - logstable/package.json | 1 - loki/package.json | 1 - markdown/package.json | 1 - opensearch/package.json | 1 - package.json | 1 - piechart/package.json | 1 - prometheus/package.json | 1 - pyroscope/package.json | 1 - scatterchart/package.json | 1 - splunk/package.json | 1 - statchart/package.json | 1 - staticlistvariable/package.json | 1 - statushistorychart/package.json | 1 - table/package.json | 1 - tempo/package.json | 1 - timeserieschart/package.json | 1 - timeseriestable/package.json | 1 - tracetable/package.json | 1 - tracingganttchart/package.json | 1 - turbo.json | 1 - victorialogs/package.json | 1 - 36 files changed, 4 insertions(+), 36 deletions(-) diff --git a/.github/workflows/react.yml b/.github/workflows/react.yml index 657ad1000..278d9bd61 100644 --- a/.github/workflows/react.yml +++ b/.github/workflows/react.yml @@ -18,7 +18,7 @@ jobs: with: enable_npm: true - run: npm ci - - run: npm run lint:ci + - run: npm run lint - run: npm run format:check test-npm: name: 'test-npm' diff --git a/AGENTS.md b/AGENTS.md index 0c10fa554..9258be0e6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -53,7 +53,7 @@ npm run test -w Before completion of a TypeScript change, run the relevant repository checks: ```sh -npm run lint:ci +npm run lint npm run format:check npm run type-check npm run test diff --git a/STYLEGUIDE.md b/STYLEGUIDE.md index 62624b2bc..8600e18d0 100644 --- a/STYLEGUIDE.md +++ b/STYLEGUIDE.md @@ -61,7 +61,7 @@ touch without expanding the task into unrelated cleanup. queries; use test IDs only as a last resort. - Use Playwright for critical end-to-end flows or browser behavior that unit/integration tests cannot cover. - Run a focused test while iterating, then the affected workspace's type-check and test commands. -- Before completion, run repository-level `npm run lint:ci`, `npm run format:check`, and `npm run type-check`. +- Before completion, run repository-level `npm run lint`, `npm run format:check`, and `npm run type-check`. - Oxfmt owns formatting and import sorting. Do not manually fight its output. - A lint suppression must be narrow, name the rule, and include a nearby explanation of why the exception is necessary. Do not enable type-aware linting or change lint configuration unless the task explicitly concerns repository tooling. diff --git a/alertmanager/package.json b/alertmanager/package.json index 2b0aa2e75..ae4e331da 100644 --- a/alertmanager/package.json +++ b/alertmanager/package.json @@ -19,7 +19,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/barchart/package.json b/barchart/package.json index 6bd359a37..a33174756 100644 --- a/barchart/package.json +++ b/barchart/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/clickhouse/package.json b/clickhouse/package.json index a030b0965..ba46e1932 100644 --- a/clickhouse/package.json +++ b/clickhouse/package.json @@ -10,7 +10,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/datasourcevariable/package.json b/datasourcevariable/package.json index 8009033df..f7d39a04e 100644 --- a/datasourcevariable/package.json +++ b/datasourcevariable/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest --passWithNoTests", "type-check": "tsc --noEmit" }, diff --git a/e2e/package.json b/e2e/package.json index a9ff32b51..15ea8084b 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -8,7 +8,7 @@ "test:install": "npx playwright install --with-deps", "test:local": "npx playwright test --ui", "build": "echo 'Skipping build for e2e tests'", - "lint:ci": "oxlint src" + "lint": "oxlint src" }, "devDependencies": { "@playwright/test": "^1.58.2", diff --git a/flamechart/package.json b/flamechart/package.json index 776ef215c..0e6a0386e 100644 --- a/flamechart/package.json +++ b/flamechart/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/gaugechart/package.json b/gaugechart/package.json index f7e46761b..c20fc7eaa 100644 --- a/gaugechart/package.json +++ b/gaugechart/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/greptimedb/package.json b/greptimedb/package.json index d0a350519..3817900e4 100644 --- a/greptimedb/package.json +++ b/greptimedb/package.json @@ -10,7 +10,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/heatmapchart/package.json b/heatmapchart/package.json index 662f2ea2d..2181726d8 100644 --- a/heatmapchart/package.json +++ b/heatmapchart/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/histogramchart/package.json b/histogramchart/package.json index 36a1e6a28..17c65732c 100644 --- a/histogramchart/package.json +++ b/histogramchart/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/jaeger/package.json b/jaeger/package.json index 48be586e2..3e5856281 100644 --- a/jaeger/package.json +++ b/jaeger/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/logexplorer/package.json b/logexplorer/package.json index 1cc9554de..8780e2229 100644 --- a/logexplorer/package.json +++ b/logexplorer/package.json @@ -17,7 +17,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest --passWithNoTests", "type-check": "tsc --noEmit" }, diff --git a/logstable/package.json b/logstable/package.json index 4e8268173..68d91c9fb 100644 --- a/logstable/package.json +++ b/logstable/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/loki/package.json b/loki/package.json index a5b8b4e55..728e724e2 100644 --- a/loki/package.json +++ b/loki/package.json @@ -10,7 +10,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/markdown/package.json b/markdown/package.json index 8deb59ca4..9d98b8365 100644 --- a/markdown/package.json +++ b/markdown/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest --passWithNoTests", "type-check": "tsc --noEmit" }, diff --git a/opensearch/package.json b/opensearch/package.json index 230d0d80b..cd08beccc 100644 --- a/opensearch/package.json +++ b/opensearch/package.json @@ -11,7 +11,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/package.json b/package.json index c6a27ea28..c82c51852 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,6 @@ "dev": "turbo run dev --concurrency 20", "build": "turbo run build", "lint": "turbo run lint", - "lint:ci": "turbo run lint:ci", "lint:fix": "turbo run lint -- --fix", "format": "turbo run format:root", "format:check": "turbo run format:root:check", diff --git a/piechart/package.json b/piechart/package.json index 6097f86a1..03d15b3be 100644 --- a/piechart/package.json +++ b/piechart/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/prometheus/package.json b/prometheus/package.json index 096f0b260..8b388036f 100644 --- a/prometheus/package.json +++ b/prometheus/package.json @@ -19,7 +19,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/pyroscope/package.json b/pyroscope/package.json index e4406ef87..f824b9639 100644 --- a/pyroscope/package.json +++ b/pyroscope/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/scatterchart/package.json b/scatterchart/package.json index 7ae15225c..8a8c87c1e 100644 --- a/scatterchart/package.json +++ b/scatterchart/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/splunk/package.json b/splunk/package.json index e48887988..c96ac0b0b 100644 --- a/splunk/package.json +++ b/splunk/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/statchart/package.json b/statchart/package.json index a5356c4b0..a699f1eac 100644 --- a/statchart/package.json +++ b/statchart/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/staticlistvariable/package.json b/staticlistvariable/package.json index f81cfb80f..d934bddaa 100644 --- a/staticlistvariable/package.json +++ b/staticlistvariable/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest --passWithNoTests", "type-check": "tsc --noEmit" }, diff --git a/statushistorychart/package.json b/statushistorychart/package.json index 10d267e6b..d14599731 100644 --- a/statushistorychart/package.json +++ b/statushistorychart/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/table/package.json b/table/package.json index 2165e5f75..a3e938146 100644 --- a/table/package.json +++ b/table/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/tempo/package.json b/tempo/package.json index 31229007a..7932c9f87 100644 --- a/tempo/package.json +++ b/tempo/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/timeserieschart/package.json b/timeserieschart/package.json index b16089f68..5da43354b 100644 --- a/timeserieschart/package.json +++ b/timeserieschart/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/timeseriestable/package.json b/timeseriestable/package.json index c1997b1a1..b61d38fd8 100644 --- a/timeseriestable/package.json +++ b/timeseriestable/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/tracetable/package.json b/tracetable/package.json index 66ac466d3..8ae000a38 100644 --- a/tracetable/package.json +++ b/tracetable/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/tracingganttchart/package.json b/tracingganttchart/package.json index aa6d6d401..4e831e892 100644 --- a/tracingganttchart/package.json +++ b/tracingganttchart/package.json @@ -18,7 +18,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, diff --git a/turbo.json b/turbo.json index ecdd2f268..25122ca1e 100644 --- a/turbo.json +++ b/turbo.json @@ -4,7 +4,6 @@ "build": {}, "test": {}, "lint": {}, - "lint:ci": {}, "//#format:root": { "cache": false, "outputs": [] diff --git a/victorialogs/package.json b/victorialogs/package.json index 71159aa32..189d140c8 100644 --- a/victorialogs/package.json +++ b/victorialogs/package.json @@ -10,7 +10,6 @@ "build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc", "build:types": "tsc --project tsconfig.build.json", "lint": "oxlint src", - "lint:ci": "oxlint src", "test": "cross-env LC_ALL=C TZ=UTC jest", "type-check": "tsc --noEmit" }, From 75ff24075bfa66c8ec60380f4ce4acc4699c6114 Mon Sep 17 00:00:00 2001 From: Guillaume LADORME Date: Mon, 17 Aug 2026 15:08:45 +0200 Subject: [PATCH 7/7] Apply review feedbacks Signed-off-by: Guillaume LADORME --- .github/instructions/ui.instructions.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .github/instructions/ui.instructions.md diff --git a/.github/instructions/ui.instructions.md b/.github/instructions/ui.instructions.md deleted file mode 100644 index be21f4766..000000000 --- a/.github/instructions/ui.instructions.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -applyTo: '**/*.ts,**/*.tsx' ---- - -Follow the TypeScript and React guidance in [`STYLEGUIDE.md`](../../STYLEGUIDE.md).