From afeb0fc79237dc3902fcb554aff7f621be448882 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 11:59:47 +0100 Subject: [PATCH] Update dependency @types/testing-library__jest-dom to v6 (#94607) * Update dependency @types/testing-library__jest-dom to v6 * remove package and fix types * don't include setupTests in the build tsconfig * exclude testUtils --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Ashley Harrison --- package.json | 1 - .../grafana-o11y-ds-frontend/package.json | 1 - .../grafana-o11y-ds-frontend/tsconfig.json | 8 +++- packages/grafana-prometheus/package.json | 1 - .../grafana-prometheus/tsconfig.build.json | 10 ++++- packages/grafana-prometheus/tsconfig.json | 8 +++- packages/grafana-runtime/tsconfig.build.json | 2 +- packages/grafana-runtime/tsconfig.json | 6 ++- packages/grafana-sql/package.json | 1 - packages/grafana-ui/package.json | 1 - packages/grafana-ui/tsconfig.build.json | 3 +- packages/grafana-ui/tsconfig.json | 3 +- .../explore/Graph/useStructureRev.test.ts | 9 +++++ .../datasource/azuremonitor/package.json | 1 - .../datasource/cloud-monitoring/package.json | 1 - .../package.json | 1 - .../grafana-pyroscope-datasource/package.json | 1 - .../grafana-testdata-datasource/package.json | 1 - .../app/plugins/datasource/mssql/package.json | 1 - .../app/plugins/datasource/mysql/package.json | 1 - yarn.lock | 40 ++++++++----------- 21 files changed, 58 insertions(+), 43 deletions(-) diff --git a/package.json b/package.json index 3906936e8b0..f691dac08e4 100644 --- a/package.json +++ b/package.json @@ -147,7 +147,6 @@ "@types/slate-react": "0.22.9", "@types/swagger-ui-react": "4.18.3", "@types/systemjs": "6.15.1", - "@types/testing-library__jest-dom": "5.14.9", "@types/tinycolor2": "1.4.6", "@types/uuid": "9.0.8", "@types/webpack-assets-manifest": "^5", diff --git a/packages/grafana-o11y-ds-frontend/package.json b/packages/grafana-o11y-ds-frontend/package.json index c39ead5fc09..fccdca8b264 100644 --- a/packages/grafana-o11y-ds-frontend/package.json +++ b/packages/grafana-o11y-ds-frontend/package.json @@ -39,7 +39,6 @@ "@types/node": "20.16.11", "@types/react": "18.3.3", "@types/systemjs": "6.15.1", - "@types/testing-library__jest-dom": "5.14.9", "jest": "^29.6.4", "react": "18.2.0", "ts-jest": "29.2.5", diff --git a/packages/grafana-o11y-ds-frontend/tsconfig.json b/packages/grafana-o11y-ds-frontend/tsconfig.json index 0092e86ac62..9ea9008b40c 100644 --- a/packages/grafana-o11y-ds-frontend/tsconfig.json +++ b/packages/grafana-o11y-ds-frontend/tsconfig.json @@ -5,9 +5,15 @@ "declarationDir": "./compiled", "emitDeclarationOnly": true, "isolatedModules": true, + "allowJs": true, "rootDirs": ["."] }, "exclude": ["dist/**/*"], "extends": "@grafana/tsconfig", - "include": ["src/**/*.ts*", "../../public/app/types/*.d.ts", "../grafana-ui/src/types/*.d.ts"] + "include": [ + "../../public/test/setupTests.ts", + "../../public/app/types/*.d.ts", + "../grafana-ui/src/types/*.d.ts", + "src/**/*.ts*" + ] } diff --git a/packages/grafana-prometheus/package.json b/packages/grafana-prometheus/package.json index f0da22c686a..d77b2d269a8 100644 --- a/packages/grafana-prometheus/package.json +++ b/packages/grafana-prometheus/package.json @@ -100,7 +100,6 @@ "@types/react-highlight-words": "0.20.0", "@types/react-window": "1.8.8", "@types/semver": "7.5.8", - "@types/testing-library__jest-dom": "5.14.9", "@types/uuid": "9.0.8", "@typescript-eslint/eslint-plugin": "6.21.0", "@typescript-eslint/parser": "6.21.0", diff --git a/packages/grafana-prometheus/tsconfig.build.json b/packages/grafana-prometheus/tsconfig.build.json index 21935cc3eb7..e26e8b407af 100644 --- a/packages/grafana-prometheus/tsconfig.build.json +++ b/packages/grafana-prometheus/tsconfig.build.json @@ -1,4 +1,12 @@ { - "exclude": ["dist", "node_modules", "__mocks__", "test", "**/*.test.ts*"], + "exclude": [ + "dist", + "node_modules", + "__mocks__", + "test", + "**/*.test.ts*", + "src/querybuilder/testUtils.ts", + "../../public/test/setupTests.ts" + ], "extends": "./tsconfig.json" } diff --git a/packages/grafana-prometheus/tsconfig.json b/packages/grafana-prometheus/tsconfig.json index 403dfb14d23..169e37aca11 100644 --- a/packages/grafana-prometheus/tsconfig.json +++ b/packages/grafana-prometheus/tsconfig.json @@ -5,9 +5,15 @@ "declarationDir": "./compiled", "emitDeclarationOnly": true, "isolatedModules": true, + "allowJs": true, "rootDirs": ["."] }, "exclude": ["dist/**/*"], "extends": "@grafana/tsconfig", - "include": ["src/**/*.ts*", "../../public/app/types/*.d.ts", "../grafana-ui/src/types/*.d.ts"] + "include": [ + "../../public/test/setupTests.ts", + "../../public/app/types/*.d.ts", + "../grafana-ui/src/types/*.d.ts", + "src/**/*.ts*" + ] } diff --git a/packages/grafana-runtime/tsconfig.build.json b/packages/grafana-runtime/tsconfig.build.json index 9ec189c28ea..12aedca702c 100644 --- a/packages/grafana-runtime/tsconfig.build.json +++ b/packages/grafana-runtime/tsconfig.build.json @@ -1,4 +1,4 @@ { - "exclude": ["dist", "node_modules", "**/*.test.ts*"], + "exclude": ["dist", "node_modules", "**/*.test.ts*", "../../public/test/setupTests.ts"], "extends": "./tsconfig.json" } diff --git a/packages/grafana-runtime/tsconfig.json b/packages/grafana-runtime/tsconfig.json index 8dc5fe6ffb8..72d79fbd453 100644 --- a/packages/grafana-runtime/tsconfig.json +++ b/packages/grafana-runtime/tsconfig.json @@ -5,14 +5,16 @@ "declarationDir": "./compiled", "emitDeclarationOnly": true, "isolatedModules": true, + "allowJs": true, "rootDirs": ["."] }, "exclude": ["dist/**/*"], "extends": "@grafana/tsconfig", "include": [ - "src/**/*.ts*", + "../../public/test/setupTests.ts", "../../public/app/types/jquery/*.ts", "../../public/app/types/*.d.ts", - "../grafana-ui/src/types/*.d.ts" + "../grafana-ui/src/types/*.d.ts", + "src/**/*.ts*" ] } diff --git a/packages/grafana-sql/package.json b/packages/grafana-sql/package.json index 7a6b260f2cc..ea4da0b7bcb 100644 --- a/packages/grafana-sql/package.json +++ b/packages/grafana-sql/package.json @@ -47,7 +47,6 @@ "@types/react-dom": "18.2.25", "@types/react-virtualized-auto-sizer": "1.0.4", "@types/systemjs": "6.15.1", - "@types/testing-library__jest-dom": "5.14.9", "@types/uuid": "9.0.8", "jest": "^29.6.4", "ts-jest": "29.2.5", diff --git a/packages/grafana-ui/package.json b/packages/grafana-ui/package.json index 15f9e089187..cd5c3844e7a 100644 --- a/packages/grafana-ui/package.json +++ b/packages/grafana-ui/package.json @@ -158,7 +158,6 @@ "@types/slate": "0.47.11", "@types/slate-plain-serializer": "0.7.5", "@types/slate-react": "0.22.9", - "@types/testing-library__jest-dom": "5.14.9", "@types/tinycolor2": "1.4.6", "@types/uuid": "9.0.8", "chance": "1.1.12", diff --git a/packages/grafana-ui/tsconfig.build.json b/packages/grafana-ui/tsconfig.build.json index 291f5a514af..c652850c045 100644 --- a/packages/grafana-ui/tsconfig.build.json +++ b/packages/grafana-ui/tsconfig.build.json @@ -12,7 +12,8 @@ "**/*.tmpl.ts", "dist", "node_modules", - "src/utils/storybook" + "src/utils/storybook", + "../../public/test/setupTests.ts" ], "extends": "./tsconfig.json" } diff --git a/packages/grafana-ui/tsconfig.json b/packages/grafana-ui/tsconfig.json index 7601a6e1e18..86bc266e6ae 100644 --- a/packages/grafana-ui/tsconfig.json +++ b/packages/grafana-ui/tsconfig.json @@ -5,11 +5,12 @@ "declarationDir": "./compiled", "emitDeclarationOnly": true, "isolatedModules": true, + "allowJs": true, "rootDirs": ["."] }, "exclude": ["dist/**/*"], "extends": "@grafana/tsconfig", - "include": ["src/**/*.ts*", "../../public/app/types/*.d.ts"], + "include": ["../../public/test/setupTests.ts", "../../public/app/types/*.d.ts", "src/**/*.ts*"], // override for storybook which uses ts-node to compile main.ts / preview.ts files. "ts-node": { "compilerOptions": { diff --git a/public/app/features/explore/Graph/useStructureRev.test.ts b/public/app/features/explore/Graph/useStructureRev.test.ts index 650e1ac0a72..226c8cdf0b8 100644 --- a/public/app/features/explore/Graph/useStructureRev.test.ts +++ b/public/app/features/explore/Graph/useStructureRev.test.ts @@ -1,3 +1,12 @@ +declare global { + // eslint-disable-next-line @typescript-eslint/no-namespace + namespace jest { + interface Matchers { + toHaveIncremented(): CustomMatcherResult; + } + } +} + import { renderHook } from '@testing-library/react-hooks'; import { DataFrame, FieldType, toDataFrame } from '@grafana/data'; diff --git a/public/app/plugins/datasource/azuremonitor/package.json b/public/app/plugins/datasource/azuremonitor/package.json index 3d2174fec0f..ace8add2707 100644 --- a/public/app/plugins/datasource/azuremonitor/package.json +++ b/public/app/plugins/datasource/azuremonitor/package.json @@ -36,7 +36,6 @@ "@types/prismjs": "1.26.4", "@types/react": "18.3.3", "@types/react-dom": "18.2.25", - "@types/testing-library__jest-dom": "5.14.9", "react-select-event": "5.5.1", "ts-node": "10.9.2", "typescript": "5.5.4", diff --git a/public/app/plugins/datasource/cloud-monitoring/package.json b/public/app/plugins/datasource/cloud-monitoring/package.json index 6ede77a944b..8f994cd2800 100644 --- a/public/app/plugins/datasource/cloud-monitoring/package.json +++ b/public/app/plugins/datasource/cloud-monitoring/package.json @@ -39,7 +39,6 @@ "@types/react": "18.3.3", "@types/react-dom": "18.2.25", "@types/react-test-renderer": "18.3.0", - "@types/testing-library__jest-dom": "5.14.9", "react-select-event": "5.5.1", "react-test-renderer": "18.2.0", "ts-node": "10.9.2", diff --git a/public/app/plugins/datasource/grafana-postgresql-datasource/package.json b/public/app/plugins/datasource/grafana-postgresql-datasource/package.json index 0fe3da995e1..94ed6a2eae8 100644 --- a/public/app/plugins/datasource/grafana-postgresql-datasource/package.json +++ b/public/app/plugins/datasource/grafana-postgresql-datasource/package.json @@ -25,7 +25,6 @@ "@types/lodash": "4.17.10", "@types/node": "20.16.11", "@types/react": "18.3.3", - "@types/testing-library__jest-dom": "5.14.9", "ts-node": "10.9.2", "typescript": "5.5.4", "webpack": "5.95.0" diff --git a/public/app/plugins/datasource/grafana-pyroscope-datasource/package.json b/public/app/plugins/datasource/grafana-pyroscope-datasource/package.json index 2b173a8b606..2171d4d1722 100644 --- a/public/app/plugins/datasource/grafana-pyroscope-datasource/package.json +++ b/public/app/plugins/datasource/grafana-pyroscope-datasource/package.json @@ -31,7 +31,6 @@ "@types/prismjs": "1.26.4", "@types/react": "18.3.3", "@types/react-dom": "18.2.25", - "@types/testing-library__jest-dom": "5.14.9", "css-loader": "7.1.2", "jest": "29.7.0", "style-loader": "4.0.0", diff --git a/public/app/plugins/datasource/grafana-testdata-datasource/package.json b/public/app/plugins/datasource/grafana-testdata-datasource/package.json index 12a342b80a9..3c82c7c2add 100644 --- a/public/app/plugins/datasource/grafana-testdata-datasource/package.json +++ b/public/app/plugins/datasource/grafana-testdata-datasource/package.json @@ -33,7 +33,6 @@ "@types/node": "20.16.11", "@types/react": "18.3.3", "@types/react-dom": "18.2.25", - "@types/testing-library__jest-dom": "5.14.9", "@types/uuid": "9.0.8", "ts-node": "10.9.2", "typescript": "5.5.4", diff --git a/public/app/plugins/datasource/mssql/package.json b/public/app/plugins/datasource/mssql/package.json index 7b155dfbf11..98862804293 100644 --- a/public/app/plugins/datasource/mssql/package.json +++ b/public/app/plugins/datasource/mssql/package.json @@ -25,7 +25,6 @@ "@types/lodash": "4.17.10", "@types/node": "20.16.11", "@types/react": "18.3.3", - "@types/testing-library__jest-dom": "5.14.9", "ts-node": "10.9.2", "typescript": "5.5.4", "webpack": "5.95.0" diff --git a/public/app/plugins/datasource/mysql/package.json b/public/app/plugins/datasource/mysql/package.json index 3ccb3ff1cd8..ee28e88981b 100644 --- a/public/app/plugins/datasource/mysql/package.json +++ b/public/app/plugins/datasource/mysql/package.json @@ -25,7 +25,6 @@ "@types/lodash": "4.17.10", "@types/node": "20.16.11", "@types/react": "18.3.3", - "@types/testing-library__jest-dom": "5.14.9", "ts-node": "10.9.2", "typescript": "5.5.4", "webpack": "5.95.0" diff --git a/yarn.lock b/yarn.lock index fcf2fbb36e2..2a9e97f42a0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3111,7 +3111,6 @@ __metadata: "@types/prismjs": "npm:1.26.4" "@types/react": "npm:18.3.3" "@types/react-dom": "npm:18.2.25" - "@types/testing-library__jest-dom": "npm:5.14.9" fast-deep-equal: "npm:^3.1.3" i18next: "npm:^23.0.0" immer: "npm:10.1.1" @@ -3152,7 +3151,6 @@ __metadata: "@types/lodash": "npm:4.17.10" "@types/node": "npm:20.16.11" "@types/react": "npm:18.3.3" - "@types/testing-library__jest-dom": "npm:5.14.9" lodash: "npm:4.17.21" react: "npm:18.2.0" rxjs: "npm:7.8.1" @@ -3185,7 +3183,6 @@ __metadata: "@types/prismjs": "npm:1.26.4" "@types/react": "npm:18.3.3" "@types/react-dom": "npm:18.2.25" - "@types/testing-library__jest-dom": "npm:5.14.9" css-loader: "npm:7.1.2" fast-deep-equal: "npm:^3.1.3" jest: "npm:29.7.0" @@ -3227,7 +3224,6 @@ __metadata: "@types/node": "npm:20.16.11" "@types/react": "npm:18.3.3" "@types/react-dom": "npm:18.2.25" - "@types/testing-library__jest-dom": "npm:5.14.9" "@types/uuid": "npm:9.0.8" d3-random: "npm:^3.0.1" lodash: "npm:4.17.21" @@ -3308,7 +3304,6 @@ __metadata: "@types/lodash": "npm:4.17.10" "@types/node": "npm:20.16.11" "@types/react": "npm:18.3.3" - "@types/testing-library__jest-dom": "npm:5.14.9" lodash: "npm:4.17.21" react: "npm:18.2.0" rxjs: "npm:7.8.1" @@ -3340,7 +3335,6 @@ __metadata: "@types/lodash": "npm:4.17.10" "@types/node": "npm:20.16.11" "@types/react": "npm:18.3.3" - "@types/testing-library__jest-dom": "npm:5.14.9" lodash: "npm:4.17.21" react: "npm:18.2.0" rxjs: "npm:7.8.1" @@ -3409,7 +3403,6 @@ __metadata: "@types/react": "npm:18.3.3" "@types/react-dom": "npm:18.2.25" "@types/react-test-renderer": "npm:18.3.0" - "@types/testing-library__jest-dom": "npm:5.14.9" debounce-promise: "npm:3.1.2" fast-deep-equal: "npm:^3.1.3" i18next: "npm:^23.0.0" @@ -3860,7 +3853,6 @@ __metadata: "@types/node": "npm:20.16.11" "@types/react": "npm:18.3.3" "@types/systemjs": "npm:6.15.1" - "@types/testing-library__jest-dom": "npm:5.14.9" jest: "npm:^29.6.4" react: "npm:18.2.0" react-select: "npm:5.8.1" @@ -3953,7 +3945,6 @@ __metadata: "@types/react-highlight-words": "npm:0.20.0" "@types/react-window": "npm:1.8.8" "@types/semver": "npm:7.5.8" - "@types/testing-library__jest-dom": "npm:5.14.9" "@types/uuid": "npm:9.0.8" "@typescript-eslint/eslint-plugin": "npm:6.21.0" "@typescript-eslint/parser": "npm:6.21.0" @@ -4180,7 +4171,6 @@ __metadata: "@types/react-dom": "npm:18.2.25" "@types/react-virtualized-auto-sizer": "npm:1.0.4" "@types/systemjs": "npm:6.15.1" - "@types/testing-library__jest-dom": "npm:5.14.9" "@types/uuid": "npm:9.0.8" immutable: "npm:4.3.7" jest: "npm:^29.6.4" @@ -4276,7 +4266,6 @@ __metadata: "@types/slate": "npm:0.47.11" "@types/slate-plain-serializer": "npm:0.7.5" "@types/slate-react": "npm:0.22.9" - "@types/testing-library__jest-dom": "npm:5.14.9" "@types/tinycolor2": "npm:1.4.6" "@types/uuid": "npm:9.0.8" ansicolor: "npm:1.1.100" @@ -9337,7 +9326,7 @@ __metadata: languageName: node linkType: hard -"@testing-library/jest-dom@npm:6.5.0, @testing-library/jest-dom@npm:^6.1.2": +"@testing-library/jest-dom@npm:6.5.0": version: 6.5.0 resolution: "@testing-library/jest-dom@npm:6.5.0" dependencies: @@ -9352,6 +9341,21 @@ __metadata: languageName: node linkType: hard +"@testing-library/jest-dom@npm:^6.1.2": + version: 6.6.1 + resolution: "@testing-library/jest-dom@npm:6.6.1" + dependencies: + "@adobe/css-tools": "npm:^4.4.0" + aria-query: "npm:^5.0.0" + chalk: "npm:^3.0.0" + css.escape: "npm:^1.5.1" + dom-accessibility-api: "npm:^0.6.3" + lodash: "npm:^4.17.21" + redent: "npm:^3.0.0" + checksum: 10/006357d7547cc50624564a1b0e9986d0f0252365a6e5ac1c7c989032159c47226adfbd9a9ac17eef236738e9597541d344176176b5c3ed0e06e8f4b33387e135 + languageName: node + linkType: hard + "@testing-library/react-hooks@npm:^8.0.1": version: 8.0.1 resolution: "@testing-library/react-hooks@npm:8.0.1" @@ -10232,7 +10236,7 @@ __metadata: languageName: node linkType: hard -"@types/jest@npm:*, @types/jest@npm:29.5.13, @types/jest@npm:^29.5.4": +"@types/jest@npm:29.5.13, @types/jest@npm:^29.5.4": version: 29.5.13 resolution: "@types/jest@npm:29.5.13" dependencies: @@ -10867,15 +10871,6 @@ __metadata: languageName: node linkType: hard -"@types/testing-library__jest-dom@npm:5.14.9": - version: 5.14.9 - resolution: "@types/testing-library__jest-dom@npm:5.14.9" - dependencies: - "@types/jest": "npm:*" - checksum: 10/e257de95a4a9385cc09ae4ca3396d23ad4b5cfb8e021a1ca3454c424c34636075f6fe151b2f881f79bf9d497aa04fbfae62449b135f293e8d2d614fa899898a8 - languageName: node - linkType: hard - "@types/tinycolor2@npm:1.4.6": version: 1.4.6 resolution: "@types/tinycolor2@npm:1.4.6" @@ -19147,7 +19142,6 @@ __metadata: "@types/slate-react": "npm:0.22.9" "@types/swagger-ui-react": "npm:4.18.3" "@types/systemjs": "npm:6.15.1" - "@types/testing-library__jest-dom": "npm:5.14.9" "@types/tinycolor2": "npm:1.4.6" "@types/uuid": "npm:9.0.8" "@types/webpack-assets-manifest": "npm:^5"