From 0768eb5427c7e2afdd15e94c626095823ac6635c Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Mon, 12 Aug 2024 17:06:01 -0400 Subject: [PATCH 1/6] chore: Run backstage version bump. First run `yarn backstage-cli versions:bump` Then update code and config based on https://backstage.github.io/upgrade-helper/?from=1.19.3&to=1.29.2 --- app-config.production.yaml | 2 +- app-config.yaml | 5 +- backstage.json | 2 +- package.json | 12 +- packages/app/e2e-tests/app.test.ts | 28 + packages/app/package.json | 62 +- packages/app/public/index.html | 4 +- packages/app/src/App.test.tsx | 9 +- packages/app/src/App.tsx | 12 +- packages/app/src/components/Root/Root.tsx | 8 + .../app/src/components/catalog/EntityPage.tsx | 7 +- packages/app/src/index.tsx | 4 +- packages/backend/package.json | 53 +- packages/backend/src/index.test.ts | 8 - packages/backend/src/index.ts | 128 +- packages/backend/src/plugins/app.ts | 14 - packages/backend/src/plugins/auth.ts | 36 - packages/backend/src/plugins/catalog.ts | 60 - packages/backend/src/plugins/proxy.ts | 13 - packages/backend/src/plugins/scaffolder.ts | 22 - packages/backend/src/plugins/search.ts | 66 - packages/backend/src/plugins/techdocs.ts | 51 - packages/backend/src/types.ts | 25 - playwright.config.ts | 2 +- yarn.lock | 11321 +++++++++++----- 25 files changed, 7987 insertions(+), 3967 deletions(-) create mode 100644 packages/app/e2e-tests/app.test.ts delete mode 100644 packages/backend/src/index.test.ts delete mode 100644 packages/backend/src/plugins/app.ts delete mode 100644 packages/backend/src/plugins/auth.ts delete mode 100644 packages/backend/src/plugins/catalog.ts delete mode 100644 packages/backend/src/plugins/proxy.ts delete mode 100644 packages/backend/src/plugins/scaffolder.ts delete mode 100644 packages/backend/src/plugins/search.ts delete mode 100644 packages/backend/src/plugins/techdocs.ts delete mode 100644 packages/backend/src/types.ts diff --git a/app-config.production.yaml b/app-config.production.yaml index d567928..a466b0a 100644 --- a/app-config.production.yaml +++ b/app-config.production.yaml @@ -19,7 +19,7 @@ backend: # hostname. # host: 0.0.0.0 - # config options: https://node-postgres.com/api/client + # config options: https://node-postgres.com/apis/client database: client: pg connection: diff --git a/app-config.yaml b/app-config.yaml index 531a574..193bf91 100644 --- a/app-config.yaml +++ b/app-config.yaml @@ -78,6 +78,9 @@ auth: development: clientId: ${AUTH_GITHUB_CLIENT_ID} clientSecret: ${AUTH_GITHUB_CLIENT_SECRET} + # See https://backstage.io/docs/auth/guest/provider + # guest: {} + guest: null scaffolder: # see https://backstage.io/docs/features/software-templates/configuration for software template options @@ -102,5 +105,3 @@ catalog: filters: branch: 'main' repository: 'openedx-backstage' - - diff --git a/backstage.json b/backstage.json index 3877444..041f4ff 100644 --- a/backstage.json +++ b/backstage.json @@ -1,3 +1,3 @@ { - "version": "1.19.3" + "version": "1.29.2" } diff --git a/package.json b/package.json index f92a47f..6c44e25 100644 --- a/package.json +++ b/package.json @@ -32,19 +32,19 @@ ] }, "devDependencies": { - "@backstage/cli": "^0.23.0", - "@backstage/e2e-test-utils": "^0.1.0", + "@backstage/cli": "^0.26.11", + "@backstage/e2e-test-utils": "^0.1.1", "@playwright/test": "^1.32.3", "@spotify/prettier-config": "^12.0.0", "concurrently": "^8.0.0", "lerna": "^7.3.0", - "node-gyp": "^9.0.0", + "node-gyp": "^10.0.0", "prettier": "^2.3.2", - "typescript": "~5.2.0" + "typescript": "~5.4.0" }, "resolutions": { - "@types/react": "^17", - "@types/react-dom": "^17" + "@types/react": "^18", + "@types/react-dom": "^18" }, "prettier": "@spotify/prettier-config", "lint-staged": { diff --git a/packages/app/e2e-tests/app.test.ts b/packages/app/e2e-tests/app.test.ts new file mode 100644 index 0000000..4c50119 --- /dev/null +++ b/packages/app/e2e-tests/app.test.ts @@ -0,0 +1,28 @@ +/* + * Copyright 2020 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { test, expect } from '@playwright/test'; + +test('App should render the welcome page', async ({ page }) => { + await page.goto('/'); + + const enterButton = page.getByRole('button', { name: 'Enter' }); + await expect(enterButton).toBeVisible(); + await enterButton.click(); + + await expect(page.getByText('My Company Catalog')).toBeVisible(); +}); + diff --git a/packages/app/package.json b/packages/app/package.json index 00f57c4..99d4085 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -14,47 +14,47 @@ "lint": "backstage-cli package lint" }, "dependencies": { - "@backstage/app-defaults": "^1.4.4", - "@backstage/catalog-model": "^1.4.3", - "@backstage/cli": "^0.23.0", - "@backstage/core-app-api": "^1.11.0", - "@backstage/core-components": "^0.13.6", - "@backstage/core-plugin-api": "^1.7.0", - "@backstage/integration-react": "^1.1.20", - "@backstage/plugin-api-docs": "^0.9.12", - "@backstage/plugin-catalog": "^1.14.0", - "@backstage/plugin-catalog-common": "^1.0.17", - "@backstage/plugin-catalog-graph": "^0.2.37", - "@backstage/plugin-catalog-import": "^0.10.1", - "@backstage/plugin-catalog-react": "^1.8.5", - "@backstage/plugin-github-actions": "^0.6.6", - "@backstage/plugin-org": "^0.6.15", - "@backstage/plugin-permission-react": "^0.4.16", - "@backstage/plugin-scaffolder": "^1.15.1", - "@backstage/plugin-search": "^1.4.1", - "@backstage/plugin-search-react": "^1.7.1", - "@backstage/plugin-tech-radar": "^0.6.9", - "@backstage/plugin-techdocs": "^1.8.0", - "@backstage/plugin-techdocs-module-addons-contrib": "^1.1.1", - "@backstage/plugin-techdocs-react": "^1.1.12", - "@backstage/plugin-user-settings": "^0.7.11", - "@backstage/theme": "^0.4.3", + "@backstage-community/plugin-github-actions": "^0.6.19", + "@backstage-community/plugin-tech-radar": "^0.7.6", + "@backstage/app-defaults": "^1.5.9", + "@backstage/catalog-model": "^1.5.0", + "@backstage/cli": "^0.26.11", + "@backstage/core-app-api": "^1.14.1", + "@backstage/core-components": "^0.14.9", + "@backstage/core-plugin-api": "^1.9.3", + "@backstage/integration-react": "^1.1.29", + "@backstage/plugin-api-docs": "^0.11.7", + "@backstage/plugin-catalog": "^1.21.1", + "@backstage/plugin-catalog-common": "^1.0.25", + "@backstage/plugin-catalog-graph": "^0.4.7", + "@backstage/plugin-catalog-import": "^0.12.1", + "@backstage/plugin-catalog-react": "^1.12.2", + "@backstage/plugin-org": "^0.6.27", + "@backstage/plugin-permission-react": "^0.4.24", + "@backstage/plugin-scaffolder": "^1.23.0", + "@backstage/plugin-search": "^1.4.14", + "@backstage/plugin-search-react": "^1.7.13", + "@backstage/plugin-techdocs": "^1.10.7", + "@backstage/plugin-techdocs-module-addons-contrib": "^1.1.12", + "@backstage/plugin-techdocs-react": "^1.2.6", + "@backstage/plugin-user-settings": "^0.8.10", + "@backstage/theme": "^0.5.6", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "history": "^5.0.0", - "react": "^17.0.2", - "react-dom": "^17.0.2", + "react": "^18.0.2", + "react-dom": "^18.0.2", "react-router": "^6.3.0", "react-router-dom": "^6.3.0", "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/test-utils": "^1.4.4", + "@backstage/test-utils": "^1.5.9", "@playwright/test": "^1.32.3", - "@testing-library/jest-dom": "^5.10.1", - "@testing-library/react": "^12.1.3", + "@testing-library/dom": "^9.0.0", + "@testing-library/jest-dom": "^6.0.0", + "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.0.0", - "@testing-library/dom": "^8.0.0", "@types/node": "^16.11.26", "@types/react-dom": "*", "cross-env": "^7.0.0" diff --git a/packages/app/public/index.html b/packages/app/public/index.html index fc758ee..18da7c4 100644 --- a/packages/app/public/index.html +++ b/packages/app/public/index.html @@ -6,7 +6,7 @@