From 59146686550088f7c345162fefa8155a7aaa3ad2 Mon Sep 17 00:00:00 2001 From: Oliver Sand Date: Tue, 12 Oct 2021 17:52:42 +0200 Subject: [PATCH] Remove @backstage/plugin-welcome Signed-off-by: Oliver Sand --- .changeset/rare-cooks-play.md | 14 ++ docs/getting-started/contributors.md | 2 +- plugins/welcome/.eslintrc.js | 3 - plugins/welcome/CHANGELOG.md | 212 ------------------ plugins/welcome/README.md | 10 - plugins/welcome/api-report.md | 21 -- plugins/welcome/dev/index.tsx | 27 --- plugins/welcome/package.json | 61 ----- .../WelcomePage/WelcomePage.test.tsx | 46 ---- .../components/WelcomePage/WelcomePage.tsx | 166 -------------- .../src/components/WelcomePage/index.ts | 17 -- plugins/welcome/src/index.ts | 23 -- plugins/welcome/src/plugin.test.ts | 23 -- plugins/welcome/src/plugin.ts | 40 ---- plugins/welcome/src/setupTests.ts | 17 -- 15 files changed, 15 insertions(+), 667 deletions(-) create mode 100644 .changeset/rare-cooks-play.md delete mode 100644 plugins/welcome/.eslintrc.js delete mode 100644 plugins/welcome/CHANGELOG.md delete mode 100644 plugins/welcome/README.md delete mode 100644 plugins/welcome/api-report.md delete mode 100644 plugins/welcome/dev/index.tsx delete mode 100644 plugins/welcome/package.json delete mode 100644 plugins/welcome/src/components/WelcomePage/WelcomePage.test.tsx delete mode 100644 plugins/welcome/src/components/WelcomePage/WelcomePage.tsx delete mode 100644 plugins/welcome/src/components/WelcomePage/index.ts delete mode 100644 plugins/welcome/src/index.ts delete mode 100644 plugins/welcome/src/plugin.test.ts delete mode 100644 plugins/welcome/src/plugin.ts delete mode 100644 plugins/welcome/src/setupTests.ts diff --git a/.changeset/rare-cooks-play.md b/.changeset/rare-cooks-play.md new file mode 100644 index 0000000000..b76d34ee62 --- /dev/null +++ b/.changeset/rare-cooks-play.md @@ -0,0 +1,14 @@ +--- +'@backstage/create-app': minor +--- + +Removed `@backstage/plugin-welcome`, no new updates to the packages will be +published in the future. + +The welcome plugin was used by early alpha versions of Backstage, but today only +contained a simple page with welcome instructions. It was superseded by +`@backstage/plugin-home` which can be used to build a homepage customized to the +needs of your organization. + +If it's still used in your app, remove the dependency from your `package.json` +as well as left over code. diff --git a/docs/getting-started/contributors.md b/docs/getting-started/contributors.md index ed56d63cab..28b062b5ca 100644 --- a/docs/getting-started/contributors.md +++ b/docs/getting-started/contributors.md @@ -96,7 +96,7 @@ yarn start # Start serving the example app, use --check to include type checks a yarn storybook # Start local storybook, useful for working on components in @backstage/core-components -yarn workspace @backstage/plugin-welcome start # Serve welcome plugin only, also supports --check +yarn workspace @backstage/plugin-api-docs start # Serve api-docs plugin only, also supports --check yarn tsc # Run typecheck, use --watch for watch mode yarn tsc:full # Run full type checking, for example without skipLibCheck, use in CI diff --git a/plugins/welcome/.eslintrc.js b/plugins/welcome/.eslintrc.js deleted file mode 100644 index 13573efa9c..0000000000 --- a/plugins/welcome/.eslintrc.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - extends: [require.resolve('@backstage/cli/config/eslint')], -}; diff --git a/plugins/welcome/CHANGELOG.md b/plugins/welcome/CHANGELOG.md deleted file mode 100644 index 3f9412a073..0000000000 --- a/plugins/welcome/CHANGELOG.md +++ /dev/null @@ -1,212 +0,0 @@ -# @backstage/plugin-welcome - -## 0.3.8 - -### Patch Changes - -- Updated dependencies - - @backstage/core-components@0.7.0 - - @backstage/theme@0.2.11 - -## 0.3.7 - -### Patch Changes - -- 81a41ec249: Added a `name` key to all extensions in order to improve Analytics API metadata. -- Updated dependencies - - @backstage/core-components@0.6.1 - - @backstage/core-plugin-api@0.1.10 - -## 0.3.6 - -### Patch Changes - -- Updated dependencies - - @backstage/core-plugin-api@0.1.9 - - @backstage/core-components@0.6.0 - -## 0.3.5 - -### Patch Changes - -- Updated dependencies - - @backstage/core-components@0.5.0 - -## 0.3.4 - -### Patch Changes - -- 9f1362dcc1: Upgrade `@material-ui/lab` to `4.0.0-alpha.57`. -- Updated dependencies - - @backstage/core-components@0.4.2 - - @backstage/core-plugin-api@0.1.8 - -## 0.3.3 - -### Patch Changes - -- Updated dependencies - - @backstage/core-components@0.4.0 - -## 0.3.2 - -### Patch Changes - -- Updated dependencies - - @backstage/core-components@0.3.0 - - @backstage/core-plugin-api@0.1.5 - -## 0.3.1 - -### Patch Changes - -- 9d40fcb1e: - Bumping `material-ui/core` version to at least `4.12.2` as they made some breaking changes in later versions which broke `Pagination` of the `Table`. - - Switching out `material-table` to `@material-table/core` for support for the later versions of `material-ui/core` - - This causes a minor API change to `@backstage/core-components` as the interface for `Table` re-exports the `prop` from the underlying `Table` components. - - `onChangeRowsPerPage` has been renamed to `onRowsPerPageChange` - - `onChangePage` has been renamed to `onPageChange` - - Migration guide is here: https://material-table-core.com/docs/breaking-changes -- Updated dependencies - - @backstage/core-components@0.2.0 - - @backstage/core-plugin-api@0.1.4 - - @backstage/theme@0.2.9 - -## 0.3.0 - -### Minor Changes - -- d719926d2: **BREAKING CHANGE** Remove deprecated route registrations, meaning that it is no longer enough to only import the plugin in the app and the exported page extension must be used instead. - -### Patch Changes - -- 48c9fcd33: Migrated to use the new `@backstage/core-*` packages rather than `@backstage/core`. -- Updated dependencies - - @backstage/core-plugin-api@0.1.3 - -## 0.2.8 - -### Patch Changes - -- 062bbf90f: chore: bump `@testing-library/user-event` from 12.8.3 to 13.1.8 -- 675a569a9: chore: bump `react-use` dependency in all packages -- Updated dependencies [062bbf90f] -- Updated dependencies [889d89b6e] -- Updated dependencies [3f988cb63] -- Updated dependencies [675a569a9] - - @backstage/core@0.7.9 - -## 0.2.7 - -### Patch Changes - -- f85851837: Australian Greeting -- Updated dependencies [94da20976] -- Updated dependencies [d8cc7e67a] -- Updated dependencies [99fbef232] -- Updated dependencies [ab07d77f6] -- Updated dependencies [931b21a12] -- Updated dependencies [937ed39ce] -- Updated dependencies [9a9e7a42f] -- Updated dependencies [50ce875a0] - - @backstage/core@0.7.6 - - @backstage/theme@0.2.6 - -## 0.2.6 - -### Patch Changes - -- Updated dependencies [40c0fdbaa] -- Updated dependencies [2a271d89e] -- Updated dependencies [bece09057] -- Updated dependencies [169f48deb] -- Updated dependencies [8a1566719] -- Updated dependencies [4c049a1a1] - - @backstage/core@0.7.0 - -## 0.2.5 - -### Patch Changes - -- 8dfdec613: Migrated to new composability API, exporting the plugin as `welcomePlugin` and the page as `WelcomePage`. -- Updated dependencies [12ece98cd] -- Updated dependencies [d82246867] -- Updated dependencies [c810082ae] -- Updated dependencies [5fa3bdb55] -- Updated dependencies [21e624ba9] -- Updated dependencies [da9f53c60] -- Updated dependencies [32c95605f] -- Updated dependencies [54c7d02f7] - - @backstage/core@0.6.0 - - @backstage/theme@0.2.3 - -## 0.2.4 - -### Patch Changes - -- Updated dependencies [efd6ef753] -- Updated dependencies [a187b8ad0] - - @backstage/core@0.5.0 - -## 0.2.3 - -### Patch Changes - -- Updated dependencies [2527628e1] -- Updated dependencies [1c69d4716] -- Updated dependencies [1665ae8bb] -- Updated dependencies [04f26f88d] -- Updated dependencies [ff243ce96] - - @backstage/core@0.4.0 - - @backstage/theme@0.2.2 - -## 0.2.2 - -### Patch Changes - -- 303c5ea17: Refactor route registration to remove deprecating code - -## 0.2.1 - -### Patch Changes - -- Updated dependencies [7b37d65fd] -- Updated dependencies [4aca74e08] -- Updated dependencies [e8f69ba93] -- Updated dependencies [0c0798f08] -- Updated dependencies [0c0798f08] -- Updated dependencies [199237d2f] -- Updated dependencies [6627b626f] -- Updated dependencies [4577e377b] - - @backstage/core@0.3.0 - - @backstage/theme@0.2.1 - -## 0.2.0 - -### Minor Changes - -- 28edd7d29: Create backend plugin through CLI - -### Patch Changes - -- Updated dependencies [819a70229] -- Updated dependencies [ae5983387] -- Updated dependencies [0d4459c08] -- Updated dependencies [482b6313d] -- Updated dependencies [1c60f716e] -- Updated dependencies [144c66d50] -- Updated dependencies [b79017fd3] -- Updated dependencies [6d97d2d6f] -- Updated dependencies [93a3fa3ae] -- Updated dependencies [782f3b354] -- Updated dependencies [2713f28f4] -- Updated dependencies [406015b0d] -- Updated dependencies [82759d3e4] -- Updated dependencies [ac8d5d5c7] -- Updated dependencies [ebca83d48] -- Updated dependencies [aca79334f] -- Updated dependencies [c0d5242a0] -- Updated dependencies [3beb5c9fc] -- Updated dependencies [754e31db5] -- Updated dependencies [1611c6dbc] - - @backstage/core@0.2.0 - - @backstage/theme@0.2.0 diff --git a/plugins/welcome/README.md b/plugins/welcome/README.md deleted file mode 100644 index c40a760c7c..0000000000 --- a/plugins/welcome/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Title - -> This plugin formerly provided the "homepage" of early alpha versions of Backstage. -> It is no longer in active use and in most cases can be removed from your instance. - -Welcome to the welcome plugin! - -## Sub-section 1 - -## Sub-section 2 diff --git a/plugins/welcome/api-report.md b/plugins/welcome/api-report.md deleted file mode 100644 index 02a46615f3..0000000000 --- a/plugins/welcome/api-report.md +++ /dev/null @@ -1,21 +0,0 @@ -## API Report File for "@backstage/plugin-welcome" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts -/// - -import { BackstagePlugin } from '@backstage/core-plugin-api'; - -// Warning: (ae-missing-release-tag) "WelcomePage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export const WelcomePage: () => JSX.Element; - -// Warning: (ae-missing-release-tag) "welcomePlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -const welcomePlugin: BackstagePlugin<{}, {}>; -export { welcomePlugin as plugin }; -export { welcomePlugin }; -``` diff --git a/plugins/welcome/dev/index.tsx b/plugins/welcome/dev/index.tsx deleted file mode 100644 index 5d4a5c1587..0000000000 --- a/plugins/welcome/dev/index.tsx +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 React from 'react'; -import { createDevApp } from '@backstage/dev-utils'; -import { welcomePlugin, WelcomePage } from '../src/plugin'; - -createDevApp() - .registerPlugin(welcomePlugin) - .addPage({ - title: 'Welcome', - element: , - }) - .render(); diff --git a/plugins/welcome/package.json b/plugins/welcome/package.json deleted file mode 100644 index a286857ccc..0000000000 --- a/plugins/welcome/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "@backstage/plugin-welcome", - "description": "An old Backstage plugin that provides a welcome page", - "version": "0.3.8", - "main": "src/index.ts", - "types": "src/index.ts", - "private": false, - "license": "Apache-2.0", - "publishConfig": { - "access": "public", - "main": "dist/index.esm.js", - "types": "dist/index.d.ts" - }, - "homepage": "https://backstage.io", - "repository": { - "type": "git", - "url": "https://github.com/backstage/backstage", - "directory": "plugins/welcome" - }, - "keywords": [ - "backstage" - ], - "scripts": { - "build": "backstage-cli plugin:build", - "lint": "backstage-cli lint", - "test": "backstage-cli test", - "diff": "backstage-cli plugin:diff", - "prepack": "backstage-cli prepack", - "postpack": "backstage-cli postpack", - "clean": "backstage-cli clean", - "start": "backstage-cli plugin:serve" - }, - "dependencies": { - "@backstage/core-components": "^0.7.0", - "@backstage/core-plugin-api": "^0.1.10", - "@backstage/theme": "^0.2.11", - "@material-ui/core": "^4.12.2", - "@material-ui/icons": "^4.9.1", - "@material-ui/lab": "4.0.0-alpha.57", - "react": "^16.13.1", - "react-dom": "^16.13.1", - "react-router-dom": "6.0.0-beta.0", - "react-use": "^17.2.4" - }, - "devDependencies": { - "@backstage/cli": "^0.7.16", - "@backstage/core-app-api": "^0.1.17", - "@backstage/dev-utils": "^0.2.12", - "@backstage/test-utils": "^0.1.19", - "@testing-library/jest-dom": "^5.10.1", - "@testing-library/react": "^11.2.5", - "@testing-library/user-event": "^13.1.8", - "@types/jest": "^26.0.7", - "@types/node": "^14.14.32", - "cross-fetch": "^3.0.6", - "msw": "^0.29.0" - }, - "files": [ - "dist" - ] -} diff --git a/plugins/welcome/src/components/WelcomePage/WelcomePage.test.tsx b/plugins/welcome/src/components/WelcomePage/WelcomePage.test.tsx deleted file mode 100644 index 22be84a4bf..0000000000 --- a/plugins/welcome/src/components/WelcomePage/WelcomePage.test.tsx +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 { renderInTestApp } from '@backstage/test-utils'; -import { lightTheme } from '@backstage/theme'; -import { ThemeProvider } from '@material-ui/core'; -import React from 'react'; -import WelcomePage from './WelcomePage'; - -import { - ApiProvider, - ApiRegistry, - ConfigReader, -} from '@backstage/core-app-api'; -import { configApiRef, errorApiRef } from '@backstage/core-plugin-api'; - -describe('WelcomePage', () => { - it('should render', async () => { - const { baseElement } = await renderInTestApp( - - - - - , - ); - expect(baseElement).toBeInTheDocument(); - }); -}); diff --git a/plugins/welcome/src/components/WelcomePage/WelcomePage.tsx b/plugins/welcome/src/components/WelcomePage/WelcomePage.tsx deleted file mode 100644 index ce45b1b031..0000000000 --- a/plugins/welcome/src/components/WelcomePage/WelcomePage.tsx +++ /dev/null @@ -1,166 +0,0 @@ -/* - * 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 React from 'react'; -import { Link as RouterLink } from 'react-router-dom'; -import { - Typography, - Grid, - List, - ListItem, - ListItemText, - Link, -} from '@material-ui/core'; - -import { - Content, - InfoCard, - Header, - HomepageTimer, - Page, - ContentHeader, - SupportButton, - WarningPanel, -} from '@backstage/core-components'; - -import { useApi, configApiRef } from '@backstage/core-plugin-api'; - -const WelcomePage = () => { - const appTitle = - useApi(configApiRef).getOptionalString('app.title') ?? 'Backstage'; - const profile = { givenName: '' }; - - return ( - -
- -
- - - - - - - - - We created Backstage about 4 years ago. While Spotify's - internal version of Backstage has had the benefit of time to - mature and evolve, the first iteration of our open source - version is still nascent. We are envisioning three phases of - the project and we have already begun work on various aspects - of these phases. The best way to keep track of the progress is - through the  - - Milestones - - . - - } - /> - - - - - You now have a running instance of Backstage!  - - 🎉 - -  Let's make sure you get the most out of this platform by - walking you through the basics. - - - The Setup - - - Backstage is put together from three base concepts: the core, - the app and the plugins. - - - - - - - - - - - - - - Build Your Plugins - - - We suggest you either check out the documentation for{' '} - - creating a plugin - {' '} - or have a look in the code for the{' '} - - existing plugins - {' '} - in the directory{' '} - - plugins/ - - . - - - - - - - - backstage.io - - - - Create a plugin - - - - Plugin gallery - - - - - - -
- ); -}; - -export default WelcomePage; diff --git a/plugins/welcome/src/components/WelcomePage/index.ts b/plugins/welcome/src/components/WelcomePage/index.ts deleted file mode 100644 index 0347756aa9..0000000000 --- a/plugins/welcome/src/components/WelcomePage/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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. - */ - -export { default } from './WelcomePage'; diff --git a/plugins/welcome/src/index.ts b/plugins/welcome/src/index.ts deleted file mode 100644 index df8f99b6ed..0000000000 --- a/plugins/welcome/src/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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. - */ - -/** - * An old Backstage plugin that provides a welcome page - * - * @packageDocumentation - */ - -export { welcomePlugin, welcomePlugin as plugin, WelcomePage } from './plugin'; diff --git a/plugins/welcome/src/plugin.test.ts b/plugins/welcome/src/plugin.test.ts deleted file mode 100644 index 8b429f0526..0000000000 --- a/plugins/welcome/src/plugin.test.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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 { welcomePlugin } from './plugin'; - -describe('welcome', () => { - it('should export plugin', () => { - expect(welcomePlugin).toBeDefined(); - }); -}); diff --git a/plugins/welcome/src/plugin.ts b/plugins/welcome/src/plugin.ts deleted file mode 100644 index 187a7b5b96..0000000000 --- a/plugins/welcome/src/plugin.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 { - createPlugin, - createRoutableExtension, - createRouteRef, -} from '@backstage/core-plugin-api'; - -export const rootRouteRef = createRouteRef({ - title: 'Welcome', -}); - -export const welcomePlugin = createPlugin({ - id: 'welcome', - register({ featureFlags }) { - featureFlags.register('enable-welcome-box'); - }, -}); - -export const WelcomePage = welcomePlugin.provide( - createRoutableExtension({ - name: 'WelcomePage', - component: () => import('./components/WelcomePage').then(m => m.default), - mountPoint: rootRouteRef, - }), -); diff --git a/plugins/welcome/src/setupTests.ts b/plugins/welcome/src/setupTests.ts deleted file mode 100644 index 963c0f188b..0000000000 --- a/plugins/welcome/src/setupTests.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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 '@testing-library/jest-dom';