diff --git a/package.json b/package.json index 54b7c6873f8..6685ded8478 100644 --- a/package.json +++ b/package.json @@ -236,7 +236,7 @@ "tracelib": "1.0.1", "ts-jest": "29.2.5", "ts-node": "10.9.2", - "typescript": "5.5.4", + "typescript": "5.7.2", "webpack": "5.97.1", "webpack-assets-manifest": "^5.1.0", "webpack-cli": "6.0.1", diff --git a/packages/grafana-data/package.json b/packages/grafana-data/package.json index 1bbea75da76..60c77f8b3ce 100644 --- a/packages/grafana-data/package.json +++ b/packages/grafana-data/package.json @@ -78,7 +78,7 @@ "rollup-plugin-dts": "^6.1.1", "rollup-plugin-esbuild": "6.1.1", "rollup-plugin-node-externals": "^8.0.0", - "typescript": "5.5.4" + "typescript": "5.7.2" }, "peerDependencies": { "react": "^18.0.0", diff --git a/packages/grafana-data/src/transformations/transformers/nulls/nullInsertThreshold.ts b/packages/grafana-data/src/transformations/transformers/nulls/nullInsertThreshold.ts index 47411b7f3e7..59ff6b31438 100644 --- a/packages/grafana-data/src/transformations/transformers/nulls/nullInsertThreshold.ts +++ b/packages/grafana-data/src/transformations/transformers/nulls/nullInsertThreshold.ts @@ -61,7 +61,7 @@ export function applyNullInsertThreshold(opts: NullInsertOptions): DataFrame { if (uniqueThresholds.size === 1) { const threshold = uniqueThresholds.values().next().value; - if (threshold <= 0) { + if (!threshold || threshold <= 0) { return frame; } diff --git a/packages/grafana-data/src/vector/FunctionalVector.ts b/packages/grafana-data/src/vector/FunctionalVector.ts index bcd13d96090..f5ccfc7be8a 100644 --- a/packages/grafana-data/src/vector/FunctionalVector.ts +++ b/packages/grafana-data/src/vector/FunctionalVector.ts @@ -8,7 +8,7 @@ export abstract class FunctionalVector { abstract get(index: number): T; // Implement "iterator protocol" - *iterator() { + *iterator(): Generator { for (let i = 0; i < this.length; i++) { yield this.get(i); } diff --git a/packages/grafana-e2e-selectors/package.json b/packages/grafana-e2e-selectors/package.json index 21c3a138820..fb9a5974b8d 100644 --- a/packages/grafana-e2e-selectors/package.json +++ b/packages/grafana-e2e-selectors/package.json @@ -53,6 +53,6 @@ "@grafana/tsconfig": "^2.0.0", "semver": "7.6.3", "tslib": "2.8.1", - "typescript": "5.5.4" + "typescript": "5.7.2" } } diff --git a/packages/grafana-flamegraph/package.json b/packages/grafana-flamegraph/package.json index 6cd8d33f683..8f18327e355 100644 --- a/packages/grafana-flamegraph/package.json +++ b/packages/grafana-flamegraph/package.json @@ -82,7 +82,7 @@ "rollup-plugin-node-externals": "^8.0.0", "ts-jest": "29.2.5", "ts-node": "10.9.2", - "typescript": "5.5.4" + "typescript": "5.7.2" }, "peerDependencies": { "react": "^18.0.0", diff --git a/packages/grafana-icons/package.json b/packages/grafana-icons/package.json index 23c6c9f9775..6b0afdfbe50 100644 --- a/packages/grafana-icons/package.json +++ b/packages/grafana-icons/package.json @@ -58,7 +58,7 @@ "rollup-plugin-esbuild": "6.1.1", "rollup-plugin-node-externals": "8.0.0", "ts-node": "10.9.2", - "typescript": "5.5.4" + "typescript": "5.7.2" }, "peerDependencies": { "react": "^17.0.0 || ^18.0.0", diff --git a/packages/grafana-o11y-ds-frontend/package.json b/packages/grafana-o11y-ds-frontend/package.json index 4f924edf03c..4e23dd48506 100644 --- a/packages/grafana-o11y-ds-frontend/package.json +++ b/packages/grafana-o11y-ds-frontend/package.json @@ -43,7 +43,7 @@ "react": "18.2.0", "ts-jest": "29.2.5", "ts-node": "10.9.2", - "typescript": "5.5.4" + "typescript": "5.7.2" }, "peerDependencies": { "react": "^18.0.0", diff --git a/packages/grafana-plugin-configs/package.json b/packages/grafana-plugin-configs/package.json index 7c24400b001..c1fd649bc10 100644 --- a/packages/grafana-plugin-configs/package.json +++ b/packages/grafana-plugin-configs/package.json @@ -18,7 +18,7 @@ "glob": "11.0.0", "replace-in-file-webpack-plugin": "1.0.6", "swc-loader": "0.2.6", - "typescript": "5.5.4", + "typescript": "5.7.2", "webpack": "5.97.1", "webpack-bundle-analyzer": "^4.10.2" }, diff --git a/packages/grafana-prometheus/package.json b/packages/grafana-prometheus/package.json index f325b4c2f17..acda48112d1 100644 --- a/packages/grafana-prometheus/package.json +++ b/packages/grafana-prometheus/package.json @@ -134,7 +134,7 @@ "style-loader": "4.0.0", "testing-library-selector": "0.3.1", "ts-node": "10.9.2", - "typescript": "5.5.4", + "typescript": "5.7.2", "webpack": "5.97.1", "webpack-cli": "6.0.1" }, diff --git a/packages/grafana-runtime/package.json b/packages/grafana-runtime/package.json index 4ff842d5684..c929fb2e090 100644 --- a/packages/grafana-runtime/package.json +++ b/packages/grafana-runtime/package.json @@ -72,7 +72,7 @@ "rollup-plugin-esbuild": "6.1.1", "rollup-plugin-node-externals": "^8.0.0", "rollup-plugin-sourcemaps": "0.6.3", - "typescript": "5.5.4" + "typescript": "5.7.2" }, "peerDependencies": { "react": "^18.0.0", diff --git a/packages/grafana-schema/package.json b/packages/grafana-schema/package.json index 67d5f3bb0c1..379dcaba419 100644 --- a/packages/grafana-schema/package.json +++ b/packages/grafana-schema/package.json @@ -45,7 +45,7 @@ "rollup-plugin-dts": "^6.1.1", "rollup-plugin-esbuild": "6.1.1", "rollup-plugin-node-externals": "^8.0.0", - "typescript": "5.5.4" + "typescript": "5.7.2" }, "dependencies": { "tslib": "2.8.1" diff --git a/packages/grafana-sql/package.json b/packages/grafana-sql/package.json index bd7085154fa..5b91977d424 100644 --- a/packages/grafana-sql/package.json +++ b/packages/grafana-sql/package.json @@ -50,7 +50,7 @@ "jest": "^29.6.4", "ts-jest": "29.2.5", "ts-node": "10.9.2", - "typescript": "5.5.4" + "typescript": "5.7.2" }, "peerDependencies": { "@grafana/runtime": "10.4.0-pre" diff --git a/packages/grafana-ui/package.json b/packages/grafana-ui/package.json index 9fe9f688aad..32560eaff5d 100644 --- a/packages/grafana-ui/package.json +++ b/packages/grafana-ui/package.json @@ -182,7 +182,7 @@ "storybook": "^8.4.2", "storybook-dark-mode": "4.0.1", "style-loader": "4.0.0", - "typescript": "5.5.4", + "typescript": "5.7.2", "webpack": "5.97.1" }, "peerDependencies": { diff --git a/packages/grafana-ui/src/components/ButtonCascader/ButtonCascader.tsx b/packages/grafana-ui/src/components/ButtonCascader/ButtonCascader.tsx index cc09b8d840a..8939a2e2247 100644 --- a/packages/grafana-ui/src/components/ButtonCascader/ButtonCascader.tsx +++ b/packages/grafana-ui/src/components/ButtonCascader/ButtonCascader.tsx @@ -1,5 +1,5 @@ import { css, cx } from '@emotion/css'; -import RCCascader, { BaseOptionType } from 'rc-cascader'; +import RCCascader, { FieldNames } from 'rc-cascader'; import * as React from 'react'; import { GrafanaTheme2 } from '@grafana/data'; @@ -18,7 +18,7 @@ export interface ButtonCascaderProps { icon?: IconName; disabled?: boolean; value?: string[]; - fieldNames?: { label: keyof BaseOptionType; value: keyof BaseOptionType; children: keyof BaseOptionType }; + fieldNames?: FieldNames; loadData?: (selectedOptions: CascaderOption[]) => void; onChange?: (value: string[], selectedOptions: CascaderOption[]) => void; onPopupVisibleChange?: (visible: boolean) => void; diff --git a/packages/grafana-ui/src/components/FeatureBadge/FeatureBadge.tsx b/packages/grafana-ui/src/components/FeatureBadge/FeatureBadge.tsx index 87f79ff05bc..8ecd1d54528 100644 --- a/packages/grafana-ui/src/components/FeatureBadge/FeatureBadge.tsx +++ b/packages/grafana-ui/src/components/FeatureBadge/FeatureBadge.tsx @@ -2,7 +2,7 @@ import { FeatureState } from '@grafana/data'; import { Badge, BadgeProps } from '../Badge/Badge'; -interface FeatureBadgeProps { +export interface FeatureBadgeProps { featureState: FeatureState; tooltip?: string; } diff --git a/packages/grafana-ui/src/components/Forms/Legacy/Select/IndicatorsContainer.tsx b/packages/grafana-ui/src/components/Forms/Legacy/Select/IndicatorsContainer.tsx index 3297dab37dc..f2a5d450c6a 100644 --- a/packages/grafana-ui/src/components/Forms/Legacy/Select/IndicatorsContainer.tsx +++ b/packages/grafana-ui/src/components/Forms/Legacy/Select/IndicatorsContainer.tsx @@ -1,10 +1,12 @@ import { components, IndicatorsContainerProps } from 'react-select'; +import { SelectableValue } from '@grafana/data'; + import { Icon } from '../../../Icon/Icon'; import { Select } from '../../../Select/Select'; /** @deprecated Please use the {@link Select} component*/ -export const IndicatorsContainer = (props: IndicatorsContainerProps) => { +export const IndicatorsContainer = (props: IndicatorsContainerProps>) => { const isOpen = props.selectProps.menuIsOpen; return ( diff --git a/packages/grafana-ui/src/components/Forms/Legacy/Select/Select.tsx b/packages/grafana-ui/src/components/Forms/Legacy/Select/Select.tsx index f572ef55401..f82614eb9fa 100644 --- a/packages/grafana-ui/src/components/Forms/Legacy/Select/Select.tsx +++ b/packages/grafana-ui/src/components/Forms/Legacy/Select/Select.tsx @@ -246,6 +246,7 @@ export class AsyncSelect extends PureComponent> { //@ts-expect-error getOptionValue={getOptionValue} menuShouldScrollIntoView={false} + //@ts-expect-error onChange={onChange} loadOptions={loadOptions} isLoading={isLoading} diff --git a/packages/grafana-ui/src/components/ThemeDemos/EmotionPerfTest.tsx b/packages/grafana-ui/src/components/ThemeDemos/EmotionPerfTest.tsx index e01384205ac..4a38d9334b3 100644 --- a/packages/grafana-ui/src/components/ThemeDemos/EmotionPerfTest.tsx +++ b/packages/grafana-ui/src/components/ThemeDemos/EmotionPerfTest.tsx @@ -1,6 +1,5 @@ /* eslint-disable @grafana/no-untranslated-strings */ /** @jsxImportSource @emotion/react */ -/** @jsxRuntime classic */ import { css, cx } from '@emotion/css'; import classnames from 'classnames'; import React, { Profiler, ProfilerOnRenderCallback, useState, FC } from 'react'; diff --git a/packages/grafana-ui/src/graveyard/GraphNG/nullInsertThreshold.ts b/packages/grafana-ui/src/graveyard/GraphNG/nullInsertThreshold.ts index 9361a6bab8d..3ca5d3f5b6c 100644 --- a/packages/grafana-ui/src/graveyard/GraphNG/nullInsertThreshold.ts +++ b/packages/grafana-ui/src/graveyard/GraphNG/nullInsertThreshold.ts @@ -56,7 +56,7 @@ export function applyNullInsertThreshold(opts: NullInsertOptions): DataFrame { if (uniqueThresholds.size === 1) { const threshold = uniqueThresholds.values().next().value; - if (threshold <= 0) { + if (!threshold || threshold <= 0) { return frame; } diff --git a/public/app/features/admin/AdminFeatureTogglesPage.tsx b/public/app/features/admin/AdminFeatureTogglesPage.tsx index c24bb1712d9..a1bda57e72e 100644 --- a/public/app/features/admin/AdminFeatureTogglesPage.tsx +++ b/public/app/features/admin/AdminFeatureTogglesPage.tsx @@ -55,7 +55,7 @@ export default function AdminFeatureTogglesPage() { <> - {featureState.error} + {featureState.error?.message} {featureState.loading && 'Fetching feature toggles'} diff --git a/public/app/features/alerting/unified/components/contact-points/ContactPoints.tsx b/public/app/features/alerting/unified/components/contact-points/ContactPoints.tsx index c73d19f7952..5ea42c97584 100644 --- a/public/app/features/alerting/unified/components/contact-points/ContactPoints.tsx +++ b/public/app/features/alerting/unified/components/contact-points/ContactPoints.tsx @@ -128,8 +128,11 @@ const ContactPointsTab = () => { )} - {error && {stringifyErrorLike(error)}} - {!error && } + {error ? ( + {stringifyErrorLike(error)} + ) : ( + + )} {/* Grafana manager Alertmanager does not support global config, Mimir and Cortex do */} {!isGrafanaManagedAlertmanager && } {ExportDrawer} diff --git a/public/app/features/alerting/unified/rule-list/components/RuleGroup.tsx b/public/app/features/alerting/unified/rule-list/components/RuleGroup.tsx index 663625c0af2..42c12a08c59 100644 --- a/public/app/features/alerting/unified/rule-list/components/RuleGroup.tsx +++ b/public/app/features/alerting/unified/rule-list/components/RuleGroup.tsx @@ -51,26 +51,31 @@ export const EvaluationGroupLoader = ({ return ( - <> - {/* @TODO nicer error handling */} - {error && {String(error)}} - {isLoading ? ( - - ) : ( - pageItems.map((rule, index) => { - ; + {/* @TODO nicer error handling */} + {error ? ( + {String(error)} + ) : ( + <> + {isLoading ? ( + + ) : ( + pageItems.map((rule, index) => { + ; - return null; - }) - )} - {numberOfPages > 1 && } - + return null; + }) + )} + {numberOfPages > 1 && ( + + )} + + )} ); }; diff --git a/public/app/features/browse-dashboards/components/BrowseActions/DescendantCount.tsx b/public/app/features/browse-dashboards/components/BrowseActions/DescendantCount.tsx index 50a1de533a5..0a08e18c69a 100644 --- a/public/app/features/browse-dashboards/components/BrowseActions/DescendantCount.tsx +++ b/public/app/features/browse-dashboards/components/BrowseActions/DescendantCount.tsx @@ -14,13 +14,12 @@ export interface Props { export const DescendantCount = ({ selectedItems }: Props) => { const { data, isFetching, isLoading, error } = useGetAffectedItemsQuery(selectedItems); - return ( - <> - - {data && buildBreakdownString(data.folder, data.dashboard, data.libraryPanel, data.alertRule)} - {(isFetching || isLoading) && } - - {error && } - + return error ? ( + + ) : ( + + {data && buildBreakdownString(data.folder, data.dashboard, data.libraryPanel, data.alertRule)} + {(isFetching || isLoading) && } + ); }; diff --git a/public/app/features/explore/ExploreActions.tsx b/public/app/features/explore/ExploreActions.tsx index 74de59f09cf..de35e644b4e 100644 --- a/public/app/features/explore/ExploreActions.tsx +++ b/public/app/features/explore/ExploreActions.tsx @@ -39,7 +39,7 @@ export const ExploreActions = () => { }, section: exploreSection, }); - if ([panes[1]]) { + if (panes[1]) { // we should always have the right exploreId if split actionsArr.push({ id: 'explore/run-query-right', diff --git a/public/app/features/geo/format/geojson.ts b/public/app/features/geo/format/geojson.ts index f2969e098cd..c6f01dbfc44 100644 --- a/public/app/features/geo/format/geojson.ts +++ b/public/app/features/geo/format/geojson.ts @@ -122,5 +122,5 @@ function ensureSingleType(info: FieldInfo): FieldType { }); return FieldType.string; } - return info.types.values().next().value; + return info.types.values().next().value ?? FieldType.other; } diff --git a/public/app/plugins/datasource/azuremonitor/package.json b/public/app/plugins/datasource/azuremonitor/package.json index 03a2e75bc3b..4aba6186be4 100644 --- a/public/app/plugins/datasource/azuremonitor/package.json +++ b/public/app/plugins/datasource/azuremonitor/package.json @@ -39,7 +39,7 @@ "@types/react-dom": "18.2.25", "react-select-event": "5.5.1", "ts-node": "10.9.2", - "typescript": "5.5.4", + "typescript": "5.7.2", "webpack": "5.97.1" }, "peerDependencies": { diff --git a/public/app/plugins/datasource/cloud-monitoring/package.json b/public/app/plugins/datasource/cloud-monitoring/package.json index 75c7ad202ca..ba8da6659a6 100644 --- a/public/app/plugins/datasource/cloud-monitoring/package.json +++ b/public/app/plugins/datasource/cloud-monitoring/package.json @@ -41,7 +41,7 @@ "@types/react-dom": "18.2.25", "react-select-event": "5.5.1", "ts-node": "10.9.2", - "typescript": "5.5.4", + "typescript": "5.7.2", "webpack": "5.97.1" }, "peerDependencies": { diff --git a/public/app/plugins/datasource/cloudwatch/utils/datalinks.test.ts b/public/app/plugins/datasource/cloudwatch/utils/datalinks.test.ts index f2edcee007e..4be2304940a 100644 --- a/public/app/plugins/datasource/cloudwatch/utils/datalinks.test.ts +++ b/public/app/plugins/datasource/cloudwatch/utils/datalinks.test.ts @@ -55,7 +55,7 @@ describe('addDataLinksToLogsResponse', () => { mockResponse, mockOptions, (s) => s ?? '', - (v) => [v] ?? [], + (v) => [v], (r) => r, 'xrayUid' ); @@ -132,7 +132,7 @@ describe('addDataLinksToLogsResponse', () => { mockResponse, mockOptions, (s) => s ?? '', - (v) => [v] ?? [], + (v) => [v], (r) => r ); expect(mockResponse).toMatchObject({ @@ -189,7 +189,7 @@ describe('addDataLinksToLogsResponse', () => { mockResponse, mockOptions, (s) => s ?? '', - (v) => [v] ?? [], + (v) => [v], (r) => r ); expect(mockResponse).toMatchObject({ diff --git a/public/app/plugins/datasource/grafana-postgresql-datasource/package.json b/public/app/plugins/datasource/grafana-postgresql-datasource/package.json index 3a87516cf41..091200889b7 100644 --- a/public/app/plugins/datasource/grafana-postgresql-datasource/package.json +++ b/public/app/plugins/datasource/grafana-postgresql-datasource/package.json @@ -26,7 +26,7 @@ "@types/node": "22.10.5", "@types/react": "18.3.3", "ts-node": "10.9.2", - "typescript": "5.5.4", + "typescript": "5.7.2", "webpack": "5.97.1" }, "peerDependencies": { diff --git a/public/app/plugins/datasource/grafana-pyroscope-datasource/package.json b/public/app/plugins/datasource/grafana-pyroscope-datasource/package.json index 9aaafd844ca..57d0c410600 100644 --- a/public/app/plugins/datasource/grafana-pyroscope-datasource/package.json +++ b/public/app/plugins/datasource/grafana-pyroscope-datasource/package.json @@ -35,7 +35,7 @@ "jest": "29.7.0", "style-loader": "4.0.0", "ts-node": "10.9.2", - "typescript": "5.5.4", + "typescript": "5.7.2", "webpack": "5.97.1" }, "peerDependencies": { diff --git a/public/app/plugins/datasource/grafana-testdata-datasource/package.json b/public/app/plugins/datasource/grafana-testdata-datasource/package.json index da210d9c5d6..f8271769cd4 100644 --- a/public/app/plugins/datasource/grafana-testdata-datasource/package.json +++ b/public/app/plugins/datasource/grafana-testdata-datasource/package.json @@ -35,7 +35,7 @@ "@types/react-dom": "18.2.25", "@types/uuid": "10.0.0", "ts-node": "10.9.2", - "typescript": "5.5.4", + "typescript": "5.7.2", "webpack": "5.97.1" }, "peerDependencies": { diff --git a/public/app/plugins/datasource/jaeger/package.json b/public/app/plugins/datasource/jaeger/package.json index fb521291d92..c0cdfc3329a 100644 --- a/public/app/plugins/datasource/jaeger/package.json +++ b/public/app/plugins/datasource/jaeger/package.json @@ -37,7 +37,7 @@ "@types/react-window": "1.8.8", "@types/uuid": "10.0.0", "ts-node": "10.9.2", - "typescript": "5.5.4", + "typescript": "5.7.2", "webpack": "5.97.1" }, "peerDependencies": { diff --git a/public/app/plugins/datasource/mssql/package.json b/public/app/plugins/datasource/mssql/package.json index 78aa1285adf..581873c3800 100644 --- a/public/app/plugins/datasource/mssql/package.json +++ b/public/app/plugins/datasource/mssql/package.json @@ -26,7 +26,7 @@ "@types/node": "22.10.5", "@types/react": "18.3.3", "ts-node": "10.9.2", - "typescript": "5.5.4", + "typescript": "5.7.2", "webpack": "5.97.1" }, "peerDependencies": { diff --git a/public/app/plugins/datasource/mysql/package.json b/public/app/plugins/datasource/mysql/package.json index 934fd7f4339..26a69a86b67 100644 --- a/public/app/plugins/datasource/mysql/package.json +++ b/public/app/plugins/datasource/mysql/package.json @@ -26,7 +26,7 @@ "@types/node": "22.10.5", "@types/react": "18.3.3", "ts-node": "10.9.2", - "typescript": "5.5.4", + "typescript": "5.7.2", "webpack": "5.97.1" }, "peerDependencies": { diff --git a/public/app/plugins/datasource/parca/package.json b/public/app/plugins/datasource/parca/package.json index 092d439e065..d69f56ad257 100644 --- a/public/app/plugins/datasource/parca/package.json +++ b/public/app/plugins/datasource/parca/package.json @@ -27,7 +27,7 @@ "@types/react": "18.3.3", "@types/react-dom": "18.2.25", "ts-node": "10.9.2", - "typescript": "5.5.4", + "typescript": "5.7.2", "webpack": "5.97.1" }, "peerDependencies": { diff --git a/public/app/plugins/datasource/tempo/package.json b/public/app/plugins/datasource/tempo/package.json index f939feba489..86d652969af 100644 --- a/public/app/plugins/datasource/tempo/package.json +++ b/public/app/plugins/datasource/tempo/package.json @@ -55,7 +55,7 @@ "glob": "11.0.0", "react-select-event": "5.5.1", "ts-node": "10.9.2", - "typescript": "5.5.4", + "typescript": "5.7.2", "webpack": "5.97.1" }, "peerDependencies": { diff --git a/public/app/plugins/datasource/zipkin/package.json b/public/app/plugins/datasource/zipkin/package.json index 33c2ba27b98..8c62b2f52b0 100644 --- a/public/app/plugins/datasource/zipkin/package.json +++ b/public/app/plugins/datasource/zipkin/package.json @@ -30,7 +30,7 @@ "@types/react": "18.3.3", "@types/react-dom": "18.2.25", "ts-node": "10.9.2", - "typescript": "5.5.4", + "typescript": "5.7.2", "webpack": "5.97.1" }, "peerDependencies": { diff --git a/public/app/plugins/panel/canvas/migrations.test.ts b/public/app/plugins/panel/canvas/migrations.test.ts index 366b27d1717..0a1354b2ae0 100644 --- a/public/app/plugins/panel/canvas/migrations.test.ts +++ b/public/app/plugins/panel/canvas/migrations.test.ts @@ -1,14 +1,11 @@ -import { FieldConfigSource, OneClickMode, PanelModel } from '@grafana/data'; +import { OneClickMode, PanelModel } from '@grafana/data'; import { canvasMigrationHandler } from './migrations'; describe('Canvas migration', () => { - let prevFieldConfig: FieldConfigSource; - it('should migrate renamed options', () => { const panel = { type: 'canvas', - fieldConfig: prevFieldConfig, options: { root: { elements: [ diff --git a/public/app/plugins/panel/graph/Legend/Legend.tsx b/public/app/plugins/panel/graph/Legend/Legend.tsx index 6c527552eb6..10174b96379 100644 --- a/public/app/plugins/panel/graph/Legend/Legend.tsx +++ b/public/app/plugins/panel/graph/Legend/Legend.tsx @@ -92,7 +92,7 @@ export class GraphLegend extends PureComponent { } sortLegend() { - let seriesList: TimeSeries[] = [...this.props.seriesList] || []; + let seriesList: TimeSeries[] = [...this.props.seriesList]; const sortBy = this.props.sort; if (sortBy && this.props[sortBy] && this.props.alignAsTable) { seriesList = _sortBy(seriesList, (series) => { diff --git a/scripts/webpack/webpack.common.js b/scripts/webpack/webpack.common.js index 8da51b2e202..de89b00ccb1 100644 --- a/scripts/webpack/webpack.common.js +++ b/scripts/webpack/webpack.common.js @@ -26,9 +26,6 @@ module.exports = { // some of data source plugins use global Prism object to add the language definition // we want to have same Prism object in core and in grafana/ui prismjs: require.resolve('prismjs'), - // some sub-dependencies use a different version of @emotion/react and generate warnings - // in the browser about @emotion/react loaded twice. We want to only load it once - '@emotion/react': require.resolve('@emotion/react'), // due to our webpack configuration not understanding package.json `exports` // correctly we must alias this package to the correct file // the alternative to this alias is to copy-paste the file into our diff --git a/yarn.lock b/yarn.lock index 68281bba0b3..623ef8e4d2b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2877,7 +2877,7 @@ __metadata: rxjs: "npm:7.8.1" ts-node: "npm:10.9.2" tslib: "npm:2.8.1" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" webpack: "npm:5.97.1" peerDependencies: "@grafana/runtime": "*" @@ -2908,7 +2908,7 @@ __metadata: rxjs: "npm:7.8.1" ts-node: "npm:10.9.2" tslib: "npm:2.8.1" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" webpack: "npm:5.97.1" peerDependencies: "@grafana/runtime": "*" @@ -2948,7 +2948,7 @@ __metadata: style-loader: "npm:4.0.0" ts-node: "npm:10.9.2" tslib: "npm:2.8.1" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" webpack: "npm:5.97.1" peerDependencies: "@grafana/runtime": "*" @@ -2987,7 +2987,7 @@ __metadata: rxjs: "npm:7.8.1" ts-node: "npm:10.9.2" tslib: "npm:2.8.1" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" uuid: "npm:11.0.4" webpack: "npm:5.97.1" peerDependencies: @@ -3029,7 +3029,7 @@ __metadata: stream-browserify: "npm:3.0.0" ts-node: "npm:10.9.2" tslib: "npm:2.8.1" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" uuid: "npm:11.0.4" webpack: "npm:5.97.1" peerDependencies: @@ -3061,7 +3061,7 @@ __metadata: rxjs: "npm:7.8.1" ts-node: "npm:10.9.2" tslib: "npm:2.8.1" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" webpack: "npm:5.97.1" peerDependencies: "@grafana/runtime": "*" @@ -3092,7 +3092,7 @@ __metadata: rxjs: "npm:7.8.1" ts-node: "npm:10.9.2" tslib: "npm:2.8.1" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" webpack: "npm:5.97.1" peerDependencies: "@grafana/runtime": "*" @@ -3124,7 +3124,7 @@ __metadata: rxjs: "npm:7.8.1" ts-node: "npm:10.9.2" tslib: "npm:2.8.1" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" webpack: "npm:5.97.1" peerDependencies: "@grafana/runtime": "*" @@ -3170,7 +3170,7 @@ __metadata: rxjs: "npm:7.8.1" ts-node: "npm:10.9.2" tslib: "npm:2.8.1" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" webpack: "npm:5.97.1" peerDependencies: "@grafana/runtime": "*" @@ -3229,7 +3229,7 @@ __metadata: string_decoder: "npm:1.3.0" ts-node: "npm:10.9.2" tslib: "npm:2.8.1" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" uuid: "npm:11.0.4" webpack: "npm:5.97.1" peerDependencies: @@ -3265,7 +3265,7 @@ __metadata: rxjs: "npm:7.8.1" ts-node: "npm:10.9.2" tslib: "npm:2.8.1" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" webpack: "npm:5.97.1" peerDependencies: "@grafana/runtime": "*" @@ -3344,7 +3344,7 @@ __metadata: string-hash: "npm:^1.1.3" tinycolor2: "npm:1.6.0" tslib: "npm:2.8.1" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" uplot: "npm:1.6.31" xss: "npm:^1.0.14" peerDependencies: @@ -3369,7 +3369,7 @@ __metadata: rollup-plugin-node-externals: "npm:^8.0.0" semver: "npm:7.6.3" tslib: "npm:2.8.1" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" languageName: unknown linkType: soft @@ -3515,7 +3515,7 @@ __metadata: ts-jest: "npm:29.2.5" ts-node: "npm:10.9.2" tslib: "npm:2.8.1" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 @@ -3589,7 +3589,7 @@ __metadata: ts-jest: "npm:29.2.5" ts-node: "npm:10.9.2" tslib: "npm:2.8.1" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 @@ -3612,7 +3612,7 @@ __metadata: replace-in-file-webpack-plugin: "npm:1.0.6" swc-loader: "npm:0.2.6" tslib: "npm:2.8.1" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" webpack: "npm:5.97.1" webpack-bundle-analyzer: "npm:^4.10.2" languageName: unknown @@ -3760,7 +3760,7 @@ __metadata: testing-library-selector: "npm:0.3.1" ts-node: "npm:10.9.2" tslib: "npm:2.8.1" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" uuid: "npm:11.0.4" webpack: "npm:5.97.1" webpack-cli: "npm:6.0.1" @@ -3807,7 +3807,7 @@ __metadata: rollup-plugin-sourcemaps: "npm:0.6.3" rxjs: "npm:7.8.1" tslib: "npm:2.8.1" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 @@ -3842,7 +3842,7 @@ __metadata: rollup-plugin-esbuild: "npm:6.1.1" rollup-plugin-node-externals: "npm:8.0.0" ts-node: "npm:10.9.2" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" peerDependencies: react: ^17.0.0 || ^18.0.0 react-dom: ^17.0.0 || ^18.0.0 @@ -3905,7 +3905,7 @@ __metadata: rollup-plugin-esbuild: "npm:6.1.1" rollup-plugin-node-externals: "npm:^8.0.0" tslib: "npm:2.8.1" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" languageName: unknown linkType: soft @@ -3946,7 +3946,7 @@ __metadata: ts-jest: "npm:29.2.5" ts-node: "npm:10.9.2" tslib: "npm:2.8.1" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" uuid: "npm:11.0.4" peerDependencies: "@grafana/runtime": 10.4.0-pre @@ -4096,7 +4096,7 @@ __metadata: style-loader: "npm:4.0.0" tinycolor2: "npm:1.6.0" tslib: "npm:2.8.1" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" uplot: "npm:1.6.31" uuid: "npm:11.0.4" webpack: "npm:5.97.1" @@ -17928,7 +17928,7 @@ __metadata: tslib: "npm:2.8.1" tween-functions: "npm:^1.2.0" type-fest: "npm:^4.18.2" - typescript: "npm:5.5.4" + typescript: "npm:5.7.2" uplot: "npm:1.6.31" uuid: "npm:11.0.4" visjs-network: "npm:4.25.0" @@ -29958,7 +29958,7 @@ __metadata: languageName: node linkType: hard -"typescript@npm:>=2.7, typescript@npm:>=3 < 6, typescript@npm:^5.0.4, typescript@npm:^5.4.5, typescript@npm:^5.5.4": +"typescript@npm:5.7.2, typescript@npm:>=2.7, typescript@npm:>=3 < 6, typescript@npm:^5.0.4, typescript@npm:^5.4.5, typescript@npm:^5.5.4": version: 5.7.2 resolution: "typescript@npm:5.7.2" bin: @@ -29978,7 +29978,7 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@npm%3A>=2.7#optional!builtin, typescript@patch:typescript@npm%3A>=3 < 6#optional!builtin, typescript@patch:typescript@npm%3A^5.0.4#optional!builtin, typescript@patch:typescript@npm%3A^5.4.5#optional!builtin, typescript@patch:typescript@npm%3A^5.5.4#optional!builtin": +"typescript@patch:typescript@npm%3A5.7.2#optional!builtin, typescript@patch:typescript@npm%3A>=2.7#optional!builtin, typescript@patch:typescript@npm%3A>=3 < 6#optional!builtin, typescript@patch:typescript@npm%3A^5.0.4#optional!builtin, typescript@patch:typescript@npm%3A^5.4.5#optional!builtin, typescript@patch:typescript@npm%3A^5.5.4#optional!builtin": version: 5.7.2 resolution: "typescript@patch:typescript@npm%3A5.7.2#optional!builtin::version=5.7.2&hash=5786d5" bin: