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/package.json b/package.json index 0573e7c136..23b38fd918 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,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/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/yarn.lock b/yarn.lock index 59778d30ec..0a5ad1d720 100644 --- a/yarn.lock +++ b/yarn.lock @@ -41169,7 +41169,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 @@ -44284,7 +44284,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: @@ -44304,7 +44304,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: @@ -44324,6 +44334,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"