diff --git a/.changeset/kind-badgers-rush.md b/.changeset/kind-badgers-rush.md new file mode 100644 index 0000000000..4ec19bd17b --- /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 a516aa3214..61bfcbd04a 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 f6dd2e7a90..10ad6d0d68 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 67132ca74b..0d78ec9671 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 c3c7284369..f9dedf2f84 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 3eaba51909..98e680aa12 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 01a6e0188d..7b8a35d162 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 3e4c0847a7..d2dd7e909f 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 b850c3bcfe..eba6aebf93 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 88ddef2b92..0eed8cde75 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 4045760f1c..46cf09dc79 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 2c58a7f49f..e16eb422f2 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