Update dependency @types/lodash to v4.17.1 (#87419)
* Update dependency @types/lodash to v4.17.1 * fix grafana-data * simpler grafana-data fix * simpler code * commit a betterer crime (it was already doing this implicitly before...) --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com> Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
This commit is contained in:
co-authored by
Gábor Farkas
Ashley Harrison
parent
39aafde8cb
commit
0793a9033a
+3
-5
@@ -108,9 +108,6 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Do not use any type assertions.", "7"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "8"]
|
||||
],
|
||||
"packages/grafana-data/src/datetime/rangeutil.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"packages/grafana-data/src/events/EventBus.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
||||
@@ -3652,8 +3649,9 @@ exports[`better eslint`] = {
|
||||
"public/app/plugins/datasource/cloud-monitoring/datasource.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "3"]
|
||||
[0, 0, 0, "Do not use any type assertions.", "2"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "4"]
|
||||
],
|
||||
"public/app/plugins/datasource/cloud-monitoring/functions.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
|
||||
+1
-1
@@ -116,7 +116,7 @@
|
||||
"@types/jquery": "3.5.30",
|
||||
"@types/js-yaml": "^4.0.5",
|
||||
"@types/jsurl": "^1.2.28",
|
||||
"@types/lodash": "4.17.0",
|
||||
"@types/lodash": "4.17.1",
|
||||
"@types/logfmt": "^1.2.3",
|
||||
"@types/lucene": "^2",
|
||||
"@types/mousetrap": "1.6.15",
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
"@rollup/plugin-node-resolve": "15.2.3",
|
||||
"@types/dompurify": "^3.0.0",
|
||||
"@types/history": "4.7.11",
|
||||
"@types/lodash": "4.17.0",
|
||||
"@types/lodash": "4.17.1",
|
||||
"@types/node": "20.12.11",
|
||||
"@types/papaparse": "5.3.14",
|
||||
"@types/react": "18.2.79",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { each, has } from 'lodash';
|
||||
import { each } from 'lodash';
|
||||
|
||||
import { RawTimeRange, TimeRange, TimeZone, IntervalValues, RelativeTimeRange, TimeOption } from '../types/time';
|
||||
|
||||
@@ -298,7 +298,7 @@ export function calculateInterval(range: TimeRange, resolution: number, lowLimit
|
||||
|
||||
const interval_regex = /(-?\d+(?:\.\d+)?)(ms|[Mwdhmsy])/;
|
||||
// histogram & trends
|
||||
const intervals_in_seconds = {
|
||||
const intervals_in_seconds: Record<string, number> = {
|
||||
y: 31536000,
|
||||
M: 2592000,
|
||||
w: 604800,
|
||||
@@ -320,15 +320,24 @@ export function describeInterval(str: string) {
|
||||
}
|
||||
|
||||
const matches = str.match(interval_regex);
|
||||
if (!matches || !has(intervals_in_seconds, matches[2])) {
|
||||
if (!matches) {
|
||||
throw new Error(
|
||||
`Invalid interval string, has to be either unit-less or end with one of the following units: "${Object.keys(
|
||||
intervals_in_seconds
|
||||
).join(', ')}"`
|
||||
);
|
||||
}
|
||||
|
||||
const sec = intervals_in_seconds[matches[2]];
|
||||
if (sec === undefined) {
|
||||
// this can never happen, because above we
|
||||
// already made sure the key is correct,
|
||||
// but we handle it to be safe.
|
||||
throw new Error('describeInterval failed: invalid interval string');
|
||||
}
|
||||
|
||||
return {
|
||||
sec: intervals_in_seconds[matches[2] as keyof typeof intervals_in_seconds],
|
||||
sec,
|
||||
type: matches[2],
|
||||
count: parseInt(matches[1], 10),
|
||||
};
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
"@testing-library/user-event": "14.5.2",
|
||||
"@types/d3": "^7",
|
||||
"@types/jest": "^29.5.4",
|
||||
"@types/lodash": "4.17.0",
|
||||
"@types/lodash": "4.17.1",
|
||||
"@types/node": "20.12.11",
|
||||
"@types/react": "18.2.79",
|
||||
"@types/react-virtualized-auto-sizer": "1.0.4",
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
"@types/eslint": "8.56.10",
|
||||
"@types/jest": "29.5.12",
|
||||
"@types/jquery": "3.5.30",
|
||||
"@types/lodash": "4.17.0",
|
||||
"@types/lodash": "4.17.1",
|
||||
"@types/node": "20.12.11",
|
||||
"@types/pluralize": "^0.0.33",
|
||||
"@types/prismjs": "1.26.4",
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
"@types/angular": "1.8.9",
|
||||
"@types/history": "4.7.11",
|
||||
"@types/jest": "29.5.12",
|
||||
"@types/lodash": "4.17.0",
|
||||
"@types/lodash": "4.17.1",
|
||||
"@types/react": "18.2.79",
|
||||
"@types/react-dom": "18.2.25",
|
||||
"@types/systemjs": "6.13.5",
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"@testing-library/react-hooks": "^8.0.1",
|
||||
"@testing-library/user-event": "14.5.2",
|
||||
"@types/jest": "^29.5.4",
|
||||
"@types/lodash": "4.17.0",
|
||||
"@types/lodash": "4.17.1",
|
||||
"@types/node": "20.12.11",
|
||||
"@types/react": "18.2.79",
|
||||
"@types/react-dom": "18.2.25",
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
"@types/is-hotkey": "0.1.10",
|
||||
"@types/jest": "29.5.12",
|
||||
"@types/jquery": "3.5.30",
|
||||
"@types/lodash": "4.17.0",
|
||||
"@types/lodash": "4.17.1",
|
||||
"@types/mock-raf": "1.0.6",
|
||||
"@types/node": "20.12.11",
|
||||
"@types/prismjs": "1.26.4",
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"@testing-library/react": "15.0.2",
|
||||
"@testing-library/user-event": "14.5.2",
|
||||
"@types/jest": "29.5.12",
|
||||
"@types/lodash": "4.17.0",
|
||||
"@types/lodash": "4.17.1",
|
||||
"@types/node": "20.12.11",
|
||||
"@types/prismjs": "1.26.4",
|
||||
"@types/react": "18.2.79",
|
||||
|
||||
@@ -256,7 +256,7 @@ export default class CloudMonitoringDatasource extends DataSourceWithBackend<
|
||||
}
|
||||
|
||||
if (has(query, 'metricQuery') && ['metrics', QueryType.ANNOTATION].includes(query.queryType ?? '')) {
|
||||
const metricQuery: MetricQuery = get(query, 'metricQuery')!;
|
||||
const metricQuery = get(query, 'metricQuery') as MetricQuery;
|
||||
if (metricQuery.editorMode === 'mql') {
|
||||
query.timeSeriesQuery = {
|
||||
projectName: metricQuery.projectName,
|
||||
@@ -288,7 +288,10 @@ export default class CloudMonitoringDatasource extends DataSourceWithBackend<
|
||||
}
|
||||
|
||||
if (query.queryType === QueryType.SLO && has(query, 'sloQuery.aliasBy')) {
|
||||
query.aliasBy = get(query, 'sloQuery.aliasBy');
|
||||
const sloQuery = get(query, 'sloQuery.aliasBy');
|
||||
if (typeof sloQuery === 'string') {
|
||||
query.aliasBy = sloQuery;
|
||||
}
|
||||
query = omit(query, 'sloQuery.aliasBy');
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"@testing-library/user-event": "14.5.2",
|
||||
"@types/debounce-promise": "3.1.9",
|
||||
"@types/jest": "29.5.12",
|
||||
"@types/lodash": "4.17.0",
|
||||
"@types/lodash": "4.17.1",
|
||||
"@types/node": "20.12.11",
|
||||
"@types/prismjs": "1.26.4",
|
||||
"@types/react": "18.2.79",
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"@testing-library/react": "15.0.2",
|
||||
"@testing-library/user-event": "14.5.2",
|
||||
"@types/jest": "29.5.12",
|
||||
"@types/lodash": "4.17.0",
|
||||
"@types/lodash": "4.17.1",
|
||||
"@types/node": "20.12.11",
|
||||
"@types/react": "18.2.79",
|
||||
"@types/testing-library__jest-dom": "5.14.9",
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
"@testing-library/react": "15.0.2",
|
||||
"@testing-library/user-event": "14.5.2",
|
||||
"@types/jest": "29.5.12",
|
||||
"@types/lodash": "4.17.0",
|
||||
"@types/lodash": "4.17.1",
|
||||
"@types/node": "20.12.11",
|
||||
"@types/prismjs": "1.26.4",
|
||||
"@types/react": "18.2.79",
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
"@testing-library/user-event": "14.5.2",
|
||||
"@types/d3-random": "^3.0.2",
|
||||
"@types/jest": "29.5.12",
|
||||
"@types/lodash": "4.17.0",
|
||||
"@types/lodash": "4.17.1",
|
||||
"@types/node": "20.12.11",
|
||||
"@types/react": "18.2.79",
|
||||
"@types/react-dom": "18.2.25",
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
"@testing-library/react": "15.0.2",
|
||||
"@testing-library/user-event": "14.5.2",
|
||||
"@types/jest": "29.5.12",
|
||||
"@types/lodash": "4.17.0",
|
||||
"@types/lodash": "4.17.1",
|
||||
"@types/logfmt": "^1.2.3",
|
||||
"@types/node": "20.12.11",
|
||||
"@types/react": "18.2.79",
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"@testing-library/react": "15.0.2",
|
||||
"@testing-library/user-event": "14.5.2",
|
||||
"@types/jest": "29.5.12",
|
||||
"@types/lodash": "4.17.0",
|
||||
"@types/lodash": "4.17.1",
|
||||
"@types/node": "20.12.11",
|
||||
"@types/react": "18.2.79",
|
||||
"@types/testing-library__jest-dom": "5.14.9",
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
"@testing-library/dom": "10.0.0",
|
||||
"@testing-library/react": "15.0.2",
|
||||
"@testing-library/user-event": "14.5.2",
|
||||
"@types/lodash": "4.17.0",
|
||||
"@types/lodash": "4.17.1",
|
||||
"@types/node": "20.12.11",
|
||||
"@types/react": "18.2.79",
|
||||
"@types/react-dom": "18.2.25",
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
"@testing-library/react": "15.0.2",
|
||||
"@testing-library/user-event": "14.5.2",
|
||||
"@types/jest": "29.5.12",
|
||||
"@types/lodash": "4.17.0",
|
||||
"@types/lodash": "4.17.1",
|
||||
"@types/node": "20.12.11",
|
||||
"@types/prismjs": "1.26.4",
|
||||
"@types/react": "18.2.79",
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"@testing-library/jest-dom": "6.4.2",
|
||||
"@testing-library/react": "15.0.2",
|
||||
"@types/jest": "29.5.12",
|
||||
"@types/lodash": "4.17.0",
|
||||
"@types/lodash": "4.17.1",
|
||||
"@types/node": "20.12.11",
|
||||
"@types/react": "18.2.79",
|
||||
"@types/react-dom": "18.2.25",
|
||||
|
||||
@@ -3006,7 +3006,7 @@ __metadata:
|
||||
"@testing-library/react": "npm:15.0.2"
|
||||
"@testing-library/user-event": "npm:14.5.2"
|
||||
"@types/jest": "npm:29.5.12"
|
||||
"@types/lodash": "npm:4.17.0"
|
||||
"@types/lodash": "npm:4.17.1"
|
||||
"@types/node": "npm:20.12.11"
|
||||
"@types/prismjs": "npm:1.26.4"
|
||||
"@types/react": "npm:18.2.79"
|
||||
@@ -3048,7 +3048,7 @@ __metadata:
|
||||
"@testing-library/react": "npm:15.0.2"
|
||||
"@testing-library/user-event": "npm:14.5.2"
|
||||
"@types/jest": "npm:29.5.12"
|
||||
"@types/lodash": "npm:4.17.0"
|
||||
"@types/lodash": "npm:4.17.1"
|
||||
"@types/node": "npm:20.12.11"
|
||||
"@types/react": "npm:18.2.79"
|
||||
"@types/testing-library__jest-dom": "npm:5.14.9"
|
||||
@@ -3079,7 +3079,7 @@ __metadata:
|
||||
"@testing-library/react": "npm:15.0.2"
|
||||
"@testing-library/user-event": "npm:14.5.2"
|
||||
"@types/jest": "npm:29.5.12"
|
||||
"@types/lodash": "npm:4.17.0"
|
||||
"@types/lodash": "npm:4.17.1"
|
||||
"@types/node": "npm:20.12.11"
|
||||
"@types/prismjs": "npm:1.26.4"
|
||||
"@types/react": "npm:18.2.79"
|
||||
@@ -3122,7 +3122,7 @@ __metadata:
|
||||
"@testing-library/user-event": "npm:14.5.2"
|
||||
"@types/d3-random": "npm:^3.0.2"
|
||||
"@types/jest": "npm:29.5.12"
|
||||
"@types/lodash": "npm:4.17.0"
|
||||
"@types/lodash": "npm:4.17.1"
|
||||
"@types/node": "npm:20.12.11"
|
||||
"@types/react": "npm:18.2.79"
|
||||
"@types/react-dom": "npm:18.2.25"
|
||||
@@ -3163,7 +3163,7 @@ __metadata:
|
||||
"@testing-library/react": "npm:15.0.2"
|
||||
"@testing-library/user-event": "npm:14.5.2"
|
||||
"@types/jest": "npm:29.5.12"
|
||||
"@types/lodash": "npm:4.17.0"
|
||||
"@types/lodash": "npm:4.17.1"
|
||||
"@types/logfmt": "npm:^1.2.3"
|
||||
"@types/node": "npm:20.12.11"
|
||||
"@types/react": "npm:18.2.79"
|
||||
@@ -3203,7 +3203,7 @@ __metadata:
|
||||
"@testing-library/react": "npm:15.0.2"
|
||||
"@testing-library/user-event": "npm:14.5.2"
|
||||
"@types/jest": "npm:29.5.12"
|
||||
"@types/lodash": "npm:4.17.0"
|
||||
"@types/lodash": "npm:4.17.1"
|
||||
"@types/node": "npm:20.12.11"
|
||||
"@types/react": "npm:18.2.79"
|
||||
"@types/testing-library__jest-dom": "npm:5.14.9"
|
||||
@@ -3232,7 +3232,7 @@ __metadata:
|
||||
"@testing-library/dom": "npm:10.0.0"
|
||||
"@testing-library/react": "npm:15.0.2"
|
||||
"@testing-library/user-event": "npm:14.5.2"
|
||||
"@types/lodash": "npm:4.17.0"
|
||||
"@types/lodash": "npm:4.17.1"
|
||||
"@types/node": "npm:20.12.11"
|
||||
"@types/react": "npm:18.2.79"
|
||||
"@types/react-dom": "npm:18.2.25"
|
||||
@@ -3269,7 +3269,7 @@ __metadata:
|
||||
"@testing-library/user-event": "npm:14.5.2"
|
||||
"@types/debounce-promise": "npm:3.1.9"
|
||||
"@types/jest": "npm:29.5.12"
|
||||
"@types/lodash": "npm:4.17.0"
|
||||
"@types/lodash": "npm:4.17.1"
|
||||
"@types/node": "npm:20.12.11"
|
||||
"@types/prismjs": "npm:1.26.4"
|
||||
"@types/react": "npm:18.2.79"
|
||||
@@ -3325,7 +3325,7 @@ __metadata:
|
||||
"@testing-library/react": "npm:15.0.2"
|
||||
"@testing-library/user-event": "npm:14.5.2"
|
||||
"@types/jest": "npm:29.5.12"
|
||||
"@types/lodash": "npm:4.17.0"
|
||||
"@types/lodash": "npm:4.17.1"
|
||||
"@types/node": "npm:20.12.11"
|
||||
"@types/prismjs": "npm:1.26.4"
|
||||
"@types/react": "npm:18.2.79"
|
||||
@@ -3374,7 +3374,7 @@ __metadata:
|
||||
"@testing-library/jest-dom": "npm:6.4.2"
|
||||
"@testing-library/react": "npm:15.0.2"
|
||||
"@types/jest": "npm:29.5.12"
|
||||
"@types/lodash": "npm:4.17.0"
|
||||
"@types/lodash": "npm:4.17.1"
|
||||
"@types/node": "npm:20.12.11"
|
||||
"@types/react": "npm:18.2.79"
|
||||
"@types/react-dom": "npm:18.2.25"
|
||||
@@ -3423,7 +3423,7 @@ __metadata:
|
||||
"@types/d3-interpolate": "npm:^3.0.0"
|
||||
"@types/dompurify": "npm:^3.0.0"
|
||||
"@types/history": "npm:4.7.11"
|
||||
"@types/lodash": "npm:4.17.0"
|
||||
"@types/lodash": "npm:4.17.1"
|
||||
"@types/node": "npm:20.12.11"
|
||||
"@types/papaparse": "npm:5.3.14"
|
||||
"@types/react": "npm:18.2.79"
|
||||
@@ -3612,7 +3612,7 @@ __metadata:
|
||||
"@testing-library/user-event": "npm:14.5.2"
|
||||
"@types/d3": "npm:^7"
|
||||
"@types/jest": "npm:^29.5.4"
|
||||
"@types/lodash": "npm:4.17.0"
|
||||
"@types/lodash": "npm:4.17.1"
|
||||
"@types/node": "npm:20.12.11"
|
||||
"@types/react": "npm:18.2.79"
|
||||
"@types/react-virtualized-auto-sizer": "npm:1.0.4"
|
||||
@@ -3783,7 +3783,7 @@ __metadata:
|
||||
"@types/eslint": "npm:8.56.10"
|
||||
"@types/jest": "npm:29.5.12"
|
||||
"@types/jquery": "npm:3.5.30"
|
||||
"@types/lodash": "npm:4.17.0"
|
||||
"@types/lodash": "npm:4.17.1"
|
||||
"@types/node": "npm:20.12.11"
|
||||
"@types/pluralize": "npm:^0.0.33"
|
||||
"@types/prismjs": "npm:1.26.4"
|
||||
@@ -3879,7 +3879,7 @@ __metadata:
|
||||
"@types/angular": "npm:1.8.9"
|
||||
"@types/history": "npm:4.7.11"
|
||||
"@types/jest": "npm:29.5.12"
|
||||
"@types/lodash": "npm:4.17.0"
|
||||
"@types/lodash": "npm:4.17.1"
|
||||
"@types/react": "npm:18.2.79"
|
||||
"@types/react-dom": "npm:18.2.25"
|
||||
"@types/systemjs": "npm:6.13.5"
|
||||
@@ -3994,7 +3994,7 @@ __metadata:
|
||||
"@testing-library/react-hooks": "npm:^8.0.1"
|
||||
"@testing-library/user-event": "npm:14.5.2"
|
||||
"@types/jest": "npm:^29.5.4"
|
||||
"@types/lodash": "npm:4.17.0"
|
||||
"@types/lodash": "npm:4.17.1"
|
||||
"@types/node": "npm:20.12.11"
|
||||
"@types/react": "npm:18.2.79"
|
||||
"@types/react-dom": "npm:18.2.25"
|
||||
@@ -4082,7 +4082,7 @@ __metadata:
|
||||
"@types/is-hotkey": "npm:0.1.10"
|
||||
"@types/jest": "npm:29.5.12"
|
||||
"@types/jquery": "npm:3.5.30"
|
||||
"@types/lodash": "npm:4.17.0"
|
||||
"@types/lodash": "npm:4.17.1"
|
||||
"@types/mock-raf": "npm:1.0.6"
|
||||
"@types/node": "npm:20.12.11"
|
||||
"@types/prismjs": "npm:1.26.4"
|
||||
@@ -9698,10 +9698,10 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/lodash@npm:*, @types/lodash@npm:4.17.0, @types/lodash@npm:^4.14.167, @types/lodash@npm:^4.14.172":
|
||||
version: 4.17.0
|
||||
resolution: "@types/lodash@npm:4.17.0"
|
||||
checksum: 10/2053203292b5af99352d108656ceb15d39da5922fc3fb8186e1552d65c82d6e545372cc97f36c95873aa7186404d59d9305e9d49254d4ae55e77df1e27ab7b5d
|
||||
"@types/lodash@npm:*, @types/lodash@npm:4.17.1, @types/lodash@npm:^4.14.167, @types/lodash@npm:^4.14.172":
|
||||
version: 4.17.1
|
||||
resolution: "@types/lodash@npm:4.17.1"
|
||||
checksum: 10/384bdd29348a000f8e815f94839a1a8c7f5a4ca856b016ade7f2abdc1df0b4e3e009c113b69db320a8fde51d1f38e60c19462b9bf3e82e0e2e32d3ac3e7ba2c4
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -18211,7 +18211,7 @@ __metadata:
|
||||
"@types/jquery": "npm:3.5.30"
|
||||
"@types/js-yaml": "npm:^4.0.5"
|
||||
"@types/jsurl": "npm:^1.2.28"
|
||||
"@types/lodash": "npm:4.17.0"
|
||||
"@types/lodash": "npm:4.17.1"
|
||||
"@types/logfmt": "npm:^1.2.3"
|
||||
"@types/lucene": "npm:^2"
|
||||
"@types/mousetrap": "npm:1.6.15"
|
||||
|
||||
Reference in New Issue
Block a user