Update dependency typescript to v5.7.2 (#93749)
* Update dependency typescript to v5.7.2 * typescript fixes * don't need this change * remaining typescript fixes * remove emotion/react aliasing --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
This commit is contained in:
co-authored by
Ashley Harrison
parent
6b03adbbb0
commit
e0121055fb
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ export abstract class FunctionalVector<T = unknown> {
|
||||
abstract get(index: number): T;
|
||||
|
||||
// Implement "iterator protocol"
|
||||
*iterator() {
|
||||
*iterator(): Generator<T> {
|
||||
for (let i = 0; i < this.length; i++) {
|
||||
yield this.get(i);
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
},
|
||||
|
||||
@@ -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"
|
||||
},
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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<CascaderOption, keyof CascaderOption>;
|
||||
loadData?: (selectedOptions: CascaderOption[]) => void;
|
||||
onChange?: (value: string[], selectedOptions: CascaderOption[]) => void;
|
||||
onPopupVisibleChange?: (visible: boolean) => void;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { FeatureState } from '@grafana/data';
|
||||
|
||||
import { Badge, BadgeProps } from '../Badge/Badge';
|
||||
|
||||
interface FeatureBadgeProps {
|
||||
export interface FeatureBadgeProps {
|
||||
featureState: FeatureState;
|
||||
tooltip?: string;
|
||||
}
|
||||
|
||||
@@ -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 = <T,>(props: IndicatorsContainerProps<SelectableValue<T>>) => {
|
||||
const isOpen = props.selectProps.menuIsOpen;
|
||||
return (
|
||||
<components.IndicatorsContainer {...props}>
|
||||
|
||||
@@ -246,6 +246,7 @@ export class AsyncSelect<T> extends PureComponent<AsyncProps<T>> {
|
||||
//@ts-expect-error
|
||||
getOptionValue={getOptionValue}
|
||||
menuShouldScrollIntoView={false}
|
||||
//@ts-expect-error
|
||||
onChange={onChange}
|
||||
loadOptions={loadOptions}
|
||||
isLoading={isLoading}
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user