From 2a2e33d320e337c6339ee64de225ed67d7773f98 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 13:02:20 +0000 Subject: [PATCH 1/2] chore(deps): update dependency typescript to v5.2.2 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- microsite/package.json | 2 +- microsite/yarn.lock | 18 +++++++++--------- package.json | 2 +- storybook/package.json | 2 +- storybook/yarn.lock | 18 +++++++++--------- yarn.lock | 26 +++++++++++++++++++++++--- 6 files changed, 44 insertions(+), 24 deletions(-) diff --git a/microsite/package.json b/microsite/package.json index 61bfcbd04a1d0..a516aa3214c8e 100644 --- a/microsite/package.json +++ b/microsite/package.json @@ -24,7 +24,7 @@ "@types/webpack-env": "^1.18.0", "js-yaml": "^4.1.0", "prettier": "^2.6.2", - "typescript": "~5.0.0", + "typescript": "~5.2.0", "yaml-loader": "^0.8.0" }, "prettier": "@spotify/prettier-config", diff --git a/microsite/yarn.lock b/microsite/yarn.lock index 10ad6d0d687cc..f6dd2e7a9081b 100644 --- a/microsite/yarn.lock +++ b/microsite/yarn.lock @@ -3907,7 +3907,7 @@ __metadata: react-dom: ^18.0.0 sass: ^1.57.1 swc-loader: ^0.2.3 - typescript: ~5.0.0 + typescript: ~5.2.0 yaml-loader: ^0.8.0 languageName: unknown linkType: soft @@ -11685,23 +11685,23 @@ __metadata: languageName: node linkType: hard -"typescript@npm:~5.0.0": - version: 5.0.4 - resolution: "typescript@npm:5.0.4" +"typescript@npm:~5.2.0": + version: 5.2.2 + resolution: "typescript@npm:5.2.2" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 82b94da3f4604a8946da585f7d6c3025fff8410779e5bde2855ab130d05e4fd08938b9e593b6ebed165bda6ad9292b230984f10952cf82f0a0ca07bbeaa08172 + checksum: 7912821dac4d962d315c36800fe387cdc0a6298dba7ec171b350b4a6e988b51d7b8f051317786db1094bd7431d526b648aba7da8236607febb26cf5b871d2d3c languageName: node linkType: hard -"typescript@patch:typescript@~5.0.0#~builtin": - version: 5.0.4 - resolution: "typescript@patch:typescript@npm%3A5.0.4#~builtin::version=5.0.4&hash=a1c5e5" +"typescript@patch:typescript@~5.2.0#~builtin": + version: 5.2.2 + resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin::version=5.2.2&hash=a1c5e5" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 6a1fe9a77bb9c5176ead919cc4a1499ee63e46b4e05bf667079f11bf3a8f7887f135aa72460a4c3b016e6e6bb65a822cb8689a6d86cbfe92d22cc9f501f09213 + checksum: 07106822b4305de3f22835cbba949a2b35451cad50888759b6818421290ff95d522b38ef7919e70fb381c5fe9c1c643d7dea22c8b31652a717ddbd57b7f4d554 languageName: node linkType: hard diff --git a/package.json b/package.json index a13b7463f2dc3..21182804370be 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "semver": "^7.5.3", "shx": "^0.3.2", "ts-node": "^10.4.0", - "typescript": "~5.0.0" + "typescript": "~5.2.0" }, "prettier": "@spotify/prettier-config", "lint-staged": { diff --git a/storybook/package.json b/storybook/package.json index 46cf09dc7960a..4045760f1ceca 100644 --- a/storybook/package.json +++ b/storybook/package.json @@ -27,7 +27,7 @@ "@storybook/react": "^6.5.9", "@storybook/testing-library": "^0.2.0", "storybook-dark-mode": "^1.1.0", - "typescript": "~4.9.0" + "typescript": "~5.2.0" }, "resolutions": { "webpack": "^5.73.0" diff --git a/storybook/yarn.lock b/storybook/yarn.lock index e16eb422f24f6..2c58a7f49f598 100644 --- a/storybook/yarn.lock +++ b/storybook/yarn.lock @@ -10686,7 +10686,7 @@ __metadata: react-hot-loader: ^4.13.0 storybook-dark-mode: ^1.1.0 swc-loader: ^0.2.3 - typescript: ~4.9.0 + typescript: ~5.2.0 peerDependencies: "@backstage/core-app-api": "*" "@backstage/core-plugin-api": "*" @@ -11217,23 +11217,23 @@ __metadata: languageName: node linkType: hard -"typescript@npm:~4.9.0": - version: 4.9.5 - resolution: "typescript@npm:4.9.5" +"typescript@npm:~5.2.0": + version: 5.2.2 + resolution: "typescript@npm:5.2.2" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: ee000bc26848147ad423b581bd250075662a354d84f0e06eb76d3b892328d8d4440b7487b5a83e851b12b255f55d71835b008a66cbf8f255a11e4400159237db + checksum: 7912821dac4d962d315c36800fe387cdc0a6298dba7ec171b350b4a6e988b51d7b8f051317786db1094bd7431d526b648aba7da8236607febb26cf5b871d2d3c languageName: node linkType: hard -"typescript@patch:typescript@~4.9.0#~builtin": - version: 4.9.5 - resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=a1c5e5" +"typescript@patch:typescript@~5.2.0#~builtin": + version: 5.2.2 + resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin::version=5.2.2&hash=a1c5e5" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 2eee5c37cad4390385db5db5a8e81470e42e8f1401b0358d7390095d6f681b410f2c4a0c496c6ff9ebd775423c7785cdace7bcdad76c7bee283df3d9718c0f20 + checksum: 07106822b4305de3f22835cbba949a2b35451cad50888759b6818421290ff95d522b38ef7919e70fb381c5fe9c1c643d7dea22c8b31652a717ddbd57b7f4d554 languageName: node linkType: hard diff --git a/yarn.lock b/yarn.lock index 6345da635711f..ac109ee423212 100644 --- a/yarn.lock +++ b/yarn.lock @@ -41325,7 +41325,7 @@ __metadata: semver: ^7.5.3 shx: ^0.3.2 ts-node: ^10.4.0 - typescript: ~5.0.0 + typescript: ~5.2.0 languageName: unknown linkType: soft @@ -44447,7 +44447,7 @@ __metadata: languageName: node linkType: hard -"typescript@npm:~5.0.0, typescript@npm:~5.0.4": +"typescript@npm:~5.0.4": version: 5.0.4 resolution: "typescript@npm:5.0.4" bin: @@ -44467,7 +44467,17 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@~5.0.0#~builtin, typescript@patch:typescript@~5.0.4#~builtin": +"typescript@npm:~5.2.0": + version: 5.2.2 + resolution: "typescript@npm:5.2.2" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 7912821dac4d962d315c36800fe387cdc0a6298dba7ec171b350b4a6e988b51d7b8f051317786db1094bd7431d526b648aba7da8236607febb26cf5b871d2d3c + languageName: node + linkType: hard + +"typescript@patch:typescript@~5.0.4#~builtin": version: 5.0.4 resolution: "typescript@patch:typescript@npm%3A5.0.4#~builtin::version=5.0.4&hash=a1c5e5" bin: @@ -44487,6 +44497,16 @@ __metadata: languageName: node linkType: hard +"typescript@patch:typescript@~5.2.0#~builtin": + version: 5.2.2 + resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin::version=5.2.2&hash=a1c5e5" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 07106822b4305de3f22835cbba949a2b35451cad50888759b6818421290ff95d522b38ef7919e70fb381c5fe9c1c643d7dea22c8b31652a717ddbd57b7f4d554 + languageName: node + linkType: hard + "ua-parser-js@npm:^0.7.30": version: 0.7.33 resolution: "ua-parser-js@npm:0.7.33" From aaa6fb3bc9b107c5f8fb6658eee7bcd923b9f75c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Thu, 16 Nov 2023 11:34:27 +0100 Subject: [PATCH 2/2] fix types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .changeset/kind-badgers-rush.md | 8 ++++++++ microsite/package.json | 2 +- microsite/yarn.lock | 18 +++++++++--------- packages/backend-openapi-utils/api-report.md | 13 +++++++------ .../backend-openapi-utils/src/types/common.ts | 11 +++++------ .../EntityAutocompletePicker.tsx | 2 +- .../EntityProcessingStatusPicker.tsx | 2 +- plugins/git-release-manager/api-report.md | 16 ++++++++-------- .../TemplateCategoryPicker.tsx | 2 +- .../TemplateTypePicker/TemplateTypePicker.tsx | 2 +- storybook/package.json | 2 +- storybook/yarn.lock | 18 +++++++++--------- 12 files changed, 52 insertions(+), 44 deletions(-) create mode 100644 .changeset/kind-badgers-rush.md diff --git a/.changeset/kind-badgers-rush.md b/.changeset/kind-badgers-rush.md new file mode 100644 index 0000000000000..4ec19bd17b5a5 --- /dev/null +++ b/.changeset/kind-badgers-rush.md @@ -0,0 +1,8 @@ +--- +'@backstage/backend-openapi-utils': patch +'@backstage/plugin-scaffolder-react': patch +'@backstage/plugin-catalog-react': patch +'@backstage/plugin-scaffolder': patch +--- + +Minor updates for TypeScript 5.2.2+ compatibility diff --git a/microsite/package.json b/microsite/package.json index a516aa3214c8e..61bfcbd04a1d0 100644 --- a/microsite/package.json +++ b/microsite/package.json @@ -24,7 +24,7 @@ "@types/webpack-env": "^1.18.0", "js-yaml": "^4.1.0", "prettier": "^2.6.2", - "typescript": "~5.2.0", + "typescript": "~5.0.0", "yaml-loader": "^0.8.0" }, "prettier": "@spotify/prettier-config", diff --git a/microsite/yarn.lock b/microsite/yarn.lock index f6dd2e7a9081b..10ad6d0d687cc 100644 --- a/microsite/yarn.lock +++ b/microsite/yarn.lock @@ -3907,7 +3907,7 @@ __metadata: react-dom: ^18.0.0 sass: ^1.57.1 swc-loader: ^0.2.3 - typescript: ~5.2.0 + typescript: ~5.0.0 yaml-loader: ^0.8.0 languageName: unknown linkType: soft @@ -11685,23 +11685,23 @@ __metadata: languageName: node linkType: hard -"typescript@npm:~5.2.0": - version: 5.2.2 - resolution: "typescript@npm:5.2.2" +"typescript@npm:~5.0.0": + version: 5.0.4 + resolution: "typescript@npm:5.0.4" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 7912821dac4d962d315c36800fe387cdc0a6298dba7ec171b350b4a6e988b51d7b8f051317786db1094bd7431d526b648aba7da8236607febb26cf5b871d2d3c + checksum: 82b94da3f4604a8946da585f7d6c3025fff8410779e5bde2855ab130d05e4fd08938b9e593b6ebed165bda6ad9292b230984f10952cf82f0a0ca07bbeaa08172 languageName: node linkType: hard -"typescript@patch:typescript@~5.2.0#~builtin": - version: 5.2.2 - resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin::version=5.2.2&hash=a1c5e5" +"typescript@patch:typescript@~5.0.0#~builtin": + version: 5.0.4 + resolution: "typescript@patch:typescript@npm%3A5.0.4#~builtin::version=5.0.4&hash=a1c5e5" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 07106822b4305de3f22835cbba949a2b35451cad50888759b6818421290ff95d522b38ef7919e70fb381c5fe9c1c643d7dea22c8b31652a717ddbd57b7f4d554 + checksum: 6a1fe9a77bb9c5176ead919cc4a1499ee63e46b4e05bf667079f11bf3a8f7887f135aa72460a4c3b016e6e6bb65a822cb8689a6d86cbfe92d22cc9f501f09213 languageName: node linkType: hard diff --git a/packages/backend-openapi-utils/api-report.md b/packages/backend-openapi-utils/api-report.md index 67132ca74b3f2..0d78ec96710ad 100644 --- a/packages/backend-openapi-utils/api-report.md +++ b/packages/backend-openapi-utils/api-report.md @@ -61,12 +61,13 @@ type ComponentTypes = Extract< >; // @public (undocumented) -type ConvertAll = []> = T extends [ - infer First extends JSONSchema7, - ...infer Rest, -] - ? ConvertAll]> - : R; +type ConvertAll> = { + [Index in keyof T]: T[Index] extends JSONSchema7 + ? FromSchema + : T[Index]; +} & { + length: T['length']; +}; // @public (undocumented) interface CookieObject extends ParameterObject { diff --git a/packages/backend-openapi-utils/src/types/common.ts b/packages/backend-openapi-utils/src/types/common.ts index c3c7284369ec1..f9dedf2f846cf 100644 --- a/packages/backend-openapi-utils/src/types/common.ts +++ b/packages/backend-openapi-utils/src/types/common.ts @@ -220,12 +220,11 @@ export type TuplifyUnion< /** * @public */ -export type ConvertAll = []> = T extends [ - infer First extends JSONSchema7, - ...infer Rest, -] - ? ConvertAll]> - : R; +export type ConvertAll> = { + [Index in keyof T]: T[Index] extends JSONSchema7 + ? FromSchema + : T[Index]; +} & { length: T['length'] }; /** * @public diff --git a/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx b/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx index 3eaba51909aca..98e680aa12c50 100644 --- a/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx +++ b/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx @@ -130,7 +130,7 @@ export function EntityAutocompletePicker< {label} - multiple disableCloseOnSelect options={availableOptions} diff --git a/plugins/catalog-react/src/components/EntityProcessingStatusPicker/EntityProcessingStatusPicker.tsx b/plugins/catalog-react/src/components/EntityProcessingStatusPicker/EntityProcessingStatusPicker.tsx index 01a6e0188dcec..7b8a35d162680 100644 --- a/plugins/catalog-react/src/components/EntityProcessingStatusPicker/EntityProcessingStatusPicker.tsx +++ b/plugins/catalog-react/src/components/EntityProcessingStatusPicker/EntityProcessingStatusPicker.tsx @@ -72,7 +72,7 @@ export const EntityProcessingStatusPicker = () => { Processing Status - multiple disableCloseOnSelect options={availableAdvancedItems} diff --git a/plugins/git-release-manager/api-report.md b/plugins/git-release-manager/api-report.md index 3e4c0847a7b2a..d2dd7e909f977 100644 --- a/plugins/git-release-manager/api-report.md +++ b/plugins/git-release-manager/api-report.md @@ -317,42 +317,42 @@ function LinearProgressWithLabel(props: { // Warning: (ae-missing-release-tag) "MOCK_RELEASE_BRANCH_NAME_CALVER" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -const MOCK_RELEASE_BRANCH_NAME_CALVER: string; +const MOCK_RELEASE_BRANCH_NAME_CALVER = 'rc/2020.01.01_1'; // Warning: (ae-missing-release-tag) "MOCK_RELEASE_BRANCH_NAME_SEMVER" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -const MOCK_RELEASE_BRANCH_NAME_SEMVER: string; +const MOCK_RELEASE_BRANCH_NAME_SEMVER = 'rc/1.2.3'; // Warning: (ae-missing-release-tag) "MOCK_RELEASE_CANDIDATE_TAG_NAME_CALVER" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -const MOCK_RELEASE_CANDIDATE_TAG_NAME_CALVER: string; +const MOCK_RELEASE_CANDIDATE_TAG_NAME_CALVER = 'rc-2020.01.01_1'; // Warning: (ae-missing-release-tag) "MOCK_RELEASE_CANDIDATE_TAG_NAME_SEMVER" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -const MOCK_RELEASE_CANDIDATE_TAG_NAME_SEMVER: string; +const MOCK_RELEASE_CANDIDATE_TAG_NAME_SEMVER = 'rc-1.2.3'; // Warning: (ae-missing-release-tag) "MOCK_RELEASE_NAME_CALVER" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -const MOCK_RELEASE_NAME_CALVER: string; +const MOCK_RELEASE_NAME_CALVER = 'Version 2020.01.01_1'; // Warning: (ae-missing-release-tag) "MOCK_RELEASE_NAME_SEMVER" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -const MOCK_RELEASE_NAME_SEMVER: string; +const MOCK_RELEASE_NAME_SEMVER = 'Version 1.2.3'; // Warning: (ae-missing-release-tag) "MOCK_RELEASE_VERSION_TAG_NAME_CALVER" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -const MOCK_RELEASE_VERSION_TAG_NAME_CALVER: string; +const MOCK_RELEASE_VERSION_TAG_NAME_CALVER = 'version-2020.01.01_1'; // Warning: (ae-missing-release-tag) "MOCK_RELEASE_VERSION_TAG_NAME_SEMVER" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -const MOCK_RELEASE_VERSION_TAG_NAME_SEMVER: string; +const MOCK_RELEASE_VERSION_TAG_NAME_SEMVER = 'version-1.2.3'; // Warning: (ae-missing-release-tag) "mockBumpedTag" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // diff --git a/plugins/scaffolder-react/src/next/components/TemplateCategoryPicker/TemplateCategoryPicker.tsx b/plugins/scaffolder-react/src/next/components/TemplateCategoryPicker/TemplateCategoryPicker.tsx index b850c3bcfe192..eba6aebf935ac 100644 --- a/plugins/scaffolder-react/src/next/components/TemplateCategoryPicker/TemplateCategoryPicker.tsx +++ b/plugins/scaffolder-react/src/next/components/TemplateCategoryPicker/TemplateCategoryPicker.tsx @@ -65,7 +65,7 @@ export const TemplateCategoryPicker = () => { > Categories - multiple id="categories-picker" options={availableTypes} diff --git a/plugins/scaffolder/src/components/TemplateTypePicker/TemplateTypePicker.tsx b/plugins/scaffolder/src/components/TemplateTypePicker/TemplateTypePicker.tsx index 88ddef2b929a0..0eed8cde75147 100644 --- a/plugins/scaffolder/src/components/TemplateTypePicker/TemplateTypePicker.tsx +++ b/plugins/scaffolder/src/components/TemplateTypePicker/TemplateTypePicker.tsx @@ -65,7 +65,7 @@ export const TemplateTypePicker = () => { > Categories - id="categories-picker" multiple options={availableTypes} diff --git a/storybook/package.json b/storybook/package.json index 4045760f1ceca..46cf09dc7960a 100644 --- a/storybook/package.json +++ b/storybook/package.json @@ -27,7 +27,7 @@ "@storybook/react": "^6.5.9", "@storybook/testing-library": "^0.2.0", "storybook-dark-mode": "^1.1.0", - "typescript": "~5.2.0" + "typescript": "~4.9.0" }, "resolutions": { "webpack": "^5.73.0" diff --git a/storybook/yarn.lock b/storybook/yarn.lock index 2c58a7f49f598..e16eb422f24f6 100644 --- a/storybook/yarn.lock +++ b/storybook/yarn.lock @@ -10686,7 +10686,7 @@ __metadata: react-hot-loader: ^4.13.0 storybook-dark-mode: ^1.1.0 swc-loader: ^0.2.3 - typescript: ~5.2.0 + typescript: ~4.9.0 peerDependencies: "@backstage/core-app-api": "*" "@backstage/core-plugin-api": "*" @@ -11217,23 +11217,23 @@ __metadata: languageName: node linkType: hard -"typescript@npm:~5.2.0": - version: 5.2.2 - resolution: "typescript@npm:5.2.2" +"typescript@npm:~4.9.0": + version: 4.9.5 + resolution: "typescript@npm:4.9.5" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 7912821dac4d962d315c36800fe387cdc0a6298dba7ec171b350b4a6e988b51d7b8f051317786db1094bd7431d526b648aba7da8236607febb26cf5b871d2d3c + checksum: ee000bc26848147ad423b581bd250075662a354d84f0e06eb76d3b892328d8d4440b7487b5a83e851b12b255f55d71835b008a66cbf8f255a11e4400159237db languageName: node linkType: hard -"typescript@patch:typescript@~5.2.0#~builtin": - version: 5.2.2 - resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin::version=5.2.2&hash=a1c5e5" +"typescript@patch:typescript@~4.9.0#~builtin": + version: 4.9.5 + resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=a1c5e5" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 07106822b4305de3f22835cbba949a2b35451cad50888759b6818421290ff95d522b38ef7919e70fb381c5fe9c1c643d7dea22c8b31652a717ddbd57b7f4d554 + checksum: 2eee5c37cad4390385db5db5a8e81470e42e8f1401b0358d7390095d6f681b410f2c4a0c496c6ff9ebd775423c7785cdace7bcdad76c7bee283df3d9718c0f20 languageName: node linkType: hard