diff --git a/workspaces/orchestrator/.changeset/fix-tsc-compilation-errors.md b/workspaces/orchestrator/.changeset/fix-tsc-compilation-errors.md new file mode 100644 index 0000000000..4777229dcb --- /dev/null +++ b/workspaces/orchestrator/.changeset/fix-tsc-compilation-errors.md @@ -0,0 +1,9 @@ +--- +'@red-hat-developer-hub/backstage-plugin-orchestrator': patch +'@red-hat-developer-hub/backstage-plugin-orchestrator-common': patch +'@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets': patch +'@red-hat-developer-hub/backstage-plugin-orchestrator-form-react': patch +'@red-hat-developer-hub/backstage-plugin-scaffolder-backend-module-orchestrator': patch +--- + +Fix TypeScript compilation errors in orchestrator plugins diff --git a/workspaces/orchestrator/plugins/orchestrator-common/package.json b/workspaces/orchestrator/plugins/orchestrator-common/package.json index 3def8b1321..ae82c22338 100644 --- a/workspaces/orchestrator/plugins/orchestrator-common/package.json +++ b/workspaces/orchestrator/plugins/orchestrator-common/package.json @@ -64,6 +64,7 @@ "devDependencies": { "@backstage/cli": "^0.34.5", "@openapitools/openapi-generator-cli": "2.25.2", + "@types/js-yaml": "^4.0.0", "@types/json-schema": "7.0.15", "js-yaml-cli": "^0.6.0" }, diff --git a/workspaces/orchestrator/plugins/orchestrator-form-react/src/components/AuthRequester.tsx b/workspaces/orchestrator/plugins/orchestrator-form-react/src/components/AuthRequester.tsx index 2710c6fe2e..9adfe56f2c 100644 --- a/workspaces/orchestrator/plugins/orchestrator-form-react/src/components/AuthRequester.tsx +++ b/workspaces/orchestrator/plugins/orchestrator-form-react/src/components/AuthRequester.tsx @@ -15,7 +15,7 @@ */ import { useEffect } from 'react'; -import { JsonObject } from '@backstage/types/index'; +import { JsonObject } from '@backstage/types'; import { Widget } from '@rjsf/utils'; import type { JSONSchema7 } from 'json-schema'; diff --git a/workspaces/orchestrator/plugins/orchestrator-form-widgets/package.json b/workspaces/orchestrator/plugins/orchestrator-form-widgets/package.json index dc2195a166..85dbdd2bc7 100644 --- a/workspaces/orchestrator/plugins/orchestrator-form-widgets/package.json +++ b/workspaces/orchestrator/plugins/orchestrator-form-widgets/package.json @@ -67,7 +67,9 @@ "tss-react": "^4.9.18" }, "peerDependencies": { - "react": "^16.13.1 || ^17.0.0 || ^18.0.0" + "react": "^16.13.1 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", + "react-router-dom": "^6.3.0" }, "scalprum": { "name": "red-hat-developer-hub.backstage-plugin-orchestrator-form-widgets", @@ -86,7 +88,9 @@ "@testing-library/user-event": "^14.0.0", "express": "^5.1.0", "msw": "^1.0.0", - "react": "^16.13.1 || ^17.0.0 || ^18.0.0" + "react": "^18.0.0", + "react-dom": "^18.0.0", + "react-router-dom": "^6.3.0" }, "files": [ "app-config.yaml", diff --git a/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/uiPropTypes.ts b/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/uiPropTypes.ts index 70ee5cfb37..117cadf169 100644 --- a/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/uiPropTypes.ts +++ b/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/uiPropTypes.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { JsonValue } from '@backstage/types/index'; +import { JsonValue } from '@backstage/types'; import { TypographyVariant } from '@mui/material/styles'; export type UiProps = { diff --git a/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/utils/evaluateTemplate.test.ts b/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/utils/evaluateTemplate.test.ts index 2ac3633577..9b6e55eb15 100644 --- a/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/utils/evaluateTemplate.test.ts +++ b/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/utils/evaluateTemplate.test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { JsonValue } from '@backstage/types/index'; +import { JsonValue } from '@backstage/types'; import { evaluateTemplate, evaluateTemplateProps } from './evaluateTemplate'; import get from 'lodash/get'; diff --git a/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/utils/useFetch.ts b/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/utils/useFetch.ts index 3780a2a8fe..8d71e06250 100644 --- a/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/utils/useFetch.ts +++ b/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/utils/useFetch.ts @@ -15,7 +15,7 @@ */ import { useApi, fetchApiRef } from '@backstage/core-plugin-api'; -import { JsonObject } from '@backstage/types/index'; +import { JsonObject } from '@backstage/types'; import { useState } from 'react'; import { UiProps } from '../uiPropTypes'; import { getErrorMessage } from './errorUtils'; diff --git a/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/utils/useFetchAndEvaluate.ts b/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/utils/useFetchAndEvaluate.ts index 0d5a28e637..7beeb22007 100644 --- a/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/utils/useFetchAndEvaluate.ts +++ b/workspaces/orchestrator/plugins/orchestrator-form-widgets/src/utils/useFetchAndEvaluate.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { JsonObject } from '@backstage/types/index'; +import { JsonObject } from '@backstage/types'; import React, { useState, useEffect } from 'react'; import { UiProps } from '../uiPropTypes'; import { getErrorMessage } from './errorUtils'; diff --git a/workspaces/orchestrator/plugins/orchestrator/package.json b/workspaces/orchestrator/plugins/orchestrator/package.json index ab14891b5c..db4374f3e2 100644 --- a/workspaces/orchestrator/plugins/orchestrator/package.json +++ b/workspaces/orchestrator/plugins/orchestrator/package.json @@ -90,7 +90,10 @@ "@types/react": "^18.2.58", "@types/react-dom": "^18.2.19", "@types/uuid": "^9.0.0", - "prettier": "3.6.2" + "prettier": "3.6.2", + "react": "^18.0.0", + "react-dom": "^18.0.0", + "react-router-dom": "^6.3.0" }, "peerDependencies": { "@mui/icons-material": "^5.17.1", diff --git a/workspaces/orchestrator/plugins/orchestrator/src/utils/deepSearchObject.ts b/workspaces/orchestrator/plugins/orchestrator/src/utils/deepSearchObject.ts index 4e3872e313..0368f5c182 100644 --- a/workspaces/orchestrator/plugins/orchestrator/src/utils/deepSearchObject.ts +++ b/workspaces/orchestrator/plugins/orchestrator/src/utils/deepSearchObject.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { JsonObject } from '@backstage/types/index'; +import { JsonObject } from '@backstage/types'; import { isJsonObject } from '@red-hat-developer-hub/backstage-plugin-orchestrator-common'; diff --git a/workspaces/orchestrator/plugins/scaffolder-backend-module-orchestrator/package.json b/workspaces/orchestrator/plugins/scaffolder-backend-module-orchestrator/package.json index 4a9b7d9068..0992e95f65 100644 --- a/workspaces/orchestrator/plugins/scaffolder-backend-module-orchestrator/package.json +++ b/workspaces/orchestrator/plugins/scaffolder-backend-module-orchestrator/package.json @@ -68,7 +68,8 @@ "@backstage/cli": "^0.34.5", "@backstage/plugin-scaffolder-node-test-utils": "^0.3.5", "@janus-idp/cli": "3.6.1", - "@spotify/prettier-config": "^15.0.0" + "@spotify/prettier-config": "^15.0.0", + "@types/js-yaml": "^4.0.0" }, "files": [ "app-config.yaml", diff --git a/workspaces/orchestrator/plugins/scaffolder-backend-module-orchestrator/src/actions/getWorkflowParams.ts b/workspaces/orchestrator/plugins/scaffolder-backend-module-orchestrator/src/actions/getWorkflowParams.ts index 1cc61895ba..1ab7cc7158 100644 --- a/workspaces/orchestrator/plugins/scaffolder-backend-module-orchestrator/src/actions/getWorkflowParams.ts +++ b/workspaces/orchestrator/plugins/scaffolder-backend-module-orchestrator/src/actions/getWorkflowParams.ts @@ -16,7 +16,7 @@ import { AuthService } from '@backstage/backend-plugin-api'; import { DiscoveryApi } from '@backstage/plugin-permission-common'; import { createTemplateAction } from '@backstage/plugin-scaffolder-node'; -import { JsonObject } from '@backstage/types/index'; +import { JsonObject } from '@backstage/types'; import { isAxiosError } from 'axios'; import { dump } from 'js-yaml'; diff --git a/workspaces/orchestrator/yarn.lock b/workspaces/orchestrator/yarn.lock index 53c7041567..383775a99d 100644 --- a/workspaces/orchestrator/yarn.lock +++ b/workspaces/orchestrator/yarn.lock @@ -12726,6 +12726,7 @@ __metadata: "@backstage/types": ^1.2.2 "@openapitools/openapi-generator-cli": 2.25.2 "@serverlessworkflow/sdk-typescript": ^0.8.4 + "@types/js-yaml": ^4.0.0 "@types/json-schema": 7.0.15 axios: ^1.11.0 js-yaml: ^4.1.0 @@ -12815,11 +12816,15 @@ __metadata: jsonata: ^2.0.6 lodash: ^4.17.21 msw: ^1.0.0 - react: ^16.13.1 || ^17.0.0 || ^18.0.0 + react: ^18.0.0 + react-dom: ^18.0.0 + react-router-dom: ^6.3.0 react-use: ^17.2.4 tss-react: ^4.9.18 peerDependencies: react: ^16.13.1 || ^17.0.0 || ^18.0.0 + react-dom: ^16.13.1 || ^17.0.0 || ^18.0.0 + react-router-dom: ^6.3.0 languageName: unknown linkType: soft @@ -12859,6 +12864,9 @@ __metadata: lodash: ^4.17.21 luxon: ^3.7.2 prettier: 3.6.2 + react: ^18.0.0 + react-dom: ^18.0.0 + react-router-dom: ^6.3.0 react-use: ^17.4.0 swr: ^2.0.0 tss-react: ^4.9.18 @@ -12887,6 +12895,7 @@ __metadata: "@janus-idp/cli": 3.6.1 "@red-hat-developer-hub/backstage-plugin-orchestrator-common": "workspace:^" "@spotify/prettier-config": ^15.0.0 + "@types/js-yaml": ^4.0.0 axios: ^1.11.0 js-yaml: ^4.1.0 languageName: unknown @@ -16038,7 +16047,7 @@ __metadata: languageName: node linkType: hard -"@types/js-yaml@npm:^4.0.1": +"@types/js-yaml@npm:^4.0.0, @types/js-yaml@npm:^4.0.1": version: 4.0.9 resolution: "@types/js-yaml@npm:4.0.9" checksum: e5e5e49b5789a29fdb1f7d204f82de11cb9e8f6cb24ab064c616da5d6e1b3ccfbf95aa5d1498a9fbd3b9e745564e69b4a20b6c530b5a8bbb2d4eb830cda9bc69