diff --git a/.changeset/angry-dingos-lick.md b/.changeset/angry-dingos-lick.md deleted file mode 100644 index 933f19a839..0000000000 --- a/.changeset/angry-dingos-lick.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@backstage/plugin-catalog-graph': patch -'@backstage/plugin-pagerduty': patch -'@backstage/plugin-scaffolder-backend': patch -'@backstage/plugin-splunk-on-call': patch -'@backstage/plugin-techdocs-react': patch ---- - -Internal refactor to improve tests diff --git a/.changeset/angry-trees-relax.md b/.changeset/angry-trees-relax.md deleted file mode 100644 index 64dd50366c..0000000000 --- a/.changeset/angry-trees-relax.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@backstage/plugin-scaffolder': patch ---- - -Enabling the customization of the last step in the scaffolder template. - -To override the content you have to do the next: - -```typescript jsx - -``` diff --git a/.changeset/beige-chairs-repair.md b/.changeset/beige-chairs-repair.md deleted file mode 100644 index 20cad7be6e..0000000000 --- a/.changeset/beige-chairs-repair.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend-module-bitbucket-cloud': patch ---- - -Refresh (potentially) updated catalog files on `repo:push` more efficiently. diff --git a/.changeset/beige-chairs-wink.md b/.changeset/beige-chairs-wink.md deleted file mode 100644 index 40724c254f..0000000000 --- a/.changeset/beige-chairs-wink.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-cost-insights': patch ---- - -Added Y axis for metric data, with relevant formatting and data domain diff --git a/.changeset/beige-rats-cheer.md b/.changeset/beige-rats-cheer.md new file mode 100644 index 0000000000..c523ffa104 --- /dev/null +++ b/.changeset/beige-rats-cheer.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-plugin-api': patch +--- + +Added `RootLifecycleService` and `rootLifecycleServiceRef`, as well as added a `labels` option to the existing `LifecycleServiceShutdownHook`. diff --git a/.changeset/blue-carrots-cross.md b/.changeset/blue-carrots-cross.md new file mode 100644 index 0000000000..fdf91e673c --- /dev/null +++ b/.changeset/blue-carrots-cross.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Removed unnecessary usage of `ThemeProvider` from the `ExampleComponent` test in the plugin template. diff --git a/.changeset/blue-chefs-know.md b/.changeset/blue-chefs-know.md deleted file mode 100644 index fa06f52caa..0000000000 --- a/.changeset/blue-chefs-know.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-azure-devops-backend': patch ---- - -Updated installation documentation diff --git a/.changeset/brave-bags-sniff.md b/.changeset/brave-bags-sniff.md deleted file mode 100644 index 751e99b41b..0000000000 --- a/.changeset/brave-bags-sniff.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog': minor ---- - -Fixes in kind selectors (now `OwnershipCard` works again). `EntityKindPicker` now accepts an optional `allowedKinds` prop, just like `CatalogKindHeader`. diff --git a/.changeset/brave-eggs-impress.md b/.changeset/brave-eggs-impress.md deleted file mode 100644 index a0df24d8f9..0000000000 --- a/.changeset/brave-eggs-impress.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/plugin-kubernetes-backend': minor -'@backstage/plugin-kubernetes-common': minor -'@backstage/plugin-kubernetes': patch ---- - -Kubernetes plugin now gracefully surfaces transport-level errors (like DNS or timeout, or other socket errors) occurring while fetching data. This will be merged into any data that is fetched successfully, fixing a bug where the whole page would be empty if any fetch operation encountered such an error. diff --git a/.changeset/breezy-apes-mate.md b/.changeset/breezy-apes-mate.md deleted file mode 100644 index 65e7dc2bc4..0000000000 --- a/.changeset/breezy-apes-mate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -Added a new `catalog.rules[].location` configuration that makes it possible to configure catalog rules to only apply to specific locations, either via exact match or a glob pattern. diff --git a/.changeset/bright-pants-cry.md b/.changeset/bright-pants-cry.md new file mode 100644 index 0000000000..88d7356640 --- /dev/null +++ b/.changeset/bright-pants-cry.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Fixed an issue where the CLI would fail to function when there was a mix of workspace and non-workspace versions of the same package in `yarn.lock` when using Yarn 3. diff --git a/.changeset/chilled-ladybugs-cough.md b/.changeset/chilled-ladybugs-cough.md deleted file mode 100644 index 95a86e97c6..0000000000 --- a/.changeset/chilled-ladybugs-cough.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -'@backstage/core-plugin-api': minor ---- - -Added a new `display` property to the `AlertMessage` which can accept the values `permanent` or `transient`. - -Here's a rough example of how to trigger an alert using the new `display` property: - -```ts -import { alertApiRef, useApi } from '@backstage/core-plugin-api'; - -const ExampleTransient = () => { - const alertApi = useApi(alertApiRef); - alertApi.post({ - message: 'Example of Transient Alert', - severity: 'success', - display: 'transient', - }); -}; -``` diff --git a/.changeset/chilly-ads-lay.md b/.changeset/chilly-ads-lay.md deleted file mode 100644 index 844eaa8dc7..0000000000 --- a/.changeset/chilly-ads-lay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/catalog-client': minor ---- - -**BREAKING PRODUCERS**: Added a new `getEntitiesByRefs` endpoint to `CatalogApi`, for efficient batch fetching of entities by ref. diff --git a/.changeset/chilly-bees-dream.md b/.changeset/chilly-bees-dream.md deleted file mode 100644 index 34e401a199..0000000000 --- a/.changeset/chilly-bees-dream.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-app-api': patch ---- - -Updated logger implementations to match interface changes. diff --git a/.changeset/chilly-flies-nail.md b/.changeset/chilly-flies-nail.md deleted file mode 100644 index ffc9627b79..0000000000 --- a/.changeset/chilly-flies-nail.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-kubernetes': patch ---- - -Removed rendering for ErrorEmptyState in ErrorReporting component, so nothing is rendered when there are no errors. Also removed Divider on Kubernetes page. diff --git a/.changeset/chilly-tables-crash.md b/.changeset/chilly-tables-crash.md deleted file mode 100644 index 5c6510fb65..0000000000 --- a/.changeset/chilly-tables-crash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Fix dependency ordering in templated packages. diff --git a/.changeset/clean-paws-fry.md b/.changeset/clean-paws-fry.md deleted file mode 100644 index 5e66a686c0..0000000000 --- a/.changeset/clean-paws-fry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/repo-tools': minor ---- - -Introducing repo-tools package diff --git a/.changeset/clean-seals-whisper.md b/.changeset/clean-seals-whisper.md deleted file mode 100644 index 8891d75f8f..0000000000 --- a/.changeset/clean-seals-whisper.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-search-react': minor ---- - -The `value` of a search analytics event is now set as the total number of search results (when available) diff --git a/.changeset/clever-pillows-drive.md b/.changeset/clever-pillows-drive.md deleted file mode 100644 index f4e60fb869..0000000000 --- a/.changeset/clever-pillows-drive.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -Do not use deprecated `LocationSpec` from the `@backstage/plugin-catalog-node` package diff --git a/.changeset/clever-rivers-obey.md b/.changeset/clever-rivers-obey.md deleted file mode 100644 index 0fac8711e9..0000000000 --- a/.changeset/clever-rivers-obey.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend-module-github': patch ---- - -Fixes the assignment of group member references in `GithubMultiOrgProcessor` so membership relations are resolved correctly. diff --git a/.changeset/clever-starfishes-destroy.md b/.changeset/clever-starfishes-destroy.md new file mode 100644 index 0000000000..3d520410d8 --- /dev/null +++ b/.changeset/clever-starfishes-destroy.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-bazaar': patch +--- + +Created soft cut on `ProjectCard` to indicate more content. diff --git a/.changeset/clever-years-hang.md b/.changeset/clever-years-hang.md new file mode 100644 index 0000000000..31db564c52 --- /dev/null +++ b/.changeset/clever-years-hang.md @@ -0,0 +1,6 @@ +--- +'@backstage/backend-test-utils': patch +'@backstage/backend-defaults': patch +--- + +Include implementations for the new `rootLifecycleServiceRef`. diff --git a/.changeset/cool-islands-laugh.md b/.changeset/cool-islands-laugh.md new file mode 100644 index 0000000000..5ea89043af --- /dev/null +++ b/.changeset/cool-islands-laugh.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend': minor +--- + +Allow custom repository roles to be configured on github repos diff --git a/.changeset/cool-kings-raise.md b/.changeset/cool-kings-raise.md new file mode 100644 index 0000000000..18344b128c --- /dev/null +++ b/.changeset/cool-kings-raise.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-bazaar': patch +--- + +Added `isBazaarAvailable` helper to be used with the `EntitySwitch`. diff --git a/.changeset/create-app-1669720399.md b/.changeset/create-app-1669720399.md deleted file mode 100644 index b50d431d4b..0000000000 --- a/.changeset/create-app-1669720399.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Bumped create-app version. diff --git a/.changeset/create-app-1670332900.md b/.changeset/create-app-1670332900.md deleted file mode 100644 index b50d431d4b..0000000000 --- a/.changeset/create-app-1670332900.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Bumped create-app version. diff --git a/.changeset/create-app-1669131574.md b/.changeset/create-app-1672154523.md similarity index 100% rename from .changeset/create-app-1669131574.md rename to .changeset/create-app-1672154523.md diff --git a/.changeset/curvy-ducks-explode.md b/.changeset/curvy-ducks-explode.md new file mode 100644 index 0000000000..1d631e60a8 --- /dev/null +++ b/.changeset/curvy-ducks-explode.md @@ -0,0 +1,5 @@ +--- +'@backstage/repo-tools': patch +--- + +Use the project tsconfig in case of selection all packages diff --git a/.changeset/cyan-donkeys-arrive.md b/.changeset/cyan-donkeys-arrive.md deleted file mode 100644 index 9358197d1c..0000000000 --- a/.changeset/cyan-donkeys-arrive.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -added default project name for CI job compatibility diff --git a/.changeset/dirty-ads-refuse.md b/.changeset/dirty-ads-refuse.md deleted file mode 100644 index 848800636e..0000000000 --- a/.changeset/dirty-ads-refuse.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend-module-cookiecutter': patch -'@backstage/plugin-scaffolder-backend-module-rails': patch -'@backstage/plugin-scaffolder-backend-module-yeoman': patch -'@backstage/create-app': patch -'@backstage/plugin-scaffolder-backend': patch ---- - -Change step output template examples to use square bracket syntax. diff --git a/.changeset/dry-melons-listen.md b/.changeset/dry-melons-listen.md deleted file mode 100644 index 07342fb88e..0000000000 --- a/.changeset/dry-melons-listen.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/plugin-search-backend': minor -'@backstage/plugin-search-backend-module-elasticsearch': minor -'@backstage/plugin-search-backend-node': minor ---- - -numberOfResults is now provided alongside the query result diff --git a/.changeset/dry-radios-live.md b/.changeset/dry-radios-live.md deleted file mode 100644 index 057d3d0050..0000000000 --- a/.changeset/dry-radios-live.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-explore': patch ---- - -Update search links to only have header as linkable text diff --git a/.changeset/early-hairs-switch.md b/.changeset/early-hairs-switch.md deleted file mode 100644 index 16f4298db5..0000000000 --- a/.changeset/early-hairs-switch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -changed tests created by create-plugin to follow eslint-rules best practices particularly testing-library/prefer-screen-queries and testing-library/render-result-naming-convention diff --git a/.changeset/early-parrots-guess.md b/.changeset/early-parrots-guess.md deleted file mode 100644 index 4df8dcea95..0000000000 --- a/.changeset/early-parrots-guess.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder': patch ---- - -Initialize all `formData` in the `Stepper` in `/next` diff --git a/.changeset/eight-dragons-accept.md b/.changeset/eight-dragons-accept.md new file mode 100644 index 0000000000..a3d46de4a3 --- /dev/null +++ b/.changeset/eight-dragons-accept.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder': patch +--- + +rollback `@rjsf/validator-ajv8` to `@rjsf/validator-v6` diff --git a/.changeset/eight-eels-compete.md b/.changeset/eight-eels-compete.md deleted file mode 100644 index 5cd0cdf041..0000000000 --- a/.changeset/eight-eels-compete.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@backstage/plugin-bazaar-backend': patch -'@backstage/plugin-catalog-backend': patch -'@backstage/plugin-catalog-backend-module-incremental-ingestion': patch -'@backstage/plugin-playlist-backend': patch -'@backstage/plugin-search-backend-module-pg': patch -'@backstage/plugin-user-settings-backend': patch ---- - -Ensured typescript type checks in migration files. diff --git a/.changeset/eight-spiders-know.md b/.changeset/eight-spiders-know.md deleted file mode 100644 index 2e3e54dc0f..0000000000 --- a/.changeset/eight-spiders-know.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@backstage/backend-common': patch -'@backstage/core-app-api': patch -'@backstage/core-components': patch -'@backstage/version-bridge': patch -'@backstage/plugin-analytics-module-ga': patch -'@backstage/plugin-catalog': patch -'@backstage/plugin-cloudbuild': patch -'@backstage/plugin-gcp-projects': patch -'@backstage/plugin-github-actions': patch -'@backstage/plugin-graphiql': patch -'@backstage/plugin-techdocs': patch ---- - -Internal fixes to avoid implicit usage of globals diff --git a/.changeset/eight-tables-hunt.md b/.changeset/eight-tables-hunt.md deleted file mode 100644 index bd1be0047f..0000000000 --- a/.changeset/eight-tables-hunt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -Optimize `Stitcher` process to be more memory efficient diff --git a/.changeset/eighty-melons-walk.md b/.changeset/eighty-melons-walk.md deleted file mode 100644 index bf9ee2d78f..0000000000 --- a/.changeset/eighty-melons-walk.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-org': patch ---- - -Made all the ownership boxes the same size diff --git a/.changeset/eleven-jeans-train.md b/.changeset/eleven-jeans-train.md deleted file mode 100644 index 7039c85900..0000000000 --- a/.changeset/eleven-jeans-train.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Removed the unused dependency on `@sucrase/jest-plugin`. diff --git a/.changeset/eleven-trains-double.md b/.changeset/eleven-trains-double.md new file mode 100644 index 0000000000..ec07372678 --- /dev/null +++ b/.changeset/eleven-trains-double.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-graph': patch +--- + +The link from the `CatalogGraphCard` to the `CatalogGraphPage` no longer includes an explicit `maxDepth` parameter, letting the `CatalogGraphPage` choose the initial `maxDepth` instead. diff --git a/.changeset/empty-taxis-run.md b/.changeset/empty-taxis-run.md deleted file mode 100644 index d0360b4521..0000000000 --- a/.changeset/empty-taxis-run.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -'@backstage/backend-app-api': patch -'@backstage/plugin-app-backend': patch -'@backstage/plugin-catalog-backend': patch -'@backstage/plugin-catalog-backend-module-aws': patch -'@backstage/plugin-catalog-backend-module-azure': patch -'@backstage/plugin-catalog-backend-module-bitbucket-cloud': patch -'@backstage/plugin-catalog-backend-module-bitbucket-server': patch -'@backstage/plugin-catalog-backend-module-gerrit': patch -'@backstage/plugin-catalog-backend-module-github': patch -'@backstage/plugin-catalog-backend-module-gitlab': patch -'@backstage/plugin-catalog-backend-module-incremental-ingestion': patch -'@backstage/plugin-catalog-backend-module-msgraph': patch -'@backstage/plugin-catalog-node': patch -'@backstage/plugin-events-backend': patch -'@backstage/plugin-events-backend-module-aws-sqs': patch -'@backstage/plugin-events-backend-module-github': patch -'@backstage/plugin-events-backend-module-gitlab': patch -'@backstage/plugin-scaffolder-backend': patch ---- - -Refactored to use `coreServices` from `@backstage/backend-plugin-api`. diff --git a/.changeset/fair-walls-talk.md b/.changeset/fair-walls-talk.md deleted file mode 100644 index 3e3ee26160..0000000000 --- a/.changeset/fair-walls-talk.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-org-react': patch ---- - -Bug fixes and adding the possibility to add a default value for the `GroupListPicker`. Fixes: Vertical size jump on text entry, left align for text, selecting a value closes the popup, auto focus on the popup when opening diff --git a/.changeset/famous-cobras-suffer.md b/.changeset/famous-cobras-suffer.md deleted file mode 100644 index d09948f876..0000000000 --- a/.changeset/famous-cobras-suffer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend-module-github': patch ---- - -Added the githubCredentialsProvider property to the GithubLocationAnalyzerOptions to be able to override the GithubCredentialsProvider. diff --git a/.changeset/famous-crews-speak.md b/.changeset/famous-crews-speak.md deleted file mode 100644 index d2246472a0..0000000000 --- a/.changeset/famous-crews-speak.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -Fixed GitlabUrlReader to include api tokens in API calls diff --git a/.changeset/famous-experts-sneeze.md b/.changeset/famous-experts-sneeze.md new file mode 100644 index 0000000000..a6f2762dba --- /dev/null +++ b/.changeset/famous-experts-sneeze.md @@ -0,0 +1,7 @@ +--- +'@backstage/backend-common': minor +--- + +**BREAKING**: Removed deprecated `read` method from the `UrlReader` interface. All implementations should use the `readUrl` method instead. + +Migrated `UrlReader` and related types to `backend/backend-plugin-api`, types remain re-exported from `backend-common` for now. diff --git a/.changeset/fast-lies-remain.md b/.changeset/fast-lies-remain.md deleted file mode 100644 index 74be117920..0000000000 --- a/.changeset/fast-lies-remain.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': minor ---- - -Added new `POST /entities/by-refs` endpoint, which allows you to efficiently -batch-fetch entities by their entity ref. This can be useful e.g. in graphql -resolvers or similar contexts where you need to fetch many entities at the same -time. diff --git a/.changeset/fast-walls-explode.md b/.changeset/fast-walls-explode.md deleted file mode 100644 index ac4c4335bc..0000000000 --- a/.changeset/fast-walls-explode.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Updated Jest coverage configuration to only apply either in the root project or package configuration, depending on whether repo or package tests are run. diff --git a/.changeset/fifty-news-stare.md b/.changeset/fifty-news-stare.md deleted file mode 100644 index 24ad2e20e7..0000000000 --- a/.changeset/fifty-news-stare.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch -'@backstage/plugin-catalog-node': minor ---- - -Make it possible for entity providers to supply only entity refs, instead of full entities, in `delta` mutation deletions. diff --git a/.changeset/fifty-paws-attack.md b/.changeset/fifty-paws-attack.md new file mode 100644 index 0000000000..b7ad24204c --- /dev/null +++ b/.changeset/fifty-paws-attack.md @@ -0,0 +1,8 @@ +--- +'@backstage/catalog-model': patch +'@backstage/plugin-scaffolder-common': patch +'@backstage/plugin-search-backend-module-elasticsearch': patch +'@backstage/plugin-search-backend-node': patch +--- + +Fixed spelling mistakes in documentation. diff --git a/.changeset/fifty-zoos-nail.md b/.changeset/fifty-zoos-nail.md new file mode 100644 index 0000000000..7260a0b542 --- /dev/null +++ b/.changeset/fifty-zoos-nail.md @@ -0,0 +1,5 @@ +--- +'@backstage/catalog-client': minor +--- + +Implemented support for the `order` directive on `getEntities` diff --git a/.changeset/five-trainers-admire.md b/.changeset/five-trainers-admire.md deleted file mode 100644 index e624fc222a..0000000000 --- a/.changeset/five-trainers-admire.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Fix webpack dev server issue where it wasn't serving `index.html` from correct endpoint on subsequent requests. diff --git a/.changeset/fluffy-fans-sing.md b/.changeset/fluffy-fans-sing.md new file mode 100644 index 0000000000..fd875ee00d --- /dev/null +++ b/.changeset/fluffy-fans-sing.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Add experimental environment variable to enable caching for production builds. diff --git a/.changeset/fluffy-forks-happen.md b/.changeset/fluffy-forks-happen.md new file mode 100644 index 0000000000..4c9c2217ba --- /dev/null +++ b/.changeset/fluffy-forks-happen.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-explore-backend': patch +--- + +Bump `msw` to `^0.49.0` diff --git a/.changeset/fluffy-walls-approve.md b/.changeset/fluffy-walls-approve.md deleted file mode 100644 index 968f5cc402..0000000000 --- a/.changeset/fluffy-walls-approve.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -'@backstage/plugin-events-backend': minor ---- - -**BREAKING:** Remove required field `router` at `HttpPostIngressEventPublisher.fromConfig` -and replace it with `bind(router: Router)`. -Additionally, the path prefix `/http` will be added inside `HttpPostIngressEventPublisher`. - -```diff -// at packages/backend/src/plugins/events.ts - const eventsRouter = Router(); -- const httpRouter = Router(); -- eventsRouter.use('/http', httpRouter); - - const http = HttpPostIngressEventPublisher.fromConfig({ - config: env.config, - logger: env.logger, -- router: httpRouter, - }); -+ http.bind(eventsRouter); -``` diff --git a/.changeset/fluffy-worms-arrive.md b/.changeset/fluffy-worms-arrive.md deleted file mode 100644 index 8f95b6c970..0000000000 --- a/.changeset/fluffy-worms-arrive.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -'@backstage/backend-tasks': patch -'@backstage/cli': patch -'@backstage/core-app-api': patch -'@backstage/core-components': patch -'@backstage/plugin-catalog-backend': patch -'@backstage/plugin-permission-backend': patch -'@backstage/plugin-permission-common': patch -'@backstage/plugin-permission-node': patch -'@backstage/plugin-playlist-backend': patch -'@backstage/plugin-scaffolder': patch -'@backstage/plugin-scaffolder-backend': patch -'@backstage/plugin-search-backend': patch ---- - -Move the `zod` dependency to a version that does not collide with other libraries diff --git a/.changeset/forty-baboons-burn.md b/.changeset/forty-baboons-burn.md deleted file mode 100644 index f54b0871c4..0000000000 --- a/.changeset/forty-baboons-burn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-techdocs-node': patch ---- - -Bump dependency @azure/identity to next minor diff --git a/.changeset/forty-carpets-refuse.md b/.changeset/forty-carpets-refuse.md deleted file mode 100644 index a66121658d..0000000000 --- a/.changeset/forty-carpets-refuse.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/integration-aws-node': minor ---- - -New package for AWS integration node library diff --git a/.changeset/forty-years-retire.md b/.changeset/forty-years-retire.md new file mode 100644 index 0000000000..e7b887a1e4 --- /dev/null +++ b/.changeset/forty-years-retire.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +The frontend serve task now filters out allowed package duplicates during its package check, just like `versions:bump` and `versions:check`. diff --git a/.changeset/four-adults-provide.md b/.changeset/four-adults-provide.md deleted file mode 100644 index 0edb4807d9..0000000000 --- a/.changeset/four-adults-provide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-cost-insights': patch ---- - -Provide the ability to change the base currency from USD to any other currency in cost insights plugin diff --git a/.changeset/four-buttons-clean.md b/.changeset/four-buttons-clean.md deleted file mode 100644 index 41af42b45e..0000000000 --- a/.changeset/four-buttons-clean.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog': patch ---- - -Handle refresh entity error in `AboutCard`. diff --git a/.changeset/fresh-news-push.md b/.changeset/fresh-news-push.md deleted file mode 100644 index a77b7a256b..0000000000 --- a/.changeset/fresh-news-push.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-bazaar': patch ---- - -`HomePageBazaarInfoCard` is now displaying `title` instead of `name`. Title is a string that doesn't have to be URL friendly. -The BazaarOverviewCard have the new property `fullHeight`. Link in `BazaarOverviewCard`is moved to header in card. diff --git a/.changeset/funny-numbers-compete.md b/.changeset/funny-numbers-compete.md deleted file mode 100644 index 604ffe7294..0000000000 --- a/.changeset/funny-numbers-compete.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch ---- - -Use Json types from @backstage/types diff --git a/.changeset/funny-pianos-grow.md b/.changeset/funny-pianos-grow.md new file mode 100644 index 0000000000..7823ca82b0 --- /dev/null +++ b/.changeset/funny-pianos-grow.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-react': patch +--- + +Fixed bug in `EntityTagPicker` that filtered on unavailable tags for the selected kind. diff --git a/.changeset/fuzzy-rivers-search.md b/.changeset/fuzzy-rivers-search.md deleted file mode 100644 index 4a82d1884c..0000000000 --- a/.changeset/fuzzy-rivers-search.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -'@backstage/core-app-api': minor ---- - -Added a new `AppRouter` component and `app.createRoot()` method that replaces `app.getRouter()` and `app.getProvider()`, which are now deprecated. The new `AppRouter` component is a drop-in replacement for the old router component, while the new `app.createRoot()` method is used instead of the old provider component. - -An old app setup might look like this: - -```tsx -const app = createApp(/* ... */); - -const AppProvider = app.getProvider(); -const AppRouter = app.getRouter(); - -const routes = ...; - -const App = () => ( - - - - - {routes} - - -); - -export default App; -``` - -With these new APIs, the setup now looks like this: - -```tsx -import { AppRouter } from '@backstage/core-app-api'; - -const app = createApp(/* ... */); - -const routes = ...; - -export default app.createRoot( - <> - - - - {routes} - - , -); -``` - -Note that `app.createRoot()` accepts a React element, rather than a component. diff --git a/.changeset/gentle-ligers-help.md b/.changeset/gentle-ligers-help.md deleted file mode 100644 index f7f9c3b270..0000000000 --- a/.changeset/gentle-ligers-help.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-app-api': patch ---- - -Tweak feature flag registration so that it happens immediately before the first rendering of the app, rather than just after. diff --git a/.changeset/gold-icons-cheat.md b/.changeset/gold-icons-cheat.md deleted file mode 100644 index 3c5e796c05..0000000000 --- a/.changeset/gold-icons-cheat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Bump `msw` version in default plugin/app templates diff --git a/.changeset/gold-yaks-join.md b/.changeset/gold-yaks-join.md deleted file mode 100644 index 29996d1f74..0000000000 --- a/.changeset/gold-yaks-join.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/test-utils': patch ---- - -The test utility for the plugin context called `MockPluginProvider` has been created. It will be handy in the cases when you use -`__experimentalConfigure` in your plugin. It is experimental and exported through `@backstage/test-utils/alpha`. diff --git a/.changeset/good-foxes-fail.md b/.changeset/good-foxes-fail.md new file mode 100644 index 0000000000..5d31161e64 --- /dev/null +++ b/.changeset/good-foxes-fail.md @@ -0,0 +1,10 @@ +--- +'@backstage/plugin-catalog-backend-module-github': patch +--- + +Added support for event based updates in the `GithubOrgEntityProvider`! +Based on webhook events from GitHub the affected `User` or `Group` entity will be refreshed. +This includes adding new entities, refreshing existing ones, and removing obsolete ones. + +Please find more information at +https://backstage.io/docs/integrations/github/org#installation-with-events-support diff --git a/.changeset/good-geckos-reflect.md b/.changeset/good-geckos-reflect.md new file mode 100644 index 0000000000..315675a3b4 --- /dev/null +++ b/.changeset/good-geckos-reflect.md @@ -0,0 +1,5 @@ +--- +'@backstage/repo-tools': patch +--- + +Move some dependencies as `peerDependencies` because we need to always use same version as in `api-extractor` diff --git a/.changeset/gorgeous-hairs-applaud.md b/.changeset/gorgeous-hairs-applaud.md deleted file mode 100644 index 7793c6591e..0000000000 --- a/.changeset/gorgeous-hairs-applaud.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-search-backend-node': patch ---- - -Wait for indexer initialization before finalizing indexing. diff --git a/.changeset/green-deers-turn.md b/.changeset/green-deers-turn.md deleted file mode 100644 index 394b89b8e3..0000000000 --- a/.changeset/green-deers-turn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-app-api': patch ---- - -Fix for the automatic rewriting of base URLs. diff --git a/.changeset/green-moose-leave.md b/.changeset/green-moose-leave.md deleted file mode 100644 index df6ff04d82..0000000000 --- a/.changeset/green-moose-leave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-test-utils': patch ---- - -Backends started with `startTestBackend` are now automatically stopped after all tests have run. diff --git a/.changeset/healthy-crabs-collect.md b/.changeset/healthy-crabs-collect.md deleted file mode 100644 index 5dc90f9b80..0000000000 --- a/.changeset/healthy-crabs-collect.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-kafka-backend': patch ---- - -Internal tweak to adapt to `kafkajs` 2.2.3 diff --git a/.changeset/healthy-shrimps-notice.md b/.changeset/healthy-shrimps-notice.md deleted file mode 100644 index 2c8e894e8a..0000000000 --- a/.changeset/healthy-shrimps-notice.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': minor ---- - -Added `requiredConversationResolution` template option to `github:repo:create`, `github:repo:push` and `publish:github` diff --git a/.changeset/healthy-waves-compare.md b/.changeset/healthy-waves-compare.md deleted file mode 100644 index cdd19d1450..0000000000 --- a/.changeset/healthy-waves-compare.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': minor ---- - -Deprecated Prometheus metrics in favour of OpenTelemtry metrics. diff --git a/.changeset/hip-chairs-tap.md b/.changeset/hip-chairs-tap.md deleted file mode 100644 index 8eca0a9292..0000000000 --- a/.changeset/hip-chairs-tap.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-cost-insights': patch ---- - -Internal refactor to avoid usage of deprecated symbols diff --git a/.changeset/hip-stingrays-kneel.md b/.changeset/hip-stingrays-kneel.md deleted file mode 100644 index 171e9257f2..0000000000 --- a/.changeset/hip-stingrays-kneel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-components': patch ---- - -Create a variable for minimum height and add a prop named 'fit' for determining if the graph height should grow or be contained. diff --git a/.changeset/hip-wasps-yell.md b/.changeset/hip-wasps-yell.md deleted file mode 100644 index 1cdea4e84d..0000000000 --- a/.changeset/hip-wasps-yell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-bazaar': patch ---- - -Add `title` as optional parameter to `BazaarOverviewCard` diff --git a/.changeset/honest-spoons-design.md b/.changeset/honest-spoons-design.md deleted file mode 100644 index 81e0740366..0000000000 --- a/.changeset/honest-spoons-design.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/errors': patch ---- - -Removed a circular import diff --git a/.changeset/dirty-bees-explode.md b/.changeset/hungry-falcons-cross.md similarity index 60% rename from .changeset/dirty-bees-explode.md rename to .changeset/hungry-falcons-cross.md index 0df3bc3b3e..73c31ca7d6 100644 --- a/.changeset/dirty-bees-explode.md +++ b/.changeset/hungry-falcons-cross.md @@ -2,4 +2,4 @@ '@backstage/core-components': patch --- -Update sidebar icon alignment +Applied fix from v1.9.1 diff --git a/.changeset/itchy-walls-boil.md b/.changeset/itchy-walls-boil.md deleted file mode 100644 index 2afd0287fe..0000000000 --- a/.changeset/itchy-walls-boil.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-user-settings': minor ---- - -Added the ability to fully customize settings page. Deprecated UserSettingsTab in favour of SettingsLayout.Route diff --git a/.changeset/khaki-baboons-impress.md b/.changeset/khaki-baboons-impress.md new file mode 100644 index 0000000000..4fbcb17a3a --- /dev/null +++ b/.changeset/khaki-baboons-impress.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-plugin-api': patch +--- + +Migrate `UrlReader` into this package to gradually remove the dependency on backend-common. diff --git a/.changeset/kind-tips-pump.md b/.changeset/kind-tips-pump.md deleted file mode 100644 index c61ed97774..0000000000 --- a/.changeset/kind-tips-pump.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-kubernetes-backend': patch ---- - -Clusters declared in the app-config can now have their CA configured via a local filesystem path using the `caFile` property. diff --git a/.changeset/kind-walls-share.md b/.changeset/kind-walls-share.md deleted file mode 100644 index 5df03999b1..0000000000 --- a/.changeset/kind-walls-share.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -exported KubernetesContainerRunner, KubernetesContainerRunnerOptions, KubernetesContainerRunnerMountBase diff --git a/.changeset/late-forks-rescue.md b/.changeset/late-forks-rescue.md new file mode 100644 index 0000000000..294412a711 --- /dev/null +++ b/.changeset/late-forks-rescue.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-explore-backend': patch +'@backstage/plugin-explore': patch +--- + +Updated `README.md` examples diff --git a/.changeset/lemon-coats-camp.md b/.changeset/lemon-coats-camp.md deleted file mode 100644 index f30a20f432..0000000000 --- a/.changeset/lemon-coats-camp.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@backstage/repo-tools': patch ---- - -Add new command options to the `api-report` - -- added `--allow-warnings`, `-a` to continue processing packages if selected packages have warnings -- added `--allow-all-warnings` to continue processing packages any packages have warnings -- added `--omit-messages`, `-o` to pass some warnings messages code to be omitted from the api-report.md files -- The `paths` argument for this command now takes as default the value on `workspaces.packages` inside the root package.json -- change the path resolution to use the `@backstage/cli-common` packages instead diff --git a/.changeset/light-rice-end.md b/.changeset/light-rice-end.md new file mode 100644 index 0000000000..d403b10ed6 --- /dev/null +++ b/.changeset/light-rice-end.md @@ -0,0 +1,5 @@ +--- +'@backstage/repo-tools': patch +--- + +fix glob on windows os diff --git a/.changeset/light-snakes-exercise.md b/.changeset/light-snakes-exercise.md deleted file mode 100644 index 45bd37cf27..0000000000 --- a/.changeset/light-snakes-exercise.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -'@backstage/backend-common': minor -'@backstage/backend-tasks': minor -'@backstage/plugin-catalog-backend-module-incremental-ingestion': patch -'@backstage/plugin-search-backend-node': patch ---- - -Changed to use native `AbortController` and `AbortSignal` from Node.js, instead -of the one from `node-abort-controller`. This is possible now that the minimum -supported Node.js version of the project is 16. - -Note that their interfaces are very slightly different, but typically not in a -way that matters to consumers. If you see any typescript errors as a direct -result from this, they are compatible with each other in the ways that we -interact with them, and should be possible to type-cast across without ill -effects. diff --git a/.changeset/light-turtles-yawn.md b/.changeset/light-turtles-yawn.md deleted file mode 100644 index 3f42fb0524..0000000000 --- a/.changeset/light-turtles-yawn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -Fixed deprecated use of `substr` into `substring`. diff --git a/.changeset/little-chairs-dance.md b/.changeset/little-chairs-dance.md deleted file mode 100644 index c08dd3838c..0000000000 --- a/.changeset/little-chairs-dance.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': minor ---- - -Deprecated the `taskWorkers` option in RouterOptions in favor of `concurrentTasksLimit` which sets the limit of concurrent tasks in a single TaskWorker - -TaskWorker can now run multiple (defaults to 10) tasks concurrently using the `concurrentTasksLimit` option available in both `RouterOptions` and `CreateWorkerOptions`. - -To use the option to create a TaskWorker: - -```diff -const worker = await TaskWorker.create({ - taskBroker, - actionRegistry, - integrations, - logger, - workingDirectory, - additionalTemplateFilters, -+ concurrentTasksLimit: 10 // (1 to Infinity) -}); -``` diff --git a/.changeset/long-eyes-confess.md b/.changeset/long-eyes-confess.md deleted file mode 100644 index f35504f8d7..0000000000 --- a/.changeset/long-eyes-confess.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -'@backstage/app-defaults': patch -'@backstage/core-components': patch -'@backstage/dev-utils': patch -'@backstage/test-utils': patch -'@backstage/plugin-airbrake': patch -'@backstage/plugin-api-docs': patch -'@backstage/plugin-azure-devops': patch -'@backstage/plugin-badges': patch -'@backstage/plugin-catalog': patch -'@backstage/plugin-catalog-graph': patch -'@backstage/plugin-catalog-import': patch -'@backstage/plugin-catalog-react': patch -'@backstage/plugin-circleci': patch -'@backstage/plugin-cloudbuild': patch -'@backstage/plugin-code-climate': patch -'@backstage/plugin-code-coverage': patch -'@backstage/plugin-explore': patch -'@backstage/plugin-git-release-manager': patch -'@backstage/plugin-github-actions': patch -'@backstage/plugin-home': patch -'@backstage/plugin-jenkins': patch -'@backstage/plugin-kafka': patch -'@backstage/plugin-org': patch -'@backstage/plugin-permission-react': patch -'@backstage/plugin-playlist': patch -'@backstage/plugin-rollbar': patch -'@backstage/plugin-scaffolder': patch -'@backstage/plugin-search': patch -'@backstage/plugin-search-react': patch -'@backstage/plugin-sentry': patch -'@backstage/plugin-shortcuts': patch -'@backstage/plugin-techdocs': patch -'@backstage/plugin-todo': patch -'@backstage/plugin-user-settings': patch ---- - -Internal refactor to use `react-router-dom` rather than `react-router`. diff --git a/.changeset/loud-rockets-reply.md b/.changeset/loud-rockets-reply.md deleted file mode 100644 index 85ed77f51f..0000000000 --- a/.changeset/loud-rockets-reply.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend-module-incremental-ingestion': minor ---- - -Introduces incremental entity providers, which are used for streaming very large data sources into the catalog. diff --git a/.changeset/loud-snails-sleep.md b/.changeset/loud-snails-sleep.md deleted file mode 100644 index d72c1a22b4..0000000000 --- a/.changeset/loud-snails-sleep.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-vault-backend': patch ---- - -Added (optional) config `vault.publicUrl` as alternative to `vault.baseUrl` for `editUrl` and `showUrl` in case `vault.baseUrl` is internal diff --git a/.changeset/lucky-apricots-dress.md b/.changeset/lucky-apricots-dress.md new file mode 100644 index 0000000000..777bddfc53 --- /dev/null +++ b/.changeset/lucky-apricots-dress.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-techdocs': patch +--- + +Fix sizing of build log component to render all lines diff --git a/.changeset/lucky-chicken-greet.md b/.changeset/lucky-chicken-greet.md deleted file mode 100644 index 7e061dc040..0000000000 --- a/.changeset/lucky-chicken-greet.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -Internal code reorganization. diff --git a/.changeset/lucky-singers-worry.md b/.changeset/lucky-singers-worry.md deleted file mode 100644 index abefe2bea2..0000000000 --- a/.changeset/lucky-singers-worry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -Track the last time the final entity changed with new timestamp "last updated at" data in final entities database, which gets updated with the time when final entity is updated. diff --git a/.changeset/many-bikes-press.md b/.changeset/many-bikes-press.md deleted file mode 100644 index 68ddb68c05..0000000000 --- a/.changeset/many-bikes-press.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-plugin-api': minor ---- - -**BREAKING**: All core service references are now exported via a single `coreServices` object. For example, the `loggerServiceRef` is now accessed via `coreServices.logger` instead. diff --git a/.changeset/many-mayflies-share.md b/.changeset/many-mayflies-share.md deleted file mode 100644 index 080afc6ac1..0000000000 --- a/.changeset/many-mayflies-share.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-lighthouse': patch ---- - -Fixed "Emulated Form Factor" field in the audit creation form not working with the latest version (1.0.2) of `lighthouse-audit-service`. diff --git a/.changeset/slimy-cameras-hang.md b/.changeset/metal-hotels-deliver.md similarity index 51% rename from .changeset/slimy-cameras-hang.md rename to .changeset/metal-hotels-deliver.md index 1a4d32532a..6b7f9c109b 100644 --- a/.changeset/slimy-cameras-hang.md +++ b/.changeset/metal-hotels-deliver.md @@ -2,4 +2,4 @@ '@backstage/plugin-scaffolder': patch --- -bump `@rjsf/*-v5` dependencies +add `onChange` handler to`Stepper` component diff --git a/.changeset/mighty-parrots-hammer.md b/.changeset/mighty-parrots-hammer.md deleted file mode 100644 index 5a39d8955e..0000000000 --- a/.changeset/mighty-parrots-hammer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -Fix `GitlabUrlReader.readTree` bug when there were no matching commits diff --git a/.changeset/modern-camels-cheat.md b/.changeset/modern-camels-cheat.md deleted file mode 100644 index c0a80934d5..0000000000 --- a/.changeset/modern-camels-cheat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog': minor ---- - -Removed `CatalogKindHeader` from `DefaultCatalogPage`. Deprecated `CatalogKindHeader` in favour of `EntityKindPicker`. diff --git a/.changeset/modern-jokes-attack.md b/.changeset/modern-jokes-attack.md deleted file mode 100644 index 3cb3143f05..0000000000 --- a/.changeset/modern-jokes-attack.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-components': patch ---- - -Made AlertDisplay not crash on undefined messages diff --git a/.changeset/modern-mugs-shout.md b/.changeset/modern-mugs-shout.md deleted file mode 100644 index cb845b1fff..0000000000 --- a/.changeset/modern-mugs-shout.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-components': patch ---- - -Add items prop to SupportButton. This prop can be used to override the items that would otherwise be grabbed from the config. diff --git a/.changeset/nasty-colts-cough.md b/.changeset/nasty-colts-cough.md deleted file mode 100644 index 5dd098ec27..0000000000 --- a/.changeset/nasty-colts-cough.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-app-api': patch ---- - -Added `.stop()` method to `Backend`. diff --git a/.changeset/nasty-dragons-melt.md b/.changeset/nasty-dragons-melt.md deleted file mode 100644 index 2f6610ff31..0000000000 --- a/.changeset/nasty-dragons-melt.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@backstage/plugin-scaffolder': patch ---- - -Form data is now passed to validator functions in 'next' scaffolder, so it's now possible to perform validation for fields that depend on other field values. This is something that we discourage due to the coupling that it creates, but is sometimes still the most sensible solution. - -```typescript jsx -export const myCustomValidation = ( - value: string, - validation: FieldValidation, - { apiHolder, formData }: { apiHolder: ApiHolder; formData: JsonObject }, -) => { - // validate -}; -``` diff --git a/.changeset/nasty-lizards-train.md b/.changeset/nasty-lizards-train.md deleted file mode 100644 index 82d49cf682..0000000000 --- a/.changeset/nasty-lizards-train.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch ---- - -Backend now returns 'ui:options' value from template metadata, it can be used by all your custom scaffolder components. diff --git a/.changeset/nasty-melons-build.md b/.changeset/nasty-melons-build.md deleted file mode 100644 index 35fb520a5e..0000000000 --- a/.changeset/nasty-melons-build.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@backstage/plugin-events-backend-module-github': patch ---- - -Add `createGithubSignatureValidator(config)` which can be used -to create a validator used at an ingress for topic `github`. - -On top, there is a new `githubWebhookEventsModule` for the new backend plugin API -which auto-registers the `HttpPostIngress` for topic `github` incl. the validator. - -Please find more information at -https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-github/README.md. diff --git a/.changeset/nasty-planets-end.md b/.changeset/nasty-planets-end.md new file mode 100644 index 0000000000..b361b28199 --- /dev/null +++ b/.changeset/nasty-planets-end.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-events-backend': patch +--- + +The default event broker will now catch and log errors thrown by the `onEvent` method of subscribers. The returned promise from `publish` method will also not resolve until all subscribers have handled the event. diff --git a/.changeset/neat-insects-share.md b/.changeset/neat-insects-share.md deleted file mode 100644 index 1fadb9b9a1..0000000000 --- a/.changeset/neat-insects-share.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/cli': minor ---- - -The Jest configuration that was previously enabled with `BACKSTAGE_NEXT_TESTS` is now enabled by default. To revert to the old configuration you can now instead set `BACKSTAGE_OLD_TESTS`. - -This new configuration uses the `babel` coverage provider rather than `v8`. It used to be that `v8` worked better when using Sucrase for transpilation, but now that we have switched to SWC, `babel` seems to work better. In addition, the new configuration also enables source maps by default, as they no longer have a negative impact on code coverage accuracy, and it also enables a modified Jest runtime with additional caching of script objects. diff --git a/.changeset/neat-lies-know.md b/.changeset/neat-lies-know.md deleted file mode 100644 index 01fc002668..0000000000 --- a/.changeset/neat-lies-know.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-react': patch ---- - -Cleanup and small fixes for the kind selector diff --git a/.changeset/nervous-mice-flow.md b/.changeset/nervous-mice-flow.md deleted file mode 100644 index c93cde23bc..0000000000 --- a/.changeset/nervous-mice-flow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-jenkins-backend': patch ---- - -Remove unnecessary dependency `promise-any-polyfill`. diff --git a/.changeset/nervous-ravens-cough.md b/.changeset/nervous-ravens-cough.md new file mode 100644 index 0000000000..8b371a2413 --- /dev/null +++ b/.changeset/nervous-ravens-cough.md @@ -0,0 +1,6 @@ +--- +'@backstage/backend-plugin-api': patch +'@backstage/backend-common': patch +--- + +Moved `PluginEndpointDiscovery` type from backend-common to backend-plugin-api. diff --git a/.changeset/new-bugs-march.md b/.changeset/new-bugs-march.md deleted file mode 100644 index 346f5a151e..0000000000 --- a/.changeset/new-bugs-march.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-explore': patch ---- - -Adds styling to graph forcing it to always fill out the available space. diff --git a/.changeset/nice-apricots-love.md b/.changeset/nice-apricots-love.md deleted file mode 100644 index 527b644d5f..0000000000 --- a/.changeset/nice-apricots-love.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-app-api': patch ---- - -Prevent duplicate feature flag components from rendering in the settings when using components diff --git a/.changeset/nice-hairs-lick.md b/.changeset/nice-hairs-lick.md deleted file mode 100644 index 4229b5aa98..0000000000 --- a/.changeset/nice-hairs-lick.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Adds new web-library package option when generating a new plugin diff --git a/.changeset/nice-pants-boil.md b/.changeset/nice-pants-boil.md deleted file mode 100644 index e8bdf0a00f..0000000000 --- a/.changeset/nice-pants-boil.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/backend-common': patch -'@backstage/plugin-catalog-backend': patch ---- - -Adds MySQL support for the catalog-backend diff --git a/.changeset/nine-ears-whisper.md b/.changeset/nine-ears-whisper.md deleted file mode 100644 index a1427158af..0000000000 --- a/.changeset/nine-ears-whisper.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@backstage/plugin-events-backend': patch -'@backstage/plugin-events-node': minor ---- - -Introduce a new interface `RequestDetails` to abstract `Request` -providing access to request body and headers. - -**BREAKING:** Replace `request: Request` with `request: RequestDetails` at `RequestValidator`. diff --git a/.changeset/ninety-phones-tell.md b/.changeset/ninety-phones-tell.md new file mode 100644 index 0000000000..692ed27c23 --- /dev/null +++ b/.changeset/ninety-phones-tell.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-app-backend': patch +--- + +The warning for missing app contents is now logged as an error instead, but only in production. diff --git a/.changeset/odd-kings-tell.md b/.changeset/odd-kings-tell.md new file mode 100644 index 0000000000..f3643040be --- /dev/null +++ b/.changeset/odd-kings-tell.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-cost-insights': patch +--- + +Removed @backstage/test-utils dependency, since it was already in the devDependencies where it belongs. The main benefit is that this will exclude better-sqlite3 from the production build. diff --git a/.changeset/odd-moles-notice.md b/.changeset/odd-moles-notice.md deleted file mode 100644 index 8cc82c93dc..0000000000 --- a/.changeset/odd-moles-notice.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Updated the template to have the `'/test'` proxy endpoint in `app-config.yaml` be commented out by default. diff --git a/.changeset/old-bulldogs-fry.md b/.changeset/old-bulldogs-fry.md deleted file mode 100644 index 9c8eef67ad..0000000000 --- a/.changeset/old-bulldogs-fry.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'@backstage/plugin-catalog-backend-module-github': patch ---- - -Handle GitHub `push` events at the `GithubEntityProvider` by subscribing to the topic `github.push.` - -Implements `EventSubscriber` to receive events for the topic `github.push`. - -On `github.push`, the affected repository will be refreshed. -This includes adding new Location entities, refreshing existing ones, -and removing obsolete ones. - -Please find more information at -https://backstage.io/docs/integrations/github/discovery#installation-with-events-support diff --git a/.changeset/old-keys-leave.md b/.changeset/old-keys-leave.md deleted file mode 100644 index d80574b2e4..0000000000 --- a/.changeset/old-keys-leave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-app-api': patch ---- - -Added `lifecycleFactory` implementation. diff --git a/.changeset/old-planets-care.md b/.changeset/old-planets-care.md new file mode 100644 index 0000000000..4b30ff7d2d --- /dev/null +++ b/.changeset/old-planets-care.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-code-coverage-backend': patch +--- + +`RouterOptions` now accepts an optional `catalogApi` argument, allowing custom catalog clients to be used. This is leveraged in the local standalone development runner to pass in a catalog client that returns fake data. diff --git a/.changeset/old-sloths-warn.md b/.changeset/old-sloths-warn.md deleted file mode 100644 index 8eca0a9292..0000000000 --- a/.changeset/old-sloths-warn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-cost-insights': patch ---- - -Internal refactor to avoid usage of deprecated symbols diff --git a/.changeset/old-tips-cough.md b/.changeset/old-tips-cough.md deleted file mode 100644 index bcf6de6a53..0000000000 --- a/.changeset/old-tips-cough.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@backstage/plugin-adr': patch -'@backstage/plugin-catalog': patch -'@backstage/plugin-search-react': patch -'@backstage/plugin-stack-overflow': patch -'@backstage/plugin-techdocs': patch ---- - -Update search links to only have header as linkable text diff --git a/.changeset/olive-eyes-sing.md b/.changeset/olive-eyes-sing.md new file mode 100644 index 0000000000..42fa4a1a7c --- /dev/null +++ b/.changeset/olive-eyes-sing.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-stack-overflow-backend': patch +--- + +Enable configuration override for StackOverflow backend plugin when instantiating the search indexer. This makes it possible to set different configuration for frontend and backend of the plugin. diff --git a/.changeset/polite-adults-sit.md b/.changeset/polite-adults-sit.md deleted file mode 100644 index 3d14a130a5..0000000000 --- a/.changeset/polite-adults-sit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-home': patch ---- - -Adjusted the description's empty state on the starred entities table, diff --git a/.changeset/pre.json b/.changeset/pre.json index 38e7ac8419..375eabafc7 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -1,355 +1,226 @@ { - "mode": "exit", + "mode": "pre", "tag": "next", "initialVersions": { - "example-app": "0.2.77", - "@backstage/app-defaults": "1.0.8", - "example-backend": "0.2.77", - "@backstage/backend-app-api": "0.2.3", - "@backstage/backend-common": "0.16.0", - "@backstage/backend-defaults": "0.1.3", - "example-backend-next": "0.0.5", - "@backstage/backend-plugin-api": "0.1.4", - "@backstage/backend-tasks": "0.3.7", - "@backstage/backend-test-utils": "0.1.30", - "@backstage/catalog-client": "1.1.2", - "@backstage/catalog-model": "1.1.3", - "@backstage/cli": "0.21.0", - "@backstage/cli-common": "0.1.10", - "@backstage/codemods": "0.1.41", - "@backstage/config": "1.0.4", - "@backstage/config-loader": "1.1.6", - "@backstage/core-app-api": "1.2.0", - "@backstage/core-components": "0.12.0", - "@backstage/core-plugin-api": "1.1.0", - "@backstage/create-app": "0.4.34", - "@backstage/dev-utils": "1.0.8", + "example-app": "0.2.78", + "@backstage/app-defaults": "1.0.9", + "example-backend": "0.2.78", + "@backstage/backend-app-api": "0.2.4", + "@backstage/backend-common": "0.17.0", + "@backstage/backend-defaults": "0.1.4", + "example-backend-next": "0.0.6", + "@backstage/backend-plugin-api": "0.2.0", + "@backstage/backend-tasks": "0.4.0", + "@backstage/backend-test-utils": "0.1.31", + "@backstage/catalog-client": "1.2.0", + "@backstage/catalog-model": "1.1.4", + "@backstage/cli": "0.22.0", + "@backstage/cli-common": "0.1.11", + "@backstage/codemods": "0.1.42", + "@backstage/config": "1.0.5", + "@backstage/config-loader": "1.1.7", + "@backstage/core-app-api": "1.3.0", + "@backstage/core-components": "0.12.1", + "@backstage/core-plugin-api": "1.2.0", + "@backstage/create-app": "0.4.35", + "@backstage/dev-utils": "1.0.9", "e2e-test": "0.2.0", - "@backstage/errors": "1.1.3", - "@backstage/integration": "1.4.0", - "@backstage/integration-react": "1.1.6", - "@backstage/release-manifests": "0.0.7", - "@backstage/repo-tools": "0.0.0", - "@techdocs/cli": "1.2.3", - "techdocs-cli-embedded-app": "0.2.76", - "@backstage/test-utils": "1.2.2", + "@backstage/errors": "1.1.4", + "@backstage/integration": "1.4.1", + "@backstage/integration-aws-node": "0.1.0", + "@backstage/integration-react": "1.1.7", + "@backstage/release-manifests": "0.0.8", + "@backstage/repo-tools": "0.1.0", + "@techdocs/cli": "1.2.4", + "techdocs-cli-embedded-app": "0.2.77", + "@backstage/test-utils": "1.2.3", "@backstage/theme": "0.2.16", - "@backstage/types": "1.0.1", - "@backstage/version-bridge": "1.0.2", - "@backstage/plugin-adr": "0.2.3", - "@backstage/plugin-adr-backend": "0.2.3", - "@backstage/plugin-adr-common": "0.2.3", - "@backstage/plugin-airbrake": "0.3.11", - "@backstage/plugin-airbrake-backend": "0.2.11", - "@backstage/plugin-allure": "0.1.27", - "@backstage/plugin-analytics-module-ga": "0.1.22", - "@backstage/plugin-apache-airflow": "0.2.4", - "@backstage/plugin-api-docs": "0.8.11", + "@backstage/types": "1.0.2", + "@backstage/version-bridge": "1.0.3", + "@backstage/plugin-adr": "0.2.4", + "@backstage/plugin-adr-backend": "0.2.4", + "@backstage/plugin-adr-common": "0.2.4", + "@backstage/plugin-airbrake": "0.3.12", + "@backstage/plugin-airbrake-backend": "0.2.12", + "@backstage/plugin-allure": "0.1.28", + "@backstage/plugin-analytics-module-ga": "0.1.23", + "@backstage/plugin-apache-airflow": "0.2.5", + "@backstage/plugin-api-docs": "0.8.12", "@backstage/plugin-api-docs-module-protoc-gen-doc": "0.1.0", - "@backstage/plugin-apollo-explorer": "0.1.4", - "@backstage/plugin-app-backend": "0.3.38", - "@backstage/plugin-auth-backend": "0.17.1", - "@backstage/plugin-auth-node": "0.2.7", - "@backstage/plugin-azure-devops": "0.2.2", - "@backstage/plugin-azure-devops-backend": "0.3.17", + "@backstage/plugin-apollo-explorer": "0.1.5", + "@backstage/plugin-app-backend": "0.3.39", + "@backstage/plugin-auth-backend": "0.17.2", + "@backstage/plugin-auth-node": "0.2.8", + "@backstage/plugin-azure-devops": "0.2.3", + "@backstage/plugin-azure-devops-backend": "0.3.18", "@backstage/plugin-azure-devops-common": "0.3.0", - "@backstage/plugin-azure-sites": "0.1.0", - "@backstage/plugin-azure-sites-backend": "0.1.0", + "@backstage/plugin-azure-sites": "0.1.1", + "@backstage/plugin-azure-sites-backend": "0.1.1", "@backstage/plugin-azure-sites-common": "0.1.0", - "@backstage/plugin-badges": "0.2.35", - "@backstage/plugin-badges-backend": "0.1.32", - "@backstage/plugin-bazaar": "0.2.0", - "@backstage/plugin-bazaar-backend": "0.2.1", - "@backstage/plugin-bitbucket-cloud-common": "0.2.1", - "@backstage/plugin-bitrise": "0.1.38", - "@backstage/plugin-catalog": "1.6.1", - "@backstage/plugin-catalog-backend": "1.5.1", - "@backstage/plugin-catalog-backend-module-aws": "0.1.11", - "@backstage/plugin-catalog-backend-module-azure": "0.1.9", - "@backstage/plugin-catalog-backend-module-bitbucket": "0.2.5", - "@backstage/plugin-catalog-backend-module-bitbucket-cloud": "0.1.5", - "@backstage/plugin-catalog-backend-module-bitbucket-server": "0.1.3", - "@backstage/plugin-catalog-backend-module-gerrit": "0.1.6", - "@backstage/plugin-catalog-backend-module-github": "0.2.0", - "@backstage/plugin-catalog-backend-module-gitlab": "0.1.9", - "@backstage/plugin-catalog-backend-module-ldap": "0.5.5", - "@backstage/plugin-catalog-backend-module-msgraph": "0.4.4", - "@backstage/plugin-catalog-backend-module-openapi": "0.1.4", - "@backstage/plugin-catalog-common": "1.0.8", - "@internal/plugin-catalog-customized": "0.0.4", - "@backstage/plugin-catalog-graph": "0.2.23", - "@backstage/plugin-catalog-graphql": "0.3.15", - "@backstage/plugin-catalog-import": "0.9.1", - "@backstage/plugin-catalog-node": "1.2.1", - "@backstage/plugin-catalog-react": "1.2.1", - "@backstage/plugin-cicd-statistics": "0.1.13", - "@backstage/plugin-cicd-statistics-module-gitlab": "0.1.7", - "@backstage/plugin-circleci": "0.3.11", - "@backstage/plugin-cloudbuild": "0.3.11", - "@backstage/plugin-code-climate": "0.1.11", - "@backstage/plugin-code-coverage": "0.2.4", - "@backstage/plugin-code-coverage-backend": "0.2.4", - "@backstage/plugin-codescene": "0.1.6", - "@backstage/plugin-config-schema": "0.1.34", - "@backstage/plugin-cost-insights": "0.12.0", + "@backstage/plugin-badges": "0.2.36", + "@backstage/plugin-badges-backend": "0.1.33", + "@backstage/plugin-bazaar": "0.2.1", + "@backstage/plugin-bazaar-backend": "0.2.2", + "@backstage/plugin-bitbucket-cloud-common": "0.2.2", + "@backstage/plugin-bitrise": "0.1.39", + "@backstage/plugin-catalog": "1.7.0", + "@backstage/plugin-catalog-backend": "1.6.0", + "@backstage/plugin-catalog-backend-module-aws": "0.1.12", + "@backstage/plugin-catalog-backend-module-azure": "0.1.10", + "@backstage/plugin-catalog-backend-module-bitbucket": "0.2.6", + "@backstage/plugin-catalog-backend-module-bitbucket-cloud": "0.1.6", + "@backstage/plugin-catalog-backend-module-bitbucket-server": "0.1.4", + "@backstage/plugin-catalog-backend-module-gerrit": "0.1.7", + "@backstage/plugin-catalog-backend-module-github": "0.2.2", + "@backstage/plugin-catalog-backend-module-gitlab": "0.1.10", + "@backstage/plugin-catalog-backend-module-incremental-ingestion": "0.1.0", + "@backstage/plugin-catalog-backend-module-ldap": "0.5.6", + "@backstage/plugin-catalog-backend-module-msgraph": "0.4.5", + "@backstage/plugin-catalog-backend-module-openapi": "0.1.5", + "@backstage/plugin-catalog-common": "1.0.9", + "@internal/plugin-catalog-customized": "0.0.5", + "@backstage/plugin-catalog-graph": "0.2.24", + "@backstage/plugin-catalog-graphql": "0.3.16", + "@backstage/plugin-catalog-import": "0.9.2", + "@backstage/plugin-catalog-node": "1.3.0", + "@backstage/plugin-catalog-react": "1.2.2", + "@backstage/plugin-cicd-statistics": "0.1.14", + "@backstage/plugin-cicd-statistics-module-gitlab": "0.1.8", + "@backstage/plugin-circleci": "0.3.12", + "@backstage/plugin-cloudbuild": "0.3.12", + "@backstage/plugin-code-climate": "0.1.12", + "@backstage/plugin-code-coverage": "0.2.5", + "@backstage/plugin-code-coverage-backend": "0.2.5", + "@backstage/plugin-codescene": "0.1.7", + "@backstage/plugin-config-schema": "0.1.35", + "@backstage/plugin-cost-insights": "0.12.1", "@backstage/plugin-cost-insights-common": "0.1.1", - "@backstage/plugin-dynatrace": "1.0.1", - "@backstage/plugin-events-backend": "0.1.0", - "@backstage/plugin-events-backend-module-aws-sqs": "0.1.0", - "@backstage/plugin-events-backend-module-azure": "0.1.0", - "@backstage/plugin-events-backend-module-bitbucket-cloud": "0.1.0", - "@backstage/plugin-events-backend-module-gerrit": "0.1.0", - "@backstage/plugin-events-backend-module-github": "0.1.0", - "@backstage/plugin-events-backend-module-gitlab": "0.1.0", - "@backstage/plugin-events-backend-test-utils": "0.1.0", - "@backstage/plugin-events-node": "0.1.0", - "@internal/plugin-todo-list": "1.0.7", - "@internal/plugin-todo-list-backend": "1.0.7", - "@internal/plugin-todo-list-common": "1.0.6", - "@backstage/plugin-explore": "0.3.42", - "@backstage/plugin-explore-react": "0.0.23", - "@backstage/plugin-firehydrant": "0.1.28", - "@backstage/plugin-fossa": "0.2.43", - "@backstage/plugin-gcalendar": "0.3.7", - "@backstage/plugin-gcp-projects": "0.3.30", - "@backstage/plugin-git-release-manager": "0.3.24", - "@backstage/plugin-github-actions": "0.5.11", - "@backstage/plugin-github-deployments": "0.1.42", - "@backstage/plugin-github-issues": "0.2.0", - "@backstage/plugin-github-pull-requests-board": "0.1.5", - "@backstage/plugin-gitops-profiles": "0.3.29", - "@backstage/plugin-gocd": "0.1.17", - "@backstage/plugin-graphiql": "0.2.43", - "@backstage/plugin-graphql-backend": "0.1.28", - "@backstage/plugin-home": "0.4.27", - "@backstage/plugin-ilert": "0.2.0", - "@backstage/plugin-jenkins": "0.7.10", - "@backstage/plugin-jenkins-backend": "0.1.28", - "@backstage/plugin-jenkins-common": "0.1.10", - "@backstage/plugin-kafka": "0.3.11", - "@backstage/plugin-kafka-backend": "0.2.31", - "@backstage/plugin-kubernetes": "0.7.4", - "@backstage/plugin-kubernetes-backend": "0.8.0", - "@backstage/plugin-kubernetes-common": "0.4.4", - "@backstage/plugin-lighthouse": "0.3.11", - "@backstage/plugin-newrelic": "0.3.29", - "@backstage/plugin-newrelic-dashboard": "0.2.4", - "@backstage/plugin-org": "0.6.0", - "@backstage/plugin-org-react": "0.1.0", - "@backstage/plugin-pagerduty": "0.5.4", - "@backstage/plugin-periskop": "0.1.9", - "@backstage/plugin-periskop-backend": "0.1.9", - "@backstage/plugin-permission-backend": "0.5.13", - "@backstage/plugin-permission-common": "0.7.1", - "@backstage/plugin-permission-node": "0.7.1", - "@backstage/plugin-permission-react": "0.4.7", - "@backstage/plugin-playlist": "0.1.2", - "@backstage/plugin-playlist-backend": "0.2.1", - "@backstage/plugin-playlist-common": "0.1.2", - "@backstage/plugin-proxy-backend": "0.2.32", - "@backstage/plugin-rollbar": "0.4.11", - "@backstage/plugin-rollbar-backend": "0.1.35", - "@backstage/plugin-scaffolder": "1.8.0", - "@backstage/plugin-scaffolder-backend": "1.8.0", - "@backstage/plugin-scaffolder-backend-module-cookiecutter": "0.2.13", - "@backstage/plugin-scaffolder-backend-module-rails": "0.4.6", - "@backstage/plugin-scaffolder-backend-module-yeoman": "0.2.11", - "@backstage/plugin-scaffolder-common": "1.2.2", - "@backstage/plugin-search": "1.0.4", - "@backstage/plugin-search-backend": "1.1.1", - "@backstage/plugin-search-backend-module-elasticsearch": "1.0.4", - "@backstage/plugin-search-backend-module-pg": "0.4.2", - "@backstage/plugin-search-backend-node": "1.0.4", - "@backstage/plugin-search-common": "1.1.1", - "@backstage/plugin-search-react": "1.2.1", - "@backstage/plugin-sentry": "0.4.4", - "@backstage/plugin-shortcuts": "0.3.3", - "@backstage/plugin-sonarqube": "0.5.0", - "@backstage/plugin-sonarqube-backend": "0.1.3", - "@backstage/plugin-splunk-on-call": "0.4.0", - "@backstage/plugin-stack-overflow": "0.1.7", - "@backstage/plugin-stack-overflow-backend": "0.1.7", - "@backstage/plugin-tech-insights": "0.3.3", - "@backstage/plugin-tech-insights-backend": "0.5.4", - "@backstage/plugin-tech-insights-backend-module-jsonfc": "0.1.22", - "@backstage/plugin-tech-insights-common": "0.2.8", - "@backstage/plugin-tech-insights-node": "0.3.6", - "@backstage/plugin-tech-radar": "0.5.18", - "@backstage/plugin-techdocs": "1.4.0", - "@backstage/plugin-techdocs-addons-test-utils": "1.0.6", - "@backstage/plugin-techdocs-backend": "1.4.1", - "@backstage/plugin-techdocs-module-addons-contrib": "1.0.6", - "@backstage/plugin-techdocs-node": "1.4.2", - "@backstage/plugin-techdocs-react": "1.0.6", - "@backstage/plugin-todo": "0.2.13", - "@backstage/plugin-todo-backend": "0.1.35", - "@backstage/plugin-user-settings": "0.5.1", - "@backstage/plugin-user-settings-backend": "0.1.2", - "@backstage/plugin-vault": "0.1.5", - "@backstage/plugin-vault-backend": "0.2.4", - "@backstage/plugin-xcmetrics": "0.2.31", - "@backstage/plugin-catalog-backend-module-incremental-ingestion": "0.0.0", - "@backstage/plugin-explore-backend": "0.0.0", - "@backstage/plugin-explore-common": "0.0.0", - "@backstage/integration-aws-node": "0.0.0" + "@backstage/plugin-dynatrace": "1.0.2", + "@backstage/plugin-events-backend": "0.2.0", + "@backstage/plugin-events-backend-module-aws-sqs": "0.1.1", + "@backstage/plugin-events-backend-module-azure": "0.1.1", + "@backstage/plugin-events-backend-module-bitbucket-cloud": "0.1.1", + "@backstage/plugin-events-backend-module-gerrit": "0.1.1", + "@backstage/plugin-events-backend-module-github": "0.1.1", + "@backstage/plugin-events-backend-module-gitlab": "0.1.1", + "@backstage/plugin-events-backend-test-utils": "0.1.1", + "@backstage/plugin-events-node": "0.2.0", + "@internal/plugin-todo-list": "1.0.8", + "@internal/plugin-todo-list-backend": "1.0.8", + "@internal/plugin-todo-list-common": "1.0.7", + "@backstage/plugin-explore": "0.3.43", + "@backstage/plugin-explore-backend": "0.0.1", + "@backstage/plugin-explore-common": "0.0.1", + "@backstage/plugin-explore-react": "0.0.24", + "@backstage/plugin-firehydrant": "0.1.29", + "@backstage/plugin-fossa": "0.2.44", + "@backstage/plugin-gcalendar": "0.3.8", + "@backstage/plugin-gcp-projects": "0.3.31", + "@backstage/plugin-git-release-manager": "0.3.25", + "@backstage/plugin-github-actions": "0.5.12", + "@backstage/plugin-github-deployments": "0.1.43", + "@backstage/plugin-github-issues": "0.2.1", + "@backstage/plugin-github-pull-requests-board": "0.1.6", + "@backstage/plugin-gitops-profiles": "0.3.30", + "@backstage/plugin-gocd": "0.1.18", + "@backstage/plugin-graphiql": "0.2.44", + "@backstage/plugin-graphql-backend": "0.1.29", + "@backstage/plugin-home": "0.4.28", + "@backstage/plugin-ilert": "0.2.1", + "@backstage/plugin-jenkins": "0.7.11", + "@backstage/plugin-jenkins-backend": "0.1.29", + "@backstage/plugin-jenkins-common": "0.1.11", + "@backstage/plugin-kafka": "0.3.12", + "@backstage/plugin-kafka-backend": "0.2.32", + "@backstage/plugin-kubernetes": "0.7.5", + "@backstage/plugin-kubernetes-backend": "0.9.0", + "@backstage/plugin-kubernetes-common": "0.5.0", + "@backstage/plugin-lighthouse": "0.3.12", + "@backstage/plugin-newrelic": "0.3.30", + "@backstage/plugin-newrelic-dashboard": "0.2.5", + "@backstage/plugin-org": "0.6.2", + "@backstage/plugin-org-react": "0.1.1", + "@backstage/plugin-pagerduty": "0.5.5", + "@backstage/plugin-periskop": "0.1.10", + "@backstage/plugin-periskop-backend": "0.1.10", + "@backstage/plugin-permission-backend": "0.5.14", + "@backstage/plugin-permission-common": "0.7.2", + "@backstage/plugin-permission-node": "0.7.2", + "@backstage/plugin-permission-react": "0.4.8", + "@backstage/plugin-playlist": "0.1.3", + "@backstage/plugin-playlist-backend": "0.2.2", + "@backstage/plugin-playlist-common": "0.1.3", + "@backstage/plugin-proxy-backend": "0.2.33", + "@backstage/plugin-rollbar": "0.4.12", + "@backstage/plugin-rollbar-backend": "0.1.36", + "@backstage/plugin-scaffolder": "1.9.0", + "@backstage/plugin-scaffolder-backend": "1.9.0", + "@backstage/plugin-scaffolder-backend-module-cookiecutter": "0.2.14", + "@backstage/plugin-scaffolder-backend-module-rails": "0.4.7", + "@backstage/plugin-scaffolder-backend-module-yeoman": "0.2.12", + "@backstage/plugin-scaffolder-common": "1.2.3", + "@backstage/plugin-search": "1.0.5", + "@backstage/plugin-search-backend": "1.2.0", + "@backstage/plugin-search-backend-module-elasticsearch": "1.1.0", + "@backstage/plugin-search-backend-module-pg": "0.5.0", + "@backstage/plugin-search-backend-node": "1.1.0", + "@backstage/plugin-search-common": "1.2.0", + "@backstage/plugin-search-react": "1.3.0", + "@backstage/plugin-sentry": "0.4.5", + "@backstage/plugin-shortcuts": "0.3.4", + "@backstage/plugin-sonarqube": "0.6.0", + "@backstage/plugin-sonarqube-backend": "0.1.4", + "@backstage/plugin-sonarqube-react": "0.1.0", + "@backstage/plugin-splunk-on-call": "0.4.1", + "@backstage/plugin-stack-overflow": "0.1.8", + "@backstage/plugin-stack-overflow-backend": "0.1.8", + "@backstage/plugin-tech-insights": "0.3.4", + "@backstage/plugin-tech-insights-backend": "0.5.5", + "@backstage/plugin-tech-insights-backend-module-jsonfc": "0.1.23", + "@backstage/plugin-tech-insights-common": "0.2.9", + "@backstage/plugin-tech-insights-node": "0.3.7", + "@backstage/plugin-tech-radar": "0.5.19", + "@backstage/plugin-techdocs": "1.4.1", + "@backstage/plugin-techdocs-addons-test-utils": "1.0.7", + "@backstage/plugin-techdocs-backend": "1.5.0", + "@backstage/plugin-techdocs-module-addons-contrib": "1.0.7", + "@backstage/plugin-techdocs-node": "1.4.3", + "@backstage/plugin-techdocs-react": "1.1.0", + "@backstage/plugin-todo": "0.2.14", + "@backstage/plugin-todo-backend": "0.1.36", + "@backstage/plugin-user-settings": "0.6.0", + "@backstage/plugin-user-settings-backend": "0.1.3", + "@backstage/plugin-vault": "0.1.6", + "@backstage/plugin-vault-backend": "0.2.5", + "@backstage/plugin-xcmetrics": "0.2.32" }, "changesets": [ - "angry-dingos-lick", - "angry-trees-relax", - "beige-chairs-repair", - "beige-chairs-wink", - "blue-chefs-know", - "brave-bags-sniff", - "breezy-apes-mate", - "chilled-ladybugs-cough", - "chilly-ads-lay", - "chilly-flies-nail", - "chilly-tables-crash", - "clean-paws-fry", - "clean-seals-whisper", - "clever-pillows-drive", - "clever-rivers-obey", - "create-app-1669131574", - "create-app-1669720399", - "create-app-1670332900", - "cyan-donkeys-arrive", - "dirty-ads-refuse", - "dry-melons-listen", - "dry-radios-live", - "early-hairs-switch", - "early-parrots-guess", - "eight-eels-compete", - "eight-spiders-know", - "eight-tables-hunt", - "eleven-jeans-train", - "empty-taxis-run", - "fair-walls-talk", - "famous-cobras-suffer", - "famous-crews-speak", - "fast-lies-remain", - "fast-walls-explode", - "fifty-news-stare", - "five-trainers-admire", - "fluffy-walls-approve", - "fluffy-worms-arrive", - "forty-baboons-burn", - "forty-carpets-refuse", - "four-adults-provide", - "four-buttons-clean", - "fresh-news-push", - "funny-numbers-compete", - "fuzzy-rivers-search", - "gentle-ligers-help", - "gold-icons-cheat", - "gold-yaks-join", - "gorgeous-hairs-applaud", - "green-deers-turn", - "healthy-crabs-collect", - "hip-chairs-tap", - "hip-stingrays-kneel", - "hip-wasps-yell", - "itchy-walls-boil", - "kind-tips-pump", - "kind-walls-share", - "lemon-coats-camp", - "light-snakes-exercise", - "light-turtles-yawn", - "little-chairs-dance", - "long-eyes-confess", - "loud-rockets-reply", - "loud-snails-sleep", - "lucky-chicken-greet", - "many-bikes-press", - "mighty-parrots-hammer", - "modern-camels-cheat", - "modern-jokes-attack", - "modern-mugs-shout", - "nasty-melons-build", - "neat-insects-share", - "neat-lies-know", - "nervous-mice-flow", - "new-bugs-march", - "nice-apricots-love", - "nice-hairs-lick", - "nice-pants-boil", - "nine-ears-whisper", - "odd-moles-notice", - "old-bulldogs-fry", - "old-keys-leave", - "old-sloths-warn", - "old-tips-cough", - "pretty-eagles-matter", - "pretty-melons-taste", - "quick-horses-cry", - "renovate-1da1327", - "renovate-1e2853d", - "renovate-3fe8460", - "renovate-4bb70f3", - "renovate-4cbe4f9", - "renovate-50ee0c3", - "renovate-61ad428", - "renovate-778b2fa", - "renovate-8c69aed", - "renovate-a5f7839", - "renovate-bf8dfb3", - "renovate-ceb9248", - "renovate-ebb2ea1", - "rich-balloons-leave", - "rich-garlics-play", - "rude-pugs-deny", - "rude-sloths-cross", - "search-heavy-frogs-confess", - "search-lieutenant-dangle", - "search-om-manniskan-ginge", - "search-tofu-panaeng", - "search-yet-another-wonderwall-cover", - "selfish-lizards-invent", - "serious-windows-occur", - "seven-schools-speak", - "sharp-shoes-bathe", - "short-turtles-dream", - "shy-birds-hammer", - "shy-cycles-add", - "silly-knives-warn", - "silly-wolves-remember", - "silver-rats-rest", - "slow-dragons-promise", - "slow-eggs-grab", - "slow-flies-marinate", - "slow-flies-marry", - "slow-lies-jam", - "smart-radios-change", - "smooth-bulldogs-fix", - "soft-nails-arrive", - "sour-flowers-care", - "sour-plums-grow", - "sour-queens-wait", - "spicy-pianos-train", - "strange-rocks-hide", - "strong-peaches-melt", - "strong-rice-warn", - "stupid-clocks-return", - "stupid-gifts-serve", - "sweet-pandas-relax", - "tender-colts-greet", - "tender-parrots-cover", - "thin-donuts-join", - "thin-flies-wink", - "tiny-kangaroos-speak", - "twelve-meals-smell", - "twenty-dodos-wash", - "unlucky-hotels-hammer", - "violet-dots-relate", - "warm-parents-notice", - "weak-ears-jam", - "weak-zoos-hammer", - "wet-tips-yawn", - "wicked-games-search", - "wicked-impalas-relate", - "wild-pears-enjoy", - "witty-wasps-kiss", - "yellow-forks-knock", - "young-chairs-check", - "young-turkeys-relax" + "bright-pants-cry", + "create-app-1672154523", + "curvy-ducks-explode", + "eight-dragons-accept", + "fifty-paws-attack", + "fifty-zoos-nail", + "fluffy-forks-happen", + "forty-years-retire", + "funny-pianos-grow", + "good-geckos-reflect", + "hungry-falcons-cross", + "metal-hotels-deliver", + "old-planets-care", + "olive-eyes-sing", + "renovate-3493165", + "renovate-968149a", + "search-break-loop", + "search-mele-kalikimaka", + "search-pressure-back", + "selfish-phones-smoke", + "silver-chicken-travel", + "strong-eyes-march", + "tasty-impalas-cross", + "tasty-impalas-mix", + "thick-stingrays-smile", + "two-buckets-do", + "witty-eels-itch" ] } diff --git a/.changeset/pretty-eagles-matter.md b/.changeset/pretty-eagles-matter.md deleted file mode 100644 index 64eabd9ce6..0000000000 --- a/.changeset/pretty-eagles-matter.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-bazaar-backend': patch ---- - -Column `title` has replaced column `name` for `BazaarProject` in database diff --git a/.changeset/pretty-melons-taste.md b/.changeset/pretty-melons-taste.md deleted file mode 100644 index 9c2a7a13da..0000000000 --- a/.changeset/pretty-melons-taste.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -JSX and React Fast Refresh transforms are no longer enabled when bundling backend code. diff --git a/.changeset/proud-birds-worry.md b/.changeset/proud-birds-worry.md new file mode 100644 index 0000000000..cef7120fe1 --- /dev/null +++ b/.changeset/proud-birds-worry.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-tech-insights-backend': patch +--- + +Complete check results run when a single check errors so that we don't block other checks from working due to an error in a single check diff --git a/.changeset/quick-donkeys-yawn.md b/.changeset/quick-donkeys-yawn.md deleted file mode 100644 index f6b6c23fb9..0000000000 --- a/.changeset/quick-donkeys-yawn.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/core-components': patch -'@backstage/plugin-techdocs': patch ---- - -Add `react/forbid-elements` linter rule for button, suggest MUI `Button` diff --git a/.changeset/quick-horses-cry.md b/.changeset/quick-horses-cry.md deleted file mode 100644 index 8b40c92b41..0000000000 --- a/.changeset/quick-horses-cry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-org': patch ---- - -Update `UserProfileCard` and `GroupProfileCard` to not render links unless the `showLinks` prop is set. The primary component for rendering links are the `EntityLinksCard` from plugin-catalog. diff --git a/.changeset/renovate-1da1327.md b/.changeset/renovate-1da1327.md deleted file mode 100644 index cb88ccf463..0000000000 --- a/.changeset/renovate-1da1327.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/cli': patch -'@backstage/plugin-scaffolder-backend': patch ---- - -Updated dependency `esbuild` to `^0.16.0`. diff --git a/.changeset/renovate-1e2853d.md b/.changeset/renovate-1e2853d.md deleted file mode 100644 index 9378786e80..0000000000 --- a/.changeset/renovate-1e2853d.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Updated dependency `minimatch` to `5.1.1` and switch version range to `^`. diff --git a/.changeset/renovate-3493165.md b/.changeset/renovate-3493165.md new file mode 100644 index 0000000000..aa5146931e --- /dev/null +++ b/.changeset/renovate-3493165.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-techdocs-react': patch +'@backstage/plugin-techdocs': patch +--- + +Updated dependency `jss` to `~10.9.0`. diff --git a/.changeset/renovate-3fe8460.md b/.changeset/renovate-3fe8460.md deleted file mode 100644 index 17dc8b8b97..0000000000 --- a/.changeset/renovate-3fe8460.md +++ /dev/null @@ -1,113 +0,0 @@ ---- -'@backstage/backend-common': patch -'@backstage/backend-test-utils': patch -'@backstage/catalog-client': patch -'@backstage/cli': patch -'@backstage/config-loader': patch -'@backstage/core-app-api': patch -'@backstage/core-components': patch -'@backstage/core-plugin-api': patch -'@backstage/integration-react': patch -'@backstage/integration': patch -'@backstage/release-manifests': patch -'@backstage/test-utils': patch -'@backstage/plugin-adr-backend': patch -'@backstage/plugin-adr': patch -'@backstage/plugin-airbrake-backend': patch -'@backstage/plugin-airbrake': patch -'@backstage/plugin-allure': patch -'@backstage/plugin-analytics-module-ga': patch -'@backstage/plugin-apache-airflow': patch -'@backstage/plugin-api-docs': patch -'@backstage/plugin-apollo-explorer': patch -'@backstage/plugin-app-backend': patch -'@backstage/plugin-auth-backend': patch -'@backstage/plugin-auth-node': patch -'@backstage/plugin-azure-devops-backend': patch -'@backstage/plugin-azure-devops': patch -'@backstage/plugin-azure-sites-backend': patch -'@backstage/plugin-azure-sites': patch -'@backstage/plugin-badges': patch -'@backstage/plugin-bitbucket-cloud-common': patch -'@backstage/plugin-bitrise': patch -'@backstage/plugin-catalog-backend-module-azure': patch -'@backstage/plugin-catalog-backend-module-bitbucket-cloud': patch -'@backstage/plugin-catalog-backend-module-bitbucket-server': patch -'@backstage/plugin-catalog-backend-module-bitbucket': patch -'@backstage/plugin-catalog-backend-module-gerrit': patch -'@backstage/plugin-catalog-backend-module-github': patch -'@backstage/plugin-catalog-backend-module-gitlab': patch -'@backstage/plugin-catalog-backend-module-msgraph': patch -'@backstage/plugin-catalog-backend': patch -'@backstage/plugin-catalog-graphql': patch -'@backstage/plugin-catalog-import': patch -'@backstage/plugin-circleci': patch -'@backstage/plugin-cloudbuild': patch -'@backstage/plugin-code-climate': patch -'@backstage/plugin-code-coverage-backend': patch -'@backstage/plugin-code-coverage': patch -'@backstage/plugin-codescene': patch -'@backstage/plugin-config-schema': patch -'@backstage/plugin-cost-insights': patch -'@backstage/plugin-dynatrace': patch -'@backstage/plugin-explore-react': patch -'@backstage/plugin-explore': patch -'@backstage/plugin-firehydrant': patch -'@backstage/plugin-fossa': patch -'@backstage/plugin-gcalendar': patch -'@backstage/plugin-gcp-projects': patch -'@backstage/plugin-git-release-manager': patch -'@backstage/plugin-github-actions': patch -'@backstage/plugin-github-deployments': patch -'@backstage/plugin-github-issues': patch -'@backstage/plugin-github-pull-requests-board': patch -'@backstage/plugin-gitops-profiles': patch -'@backstage/plugin-gocd': patch -'@backstage/plugin-graphiql': patch -'@backstage/plugin-graphql-backend': patch -'@backstage/plugin-home': patch -'@backstage/plugin-ilert': patch -'@backstage/plugin-jenkins-backend': patch -'@backstage/plugin-jenkins': patch -'@backstage/plugin-kafka': patch -'@backstage/plugin-kubernetes': patch -'@backstage/plugin-lighthouse': patch -'@backstage/plugin-newrelic': patch -'@backstage/plugin-org-react': patch -'@backstage/plugin-org': patch -'@backstage/plugin-pagerduty': patch -'@backstage/plugin-periskop-backend': patch -'@backstage/plugin-periskop': patch -'@backstage/plugin-permission-backend': patch -'@backstage/plugin-permission-common': patch -'@backstage/plugin-permission-node': patch -'@backstage/plugin-playlist-backend': patch -'@backstage/plugin-playlist': patch -'@backstage/plugin-proxy-backend': patch -'@backstage/plugin-rollbar-backend': patch -'@backstage/plugin-rollbar': patch -'@backstage/plugin-scaffolder-backend-module-cookiecutter': patch -'@backstage/plugin-scaffolder-backend': patch -'@backstage/plugin-scaffolder': patch -'@backstage/plugin-search': patch -'@backstage/plugin-sentry': patch -'@backstage/plugin-shortcuts': patch -'@backstage/plugin-sonarqube-backend': patch -'@backstage/plugin-sonarqube': patch -'@backstage/plugin-splunk-on-call': patch -'@backstage/plugin-stack-overflow': patch -'@backstage/plugin-tech-insights': patch -'@backstage/plugin-tech-radar': patch -'@backstage/plugin-techdocs-addons-test-utils': patch -'@backstage/plugin-techdocs-backend': patch -'@backstage/plugin-techdocs-module-addons-contrib': patch -'@backstage/plugin-techdocs': patch -'@backstage/plugin-todo-backend': patch -'@backstage/plugin-todo': patch -'@backstage/plugin-user-settings': patch -'@backstage/plugin-vault-backend': patch -'@backstage/plugin-vault': patch -'@backstage/plugin-xcmetrics': patch ---- - -Updated dependency `msw` to `^0.49.0`. diff --git a/.changeset/renovate-4bb70f3.md b/.changeset/renovate-4bb70f3.md deleted file mode 100644 index 3a9054011f..0000000000 --- a/.changeset/renovate-4bb70f3.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'@backstage/core-app-api': patch -'@backstage/core-components': patch -'@backstage/core-plugin-api': patch -'@backstage/dev-utils': patch -'@backstage/test-utils': patch -'@backstage/types': patch -'@backstage/plugin-catalog-react': patch -'@backstage/plugin-catalog': patch -'@backstage/plugin-config-schema': patch -'@backstage/plugin-scaffolder-backend': patch -'@backstage/plugin-scaffolder': patch -'@backstage/plugin-shortcuts': patch -'@backstage/plugin-user-settings': patch ---- - -Updated dependency `zen-observable` to `^0.9.0`. diff --git a/.changeset/renovate-4cbe4f9.md b/.changeset/renovate-4cbe4f9.md deleted file mode 100644 index 90d7faa801..0000000000 --- a/.changeset/renovate-4cbe4f9.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Updated dependency `@rollup/plugin-commonjs` to `^23.0.0`. diff --git a/.changeset/renovate-50ee0c3.md b/.changeset/renovate-50ee0c3.md deleted file mode 100644 index 3cdd142cf6..0000000000 --- a/.changeset/renovate-50ee0c3.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'@backstage/core-app-api': patch -'@backstage/core-components': patch -'@backstage/core-plugin-api': patch -'@backstage/dev-utils': patch -'@backstage/test-utils': patch -'@backstage/types': patch -'@backstage/plugin-catalog-react': patch -'@backstage/plugin-catalog': patch -'@backstage/plugin-config-schema': patch -'@backstage/plugin-scaffolder-backend': patch -'@backstage/plugin-scaffolder': patch -'@backstage/plugin-shortcuts': patch -'@backstage/plugin-user-settings': patch ---- - -Updated dependency `zen-observable` to `^0.10.0`. diff --git a/.changeset/renovate-61ad428.md b/.changeset/renovate-61ad428.md deleted file mode 100644 index 95e4e27baf..0000000000 --- a/.changeset/renovate-61ad428.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@backstage/core-components': patch -'@backstage/plugin-gcp-projects': patch -'@backstage/plugin-scaffolder': patch -'@backstage/plugin-techdocs-module-addons-contrib': patch ---- - -Updated dependency `@react-hookz/web` to `^19.0.0`. diff --git a/.changeset/renovate-6993874.md b/.changeset/renovate-6993874.md deleted file mode 100644 index 67aacd5459..0000000000 --- a/.changeset/renovate-6993874.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@backstage/backend-common': patch -'@backstage/plugin-kubernetes-backend': patch -'@backstage/plugin-kubernetes-common': patch -'@backstage/plugin-kubernetes': patch ---- - -Updated dependency `@kubernetes/client-node` to `0.18.0`. diff --git a/.changeset/renovate-778b2fa.md b/.changeset/renovate-778b2fa.md deleted file mode 100644 index f4f57e448b..0000000000 --- a/.changeset/renovate-778b2fa.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/core-components': patch -'@backstage/plugin-codescene': patch -'@backstage/plugin-sonarqube': patch ---- - -Updated dependency `rc-progress` to `3.4.1`. diff --git a/.changeset/renovate-8c69aed.md b/.changeset/renovate-8c69aed.md deleted file mode 100644 index 63a61d941a..0000000000 --- a/.changeset/renovate-8c69aed.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -Updated dependency `@types/http-errors` to `^2.0.0`. diff --git a/.changeset/renovate-968149a.md b/.changeset/renovate-968149a.md new file mode 100644 index 0000000000..592a13132e --- /dev/null +++ b/.changeset/renovate-968149a.md @@ -0,0 +1,5 @@ +--- +'@backstage/repo-tools': patch +--- + +Updated dependency `@microsoft/tsdoc-config` to `0.16.2`. diff --git a/.changeset/renovate-a5f7839.md b/.changeset/renovate-a5f7839.md deleted file mode 100644 index d1ab22e04a..0000000000 --- a/.changeset/renovate-a5f7839.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/config-loader': patch ---- - -Updated dependency `typescript-json-schema` to `^0.55.0`. diff --git a/.changeset/renovate-bf8dfb3.md b/.changeset/renovate-bf8dfb3.md deleted file mode 100644 index 57cabf075b..0000000000 --- a/.changeset/renovate-bf8dfb3.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Updated dependency `@rollup/plugin-yaml` to `^4.0.0`. diff --git a/.changeset/renovate-ceb9248.md b/.changeset/renovate-ceb9248.md deleted file mode 100644 index d1cfe1775e..0000000000 --- a/.changeset/renovate-ceb9248.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Updated dependency `@rollup/plugin-json` to `^5.0.0`. diff --git a/.changeset/renovate-ebb2ea1.md b/.changeset/renovate-ebb2ea1.md deleted file mode 100644 index 010236c2f2..0000000000 --- a/.changeset/renovate-ebb2ea1.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@backstage/core-components': patch -'@backstage/plugin-gcp-projects': patch -'@backstage/plugin-scaffolder': patch -'@backstage/plugin-techdocs-module-addons-contrib': patch ---- - -Updated dependency `@react-hookz/web` to `^20.0.0`. diff --git a/.changeset/rich-balloons-leave.md b/.changeset/rich-balloons-leave.md deleted file mode 100644 index bb6832a681..0000000000 --- a/.changeset/rich-balloons-leave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -Added the ability to understand Job Artifact URLs to the GitLab integration diff --git a/.changeset/rich-garlics-play.md b/.changeset/rich-garlics-play.md deleted file mode 100644 index 5589a70e35..0000000000 --- a/.changeset/rich-garlics-play.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-kubernetes-backend': patch -'@backstage/plugin-kubernetes-common': patch ---- - -Added Kubernetes proxy API route to backend Kubernetes plugin, allowing Backstage plugin developers to read/write new information from Kubernetes (if proper credentials are provided). diff --git a/.changeset/rude-chicken-itch.md b/.changeset/rude-chicken-itch.md new file mode 100644 index 0000000000..bf22d63921 --- /dev/null +++ b/.changeset/rude-chicken-itch.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-openapi': patch +--- + +Updated internal usage of UrlReader interface. diff --git a/.changeset/rude-pugs-deny.md b/.changeset/rude-pugs-deny.md deleted file mode 100644 index b877d96285..0000000000 --- a/.changeset/rude-pugs-deny.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': minor ---- - -The catalog no longer stops after the first processor `validateEntityKind` -method returns `true` when validating entity kind shapes. Instead, it continues -through all registered processors that have this method, and requires that _at -least one_ of them returned true. - -The old behavior of stopping early made it harder to extend existing core kinds -with additional fields, since the `BuiltinKindsEntityProcessor` is always -present at the top of the processing chain and ensures that your additional -validation code would never be run. - -This is technically a breaking change, although it should not affect anybody -under normal circumstances, except if you had problematic validation code that -you were unaware that it was not being run. That code may now start to exhibit -those problems. - -If you need to disable this new behavior, `CatalogBuilder` as used in your -`packages/backend/src/plugins/catalog.ts` file now has a -`useLegacySingleProcessorValidation()` method to go back to the old behavior. - -```diff - const builder = await CatalogBuilder.create(env); -+builder.useLegacySingleProcessorValidation(); -``` diff --git a/.changeset/rude-sloths-cross.md b/.changeset/rude-sloths-cross.md deleted file mode 100644 index 8d3fc486e8..0000000000 --- a/.changeset/rude-sloths-cross.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'@backstage/plugin-explore': patch -'@backstage/plugin-explore-backend': patch -'@backstage/plugin-explore-common': patch -'@backstage/plugin-explore-react': patch ---- - -Added new `@backstage/plugin-explore-backend` & `@backstage/plugin-explore-common` packages. - -This deprecates the `ExploreToolsConfig` API (in `@backstage/plugin-explore-react`) which is replaced by the `ExploreApi` & `ExploreClient`. The list of `ExploreTool` data can now be provided on the backend by either using the supplied `StaticExploreToolProvider` or by implementing a custom `ExploreToolProvider`. See the [explore-backend README](https://github.com/backstage/backstage/blob/master/plugins/explore-backend/README.md) for full details. - -NOTE: Existing installations that have customized the `ExploreToolConfig` will continue to work through the new `ExploreClient`. However, existing data should be migrated over to new `explore-backend` plugin as `ExploreToolConfig` will be removed in the future. - -BREAKING CHANGE: If you have previously installed the `explore` plugin, but not yet customized the `ExploreToolConfig` API in your `packages/app`, this will result in an empty list of tools. diff --git a/.changeset/search-antibacterial-wipe.md b/.changeset/search-antibacterial-wipe.md deleted file mode 100644 index d69edabd3f..0000000000 --- a/.changeset/search-antibacterial-wipe.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@backstage/plugin-search-backend-module-pg': minor ---- - -Added the option to pass a logger to `PgSearchEngine` during instantiation. You may do so as follows: - -```diff -const searchEngine = await PgSearchEngine.fromConfig(env.config, { - database: env.database, -+ logger: env.logger, -}); -``` diff --git a/.changeset/search-break-loop.md b/.changeset/search-break-loop.md new file mode 100644 index 0000000000..ce65645900 --- /dev/null +++ b/.changeset/search-break-loop.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-search-backend-module-elasticsearch': patch +--- + +Fixed a bug that could cause an indexing process to silently fail, timeout, and accumulate stale indices. diff --git a/.changeset/search-heavy-frogs-confess.md b/.changeset/search-heavy-frogs-confess.md deleted file mode 100644 index a37c28c60c..0000000000 --- a/.changeset/search-heavy-frogs-confess.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-search-backend-node': patch ---- - -Fixed a bug that could cause a `max listeners exceeded warning` to be logged when more than 10 collators were running simultaneously. diff --git a/.changeset/search-lieutenant-dangle.md b/.changeset/search-lieutenant-dangle.md deleted file mode 100644 index 75f1bca915..0000000000 --- a/.changeset/search-lieutenant-dangle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-search-backend-module-elasticsearch': patch ---- - -Fixed a bug that prevented indices from being cleaned up under some circumstances, which could have led to shard exhaustion. diff --git a/.changeset/search-mele-kalikimaka.md b/.changeset/search-mele-kalikimaka.md new file mode 100644 index 0000000000..4f1faff02f --- /dev/null +++ b/.changeset/search-mele-kalikimaka.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-search-backend-module-elasticsearch': patch +--- + +Fixed a bug that could cause the backstage backend to unexpectedly terminate when client errors were encountered during the indexing process. diff --git a/.changeset/search-om-manniskan-ginge.md b/.changeset/search-om-manniskan-ginge.md deleted file mode 100644 index c36972f191..0000000000 --- a/.changeset/search-om-manniskan-ginge.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-search-backend-node': patch ---- - -Updated indexer and decorator base classes to take advantage of features introduced in Node.js v16; be sure you are running a [supported version of Node.js](https://backstage.io/docs/releases/v1.8.0#node-16-and-18). diff --git a/.changeset/search-pressure-back.md b/.changeset/search-pressure-back.md new file mode 100644 index 0000000000..3dd36456a7 --- /dev/null +++ b/.changeset/search-pressure-back.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-search-backend-module-elasticsearch': patch +--- + +Improved index throughput by optimizing when and how many documents were made available to the bulk client. diff --git a/.changeset/search-tofu-panaeng.md b/.changeset/search-tofu-panaeng.md deleted file mode 100644 index 1f8bbf6a7b..0000000000 --- a/.changeset/search-tofu-panaeng.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-search-backend-node': patch ---- - -Use of `TestPipeline.withSubject()` is now deprecated. Instead, use the `fromCollator`, `fromDecorator`, or `fromIndexer` static methods to instantiate a test pipeline. You may also use the class' `withCollator`, `withDecorator`, and `withIndexer` instance methods to build test pipelines that consist of multiple test subjects. diff --git a/.changeset/search-with-alcohol.md b/.changeset/search-with-alcohol.md deleted file mode 100644 index a46f33985a..0000000000 --- a/.changeset/search-with-alcohol.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/plugin-search-backend-module-elasticsearch': minor -'@backstage/plugin-search-backend-module-pg': minor -'@backstage/plugin-search-backend-node': minor ---- - -The search engine now better handles the case when it receives 0 documents at index-time. Prior to this change, the indexer would replace any existing index with an empty index, effectively deleting it. Now instead, a warning is logged, and any existing index is left alone (preserving the index from the last successful indexing attempt). diff --git a/.changeset/search-yet-another-wonderwall-cover.md b/.changeset/search-yet-another-wonderwall-cover.md deleted file mode 100644 index c87f418e50..0000000000 --- a/.changeset/search-yet-another-wonderwall-cover.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-stack-overflow': patch ---- - -The `` component is now able to highlight the result title and/or text when provided. To take advantage of this, pass in the `highlight` prop, similar to how it is done on other result list item components. diff --git a/.changeset/selfish-lizards-invent.md b/.changeset/selfish-lizards-invent.md deleted file mode 100644 index fd486416d8..0000000000 --- a/.changeset/selfish-lizards-invent.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-analytics-module-ga': patch ---- - -Added support for sending virtual pageviews on `search` events in order to enable -Site Search functionality in GA. For more information consult [README](/plugins/analytics-module-ga/README.md#enabling-site-search) diff --git a/.changeset/selfish-phones-smoke.md b/.changeset/selfish-phones-smoke.md new file mode 100644 index 0000000000..42f33f9869 --- /dev/null +++ b/.changeset/selfish-phones-smoke.md @@ -0,0 +1,37 @@ +--- +'@backstage/plugin-scaffolder': minor +'@backstage/plugin-scaffolder-backend-module-cookiecutter': patch +'@backstage/plugin-scaffolder-backend-module-rails': patch +'@backstage/plugin-scaffolder-backend-module-yeoman': patch +'@backstage/plugin-scaffolder-backend': patch +--- + +Added `catalogFilter` field to OwnerPicker and EntityPicker components to support filtering options by any field(s) of an entity. + +The `allowedKinds` field has been deprecated. Use `catalogFilter` instead. This field allows users to specify a filter on the shape of [EntityFilterQuery](https://github.com/backstage/backstage/blob/774c42003782121d3d6b2aa5f2865d53370c160e/packages/catalog-client/src/types/api.ts#L74), which can be passed into the CatalogClient. See examples below: + +- Get all entities of kind `Group` + + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + ``` + +- Get entities of kind `Group` and spec.type `team` + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + spec.type: team + ``` diff --git a/.changeset/serious-windows-occur.md b/.changeset/serious-windows-occur.md deleted file mode 100644 index 37f778e846..0000000000 --- a/.changeset/serious-windows-occur.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/backend-common': patch -'@backstage/core-components': patch ---- - -Internal refactor to avoid usage of deprecated symbols. diff --git a/.changeset/seven-dolphins-tickle.md b/.changeset/seven-dolphins-tickle.md deleted file mode 100644 index cd3149792c..0000000000 --- a/.changeset/seven-dolphins-tickle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-jenkins-backend': patch ---- - -added support for standalone jenkins projects diff --git a/.changeset/seven-schools-speak.md b/.changeset/seven-schools-speak.md deleted file mode 100644 index 7d311b5514..0000000000 --- a/.changeset/seven-schools-speak.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-search-backend-module-elasticsearch': minor ---- - -Added support for self hosted OpenSearch via new provider diff --git a/.changeset/seven-tomatoes-deny.md b/.changeset/seven-tomatoes-deny.md deleted file mode 100644 index f94c97f847..0000000000 --- a/.changeset/seven-tomatoes-deny.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/backend-app-api': patch -'@backstage/plugin-catalog-backend-module-incremental-ingestion': patch ---- - -Updated usages of types from `@backstage/backend-plugin-api`. diff --git a/.changeset/sharp-shoes-bathe.md b/.changeset/sharp-shoes-bathe.md deleted file mode 100644 index 8d3c0dfddb..0000000000 --- a/.changeset/sharp-shoes-bathe.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend-module-incremental-ingestion': patch ---- - -Make incremental providers more resilient to failures diff --git a/.changeset/short-pigs-juggle.md b/.changeset/short-pigs-juggle.md deleted file mode 100644 index c7ef43e62a..0000000000 --- a/.changeset/short-pigs-juggle.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -'@backstage/plugin-sonarqube': minor -'@backstage/plugin-sonarqube-react': minor ---- - -Parts of plugin-sonarqube have been moved into a new plugin-sonarqube-react package. Additionally some types that were -previously internal to plugin-sonarqube have been made public and will allow access for third-parties. As the sonarqube -plugin has not yet reached 1.0 breaking changes are expected in the future. As such exports of plugin-sonarqube-react -require importing via the `/alpha` entrypoint: - -```ts -import { sonarQubeApiRef } from '@backstage/plugin-sonarqube-react/alpha'; - -const sonarQubeApi = useApi(sonarQubeApiRef); -``` - -Moved from plugin-sonarqube to plugin-sonarqube-react: - -- isSonarQubeAvailable -- SONARQUBE_PROJECT_KEY_ANNOTATION - -Exports that been introduced to plugin-sonarqube-react are documented in the [API report](https://github.com/backstage/backstage/blob/master/plugins/sonarqube-react/api-report.md). diff --git a/.changeset/short-turtles-dream.md b/.changeset/short-turtles-dream.md deleted file mode 100644 index 022ef35f58..0000000000 --- a/.changeset/short-turtles-dream.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-stack-overflow-backend': patch ---- - -Added option to supply API Access Token. This is required in addition to an API key when trying to access the data for a private Stack Overflow Team. diff --git a/.changeset/shy-birds-hammer.md b/.changeset/shy-birds-hammer.md deleted file mode 100644 index 116652f740..0000000000 --- a/.changeset/shy-birds-hammer.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Updated the app template to use the new `AppRouter` component instead of `app.getRouter()`, as well as `app.createRoot()` instead of `app.getProvider()`. - -To apply this change to an existing app, make the following change to `packages/app/src/App.tsx`: - -```diff --import { FlatRoutes } from '@backstage/core-app-api'; -+import { AppRouter, FlatRoutes } from '@backstage/core-app-api'; - - ... - --const AppProvider = app.getProvider(); --const AppRouter = app.getRouter(); - - ... - --const App = () => ( -+export default app.createRoot( -- -+ <> - - - - {routes} - -- -+ , - ); -``` - -The final export step should end up looking something like this: - -```tsx -export default app.createRoot( - <> - - - - {routes} - - , -); -``` - -Note that `app.createRoot()` accepts a React element, rather than a component. diff --git a/.changeset/shy-boats-admire.md b/.changeset/shy-boats-admire.md deleted file mode 100644 index 904fde9d1e..0000000000 --- a/.changeset/shy-boats-admire.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-app-api': patch ---- - -Root scoped services are now always initialized, regardless of whether they're used by any features. diff --git a/.changeset/shy-cycles-add.md b/.changeset/shy-cycles-add.md deleted file mode 100644 index 2c70f2a8eb..0000000000 --- a/.changeset/shy-cycles-add.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-graph': patch ---- - -Set the default `maxDepth` prop for `EntityRelationsGraph` to a smaller value to provide better readability. diff --git a/.changeset/silly-knives-warn.md b/.changeset/silly-knives-warn.md deleted file mode 100644 index f5fb61b493..0000000000 --- a/.changeset/silly-knives-warn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-techdocs-node': patch ---- - -Add support for specifying an S3 bucket's account ID and retrieving the credentials from the `aws` app config section. This is now the preferred way to configure AWS credentials for Techdocs. diff --git a/.changeset/silly-wolves-remember.md b/.changeset/silly-wolves-remember.md deleted file mode 100644 index f39812db88..0000000000 --- a/.changeset/silly-wolves-remember.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -Registered shutdown hook in experimental catalog plugin. diff --git a/.changeset/silver-chicken-travel.md b/.changeset/silver-chicken-travel.md new file mode 100644 index 0000000000..e5dea6381d --- /dev/null +++ b/.changeset/silver-chicken-travel.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend': minor +--- + +Implemented server side ordering in the entities endpoint diff --git a/.changeset/silver-rats-rest.md b/.changeset/silver-rats-rest.md deleted file mode 100644 index 52bb9acd6f..0000000000 --- a/.changeset/silver-rats-rest.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-search-common': minor ---- - -numberOfResults (total number of results for a given query) can now be provided by each search engine and consumed as part of the search results response diff --git a/.changeset/slow-dragons-promise.md b/.changeset/slow-dragons-promise.md deleted file mode 100644 index 045b4f34e3..0000000000 --- a/.changeset/slow-dragons-promise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend-module-github': patch ---- - -Fix incorrectly exported GithubOrgEntityProvider as a type diff --git a/.changeset/slow-eggs-grab.md b/.changeset/slow-eggs-grab.md deleted file mode 100644 index e4c537687f..0000000000 --- a/.changeset/slow-eggs-grab.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@backstage/repo-tools': minor ---- - -Api reference documentation improvements - -- breadcrumbs links semantics as code spans -- new `@config` annotation to describe related config keys diff --git a/.changeset/slow-flies-marinate.md b/.changeset/slow-flies-marinate.md deleted file mode 100644 index 42d0de5f44..0000000000 --- a/.changeset/slow-flies-marinate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-events-backend-module-aws-sqs': patch ---- - -Upgrade to AWS SDK for Javascript v3 diff --git a/.changeset/slow-flies-marry.md b/.changeset/slow-flies-marry.md deleted file mode 100644 index 7882707d32..0000000000 --- a/.changeset/slow-flies-marry.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@backstage/plugin-techdocs-node': patch ---- - -Upgrade to AWS SDK for Javascript v3 - -Techdocs support for AWS S3 now requires defining the AWS region to connect to. -If `techdocs.publisher.awsS3.region` is missing from the config, the AWS environment variable `AWS_REGION` will be used. diff --git a/.changeset/slow-lies-jam.md b/.changeset/slow-lies-jam.md deleted file mode 100644 index a9d7a90b95..0000000000 --- a/.changeset/slow-lies-jam.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@backstage/backend-common': patch -'@backstage/cli': patch -'@backstage/cli-common': patch -'@backstage/core-app-api': patch -'@backstage/core-components': patch -'@backstage/dev-utils': patch -'@techdocs/cli': patch ---- - -Tweaked wording to use inclusive terminology diff --git a/.changeset/smart-radios-change.md b/.changeset/smart-radios-change.md deleted file mode 100644 index 1c7393829d..0000000000 --- a/.changeset/smart-radios-change.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -Fixed `SingleHostDiscovery` so that it properly handles single-string `backend.listen` configurations such as `:80`. diff --git a/.changeset/smart-zoos-wash.md b/.changeset/smart-zoos-wash.md deleted file mode 100644 index ffb5ca0f01..0000000000 --- a/.changeset/smart-zoos-wash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -Ignore attempts at emitting the current entity as a child of itself. diff --git a/.changeset/smooth-bulldogs-fix.md b/.changeset/smooth-bulldogs-fix.md deleted file mode 100644 index bbbb02aa13..0000000000 --- a/.changeset/smooth-bulldogs-fix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-techdocs-backend': minor ---- - -Added a new optional `accountId` to the configuration options of the AWS S3 publisher. Configuring this option will source credentials for the `accountId` in the `aws` app config section. See https://github.com/backstage/backstage/blob/master/packages/integration-aws-node/README.md for more details. diff --git a/.changeset/soft-lies-watch.md b/.changeset/soft-lies-watch.md deleted file mode 100644 index 6e38e0f1fa..0000000000 --- a/.changeset/soft-lies-watch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/repo-tools': patch ---- - -Include asset-types.d.ts while running the api report command diff --git a/.changeset/soft-nails-arrive.md b/.changeset/soft-nails-arrive.md deleted file mode 100644 index e9c0a40a05..0000000000 --- a/.changeset/soft-nails-arrive.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder': minor ---- - -Implement Custom Field Explorer to view and play around with available installed custom field extensions diff --git a/.changeset/sour-flowers-care.md b/.changeset/sour-flowers-care.md deleted file mode 100644 index 8524c4981c..0000000000 --- a/.changeset/sour-flowers-care.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder': minor ---- - -Adds the ability to supply a `transformErrors` function to the `Stepper` for `/next` diff --git a/.changeset/sour-plums-grow.md b/.changeset/sour-plums-grow.md deleted file mode 100644 index 4070dc5e50..0000000000 --- a/.changeset/sour-plums-grow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder': patch ---- - -fixed `headerOptions` not passed to `TemplatePage` component diff --git a/.changeset/sour-queens-wait.md b/.changeset/sour-queens-wait.md deleted file mode 100644 index 87231a1eb0..0000000000 --- a/.changeset/sour-queens-wait.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/repo-tools': patch ---- - -add the command type-deps to the repo tool package. diff --git a/.changeset/spicy-lions-dream.md b/.changeset/spicy-lions-dream.md new file mode 100644 index 0000000000..939d12dd30 --- /dev/null +++ b/.changeset/spicy-lions-dream.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend': minor +--- + +Add Github repository support for squash merge commit title and message options diff --git a/.changeset/spicy-pianos-train.md b/.changeset/spicy-pianos-train.md deleted file mode 100644 index 9a93edb3ce..0000000000 --- a/.changeset/spicy-pianos-train.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-airbrake': patch ---- - -Remove the `object-hash` dependency diff --git a/.changeset/strange-colts-sniff.md b/.changeset/strange-colts-sniff.md deleted file mode 100644 index 831c180a09..0000000000 --- a/.changeset/strange-colts-sniff.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend-module-rails': patch ---- - -Added more (optional) arguments to the `createFetchRailsAction` to be passed to `rails new` diff --git a/.changeset/strange-rocks-hide.md b/.changeset/strange-rocks-hide.md deleted file mode 100644 index e171a277fb..0000000000 --- a/.changeset/strange-rocks-hide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': minor ---- - -The search table also holds the original entity value now and the facets endpoint fetches the filtered entity data from the search table. diff --git a/.changeset/strong-eyes-march.md b/.changeset/strong-eyes-march.md new file mode 100644 index 0000000000..4f3bbacfc8 --- /dev/null +++ b/.changeset/strong-eyes-march.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-ilert': patch +--- + +fixed error on service page not showing if historical uptime was disabled on a service diff --git a/.changeset/strong-peaches-melt.md b/.changeset/strong-peaches-melt.md deleted file mode 100644 index 43f819fd4d..0000000000 --- a/.changeset/strong-peaches-melt.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/core-components': patch -'@backstage/test-utils': patch ---- - -Sync components in @backstage/core-components with the Component Design Guidelines diff --git a/.changeset/strong-rice-warn.md b/.changeset/strong-rice-warn.md deleted file mode 100644 index da157ddaaf..0000000000 --- a/.changeset/strong-rice-warn.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -'@backstage/core-components': patch ---- - -Added an option to allow the `AlertMessage` to be self-closing. This is done with a new `display` property that is set to `transient` on the `AlertMessage` when triggering a message to the `AlertApi`. The length of time that these transient messages stay open for can be set using the `transientTimeoutMs` prop on the `AlertDisplay` in the `App.tsx`. Here is an example: - -```diff - const App = () => ( - -+ - - - {routes} - - - ); -``` - -The above example will set the transient timeout to 2500ms from the default of 5000ms diff --git a/.changeset/stupid-clocks-return.md b/.changeset/stupid-clocks-return.md deleted file mode 100644 index 84b061334f..0000000000 --- a/.changeset/stupid-clocks-return.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@backstage/plugin-events-backend-module-gitlab': patch ---- - -Add `createGitlabTokenValidator(config)` which can be used -to create a validator used at an ingress for topic `gitlab`. - -On top, there is a new `gitlabWebhookEventsModule` for the new backend plugin API -which auto-registers the `HttpPostIngress` for topic `gitlab` incl. the validator. - -Please find more information at -https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-gitlab/README.md. diff --git a/.changeset/stupid-gifts-serve.md b/.changeset/stupid-gifts-serve.md deleted file mode 100644 index 3110a1976c..0000000000 --- a/.changeset/stupid-gifts-serve.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend-module-bitbucket-cloud': patch ---- - -Fix repo:push topic not matching `BitbucketCloudEventRouter`. diff --git a/.changeset/sweet-olives-return.md b/.changeset/sweet-olives-return.md deleted file mode 100644 index 9ce2aa49d1..0000000000 --- a/.changeset/sweet-olives-return.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-plugin-api': minor ---- - -**BREAKING**: All service interfaces are now suffixed with `*Service`. diff --git a/.changeset/sweet-pandas-relax.md b/.changeset/sweet-pandas-relax.md deleted file mode 100644 index 97cff5a89d..0000000000 --- a/.changeset/sweet-pandas-relax.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-components': patch ---- - -InfoCard - Remove subheader container when there is not a subheader or icon diff --git a/.changeset/sweet-tomatoes-cheer.md b/.changeset/sweet-tomatoes-cheer.md new file mode 100644 index 0000000000..d03a4b12c0 --- /dev/null +++ b/.changeset/sweet-tomatoes-cheer.md @@ -0,0 +1,5 @@ +--- +'@backstage/create-app': patch +--- + +Avoid potential temporary directory conflict. diff --git a/.changeset/tasty-impalas-cross.md b/.changeset/tasty-impalas-cross.md new file mode 100644 index 0000000000..f7d7712b29 --- /dev/null +++ b/.changeset/tasty-impalas-cross.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +The `repo test`, `repo lint`, and `repo build` commands will now analyze `yarn.lock` for dependency changes when searching for changed packages. This allows you to use the `--since ` flag even if you have `yarn.lock` changes. diff --git a/.changeset/tasty-impalas-mix.md b/.changeset/tasty-impalas-mix.md new file mode 100644 index 0000000000..c830c45c56 --- /dev/null +++ b/.changeset/tasty-impalas-mix.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend': patch +--- + +Fixed an issue where internal references in the catalog would stick around for longer than expected, causing entities to not be deleted or orphaned as expected. diff --git a/.changeset/tender-colts-greet.md b/.changeset/tender-colts-greet.md deleted file mode 100644 index ff59bf0bea..0000000000 --- a/.changeset/tender-colts-greet.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend-module-openapi': patch ---- - -Enabled support of resolving `$refs` in all kind of yaml documents, not only OpenAPI. This implicitly adds `$ref` resolving support for AsyncAPI specs. Thus, the `openApiPlaceholderResolver` has been renamed to `jsonSchemaRefPlaceholderResolver`. diff --git a/.changeset/tender-parrots-cover.md b/.changeset/tender-parrots-cover.md deleted file mode 100644 index 5272fcbdce..0000000000 --- a/.changeset/tender-parrots-cover.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-techdocs-module-addons-contrib': patch ---- - -Use `app.title` from `app-config.yaml` when creating new Documentation Feedback issue. `Backstage` is the default value. diff --git a/.changeset/thick-stingrays-smile.md b/.changeset/thick-stingrays-smile.md new file mode 100644 index 0000000000..2b56803ede --- /dev/null +++ b/.changeset/thick-stingrays-smile.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-explore': patch +--- + +Makes the `GroupsDiagram` not grown on screen on its own. diff --git a/.changeset/thin-donuts-join.md b/.changeset/thin-donuts-join.md deleted file mode 100644 index 84705711d2..0000000000 --- a/.changeset/thin-donuts-join.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog': patch ---- - -Fixed Entity kind pluralisation in the `CatalogKindHeader` component. diff --git a/.changeset/thin-flies-wink.md b/.changeset/thin-flies-wink.md deleted file mode 100644 index a31db67a1c..0000000000 --- a/.changeset/thin-flies-wink.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder': patch ---- - -Bump `json-schema-library` to version `^7.3.9` which does not pull in the `gson-pointer` library diff --git a/.changeset/thirty-llamas-whisper.md b/.changeset/thirty-llamas-whisper.md deleted file mode 100644 index 9ecf4b591c..0000000000 --- a/.changeset/thirty-llamas-whisper.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/repo-tools': patch ---- - -Updated api docs generation to be compatible with Docusaurus 2-alpha and 2.x. diff --git a/.changeset/tidy-flies-cheer.md b/.changeset/tidy-flies-cheer.md new file mode 100644 index 0000000000..78de902e63 --- /dev/null +++ b/.changeset/tidy-flies-cheer.md @@ -0,0 +1,7 @@ +--- +'@backstage/config': patch +--- + +Adds the ability to coerce values to their boolean representatives. +Values such as `"true"` `1` `on` and `y` will become `true` when using `getBoolean` and the opposites `false`. +This happens particularly when such parameters are used with environmental substitution as environment variables are always strings. diff --git a/.changeset/tiny-kangaroos-speak.md b/.changeset/tiny-kangaroos-speak.md deleted file mode 100644 index 436466c82d..0000000000 --- a/.changeset/tiny-kangaroos-speak.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder': patch ---- - -Show input type array correctly on installed actions page. diff --git a/.changeset/tricky-toys-teach.md b/.changeset/tricky-toys-teach.md new file mode 100644 index 0000000000..f19b907682 --- /dev/null +++ b/.changeset/tricky-toys-teach.md @@ -0,0 +1,7 @@ +--- +'@backstage/create-app': patch +--- + +Remove deprecated `create-plugin` script from the `default-app` template's `package.json.hbs`. +Also, update the documentation to not mention the `create-plugin` script and instead mention +the `new` script. diff --git a/.changeset/twelve-meals-smell.md b/.changeset/twelve-meals-smell.md deleted file mode 100644 index a9d64823a3..0000000000 --- a/.changeset/twelve-meals-smell.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-vault-backend': patch ---- - -Use `express-promise-router` to catch errors properly. -Add `403` error as a known one. It will now return a `NotAllowed` error. diff --git a/.changeset/twenty-dodos-wash.md b/.changeset/twenty-dodos-wash.md deleted file mode 100644 index d21088a953..0000000000 --- a/.changeset/twenty-dodos-wash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-defaults': patch ---- - -Added `lifecycleFactory` to default service factories. diff --git a/.changeset/twenty-nails-camp.md b/.changeset/twenty-nails-camp.md new file mode 100644 index 0000000000..3a8e2e4c3f --- /dev/null +++ b/.changeset/twenty-nails-camp.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-app-api': patch +--- + +Updated implementations for the new `RootLifecycleService`. diff --git a/.changeset/two-buckets-do.md b/.changeset/two-buckets-do.md new file mode 100644 index 0000000000..0f7652dcfa --- /dev/null +++ b/.changeset/two-buckets-do.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-search-backend': patch +--- + +Allow max page limit for search results to be configurable diff --git a/.changeset/unlucky-hotels-hammer.md b/.changeset/unlucky-hotels-hammer.md deleted file mode 100644 index fe499e24ee..0000000000 --- a/.changeset/unlucky-hotels-hammer.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Removed the `react-router` dependency from the app package, using only `react-router-dom` instead. - -This change is just a bit of cleanup and is optional. If you want to apply it to your app, remove the `react-router` dependency from `packages/app/package.json`, and replace any imports from `react-router` with `react-router-dom` instead. diff --git a/.changeset/violet-dots-relate.md b/.changeset/violet-dots-relate.md deleted file mode 100644 index 3e22cdd1c7..0000000000 --- a/.changeset/violet-dots-relate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-components': patch ---- - -Added option to pass additional headers to ``, which are passed along with the request to the underlying provider diff --git a/.changeset/warm-parents-notice.md b/.changeset/warm-parents-notice.md deleted file mode 100644 index 0084a968a1..0000000000 --- a/.changeset/warm-parents-notice.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-proxy-backend': patch ---- - -Documented the `createRouter` method. diff --git a/.changeset/weak-ears-jam.md b/.changeset/weak-ears-jam.md deleted file mode 100644 index 8f20937998..0000000000 --- a/.changeset/weak-ears-jam.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/integration': patch ---- - -Added `integrations.github.apps.allowedInstallationOwners` to the configuration schema. diff --git a/.changeset/weak-zoos-hammer.md b/.changeset/weak-zoos-hammer.md deleted file mode 100644 index 1b25881b85..0000000000 --- a/.changeset/weak-zoos-hammer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Removed all copyright notices from package templates. diff --git a/.changeset/wet-tips-yawn.md b/.changeset/wet-tips-yawn.md deleted file mode 100644 index 63f3c9dd2e..0000000000 --- a/.changeset/wet-tips-yawn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder': minor ---- - -The `RepoUrlPicker` field extension now has an `allowedProjects` option for narrowing the selection of Bitbucket URLs. diff --git a/.changeset/wicked-games-search.md b/.changeset/wicked-games-search.md deleted file mode 100644 index 5264995a2d..0000000000 --- a/.changeset/wicked-games-search.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-cost-insights': patch ---- - -added an optional config entry `costInsights.engineerThreshold` to allow users to control the threshold value for the 'negligible' change in costs. diff --git a/.changeset/wicked-impalas-relate.md b/.changeset/wicked-impalas-relate.md deleted file mode 100644 index 5d8b16d062..0000000000 --- a/.changeset/wicked-impalas-relate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-components': patch ---- - -Internal refactor to remove deprecated symbols. diff --git a/.changeset/wicked-paws-help.md b/.changeset/wicked-paws-help.md deleted file mode 100644 index 8fbba71662..0000000000 --- a/.changeset/wicked-paws-help.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-plugin-api': patch ---- - -Updated `LoggerService` interface with more log methods and meta. diff --git a/.changeset/wild-pears-enjoy.md b/.changeset/wild-pears-enjoy.md deleted file mode 100644 index 01a8b8a4a1..0000000000 --- a/.changeset/wild-pears-enjoy.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-app-api': patch ---- - -Made `WebStorage` notify its subscribers when `localStorage` values change in other tabs/windows diff --git a/.changeset/witty-eels-itch.md b/.changeset/witty-eels-itch.md new file mode 100644 index 0000000000..5a2da8b570 --- /dev/null +++ b/.changeset/witty-eels-itch.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Workspace ranges are no longer considered invalid by version commands. diff --git a/.changeset/witty-phones-chew.md b/.changeset/witty-phones-chew.md deleted file mode 100644 index 93c5659c4e..0000000000 --- a/.changeset/witty-phones-chew.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-sonarqube': patch -'@backstage/plugin-sonarqube-backend': patch ---- - -Added links to the frontend and backend plugins in the readme. diff --git a/.changeset/witty-wasps-kiss.md b/.changeset/witty-wasps-kiss.md deleted file mode 100644 index ef51ef7bfd..0000000000 --- a/.changeset/witty-wasps-kiss.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': minor ---- - -Update the `github:publish` action to allow passing wether to dismiss stale reviews on the protected default branch. diff --git a/.changeset/yellow-forks-knock.md b/.changeset/yellow-forks-knock.md deleted file mode 100644 index 98c4b5b675..0000000000 --- a/.changeset/yellow-forks-knock.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-cost-insights': patch ---- - -Making a possibility to hide a trending line in a cost insights plugin diff --git a/.changeset/young-chairs-check.md b/.changeset/young-chairs-check.md deleted file mode 100644 index e70073e9df..0000000000 --- a/.changeset/young-chairs-check.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-app-api': patch ---- - -Apps will now rewrite the `app.baseUrl` configuration to match the current `location.origin`. The `backend.baseUrl` will also be rewritten in the same way when the `app.baseUrl` and `backend.baseUrl` have matching origins. This will reduce the need for separate frontend builds for different environments. diff --git a/.changeset/young-turkeys-relax.md b/.changeset/young-turkeys-relax.md deleted file mode 100644 index c53cd984a6..0000000000 --- a/.changeset/young-turkeys-relax.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-plugin-api': patch ---- - -Added initial support for registering shutdown hooks via `lifecycleServiceRef`. diff --git a/.github/uffizzi/docker-compose.uffizzi.yml b/.github/uffizzi/docker-compose.uffizzi.yml index f505205505..49039cad2a 100644 --- a/.github/uffizzi/docker-compose.uffizzi.yml +++ b/.github/uffizzi/docker-compose.uffizzi.yml @@ -8,11 +8,11 @@ x-uffizzi: services: backstage: image: '${BACKSTAGE_IMAGE}' + environment: - POSTGRES_HOST: localhost + POSTGRES_HOST: db POSTGRES_USER: postgres POSTGRES_PASSWORD: example - GITHUB_TOKEN: abc NODE_ENV: production deploy: resources: @@ -21,7 +21,7 @@ services: entrypoint: '/bin/sh' command: - '-c' - - "APP_CONFIG_app_baseUrl=$$UFFIZZI_URL APP_CONFIG_backend_baseUrl=$$UFFIZZI_URL APP_CONFIG_auth_environment='production' node packages/backend --config app-config.yaml --config app-config.production.yaml" + - "APP_CONFIG_app_baseUrl=$$UFFIZZI_URL APP_CONFIG_backend_baseUrl=$$UFFIZZI_URL APP_CONFIG_auth_environment='production' node packages/backend --config app-config.yaml" db: image: postgres diff --git a/.github/uffizzi/uffizzi.production.app-config.yaml b/.github/uffizzi/uffizzi.production.app-config.yaml index d6df12a6af..56055c8342 100644 --- a/.github/uffizzi/uffizzi.production.app-config.yaml +++ b/.github/uffizzi/uffizzi.production.app-config.yaml @@ -2,9 +2,258 @@ app: title: Backstage Uffizzi Environment baseUrl: ${UFFIZZI_URL} +organization: + name: My Company + backend: baseUrl: ${UFFIZZI_URL} + auth: + keys: + # random mock key for uffizi deployments + - secret: 5TXvdjVZFxF7qf9K5RAYRDoGrLzJooqa + listen: + port: 7007 + database: + client: better-sqlite3 + connection: ':memory:' + cache: + store: memory cors: origin: ${UFFIZZI_URL} - methods: [GET, POST, PUT, DELETE] + methods: [GET, HEAD, PATCH, POST, PUT, DELETE] credentials: true + csp: + connect-src: ["'self'", 'http:', 'https:'] + # Content-Security-Policy directives follow the Helmet format: https://helmetjs.github.io/#reference + # Default Helmet Content-Security-Policy values can be removed by setting the key to false + +auth: + environment: production + providers: {} + +catalog: + locations: + - type: url + target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all.yaml + +proxy: + '/circleci/api': + target: https://circleci.com/api/v1.1 + headers: + Circle-Token: ${CIRCLECI_AUTH_TOKEN} + + '/jenkins/api': + target: http://localhost:8080 + headers: + Authorization: ${JENKINS_BASIC_AUTH_HEADER} + + '/travisci/api': + target: https://api.travis-ci.com + changeOrigin: true + headers: + Authorization: ${TRAVISCI_AUTH_TOKEN} + travis-api-version: '3' + + '/newrelic/apm/api': + target: https://api.newrelic.com/v2 + headers: + X-Api-Key: ${NEW_RELIC_REST_API_KEY} + + '/newrelic/api': + target: https://api.newrelic.com + headers: + X-Api-Key: ${NEW_RELIC_USER_KEY} + + '/pagerduty': + target: https://api.pagerduty.com + headers: + Authorization: Token token=${PAGERDUTY_TOKEN} + + '/buildkite/api': + target: https://api.buildkite.com/v2/ + headers: + Authorization: ${BUILDKITE_TOKEN} + + '/sentry/api': + target: https://sentry.io/api/ + allowedMethods: ['GET'] + headers: + Authorization: ${SENTRY_TOKEN} + + '/ilert': + target: https://api.ilert.com + allowedMethods: ['GET', 'POST', 'PUT'] + allowedHeaders: ['Authorization'] + headers: + Authorization: ${ILERT_AUTH_HEADER} + + '/airflow': + target: https://your.airflow.instance.com/api/v1 + headers: + Authorization: ${AIRFLOW_BASIC_AUTH_HEADER} + + '/gocd': + target: https://your.gocd.instance.com/go/api + allowedMethods: ['GET'] + allowedHeaders: ['Authorization'] + headers: + Authorization: Basic ${GOCD_AUTH_CREDENTIALS} + + '/dynatrace': + target: https://your.dynatrace.instance.com/api/v2 + headers: + Authorization: 'Api-Token ${DYNATRACE_ACCESS_TOKEN}' + +techdocs: + builder: 'local' # Alternatives - 'external' + generator: + runIn: 'docker' + # dockerImage: my-org/techdocs # use a custom docker image + # pullImage: true # or false to disable automatic pulling of image (e.g. if custom docker login is required) + publisher: + type: 'local' # Alternatives - 'googleGcs' or 'awsS3' or 'azureBlobStorage' or 'openStackSwift'. Read documentation for using alternatives. + +dynatrace: + baseUrl: https://your.dynatrace.instance.com + +# Score-cards sample configuration. +scorecards: + jsonDataUrl: https://raw.githubusercontent.com/Oriflame/backstage-plugins/main/plugins/score-card/sample-data/ + wikiLinkTemplate: https://link-to-wiki/{id} + +sentry: + organization: my-company + +rollbar: + organization: my-company + # NOTE: The rollbar-backend & accountToken key may be deprecated in the future (replaced by a proxy config) + accountToken: my-rollbar-account-token + +lighthouse: + baseUrl: http://localhost:3003 + +kubernetes: + serviceLocatorMethod: + type: 'multiTenant' + clusterLocatorMethods: + - type: 'config' + clusters: [] + +kafka: + clientId: backstage + clusters: + - name: cluster + dashboardUrl: https://akhq.io/ + brokers: + - localhost:9092 + +allure: + baseUrl: http://localhost:5050/allure-docker-service + +integrations: + github: + - host: github.com + token: ${GITHUB_TOKEN} + ### Example for how to add your GitHub Enterprise instance using the API: + # - host: ghe.example.net + # apiBaseUrl: https://ghe.example.net/api/v3 + # token: ${GHE_TOKEN} + ### Example for how to add your GitHub Enterprise instance using raw HTTP fetches (token is optional): + # - host: ghe.example.net + # rawBaseUrl: https://ghe.example.net/raw + # token: ${GHE_TOKEN} + gitlab: + - host: gitlab.com + token: ${GITLAB_TOKEN} + ### Example for how to add a bitbucket cloud integration + # bitbucketCloud: + # - username: ${BITBUCKET_USERNAME} + # appPassword: ${BITBUCKET_APP_PASSWORD} + ### Example for how to add your bitbucket server instance using the API: + # - host: server.bitbucket.com + # apiBaseUrl: server.bitbucket.com + # username: ${BITBUCKET_SERVER_USERNAME} + # appPassword: ${BITBUCKET_SERVER_APP_PASSWORD} + azure: + - host: dev.azure.com + token: ${AZURE_TOKEN} + # googleGcs: + # clientEmail: 'example@example.com' + # privateKey: ${GCS_PRIVATE_KEY} + awsS3: + - host: amazonaws.com + accessKeyId: ${AWS_ACCESS_KEY_ID} + secretAccessKey: ${AWS_SECRET_ACCESS_KEY} + +costInsights: + engineerCost: 200000 + engineerThreshold: 0.5 + products: + computeEngine: + name: Compute Engine + icon: compute + cloudDataflow: + name: Cloud Dataflow + icon: data + cloudStorage: + name: Cloud Storage + icon: storage + bigQuery: + name: BigQuery + icon: search + events: + name: Events + icon: data + metrics: + DAU: + name: Daily Active Users + default: true + MSC: + name: Monthly Subscribers + currencies: + engineers: + label: 'Engineers 🛠' + unit: 'engineer' + usd: + label: 'US Dollars 💵' + kind: 'USD' + unit: 'dollar' + prefix: '$' + rate: 1 + carbonOffsetTons: + label: 'Carbon Offset Tons ♻️⚖️s' + kind: 'CARBON_OFFSET_TONS' + unit: 'carbon offset ton' + rate: 3.5 + beers: + label: 'Beers 🍺' + kind: 'BEERS' + unit: 'beer' + rate: 4.5 + pintsIceCream: + label: 'Pints of Ice Cream 🍦' + kind: 'PINTS_OF_ICE_CREAM' + unit: 'ice cream pint' + rate: 5.5 +pagerduty: + eventsBaseUrl: 'https://events.pagerduty.com/v2' +jenkins: + instances: + - name: default + baseUrl: https://jenkins.example.com + username: backstage-bot + apiKey: 123456789abcdef0123456789abcedf012 + +azureDevOps: + host: dev.azure.com + token: my-token + organization: my-company + +apacheAirflow: + baseUrl: https://your.airflow.instance.com + +gocd: + baseUrl: https://your.gocd.instance.com + +permission: + enabled: true diff --git a/.github/vale/Vocab/Backstage/accept.txt b/.github/vale/Vocab/Backstage/accept.txt index 20e1c867a7..98160a496d 100644 --- a/.github/vale/Vocab/Backstage/accept.txt +++ b/.github/vale/Vocab/Backstage/accept.txt @@ -82,6 +82,7 @@ dependabot deps destructured destructuring +Deutsche dev devops devs diff --git a/.github/workflows/automate_changeset_feedback.yml b/.github/workflows/automate_changeset_feedback.yml index 700eae7d0c..593a4d6b84 100644 --- a/.github/workflows/automate_changeset_feedback.yml +++ b/.github/workflows/automate_changeset_feedback.yml @@ -26,70 +26,15 @@ jobs: # Fetch the commit that's merged into the base rather than the target ref # This will let us diff only the contents of the PR, without fetching more history ref: 'refs/pull/${{ github.event.pull_request.number }}/merge' - - name: fetch base run: git fetch --depth 1 origin ${{ github.base_ref }} - - # We avoid using the in-source script since this workflow has elevated permissions that we don't want to expose - - name: Generate Feedback - id: generate-feedback - run: | - rm -f generate.js - wget -O generate.js https://raw.githubusercontent.com/backstage/backstage/master/scripts/generate-changeset-feedback.js 1>&2 - node generate.js FETCH_HEAD > feedback.txt - - - name: Post Feedback - uses: actions/github-script@v6 - env: - ISSUE_NUMBER: ${{ github.event.pull_request.number }} + - uses: backstage/actions/changeset-feedback@v0.5.12 + name: Generate feedback with: - script: | - const owner = "backstage"; - const repo = "backstage"; - const marker = ""; - const feedback = require('fs').readFileSync('feedback.txt', 'utf8'); - const issue_number = Number(process.env.ISSUE_NUMBER); - const body = feedback.trim() ? feedback + marker : undefined - - const existingComments = await github.paginate(github.rest.issues.listComments, { - owner, - repo, - issue_number, - }); - - const existingComment = existingComments.find((c) => - c.user.login === "github-actions[bot]" && - c.body.includes(marker) - ); - - if (existingComment) { - if (body) { - if (existingComment.body !== body) { - console.log(`updating existing comment in #${issue_number}`); - await github.rest.issues.updateComment({ - owner, - repo, - comment_id: existingComment.id, - body, - }); - } else { - console.log(`skipped update of identical comment in #${issue_number}`); - } - } else { - console.log(`removing comment from #${issue_number}`); - await github.rest.issues.deleteComment({ - owner, - repo, - comment_id: existingComment.id, - body, - }); - } - } else if (body) { - console.log(`creating comment for #${issue_number}`); - await github.rest.issues.createComment({ - owner, - repo, - issue_number, - body, - }); - } + diffRef: 'origin/master' + marker: + issue-number: ${{ github.event.pull_request.number }} + botUsername: backstage-goalie[bot] + app-id: ${{ secrets.BACKSTAGE_GOALIE_APPLICATION_ID }} + private-key: ${{ secrets.BACKSTAGE_GOALIE_PRIVATE_KEY }} + installation-id: ${{ secrets.BACKSTAGE_GOALIE_INSTALLATION_ID }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e84557fc2..c4af6021b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.5.11 + uses: backstage/actions/yarn-install@v0.5.12 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} @@ -63,7 +63,7 @@ jobs: registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.5.11 + uses: backstage/actions/yarn-install@v0.5.12 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} @@ -181,25 +181,14 @@ jobs: registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.5.11 + uses: backstage/actions/yarn-install@v0.5.12 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} - - name: check for yarn.lock changes - id: yarn-lock - run: git diff --quiet origin/master HEAD -- yarn.lock - continue-on-error: true - - name: lint changed packages - if: ${{ steps.yarn-lock.outcome == 'success' }} run: yarn backstage-cli repo lint --since origin/master - - name: lint all packages - if: ${{ steps.yarn-lock.outcome == 'failure' }} - run: yarn backstage-cli repo lint - - name: test changed packages - if: ${{ steps.yarn-lock.outcome == 'success' }} run: yarn backstage-cli repo test --maxWorkers=2 --workerIdleMemoryLimit=1300M --since origin/master env: BACKSTAGE_TEST_DISABLE_DOCKER: 1 @@ -207,17 +196,6 @@ jobs: BACKSTAGE_TEST_DATABASE_POSTGRES9_CONNECTION_STRING: postgresql://postgres:postgres@localhost:${{ job.services.postgres9.ports[5432] }} BACKSTAGE_TEST_DATABASE_MYSQL8_CONNECTION_STRING: mysql://root:root@localhost:${{ job.services.mysql8.ports[3306] }}/ignored - - name: test all packages (and upload coverage) - if: ${{ steps.yarn-lock.outcome == 'failure' }} - run: | - yarn backstage-cli repo test --maxWorkers=2 --workerIdleMemoryLimit=800M --coverage - bash <(curl -s https://codecov.io/bash) -N $(git rev-parse FETCH_HEAD) - env: - BACKSTAGE_TEST_DISABLE_DOCKER: 1 - BACKSTAGE_TEST_DATABASE_POSTGRES13_CONNECTION_STRING: postgresql://postgres:postgres@localhost:${{ job.services.postgres13.ports[5432] }} - BACKSTAGE_TEST_DATABASE_POSTGRES9_CONNECTION_STRING: postgresql://postgres:postgres@localhost:${{ job.services.postgres9.ports[5432] }} - BACKSTAGE_TEST_DATABASE_MYSQL8_CONNECTION_STRING: mysql://root:root@localhost:${{ job.services.mysql8.ports[3306] }}/ignored - - name: ensure clean working directory run: | if files=$(git ls-files --exclude-standard --others --modified) && [[ -z "$files" ]]; then diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index becab0e952..7ceff46303 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -8,7 +8,7 @@ jobs: cron: runs-on: ubuntu-latest steps: - - uses: backstage/actions/cron@v0.5.11 + - uses: backstage/actions/cron@v0.5.12 with: app-id: ${{ secrets.BACKSTAGE_GOALIE_APPLICATION_ID }} private-key: ${{ secrets.BACKSTAGE_GOALIE_PRIVATE_KEY }} diff --git a/.github/workflows/deploy_docker-image.yml b/.github/workflows/deploy_docker-image.yml index 2fae365b18..b2bc62161c 100644 --- a/.github/workflows/deploy_docker-image.yml +++ b/.github/workflows/deploy_docker-image.yml @@ -26,7 +26,7 @@ jobs: registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.5.11 + uses: backstage/actions/yarn-install@v0.5.12 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} diff --git a/.github/workflows/deploy_nightly.yml b/.github/workflows/deploy_nightly.yml index 57be0b4c1c..037053e9f3 100644 --- a/.github/workflows/deploy_nightly.yml +++ b/.github/workflows/deploy_nightly.yml @@ -26,7 +26,7 @@ jobs: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.5.11 + uses: backstage/actions/yarn-install@v0.5.12 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} @@ -57,7 +57,7 @@ jobs: - name: publish nightly release run: | yarn config set -H 'npmAuthToken' "${{secrets.NPM_TOKEN}}" - yarn workspaces foreach -v --no-private npm publish --access public --tolerate-republish --tag nightly + yarn workspaces foreach -p -j 10 -v --no-private npm publish --access public --tolerate-republish --tag nightly env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/deploy_packages.yml b/.github/workflows/deploy_packages.yml index d3fd8a40ff..fb347c7018 100644 --- a/.github/workflows/deploy_packages.yml +++ b/.github/workflows/deploy_packages.yml @@ -68,7 +68,7 @@ jobs: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.5.11 + uses: backstage/actions/yarn-install@v0.5.12 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} @@ -145,7 +145,7 @@ jobs: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.5.11 + uses: backstage/actions/yarn-install@v0.5.12 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} @@ -166,7 +166,7 @@ jobs: if [ -f ".changeset/pre.json" ]; then yarn workspaces foreach -v --no-private npm publish --access public --tolerate-republish --tag next else - yarn workspaces foreach -v --no-private npm publish --access public --tolerate-republish + yarn workspaces foreach -p -j 10 -v --no-private npm publish --access public --tolerate-republish fi env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/issue.yaml b/.github/workflows/issue.yaml index 94f154d70c..0a24956cfd 100644 --- a/.github/workflows/issue.yaml +++ b/.github/workflows/issue.yaml @@ -10,4 +10,4 @@ jobs: if: github.repository == 'backstage/backstage' steps: - name: Issue sync - uses: backstage/actions/issue-sync@v0.5.11 + uses: backstage/actions/issue-sync@v0.5.12 diff --git a/.github/workflows/pr-review-comment.yaml b/.github/workflows/pr-review-comment.yaml index f77f23cea0..c7093cbf07 100644 --- a/.github/workflows/pr-review-comment.yaml +++ b/.github/workflows/pr-review-comment.yaml @@ -35,7 +35,7 @@ jobs: const prNumber = artifact.name.slice('pr_number-'.length) core.setOutput('pr-number', prNumber); - - uses: backstage/actions/re-review@v0.5.11 + - uses: backstage/actions/re-review@v0.5.12 with: app-id: ${{ secrets.BACKSTAGE_GOALIE_APPLICATION_ID }} private-key: ${{ secrets.BACKSTAGE_GOALIE_PRIVATE_KEY }} diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 2ce763e78b..2a12a0d1af 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -18,7 +18,7 @@ jobs: if: github.repository == 'backstage/backstage' && ( github.event.pull_request || github.event.issue.pull_request ) steps: - name: PR sync - uses: backstage/actions/pr-sync@v0.5.11 + uses: backstage/actions/pr-sync@v0.5.12 with: github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }} app-id: ${{ secrets.BACKSTAGE_GOALIE_APPLICATION_ID }} diff --git a/.github/workflows/sync_code-formatting.yml b/.github/workflows/sync_code-formatting.yml index cfc08ccb75..601066d16a 100644 --- a/.github/workflows/sync_code-formatting.yml +++ b/.github/workflows/sync_code-formatting.yml @@ -20,7 +20,7 @@ jobs: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.5.11 + uses: backstage/actions/yarn-install@v0.5.12 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} diff --git a/.github/workflows/sync_snyk-github-issues.yml b/.github/workflows/sync_snyk-github-issues.yml index 5e370873de..4a18ba9e67 100644 --- a/.github/workflows/sync_snyk-github-issues.yml +++ b/.github/workflows/sync_snyk-github-issues.yml @@ -23,7 +23,7 @@ jobs: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.5.11 + uses: backstage/actions/yarn-install@v0.5.12 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} diff --git a/.github/workflows/uffizzi-build.yml b/.github/workflows/uffizzi-build.yml index 163531a755..1a86f8de71 100644 --- a/.github/workflows/uffizzi-build.yml +++ b/.github/workflows/uffizzi-build.yml @@ -8,6 +8,9 @@ on: jobs: build-backstage: + env: + NODE_OPTIONS: --max-old-space-size=4096 + UFFIZZI_URL: https://uffizzi.com name: Build PR image runs-on: ubuntu-latest if: ${{ github.event_name != 'pull_request' || github.event.action != 'closed' }} @@ -16,8 +19,6 @@ jobs: steps: - name: checkout uses: actions/checkout@v3 - with: - path: backstage - name: setup-node uses: actions/setup-node@v3 @@ -25,21 +26,22 @@ jobs: node-version: 16.x registry-url: https://registry.npmjs.org/ - - name: backstage create-app | delete if already exists - run: | - rm -rf ./example-app - npx @backstage/create-app - env: - BACKSTAGE_APP_NAME: example-app - - - name: yarn build - run: | - yarn build:all - working-directory: ./example-app + - name: yarn install + uses: backstage/actions/yarn-install@v0.5.12 + with: + cache-prefix: linux-v16 - name: Use Uffizzi's backstage app config run: | - cp ./backstage/.github/uffizzi/uffizzi.production.app-config.yaml ./example-app/app-config.production.yaml; + cp -f ./.github/uffizzi/uffizzi.production.app-config.yaml ./app-config.yaml + + - name: typescript build + run: | + yarn tsc + + - name: backstage build + run: | + yarn workspace example-backend build - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 @@ -58,8 +60,8 @@ jobs: - name: Build Image uses: docker/build-push-action@v2 with: - context: example-app - file: example-app/packages/backend/Dockerfile + context: . + file: packages/backend/Dockerfile tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} push: true diff --git a/.github/workflows/verify_e2e-linux.yml b/.github/workflows/verify_e2e-linux.yml index bb6765cece..a7913e69da 100644 --- a/.github/workflows/verify_e2e-linux.yml +++ b/.github/workflows/verify_e2e-linux.yml @@ -52,7 +52,7 @@ jobs: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.5.11 + uses: backstage/actions/yarn-install@v0.5.12 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} diff --git a/.github/workflows/verify_e2e-tugboat.yml b/.github/workflows/verify_e2e-tugboat.yml deleted file mode 100644 index cb3a463a0d..0000000000 --- a/.github/workflows/verify_e2e-tugboat.yml +++ /dev/null @@ -1,131 +0,0 @@ -name: E2E Test Tugboat -on: deployment_status - -jobs: - set-pending: - if: github.event.deployment_status.state != 'success' && github.event.deployment_status.state != 'failed' - name: Set pending waiting for Tugboat - runs-on: ubuntu-latest - steps: - # Set an initial commit status message to indicate that the tests are - # running. - - name: set pending status - uses: actions/github-script@v6 - with: - github-token: ${{secrets.GH_SERVICE_ACCOUNT_TOKEN}} - debug: true - script: | - return github.rest.repos.createCommitStatus({ - owner: context.repo.owner, - repo: context.repo.repo, - sha: context.sha, - state: 'pending', - context: 'Backstage Tugboat E2E Tests', - description: 'Waiting for Tugboat to complete deployment', - target_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" - }); - - run-tests: - # Only run after a successful Tugboat deployment. - if: github.event.deployment_status.state == 'success' - name: Run tests against Tugboat deployment - runs-on: ubuntu-latest - steps: - # Set an initial commit status message to indicate that the tests are - # running. - - name: set pending status - uses: actions/github-script@v6 - with: - github-token: ${{secrets.GH_SERVICE_ACCOUNT_TOKEN}} - debug: true - script: | - return github.rest.repos.createCommitStatus({ - owner: context.repo.owner, - repo: context.repo.repo, - sha: context.sha, - state: 'pending', - context: 'Backstage Tugboat E2E Tests', - description: 'Running against tugboat preview', - target_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" - }); - - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: '16.x' - - - name: yarn install - run: yarn --cwd cypress install - - # This is required because the environment_url param that Tugboat uses - # to tell us where the preview is located isn't supported unless you - # specify the custom Accept header when getting the deployment_status, - # and GitHub actions doesn't do that by default. So instead we have to - # load the status object manually and get the data we need. - # https://developer.github.com/changes/2016-04-06-deployment-and-deployment-status-enhancements/ - - name: get deployment status - id: get-status-env - uses: actions/github-script@v6 - with: - github-token: ${{secrets.GH_SERVICE_ACCOUNT_TOKEN}} - result-encoding: string - script: | - const result = await github.rest.repos.getDeploymentStatus({ - owner: context.repo.owner, - repo: context.repo.repo, - deployment_id: context.payload.deployment.id, - status_id: context.payload.deployment_status.id, - headers: { - 'Accept': 'application/vnd.github.ant-man-preview+json' - }, - }); - console.log(result); - return result.data.environment_url; - - - name: cypress run - uses: cypress-io/github-action@v2 - env: - CYPRESS_baseUrl: ${{steps.get-status-env.outputs.result}} - with: - config-file: ./cypress.json - working-directory: ./cypress - browser: chrome - install: false - headless: true - - - name: update artifact - if: ${{ always() }} - uses: actions/upload-artifact@v3 - with: - name: cypress-videos - path: ./cypress/cypress/videos - - - name: set status - if: ${{ failure() }} - uses: actions/github-script@v6 - with: - github-token: ${{secrets.GH_SERVICE_ACCOUNT_TOKEN}} - script: | - return github.rest.repos.createCommitStatus({ - owner: context.repo.owner, - repo: context.repo.repo, - sha: context.sha, - state: "error", - context: 'Backstage Tugboat E2E Tests', - target_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" - }); - - - name: set status - if: ${{ success() }} - uses: actions/github-script@v6 - with: - github-token: ${{secrets.GH_SERVICE_ACCOUNT_TOKEN}} - script: | - return github.rest.repos.createCommitStatus({ - owner: context.repo.owner, - repo: context.repo.repo, - sha: context.sha, - state: "success", - context: 'Backstage Tugboat E2E Tests', - target_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" - }); diff --git a/.github/workflows/verify_kubernetes.yml b/.github/workflows/verify_kubernetes.yml index d4eb7df7b2..c8f9182038 100644 --- a/.github/workflows/verify_kubernetes.yml +++ b/.github/workflows/verify_kubernetes.yml @@ -28,7 +28,7 @@ jobs: registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.5.11 + uses: backstage/actions/yarn-install@v0.5.12 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} diff --git a/.github/workflows/verify_storybook.yml b/.github/workflows/verify_storybook.yml index 20a1ef0e7b..aa06fcd081 100644 --- a/.github/workflows/verify_storybook.yml +++ b/.github/workflows/verify_storybook.yml @@ -35,7 +35,7 @@ jobs: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth - name: yarn install - uses: backstage/actions/yarn-install@v0.5.11 + uses: backstage/actions/yarn-install@v0.5.12 with: cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }} - name: storybook yarn install diff --git a/.tugboat/config.yml b/.tugboat/config.yml deleted file mode 100644 index 1d06e39152..0000000000 --- a/.tugboat/config.yml +++ /dev/null @@ -1,17 +0,0 @@ -services: - backstage: - image: tugboatqa/node:lts - expose: 7007 - default: true - commands: - init: - - mkdir -p /etc/service/node - - echo "#!/bin/sh" > /etc/service/node/run - - echo "yarn --cwd ${TUGBOAT_ROOT} start-backend --config ${TUGBOAT_ROOT}/app-config.yaml --config ${TUGBOAT_ROOT}/.tugboat/tugboat.app-config.production.yaml" >> /etc/service/node/run - - chmod +x /etc/service/node/run - build: - - yarn install --immutable - - yarn workspace example-app build - start: - # wget the endpoint. Will retry every 2 seconds. 30 retries = 1m for service to come up. Plenty. - - wget -O /dev/null -o /dev/null --tries=30 --timeout=5 --retry-connrefused http://localhost:7007 diff --git a/.tugboat/tugboat.app-config.production.yaml b/.tugboat/tugboat.app-config.production.yaml deleted file mode 100644 index b264d53f3f..0000000000 --- a/.tugboat/tugboat.app-config.production.yaml +++ /dev/null @@ -1,10 +0,0 @@ -app: - title: Backstage Tugboat Preview - baseUrl: ${TUGBOAT_DEFAULT_SERVICE_URL} - -backend: - baseUrl: ${TUGBOAT_DEFAULT_SERVICE_URL} - cors: - origin: ${TUGBOAT_DEFAULT_SERVICE_URL} - methods: [GET, POST, PUT, DELETE] - credentials: true diff --git a/ADOPTERS.md b/ADOPTERS.md index 781610e3fb..efa0003f2d 100644 --- a/ADOPTERS.md +++ b/ADOPTERS.md @@ -224,3 +224,4 @@ _You can do this by using the [Adopter form](https://info.backstage.spotify.com/ | [FanDuel](https://fanduel.com) | [Diego Herrera](https://github.com/diegoh), [Christy Campbell](https://github.com/FD-ChristopherCampbell) | We use backstage as our developer portal to provide visibility of our software, ownership, strategy, and the state of maturity across disciplines. | | [Operate First](https://www.operate-first.cloud/) | [Tom Coufal](https://github.com/tumido), [Sam Kopecky](https://github.com/samokopecky) | Backstage provides us with a public service catalog and serves as a gateway to our community cloud. Our instance is publicly available to everyone [here](https://service-catalog.operate-first.cloud/) ([source](https://github.com/operate-first/service-catalog)) | | [Tractable AI](https://tractable.ai/) | [Stephan Schielke](https://github.com/stephanschielke) | We are hitting a critical point in our scale (100+ engineers) and need to get a handle on discoverability and ownership. The Service Catalog, TechDocs and Search are essential to us to achieve that. | +| [Garanti BBVA Teknoloji](https://www.linkedin.com/company/garanti-teknoloji/) | [Caglar Cataloglu](https://github.com/crozwise) | We are using Backstage focusing on improving experience of developers, minimizing friction from idea to production. We call our portal as "Hyperspace" and very excited for our community (2000+ engineers) that finally we have a platform to boost our productivity! diff --git a/cypress/README.md b/cypress/README.md index 4212af398c..be2960e63c 100644 --- a/cypress/README.md +++ b/cypress/README.md @@ -2,10 +2,6 @@ Hey 👋 Welcome to the Cypress tests for Backstage. They're designed to be run against the `packages/app` folder in the main repo, and be some form of smoke tests to make sure that we don't break any core functionality. -They run part of the PR build, and are triggered from the `.github/workflows/tugboat.yml` file. - -The main app gets built up part of a [Tugboat Build](https://tugboat.qa), which when complete, sends a `deployment event` to the PR triggering the aforementioned workflow. - ### Running Locally In order to make typescript happy, this `cypress` package is separate from all the Jest dependencies in the monorepo workspaces setup. diff --git a/docs/assets/getting-started/create-plugin_output.png b/docs/assets/getting-started/create-plugin_output.png index 47231c2079..78389fa02f 100644 Binary files a/docs/assets/getting-started/create-plugin_output.png and b/docs/assets/getting-started/create-plugin_output.png differ diff --git a/docs/auth/auth0/provider.md b/docs/auth/auth0/provider.md index 6fb57a641b..e9393cfa0b 100644 --- a/docs/auth/auth0/provider.md +++ b/docs/auth/auth0/provider.md @@ -37,6 +37,8 @@ auth: audience: ${AUTH_AUTH0_AUDIENCE} connection: ${AUTH_AUTH0_CONNECTION} connectionScope: ${AUTH_AUTH0_CONNECTION_SCOPE} + session: + secret: ${AUTH_SESSION_SECRET} ``` The Auth0 provider is a structure with three configuration keys: @@ -46,6 +48,8 @@ The Auth0 provider is a structure with three configuration keys: page - `domain`: The Application domain, found on the Auth0 Application page +Because Auth0 requires a session you need to give the session a secret key. + ## Optional Configuration - `audience`: The intended recipients of the token diff --git a/docs/features/software-catalog/api.md b/docs/features/software-catalog/api.md index 3221b9e46a..afd9a0af93 100644 --- a/docs/features/software-catalog/api.md +++ b/docs/features/software-catalog/api.md @@ -154,6 +154,29 @@ Some more real world usable examples: `/entities?fields=kind,metadata.namespace,metadata.name` +### Ordering + +By default the entities are returned in an undefined, but stable order. You can +pass in one or more `order` query parameters to affect that ordering. + +Each parameter starts either with `asc:` for ascending lexicographical order or +`desc:` for descending (reverse) lexicographical order, followed by a +dot-separated path into an entity's keys. The ordering is case insensitive. If +more than one order directive is given, later directives have lower precedence +(they are applied only when directives of higher precedence have equal values). + +Example: + +```text +/entities?order=asc:kind&order=desc:metadata.name +``` + +This will order the output first by kind ascending, and then within each kind +(if there's more than one of a given kind) by their name descending. When given +a field that does NOT exist on all entities in the result set, those entities +that do not have the field will always be sorted last in that particular order +step, no matter what the desired order was. + #### Pagination You may pass the `offset` and `limit` query parameters to do classical diff --git a/docs/features/software-catalog/descriptor-format.md b/docs/features/software-catalog/descriptor-format.md index 6596e65464..383fd698f9 100644 --- a/docs/features/software-catalog/descriptor-format.md +++ b/docs/features/software-catalog/descriptor-format.md @@ -251,6 +251,23 @@ the entity belongs to the `"default"` namespace. Namespaces may also be part of the catalog, and are `v1` / `Namespace` entities, i.e. not Backstage specific but the same as in Kubernetes. +### `uid` [output] + +Each entity gets an automatically generated globally unique ID when it first +enters the database. This field is not meant to be specified as input data, but +is rater created by the database engine itself when producing the output entity. + +Note that `uid` values are _not_ to be seen as stable, and should _not_ be used +as external references to an entity. The `uid` can change over time even when a +human observer might think that it wouldn't. As one of many examples, +unregistering and re-registering the exact same file will result in a different +`uid` value even though everything else is the same. Therefore there is very +little, if any, reason to read or use this field externally. + +If you want to refer to an entity by some form of an identifier, you should +always use [string-form entity reference](references.md#string-references) +instead. + ### `title` [optional] A display name of the entity, to be presented in user interfaces instead of the @@ -1309,3 +1326,7 @@ resolved relative to the location of this Location entity itself. A list of targets as strings. They can all be either absolute paths/URLs (depending on the type), or relative paths such as `./details/catalog-info.yaml` which are resolved relative to the location of this Location entity itself. + +### `spec.presence` [optional] + +Describes whether the target of a location is required to exist or not. It defaults to `'required'` if not specified, can also be `'optional'`. diff --git a/docs/features/software-catalog/external-integrations.md b/docs/features/software-catalog/external-integrations.md index 66813cc4d2..da4eb3d229 100644 --- a/docs/features/software-catalog/external-integrations.md +++ b/docs/features/software-catalog/external-integrations.md @@ -111,10 +111,10 @@ export class FrobsProvider implements EntityProvider { throw new Error('Not initialized'); } - const raw = await this.reader.read( + const response = await this.reader.readUrl( `https://frobs-${this.env}.example.com/data`, ); - const data = JSON.parse(raw.toString()); + const data = JSON.parse(await response.buffer()).toString(); /** [5] **/ const entities: Entity[] = frobsToEntities(data); @@ -525,8 +525,8 @@ export class SystemXReaderProcessor implements CatalogProcessor { // API. If you prefer, you can just use plain fetch here // (from the node-fetch package), or any other method of // your choosing. - const data = await this.reader.read(location.target); - const json = JSON.parse(data.toString()); + const response = await this.reader.readUrl(location.target); + const json = JSON.parse((await response.buffer()).toString()); // Repeatedly call emit(processingResult.entity(location, )) } catch (error) { const message = `Unable to read ${location.type}, ${error}`; @@ -627,7 +627,7 @@ export class SystemXReaderProcessor implements CatalogProcessor { // We send the ETag from the previous run if it exists. // The previous ETag will be set in the headers for the outgoing request and system-x // is going to throw NOT_MODIFIED (HTTP 304) if the ETag matches. - const response = await this.reader.readUrl?.(location.target, { + const response = await this.reader.readUrl(location.target, { etag: cacheItem?.etag, }); if (!response) { diff --git a/docs/features/software-templates/writing-templates.md b/docs/features/software-templates/writing-templates.md index e5fdb034fb..71aa0ab758 100644 --- a/docs/features/software-templates/writing-templates.md +++ b/docs/features/software-templates/writing-templates.md @@ -44,8 +44,8 @@ spec: description: Owner of the component ui:field: OwnerPicker ui:options: - allowedKinds: - - Group + catalogFilter: + kind: Group - title: Choose a location required: - repoUrl @@ -165,11 +165,11 @@ this: "firstName": { "ui:autofocus": true, "ui:emptyValue": "", - "ui:autocomplete": "family-name" + "ui:autocomplete": "given-name" }, "lastName": { "ui:emptyValue": "", - "ui:autocomplete": "given-name" + "ui:autocomplete": "family-name" }, "nicknames": { "ui:options":{ @@ -211,12 +211,12 @@ spec: default: Chuck ui:autofocus: true ui:emptyValue: '' - ui:autocomplete: family-name + ui:autocomplete: given-name lastName: type: string title: Last name ui:emptyValue: '' - ui:autocomplete: given-name + ui:autocomplete: family-name nicknames: type: array items: @@ -459,7 +459,7 @@ an owner for them. Ideally, users should be able to select an owner when they go through the scaffolder form from the users and groups already known to Backstage. The `OwnerPicker` is a custom field that generates a searchable list of groups and/or users already in the catalog to pick an owner from. You can -specify which of the two kinds are listed in the `allowedKinds` option: +specify which of the two kinds (or both) are listed in the `catalogFilter.kind` option: ```yaml owner: @@ -468,8 +468,8 @@ owner: description: Owner of the component ui:field: OwnerPicker ui:options: - allowedKinds: - - Group + catalogFilter: + kind: [Group, User] ``` ## `spec.steps` - `Action[]` diff --git a/docs/getting-started/contributors.md b/docs/getting-started/contributors.md index cda53f8a54..b6a12be013 100644 --- a/docs/getting-started/contributors.md +++ b/docs/getting-started/contributors.md @@ -116,7 +116,7 @@ yarn clean # Remove all output folders and @backstage/cli cache yarn diff # Make sure all plugins are up to date with the latest plugin template -yarn create-plugin # Create a new plugin +yarn new # Create a new module ``` > See diff --git a/docs/getting-started/index.md b/docs/getting-started/index.md index 16e361a19f..962919015b 100644 --- a/docs/getting-started/index.md +++ b/docs/getting-started/index.md @@ -49,7 +49,7 @@ installation. Running the command below will install Backstage. The wizard will create a subdirectory inside your current working directory. ```bash -npx @backstage/create-app +npx @backstage/create-app@latest ``` The wizard will ask you for the name of the app, which will also be the name of the directory diff --git a/docs/getting-started/keeping-backstage-updated.md b/docs/getting-started/keeping-backstage-updated.md index 64f78c0997..8e130e7094 100644 --- a/docs/getting-started/keeping-backstage-updated.md +++ b/docs/getting-started/keeping-backstage-updated.md @@ -13,7 +13,7 @@ starting point that's meant to be evolved. The Backstage CLI has a command to bump all `@backstage` packages and dependencies you're using to the latest versions: -[versions:bump](https://backstage.io/docs/cli/commands#versionsbump). +[versions:bump](https://backstage.io/docs/local-dev/cli-commands#versionsbump). ```bash yarn backstage-cli versions:bump @@ -70,7 +70,7 @@ example, depends on global referential equality. This can cause problems in Backstage with API lookup, or config loading. To help resolve these situations, the Backstage CLI has -[versions:check](https://backstage.io/docs/cli/commands#versionscheck). This +[versions:check](https://backstage.io/docs/local-dev/cli-commands#versionscheck). This will validate versions of `@backstage` packages in your app to check for duplicate definitions: diff --git a/docs/getting-started/project-structure.md b/docs/getting-started/project-structure.md index 858f0d8370..7873613a7b 100644 --- a/docs/getting-started/project-structure.md +++ b/docs/getting-started/project-structure.md @@ -101,7 +101,7 @@ are separated out into their own folder, see further down. - [`cli/`](https://github.com/backstage/backstage/tree/master/packages/cli) - One of the biggest packages in our project, the `cli` is used to build, serve, - diff, create-plugins and more. In the early days of this project, we started + diff, create plugins and more. In the early days of this project, we started out with calling tools directly - such as `eslint` - through `package.json`. But as it was tricky to have a good development experience around that when we change named tooling, we opted for wrapping those in our own CLI. That way diff --git a/docs/integrations/github/org.md b/docs/integrations/github/org.md index 9e3c450adc..0aa9997bae 100644 --- a/docs/integrations/github/org.md +++ b/docs/integrations/github/org.md @@ -17,7 +17,7 @@ entities that mirror your org setup. > provide authentication. See the > [GitHub auth provider](../../auth/github/provider.md) for that. -## Installation +## Installation without Events Support This guide will use the Entity Provider method. If you for some reason prefer the Processor method (not recommended), it is described separately below. @@ -60,6 +60,52 @@ schedule it: + ); ``` +## Installation with Events Support + +Please follow the installation instructions at + +- https://github.com/backstage/backstage/tree/master/plugins/events-backend/README.md +- https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-github/README.md + +Additionally, you need to decide how you want to receive events from external sources like + +- [via HTTP endpoint](https://github.com/backstage/backstage/tree/master/plugins/events-backend/README.md) +- [via an AWS SQS queue](https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-aws-sqs/README.md) + +Set up your provider + +```diff +// packages/backend/src/plugins/catalogEventBasedProviders.ts ++import { GithubOrgEntityProvider } from '@backstage/plugin-catalog-backend-module-github'; + import { EntityProvider } from '@backstage/plugin-catalog-node'; + import { EventSubscriber } from '@backstage/plugin-events-node'; + import { PluginEnvironment } from '../types'; + export default async function createCatalogEventBasedProviders( +- _: PluginEnvironment, ++ env: PluginEnvironment, + ): Promise> { + const providers: Array< + (EntityProvider & EventSubscriber) | Array + > = []; +- // add your event-based entity providers here ++ providers.push( ++ GithubOrgEntityProvider.fromConfig(env.config, { ++ id: 'production', ++ orgUrl: 'https://github.com/backstage', ++ logger: env.logger, ++ schedule: env.scheduler.createScheduledTaskRunner({ ++ frequency: { minutes: 60 }, ++ timeout: { minutes: 15 }, ++ }), ++ }), ++ ); + return providers.flat(); + } +``` + +You can check the official docs to [configure your webhook](https://docs.github.com/en/developers/webhooks-and-events/webhooks/creating-webhooks) and to [secure your request](https://docs.github.com/en/developers/webhooks-and-events/webhooks/securing-your-webhooks). +The webhook will need to be configured to forward `organization`,`team` and `membership` events. + ## Configuration As mentioned above, you also must have some configuration in your app-config diff --git a/docs/local-dev/cli-commands.md b/docs/local-dev/cli-commands.md index 715d586545..b43825d733 100644 --- a/docs/local-dev/cli-commands.md +++ b/docs/local-dev/cli-commands.md @@ -201,15 +201,15 @@ Usage: backstage-cli package postpack [options] Restores the changes made by the prepack command ``` -## create +## new -The `create` command opens up an interactive guide for you to create new things +The `new` command opens up an interactive guide for you to create new things in your app. If you do not pass in any options it is completely interactive, but it is possible to pre-select what you want to create using the `--select` flag, -and provide options using `--options`, for example: +and provide options using `--option`, for example: ```bash -backstage-cli create --select plugin --option id=foo +backstage-cli new --select plugin --option id=foo ``` This command is typically added as script in the root `package.json` to be diff --git a/docs/overview/versioning-policy.md b/docs/overview/versioning-policy.md index ad5421585e..fdb3a974b1 100644 --- a/docs/overview/versioning-policy.md +++ b/docs/overview/versioning-policy.md @@ -116,9 +116,8 @@ For packages at version `1.0.0` or above, the following policy also applies: before it can be removed. - The release of breaking changes document a clear upgrade path in the changelog, both when deprecations are introduced and when they are removed. -- Exports that have been marked as `@alpha` or `@beta` may receive breaking - changes without a deprecation period, but the changes must still adhere to - semver. +- Breaking changes to `@alpha` or `@beta` exports must result in at least a minor + version bump, and may be done without a deprecation period. ### Changes that are Not Considered Breaking diff --git a/docs/plugins/backend-plugin.md b/docs/plugins/backend-plugin.md index 65a668d391..517779d161 100644 --- a/docs/plugins/backend-plugin.md +++ b/docs/plugins/backend-plugin.md @@ -28,7 +28,7 @@ lowercase characters separated by dashes, for example `carmen`, if it's a package that adds an integration with a system named Carmen, for example. The full NPM package name would then be something like `@internal/plugin-carmen-backend`, depending on the other flags passed to the -`create-plugin` command, and your settings for the `create-plugin` command in +`new` command, and your settings for the `new` command in your root `package.json`. Creating the plugin will take a little while, so be patient. It will helpfully diff --git a/docs/plugins/call-existing-api.md b/docs/plugins/call-existing-api.md index e91506623b..da76fa8434 100644 --- a/docs/plugins/call-existing-api.md +++ b/docs/plugins/call-existing-api.md @@ -79,7 +79,7 @@ proxy: ```ts // Inside your component const backendUrl = config.getString('backend.baseUrl'); -fetch(`${backendUrl}/proxy/frobs/list`) +fetch(`${backendUrl}/api/proxy/frobs/list`) .then(response => response.json()) .then(payload => setFrobs(payload as Frob[])); ``` diff --git a/docs/plugins/create-a-plugin.md b/docs/plugins/create-a-plugin.md index 29607af140..da7cf0051a 100644 --- a/docs/plugins/create-a-plugin.md +++ b/docs/plugins/create-a-plugin.md @@ -11,7 +11,7 @@ A Backstage Plugin adds functionality to Backstage. To create a new plugin, make sure you've run `yarn install` and installed dependencies, then run the following on your command line (a shortcut to invoking the -[`backstage-cli create-plugin`](../local-dev/cli-commands.md#create-plugin)) +[`backstage-cli new --select plugin`](../local-dev/cli-commands.md#new)) from the root of your project. ```bash diff --git a/docs/plugins/integrating-plugin-into-software-catalog.md b/docs/plugins/integrating-plugin-into-software-catalog.md index 97efa56ac3..a44e6d01c0 100644 --- a/docs/plugins/integrating-plugin-into-software-catalog.md +++ b/docs/plugins/integrating-plugin-into-software-catalog.md @@ -21,7 +21,7 @@ should have a separate package in a folder, which represents your plugin. Example: ``` -$ yarn create-plugin +$ yarn new --select plugin > ? Enter an ID for the plugin [required] my-plugin > ? Enter the owner(s) of the plugin. If specified, this will be added to CODEOWNERS for the plugin path. [optional] diff --git a/docs/plugins/integrating-search-into-plugins.md b/docs/plugins/integrating-search-into-plugins.md index 3855dd5474..524daf18cd 100644 --- a/docs/plugins/integrating-search-into-plugins.md +++ b/docs/plugins/integrating-search-into-plugins.md @@ -333,3 +333,85 @@ reading the search context. If you produce something generic and reusable, consider contributing your component upstream so that all users of the Backstage Search Platform can benefit. Issues and pull requests welcome. + +#### Custom search results + +Search results throughout Backstage are rendered as lists so that list items can easily be customized; although a [default result list item](https://backstage.io/storybook/?path=/story/plugins-search-defaultresultlistitem--default) is available, plugins are in the best position to provide custom result list items that surface relevant information only known to the plugin. + +The example below imagines `YourCustomSearchResult` as a type of search result that contains associated `tags` which could be rendered as chips below the title/text. + +```tsx +import { Link } from '@backstage/core-components'; +import { useAnalytics } from '@backstage/core-plugin-api'; +import { ResultHighlight } from '@backstage/plugin-search-common'; +import { HighlightedSearchResultText } from '@backstage/plugin-search-react'; + +type CustomSearchResultListItemProps = { + result: YourCustomSearchResult; + rank?: number; + highlight?: ResultHighlight; +}; + +export const CustomSearchResultListItem = ( + props: CustomSearchResultListItemProps, +) => { + const { title, text, location, tags } = props.result; + + const analytics = useAnalytics(); + const handleClick = () => { + analytics.captureEvent('discover', title, { + attributes: { to: location }, + value: props.rank, + }); + }; + + return ( + + + + + ) : ( + title + ) + } + secondary={ + highlight?.fields?.text ? ( + + ) : ( + text + ) + } + /> + {tags && + tags.map((tag: string) => ( + + ))} + + + + + ); +}; +``` + +The optional use of the `` component makes it possible to highlight relevant parts of the result based on the user's search query. + +**Note on Analytics**: In order for app integrators to track and improve search experiences across Backstage, it's important for them to understand when and what users search for, as well as what they click on after searching. When providing a custom result component, it's your responsibility as a plugin developer to instrument it according to search analytics conventions. In particular: + +- You must use the `analytics.captureEvent` method, from the `useAnalytics()` hook (detailed [plugin analytics docs are here](./analytics.md)). +- You must ensure that the action of the event, representing a click on a search result item, is `discover`, and the subject is the `title` of the clicked result. In addition, the `to` attribute should be set to the result's `location`, and the `value` of the event must be set to the `rank` (passed in as a prop). +- You must ensure that the aforementioned `captureEvent` method is called when a user clicks the link; you should further ensure that the `noTrack` prop is added to the link (which disables default link click tracking, in favor of this custom instrumentation). + +For other examples and inspiration on custom result list items, check out the [``](https://github.com/backstage/backstage/blob/c981e83/plugins/stack-overflow/src/search/StackOverflowSearchResultListItem/StackOverflowSearchResultListItem.tsx) or [``](https://github.com/backstage/backstage/blob/c981e83/plugins/catalog/src/components/CatalogSearchResultListItem/CatalogSearchResultListItem.tsx) components. diff --git a/docs/plugins/url-reader.md b/docs/plugins/url-reader.md index 815674091b..595c87ab94 100644 --- a/docs/plugins/url-reader.md +++ b/docs/plugins/url-reader.md @@ -60,15 +60,7 @@ The generic interface of a URL Reader instance looks like this. ```ts export type UrlReader = { /* Used to read a single file and return its content. */ - read(url: string): Promise; - /** - * A replacement for the read method that supports options and complex responses. - * - * Use this whenever it is available, as the read method will be deprecated and - * eventually removed in the future. - */ - readUrl?(url: string, options?: ReadUrlOptions): Promise; - + readUrl(url: string, options?: ReadUrlOptions): Promise; /* Used to read a file tree and download as a directory. */ readTree(url: string, options?: ReadTreeOptions): Promise; /* Used to search a file in a tree. */ @@ -102,8 +94,8 @@ backend plugins. Once the reader instance is available inside the plugin, one of its methods can directly be used with a URL. Some example usages - -- [`read`](https://github.com/backstage/backstage/blob/d5c83bb889b8142e343ebc4e4c0b90a02d1c1a3d/plugins/catalog-backend/src/ingestion/processors/codeowners/read.ts#L24-L33) - - Catalog using the `read` method to read the CODEOWNERS file in a repository. +- [`readUrl`](https://github.com/backstage/backstage/blob/a7607b5/plugins/catalog-backend/src/modules/codeowners/lib/read.ts#L24-L33) - + Catalog using the `readUrl` method to read the CODEOWNERS file in a repository. - [`readTree`](https://github.com/backstage/backstage/blob/84a8788/plugins/techdocs-node/src/helpers.ts#L146-L167) - TechDocs using the `readTree` method to download markdown files in order to generate the documentation site. @@ -155,11 +147,9 @@ all the methods of the `UrlReader` interface should be implemented. However it is okay to start by implementing just one of them and create issues for the remaining. -#### read +#### `readUrl` -NOTE: Use `readUrl` instead of `read`. - -`read` method expects a user-friendly URL, something which can be copied from +`readUrl` method expects a user-friendly URL, something which can be copied from the browser naturally when a person is browsing the provider in their browser. - ✅ Valid URL : @@ -168,18 +158,10 @@ the browser naturally when a person is browsing the provider in their browser. `https://raw.githubusercontent.com/backstage/backstage/master/ADOPTERS.md` - ❌ Not a valid URL : `https://github.com/backstage/backstage/ADOPTERS.md` -Upon receiving the URL, `read` converts the user-friendly URL into an API URL +Upon receiving the URL, `readUrl` converts the user-friendly URL into an API URL which can be used to request the provider's API. -`read` then makes an authenticated request to the provider API and returns the -file's content. - -#### `readUrl` - -`readUrl` is a new interface that allows complex response objects and is -intended to replace the `read` method. This new method is currently optional to -implement which allows for a soft migration to `readUrl` instead of `read` in -the future. +`readUrl` then makes an authenticated request to the provider API and returns the response containing the file's contents and ETag(if the provider supports it). #### `readTree` diff --git a/docs/releases/v1.10.0-next.0-changelog.md b/docs/releases/v1.10.0-next.0-changelog.md new file mode 100644 index 0000000000..71bd712dbc --- /dev/null +++ b/docs/releases/v1.10.0-next.0-changelog.md @@ -0,0 +1,1916 @@ +# Release v1.10.0-next.0 + +## @backstage/catalog-client@1.3.0-next.0 + +### Minor Changes + +- f75bf76330: Implemented support for the `order` directive on `getEntities` + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/errors@1.1.4 + +## @backstage/plugin-catalog-backend@1.7.0-next.0 + +### Minor Changes + +- f75bf76330: Implemented server side ordering in the entities endpoint + +### Patch Changes + +- d136793ff0: Fixed an issue where internal references in the catalog would stick around for longer than expected, causing entities to not be deleted or orphaned as expected. +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-scaffolder-common@1.2.4-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/plugin-catalog-common@1.0.10-next.0 + - @backstage/plugin-catalog-node@1.3.1-next.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-node@0.7.2 + - @backstage/plugin-search-common@1.2.0 + +## @backstage/plugin-scaffolder@1.10.0-next.0 + +### Minor Changes + +- e4c0240445: Added `catalogFilter` field to OwnerPicker and EntityPicker components to support filtering options by any field(s) of an entity. + + The `allowedKinds` field has been deprecated. Use `catalogFilter` instead. This field allows users to specify a filter on the shape of [EntityFilterQuery](https://github.com/backstage/backstage/blob/774c42003782121d3d6b2aa5f2865d53370c160e/packages/catalog-client/src/types/api.ts#L74), which can be passed into the CatalogClient. See examples below: + + - Get all entities of kind `Group` + + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + ``` + + - Get entities of kind `Group` and spec.type `team` + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + spec.type: team + ``` + +### Patch Changes + +- 3c112f6967: rollback `@rjsf/validator-ajv8` to `@rjsf/validator-v6` +- 223e2c5f03: add `onChange` handler to`Stepper` component +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-scaffolder-common@1.2.4-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/integration-react@1.1.9-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + - @backstage/plugin-catalog-common@1.0.10-next.0 + - @backstage/plugin-permission-react@0.4.8 + +## @backstage/app-defaults@1.0.11-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-app-api@1.3.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-permission-react@0.4.8 + +## @backstage/backend-test-utils@0.1.32-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.22.1-next.0 + - @backstage/backend-app-api@0.2.4 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/config@1.0.5 + +## @backstage/catalog-model@1.1.5-next.0 + +### Patch Changes + +- 011bd518b7: Fixed spelling mistakes in documentation. +- Updated dependencies + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + +## @backstage/cli@0.22.1-next.0 + +### Patch Changes + +- 47c10706df: Fixed an issue where the CLI would fail to function when there was a mix of workspace and non-workspace versions of the same package in `yarn.lock` when using Yarn 3. +- a62a1f9dca: The frontend serve task now filters out allowed package duplicates during its package check, just like `versions:bump` and `versions:check`. +- 7c8a974515: The `repo test`, `repo lint`, and `repo build` commands will now analyze `yarn.lock` for dependency changes when searching for changed packages. This allows you to use the `--since ` flag even if you have `yarn.lock` changes. +- e1b71e142e: Workspace ranges are no longer considered invalid by version commands. +- Updated dependencies + - @backstage/cli-common@0.1.11 + - @backstage/config@1.0.5 + - @backstage/config-loader@1.1.7 + - @backstage/errors@1.1.4 + - @backstage/release-manifests@0.0.8 + - @backstage/types@1.0.2 + +## @backstage/core-components@0.12.3-next.0 + +### Patch Changes + +- f2ea446de0: Applied fix from v1.9.1 +- Updated dependencies + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/version-bridge@1.0.3 + +## @backstage/create-app@0.4.36-next.0 + +### Patch Changes + +- Bumped create-app version. +- Updated dependencies + - @backstage/cli-common@0.1.11 + +## @backstage/dev-utils@1.0.11-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/app-defaults@1.0.11-next.0 + - @backstage/core-app-api@1.3.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/integration-react@1.1.9-next.0 + - @backstage/test-utils@1.2.3 + - @backstage/theme@0.2.16 + +## @backstage/integration-react@1.1.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/integration@1.4.1 + - @backstage/theme@0.2.16 + +## @backstage/repo-tools@0.1.1-next.0 + +### Patch Changes + +- c447a5221b: Use the project tsconfig in case of selection all packages +- 93cff3053e: Move some dependencies as `peerDependencies` because we need to always use same version as in `api-extractor` +- 75275b0b0b: Updated dependency `@microsoft/tsdoc-config` to `0.16.2`. +- Updated dependencies + - @backstage/cli-common@0.1.11 + - @backstage/errors@1.1.4 + +## @techdocs/cli@1.2.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/cli-common@0.1.11 + - @backstage/config@1.0.5 + - @backstage/plugin-techdocs-node@1.4.4-next.0 + +## @backstage/plugin-adr@0.2.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/integration-react@1.1.9-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-adr-common@0.2.5-next.0 + - @backstage/plugin-search-common@1.2.0 + - @backstage/plugin-search-react@1.3.2-next.0 + +## @backstage/plugin-adr-backend@0.2.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/plugin-adr-common@0.2.5-next.0 + - @backstage/plugin-search-common@1.2.0 + +## @backstage/plugin-adr-common@0.2.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/integration@1.4.1 + - @backstage/plugin-search-common@1.2.0 + +## @backstage/plugin-airbrake@0.3.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/dev-utils@1.0.11-next.0 + - @backstage/test-utils@1.2.3 + - @backstage/theme@0.2.16 + +## @backstage/plugin-allure@0.1.30-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-analytics-module-ga@0.1.25-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-apache-airflow@0.2.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + +## @backstage/plugin-api-docs@0.8.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-catalog@1.7.2-next.0 + +## @backstage/plugin-apollo-explorer@0.1.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-auth-backend@0.17.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/plugin-auth-node@0.2.8 + +## @backstage/plugin-azure-devops@0.2.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-azure-devops-common@0.3.0 + +## @backstage/plugin-azure-sites@0.1.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-azure-sites-common@0.1.0 + +## @backstage/plugin-badges@0.2.38-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-badges-backend@0.1.34-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + +## @backstage/plugin-bazaar@0.2.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.22.1-next.0 + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog@1.7.2-next.0 + +## @backstage/plugin-bazaar-backend@0.2.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/backend-test-utils@0.1.32-next.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + +## @backstage/plugin-bitrise@0.1.41-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-catalog@1.7.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/integration-react@1.1.9-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + - @backstage/plugin-catalog-common@1.0.10-next.0 + - @backstage/plugin-search-common@1.2.0 + - @backstage/plugin-search-react@1.3.2-next.0 + +## @backstage/plugin-catalog-backend-module-aws@0.1.13-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/plugin-catalog-node@1.3.1-next.0 + +## @backstage/plugin-catalog-backend-module-azure@0.1.11-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/plugin-catalog-node@1.3.1-next.0 + +## @backstage/plugin-catalog-backend-module-bitbucket@0.2.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/plugin-bitbucket-cloud-common@0.2.2 + +## @backstage/plugin-catalog-backend-module-bitbucket-cloud@0.1.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/integration@1.4.1 + - @backstage/plugin-bitbucket-cloud-common@0.2.2 + - @backstage/plugin-catalog-common@1.0.10-next.0 + - @backstage/plugin-catalog-node@1.3.1-next.0 + - @backstage/plugin-events-node@0.2.0 + +## @backstage/plugin-catalog-backend-module-bitbucket-server@0.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/plugin-catalog-node@1.3.1-next.0 + +## @backstage/plugin-catalog-backend-module-gerrit@0.1.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/plugin-catalog-node@1.3.1-next.0 + +## @backstage/plugin-catalog-backend-module-github@0.2.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/plugin-catalog-common@1.0.10-next.0 + - @backstage/plugin-catalog-node@1.3.1-next.0 + - @backstage/plugin-events-node@0.2.0 + +## @backstage/plugin-catalog-backend-module-gitlab@0.1.11-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/plugin-catalog-node@1.3.1-next.0 + +## @backstage/plugin-catalog-backend-module-incremental-ingestion@0.1.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/backend-test-utils@0.1.32-next.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-node@1.3.1-next.0 + - @backstage/plugin-permission-common@0.7.2 + +## @backstage/plugin-catalog-backend-module-ldap@0.5.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + +## @backstage/plugin-catalog-backend-module-msgraph@0.4.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/plugin-catalog-node@1.3.1-next.0 + +## @backstage/plugin-catalog-backend-module-openapi@0.1.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/plugin-catalog-node@1.3.1-next.0 + +## @backstage/plugin-catalog-common@1.0.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-search-common@1.2.0 + +## @backstage/plugin-catalog-graph@0.2.26-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-catalog-graphql@0.3.17-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/config@1.0.5 + - @backstage/types@1.0.2 + +## @backstage/plugin-catalog-import@0.9.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/integration-react@1.1.9-next.0 + - @backstage/plugin-catalog-common@1.0.10-next.0 + +## @backstage/plugin-catalog-node@1.3.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/plugin-catalog-common@1.0.10-next.0 + +## @backstage/plugin-catalog-react@1.2.4-next.0 + +### Patch Changes + +- 37426f6f5e: Fixed bug in `EntityTagPicker` that filtered on unavailable tags for the selected kind. +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-catalog-common@1.0.10-next.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-react@0.4.8 + +## @backstage/plugin-cicd-statistics@0.1.16-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-plugin-api@1.2.0 + +## @backstage/plugin-cicd-statistics-module-gitlab@0.1.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-cicd-statistics@0.1.16-next.0 + +## @backstage/plugin-circleci@0.3.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-cloudbuild@0.3.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-code-climate@0.1.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-code-coverage@0.2.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-code-coverage-backend@0.2.6-next.0 + +### Patch Changes + +- dcfdaeccd3: `RouterOptions` now accepts an optional `catalogApi` argument, allowing custom catalog clients to be used. This is leveraged in the local standalone development runner to pass in a catalog client that returns fake data. +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + +## @backstage/plugin-codescene@0.1.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-config-schema@0.1.37-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + +## @backstage/plugin-cost-insights@0.12.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/test-utils@1.2.3 + - @backstage/theme@0.2.16 + - @backstage/plugin-cost-insights-common@0.1.1 + +## @backstage/plugin-dynatrace@1.0.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-explore@0.3.45-next.0 + +### Patch Changes + +- d318d4f659: Makes the `GroupsDiagram` not grown on screen on its own. +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-explore-common@0.0.1 + - @backstage/plugin-explore-react@0.0.24 + - @backstage/plugin-search-common@1.2.0 + - @backstage/plugin-search-react@1.3.2-next.0 + +## @backstage/plugin-explore-backend@0.0.2-next.0 + +### Patch Changes + +- 358554ff3c: Bump `msw` to `^0.49.0` +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/plugin-explore-common@0.0.1 + - @backstage/plugin-search-common@1.2.0 + +## @backstage/plugin-firehydrant@0.1.31-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-fossa@0.2.46-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-gcalendar@0.3.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-gcp-projects@0.3.33-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-git-release-manager@0.3.27-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/integration@1.4.1 + - @backstage/theme@0.2.16 + +## @backstage/plugin-github-actions@0.5.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/integration@1.4.1 + - @backstage/theme@0.2.16 + +## @backstage/plugin-github-deployments@0.1.45-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/integration-react@1.1.9-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-github-issues@0.2.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/theme@0.2.16 + +## @backstage/plugin-github-pull-requests-board@0.1.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/integration@1.4.1 + - @backstage/theme@0.2.16 + +## @backstage/plugin-gitops-profiles@0.3.32-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-gocd@0.1.20-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-graphiql@0.2.46-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-graphql-backend@0.1.30-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/plugin-catalog-graphql@0.3.17-next.0 + +## @backstage/plugin-home@0.4.30-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-stack-overflow@0.1.10-next.0 + +## @backstage/plugin-ilert@0.2.3-next.0 + +### Patch Changes + +- b1279d396d: fixed error on service page not showing if historical uptime was disabled on a service +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-jenkins@0.7.13-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-jenkins-common@0.1.12-next.0 + +## @backstage/plugin-jenkins-backend@0.1.30-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/plugin-jenkins-common@0.1.12-next.0 + - @backstage/plugin-permission-common@0.7.2 + +## @backstage/plugin-jenkins-common@0.1.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-common@1.0.10-next.0 + - @backstage/plugin-permission-common@0.7.2 + +## @backstage/plugin-kafka@0.3.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-kafka-backend@0.2.33-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + +## @backstage/plugin-kubernetes@0.7.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-kubernetes-common@0.5.1-next.0 + +## @backstage/plugin-kubernetes-backend@0.9.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-test-utils@0.1.32-next.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/plugin-kubernetes-common@0.5.1-next.0 + +## @backstage/plugin-kubernetes-common@0.5.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + +## @backstage/plugin-lighthouse@0.3.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-newrelic@0.3.32-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-newrelic-dashboard@0.2.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + +## @backstage/plugin-org@0.6.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-org-react@0.1.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-pagerduty@0.5.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-periskop@0.1.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-playlist@0.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-catalog-common@1.0.10-next.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-react@0.4.8 + - @backstage/plugin-playlist-common@0.1.3 + - @backstage/plugin-search-react@1.3.2-next.0 + +## @backstage/plugin-playlist-backend@0.2.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-test-utils@0.1.32-next.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-node@0.7.2 + - @backstage/plugin-playlist-common@0.1.3 + +## @backstage/plugin-rollbar@0.4.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-scaffolder-backend@1.9.1-next.0 + +### Patch Changes + +- e4c0240445: Added `catalogFilter` field to OwnerPicker and EntityPicker components to support filtering options by any field(s) of an entity. + + The `allowedKinds` field has been deprecated. Use `catalogFilter` instead. This field allows users to specify a filter on the shape of [EntityFilterQuery](https://github.com/backstage/backstage/blob/774c42003782121d3d6b2aa5f2865d53370c160e/packages/catalog-client/src/types/api.ts#L74), which can be passed into the CatalogClient. See examples below: + + - Get all entities of kind `Group` + + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + ``` + + - Get entities of kind `Group` and spec.type `team` + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + spec.type: team + ``` + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-scaffolder-common@1.2.4-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/plugin-catalog-node@1.3.1-next.0 + +## @backstage/plugin-scaffolder-backend-module-cookiecutter@0.2.15-next.0 + +### Patch Changes + +- e4c0240445: Added `catalogFilter` field to OwnerPicker and EntityPicker components to support filtering options by any field(s) of an entity. + + The `allowedKinds` field has been deprecated. Use `catalogFilter` instead. This field allows users to specify a filter on the shape of [EntityFilterQuery](https://github.com/backstage/backstage/blob/774c42003782121d3d6b2aa5f2865d53370c160e/packages/catalog-client/src/types/api.ts#L74), which can be passed into the CatalogClient. See examples below: + + - Get all entities of kind `Group` + + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + ``` + + - Get entities of kind `Group` and spec.type `team` + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + spec.type: team + ``` + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.9.1-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + +## @backstage/plugin-scaffolder-backend-module-rails@0.4.8-next.0 + +### Patch Changes + +- e4c0240445: Added `catalogFilter` field to OwnerPicker and EntityPicker components to support filtering options by any field(s) of an entity. + + The `allowedKinds` field has been deprecated. Use `catalogFilter` instead. This field allows users to specify a filter on the shape of [EntityFilterQuery](https://github.com/backstage/backstage/blob/774c42003782121d3d6b2aa5f2865d53370c160e/packages/catalog-client/src/types/api.ts#L74), which can be passed into the CatalogClient. See examples below: + + - Get all entities of kind `Group` + + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + ``` + + - Get entities of kind `Group` and spec.type `team` + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + spec.type: team + ``` + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.9.1-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + +## @backstage/plugin-scaffolder-backend-module-yeoman@0.2.13-next.0 + +### Patch Changes + +- e4c0240445: Added `catalogFilter` field to OwnerPicker and EntityPicker components to support filtering options by any field(s) of an entity. + + The `allowedKinds` field has been deprecated. Use `catalogFilter` instead. This field allows users to specify a filter on the shape of [EntityFilterQuery](https://github.com/backstage/backstage/blob/774c42003782121d3d6b2aa5f2865d53370c160e/packages/catalog-client/src/types/api.ts#L74), which can be passed into the CatalogClient. See examples below: + + - Get all entities of kind `Group` + + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + ``` + + - Get entities of kind `Group` and spec.type `team` + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + spec.type: team + ``` + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.9.1-next.0 + - @backstage/config@1.0.5 + - @backstage/types@1.0.2 + +## @backstage/plugin-scaffolder-common@1.2.4-next.0 + +### Patch Changes + +- 011bd518b7: Fixed spelling mistakes in documentation. +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/types@1.0.2 + +## @backstage/plugin-search@1.0.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-search-common@1.2.0 + - @backstage/plugin-search-react@1.3.2-next.0 + +## @backstage/plugin-search-backend@1.2.1-next.0 + +### Patch Changes + +- bfd66b0478: Allow max page limit for search results to be configurable +- Updated dependencies + - @backstage/plugin-search-backend-node@1.1.1-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-node@0.7.2 + - @backstage/plugin-search-common@1.2.0 + +## @backstage/plugin-search-backend-module-elasticsearch@1.1.1-next.0 + +### Patch Changes + +- 011bd518b7: Fixed spelling mistakes in documentation. +- 1e1a9fe979: Fixed a bug that could cause an indexing process to silently fail, timeout, and accumulate stale indices. +- 56633804dd: Fixed a bug that could cause the backstage backend to unexpectedly terminate when client errors were encountered during the indexing process. +- aa33a06894: Improved index throughput by optimizing when and how many documents were made available to the bulk client. +- Updated dependencies + - @backstage/plugin-search-backend-node@1.1.1-next.0 + - @backstage/config@1.0.5 + - @backstage/plugin-search-common@1.2.0 + +## @backstage/plugin-search-backend-module-pg@0.5.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-search-backend-node@1.1.1-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/plugin-search-common@1.2.0 + +## @backstage/plugin-search-backend-node@1.1.1-next.0 + +### Patch Changes + +- 011bd518b7: Fixed spelling mistakes in documentation. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-search-common@1.2.0 + +## @backstage/plugin-search-react@1.3.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-search-common@1.2.0 + +## @backstage/plugin-sentry@0.4.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-shortcuts@0.3.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + +## @backstage/plugin-sonarqube@0.6.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-sonarqube-react@0.1.1-next.0 + +## @backstage/plugin-sonarqube-react@0.1.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/core-plugin-api@1.2.0 + +## @backstage/plugin-splunk-on-call@0.4.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-stack-overflow@0.1.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-home@0.4.30-next.0 + - @backstage/plugin-search-common@1.2.0 + - @backstage/plugin-search-react@1.3.2-next.0 + +## @backstage/plugin-stack-overflow-backend@0.1.9-next.0 + +### Patch Changes + +- 06f6a4f0f1: Enable configuration override for StackOverflow backend plugin when instantiating the search indexer. This makes it possible to set different configuration for frontend and backend of the plugin. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/plugin-search-common@1.2.0 + +## @backstage/plugin-tech-insights@0.3.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + - @backstage/plugin-tech-insights-common@0.2.9 + +## @backstage/plugin-tech-insights-backend@0.5.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/plugin-tech-insights-common@0.2.9 + - @backstage/plugin-tech-insights-node@0.3.7 + +## @backstage/plugin-tech-radar@0.5.21-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-techdocs@1.4.3-next.0 + +### Patch Changes + +- 7115c7389b: Updated dependency `jss` to `~10.9.0`. +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/plugin-techdocs-react@1.1.2-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/integration-react@1.1.9-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-search-common@1.2.0 + - @backstage/plugin-search-react@1.3.2-next.0 + +## @backstage/plugin-techdocs-addons-test-utils@1.0.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/plugin-techdocs-react@1.1.2-next.0 + - @backstage/plugin-techdocs@1.4.3-next.0 + - @backstage/core-app-api@1.3.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/integration-react@1.1.9-next.0 + - @backstage/test-utils@1.2.3 + - @backstage/theme@0.2.16 + - @backstage/plugin-catalog@1.7.2-next.0 + - @backstage/plugin-search-react@1.3.2-next.0 + +## @backstage/plugin-techdocs-backend@1.5.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/plugin-catalog-common@1.0.10-next.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-search-common@1.2.0 + - @backstage/plugin-techdocs-node@1.4.4-next.0 + +## @backstage/plugin-techdocs-module-addons-contrib@1.0.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/plugin-techdocs-react@1.1.2-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/integration@1.4.1 + - @backstage/integration-react@1.1.9-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-techdocs-node@1.4.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/integration-aws-node@0.1.0 + - @backstage/plugin-search-common@1.2.0 + +## @backstage/plugin-techdocs-react@1.1.2-next.0 + +### Patch Changes + +- 7115c7389b: Updated dependency `jss` to `~10.9.0`. +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/version-bridge@1.0.3 + +## @backstage/plugin-todo@0.2.16-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-todo-backend@0.1.37-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + +## @backstage/plugin-user-settings@0.6.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-app-api@1.3.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + +## @backstage/plugin-user-settings-backend@0.1.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/plugin-auth-node@0.2.8 + +## @backstage/plugin-vault@0.1.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-vault-backend@0.2.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/backend-test-utils@0.1.32-next.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + +## @backstage/plugin-xcmetrics@0.2.34-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## example-app@0.2.79-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.22.1-next.0 + - @backstage/plugin-scaffolder@1.10.0-next.0 + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/plugin-techdocs-react@1.1.2-next.0 + - @backstage/plugin-techdocs@1.4.3-next.0 + - @backstage/plugin-explore@0.3.45-next.0 + - @backstage/app-defaults@1.0.11-next.0 + - @backstage/config@1.0.5 + - @backstage/core-app-api@1.3.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/integration-react@1.1.9-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-airbrake@0.3.14-next.0 + - @backstage/plugin-apache-airflow@0.2.7-next.0 + - @backstage/plugin-api-docs@0.8.14-next.0 + - @backstage/plugin-azure-devops@0.2.5-next.0 + - @backstage/plugin-azure-sites@0.1.3-next.0 + - @backstage/plugin-badges@0.2.38-next.0 + - @backstage/plugin-catalog-common@1.0.10-next.0 + - @backstage/plugin-catalog-graph@0.2.26-next.0 + - @backstage/plugin-catalog-import@0.9.4-next.0 + - @backstage/plugin-circleci@0.3.14-next.0 + - @backstage/plugin-cloudbuild@0.3.14-next.0 + - @backstage/plugin-code-coverage@0.2.7-next.0 + - @backstage/plugin-cost-insights@0.12.3-next.0 + - @backstage/plugin-dynatrace@1.0.4-next.0 + - @backstage/plugin-gcalendar@0.3.10-next.0 + - @backstage/plugin-gcp-projects@0.3.33-next.0 + - @backstage/plugin-github-actions@0.5.14-next.0 + - @backstage/plugin-gocd@0.1.20-next.0 + - @backstage/plugin-graphiql@0.2.46-next.0 + - @backstage/plugin-home@0.4.30-next.0 + - @backstage/plugin-jenkins@0.7.13-next.0 + - @backstage/plugin-kafka@0.3.14-next.0 + - @backstage/plugin-kubernetes@0.7.7-next.0 + - @backstage/plugin-lighthouse@0.3.14-next.0 + - @backstage/plugin-newrelic@0.3.32-next.0 + - @backstage/plugin-newrelic-dashboard@0.2.7-next.0 + - @backstage/plugin-org@0.6.4-next.0 + - @backstage/plugin-pagerduty@0.5.7-next.0 + - @backstage/plugin-permission-react@0.4.8 + - @backstage/plugin-playlist@0.1.5-next.0 + - @backstage/plugin-rollbar@0.4.14-next.0 + - @backstage/plugin-search@1.0.7-next.0 + - @backstage/plugin-search-common@1.2.0 + - @backstage/plugin-search-react@1.3.2-next.0 + - @backstage/plugin-sentry@0.4.7-next.0 + - @backstage/plugin-shortcuts@0.3.6-next.0 + - @backstage/plugin-stack-overflow@0.1.10-next.0 + - @backstage/plugin-tech-insights@0.3.6-next.0 + - @backstage/plugin-tech-radar@0.5.21-next.0 + - @backstage/plugin-techdocs-module-addons-contrib@1.0.9-next.0 + - @backstage/plugin-todo@0.2.16-next.0 + - @backstage/plugin-user-settings@0.6.2-next.0 + - @internal/plugin-catalog-customized@0.0.6-next.0 + +## example-backend@0.2.79-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-search-backend-module-elasticsearch@1.1.1-next.0 + - @backstage/plugin-search-backend-node@1.1.1-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/plugin-explore-backend@0.0.2-next.0 + - @backstage/plugin-code-coverage-backend@0.2.6-next.0 + - @backstage/plugin-scaffolder-backend-module-rails@0.4.8-next.0 + - @backstage/plugin-scaffolder-backend@1.9.1-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/plugin-search-backend@1.2.1-next.0 + - example-app@0.2.79-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/integration@1.4.1 + - @backstage/plugin-app-backend@0.3.39 + - @backstage/plugin-auth-backend@0.17.3-next.0 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/plugin-azure-devops-backend@0.3.18 + - @backstage/plugin-azure-sites-backend@0.1.1 + - @backstage/plugin-badges-backend@0.1.34-next.0 + - @backstage/plugin-catalog-node@1.3.1-next.0 + - @backstage/plugin-events-backend@0.2.0 + - @backstage/plugin-events-node@0.2.0 + - @backstage/plugin-graphql-backend@0.1.30-next.0 + - @backstage/plugin-jenkins-backend@0.1.30-next.0 + - @backstage/plugin-kafka-backend@0.2.33-next.0 + - @backstage/plugin-kubernetes-backend@0.9.1-next.0 + - @backstage/plugin-permission-backend@0.5.14 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-node@0.7.2 + - @backstage/plugin-playlist-backend@0.2.3-next.0 + - @backstage/plugin-proxy-backend@0.2.33 + - @backstage/plugin-rollbar-backend@0.1.36 + - @backstage/plugin-search-backend-module-pg@0.5.1-next.0 + - @backstage/plugin-search-common@1.2.0 + - @backstage/plugin-tech-insights-backend@0.5.6-next.0 + - @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.23 + - @backstage/plugin-tech-insights-node@0.3.7 + - @backstage/plugin-techdocs-backend@1.5.1-next.0 + - @backstage/plugin-todo-backend@0.1.37-next.0 + +## example-backend-next@0.0.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.9.1-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-defaults@0.1.4 + - @backstage/plugin-app-backend@0.3.39 + +## techdocs-cli-embedded-app@0.2.78-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.22.1-next.0 + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/plugin-techdocs-react@1.1.2-next.0 + - @backstage/plugin-techdocs@1.4.3-next.0 + - @backstage/app-defaults@1.0.11-next.0 + - @backstage/config@1.0.5 + - @backstage/core-app-api@1.3.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/integration-react@1.1.9-next.0 + - @backstage/test-utils@1.2.3 + - @backstage/theme@0.2.16 + - @backstage/plugin-catalog@1.7.2-next.0 + +## @internal/plugin-catalog-customized@0.0.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/plugin-catalog@1.7.2-next.0 + +## @internal/plugin-todo-list@1.0.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 diff --git a/docs/releases/v1.9.0-changelog.md b/docs/releases/v1.9.0-changelog.md new file mode 100644 index 0000000000..b0a94e266a --- /dev/null +++ b/docs/releases/v1.9.0-changelog.md @@ -0,0 +1,3128 @@ +# Release v1.9.0 + +## @backstage/backend-common@0.17.0 + +### Minor Changes + +- de8a975911: Changed to use native `AbortController` and `AbortSignal` from Node.js, instead + of the one from `node-abort-controller`. This is possible now that the minimum + supported Node.js version of the project is 16. + + Note that their interfaces are very slightly different, but typically not in a + way that matters to consumers. If you see any typescript errors as a direct + result from this, they are compatible with each other in the ways that we + interact with them, and should be possible to type-cast across without ill + effects. + +### Patch Changes + +- d3fea4ae0a: Internal fixes to avoid implicit usage of globals +- 98776e638a: Fixed GitlabUrlReader to include api tokens in API calls +- 1f2b2de3fe: exported KubernetesContainerRunner, KubernetesContainerRunnerOptions, KubernetesContainerRunnerMountBase +- 840f2113c6: Fix `GitlabUrlReader.readTree` bug when there were no matching commits +- 20a5161f04: Adds MySQL support for the catalog-backend +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 9ce7866ecd: Updated dependency `@kubernetes/client-node` to `0.18.0`. +- 3c1302c07d: Updated dependency `@types/http-errors` to `^2.0.0`. +- 6b82598bd8: Added the ability to understand Job Artifact URLs to the GitLab integration +- dfc8edf9c5: Internal refactor to avoid usage of deprecated symbols. +- 8015ff1258: Tweaked wording to use inclusive terminology +- 8646067e07: Fixed `SingleHostDiscovery` so that it properly handles single-string `backend.listen` configurations such as `:80`. +- Updated dependencies + - @backstage/errors@1.1.4 + - @backstage/config-loader@1.1.7 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/cli-common@0.1.11 + - @backstage/config@1.0.5 + +## @backstage/backend-plugin-api@0.2.0 + +### Minor Changes + +- 884d749b14: **BREAKING**: All core service references are now exported via a single `coreServices` object. For example, the `loggerServiceRef` is now accessed via `coreServices.logger` instead. +- a025190552: **BREAKING**: All service interfaces are now suffixed with `*Service`. + +### Patch Changes + +- cb1c2781c0: Updated `LoggerService` interface with more log methods and meta. +- d6dbf1792b: Added initial support for registering shutdown hooks via `lifecycleServiceRef`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/config@1.0.5 + +## @backstage/backend-tasks@0.4.0 + +### Minor Changes + +- de8a975911: Changed to use native `AbortController` and `AbortSignal` from Node.js, instead + of the one from `node-abort-controller`. This is possible now that the minimum + supported Node.js version of the project is 16. + + Note that their interfaces are very slightly different, but typically not in a + way that matters to consumers. If you see any typescript errors as a direct + result from this, they are compatible with each other in the ways that we + interact with them, and should be possible to type-cast across without ill + effects. + +### Patch Changes + +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + +## @backstage/catalog-client@1.2.0 + +### Minor Changes + +- 00d90b520a: **BREAKING PRODUCERS**: Added a new `getEntitiesByRefs` endpoint to `CatalogApi`, for efficient batch fetching of entities by ref. + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/errors@1.1.4 + - @backstage/catalog-model@1.1.4 + +## @backstage/cli@0.22.0 + +### Minor Changes + +- 736f893f72: The Jest configuration that was previously enabled with `BACKSTAGE_NEXT_TESTS` is now enabled by default. To revert to the old configuration you can now instead set `BACKSTAGE_OLD_TESTS`. + + This new configuration uses the `babel` coverage provider rather than `v8`. It used to be that `v8` worked better when using Sucrase for transpilation, but now that we have switched to SWC, `babel` seems to work better. In addition, the new configuration also enables source maps by default, as they no longer have a negative impact on code coverage accuracy, and it also enables a modified Jest runtime with additional caching of script objects. + +### Patch Changes + +- 91d050c140: changed tests created by create-plugin to follow eslint-rules best practices particularly testing-library/prefer-screen-queries and testing-library/render-result-naming-convention +- 43b2b9c791: Removed the unused dependency on `@sucrase/jest-plugin`. +- dd721148b5: Updated Jest coverage configuration to only apply either in the root project or package configuration, depending on whether repo or package tests are run. +- 5850ef9b84: Fix webpack dev server issue where it wasn't serving `index.html` from correct endpoint on subsequent requests. +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries +- 459a3457e1: Bump `msw` version in default plugin/app templates +- c27eabef6b: Adds new web-library package option when generating a new plugin +- 8fffe42708: JSX and React Fast Refresh transforms are no longer enabled when bundling backend code. +- 309f2daca4: Updated dependency `esbuild` to `^0.16.0`. +- ee14bab716: Updated dependency `minimatch` to `5.1.1` and switch version range to `^`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- ed0cf59c59: Updated dependency `@rollup/plugin-commonjs` to `^23.0.0`. +- 16b7c2fccd: Updated dependency `@rollup/plugin-yaml` to `^4.0.0`. +- 086c0bbb45: Updated dependency `@rollup/plugin-json` to `^5.0.0`. +- 8015ff1258: Tweaked wording to use inclusive terminology +- d9d9a7a134: Removed all copyright notices from package templates. +- 8e0358e18d: Added `--skip-install` parameter to `backstage-cli versions:bump` +- Updated dependencies + - @backstage/errors@1.1.4 + - @backstage/config-loader@1.1.7 + - @backstage/release-manifests@0.0.8 + - @backstage/types@1.0.2 + - @backstage/cli-common@0.1.11 + - @backstage/config@1.0.5 + +## @backstage/core-app-api@1.3.0 + +### Minor Changes + +- e0d9c9559a: Added a new `AppRouter` component and `app.createRoot()` method that replaces `app.getRouter()` and `app.getProvider()`, which are now deprecated. The new `AppRouter` component is a drop-in replacement for the old router component, while the new `app.createRoot()` method is used instead of the old provider component. + + An old app setup might look like this: + + ```tsx + const app = createApp(/* ... */); + + const AppProvider = app.getProvider(); + const AppRouter = app.getRouter(); + + const routes = ...; + + const App = () => ( + + + + + {routes} + + + ); + + export default App; + ``` + + With these new APIs, the setup now looks like this: + + ```tsx + import { AppRouter } from '@backstage/core-app-api'; + + const app = createApp(/* ... */); + + const routes = ...; + + export default app.createRoot( + <> + + + + {routes} + + , + ); + ``` + + Note that `app.createRoot()` accepts a React element, rather than a component. + +### Patch Changes + +- d3fea4ae0a: Internal fixes to avoid implicit usage of globals +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries +- b4b5b02315: Tweak feature flag registration so that it happens immediately before the first rendering of the app, rather than just after. +- 6870b43dd1: Fix for the automatic rewriting of base URLs. +- 203271b746: Prevent duplicate feature flag components from rendering in the settings when using components +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. +- 8015ff1258: Tweaked wording to use inclusive terminology +- 653d7912ac: Made `WebStorage` notify its subscribers when `localStorage` values change in other tabs/windows +- 63310e3987: Apps will now rewrite the `app.baseUrl` configuration to match the current `location.origin`. The `backend.baseUrl` will also be rewritten in the same way when the `app.baseUrl` and `backend.baseUrl` have matching origins. This will reduce the need for separate frontend builds for different environments. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/version-bridge@1.0.3 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + +## @backstage/core-plugin-api@1.2.0 + +### Minor Changes + +- 9a1864976a: Added a new `display` property to the `AlertMessage` which can accept the values `permanent` or `transient`. + + Here's a rough example of how to trigger an alert using the new `display` property: + + ```ts + import { alertApiRef, useApi } from '@backstage/core-plugin-api'; + + const ExampleTransient = () => { + const alertApi = useApi(alertApiRef); + alertApi.post({ + message: 'Example of Transient Alert', + severity: 'success', + display: 'transient', + }); + }; + ``` + +### Patch Changes + +- d56127c712: useRouteRef - Limit re-resolving to location pathname changes only +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. +- Updated dependencies + - @backstage/version-bridge@1.0.3 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + +## @backstage/integration-aws-node@0.1.0 + +### Minor Changes + +- 13278732f6: New package for AWS integration node library + +### Patch Changes + +- Updated dependencies + - @backstage/errors@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/repo-tools@0.1.0 + +### Minor Changes + +- 99713fd671: Introducing repo-tools package +- 03843259b4: Api reference documentation improvements + + - breadcrumbs links semantics as code spans + - new `@config` annotation to describe related config keys + +### Patch Changes + +- 9b1193f277: declare dependencies + +- a8611bcac4: Add new command options to the `api-report` + + - added `--allow-warnings`, `-a` to continue processing packages if selected packages have warnings + - added `--allow-all-warnings` to continue processing packages any packages have warnings + - added `--omit-messages`, `-o` to pass some warnings messages code to be omitted from the api-report.md files + - The `paths` argument for this command now takes as default the value on `workspaces.packages` inside the root package.json + - change the path resolution to use the `@backstage/cli-common` packages instead + +- 25ec5c0c3a: Include asset-types.d.ts while running the api report command + +- 71f80eb354: add the command type-deps to the repo tool package. + +- ac440299ef: Updated api docs generation to be compatible with Docusaurus 2-alpha and 2.x. + +- Updated dependencies + - @backstage/errors@1.1.4 + - @backstage/cli-common@0.1.11 + +## @backstage/plugin-catalog@1.7.0 + +### Minor Changes + +- 6ffa47bb0a: Fixes in kind selectors (now `OwnershipCard` works again). `EntityKindPicker` now accepts an optional `allowedKinds` prop, just like `CatalogKindHeader`. +- 462c1d012e: Removed `CatalogKindHeader` from `DefaultCatalogPage`. Deprecated `CatalogKindHeader` in favour of `EntityKindPicker`. + +### Patch Changes + +- d3fea4ae0a: Internal fixes to avoid implicit usage of globals +- ca04d97b09: Handle refresh entity error in `AboutCard`. +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- a19cffbeed: Update search links to only have header as linkable text +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. +- 387d1d5218: Fixed Entity kind pluralisation in the `CatalogKindHeader` component. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/catalog-client@1.2.0 + - @backstage/plugin-search-react@1.3.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/integration-react@1.1.7 + - @backstage/types@1.0.2 + - @backstage/plugin-search-common@1.2.0 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-catalog-common@1.0.9 + +## @backstage/plugin-catalog-backend@1.6.0 + +### Minor Changes + +- 16891a212c: Added new `POST /entities/by-refs` endpoint, which allows you to efficiently + batch-fetch entities by their entity ref. This can be useful e.g. in graphql + resolvers or similar contexts where you need to fetch many entities at the same + time. + +- 273ba3a77f: Deprecated Prometheus metrics in favour of OpenTelemtry metrics. + +- c395abb5b2: The catalog no longer stops after the first processor `validateEntityKind` + method returns `true` when validating entity kind shapes. Instead, it continues + through all registered processors that have this method, and requires that _at + least one_ of them returned true. + + The old behavior of stopping early made it harder to extend existing core kinds + with additional fields, since the `BuiltinKindsEntityProcessor` is always + present at the top of the processing chain and ensures that your additional + validation code would never be run. + + This is technically a breaking change, although it should not affect anybody + under normal circumstances, except if you had problematic validation code that + you were unaware that it was not being run. That code may now start to exhibit + those problems. + + If you need to disable this new behavior, `CatalogBuilder` as used in your + `packages/backend/src/plugins/catalog.ts` file now has a + `useLegacySingleProcessorValidation()` method to go back to the old behavior. + + ```diff + const builder = await CatalogBuilder.create(env); + +builder.useLegacySingleProcessorValidation(); + ``` + +- 3072ebfdd7: The search table also holds the original entity value now and the facets endpoint fetches the filtered entity data from the search table. + +### Patch Changes + +- ba13ff663c: Added a new `catalog.rules[].location` configuration that makes it possible to configure catalog rules to only apply to specific locations, either via exact match or a glob pattern. +- d8593ce0e6: Do not use deprecated `LocationSpec` from the `@backstage/plugin-catalog-node` package +- c507aee8a2: Ensured typescript type checks in migration files. +- 2a8e3cc0b5: Optimize `Stitcher` process to be more memory efficient +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- eacc8e2b55: Make it possible for entity providers to supply only entity refs, instead of full entities, in `delta` mutation deletions. +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries +- 5b3e2afa45: Fixed deprecated use of `substr` into `substring`. +- 71147d5c16: Internal code reorganization. +- 93870e4df1: Track the last time the final entity changed with new timestamp "last updated at" data in final entities database, which gets updated with the time when final entity is updated. +- 20a5161f04: Adds MySQL support for the catalog-backend +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- e982f77fe3: Registered shutdown hook in experimental catalog plugin. +- b3fac9c107: Ignore attempts at emitting the current entity as a child of itself. +- Updated dependencies + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-node@0.7.2 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/plugin-search-common@1.2.0 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/plugin-catalog-common@1.0.9 + - @backstage/plugin-scaffolder-common@1.2.3 + +## @backstage/plugin-catalog-backend-module-incremental-ingestion@0.1.0 + +### Minor Changes + +- 98c643a1a2: Introduces incremental entity providers, which are used for streaming very large data sources into the catalog. + +### Patch Changes + +- c507aee8a2: Ensured typescript type checks in migration files. + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. + +- de8a975911: Changed to use native `AbortController` and `AbortSignal` from Node.js, instead + of the one from `node-abort-controller`. This is possible now that the minimum + supported Node.js version of the project is 16. + + Note that their interfaces are very slightly different, but typically not in a + way that matters to consumers. If you see any typescript errors as a direct + result from this, they are compatible with each other in the ways that we + interact with them, and should be possible to type-cast across without ill + effects. + +- 05a928e296: Updated usages of types from `@backstage/backend-plugin-api`. + +- 61d4efe978: Make incremental providers more resilient to failures + +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/backend-test-utils@0.1.31 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-catalog-node@1.3.0 + +### Minor Changes + +- eacc8e2b55: Make it possible for entity providers to supply only entity refs, instead of full entities, in `delta` mutation deletions. + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- Updated dependencies + - @backstage/catalog-client@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/plugin-catalog-common@1.0.9 + +## @backstage/plugin-events-backend@0.2.0 + +### Minor Changes + +- cf41eedf43: **BREAKING:** Remove required field `router` at `HttpPostIngressEventPublisher.fromConfig` + and replace it with `bind(router: Router)`. + Additionally, the path prefix `/http` will be added inside `HttpPostIngressEventPublisher`. + + ```diff + // at packages/backend/src/plugins/events.ts + const eventsRouter = Router(); + - const httpRouter = Router(); + - eventsRouter.use('/http', httpRouter); + + const http = HttpPostIngressEventPublisher.fromConfig({ + config: env.config, + logger: env.logger, + - router: httpRouter, + }); + + http.bind(eventsRouter); + ``` + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. + +- cf41eedf43: Introduce a new interface `RequestDetails` to abstract `Request` + providing access to request body and headers. + + **BREAKING:** Replace `request: Request` with `request: RequestDetails` at `RequestValidator`. + +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/plugin-events-node@0.2.0 + - @backstage/config@1.0.5 + +## @backstage/plugin-events-node@0.2.0 + +### Minor Changes + +- cf41eedf43: Introduce a new interface `RequestDetails` to abstract `Request` + providing access to request body and headers. + + **BREAKING:** Replace `request: Request` with `request: RequestDetails` at `RequestValidator`. + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.2.0 + +## @backstage/plugin-kubernetes-backend@0.9.0 + +### Minor Changes + +- 2db8acffe7: Kubernetes plugin now gracefully surfaces transport-level errors (like DNS or timeout, or other socket errors) occurring while fetching data. This will be merged into any data that is fetched successfully, fixing a bug where the whole page would be empty if any fetch operation encountered such an error. + +### Patch Changes + +- 22e20b3a59: Clusters declared in the app-config can now have their CA configured via a local filesystem path using the `caFile` property. +- 9ce7866ecd: Updated dependency `@kubernetes/client-node` to `0.18.0`. +- b585179770: Added Kubernetes proxy API route to backend Kubernetes plugin, allowing Backstage plugin developers to read/write new information from Kubernetes (if proper credentials are provided). +- Updated dependencies + - @backstage/plugin-kubernetes-common@0.5.0 + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-test-utils@0.1.31 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-kubernetes-common@0.5.0 + +### Minor Changes + +- 2db8acffe7: Kubernetes plugin now gracefully surfaces transport-level errors (like DNS or timeout, or other socket errors) occurring while fetching data. This will be merged into any data that is fetched successfully, fixing a bug where the whole page would be empty if any fetch operation encountered such an error. + +### Patch Changes + +- 9ce7866ecd: Updated dependency `@kubernetes/client-node` to `0.18.0`. +- b585179770: Added Kubernetes proxy API route to backend Kubernetes plugin, allowing Backstage plugin developers to read/write new information from Kubernetes (if proper credentials are provided). +- Updated dependencies + - @backstage/catalog-model@1.1.4 + +## @backstage/plugin-scaffolder@1.9.0 + +### Minor Changes + +- ddd1c3308d: Implement Custom Field Explorer to view and play around with available installed custom field extensions +- adb1b01e32: Adds the ability to supply a `transformErrors` function to the `Stepper` for `/next` +- 34a48cdc4f: The `RepoUrlPicker` field extension now has an `allowedProjects` option for narrowing the selection of Bitbucket URLs. + +### Patch Changes + +- d4d07cf55e: Enabling the customization of the last step in the scaffolder template. + + To override the content you have to do the next: + + ```typescript jsx + + ``` + +- ef803022f1: Initialize all `formData` in the `Stepper` in `/next` + +- 9b1fadf6d8: Added `noHtml5Validate` prop to `FormProps` on `NextScaffolderPage` + +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. + +- 9000952e87: Form data is now passed to validator functions in 'next' scaffolder, so it's now possible to perform validation for fields that depend on other field values. This is something that we discourage due to the coupling that it creates, but is sometimes still the most sensible solution. + + ```typescript jsx + export const myCustomValidation = ( + value: string, + validation: FieldValidation, + { apiHolder, formData }: { apiHolder: ApiHolder; formData: JsonObject }, + ) => { + // validate + }; + ``` + +- 5b10b2485a: Parse `formData` from `window.location.query` for `scaffolder/next` + +- 57ad6553d0: Pass through `transformErrors` to `TemplateWizardPage` + +- 3280711113: Updated dependency `msw` to `^0.49.0`. + +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. + +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. + +- 5fb6d5e92e: Updated dependency `@react-hookz/web` to `^19.0.0`. + +- 146378c146: Updated dependency `@react-hookz/web` to `^20.0.0`. + +- 380f549b75: bump `@rjsf/*-v5` dependencies + +- a63e2df559: fixed `headerOptions` not passed to `TemplatePage` component + +- 9b606366bf: Bump `json-schema-library` to version `^7.3.9` which does not pull in the `gson-pointer` library + +- db6310b6a0: Show input type array correctly on installed actions page. + +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/catalog-client@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/plugin-permission-react@0.4.8 + - @backstage/integration-react@1.1.7 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + - @backstage/plugin-catalog-common@1.0.9 + - @backstage/plugin-scaffolder-common@1.2.3 + +## @backstage/plugin-scaffolder-backend@1.9.0 + +### Minor Changes + +- a20a0ea698: Added `requiredConversationResolution` template option to `github:repo:create`, `github:repo:push` and `publish:github` + +- b32005e98a: Deprecated the `taskWorkers` option in RouterOptions in favor of `concurrentTasksLimit` which sets the limit of concurrent tasks in a single TaskWorker + + TaskWorker can now run multiple (defaults to 10) tasks concurrently using the `concurrentTasksLimit` option available in both `RouterOptions` and `CreateWorkerOptions`. + + To use the option to create a TaskWorker: + + ```diff + const worker = await TaskWorker.create({ + taskBroker, + actionRegistry, + integrations, + logger, + workingDirectory, + additionalTemplateFilters, + + concurrentTasksLimit: 10 // (1 to Infinity) + }); + ``` + +- fc51bd8aa0: Add support for disabling Github repository wiki, issues and projects + +- 0053d07bee: Update the `github:publish` action to allow passing wether to dismiss stale reviews on the protected default branch. + +### Patch Changes + +- cb716004ef: Internal refactor to improve tests +- 935b66a646: Change step output template examples to use square bracket syntax. +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries +- 26404430bc: Use Json types from @backstage/types +- b07ccffad0: Backend now returns 'ui:options' value from template metadata, it can be used by all your custom scaffolder components. +- 309f2daca4: Updated dependency `esbuild` to `^0.16.0`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/integration@1.4.1 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/plugin-scaffolder-common@1.2.3 + +## @backstage/plugin-search-backend@1.2.0 + +### Minor Changes + +- 29ebc43a0b: numberOfResults is now provided alongside the query result + +### Patch Changes + +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries +- Updated dependencies + - @backstage/plugin-search-backend-node@1.1.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-node@0.7.2 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/types@1.0.2 + - @backstage/plugin-search-common@1.2.0 + - @backstage/config@1.0.5 + +## @backstage/plugin-search-backend-module-elasticsearch@1.1.0 + +### Minor Changes + +- 29ebc43a0b: numberOfResults is now provided alongside the query result +- dff9843718: The search engine now better handles the case when it receives 0 documents at index-time. Prior to this change, the indexer would replace any existing index with an empty index, effectively deleting it. Now instead, a warning is logged, and any existing index is left alone (preserving the index from the last successful indexing attempt). +- d09485ea79: Added support for self hosted OpenSearch via new provider + +### Patch Changes + +- 45eb4d23cf: Fixed a bug that prevented indices from being cleaned up under some circumstances, which could have led to shard exhaustion. +- Updated dependencies + - @backstage/plugin-search-backend-node@1.1.0 + - @backstage/plugin-search-common@1.2.0 + - @backstage/config@1.0.5 + +## @backstage/plugin-search-backend-module-pg@0.5.0 + +### Minor Changes + +- e48fc1f1ae: Added the option to pass a logger to `PgSearchEngine` during instantiation. You may do so as follows: + + ```diff + const searchEngine = await PgSearchEngine.fromConfig(env.config, { + database: env.database, + + logger: env.logger, + }); + ``` + +- dff9843718: The search engine now better handles the case when it receives 0 documents at index-time. Prior to this change, the indexer would replace any existing index with an empty index, effectively deleting it. Now instead, a warning is logged, and any existing index is left alone (preserving the index from the last successful indexing attempt). + +### Patch Changes + +- c507aee8a2: Ensured typescript type checks in migration files. +- Updated dependencies + - @backstage/plugin-search-backend-node@1.1.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-search-common@1.2.0 + - @backstage/config@1.0.5 + +## @backstage/plugin-search-backend-node@1.1.0 + +### Minor Changes + +- 29ebc43a0b: numberOfResults is now provided alongside the query result +- dff9843718: The search engine now better handles the case when it receives 0 documents at index-time. Prior to this change, the indexer would replace any existing index with an empty index, effectively deleting it. Now instead, a warning is logged, and any existing index is left alone (preserving the index from the last successful indexing attempt). + +### Patch Changes + +- a962ce0551: Wait for indexer initialization before finalizing indexing. + +- de8a975911: Changed to use native `AbortController` and `AbortSignal` from Node.js, instead + of the one from `node-abort-controller`. This is possible now that the minimum + supported Node.js version of the project is 16. + + Note that their interfaces are very slightly different, but typically not in a + way that matters to consumers. If you see any typescript errors as a direct + result from this, they are compatible with each other in the ways that we + interact with them, and should be possible to type-cast across without ill + effects. + +- 683ced83f6: Fixed a bug that could cause a `max listeners exceeded warning` to be logged when more than 10 collators were running simultaneously. + +- 81b1e7b0fe: Updated indexer and decorator base classes to take advantage of features introduced in Node.js v16; be sure you are running a [supported version of Node.js](https://backstage.io/docs/releases/v1.8.0#node-16-and-18). + +- 54c5836f7a: Use of `TestPipeline.withSubject()` is now deprecated. Instead, use the `fromCollator`, `fromDecorator`, or `fromIndexer` static methods to instantiate a test pipeline. You may also use the class' `withCollator`, `withDecorator`, and `withIndexer` instance methods to build test pipelines that consist of multiple test subjects. + +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/errors@1.1.4 + - @backstage/plugin-search-common@1.2.0 + - @backstage/config@1.0.5 + +## @backstage/plugin-search-common@1.2.0 + +### Minor Changes + +- 29ebc43a0b: numberOfResults (total number of results for a given query) can now be provided by each search engine and consumed as part of the search results response + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.7.2 + - @backstage/types@1.0.2 + +## @backstage/plugin-search-react@1.3.0 + +### Minor Changes + +- 29ebc43a0b: The `value` of a search analytics event is now set as the total number of search results (when available) + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- a19cffbeed: Update search links to only have header as linkable text +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/version-bridge@1.0.3 + - @backstage/types@1.0.2 + - @backstage/plugin-search-common@1.2.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-sonarqube@0.6.0 + +### Minor Changes + +- 6b59903bfa: Parts of plugin-sonarqube have been moved into a new plugin-sonarqube-react package. Additionally some types that were + previously internal to plugin-sonarqube have been made public and will allow access for third-parties. As the sonarqube + plugin has not yet reached 1.0 breaking changes are expected in the future. As such exports of plugin-sonarqube-react + require importing via the `/alpha` entrypoint: + + ```ts + import { sonarQubeApiRef } from '@backstage/plugin-sonarqube-react/alpha'; + + const sonarQubeApi = useApi(sonarQubeApiRef); + ``` + + Moved from plugin-sonarqube to plugin-sonarqube-react: + + - isSonarQubeAvailable + - SONARQUBE_PROJECT_KEY_ANNOTATION + + Exports that been introduced to plugin-sonarqube-react are documented in the [API report](https://github.com/backstage/backstage/blob/master/plugins/sonarqube-react/api-report.md). + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 17a8e32f39: Updated dependency `rc-progress` to `3.4.1`. +- 3dee2f5ad0: Added links to the frontend and backend plugins in the readme. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/plugin-sonarqube-react@0.1.0 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-sonarqube-react@0.1.0 + +### Minor Changes + +- 6b59903bfa: Parts of plugin-sonarqube have been moved into a new plugin-sonarqube-react package. Additionally some types that were + previously internal to plugin-sonarqube have been made public and will allow access for third-parties. As the sonarqube + plugin has not yet reached 1.0 breaking changes are expected in the future. As such exports of plugin-sonarqube-react + require importing via the `/alpha` entrypoint: + + ```ts + import { sonarQubeApiRef } from '@backstage/plugin-sonarqube-react/alpha'; + + const sonarQubeApi = useApi(sonarQubeApiRef); + ``` + + Moved from plugin-sonarqube to plugin-sonarqube-react: + + - isSonarQubeAvailable + - SONARQUBE_PROJECT_KEY_ANNOTATION + + Exports that been introduced to plugin-sonarqube-react are documented in the [API report](https://github.com/backstage/backstage/blob/master/plugins/sonarqube-react/api-report.md). + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/catalog-model@1.1.4 + +## @backstage/plugin-techdocs-backend@1.5.0 + +### Minor Changes + +- dfbdae092e: Added a new optional `accountId` to the configuration options of the AWS S3 publisher. Configuring this option will source credentials for the `accountId` in the `aws` app config section. See for more details. + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-techdocs-node@1.4.3 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/plugin-search-common@1.2.0 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/plugin-catalog-common@1.0.9 + +## @backstage/plugin-techdocs-react@1.1.0 + +### Minor Changes + +- 786f1b1419: Support older versions of react-router + +### Patch Changes + +- cb716004ef: Internal refactor to improve tests +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/version-bridge@1.0.3 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-user-settings@0.6.0 + +### Minor Changes + +- 29bdda5442: Added the ability to fully customize settings page. Deprecated UserSettingsTab in favour of SettingsLayout.Route + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/core-app-api@1.3.0 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/theme@0.2.16 + +## @backstage/app-defaults@1.0.9 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/core-app-api@1.3.0 + - @backstage/plugin-permission-react@0.4.8 + - @backstage/theme@0.2.16 + +## @backstage/backend-app-api@0.2.4 + +### Patch Changes + +- cb1c2781c0: Updated logger implementations to match interface changes. +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- afa3bf5657: Added `.stop()` method to `Backend`. +- d6dbf1792b: Added `lifecycleFactory` implementation. +- 05a928e296: Updated usages of types from `@backstage/backend-plugin-api`. +- 5260d8fc7d: Root scoped services are now always initialized, regardless of whether they're used by any features. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/plugin-permission-node@0.7.2 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + +## @backstage/backend-defaults@0.1.4 + +### Patch Changes + +- d6dbf1792b: Added `lifecycleFactory` to default service factories. +- Updated dependencies + - @backstage/backend-app-api@0.2.4 + - @backstage/backend-plugin-api@0.2.0 + +## @backstage/backend-test-utils@0.1.31 + +### Patch Changes + +- afa3bf5657: Backends started with `startTestBackend` are now automatically stopped after all tests have run. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-app-api@0.2.4 + - @backstage/cli@0.22.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/config@1.0.5 + +## @backstage/catalog-model@1.1.4 + +### Patch Changes + +- Updated dependencies + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + +## @backstage/cli-common@0.1.11 + +### Patch Changes + +- 8015ff1258: Tweaked wording to use inclusive terminology + +## @backstage/codemods@0.1.42 + +### Patch Changes + +- Updated dependencies + - @backstage/cli-common@0.1.11 + +## @backstage/config@1.0.5 + +### Patch Changes + +- Updated dependencies + - @backstage/types@1.0.2 + +## @backstage/config-loader@1.1.7 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 40e7e6e1a2: Updated dependency `typescript-json-schema` to `^0.55.0`. +- Updated dependencies + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/cli-common@0.1.11 + - @backstage/config@1.0.5 + +## @backstage/core-components@0.12.1 + +### Patch Changes + +- a236a8830d: Update sidebar icon alignment + +- d3fea4ae0a: Internal fixes to avoid implicit usage of globals + +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries + +- ea4a5be8f3: Create a variable for minimum height and add a prop named 'fit' for determining if the graph height should grow or be contained. + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. + +- d2e3bf6737: Made AlertDisplay not crash on undefined messages + +- 64a579a998: Add items prop to SupportButton. This prop can be used to override the items that would otherwise be grabbed from the config. + +- 5d3058355d: Add `react/forbid-elements` linter rule for button, suggest MUI `Button` + +- 3280711113: Updated dependency `msw` to `^0.49.0`. + +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. + +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. + +- 5fb6d5e92e: Updated dependency `@react-hookz/web` to `^19.0.0`. + +- 17a8e32f39: Updated dependency `rc-progress` to `3.4.1`. + +- 146378c146: Updated dependency `@react-hookz/web` to `^20.0.0`. + +- dfc8edf9c5: Internal refactor to avoid usage of deprecated symbols. + +- 8015ff1258: Tweaked wording to use inclusive terminology + +- 830687539f: Sync components in @backstage/core-components with the Component Design Guidelines + +- 1ae86ab5fb: Added an option to allow the `AlertMessage` to be self-closing. This is done with a new `display` property that is set to `transient` on the `AlertMessage` when triggering a message to the `AlertApi`. The length of time that these transient messages stay open for can be set using the `transientTimeoutMs` prop on the `AlertDisplay` in the `App.tsx`. Here is an example: + + ```diff + const App = () => ( + + + + + + {routes} + + + ); + ``` + + The above example will set the transient timeout to 2500ms from the default of 5000ms + +- 16e31e690f: InfoCard - Remove subheader container when there is not a subheader or icon + +- a5a2d12298: Added option to pass additional headers to ``, which are passed along with the request to the underlying provider + +- 91bba69ef8: Internal refactor to remove deprecated symbols. + +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/version-bridge@1.0.3 + - @backstage/errors@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + +## @backstage/create-app@0.4.35 + +### Patch Changes + +- c4788dbb58: Fix dependency ordering in templated packages. + +- 83d3167594: Bumped create-app version. + +- 2cb6963f9b: Bumped create-app version. + +- 6465ab3686: Bumped create-app version. + +- af1358bb07: added default project name for CI job compatibility + +- 935b66a646: Change step output template examples to use square bracket syntax. + +- dfb269fab2: Updated the template to have the `'/test'` proxy endpoint in `app-config.yaml` be commented out by default. + +- d9b3753f87: Updated the app template to use the new `AppRouter` component instead of `app.getRouter()`, as well as `app.createRoot()` instead of `app.getProvider()`. + + To apply this change to an existing app, make the following change to `packages/app/src/App.tsx`: + + ```diff + -import { FlatRoutes } from '@backstage/core-app-api'; + +import { AppRouter, FlatRoutes } from '@backstage/core-app-api'; + + ... + + -const AppProvider = app.getProvider(); + -const AppRouter = app.getRouter(); + + ... + + -const App = () => ( + +export default app.createRoot( + - + + <> + + + + {routes} + + - + + , + ); + ``` + + The final export step should end up looking something like this: + + ```tsx + export default app.createRoot( + <> + + + + {routes} + + , + ); + ``` + + Note that `app.createRoot()` accepts a React element, rather than a component. + +- 71e75c0b70: Removed the `react-router` dependency from the app package, using only `react-router-dom` instead. + + This change is just a bit of cleanup and is optional. If you want to apply it to your app, remove the `react-router` dependency from `packages/app/package.json`, and replace any imports from `react-router` with `react-router-dom` instead. + +- Updated dependencies + - @backstage/cli-common@0.1.11 + +## @backstage/dev-utils@1.0.9 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. +- 8015ff1258: Tweaked wording to use inclusive terminology +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/core-app-api@1.3.0 + - @backstage/test-utils@1.2.3 + - @backstage/app-defaults@1.0.9 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/integration-react@1.1.7 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/errors@1.1.4 + +### Patch Changes + +- ac6cc9f7bd: Removed a circular import +- Updated dependencies + - @backstage/types@1.0.2 + +## @backstage/integration@1.4.1 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 34b039ca9f: Added `integrations.github.apps.allowedInstallationOwners` to the configuration schema. +- Updated dependencies + - @backstage/errors@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/integration-react@1.1.7 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/integration@1.4.1 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + +## @backstage/release-manifests@0.0.8 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. + +## @techdocs/cli@1.2.4 + +### Patch Changes + +- 8015ff1258: Tweaked wording to use inclusive terminology +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/plugin-techdocs-node@1.4.3 + - @backstage/cli-common@0.1.11 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/test-utils@1.2.3 + +### Patch Changes + +- 5e238ed56a: The test utility for the plugin context called `MockPluginProvider` has been created. It will be handy in the cases when you use + `__experimentalConfigure` in your plugin. It is experimental and exported through `@backstage/test-utils/alpha`. +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. +- 830687539f: Sync components in @backstage/core-components with the Component Design Guidelines +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-app-api@1.3.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-react@0.4.8 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + +## @backstage/types@1.0.2 + +### Patch Changes + +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. + +## @backstage/version-bridge@1.0.3 + +### Patch Changes + +- d3fea4ae0a: Internal fixes to avoid implicit usage of globals + +## @backstage/plugin-adr@0.2.4 + +### Patch Changes + +- a19cffbeed: Update search links to only have header as linkable text +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-search-react@1.3.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/integration-react@1.1.7 + - @backstage/plugin-search-common@1.2.0 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-adr-common@0.2.4 + +## @backstage/plugin-adr-backend@0.2.4 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/plugin-search-common@1.2.0 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/plugin-adr-common@0.2.4 + +## @backstage/plugin-adr-common@0.2.4 + +### Patch Changes + +- Updated dependencies + - @backstage/integration@1.4.1 + - @backstage/plugin-search-common@1.2.0 + - @backstage/catalog-model@1.1.4 + +## @backstage/plugin-airbrake@0.3.12 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 151c0e1477: Remove the `object-hash` dependency +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/test-utils@1.2.3 + - @backstage/dev-utils@1.0.9 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-airbrake-backend@0.2.12 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + +## @backstage/plugin-allure@0.1.28 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-analytics-module-ga@0.1.23 + +### Patch Changes + +- d3fea4ae0a: Internal fixes to avoid implicit usage of globals +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 9516b0c355: Added support for sending virtual pageviews on `search` events in order to enable + Site Search functionality in GA. For more information consult [README](/plugins/analytics-module-ga/README.md#enabling-site-search) +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + +## @backstage/plugin-apache-airflow@0.2.5 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + +## @backstage/plugin-api-docs@0.8.12 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/plugin-catalog@1.7.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-apollo-explorer@0.1.5 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/theme@0.2.16 + +## @backstage/plugin-app-backend@0.3.39 + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/config-loader@1.1.7 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + +## @backstage/plugin-auth-backend@0.17.2 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-auth-node@0.2.8 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-azure-devops@0.2.3 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-azure-devops-common@0.3.0 + +## @backstage/plugin-azure-devops-backend@0.3.18 + +### Patch Changes + +- eaccf6d628: Updated installation documentation +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/plugin-azure-devops-common@0.3.0 + +## @backstage/plugin-azure-sites@0.1.1 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-azure-sites-common@0.1.0 + +## @backstage/plugin-azure-sites-backend@0.1.1 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/plugin-azure-sites-common@0.1.0 + +## @backstage/plugin-badges@0.2.36 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-badges-backend@0.1.33 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-bazaar@0.2.1 + +### Patch Changes + +- 9b1891061c: `HomePageBazaarInfoCard` is now displaying `title` instead of `name`. Title is a string that doesn't have to be URL friendly. + The BazaarOverviewCard have the new property `fullHeight`. Link in `BazaarOverviewCard`is moved to header in card. +- 312962da30: Add `title` as optional parameter to `BazaarOverviewCard` +- Updated dependencies + - @backstage/plugin-catalog@1.7.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/catalog-client@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/cli@0.22.0 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + +## @backstage/plugin-bazaar-backend@0.2.2 + +### Patch Changes + +- c507aee8a2: Ensured typescript type checks in migration files. +- 9b1891061c: Column `title` has replaced column `name` for `BazaarProject` in database +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/backend-test-utils@0.1.31 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/config@1.0.5 + +## @backstage/plugin-bitbucket-cloud-common@0.2.2 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/integration@1.4.1 + +## @backstage/plugin-bitrise@0.1.39 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-catalog-backend-module-aws@0.1.12 + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-catalog-backend-module-azure@0.1.10 + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-catalog-backend-module-bitbucket@0.2.6 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/plugin-bitbucket-cloud-common@0.2.2 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-catalog-backend-module-bitbucket-cloud@0.1.6 + +### Patch Changes + +- ce08e1798e: Refresh (potentially) updated catalog files on `repo:push` more efficiently. +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 4eb0bce299: Fix repo:push topic not matching `BitbucketCloudEventRouter`. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/plugin-events-node@0.2.0 + - @backstage/integration@1.4.1 + - @backstage/plugin-bitbucket-cloud-common@0.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/plugin-catalog-common@1.0.9 + +## @backstage/plugin-catalog-backend-module-bitbucket-server@0.1.4 + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/integration@1.4.1 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-catalog-backend-module-gerrit@0.1.7 + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/integration@1.4.1 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-catalog-backend-module-github@0.2.2 + +### Patch Changes + +- 70fa5ec3ec: Fixes the assignment of group member references in `GithubMultiOrgProcessor` so membership relations are resolved correctly. + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. + +- fe93cce743: Added the githubCredentialsProvider property to the GithubLocationAnalyzerOptions to be able to override the GithubCredentialsProvider. + +- a0fd4af94a: Handle GitHub `push` events at the `GithubEntityProvider` by subscribing to the topic `github.push.` + + Implements `EventSubscriber` to receive events for the topic `github.push`. + + On `github.push`, the affected repository will be refreshed. + This includes adding new Location entities, refreshing existing ones, + and removing obsolete ones. + + Please find more information at + + +- 3280711113: Updated dependency `msw` to `^0.49.0`. + +- 754b5854df: Fix incorrectly exported GithubOrgEntityProvider as a type + +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/plugin-events-node@0.2.0 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/plugin-catalog-common@1.0.9 + +## @backstage/plugin-catalog-backend-module-gitlab@0.1.10 + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-catalog-backend-module-ldap@0.5.6 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-catalog-backend-module-msgraph@0.4.5 + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-catalog-backend-module-openapi@0.1.5 + +### Patch Changes + +- dd995cdc72: Enabled support of resolving `$refs` in all kind of yaml documents, not only OpenAPI. This implicitly adds `$ref` resolving support for AsyncAPI specs. Thus, the `openApiPlaceholderResolver` has been renamed to `jsonSchemaRefPlaceholderResolver`. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-catalog-common@1.0.9 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-search-common@1.2.0 + - @backstage/catalog-model@1.1.4 + +## @backstage/plugin-catalog-graph@0.2.24 + +### Patch Changes + +- cb716004ef: Internal refactor to improve tests +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 454f2e90db: Set the default `maxDepth` prop for `EntityRelationsGraph` to a smaller value to provide better readability. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/catalog-client@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-catalog-graphql@0.3.16 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-catalog-import@0.9.2 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/catalog-client@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/integration-react@1.1.7 + - @backstage/integration@1.4.1 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/plugin-catalog-common@1.0.9 + +## @backstage/plugin-catalog-react@1.2.2 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 6ffa47bb0a: Cleanup and small fixes for the kind selector +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/catalog-client@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/errors@1.1.4 + - @backstage/plugin-permission-react@0.4.8 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-catalog-common@1.0.9 + +## @backstage/plugin-cicd-statistics@0.1.14 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + +## @backstage/plugin-cicd-statistics-module-gitlab@0.1.8 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-cicd-statistics@0.1.14 + - @backstage/catalog-model@1.1.4 + +## @backstage/plugin-circleci@0.3.12 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-cloudbuild@0.3.12 + +### Patch Changes + +- d3fea4ae0a: Internal fixes to avoid implicit usage of globals +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-code-climate@0.1.12 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-code-coverage@0.2.5 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + +## @backstage/plugin-code-coverage-backend@0.2.5 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-codescene@0.1.7 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 17a8e32f39: Updated dependency `rc-progress` to `3.4.1`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + +## @backstage/plugin-config-schema@0.1.35 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + +## @backstage/plugin-cost-insights@0.12.1 + +### Patch Changes + +- 593c22253a: Added Y axis for metric data, with relevant formatting and data domain +- f9bbb3be37: Provide the ability to change the base currency from USD to any other currency in cost insights plugin +- d379b6f070: Internal refactor to avoid usage of deprecated symbols +- 5960d0902e: Internal refactor to avoid usage of deprecated symbols +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- f97c7fd1f7: added an optional config entry `costInsights.engineerThreshold` to allow users to control the threshold value for the 'negligible' change in costs. +- a5ecdb99f0: Making a possibility to hide a trending line in a cost insights plugin +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/test-utils@1.2.3 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + - @backstage/plugin-cost-insights-common@0.1.1 + +## @backstage/plugin-dynatrace@1.0.2 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-events-backend-module-aws-sqs@0.1.1 + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- dd008a10c1: Upgrade to AWS SDK for Javascript v3 +- Updated dependencies + - @backstage/backend-tasks@0.4.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/plugin-events-node@0.2.0 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + +## @backstage/plugin-events-backend-module-azure@0.1.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.2.0 + - @backstage/plugin-events-node@0.2.0 + +## @backstage/plugin-events-backend-module-bitbucket-cloud@0.1.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.2.0 + - @backstage/plugin-events-node@0.2.0 + +## @backstage/plugin-events-backend-module-gerrit@0.1.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.2.0 + - @backstage/plugin-events-node@0.2.0 + +## @backstage/plugin-events-backend-module-github@0.1.1 + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. + +- 0f46ec304c: Add `createGithubSignatureValidator(config)` which can be used + to create a validator used at an ingress for topic `github`. + + On top, there is a new `githubWebhookEventsModule` for the new backend plugin API + which auto-registers the `HttpPostIngress` for topic `github` incl. the validator. + + Please find more information at + . + +- Updated dependencies + - @backstage/backend-plugin-api@0.2.0 + - @backstage/plugin-events-node@0.2.0 + - @backstage/config@1.0.5 + +## @backstage/plugin-events-backend-module-gitlab@0.1.1 + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. + +- 31fe8f256a: Add `createGitlabTokenValidator(config)` which can be used + to create a validator used at an ingress for topic `gitlab`. + + On top, there is a new `gitlabWebhookEventsModule` for the new backend plugin API + which auto-registers the `HttpPostIngress` for topic `gitlab` incl. the validator. + + Please find more information at + . + +- Updated dependencies + - @backstage/backend-plugin-api@0.2.0 + - @backstage/plugin-events-node@0.2.0 + - @backstage/config@1.0.5 + +## @backstage/plugin-events-backend-test-utils@0.1.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-events-node@0.2.0 + +## @backstage/plugin-explore@0.3.43 + +### Patch Changes + +- c8f49ed4d0: Update search links to only have header as linkable text + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. + +- ea4a5be8f3: Adds styling to graph forcing it to always fill out the available space. + +- 3280711113: Updated dependency `msw` to `^0.49.0`. + +- 4dec6f16be: Added new `@backstage/plugin-explore-backend` & `@backstage/plugin-explore-common` packages. + + This deprecates the `ExploreToolsConfig` API (in `@backstage/plugin-explore-react`) which is replaced by the `ExploreApi` & `ExploreClient`. The list of `ExploreTool` data can now be provided on the backend by either using the supplied `StaticExploreToolProvider` or by implementing a custom `ExploreToolProvider`. See the [explore-backend README](https://github.com/backstage/backstage/blob/master/plugins/explore-backend/README.md) for full details. + + NOTE: Existing installations that have customized the `ExploreToolConfig` will continue to work through the new `ExploreClient`. However, existing data should be migrated over to new `explore-backend` plugin as `ExploreToolConfig` will be removed in the future. + + BREAKING CHANGE: If you have previously installed the `explore` plugin, but not yet customized the `ExploreToolConfig` API in your `packages/app`, this will result in an empty list of tools. + +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-search-react@1.3.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/plugin-explore-react@0.0.24 + - @backstage/plugin-explore-common@0.0.1 + - @backstage/plugin-search-common@1.2.0 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-explore-backend@0.0.1 + +### Patch Changes + +- 4dec6f16be: Added new `@backstage/plugin-explore-backend` & `@backstage/plugin-explore-common` packages. + + This deprecates the `ExploreToolsConfig` API (in `@backstage/plugin-explore-react`) which is replaced by the `ExploreApi` & `ExploreClient`. The list of `ExploreTool` data can now be provided on the backend by either using the supplied `StaticExploreToolProvider` or by implementing a custom `ExploreToolProvider`. See the [explore-backend README](https://github.com/backstage/backstage/blob/master/plugins/explore-backend/README.md) for full details. + + NOTE: Existing installations that have customized the `ExploreToolConfig` will continue to work through the new `ExploreClient`. However, existing data should be migrated over to new `explore-backend` plugin as `ExploreToolConfig` will be removed in the future. + + BREAKING CHANGE: If you have previously installed the `explore` plugin, but not yet customized the `ExploreToolConfig` API in your `packages/app`, this will result in an empty list of tools. + +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/plugin-explore-common@0.0.1 + - @backstage/plugin-search-common@1.2.0 + - @backstage/config@1.0.5 + +## @backstage/plugin-explore-common@0.0.1 + +### Patch Changes + +- 4dec6f16be: Added new `@backstage/plugin-explore-backend` & `@backstage/plugin-explore-common` packages. + + This deprecates the `ExploreToolsConfig` API (in `@backstage/plugin-explore-react`) which is replaced by the `ExploreApi` & `ExploreClient`. The list of `ExploreTool` data can now be provided on the backend by either using the supplied `StaticExploreToolProvider` or by implementing a custom `ExploreToolProvider`. See the [explore-backend README](https://github.com/backstage/backstage/blob/master/plugins/explore-backend/README.md) for full details. + + NOTE: Existing installations that have customized the `ExploreToolConfig` will continue to work through the new `ExploreClient`. However, existing data should be migrated over to new `explore-backend` plugin as `ExploreToolConfig` will be removed in the future. + + BREAKING CHANGE: If you have previously installed the `explore` plugin, but not yet customized the `ExploreToolConfig` API in your `packages/app`, this will result in an empty list of tools. + +## @backstage/plugin-explore-react@0.0.24 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. + +- 4dec6f16be: Added new `@backstage/plugin-explore-backend` & `@backstage/plugin-explore-common` packages. + + This deprecates the `ExploreToolsConfig` API (in `@backstage/plugin-explore-react`) which is replaced by the `ExploreApi` & `ExploreClient`. The list of `ExploreTool` data can now be provided on the backend by either using the supplied `StaticExploreToolProvider` or by implementing a custom `ExploreToolProvider`. See the [explore-backend README](https://github.com/backstage/backstage/blob/master/plugins/explore-backend/README.md) for full details. + + NOTE: Existing installations that have customized the `ExploreToolConfig` will continue to work through the new `ExploreClient`. However, existing data should be migrated over to new `explore-backend` plugin as `ExploreToolConfig` will be removed in the future. + + BREAKING CHANGE: If you have previously installed the `explore` plugin, but not yet customized the `ExploreToolConfig` API in your `packages/app`, this will result in an empty list of tools. + +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-explore-common@0.0.1 + +## @backstage/plugin-firehydrant@0.1.29 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/theme@0.2.16 + +## @backstage/plugin-fossa@0.2.44 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-gcalendar@0.3.8 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-gcp-projects@0.3.31 + +### Patch Changes + +- d3fea4ae0a: Internal fixes to avoid implicit usage of globals +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 5fb6d5e92e: Updated dependency `@react-hookz/web` to `^19.0.0`. +- 146378c146: Updated dependency `@react-hookz/web` to `^20.0.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/theme@0.2.16 + +## @backstage/plugin-git-release-manager@0.3.25 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/integration@1.4.1 + - @backstage/theme@0.2.16 + +## @backstage/plugin-github-actions@0.5.12 + +### Patch Changes + +- d3fea4ae0a: Internal fixes to avoid implicit usage of globals +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/integration@1.4.1 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-github-deployments@0.1.43 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/integration-react@1.1.7 + - @backstage/integration@1.4.1 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-github-issues@0.2.1 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/integration@1.4.1 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-github-pull-requests-board@0.1.6 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/integration@1.4.1 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-gitops-profiles@0.3.30 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/theme@0.2.16 + +## @backstage/plugin-gocd@0.1.18 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-graphiql@0.2.44 + +### Patch Changes + +- d3fea4ae0a: Internal fixes to avoid implicit usage of globals +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/theme@0.2.16 + +## @backstage/plugin-graphql-backend@0.1.29 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-graphql@0.3.16 + - @backstage/config@1.0.5 + +## @backstage/plugin-home@0.4.28 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- edf2404e9f: Adjusted the description's empty state on the starred entities table, +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/plugin-stack-overflow@0.1.8 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + +## @backstage/plugin-ilert@0.2.1 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-jenkins@0.7.11 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-jenkins-common@0.1.11 + +## @backstage/plugin-jenkins-backend@0.1.29 + +### Patch Changes + +- cfe2b98fbe: Remove unnecessary dependency `promise-any-polyfill`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 9447b0fb46: added support for standalone jenkins projects +- Updated dependencies + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/plugin-jenkins-common@0.1.11 + +## @backstage/plugin-jenkins-common@0.1.11 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-catalog-common@1.0.9 + +## @backstage/plugin-kafka@0.3.12 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + +## @backstage/plugin-kafka-backend@0.2.32 + +### Patch Changes + +- 0b54dbaf7d: Internal tweak to adapt to `kafkajs` 2.2.3 +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-kubernetes@0.7.5 + +### Patch Changes + +- 2db8acffe7: Kubernetes plugin now gracefully surfaces transport-level errors (like DNS or timeout, or other socket errors) occurring while fetching data. This will be merged into any data that is fetched successfully, fixing a bug where the whole page would be empty if any fetch operation encountered such an error. +- 365f887717: Removed rendering for ErrorEmptyState in ErrorReporting component, so nothing is rendered when there are no errors. Also removed Divider on Kubernetes page. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 9ce7866ecd: Updated dependency `@kubernetes/client-node` to `0.18.0`. +- Updated dependencies + - @backstage/plugin-kubernetes-common@0.5.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + +## @backstage/plugin-lighthouse@0.3.12 + +### Patch Changes + +- e3dfef3f63: Fixed "Emulated Form Factor" field in the audit creation form not working with the latest version (1.0.2) of `lighthouse-audit-service`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + +## @backstage/plugin-newrelic@0.3.30 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/theme@0.2.16 + +## @backstage/plugin-newrelic-dashboard@0.2.5 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + +## @backstage/plugin-org@0.6.2 + +### Patch Changes + +- 4395eac4d8: Made all the ownership boxes the same size +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 67cedfe42e: Update `UserProfileCard` and `GroupProfileCard` to not render links unless the `showLinks` prop is set. The primary component for rendering links are the `EntityLinksCard` from plugin-catalog. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-org-react@0.1.1 + +### Patch Changes + +- 4cb5066828: Bug fixes and adding the possibility to add a default value for the `GroupListPicker`. Fixes: Vertical size jump on text entry, left align for text, selecting a value closes the popup, auto focus on the popup when opening +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/catalog-client@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-pagerduty@0.5.5 + +### Patch Changes + +- cb716004ef: Internal refactor to improve tests +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-periskop@0.1.10 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-periskop-backend@0.1.10 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + +## @backstage/plugin-permission-backend@0.5.14 + +### Patch Changes + +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-node@0.7.2 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/config@1.0.5 + +## @backstage/plugin-permission-common@0.7.2 + +### Patch Changes + +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + +## @backstage/plugin-permission-node@0.7.2 + +### Patch Changes + +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/config@1.0.5 + +## @backstage/plugin-permission-react@0.4.8 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/config@1.0.5 + +## @backstage/plugin-playlist@0.1.3 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-search-react@1.3.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/plugin-permission-react@0.4.8 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-catalog-common@1.0.9 + - @backstage/plugin-playlist-common@0.1.3 + +## @backstage/plugin-playlist-backend@0.2.2 + +### Patch Changes + +- c507aee8a2: Ensured typescript type checks in migration files. +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-node@0.7.2 + - @backstage/backend-test-utils@0.1.31 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/plugin-playlist-common@0.1.3 + +## @backstage/plugin-playlist-common@0.1.3 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.7.2 + +## @backstage/plugin-proxy-backend@0.2.33 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 03843259b4: Documented the `createRouter` method. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + +## @backstage/plugin-rollbar@0.4.12 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-rollbar-backend@0.1.36 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + +## @backstage/plugin-scaffolder-backend-module-cookiecutter@0.2.14 + +### Patch Changes + +- 935b66a646: Change step output template examples to use square bracket syntax. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.9.0 + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + +## @backstage/plugin-scaffolder-backend-module-rails@0.4.7 + +### Patch Changes + +- 935b66a646: Change step output template examples to use square bracket syntax. +- 27b23a86ad: Added more (optional) arguments to the `createFetchRailsAction` to be passed to `rails new` +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.9.0 + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + +## @backstage/plugin-scaffolder-backend-module-yeoman@0.2.12 + +### Patch Changes + +- 935b66a646: Change step output template examples to use square bracket syntax. +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.9.0 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + +## @backstage/plugin-scaffolder-common@1.2.3 + +### Patch Changes + +- Updated dependencies + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + +## @backstage/plugin-search@1.0.5 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-search-react@1.3.0 + - @backstage/core-components@0.12.1 + - @backstage/version-bridge@1.0.3 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/types@1.0.2 + - @backstage/plugin-search-common@1.2.0 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + +## @backstage/plugin-sentry@0.4.5 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-shortcuts@0.3.4 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/types@1.0.2 + - @backstage/theme@0.2.16 + +## @backstage/plugin-sonarqube-backend@0.1.4 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 3dee2f5ad0: Added links to the frontend and backend plugins in the readme. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-splunk-on-call@0.4.1 + +### Patch Changes + +- cb716004ef: Internal refactor to improve tests +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-stack-overflow@0.1.8 + +### Patch Changes + +- a19cffbeed: Update search links to only have header as linkable text +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- c981e83612: The `` component is now able to highlight the result title and/or text when provided. To take advantage of this, pass in the `highlight` prop, similar to how it is done on other result list item components. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-search-react@1.3.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-home@0.4.28 + - @backstage/plugin-search-common@1.2.0 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + +## @backstage/plugin-stack-overflow-backend@0.1.8 + +### Patch Changes + +- fd0ca6f447: Added option to supply API Access Token. This is required in addition to an API key when trying to access the data for a private Stack Overflow Team. +- Updated dependencies + - @backstage/cli@0.22.0 + - @backstage/plugin-search-common@1.2.0 + - @backstage/config@1.0.5 + +## @backstage/plugin-tech-insights@0.3.4 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-tech-insights-common@0.2.9 + +## @backstage/plugin-tech-insights-backend@0.5.5 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/plugin-tech-insights-common@0.2.9 + - @backstage/plugin-tech-insights-node@0.3.7 + +## @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.23 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/config@1.0.5 + - @backstage/plugin-tech-insights-common@0.2.9 + - @backstage/plugin-tech-insights-node@0.3.7 + +## @backstage/plugin-tech-insights-common@0.2.9 + +### Patch Changes + +- Updated dependencies + - @backstage/types@1.0.2 + +## @backstage/plugin-tech-insights-node@0.3.7 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + - @backstage/plugin-tech-insights-common@0.2.9 + +## @backstage/plugin-tech-radar@0.5.19 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/theme@0.2.16 + +## @backstage/plugin-techdocs@1.4.1 + +### Patch Changes + +- d3fea4ae0a: Internal fixes to avoid implicit usage of globals +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- a19cffbeed: Update search links to only have header as linkable text +- 5d3058355d: Add `react/forbid-elements` linter rule for button, suggest MUI `Button` +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 786f1b1419: Support older versions of react-router +- Updated dependencies + - @backstage/plugin-techdocs-react@1.1.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-search-react@1.3.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/integration-react@1.1.7 + - @backstage/integration@1.4.1 + - @backstage/plugin-search-common@1.2.0 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + +## @backstage/plugin-techdocs-addons-test-utils@1.0.7 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/plugin-techdocs-react@1.1.0 + - @backstage/plugin-catalog@1.7.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-search-react@1.3.0 + - @backstage/core-components@0.12.1 + - @backstage/core-app-api@1.3.0 + - @backstage/plugin-techdocs@1.4.1 + - @backstage/test-utils@1.2.3 + - @backstage/integration-react@1.1.7 + - @backstage/theme@0.2.16 + +## @backstage/plugin-techdocs-module-addons-contrib@1.0.7 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 5fb6d5e92e: Updated dependency `@react-hookz/web` to `^19.0.0`. +- 146378c146: Updated dependency `@react-hookz/web` to `^20.0.0`. +- 8536e7c281: Use `app.title` from `app-config.yaml` when creating new Documentation Feedback issue. `Backstage` is the default value. +- Updated dependencies + - @backstage/plugin-techdocs-react@1.1.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/integration-react@1.1.7 + - @backstage/integration@1.4.1 + - @backstage/theme@0.2.16 + +## @backstage/plugin-techdocs-node@1.4.3 + +### Patch Changes + +- 0a61aab172: Bump dependency @azure/identity to next minor + +- e40790d0c2: Add support for specifying an S3 bucket's account ID and retrieving the credentials from the `aws` app config section. This is now the preferred way to configure AWS credentials for Techdocs. + +- 37931c33ce: Upgrade to AWS SDK for Javascript v3 + + Techdocs support for AWS S3 now requires defining the AWS region to connect to. + If `techdocs.publisher.awsS3.region` is missing from the config, the AWS environment variable `AWS_REGION` will be used. + +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/integration-aws-node@0.1.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/plugin-search-common@1.2.0 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-todo@0.2.14 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-todo-backend@0.1.36 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-user-settings-backend@0.1.3 + +### Patch Changes + +- c507aee8a2: Ensured typescript type checks in migration files. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + +## @backstage/plugin-vault@0.1.6 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + +## @backstage/plugin-vault-backend@0.2.5 + +### Patch Changes + +- 568ae02463: Added (optional) config `vault.publicUrl` as alternative to `vault.baseUrl` for `editUrl` and `showUrl` in case `vault.baseUrl` is internal +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 7a3d2688ed: Use `express-promise-router` to catch errors properly. + Add `403` error as a known one. It will now return a `NotAllowed` error. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/backend-test-utils@0.1.31 + - @backstage/errors@1.1.4 + - @backstage/config@1.0.5 + +## @backstage/plugin-xcmetrics@0.2.32 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## example-app@0.2.78 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-graph@0.2.24 + - @backstage/plugin-pagerduty@0.5.5 + - @backstage/plugin-techdocs-react@1.1.0 + - @backstage/plugin-scaffolder@1.9.0 + - @backstage/plugin-cost-insights@0.12.1 + - @backstage/plugin-kubernetes@0.7.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-search-react@1.3.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-explore@0.3.43 + - @backstage/cli@0.22.0 + - @backstage/core-app-api@1.3.0 + - @backstage/plugin-cloudbuild@0.3.12 + - @backstage/plugin-gcp-projects@0.3.31 + - @backstage/plugin-github-actions@0.5.12 + - @backstage/plugin-graphiql@0.2.44 + - @backstage/plugin-techdocs@1.4.1 + - @backstage/plugin-org@0.6.2 + - @backstage/plugin-user-settings@0.6.0 + - @backstage/app-defaults@1.0.9 + - @backstage/plugin-airbrake@0.3.12 + - @backstage/plugin-api-docs@0.8.12 + - @backstage/plugin-azure-devops@0.2.3 + - @backstage/plugin-badges@0.2.36 + - @backstage/plugin-catalog-import@0.9.2 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/plugin-circleci@0.3.12 + - @backstage/plugin-code-coverage@0.2.5 + - @backstage/plugin-home@0.4.28 + - @backstage/plugin-jenkins@0.7.11 + - @backstage/plugin-kafka@0.3.12 + - @backstage/plugin-permission-react@0.4.8 + - @backstage/plugin-playlist@0.1.3 + - @backstage/plugin-rollbar@0.4.12 + - @backstage/plugin-search@1.0.5 + - @backstage/plugin-sentry@0.4.5 + - @backstage/plugin-shortcuts@0.3.4 + - @backstage/plugin-todo@0.2.14 + - @backstage/plugin-lighthouse@0.3.12 + - @backstage/plugin-stack-overflow@0.1.8 + - @backstage/integration-react@1.1.7 + - @backstage/plugin-apache-airflow@0.2.5 + - @backstage/plugin-azure-sites@0.1.1 + - @backstage/plugin-dynatrace@1.0.2 + - @backstage/plugin-gcalendar@0.3.8 + - @backstage/plugin-gocd@0.1.18 + - @backstage/plugin-newrelic@0.3.30 + - @backstage/plugin-tech-insights@0.3.4 + - @backstage/plugin-tech-radar@0.5.19 + - @backstage/plugin-techdocs-module-addons-contrib@1.0.7 + - @backstage/plugin-search-common@1.2.0 + - @internal/plugin-catalog-customized@0.0.5 + - @backstage/plugin-newrelic-dashboard@0.2.5 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + - @backstage/plugin-catalog-common@1.0.9 + +## example-backend@0.2.78 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.9.0 + - @backstage/plugin-azure-devops-backend@0.3.18 + - @backstage/plugin-kubernetes-backend@0.9.0 + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/catalog-client@1.2.0 + - @backstage/plugin-scaffolder-backend-module-rails@0.4.7 + - @backstage/plugin-search-backend@1.2.0 + - @backstage/plugin-search-backend-module-elasticsearch@1.1.0 + - @backstage/plugin-search-backend-node@1.1.0 + - @backstage/plugin-playlist-backend@0.2.2 + - @backstage/plugin-search-backend-module-pg@0.5.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-app-backend@0.3.39 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/plugin-events-backend@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/plugin-permission-backend@0.5.14 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-node@0.7.2 + - @backstage/plugin-kafka-backend@0.2.32 + - @backstage/plugin-jenkins-backend@0.1.29 + - @backstage/plugin-events-node@0.2.0 + - @backstage/integration@1.4.1 + - @backstage/plugin-auth-backend@0.17.2 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/plugin-azure-sites-backend@0.1.1 + - @backstage/plugin-code-coverage-backend@0.2.5 + - @backstage/plugin-graphql-backend@0.1.29 + - @backstage/plugin-proxy-backend@0.2.33 + - @backstage/plugin-rollbar-backend@0.1.36 + - @backstage/plugin-techdocs-backend@1.5.0 + - @backstage/plugin-todo-backend@0.1.36 + - @backstage/plugin-explore-backend@0.0.1 + - @backstage/plugin-search-common@1.2.0 + - example-app@0.2.78 + - @backstage/plugin-badges-backend@0.1.33 + - @backstage/plugin-tech-insights-backend@0.5.5 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.23 + - @backstage/plugin-tech-insights-node@0.3.7 + +## example-backend-next@0.0.6 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.9.0 + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/plugin-app-backend@0.3.39 + - @backstage/backend-defaults@0.1.4 + +## techdocs-cli-embedded-app@0.2.77 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-techdocs-react@1.1.0 + - @backstage/plugin-catalog@1.7.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/cli@0.22.0 + - @backstage/core-app-api@1.3.0 + - @backstage/plugin-techdocs@1.4.1 + - @backstage/test-utils@1.2.3 + - @backstage/app-defaults@1.0.9 + - @backstage/integration-react@1.1.7 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + +## @internal/plugin-catalog-customized@0.0.5 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog@1.7.0 + - @backstage/plugin-catalog-react@1.2.2 + +## @internal/plugin-todo-list@1.0.8 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/theme@0.2.16 + +## @internal/plugin-todo-list-backend@1.0.8 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/config@1.0.5 + +## @internal/plugin-todo-list-common@1.0.7 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.7.2 diff --git a/docs/releases/v1.9.0.md b/docs/releases/v1.9.0.md new file mode 100644 index 0000000000..53a1769108 --- /dev/null +++ b/docs/releases/v1.9.0.md @@ -0,0 +1,85 @@ +--- +id: v1.9.0 +title: v1.9.0 +description: Backstage Release v1.9.0 +--- + +These are the release notes for the v1.9.0 release of [Backstage](https://backstage.io/). + +A huge thanks to the whole team of maintainers and contributors as well as the amazing Backstage Community for the hard work in getting this release developed and done. + +## Highlights + +### Catalog Batch Fetching + +The catalog client has a new `getEntitiesByRefs` method, and the catalog backend has a corresponding new [`/entities/by-refs` endpoint](https://backstage.io/docs/features/software-catalog/software-catalog-api). These allow for the efficient batch fetching of entities by their refs, which may be useful e.g. in GraphQL resolvers or similar contexts where you need to fetch large numbers of entities at the same time. + +### New plugin: AWS Credentials Provider + +The management of AWS credentials in the backend saw some significant improvement, through the introduction of the `@backstage/integration-aws-node` package and its corresponding `AwsCredentialsManager` interface. This is leveraged e.g. in the [TechDocs S3 publisher](https://backstage.io/docs/features/techdocs/using-cloud-storage). + +Contributed by [@clareliguori](https://github.com/clareliguori) in [#14125](https://github.com/backstage/backstage/pull/14125) + +### Events + +There was further work to advance the [`events` backend](https://github.com/backstage/backstage/tree/master/plugins/events-backend) functionality, which propagates and processes events such as webhooks. It has modules for [AWS SQS](https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-aws-sqs), [Azure](https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-azure), [Bitbucket Cloud](https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-bitbucket-cloud), [Gerrit](https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-gerrit), [GitHub](https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-github), and [Gitlab](https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-gitlab), along with other improvements. + +Contributed by [@pjungermann](https://github.com/pjungermann) and others in the community. + +### New Plugin: Incremental Ingestion + +Introduces incremental entity providers, which are used for streaming very large data sources into the catalog. + +Contributed by [@dekoding](https://github.com/dekoding) [#14356](https://github.com/backstage/backstage/pull/14356) + +### Scaffolder Custom Field Explorer + +The new custom field explorer lets you view and play around with available installed custom field extensions. + +Contributed by [@kuangp](https://github.com/kuangp) in [#14008](https://github.com/backstage/backstage/pull/14008) + +### Scaffolder concurrent task execution + +Individual Scaffolder task workers can now run multiple (defaults to 10) tasks concurrently using the `concurrentTasksLimit` option, leading to more efficient resource usage. + +Contributed by [@howlowck](https://github.com/howlowck) in [#13817](https://github.com/backstage/backstage/pull/13817) + +### Deprecating Catalog Prometheus metrics for OpenTelemetry + +We have started working on phasing out the Prometheus Metrics exposed using the `prom-client` in favor of replacement metrics using [OpenTelemetery](https://opentelemetry.io/). The `prom-client` metrics have always been a band-aid and never fully established but we want to notify existing users of their future removal. Backstage does not provide any default exporter or instructions on how to export the new metrics yet but you should expect documentation shortly. We hope to fully incorporate OpenTelemetry into other plugins once we gain confidence and establish patterns. Added in [#15145](https://github.com/backstage/backstage/pull/15145). + +### Updated API for `createApp` + +The `getProvider` and `getRouter` methods of the main app instance from `@backstage/core-app-api` have been deprecated. Instead, there is now an `AppRouter` component that is a drop-in replacement for the router, and a new `createRoot` method for creating the root app component. This change will simplify the internal logic of the app, and also makes it more clear that the app is created from a React element tree. + +### Advancements on the New Backend System + +Work has progressed with the new system and we have been able to add a couple of new features, most notable are shutdown lifecycle events and stop functionality to the Backend. + +All core service references are now exported via a single `coreServices` object. For example, the `loggerServiceRef` is now accessed via `coreServices.logger` instead, [#14986](https://github.com/backstage/backstage/pull/14986). +All service interfaces are now suffixed with `*Service`. Root scoped services are now always initialized, whether they are depended directly on by others or not; this allows features such as the metrics exporter to work correctly. + +### New package: `@backstage/repo-tools` + +This new package is part of an ongoing effort to make more of the repository tooling in the main Backstage repository available to the rest of the community. The main piece that has been added so far is the tooling needed to use API reports. + +## Security Fixes + +This release does not contain any security fixes. + +## Upgrade path + +We recommend that you keep your Backstage project up to date with this latest release. For more guidance on how to upgrade, check out the documentation for [keeping Backstage updated](https://backstage.io/docs/getting-started/keeping-backstage-updated). + +## Links and References + +Below you can find a list of links and references to help you learn about and start using this new release. + +- [Backstage official website](https://backstage.io/), [documentation](https://backstage.io/docs/), and [getting started guide](https://backstage.io/docs/getting-started/) +- [GitHub repository](https://github.com/backstage/backstage) +- Backstage's [versioning and support policy](https://backstage.io/docs/overview/versioning-policy) +- [Community Discord](https://discord.gg/bFESRKVt) for discussions and support +- [Changelog](https://github.com/backstage/backstage/tree/master/docs/releases/v1.9.0-changelog.md) +- Backstage [Demos](https://backstage.io/demos), [Blog](https://backstage.io/blog), [Roadmap](https://backstage.io/docs/overview/roadmap) and [Plugins](https://backstage.io/plugins) + +Sign up for our [newsletter](https://mailchi.mp/spotify/backstage-community) if you want to be informed about what is happening in the world of Backstage. diff --git a/docs/tutorials/journey.md b/docs/tutorials/journey.md index 126bb5ae0d..af78cbe597 100644 --- a/docs/tutorials/journey.md +++ b/docs/tutorials/journey.md @@ -28,7 +28,7 @@ organization to easily install and add to their Backstage installation. # 1. A New Plugin Sam chooses to develop this plugin in a standalone project and creates a new -plugin using `npx @backstage/cli create-plugin`, which detects that it's not +plugin using `npx @backstage/cli new --select plugin`, which detects that it's not being run in an existing project and therefore creates a separate plugin repo. Spinning up the frontend with `yarn start`, Sam goes to work with getting the diff --git a/docs/tutorials/quickstart-app-plugin.md b/docs/tutorials/quickstart-app-plugin.md index ea0a511c93..a1b30829b3 100644 --- a/docs/tutorials/quickstart-app-plugin.md +++ b/docs/tutorials/quickstart-app-plugin.md @@ -29,8 +29,8 @@ title: Adding Custom Plugin to Existing Monorepo App # The Skeleton Plugin -1. Start by using the built in creator. From the terminal and root of your - project run: `yarn create-plugin` +1. Start by using the built-in creator. From the terminal and root of your + project run: `yarn new --select plugin` 1. Enter a plugin ID. I used `github-playground` 1. When the process finishes, let's start the backend: `yarn --cwd packages/backend start` diff --git a/microsite-next/package.json b/microsite-next/package.json index 1b33d2896f..478fce0196 100644 --- a/microsite-next/package.json +++ b/microsite-next/package.json @@ -4,9 +4,8 @@ "license": "Apache-2.0", "private": true, "scripts": { - "examples": "docusaurus-examples", - "start": "docusaurus start", - "build": "docusaurus build", + "start": "node scripts/pre-build.js && docusaurus start", + "build": "node scripts/pre-build.js && docusaurus build", "prettier:check": "prettier --check .", "publish-gh-pages": "docusaurus-publish", "write-translations": "docusaurus-write-translations", @@ -20,7 +19,8 @@ "devDependencies": { "@spotify/prettier-config": "^14.0.0", "js-yaml": "^4.1.0", - "prettier": "^2.6.2" + "prettier": "^2.6.2", + "replace": "^1.2.2" }, "prettier": "@spotify/prettier-config", "dependencies": { diff --git a/microsite-next/scripts/pre-build.js b/microsite-next/scripts/pre-build.js new file mode 100644 index 0000000000..8b4fb4f71e --- /dev/null +++ b/microsite-next/scripts/pre-build.js @@ -0,0 +1,49 @@ +/* + * Copyright 2022 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. + */ + +const replace = require('replace'); +const { existsSync, writeFileSync, mkdirSync } = require('fs'); +const path = require('path'); + +const PLACEHOLDER = `--- +id: "index" +title: "Package Index" +description: "Index of all Backstage Packages" +--- +Run \`yarn build:api-docs\` to generate the API docs. +`; + +async function main() { + const referencesDir = '../docs/reference'; + if (existsSync(referencesDir)) { + console.log('Removing HTML comments from docs/reference folder'); + replace({ + regex: '', + replacement: '', + paths: [referencesDir], + recursive: true, + silent: false, + }); + } else { + mkdirSync(referencesDir); + writeFileSync(path.join(referencesDir, 'index.md'), PLACEHOLDER); + } +} + +main().catch(error => { + console.error(error.stack); + process.exit(1); +}); diff --git a/microsite-next/sidebars.json b/microsite-next/sidebars.json index 0967ef424b..67c4209976 100644 --- a/microsite-next/sidebars.json +++ b/microsite-next/sidebars.json @@ -1 +1,366 @@ -{} +{ + "releases": { + "Release Notes": [ + "releases/v1.8.0", + "releases/v1.7.0", + "releases/v1.6.0", + "releases/v1.5.0", + "releases/v1.4.0", + "releases/v1.3.0", + "releases/v1.2.0", + "releases/v1.1.0", + "releases/v1.0.0" + ] + }, + "docs": { + "Overview": [ + "overview/what-is-backstage", + "overview/architecture-overview", + "overview/roadmap", + "overview/vision", + "overview/background", + "overview/adopting", + "overview/versioning-policy", + "overview/threat-model", + "overview/support", + "overview/glossary", + "overview/logos" + ], + "Getting Started": [ + "getting-started/index", + "getting-started/configuration", + "getting-started/create-an-app", + "getting-started/running-backstage-locally", + { + "type": "category", + "label": "App configuration", + "items": [ + "getting-started/configure-app-with-plugins", + "getting-started/app-custom-theme", + "getting-started/homepage" + ] + }, + "getting-started/keeping-backstage-updated", + "getting-started/concepts", + "getting-started/contributors", + "getting-started/project-structure" + ], + "Local Development": [ + { + "type": "category", + "label": "CLI", + "items": [ + "local-dev/cli-overview", + "local-dev/cli-build-system", + "local-dev/cli-commands" + ] + }, + "local-dev/linking-local-packages" + ], + "Core Features": [ + { + "type": "category", + "label": "Software Catalog", + "items": [ + "features/software-catalog/software-catalog-overview", + "features/software-catalog/life-of-an-entity", + "features/software-catalog/configuration", + "features/software-catalog/system-model", + "features/software-catalog/descriptor-format", + "features/software-catalog/references", + "features/software-catalog/well-known-annotations", + "features/software-catalog/well-known-relations", + "features/software-catalog/well-known-statuses", + "features/software-catalog/extending-the-model", + "features/software-catalog/external-integrations", + "features/software-catalog/catalog-customization", + "features/software-catalog/software-catalog-api" + ] + }, + { + "type": "category", + "label": "Kubernetes", + "items": [ + "features/kubernetes/overview", + "features/kubernetes/installation", + "features/kubernetes/configuration", + "features/kubernetes/authentication", + "features/kubernetes/troubleshooting" + ] + }, + { + "type": "category", + "label": "Software Templates", + "items": [ + "features/software-templates/software-templates-index", + "features/software-templates/configuration", + "features/software-templates/adding-templates", + "features/software-templates/writing-templates", + "features/software-templates/input-examples", + "features/software-templates/builtin-actions", + "features/software-templates/writing-custom-actions", + "features/software-templates/writing-custom-field-extensions", + "features/software-templates/writing-custom-step-layouts", + "features/software-templates/migrating-from-v1beta2-to-v1beta3" + ] + }, + { + "type": "category", + "label": "Backstage Search", + "items": [ + "features/search/search-overview", + "features/search/getting-started", + "features/search/concepts", + "features/search/architecture", + "features/search/search-engines", + "features/search/how-to-guides" + ] + }, + { + "type": "category", + "label": "TechDocs", + "items": [ + "features/techdocs/techdocs-overview", + "features/techdocs/getting-started", + "features/techdocs/concepts", + "features/techdocs/addons", + "features/techdocs/architecture", + "features/techdocs/creating-and-publishing", + "features/techdocs/configuration", + "features/techdocs/using-cloud-storage", + "features/techdocs/configuring-ci-cd", + "features/techdocs/cli", + "features/techdocs/how-to-guides", + "features/techdocs/troubleshooting", + "features/techdocs/faqs" + ] + } + ], + "Integrations": [ + "integrations/index", + { + "type": "category", + "label": "AWS S3", + "items": [ + "integrations/aws-s3/locations", + "integrations/aws-s3/discovery" + ] + }, + { + "type": "category", + "label": "Azure", + "items": [ + "integrations/azure/locations", + "integrations/azure/discovery", + "integrations/azure/org" + ] + }, + { + "type": "category", + "label": "Bitbucket Cloud", + "items": [ + "integrations/bitbucketCloud/locations", + "integrations/bitbucketCloud/discovery" + ] + }, + { + "type": "category", + "label": "Bitbucket Server", + "items": [ + "integrations/bitbucketServer/locations", + "integrations/bitbucketServer/discovery" + ] + }, + { + "type": "category", + "label": "Datadog", + "items": ["integrations/datadog-rum/installation"] + }, + { + "type": "category", + "label": "Gerrit", + "items": [ + "integrations/gerrit/locations", + "integrations/gerrit/discovery" + ] + }, + { + "type": "category", + "label": "GitHub", + "items": [ + "integrations/github/locations", + "integrations/github/discovery", + "integrations/github/org", + "integrations/github/github-apps" + ] + }, + { + "type": "category", + "label": "GitLab", + "items": [ + "integrations/gitlab/locations", + "integrations/gitlab/discovery" + ] + }, + { + "type": "category", + "label": "Gitea", + "items": ["integrations/gitea/locations"] + }, + { + "type": "category", + "label": "Google GCS", + "items": ["integrations/google-cloud-storage/locations"] + }, + { + "type": "category", + "label": "LDAP", + "items": ["integrations/ldap/org"] + } + ], + "Plugins": [ + "plugins/index", + "plugins/existing-plugins", + "plugins/create-a-plugin", + "plugins/plugin-development", + "plugins/structure-of-a-plugin", + "plugins/integrating-plugin-into-software-catalog", + "plugins/integrating-search-into-plugins", + "plugins/composability", + "plugins/customization", + "plugins/analytics", + "plugins/feature-flags", + { + "type": "category", + "label": "Backends and APIs", + "items": [ + "plugins/proxying", + "plugins/backend-plugin", + "plugins/call-existing-api", + "plugins/url-reader", + "plugins/new-backend-system" + ] + }, + { + "type": "category", + "label": "Testing", + "items": ["plugins/testing"] + }, + { + "type": "category", + "label": "Publishing", + "items": [ + "plugins/publish-private", + "plugins/add-to-marketplace", + "plugins/observability" + ] + } + ], + "Configuration": [ + "conf/index", + "conf/reading", + "conf/writing", + "conf/defining" + ], + "Auth and identity": [ + "auth/index", + { + "type": "category", + "label": "Included providers", + "items": [ + "auth/auth0/provider", + "auth/atlassian/provider", + "auth/bitbucket/provider", + "auth/microsoft/provider", + "auth/github/provider", + "auth/gitlab/provider", + "auth/google/provider", + "auth/google/gcp-iap-auth", + "auth/okta/provider", + "auth/onelogin/provider", + "auth/oauth2-proxy/provider" + ] + }, + "auth/identity-resolver", + "auth/oauth", + "auth/oidc", + "auth/add-auth-provider", + "auth/service-to-service-auth", + "auth/troubleshooting", + "auth/glossary" + ], + "Permissions": [ + "permissions/overview", + "permissions/concepts", + "permissions/getting-started", + "permissions/writing-a-policy", + "permissions/frontend-integration", + "permissions/custom-rules", + { + "type": "category", + "label": "Tutorial: using Permissions in your plugin", + "items": [ + "permissions/plugin-authors/01-setup", + "permissions/plugin-authors/02-adding-a-basic-permission-check", + "permissions/plugin-authors/03-adding-a-resource-permission-check", + "permissions/plugin-authors/04-authorizing-access-to-paginated-data", + "permissions/plugin-authors/05-frontend-authorization" + ] + } + ], + "Deployment": [ + "deployment/index", + "deployment/scaling", + "deployment/docker", + "deployment/k8s", + "deployment/heroku" + ], + "Designing for Backstage": [ + "dls/design", + "dls/component-design-guidelines", + "dls/contributing-to-storybook", + "dls/figma" + ], + "API Reference": [ + { + "type": "category", + "label": "Guides", + "items": ["api/utility-apis"] + }, + { + "type": "category", + "label": "API Reference", + "items": ["reference/index"] + }, + "api/deprecations" + ], + "Tutorials": [ + "tutorials/journey", + "tutorials/quickstart-app-plugin", + "tutorials/react-router-stable-migration", + "tutorials/package-role-migration", + "tutorials/migrating-away-from-core", + "tutorials/configuring-plugin-databases", + "tutorials/switching-sqlite-postgres", + "tutorials/using-backstage-proxy-within-plugin", + "tutorials/yarn-migration" + ], + "Architecture Decision Records (ADRs)": [ + "architecture-decisions/adrs-overview", + "architecture-decisions/adrs-adr001", + "architecture-decisions/adrs-adr002", + "architecture-decisions/adrs-adr003", + "architecture-decisions/adrs-adr004", + "architecture-decisions/adrs-adr005", + "architecture-decisions/adrs-adr006", + "architecture-decisions/adrs-adr007", + "architecture-decisions/adrs-adr008", + "architecture-decisions/adrs-adr009", + "architecture-decisions/adrs-adr010", + "architecture-decisions/adrs-adr011", + "architecture-decisions/adrs-adr012", + "architecture-decisions/adrs-adr013" + ], + "FAQ": ["FAQ"] + } +} diff --git a/microsite-next/yarn.lock b/microsite-next/yarn.lock index fa35b93945..3a632b3079 100644 --- a/microsite-next/yarn.lock +++ b/microsite-next/yarn.lock @@ -3573,6 +3573,7 @@ __metadata: prettier: ^2.6.2 react: ^17.0.2 react-dom: ^17.0.2 + replace: ^1.2.2 languageName: unknown linkType: soft @@ -3827,6 +3828,13 @@ __metadata: languageName: node linkType: hard +"camelcase@npm:^5.0.0": + version: 5.3.1 + resolution: "camelcase@npm:5.3.1" + checksum: e6effce26b9404e3c0f301498184f243811c30dfe6d0b9051863bd8e4034d09c8c2923794f280d6827e5aa055f6c434115ff97864a16a963366fb35fd673024b + languageName: node + linkType: hard + "camelcase@npm:^6.2.0": version: 6.3.0 resolution: "camelcase@npm:6.3.0" @@ -3860,7 +3868,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^2.0.0": +"chalk@npm:2.4.2, chalk@npm:^2.0.0": version: 2.4.2 resolution: "chalk@npm:2.4.2" dependencies: @@ -4021,6 +4029,17 @@ __metadata: languageName: node linkType: hard +"cliui@npm:^6.0.0": + version: 6.0.0 + resolution: "cliui@npm:6.0.0" + dependencies: + string-width: ^4.2.0 + strip-ansi: ^6.0.0 + wrap-ansi: ^6.2.0 + checksum: 4fcfd26d292c9f00238117f39fc797608292ae36bac2168cfee4c85923817d0607fe21b3329a8621e01aedf512c99b7eaa60e363a671ffd378df6649fb48ae42 + languageName: node + linkType: hard + "clone-deep@npm:^4.0.1": version: 4.0.1 resolution: "clone-deep@npm:4.0.1" @@ -4597,6 +4616,13 @@ __metadata: languageName: node linkType: hard +"decamelize@npm:^1.2.0": + version: 1.2.0 + resolution: "decamelize@npm:1.2.0" + checksum: ad8c51a7e7e0720c70ec2eeb1163b66da03e7616d7b98c9ef43cce2416395e84c1e9548dd94f5f6ffecfee9f8b94251fc57121a8b021f2ff2469b2bae247b8aa + languageName: node + linkType: hard + "decompress-response@npm:^3.3.0": version: 3.3.0 resolution: "decompress-response@npm:3.3.0" @@ -5355,7 +5381,7 @@ __metadata: languageName: node linkType: hard -"find-up@npm:^4.0.0": +"find-up@npm:^4.0.0, find-up@npm:^4.1.0": version: 4.1.0 resolution: "find-up@npm:4.1.0" dependencies: @@ -5544,6 +5570,13 @@ __metadata: languageName: node linkType: hard +"get-caller-file@npm:^2.0.1": + version: 2.0.5 + resolution: "get-caller-file@npm:2.0.5" + checksum: b9769a836d2a98c3ee734a88ba712e62703f1df31b94b784762c433c27a386dd6029ff55c2a920c392e33657d80191edbf18c61487e198844844516f843496b9 + languageName: node + linkType: hard + "get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1": version: 1.1.3 resolution: "get-intrinsic@npm:1.1.3" @@ -6716,11 +6749,11 @@ __metadata: linkType: hard "json5@npm:^2.1.2, json5@npm:^2.2.1": - version: 2.2.1 - resolution: "json5@npm:2.2.1" + version: 2.2.3 + resolution: "json5@npm:2.2.3" bin: json5: lib/cli.js - checksum: 74b8a23b102a6f2bf2d224797ae553a75488b5adbaee9c9b6e5ab8b510a2fc6e38f876d4c77dea672d4014a44b2399e15f2051ac2b37b87f74c0c7602003543b + checksum: 2a7436a93393830bce797d4626275152e37e877b265e94ca69c99e3d20c2b9dab021279146a39cdb700e71b2dd32a4cebd1514cd57cee102b1af906ce5040349 languageName: node linkType: hard @@ -7164,6 +7197,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:3.0.5": + version: 3.0.5 + resolution: "minimatch@npm:3.0.5" + dependencies: + brace-expansion: ^1.1.7 + checksum: a3b84b426eafca947741b864502cee02860c4e7b145de11ad98775cfcf3066fef422583bc0ffce0952ddf4750c1ccf4220b1556430d4ce10139f66247d87d69e + languageName: node + linkType: hard + "minimatch@npm:3.1.2, minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -8982,6 +9024,27 @@ __metadata: languageName: node linkType: hard +"replace@npm:^1.2.2": + version: 1.2.2 + resolution: "replace@npm:1.2.2" + dependencies: + chalk: 2.4.2 + minimatch: 3.0.5 + yargs: ^15.3.1 + bin: + replace: bin/replace.js + search: bin/search.js + checksum: 1d69f43937a5fdf9dea278e78d6f3b51c1889ba5135bd201918bbda6330684adf8276e8e90e1c021034420dd4df239e51c23ca40752cb9bc6180c153d6d46a37 + languageName: node + linkType: hard + +"require-directory@npm:^2.1.1": + version: 2.1.1 + resolution: "require-directory@npm:2.1.1" + checksum: fb47e70bf0001fdeabdc0429d431863e9475e7e43ea5f94ad86503d918423c1543361cc5166d713eaa7029dd7a3d34775af04764bebff99ef413111a5af18c80 + languageName: node + linkType: hard + "require-from-string@npm:^2.0.2": version: 2.0.2 resolution: "require-from-string@npm:2.0.2" @@ -8996,6 +9059,13 @@ __metadata: languageName: node linkType: hard +"require-main-filename@npm:^2.0.0": + version: 2.0.0 + resolution: "require-main-filename@npm:2.0.0" + checksum: e9e294695fea08b076457e9ddff854e81bffbe248ed34c1eec348b7abbd22a0d02e8d75506559e2265e96978f3c4720bd77a6dad84755de8162b357eb6c778c7 + languageName: node + linkType: hard + "requires-port@npm:^1.0.0": version: 1.0.0 resolution: "requires-port@npm:1.0.0" @@ -10623,6 +10693,13 @@ __metadata: languageName: node linkType: hard +"which-module@npm:^2.0.0": + version: 2.0.0 + resolution: "which-module@npm:2.0.0" + checksum: 809f7fd3dfcb2cdbe0180b60d68100c88785084f8f9492b0998c051d7a8efe56784492609d3f09ac161635b78ea29219eb1418a98c15ce87d085bce905705c9c + languageName: node + linkType: hard + "which@npm:^1.3.1": version: 1.3.1 resolution: "which@npm:1.3.1" @@ -10679,6 +10756,17 @@ __metadata: languageName: node linkType: hard +"wrap-ansi@npm:^6.2.0": + version: 6.2.0 + resolution: "wrap-ansi@npm:6.2.0" + dependencies: + ansi-styles: ^4.0.0 + string-width: ^4.1.0 + strip-ansi: ^6.0.0 + checksum: 6cd96a410161ff617b63581a08376f0cb9162375adeb7956e10c8cd397821f7eb2a6de24eb22a0b28401300bf228c86e50617cd568209b5f6775b93c97d2fe3a + languageName: node + linkType: hard + "wrap-ansi@npm:^7.0.0": version: 7.0.0 resolution: "wrap-ansi@npm:7.0.0" @@ -10775,6 +10863,13 @@ __metadata: languageName: node linkType: hard +"y18n@npm:^4.0.0": + version: 4.0.3 + resolution: "y18n@npm:4.0.3" + checksum: 014dfcd9b5f4105c3bb397c1c8c6429a9df004aa560964fb36732bfb999bfe83d45ae40aeda5b55d21b1ee53d8291580a32a756a443e064317953f08025b1aa4 + languageName: node + linkType: hard + "yallist@npm:^4.0.0": version: 4.0.0 resolution: "yallist@npm:4.0.0" @@ -10789,6 +10884,35 @@ __metadata: languageName: node linkType: hard +"yargs-parser@npm:^18.1.2": + version: 18.1.3 + resolution: "yargs-parser@npm:18.1.3" + dependencies: + camelcase: ^5.0.0 + decamelize: ^1.2.0 + checksum: 60e8c7d1b85814594d3719300ecad4e6ae3796748b0926137bfec1f3042581b8646d67e83c6fc80a692ef08b8390f21ddcacb9464476c39bbdf52e34961dd4d9 + languageName: node + linkType: hard + +"yargs@npm:^15.3.1": + version: 15.4.1 + resolution: "yargs@npm:15.4.1" + dependencies: + cliui: ^6.0.0 + decamelize: ^1.2.0 + find-up: ^4.1.0 + get-caller-file: ^2.0.1 + require-directory: ^2.1.1 + require-main-filename: ^2.0.0 + set-blocking: ^2.0.0 + string-width: ^4.2.0 + which-module: ^2.0.0 + y18n: ^4.0.0 + yargs-parser: ^18.1.2 + checksum: 40b974f508d8aed28598087720e086ecd32a5fd3e945e95ea4457da04ee9bdb8bdd17fd91acff36dc5b7f0595a735929c514c40c402416bbb87c03f6fb782373 + languageName: node + linkType: hard + "yocto-queue@npm:^0.1.0": version: 0.1.0 resolution: "yocto-queue@npm:0.1.0" diff --git a/microsite/blog/2022-12-19-backstage-wrapped-2022.md b/microsite/blog/2022-12-19-backstage-wrapped-2022.md new file mode 100644 index 0000000000..967bc14433 --- /dev/null +++ b/microsite/blog/2022-12-19-backstage-wrapped-2022.md @@ -0,0 +1,79 @@ +--- +title: Backstage Wrapped 2022 +author: Francesco Corti & Suzanne Daniels +authorURL: https://github.com/fcorti +--- + +![wrapped header image](assets/2022-12-19/wrapped.png) + +If 2021 was the year of growth for the Backstage project and community, 2022 can be easily defined as the year of maturity. Both the project and the community continued to grow at an incredible pace and the platform is now more stable, more secure, and more powerful than ever. + +Our community is full of people from across the globe who bring incredible engagement and positive vibes to the project. And we finally got to experience this for the first time in real life during [BackstageCon](https://www.youtube.com/playlist?list=PLj6h78yzYM2OKySsTuiip3BqmdYZQRnSf), the very first in-person conference fully dedicated to Backstage, where hundreds of enthusiasts, the maintainers, adopters, and partners joined the event confirming the great momentum and the traction in the market. + +But before anticipating too much, let’s share some stats of this amazing 2022. + + + +## We grew … a lot! + +Last year we celebrated 75 [public adopters](https://github.com/backstage/backstage/blob/master/ADOPTERS.md) and today we have over 600 adopters, confirming the interest around Backstage across all the industries, sectors, and dimensions. Companies like [Toyota North America](https://aws.amazon.com/solutions/case-studies/toyota-ecs-case-study/), Deutsche Bank, Mercedes-Benz, Procter & Gamble, Siemens, LinkedIn, and many more joined the community this year and are actively contributing in growing the product and its maturity. + +![Accelerated growth of Public Backstage Adopters, from January 2021–December 2022.](assets/2022-12-19/public-backstage-adopters-2022.png) + +Not only are our adopters growing at an exponential rate, but so too are our contributors. Our [Discord server](https://discord.gg/backstage-687207715902193673) is a perfect example of the worlds of our adopters and contributors melding. On average, at any given hour of the day or night, there are more than 500 people online available to talk and provide support on any Backstage topic. Discord discussions run a full gamut of topics – from technical support questions to best practices for onboarding engineers to Backstage – basically, anything and everything an adopter may be interested to know and learn. At the very beginning of 2022, we “only” had 4k Discord members. Today, we have a growing membership of 8.2k. + +Isn’t it what we can call a great and vibrant community of enthusiasts? + +The growth of the ecosystem is not limited to the adopters and contributors. The ecosystem also includes big tech companies interested in growing Backstage by including it as part of their offering and integrations. Our [collaboration with VMWare](https://youtube.com/watch?v=GAzKCQO8Vt0&si=EnSIkaIECMiOmarE) is a great example of this, and [RedHat](https://developers.redhat.com/articles/2022/10/24/red-hat-joins-backstageio-community) joined the party this year – promising even faster growth in contributions and integrations for the Backstage project. + +Before we go any further, let’s take a quick look at some more numbers, mainly coming from the [Official Github repository](https://github.com/backstage/backstage). This year… + +- Our contributors grew from a group of 500 to 900+ +- Contributions to the project increased from 9k to 15k+ +- The number of forks shot up from 2k to 3k+ +- Backstage stars increased from 14k to almost 20k +- And lastly, we welcomed over 550 adopters into our community. + +All of these people driving the enormous growth and maturity of the project are represented in the chart below, which shows cumulative activities per month for Backstage: + +![Main Github metrics for Backstage.io.](assets/2022-12-19/github-metrics-for-backstage-io.png) + +Wow… that’s a lot of activity. We’ve generated this animation showing all of your contributions to the Backstage repository in 2022, look at this project grow: + + + +## But wait… there’s more + +The growth of the community is so exciting to see. And with all this community growth, comes growth and maturity of the product, making Backstage better able to support adopters in their developer experience challenges. The Backstage open source project has almost [100 plugins](https://backstage.io/plugins), each one amending Backstage with a tool or service to improve not only adopters’ Backstage apps, but their unique developer experiences. And almost every week we learn of a new one being contributed, which is amazing. + +The Backstage platform itself is leaving 2022 more mature than ever, thanks to milestones such as these: + +- [Backstage is now beyond version 1](https://backstage.io/blog/2022/03/17/backstage-1.0). +- [Backstage had its first Security Audit ever and now can rely on a Threat Model](https://backstage.io/blog/2022/08/23/backstage-security-audit). +- [Backstage Learn helps adopters get started more easily](https://backstage.spotify.com/learn/). +- [Backstage reached incubating status as part of the CNCF ecosystem](https://www.cncf.io/blog/2022/03/15/backstage-project-joins-the-cncf-incubator/). + +And like every mature project, now Backstage has also a mascot: Bowie the Beaver! + +![Bowie the Beaver.](assets/2022-12-19/bowie-the-beaver.png) + +Additionally, we launched a new [Special Interest Groups (SIGs)](https://github.com/backstage/community/tree/main/sigs) initiative this year, following the lead of Kubernetes. We believe Backstage SIGs will better coordinate contributions, grow the platform cohesively with the open source community, and allow contributors to dig even deeper as a community member. At this moment in time there two SIGs in place: + +- The [Catalog SIG](https://github.com/backstage/community/blob/main/sigs/sig-catalog/README.md), covering all aspects of the systems and components related to the Software Catalog. +- The [Adoption SIG](https://github.com/backstage/community/blob/main/sigs/sig-adoption/README.md), covering all aspects of the adoption journey of Backstage. + +Our plan is to open more SIGs in 2023 to engage more with the community and to keep driving towards cohesive growth for the community and project. + +Last but not least, we mustn't overlook the first ever conference fully dedicated to Backstage: BackstageCon. What was special there? SO much. But in particular two things: seeing everyone in real life and the incredible mood and conversations between maintainers, adopters, partners and enthusiasts. It’s hard to express just how positive and amazing the vibes were in a blog, but you can read our recap [here](https://backstage.io/blog/2022/10/28/backstagecon-kubecon-2022) or watch the sessions [here](https://www.youtube.com/playlist?list=PLj6h78yzYM2OKySsTuiip3BqmdYZQRnSf). And in the meantime, here are some great numbers from the event: + +- 250 attendees or a 100% full venue and packed room. +- 14 sessions +- 17 speakers + +## Goodbye, 2022. Hello, 2023! + +After this incredible year, thanks to everyone in the global Backstage community who contributed to the open source project in 2022. We are already working on the goals for 2023 – and as a roadmap teaser: we are very much committed to making the journey of adoption easier, faster, more valuable, and overall better. We would not be here today without our amazing community, so thank you for everything! + +Looking forward to continuing collaborating together for an exciting 2023. + +See you then! Happy holidays from everyone on the Backstage team at Spotify! diff --git a/microsite/blog/assets/2022-12-19/bowie-the-beaver.png b/microsite/blog/assets/2022-12-19/bowie-the-beaver.png new file mode 100644 index 0000000000..f01db5e002 Binary files /dev/null and b/microsite/blog/assets/2022-12-19/bowie-the-beaver.png differ diff --git a/microsite/blog/assets/2022-12-19/github-metrics-for-backstage-io.png b/microsite/blog/assets/2022-12-19/github-metrics-for-backstage-io.png new file mode 100644 index 0000000000..a6e64b3eb0 Binary files /dev/null and b/microsite/blog/assets/2022-12-19/github-metrics-for-backstage-io.png differ diff --git a/microsite/blog/assets/2022-12-19/public-backstage-adopters-2022.png b/microsite/blog/assets/2022-12-19/public-backstage-adopters-2022.png new file mode 100644 index 0000000000..ea14a32a42 Binary files /dev/null and b/microsite/blog/assets/2022-12-19/public-backstage-adopters-2022.png differ diff --git a/microsite/blog/assets/2022-12-19/wrapped.png b/microsite/blog/assets/2022-12-19/wrapped.png new file mode 100644 index 0000000000..e73fd860e7 Binary files /dev/null and b/microsite/blog/assets/2022-12-19/wrapped.png differ diff --git a/microsite/data/plugins/hoop.yaml b/microsite/data/plugins/hoop.yaml new file mode 100644 index 0000000000..9e41502807 --- /dev/null +++ b/microsite/data/plugins/hoop.yaml @@ -0,0 +1,14 @@ +--- +title: Hoop +author: hoop.dev +authorUrl: https://hoop.dev +category: Cloud-native ssh +description: hoop.dev is a cloud-native ssh implementation that lets you edit connections contents live. +documentation: https://github.com/hoophq/backstage-plugin +iconUrl: https://avatars.githubusercontent.com/u/113131551?s=200&v=4 +npmPackageName: '@hoophq/backstage-plugin' +tags: + - cloud-native ssh + - monitoring + - redact +addedDate: '2022-12-20' diff --git a/microsite/data/plugins/qeta.yaml b/microsite/data/plugins/qeta.yaml new file mode 100644 index 0000000000..a4a3c343a4 --- /dev/null +++ b/microsite/data/plugins/qeta.yaml @@ -0,0 +1,10 @@ +--- +title: Q&A +author: drodil +authorUrl: https://github.com/drodil +category: Services +description: Ask and answer questions within Backstage +documentation: https://github.com/drodil/backstage-plugin-qeta +iconUrl: img/qeta-logo.png +npmPackageName: '@drodil/backstage-plugin-qeta' +addedDate: '2022-12-21' diff --git a/microsite/pages/en/live.js b/microsite/pages/en/live.js index 11945fcd3b..5bd257f746 100644 --- a/microsite/pages/en/live.js +++ b/microsite/pages/en/live.js @@ -34,7 +34,7 @@ const Background = props => { diff --git a/microsite/sidebars.json b/microsite/sidebars.json index 581f8b592d..f8746c776c 100644 --- a/microsite/sidebars.json +++ b/microsite/sidebars.json @@ -1,6 +1,7 @@ { "releases": { "Release Notes": [ + "releases/v1.9.0", "releases/v1.8.0", "releases/v1.7.0", "releases/v1.6.0", diff --git a/microsite/static/img/qeta-logo.png b/microsite/static/img/qeta-logo.png new file mode 100644 index 0000000000..fd789e2852 Binary files /dev/null and b/microsite/static/img/qeta-logo.png differ diff --git a/package.json b/package.json index 1a330e4a80..609d68a4b5 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "techdocs-cli": "node scripts/techdocs-cli.js", "techdocs-cli:dev": "cross-env TECHDOCS_CLI_DEV_MODE=true node scripts/techdocs-cli.js", "prepare": "husky install", - "postinstall": "husky install" + "postinstall": "husky install || true" }, "workspaces": { "packages": [ @@ -46,7 +46,7 @@ "@types/react": "^17", "@types/react-dom": "^17" }, - "version": "1.9.0-next.4", + "version": "1.10.0-next.0", "dependencies": { "@backstage/errors": "workspace:^", "@manypkg/get-packages": "^1.1.3" diff --git a/packages/app-defaults/CHANGELOG.md b/packages/app-defaults/CHANGELOG.md index af61327f6c..055399a21d 100644 --- a/packages/app-defaults/CHANGELOG.md +++ b/packages/app-defaults/CHANGELOG.md @@ -1,5 +1,35 @@ # @backstage/app-defaults +## 1.0.11-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-app-api@1.3.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-permission-react@0.4.8 + +## 1.0.10 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + +## 1.0.9 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/core-app-api@1.3.0 + - @backstage/plugin-permission-react@0.4.8 + - @backstage/theme@0.2.16 + ## 1.0.9-next.4 ### Patch Changes diff --git a/packages/app-defaults/package.json b/packages/app-defaults/package.json index 1cb1df1255..d3250e1f1d 100644 --- a/packages/app-defaults/package.json +++ b/packages/app-defaults/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/app-defaults", "description": "Provides the default wiring of a Backstage App", - "version": "1.0.9-next.4", + "version": "1.0.11-next.0", "publishConfig": { "access": "public", "main": "dist/index.esm.js", diff --git a/packages/app/CHANGELOG.md b/packages/app/CHANGELOG.md index 373c917269..1c180b40aa 100644 --- a/packages/app/CHANGELOG.md +++ b/packages/app/CHANGELOG.md @@ -1,5 +1,186 @@ # example-app +## 0.2.79-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.22.1-next.0 + - @backstage/plugin-scaffolder@1.10.0-next.0 + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/plugin-techdocs-react@1.1.2-next.0 + - @backstage/plugin-techdocs@1.4.3-next.0 + - @backstage/plugin-explore@0.3.45-next.0 + - @backstage/app-defaults@1.0.11-next.0 + - @backstage/config@1.0.5 + - @backstage/core-app-api@1.3.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/integration-react@1.1.9-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-airbrake@0.3.14-next.0 + - @backstage/plugin-apache-airflow@0.2.7-next.0 + - @backstage/plugin-api-docs@0.8.14-next.0 + - @backstage/plugin-azure-devops@0.2.5-next.0 + - @backstage/plugin-azure-sites@0.1.3-next.0 + - @backstage/plugin-badges@0.2.38-next.0 + - @backstage/plugin-catalog-common@1.0.10-next.0 + - @backstage/plugin-catalog-graph@0.2.26-next.0 + - @backstage/plugin-catalog-import@0.9.4-next.0 + - @backstage/plugin-circleci@0.3.14-next.0 + - @backstage/plugin-cloudbuild@0.3.14-next.0 + - @backstage/plugin-code-coverage@0.2.7-next.0 + - @backstage/plugin-cost-insights@0.12.3-next.0 + - @backstage/plugin-dynatrace@1.0.4-next.0 + - @backstage/plugin-gcalendar@0.3.10-next.0 + - @backstage/plugin-gcp-projects@0.3.33-next.0 + - @backstage/plugin-github-actions@0.5.14-next.0 + - @backstage/plugin-gocd@0.1.20-next.0 + - @backstage/plugin-graphiql@0.2.46-next.0 + - @backstage/plugin-home@0.4.30-next.0 + - @backstage/plugin-jenkins@0.7.13-next.0 + - @backstage/plugin-kafka@0.3.14-next.0 + - @backstage/plugin-kubernetes@0.7.7-next.0 + - @backstage/plugin-lighthouse@0.3.14-next.0 + - @backstage/plugin-newrelic@0.3.32-next.0 + - @backstage/plugin-newrelic-dashboard@0.2.7-next.0 + - @backstage/plugin-org@0.6.4-next.0 + - @backstage/plugin-pagerduty@0.5.7-next.0 + - @backstage/plugin-permission-react@0.4.8 + - @backstage/plugin-playlist@0.1.5-next.0 + - @backstage/plugin-rollbar@0.4.14-next.0 + - @backstage/plugin-search@1.0.7-next.0 + - @backstage/plugin-search-common@1.2.0 + - @backstage/plugin-search-react@1.3.2-next.0 + - @backstage/plugin-sentry@0.4.7-next.0 + - @backstage/plugin-shortcuts@0.3.6-next.0 + - @backstage/plugin-stack-overflow@0.1.10-next.0 + - @backstage/plugin-tech-insights@0.3.6-next.0 + - @backstage/plugin-tech-radar@0.5.21-next.0 + - @backstage/plugin-techdocs-module-addons-contrib@1.0.9-next.0 + - @backstage/plugin-todo@0.2.16-next.0 + - @backstage/plugin-user-settings@0.6.2-next.0 + - @internal/plugin-catalog-customized@0.0.6-next.0 + +## 0.2.79 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/app-defaults@1.0.10 + - @backstage/cli@0.22.0 + - @backstage/integration-react@1.1.8 + - @backstage/plugin-airbrake@0.3.13 + - @backstage/plugin-apache-airflow@0.2.6 + - @backstage/plugin-api-docs@0.8.13 + - @backstage/plugin-azure-devops@0.2.4 + - @backstage/plugin-azure-sites@0.1.2 + - @backstage/plugin-badges@0.2.37 + - @backstage/plugin-catalog-graph@0.2.25 + - @backstage/plugin-catalog-import@0.9.3 + - @backstage/plugin-catalog-react@1.2.3 + - @backstage/plugin-circleci@0.3.13 + - @backstage/plugin-cloudbuild@0.3.13 + - @backstage/plugin-code-coverage@0.2.6 + - @backstage/plugin-cost-insights@0.12.2 + - @backstage/plugin-dynatrace@1.0.3 + - @backstage/plugin-explore@0.3.44 + - @backstage/plugin-gcalendar@0.3.9 + - @backstage/plugin-gcp-projects@0.3.32 + - @backstage/plugin-github-actions@0.5.13 + - @backstage/plugin-gocd@0.1.19 + - @backstage/plugin-graphiql@0.2.45 + - @backstage/plugin-home@0.4.29 + - @backstage/plugin-jenkins@0.7.12 + - @backstage/plugin-kafka@0.3.13 + - @backstage/plugin-kubernetes@0.7.6 + - @backstage/plugin-lighthouse@0.3.13 + - @backstage/plugin-newrelic@0.3.31 + - @backstage/plugin-newrelic-dashboard@0.2.6 + - @backstage/plugin-org@0.6.3 + - @backstage/plugin-pagerduty@0.5.6 + - @backstage/plugin-playlist@0.1.4 + - @backstage/plugin-rollbar@0.4.13 + - @backstage/plugin-scaffolder@1.9.1 + - @backstage/plugin-search@1.0.6 + - @backstage/plugin-search-react@1.3.1 + - @backstage/plugin-sentry@0.4.6 + - @backstage/plugin-shortcuts@0.3.5 + - @backstage/plugin-stack-overflow@0.1.9 + - @backstage/plugin-tech-insights@0.3.5 + - @backstage/plugin-tech-radar@0.5.20 + - @backstage/plugin-techdocs@1.4.2 + - @backstage/plugin-techdocs-module-addons-contrib@1.0.8 + - @backstage/plugin-techdocs-react@1.1.1 + - @backstage/plugin-todo@0.2.15 + - @backstage/plugin-user-settings@0.6.1 + - @internal/plugin-catalog-customized@0.0.6 + +## 0.2.78 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-graph@0.2.24 + - @backstage/plugin-pagerduty@0.5.5 + - @backstage/plugin-techdocs-react@1.1.0 + - @backstage/plugin-scaffolder@1.9.0 + - @backstage/plugin-cost-insights@0.12.1 + - @backstage/plugin-kubernetes@0.7.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-search-react@1.3.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-explore@0.3.43 + - @backstage/cli@0.22.0 + - @backstage/core-app-api@1.3.0 + - @backstage/plugin-cloudbuild@0.3.12 + - @backstage/plugin-gcp-projects@0.3.31 + - @backstage/plugin-github-actions@0.5.12 + - @backstage/plugin-graphiql@0.2.44 + - @backstage/plugin-techdocs@1.4.1 + - @backstage/plugin-org@0.6.2 + - @backstage/plugin-user-settings@0.6.0 + - @backstage/app-defaults@1.0.9 + - @backstage/plugin-airbrake@0.3.12 + - @backstage/plugin-api-docs@0.8.12 + - @backstage/plugin-azure-devops@0.2.3 + - @backstage/plugin-badges@0.2.36 + - @backstage/plugin-catalog-import@0.9.2 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/plugin-circleci@0.3.12 + - @backstage/plugin-code-coverage@0.2.5 + - @backstage/plugin-home@0.4.28 + - @backstage/plugin-jenkins@0.7.11 + - @backstage/plugin-kafka@0.3.12 + - @backstage/plugin-permission-react@0.4.8 + - @backstage/plugin-playlist@0.1.3 + - @backstage/plugin-rollbar@0.4.12 + - @backstage/plugin-search@1.0.5 + - @backstage/plugin-sentry@0.4.5 + - @backstage/plugin-shortcuts@0.3.4 + - @backstage/plugin-todo@0.2.14 + - @backstage/plugin-lighthouse@0.3.12 + - @backstage/plugin-stack-overflow@0.1.8 + - @backstage/integration-react@1.1.7 + - @backstage/plugin-apache-airflow@0.2.5 + - @backstage/plugin-azure-sites@0.1.1 + - @backstage/plugin-dynatrace@1.0.2 + - @backstage/plugin-gcalendar@0.3.8 + - @backstage/plugin-gocd@0.1.18 + - @backstage/plugin-newrelic@0.3.30 + - @backstage/plugin-tech-insights@0.3.4 + - @backstage/plugin-tech-radar@0.5.19 + - @backstage/plugin-techdocs-module-addons-contrib@1.0.7 + - @backstage/plugin-search-common@1.2.0 + - @internal/plugin-catalog-customized@0.0.5 + - @backstage/plugin-newrelic-dashboard@0.2.5 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + - @backstage/plugin-catalog-common@1.0.9 + ## 0.2.78-next.4 ### Patch Changes diff --git a/packages/app/package.json b/packages/app/package.json index 0491aba709..bdf019f107 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,6 +1,6 @@ { "name": "example-app", - "version": "0.2.78-next.4", + "version": "0.2.79-next.0", "private": true, "backstage": { "role": "frontend" diff --git a/packages/app/src/components/scaffolder/defaultPreviewTemplate.ts b/packages/app/src/components/scaffolder/defaultPreviewTemplate.ts index 56f34779de..5d8a2accda 100644 --- a/packages/app/src/components/scaffolder/defaultPreviewTemplate.ts +++ b/packages/app/src/components/scaffolder/defaultPreviewTemplate.ts @@ -31,8 +31,8 @@ parameters: description: Owner of the component ui:field: OwnerPicker ui:options: - allowedKinds: - - Group + catalogFilter: + kind: Group - title: Choose a location required: - repoUrl diff --git a/packages/backend-app-api/CHANGELOG.md b/packages/backend-app-api/CHANGELOG.md index 5514b46d41..5083b1897d 100644 --- a/packages/backend-app-api/CHANGELOG.md +++ b/packages/backend-app-api/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/backend-app-api +## 0.2.4 + +### Patch Changes + +- cb1c2781c0: Updated logger implementations to match interface changes. +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- afa3bf5657: Added `.stop()` method to `Backend`. +- d6dbf1792b: Added `lifecycleFactory` implementation. +- 05a928e296: Updated usages of types from `@backstage/backend-plugin-api`. +- 5260d8fc7d: Root scoped services are now always initialized, regardless of whether they're used by any features. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/plugin-permission-node@0.7.2 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + ## 0.2.4-next.3 ### Patch Changes diff --git a/packages/backend-app-api/api-report.md b/packages/backend-app-api/api-report.md index 33e732cf05..ef88d9a9d0 100644 --- a/packages/backend-app-api/api-report.md +++ b/packages/backend-app-api/api-report.md @@ -83,6 +83,11 @@ export const permissionsFactory: ( options?: undefined, ) => ServiceFactory; +// @public +export const rootLifecycleFactory: ( + options?: undefined, +) => ServiceFactory; + // @public (undocumented) export const rootLoggerFactory: ( options?: undefined, diff --git a/packages/backend-app-api/package.json b/packages/backend-app-api/package.json index 3c8a936fe5..27b84b46fc 100644 --- a/packages/backend-app-api/package.json +++ b/packages/backend-app-api/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-app-api", "description": "Core API used by Backstage backend apps", - "version": "0.2.4-next.3", + "version": "0.2.4", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/packages/backend-app-api/src/services/implementations/index.ts b/packages/backend-app-api/src/services/implementations/index.ts index 2c26097f48..c87011d570 100644 --- a/packages/backend-app-api/src/services/implementations/index.ts +++ b/packages/backend-app-api/src/services/implementations/index.ts @@ -26,4 +26,5 @@ export { tokenManagerFactory } from './tokenManagerService'; export { urlReaderFactory } from './urlReaderService'; export { httpRouterFactory } from './httpRouterService'; export { lifecycleFactory } from './lifecycleService'; +export { rootLifecycleFactory } from './rootLifecycleService'; export type { HttpRouterFactoryOptions } from './httpRouterService'; diff --git a/packages/backend-app-api/src/services/implementations/lifecycleService.ts b/packages/backend-app-api/src/services/implementations/lifecycleService.ts index 317a2e45b8..bb864679b8 100644 --- a/packages/backend-app-api/src/services/implementations/lifecycleService.ts +++ b/packages/backend-app-api/src/services/implementations/lifecycleService.ts @@ -14,65 +14,10 @@ * limitations under the License. */ import { - LifecycleService, createServiceFactory, coreServices, - loggerToWinstonLogger, LifecycleServiceShutdownHook, } from '@backstage/backend-plugin-api'; -import { Logger } from 'winston'; - -const CALLBACKS = ['SIGTERM', 'SIGINT', 'beforeExit']; -export class BackendLifecycleImpl { - constructor(private readonly logger: Logger) { - CALLBACKS.map(signal => process.on(signal, () => this.shutdown())); - } - - #isCalled = false; - #shutdownTasks: Array = - []; - - addShutdownHook( - options: LifecycleServiceShutdownHook & { pluginId: string }, - ): void { - this.#shutdownTasks.push(options); - } - - async shutdown(): Promise { - if (this.#isCalled) { - return; - } - this.#isCalled = true; - - this.logger.info(`Running ${this.#shutdownTasks.length} shutdown tasks...`); - await Promise.all( - this.#shutdownTasks.map(hook => - Promise.resolve() - .then(() => hook.fn()) - .catch(e => { - this.logger.error( - `Shutdown hook registered by plugin '${hook.pluginId}' failed with: ${e}`, - ); - }) - .then(() => - this.logger.info( - `Successfully ran shutdown hook registered by plugin ${hook.pluginId}`, - ), - ), - ), - ); - } -} - -class PluginScopedLifecycleImpl implements LifecycleService { - constructor( - private readonly lifecycle: BackendLifecycleImpl, - private readonly pluginId: string, - ) {} - addShutdownHook(options: LifecycleServiceShutdownHook): void { - this.lifecycle.addShutdownHook({ ...options, pluginId: this.pluginId }); - } -} /** * Allows plugins to register shutdown hooks that are run when the process is about to exit. @@ -80,15 +25,20 @@ class PluginScopedLifecycleImpl implements LifecycleService { export const lifecycleFactory = createServiceFactory({ service: coreServices.lifecycle, deps: { - logger: coreServices.rootLogger, - plugin: coreServices.pluginMetadata, + rootLifecycle: coreServices.rootLifecycle, + pluginMetadata: coreServices.pluginMetadata, }, - async factory({ logger }) { - const rootLifecycle = new BackendLifecycleImpl( - loggerToWinstonLogger(logger), - ); - return async ({ plugin }) => { - return new PluginScopedLifecycleImpl(rootLifecycle, plugin.getId()); + async factory({ rootLifecycle }) { + return async ({ pluginMetadata }) => { + const plugin = pluginMetadata.getId(); + return { + addShutdownHook(options: LifecycleServiceShutdownHook): void { + rootLifecycle.addShutdownHook({ + ...options, + labels: { ...options?.labels, plugin }, + }); + }, + }; }; }, }); diff --git a/packages/backend-app-api/src/services/implementations/lifecycleService.test.ts b/packages/backend-app-api/src/services/implementations/rootLifecycleService.test.ts similarity index 91% rename from packages/backend-app-api/src/services/implementations/lifecycleService.test.ts rename to packages/backend-app-api/src/services/implementations/rootLifecycleService.test.ts index c0b69a3bef..686827fecd 100644 --- a/packages/backend-app-api/src/services/implementations/lifecycleService.test.ts +++ b/packages/backend-app-api/src/services/implementations/rootLifecycleService.test.ts @@ -15,14 +15,14 @@ */ import { getVoidLogger } from '@backstage/backend-common'; -import { BackendLifecycleImpl } from './lifecycleService'; +import { BackendLifecycleImpl } from './rootLifecycleService'; describe('lifecycleService', () => { it('should execute registered shutdown hook', async () => { const service = new BackendLifecycleImpl(getVoidLogger()); const hook = jest.fn(); service.addShutdownHook({ - pluginId: 'test', + labels: { plugin: 'test' }, fn: async () => { hook(); }, @@ -37,7 +37,7 @@ describe('lifecycleService', () => { it('should not throw errors', async () => { const service = new BackendLifecycleImpl(getVoidLogger()); service.addShutdownHook({ - pluginId: 'test', + labels: { plugin: 'test' }, fn: async () => { throw new Error('oh no'); }, diff --git a/packages/backend-app-api/src/services/implementations/rootLifecycleService.ts b/packages/backend-app-api/src/services/implementations/rootLifecycleService.ts new file mode 100644 index 0000000000..c4ad4678ba --- /dev/null +++ b/packages/backend-app-api/src/services/implementations/rootLifecycleService.ts @@ -0,0 +1,69 @@ +/* + * Copyright 2022 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 { + createServiceFactory, + coreServices, + loggerToWinstonLogger, + LifecycleServiceShutdownHook, + RootLifecycleService, +} from '@backstage/backend-plugin-api'; +import { Logger } from 'winston'; + +const CALLBACKS = ['SIGTERM', 'SIGINT', 'beforeExit']; +export class BackendLifecycleImpl implements RootLifecycleService { + constructor(private readonly logger: Logger) { + CALLBACKS.map(signal => process.on(signal, () => this.shutdown())); + } + + #isCalled = false; + #shutdownTasks: Array = []; + + addShutdownHook(options: LifecycleServiceShutdownHook): void { + this.#shutdownTasks.push(options); + } + + async shutdown(): Promise { + if (this.#isCalled) { + return; + } + this.#isCalled = true; + + this.logger.info(`Running ${this.#shutdownTasks.length} shutdown tasks...`); + await Promise.all( + this.#shutdownTasks.map(async hook => { + try { + await hook.fn(); + this.logger.info(`Shutdown hook succeeded`, hook.labels); + } catch (error) { + this.logger.error(`Shutdown hook failed, ${error}`, hook.labels); + } + }), + ); + } +} + +/** + * Allows plugins to register shutdown hooks that are run when the process is about to exit. + * @public */ +export const rootLifecycleFactory = createServiceFactory({ + service: coreServices.rootLifecycle, + deps: { + logger: coreServices.rootLogger, + }, + async factory({ logger }) { + return new BackendLifecycleImpl(loggerToWinstonLogger(logger)); + }, +}); diff --git a/packages/backend-app-api/src/wiring/BackendInitializer.ts b/packages/backend-app-api/src/wiring/BackendInitializer.ts index 478cb30ff8..69512ba4c2 100644 --- a/packages/backend-app-api/src/wiring/BackendInitializer.ts +++ b/packages/backend-app-api/src/wiring/BackendInitializer.ts @@ -20,7 +20,7 @@ import { coreServices, ServiceRef, } from '@backstage/backend-plugin-api'; -import { BackendLifecycleImpl } from '../services/implementations/lifecycleService'; +import { BackendLifecycleImpl } from '../services/implementations/rootLifecycleService'; import { BackendRegisterInit, EnumerableServiceHolder, @@ -182,14 +182,13 @@ export class BackendInitializer { } const lifecycleService = await this.#serviceHolder.get( - coreServices.lifecycle, + coreServices.rootLifecycle, 'root', ); // TODO(Rugvip): Find a better way to do this - const lifecycle = (lifecycleService as any)?.lifecycle; - if (lifecycle instanceof BackendLifecycleImpl) { - await lifecycle.shutdown(); + if (lifecycleService instanceof BackendLifecycleImpl) { + await lifecycleService.shutdown(); } else { throw new Error('Unexpected lifecycle service implementation'); } diff --git a/packages/backend-common/CHANGELOG.md b/packages/backend-common/CHANGELOG.md index 4249c2ce12..84169045e5 100644 --- a/packages/backend-common/CHANGELOG.md +++ b/packages/backend-common/CHANGELOG.md @@ -1,5 +1,41 @@ # @backstage/backend-common +## 0.17.0 + +### Minor Changes + +- de8a975911: Changed to use native `AbortController` and `AbortSignal` from Node.js, instead + of the one from `node-abort-controller`. This is possible now that the minimum + supported Node.js version of the project is 16. + + Note that their interfaces are very slightly different, but typically not in a + way that matters to consumers. If you see any typescript errors as a direct + result from this, they are compatible with each other in the ways that we + interact with them, and should be possible to type-cast across without ill + effects. + +### Patch Changes + +- d3fea4ae0a: Internal fixes to avoid implicit usage of globals +- 98776e638a: Fixed GitlabUrlReader to include api tokens in API calls +- 1f2b2de3fe: exported KubernetesContainerRunner, KubernetesContainerRunnerOptions, KubernetesContainerRunnerMountBase +- 840f2113c6: Fix `GitlabUrlReader.readTree` bug when there were no matching commits +- 20a5161f04: Adds MySQL support for the catalog-backend +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 9ce7866ecd: Updated dependency `@kubernetes/client-node` to `0.18.0`. +- 3c1302c07d: Updated dependency `@types/http-errors` to `^2.0.0`. +- 6b82598bd8: Added the ability to understand Job Artifact URLs to the GitLab integration +- dfc8edf9c5: Internal refactor to avoid usage of deprecated symbols. +- 8015ff1258: Tweaked wording to use inclusive terminology +- 8646067e07: Fixed `SingleHostDiscovery` so that it properly handles single-string `backend.listen` configurations such as `:80`. +- Updated dependencies + - @backstage/errors@1.1.4 + - @backstage/config-loader@1.1.7 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/cli-common@0.1.11 + - @backstage/config@1.0.5 + ## 0.17.0-next.3 ### Patch Changes diff --git a/packages/backend-common/api-report.md b/packages/backend-common/api-report.md index 784f3295c6..e8b41e21bb 100644 --- a/packages/backend-common/api-report.md +++ b/packages/backend-common/api-report.md @@ -30,12 +30,23 @@ import { KubeConfig } from '@kubernetes/client-node'; import { LoadConfigOptionsRemote } from '@backstage/config-loader'; import { Logger } from 'winston'; import { MergeResult } from 'isomorphic-git'; +import { DiscoveryService as PluginEndpointDiscovery } from '@backstage/backend-plugin-api'; import { PushResult } from 'isomorphic-git'; import { Readable } from 'stream'; import { ReadCommitResult } from 'isomorphic-git'; +import { ReadTreeOptions } from '@backstage/backend-plugin-api'; +import { ReadTreeResponse } from '@backstage/backend-plugin-api'; +import { ReadTreeResponseDirOptions } from '@backstage/backend-plugin-api'; +import { ReadTreeResponseFile } from '@backstage/backend-plugin-api'; +import { ReadUrlOptions } from '@backstage/backend-plugin-api'; +import { ReadUrlResponse } from '@backstage/backend-plugin-api'; import { RequestHandler } from 'express'; import { Router } from 'express'; +import { SearchOptions } from '@backstage/backend-plugin-api'; +import { SearchResponse } from '@backstage/backend-plugin-api'; +import { SearchResponseFile } from '@backstage/backend-plugin-api'; import { Server } from 'http'; +import { UrlReaderService as UrlReader } from '@backstage/backend-plugin-api'; import { V1PodTemplateSpec } from '@kubernetes/client-node'; import * as winston from 'winston'; import { Writable } from 'stream'; @@ -520,11 +531,7 @@ export interface PluginDatabaseManager { }; } -// @public -export type PluginEndpointDiscovery = { - getBaseUrl(pluginId: string): Promise; - getExternalBaseUrl(pluginId: string): Promise; -}; +export { PluginEndpointDiscovery }; // @public export type ReaderFactory = (options: { @@ -533,30 +540,11 @@ export type ReaderFactory = (options: { treeResponseFactory: ReadTreeResponseFactory; }) => UrlReaderPredicateTuple[]; -// @public -export type ReadTreeOptions = { - filter?( - path: string, - info?: { - size: number; - }, - ): boolean; - etag?: string; - signal?: AbortSignal; -}; +export { ReadTreeOptions }; -// @public -export type ReadTreeResponse = { - files(): Promise; - archive(): Promise; - dir(options?: ReadTreeResponseDirOptions): Promise; - etag: string; -}; +export { ReadTreeResponse }; -// @public -export type ReadTreeResponseDirOptions = { - targetDir?: string; -}; +export { ReadTreeResponseDirOptions }; // @public export interface ReadTreeResponseFactory { @@ -587,24 +575,11 @@ export type ReadTreeResponseFactoryOptions = { ) => boolean; }; -// @public -export type ReadTreeResponseFile = { - path: string; - content(): Promise; -}; +export { ReadTreeResponseFile }; -// @public -export type ReadUrlOptions = { - etag?: string; - signal?: AbortSignal; -}; +export { ReadUrlOptions }; -// @public -export type ReadUrlResponse = { - buffer(): Promise; - stream?(): Readable; - etag?: string; -}; +export { ReadUrlResponse }; // @public export class ReadUrlResponseFactory { @@ -652,23 +627,11 @@ export type RunContainerOptions = { pullImage?: boolean; }; -// @public -export type SearchOptions = { - etag?: string; - signal?: AbortSignal; -}; +export { SearchOptions }; -// @public -export type SearchResponse = { - files: SearchResponseFile[]; - etag: string; -}; +export { SearchResponse }; -// @public -export type SearchResponseFile = { - url: string; - content(): Promise; -}; +export { SearchResponseFile }; // @public export class ServerTokenManager implements TokenManager { @@ -755,13 +718,7 @@ export interface TokenManager { }>; } -// @public -export type UrlReader = { - read(url: string): Promise; - readUrl(url: string, options?: ReadUrlOptions): Promise; - readTree(url: string, options?: ReadTreeOptions): Promise; - search(url: string, options?: SearchOptions): Promise; -}; +export { UrlReader }; // @public export type UrlReaderPredicateTuple = { diff --git a/packages/backend-common/package.json b/packages/backend-common/package.json index da7c46dce1..ca9b652fd0 100644 --- a/packages/backend-common/package.json +++ b/packages/backend-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-common", "description": "Common functionality library for Backstage backends", - "version": "0.17.0-next.3", + "version": "0.17.0", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { @@ -34,6 +34,7 @@ "test:kubernetes": "backstage-cli package test -t KubernetesContainerRunner --no-watch" }, "dependencies": { + "@backstage/backend-plugin-api": "workspace:^", "@backstage/cli-common": "workspace:^", "@backstage/config": "workspace:^", "@backstage/config-loader": "workspace:^", diff --git a/packages/backend-common/src/discovery/types.ts b/packages/backend-common/src/discovery/types.ts index 0b502bf88c..3ecdb7aa39 100644 --- a/packages/backend-common/src/discovery/types.ts +++ b/packages/backend-common/src/discovery/types.ts @@ -14,50 +14,4 @@ * limitations under the License. */ -/** - * The PluginEndpointDiscovery is used to provide a mechanism for backend - * plugins to discover the endpoints for itself or other backend plugins. - * - * The purpose of the discovery API is to allow for many different deployment - * setups and routing methods through a central configuration, instead - * of letting each individual plugin manage that configuration. - * - * Implementations of the discovery API can be as simple as a URL pattern - * using the pluginId, but could also have overrides for individual plugins, - * or query a separate discovery service. - * - * @public - */ -export type PluginEndpointDiscovery = { - /** - * Returns the internal HTTP base URL for a given plugin, without a trailing slash. - * - * The returned URL should point to an internal endpoint for the plugin, with - * the shortest route possible. The URL should be used for service-to-service - * communication within a Backstage backend deployment. - * - * This method must always be called just before making a request, as opposed to - * fetching the URL when constructing an API client. That is to ensure that more - * flexible routing patterns can be supported. - * - * For example, asking for the URL for `catalog` may return something - * like `http://10.1.2.3/api/catalog` - */ - getBaseUrl(pluginId: string): Promise; - - /** - * Returns the external HTTP base backend URL for a given plugin, without a trailing slash. - * - * The returned URL should point to an external endpoint for the plugin, such that - * it is reachable from the Backstage frontend and other external services. The returned - * URL should be usable for example as a callback / webhook URL. - * - * The returned URL should be stable and in general not change unless other static - * or external configuration is changed. Changes should not come as a surprise - * to an operator of the Backstage backend. - * - * For example, asking for the URL for `catalog` may return something - * like `https://backstage.example.com/api/catalog` - */ - getExternalBaseUrl(pluginId: string): Promise; -}; +export type { DiscoveryService as PluginEndpointDiscovery } from '@backstage/backend-plugin-api'; diff --git a/packages/backend-common/src/reading/AwsS3UrlReader.ts b/packages/backend-common/src/reading/AwsS3UrlReader.ts index b9fc58ef5c..dd7a3da3d4 100644 --- a/packages/backend-common/src/reading/AwsS3UrlReader.ts +++ b/packages/backend-common/src/reading/AwsS3UrlReader.ts @@ -117,7 +117,7 @@ export function parseUrl( } /** - * Implements a {@link UrlReader} for AWS S3 buckets. + * Implements a {@link @backstage/backend-plugin-api#UrlReaderService} for AWS S3 buckets. * * @public */ diff --git a/packages/backend-common/src/reading/AzureUrlReader.ts b/packages/backend-common/src/reading/AzureUrlReader.ts index 140496c181..08e3917b38 100644 --- a/packages/backend-common/src/reading/AzureUrlReader.ts +++ b/packages/backend-common/src/reading/AzureUrlReader.ts @@ -40,7 +40,7 @@ import { import { ReadUrlResponseFactory } from './ReadUrlResponseFactory'; /** - * Implements a {@link UrlReader} for Azure repos. + * Implements a {@link @backstage/backend-plugin-api#UrlReaderService} for Azure repos. * * @public */ diff --git a/packages/backend-common/src/reading/BitbucketCloudUrlReader.ts b/packages/backend-common/src/reading/BitbucketCloudUrlReader.ts index 7bc4cd9c11..b83e012423 100644 --- a/packages/backend-common/src/reading/BitbucketCloudUrlReader.ts +++ b/packages/backend-common/src/reading/BitbucketCloudUrlReader.ts @@ -42,7 +42,7 @@ import { import { ReadUrlResponseFactory } from './ReadUrlResponseFactory'; /** - * Implements a {@link UrlReader} for files from Bitbucket Cloud. + * Implements a {@link @backstage/backend-plugin-api#UrlReaderService} for files from Bitbucket Cloud. * * @public */ diff --git a/packages/backend-common/src/reading/BitbucketServerUrlReader.ts b/packages/backend-common/src/reading/BitbucketServerUrlReader.ts index bcab226b0f..a97c3b39bb 100644 --- a/packages/backend-common/src/reading/BitbucketServerUrlReader.ts +++ b/packages/backend-common/src/reading/BitbucketServerUrlReader.ts @@ -41,7 +41,7 @@ import { import { ReadUrlResponseFactory } from './ReadUrlResponseFactory'; /** - * Implements a {@link UrlReader} for files from Bitbucket Server APIs. + * Implements a {@link @backstage/backend-plugin-api#UrlReaderService} for files from Bitbucket Server APIs. * * @public */ diff --git a/packages/backend-common/src/reading/BitbucketUrlReader.ts b/packages/backend-common/src/reading/BitbucketUrlReader.ts index 805697bf27..2b0325d644 100644 --- a/packages/backend-common/src/reading/BitbucketUrlReader.ts +++ b/packages/backend-common/src/reading/BitbucketUrlReader.ts @@ -43,7 +43,7 @@ import { import { ReadUrlResponseFactory } from './ReadUrlResponseFactory'; /** - * Implements a {@link UrlReader} for files from Bitbucket v1 and v2 APIs, such + * Implements a {@link @backstage/backend-plugin-api#UrlReaderService} for files from Bitbucket v1 and v2 APIs, such * as the one exposed by Bitbucket Cloud itself. * * @public diff --git a/packages/backend-common/src/reading/FetchUrlReader.ts b/packages/backend-common/src/reading/FetchUrlReader.ts index d38cc510b1..20b78d63c3 100644 --- a/packages/backend-common/src/reading/FetchUrlReader.ts +++ b/packages/backend-common/src/reading/FetchUrlReader.ts @@ -63,7 +63,7 @@ const parsePortPredicate = (port: string | undefined) => { }; /** - * A {@link UrlReader} that does a plain fetch of the URL. + * A {@link @backstage/backend-plugin-api#UrlReaderService} that does a plain fetch of the URL. * * @public */ diff --git a/packages/backend-common/src/reading/GerritUrlReader.ts b/packages/backend-common/src/reading/GerritUrlReader.ts index 59b33bb2cb..5d86e5d9ac 100644 --- a/packages/backend-common/src/reading/GerritUrlReader.ts +++ b/packages/backend-common/src/reading/GerritUrlReader.ts @@ -52,7 +52,7 @@ const createTemporaryDirectory = async (workDir: string): Promise => await fs.mkdtemp(joinPath(workDir, '/gerrit-clone-')); /** - * Implements a {@link UrlReader} for files in Gerrit. + * Implements a {@link @backstage/backend-plugin-api#UrlReaderService} for files in Gerrit. * * @remarks * To be able to link to Git contents for Gerrit providers in a user friendly diff --git a/packages/backend-common/src/reading/GiteaUrlReader.ts b/packages/backend-common/src/reading/GiteaUrlReader.ts index da6b791949..1471bab608 100644 --- a/packages/backend-common/src/reading/GiteaUrlReader.ts +++ b/packages/backend-common/src/reading/GiteaUrlReader.ts @@ -36,7 +36,7 @@ import { import { Readable } from 'stream'; /** - * Implements a {@link UrlReader} for the Gitea v1 api. + * Implements a {@link @backstage/backend-plugin-api#UrlReaderService} for the Gitea v1 api. * * @public */ diff --git a/packages/backend-common/src/reading/GithubUrlReader.ts b/packages/backend-common/src/reading/GithubUrlReader.ts index 7abf1b2518..d91c35621d 100644 --- a/packages/backend-common/src/reading/GithubUrlReader.ts +++ b/packages/backend-common/src/reading/GithubUrlReader.ts @@ -51,7 +51,7 @@ export type GhBlobResponse = RestEndpointMethodTypes['git']['getBlob']['response']['data']; /** - * Implements a {@link UrlReader} for files through the GitHub v3 APIs, such as + * Implements a {@link @backstage/backend-plugin-api#UrlReaderService} for files through the GitHub v3 APIs, such as * the one exposed by GitHub itself. * * @public diff --git a/packages/backend-common/src/reading/GitlabUrlReader.ts b/packages/backend-common/src/reading/GitlabUrlReader.ts index c80f1b566c..bebc7453d0 100644 --- a/packages/backend-common/src/reading/GitlabUrlReader.ts +++ b/packages/backend-common/src/reading/GitlabUrlReader.ts @@ -42,7 +42,7 @@ import { trimEnd, trimStart } from 'lodash'; import { ReadUrlResponseFactory } from './ReadUrlResponseFactory'; /** - * Implements a {@link UrlReader} for files on GitLab. + * Implements a {@link @backstage/backend-plugin-api#UrlReaderService} for files on GitLab. * * @public */ diff --git a/packages/backend-common/src/reading/GoogleGcsUrlReader.ts b/packages/backend-common/src/reading/GoogleGcsUrlReader.ts index 56b15a60e7..c9f5a58895 100644 --- a/packages/backend-common/src/reading/GoogleGcsUrlReader.ts +++ b/packages/backend-common/src/reading/GoogleGcsUrlReader.ts @@ -51,7 +51,7 @@ const parseURL = ( }; /** - * Implements a {@link UrlReader} for files on Google GCS. + * Implements a {@link @backstage/backend-plugin-api#UrlReaderService} for files on Google GCS. * * @public */ diff --git a/packages/backend-common/src/reading/UrlReaderPredicateMux.test.ts b/packages/backend-common/src/reading/UrlReaderPredicateMux.test.ts index 38473557e0..89dac93fff 100644 --- a/packages/backend-common/src/reading/UrlReaderPredicateMux.test.ts +++ b/packages/backend-common/src/reading/UrlReaderPredicateMux.test.ts @@ -70,7 +70,6 @@ describe('UrlReaderPredicateMux', () => { mux.register({ predicate: url => url.hostname === 'foo', reader: { - read: jest.fn(), readUrl: jest.fn(), readTree: jest.fn(), search: jest.fn(), diff --git a/packages/backend-common/src/reading/UrlReaderPredicateMux.ts b/packages/backend-common/src/reading/UrlReaderPredicateMux.ts index d5d30605b2..a7c2e5f983 100644 --- a/packages/backend-common/src/reading/UrlReaderPredicateMux.ts +++ b/packages/backend-common/src/reading/UrlReaderPredicateMux.ts @@ -45,18 +45,6 @@ export class UrlReaderPredicateMux implements UrlReader { this.readers.push(tuple); } - async read(url: string): Promise { - const parsed = new URL(url); - - for (const { predicate, reader } of this.readers) { - if (predicate(parsed)) { - return reader.read(url); - } - } - - throw new NotAllowedError(notAllowedMessage(url)); - } - async readUrl( url: string, options?: ReadUrlOptions, diff --git a/packages/backend-common/src/reading/UrlReaders.ts b/packages/backend-common/src/reading/UrlReaders.ts index 9fb403e7e9..a567eef412 100644 --- a/packages/backend-common/src/reading/UrlReaders.ts +++ b/packages/backend-common/src/reading/UrlReaders.ts @@ -32,7 +32,7 @@ import { AwsS3UrlReader } from './AwsS3UrlReader'; import { GiteaUrlReader } from './GiteaUrlReader'; /** - * Creation options for {@link UrlReaders}. + * Creation options for {@link @backstage/backend-plugin-api#UrlReaderService}. * * @public */ @@ -46,13 +46,13 @@ export type UrlReadersOptions = { }; /** - * Helps construct {@link UrlReader}s. + * Helps construct {@link @backstage/backend-plugin-api#UrlReaderService}s. * * @public */ export class UrlReaders { /** - * Creates a custom {@link UrlReader} wrapper for your own set of factories. + * Creates a custom {@link @backstage/backend-plugin-api#UrlReaderService} wrapper for your own set of factories. */ static create(options: UrlReadersOptions): UrlReader { const { logger, config, factories } = options; @@ -73,7 +73,7 @@ export class UrlReaders { } /** - * Creates a {@link UrlReader} wrapper that includes all the default factories + * Creates a {@link @backstage/backend-plugin-api#UrlReaderService} wrapper that includes all the default factories * from this package. * * Any additional factories passed will be loaded before the default ones. diff --git a/packages/backend-common/src/reading/types.ts b/packages/backend-common/src/reading/types.ts index bce737f3c7..640b549532 100644 --- a/packages/backend-common/src/reading/types.ts +++ b/packages/backend-common/src/reading/types.ts @@ -17,56 +17,38 @@ import { Readable } from 'stream'; import { Logger } from 'winston'; import { Config } from '@backstage/config'; +import { + UrlReaderService, + ReadTreeResponse, +} from '@backstage/backend-plugin-api'; + +export type { + UrlReaderService as UrlReader, + ReadTreeOptions, + ReadTreeResponse, + ReadTreeResponseDirOptions, + ReadTreeResponseFile, + ReadUrlResponse, + ReadUrlOptions, + SearchOptions, + SearchResponse, + SearchResponseFile, +} from '@backstage/backend-plugin-api'; /** - * A generic interface for fetching plain data from URLs. - * - * @public - */ -export type UrlReader = { - /** - * Reads a single file and return its content. - * @deprecated use readUrl instead. - */ - read(url: string): Promise; - - /** - * Reads a single file and return its content. - * - * @remarks - * - * This is a replacement for the read method that supports options and - * complex responses. - * - * Use this as the read method will be removed in a future release. - */ - readUrl(url: string, options?: ReadUrlOptions): Promise; - - /** - * Reads a full or partial file tree. - */ - readTree(url: string, options?: ReadTreeOptions): Promise; - - /** - * Searches for a file in a tree using a glob pattern. - */ - search(url: string, options?: SearchOptions): Promise; -}; - -/** - * A predicate that decides whether a specific {@link UrlReader} can handle a + * A predicate that decides whether a specific {@link @backstage/backend-plugin-api#UrlReaderService} can handle a * given URL. * * @public */ export type UrlReaderPredicateTuple = { predicate: (url: URL) => boolean; - reader: UrlReader; + reader: UrlReaderService; }; /** * A factory function that can read config to construct zero or more - * {@link UrlReader}s along with a predicate for when it should be used. + * {@link @backstage/backend-plugin-api#UrlReaderService}s along with a predicate for when it should be used. * * @public */ @@ -76,72 +58,6 @@ export type ReaderFactory = (options: { treeResponseFactory: ReadTreeResponseFactory; }) => UrlReaderPredicateTuple[]; -/** - * An options object for readUrl operations. - * - * @public - */ -export type ReadUrlOptions = { - /** - * An ETag which can be provided to check whether a - * {@link UrlReader.readUrl} response has changed from a previous execution. - * - * @remarks - * - * In the {@link UrlReader.readUrl} response, an ETag is returned along with - * the data. The ETag is a unique identifier of the data, usually the commit - * SHA or ETag from the target. - * - * When an ETag is given in ReadUrlOptions, {@link UrlReader.readUrl} will - * first compare the ETag against the ETag of the target. If they match, - * {@link UrlReader.readUrl} will throw a - * {@link @backstage/errors#NotModifiedError} indicating that the response - * will not differ from the previous response which included this particular - * ETag. If they do not match, {@link UrlReader.readUrl} will return the rest - * of the response along with a new ETag. - */ - etag?: string; - - /** - * An abort signal to pass down to the underlying request. - * - * @remarks - * - * Not all reader implementations may take this field into account. - */ - signal?: AbortSignal; -}; - -/** - * A response object for {@link UrlReader.readUrl} operations. - * - * @public - */ -export type ReadUrlResponse = { - /** - * Returns the data that was read from the remote URL. - */ - buffer(): Promise; - - /** - * Returns the data that was read from the remote URL as a Readable stream. - * - * @remarks - * - * This method will be required in a future release. - */ - stream?(): Readable; - - /** - * Etag returned by content provider. - * - * @remarks - * - * Can be used to compare and cache responses when doing subsequent calls. - */ - etag?: string; -}; - /** * An options object for {@link ReadUrlResponseFactory} factory methods. * @@ -151,119 +67,6 @@ export type ReadUrlResponseFactoryFromStreamOptions = { etag?: string; }; -/** - * An options object for {@link UrlReader.readTree} operations. - * - * @public - */ -export type ReadTreeOptions = { - /** - * A filter that can be used to select which files should be included. - * - * @remarks - * - * The path passed to the filter function is the relative path from the URL - * that the file tree is fetched from, without any leading '/'. - * - * For example, given the URL https://github.com/my/repo/tree/master/my-dir, a file - * at https://github.com/my/repo/blob/master/my-dir/my-subdir/my-file.txt will - * be represented as my-subdir/my-file.txt - * - * If no filter is provided, all files are extracted. - */ - filter?(path: string, info?: { size: number }): boolean; - - /** - * An ETag which can be provided to check whether a - * {@link UrlReader.readTree} response has changed from a previous execution. - * - * @remarks - * - * In the {@link UrlReader.readTree} response, an ETag is returned along with - * the tree blob. The ETag is a unique identifier of the tree blob, usually - * the commit SHA or ETag from the target. - * - * When an ETag is given as a request option, {@link UrlReader.readTree} will - * first compare the ETag against the ETag on the target branch. If they - * match, {@link UrlReader.readTree} will throw a - * {@link @backstage/errors#NotModifiedError} indicating that the response - * will not differ from the previous response which included this particular - * ETag. If they do not match, {@link UrlReader.readTree} will return the - * rest of the response along with a new ETag. - */ - etag?: string; - - /** - * An abort signal to pass down to the underlying request. - * - * @remarks - * - * Not all reader implementations may take this field into account. - */ - signal?: AbortSignal; -}; - -/** - * Options that control {@link ReadTreeResponse.dir} execution. - * - * @public - */ -export type ReadTreeResponseDirOptions = { - /** - * The directory to write files to. - * - * @remarks - * - * Defaults to the OS tmpdir, or `backend.workingDirectory` if set in config. - */ - targetDir?: string; -}; - -/** - * A response object for {@link UrlReader.readTree} operations. - * - * @public - */ -export type ReadTreeResponse = { - /** - * Returns an array of all the files inside the tree, and corresponding - * functions to read their content. - */ - files(): Promise; - - /** - * Returns the tree contents as a binary archive, using a stream. - */ - archive(): Promise; - - /** - * Extracts the tree response into a directory and returns the path of the - * directory. - * - * **NOTE**: It is the responsibility of the caller to remove the directory after use. - */ - dir(options?: ReadTreeResponseDirOptions): Promise; - - /** - * Etag returned by content provider. - * - * @remarks - * - * Can be used to compare and cache responses when doing subsequent calls. - */ - etag: string; -}; - -/** - * Represents a single file in a {@link UrlReader.readTree} response. - * - * @public - */ -export type ReadTreeResponseFile = { - path: string; - content(): Promise; -}; - /** * Options that control execution of {@link ReadTreeResponseFactory} methods. * @@ -315,66 +118,3 @@ export interface ReadTreeResponseFactory { options: FromReadableArrayOptions, ): Promise; } - -/** - * An options object for search operations. - * - * @public - */ -export type SearchOptions = { - /** - * An etag can be provided to check whether the search response has changed from a previous execution. - * - * In the search() response, an etag is returned along with the files. The etag is a unique identifier - * of the current tree, usually the commit SHA or etag from the target. - * - * When an etag is given in SearchOptions, search will first compare the etag against the etag - * on the target branch. If they match, search will throw a NotModifiedError indicating that the search - * response will not differ from the previous response which included this particular etag. If they mismatch, - * search will return the rest of SearchResponse along with a new etag. - */ - etag?: string; - - /** - * An abort signal to pass down to the underlying request. - * - * @remarks - * - * Not all reader implementations may take this field into account. - */ - signal?: AbortSignal; -}; - -/** - * The output of a search operation. - * - * @public - */ -export type SearchResponse = { - /** - * The files that matched the search query. - */ - files: SearchResponseFile[]; - - /** - * A unique identifier of the current remote tree, usually the commit SHA or etag from the target. - */ - etag: string; -}; - -/** - * Represents a single file in a search response. - * - * @public - */ -export type SearchResponseFile = { - /** - * The full URL to the file. - */ - url: string; - - /** - * The binary contents of the file. - */ - content(): Promise; -}; diff --git a/packages/backend-defaults/CHANGELOG.md b/packages/backend-defaults/CHANGELOG.md index f1948621a2..b06197f7f2 100644 --- a/packages/backend-defaults/CHANGELOG.md +++ b/packages/backend-defaults/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/backend-defaults +## 0.1.4 + +### Patch Changes + +- d6dbf1792b: Added `lifecycleFactory` to default service factories. +- Updated dependencies + - @backstage/backend-app-api@0.2.4 + - @backstage/backend-plugin-api@0.2.0 + ## 0.1.4-next.3 ### Patch Changes diff --git a/packages/backend-defaults/package.json b/packages/backend-defaults/package.json index 6f69c19636..6185886dbf 100644 --- a/packages/backend-defaults/package.json +++ b/packages/backend-defaults/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-defaults", "description": "Backend defaults used by Backstage backend apps", - "version": "0.1.4-next.3", + "version": "0.1.4", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/packages/backend-defaults/src/CreateBackend.ts b/packages/backend-defaults/src/CreateBackend.ts index 9fde31e3bd..a37a8c32b2 100644 --- a/packages/backend-defaults/src/CreateBackend.ts +++ b/packages/backend-defaults/src/CreateBackend.ts @@ -23,6 +23,7 @@ import { discoveryFactory, httpRouterFactory, lifecycleFactory, + rootLifecycleFactory, loggerFactory, permissionsFactory, rootLoggerFactory, @@ -45,6 +46,7 @@ export const defaultServiceFactories = [ urlReaderFactory, httpRouterFactory, lifecycleFactory, + rootLifecycleFactory, ]; /** diff --git a/packages/backend-next/CHANGELOG.md b/packages/backend-next/CHANGELOG.md index f0bb4122b8..33d9a2ae3c 100644 --- a/packages/backend-next/CHANGELOG.md +++ b/packages/backend-next/CHANGELOG.md @@ -1,5 +1,25 @@ # example-backend-next +## 0.0.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.9.1-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-defaults@0.1.4 + - @backstage/plugin-app-backend@0.3.39 + +## 0.0.6 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.9.0 + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/plugin-app-backend@0.3.39 + - @backstage/backend-defaults@0.1.4 + ## 0.0.6-next.3 ### Patch Changes diff --git a/packages/backend-next/package.json b/packages/backend-next/package.json index 93f16e0328..cee84a1928 100644 --- a/packages/backend-next/package.json +++ b/packages/backend-next/package.json @@ -1,6 +1,6 @@ { "name": "example-backend-next", - "version": "0.0.6-next.3", + "version": "0.0.7-next.0", "main": "dist/index.cjs.js", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/backend-plugin-api/CHANGELOG.md b/packages/backend-plugin-api/CHANGELOG.md index 84f7cb8ba4..8038e48e01 100644 --- a/packages/backend-plugin-api/CHANGELOG.md +++ b/packages/backend-plugin-api/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/backend-plugin-api +## 0.2.0 + +### Minor Changes + +- 884d749b14: **BREAKING**: All core service references are now exported via a single `coreServices` object. For example, the `loggerServiceRef` is now accessed via `coreServices.logger` instead. +- a025190552: **BREAKING**: All service interfaces are now suffixed with `*Service`. + +### Patch Changes + +- cb1c2781c0: Updated `LoggerService` interface with more log methods and meta. +- d6dbf1792b: Added initial support for registering shutdown hooks via `lifecycleServiceRef`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/config@1.0.5 + ## 0.2.0-next.3 ### Patch Changes diff --git a/packages/backend-plugin-api/api-report.md b/packages/backend-plugin-api/api-report.md index 545728b386..e0fa44eb20 100644 --- a/packages/backend-plugin-api/api-report.md +++ b/packages/backend-plugin-api/api-report.md @@ -3,6 +3,8 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts +/// + import { Config } from '@backstage/config'; import { Handler } from 'express'; import { Logger } from 'winston'; @@ -10,11 +12,10 @@ import { PermissionAuthorizer } from '@backstage/plugin-permission-common'; import { PermissionEvaluator } from '@backstage/plugin-permission-common'; import { PluginCacheManager } from '@backstage/backend-common'; import { PluginDatabaseManager } from '@backstage/backend-common'; -import { PluginEndpointDiscovery } from '@backstage/backend-common'; import { PluginTaskScheduler } from '@backstage/backend-tasks'; +import { Readable } from 'stream'; import { TokenManager } from '@backstage/backend-common'; import { TransportStreamOptions } from 'winston-transport'; -import { UrlReader } from '@backstage/backend-common'; // @public (undocumented) export interface BackendFeature { @@ -89,6 +90,7 @@ declare namespace coreServices { tokenManagerServiceRef as tokenManager, permissionsServiceRef as permissions, schedulerServiceRef as scheduler, + rootLifecycleServiceRef as rootLifecycle, rootLoggerServiceRef as rootLogger, pluginMetadataServiceRef as pluginMetadata, lifecycleServiceRef as lifecycle, @@ -166,11 +168,14 @@ export type DatabaseService = PluginDatabaseManager; // @public (undocumented) const databaseServiceRef: ServiceRef; -// @public (undocumented) -export type DiscoveryService = PluginEndpointDiscovery; +// @public +export type DiscoveryService = { + getBaseUrl(pluginId: string): Promise; + getExternalBaseUrl(pluginId: string): Promise; +}; // @public (undocumented) -const discoveryServiceRef: ServiceRef; +const discoveryServiceRef: ServiceRef; // @public export type ExtensionPoint = { @@ -200,6 +205,7 @@ const lifecycleServiceRef: ServiceRef; // @public (undocumented) export type LifecycleServiceShutdownHook = { fn: () => void | Promise; + labels?: Record; }; // @public (undocumented) @@ -245,6 +251,56 @@ export interface PluginMetadataService { // @public (undocumented) const pluginMetadataServiceRef: ServiceRef; +// @public +export type ReadTreeOptions = { + filter?( + path: string, + info?: { + size: number; + }, + ): boolean; + etag?: string; + signal?: AbortSignal; +}; + +// @public +export type ReadTreeResponse = { + files(): Promise; + archive(): Promise; + dir(options?: ReadTreeResponseDirOptions): Promise; + etag: string; +}; + +// @public +export type ReadTreeResponseDirOptions = { + targetDir?: string; +}; + +// @public +export type ReadTreeResponseFile = { + path: string; + content(): Promise; +}; + +// @public +export type ReadUrlOptions = { + etag?: string; + signal?: AbortSignal; +}; + +// @public +export type ReadUrlResponse = { + buffer(): Promise; + stream?(): Readable; + etag?: string; +}; + +// @public (undocumented) +export type RootLifecycleService = LifecycleService; + +// @public (undocumented) +const rootLifecycleServiceRef: ServiceRef; + // @public (undocumented) export type RootLoggerService = LoggerService; @@ -257,6 +313,24 @@ export type SchedulerService = PluginTaskScheduler; // @public (undocumented) const schedulerServiceRef: ServiceRef; +// @public +export type SearchOptions = { + etag?: string; + signal?: AbortSignal; +}; + +// @public +export type SearchResponse = { + files: SearchResponseFile[]; + etag: string; +}; + +// @public +export type SearchResponseFile = { + url: string; + content(): Promise; +}; + // @public (undocumented) export type ServiceFactory = | { @@ -307,9 +381,13 @@ export type TypesToServiceRef = { [key in keyof T]: ServiceRef; }; -// @public (undocumented) -export type UrlReaderService = UrlReader; +// @public +export type UrlReaderService = { + readUrl(url: string, options?: ReadUrlOptions): Promise; + readTree(url: string, options?: ReadTreeOptions): Promise; + search(url: string, options?: SearchOptions): Promise; +}; // @public (undocumented) -const urlReaderServiceRef: ServiceRef; +const urlReaderServiceRef: ServiceRef; ``` diff --git a/packages/backend-plugin-api/package.json b/packages/backend-plugin-api/package.json index e1215f6210..0dce068aa6 100644 --- a/packages/backend-plugin-api/package.json +++ b/packages/backend-plugin-api/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-plugin-api", "description": "Core API used by Backstage backend plugins", - "version": "0.2.0-next.3", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/packages/backend-plugin-api/src/services/definitions/coreServices.ts b/packages/backend-plugin-api/src/services/definitions/coreServices.ts index d5a5953806..a2b1a04d41 100644 --- a/packages/backend-plugin-api/src/services/definitions/coreServices.ts +++ b/packages/backend-plugin-api/src/services/definitions/coreServices.ts @@ -24,6 +24,7 @@ export { discoveryServiceRef as discovery } from './discoveryServiceRef'; export { tokenManagerServiceRef as tokenManager } from './tokenManagerServiceRef'; export { permissionsServiceRef as permissions } from './permissionsServiceRef'; export { schedulerServiceRef as scheduler } from './schedulerServiceRef'; +export { rootLifecycleServiceRef as rootLifecycle } from './rootLifecycleServiceRef'; export { rootLoggerServiceRef as rootLogger } from './rootLoggerServiceRef'; export { pluginMetadataServiceRef as pluginMetadata } from './pluginMetadataServiceRef'; export { lifecycleServiceRef as lifecycle } from './lifecycleServiceRef'; diff --git a/packages/backend-plugin-api/src/services/definitions/discoveryServiceRef.ts b/packages/backend-plugin-api/src/services/definitions/discoveryServiceRef.ts index 41505e7756..fb508a7ae1 100644 --- a/packages/backend-plugin-api/src/services/definitions/discoveryServiceRef.ts +++ b/packages/backend-plugin-api/src/services/definitions/discoveryServiceRef.ts @@ -15,10 +15,54 @@ */ import { createServiceRef } from '../system/types'; -import { PluginEndpointDiscovery } from '@backstage/backend-common'; -/** @public */ -export type DiscoveryService = PluginEndpointDiscovery; +/** + * The DiscoveryService is used to provide a mechanism for backend + * plugins to discover the endpoints for itself or other backend plugins. + * + * The purpose of the discovery API is to allow for many different deployment + * setups and routing methods through a central configuration, instead + * of letting each individual plugin manage that configuration. + * + * Implementations of the discovery API can be as simple as a URL pattern + * using the pluginId, but could also have overrides for individual plugins, + * or query a separate discovery service. + * + * @public + */ +export type DiscoveryService = { + /** + * Returns the internal HTTP base URL for a given plugin, without a trailing slash. + * + * The returned URL should point to an internal endpoint for the plugin, with + * the shortest route possible. The URL should be used for service-to-service + * communication within a Backstage backend deployment. + * + * This method must always be called just before making a request, as opposed to + * fetching the URL when constructing an API client. That is to ensure that more + * flexible routing patterns can be supported. + * + * For example, asking for the URL for `catalog` may return something + * like `http://10.1.2.3/api/catalog` + */ + getBaseUrl(pluginId: string): Promise; + + /** + * Returns the external HTTP base backend URL for a given plugin, without a trailing slash. + * + * The returned URL should point to an external endpoint for the plugin, such that + * it is reachable from the Backstage frontend and other external services. The returned + * URL should be usable for example as a callback / webhook URL. + * + * The returned URL should be stable and in general not change unless other static + * or external configuration is changed. Changes should not come as a surprise + * to an operator of the Backstage backend. + * + * For example, asking for the URL for `catalog` may return something + * like `https://backstage.example.com/api/catalog` + */ + getExternalBaseUrl(pluginId: string): Promise; +}; /** * @public diff --git a/packages/backend-plugin-api/src/services/definitions/index.ts b/packages/backend-plugin-api/src/services/definitions/index.ts index 3cf2ab4c77..953d4b28ad 100644 --- a/packages/backend-plugin-api/src/services/definitions/index.ts +++ b/packages/backend-plugin-api/src/services/definitions/index.ts @@ -29,7 +29,19 @@ export type { export type { LoggerService, LogMeta } from './loggerServiceRef'; export type { PermissionsService } from './permissionsServiceRef'; export type { PluginMetadataService } from './pluginMetadataServiceRef'; +export type { RootLifecycleService } from './rootLifecycleServiceRef'; export type { RootLoggerService } from './rootLoggerServiceRef'; export type { SchedulerService } from './schedulerServiceRef'; export type { TokenManagerService } from './tokenManagerServiceRef'; -export type { UrlReaderService } from './urlReaderServiceRef'; +export type { + ReadTreeOptions, + ReadTreeResponse, + ReadTreeResponseDirOptions, + ReadTreeResponseFile, + ReadUrlResponse, + ReadUrlOptions, + SearchOptions, + SearchResponse, + SearchResponseFile, + UrlReaderService, +} from './urlReaderServiceRef'; diff --git a/packages/backend-plugin-api/src/services/definitions/lifecycleServiceRef.ts b/packages/backend-plugin-api/src/services/definitions/lifecycleServiceRef.ts index 4061cc1da2..e54f650fcc 100644 --- a/packages/backend-plugin-api/src/services/definitions/lifecycleServiceRef.ts +++ b/packages/backend-plugin-api/src/services/definitions/lifecycleServiceRef.ts @@ -21,6 +21,9 @@ import { createServiceRef } from '../system/types'; **/ export type LifecycleServiceShutdownHook = { fn: () => void | Promise; + + /** Labels to help identify the shutdown hook */ + labels?: Record; }; /** diff --git a/packages/backend-plugin-api/src/services/definitions/rootLifecycleServiceRef.ts b/packages/backend-plugin-api/src/services/definitions/rootLifecycleServiceRef.ts new file mode 100644 index 0000000000..e0d5355983 --- /dev/null +++ b/packages/backend-plugin-api/src/services/definitions/rootLifecycleServiceRef.ts @@ -0,0 +1,29 @@ +/* + * Copyright 2022 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 { createServiceRef } from '../system/types'; +import { LifecycleService } from './lifecycleServiceRef'; + +/** @public */ +export type RootLifecycleService = LifecycleService; + +/** + * @public + */ +export const rootLifecycleServiceRef = createServiceRef({ + id: 'core.rootLifecycle', + scope: 'root', +}); diff --git a/packages/backend-plugin-api/src/services/definitions/urlReaderServiceRef.ts b/packages/backend-plugin-api/src/services/definitions/urlReaderServiceRef.ts index 4fc3680763..db296b5807 100644 --- a/packages/backend-plugin-api/src/services/definitions/urlReaderServiceRef.ts +++ b/packages/backend-plugin-api/src/services/definitions/urlReaderServiceRef.ts @@ -15,10 +15,271 @@ */ import { createServiceRef } from '../system/types'; -import { UrlReader } from '@backstage/backend-common'; +import { Readable } from 'stream'; -/** @public */ -export type UrlReaderService = UrlReader; +/** + * A generic interface for fetching plain data from URLs. + * + * @public + */ +export type UrlReaderService = { + /** + * Reads a single file and return its content. + */ + readUrl(url: string, options?: ReadUrlOptions): Promise; + + /** + * Reads a full or partial file tree. + */ + readTree(url: string, options?: ReadTreeOptions): Promise; + + /** + * Searches for a file in a tree using a glob pattern. + */ + search(url: string, options?: SearchOptions): Promise; +}; + +/** + * An options object for readUrl operations. + * + * @public + */ +export type ReadUrlOptions = { + /** + * An ETag which can be provided to check whether a + * {@link UrlReaderService.readUrl} response has changed from a previous execution. + * + * @remarks + * + * In the {@link UrlReaderService.readUrl} response, an ETag is returned along with + * the data. The ETag is a unique identifier of the data, usually the commit + * SHA or ETag from the target. + * + * When an ETag is given in ReadUrlOptions, {@link UrlReaderService.readUrl} will + * first compare the ETag against the ETag of the target. If they match, + * {@link UrlReaderService.readUrl} will throw a + * {@link @backstage/errors#NotModifiedError} indicating that the response + * will not differ from the previous response which included this particular + * ETag. If they do not match, {@link UrlReaderService.readUrl} will return the rest + * of the response along with a new ETag. + */ + etag?: string; + + /** + * An abort signal to pass down to the underlying request. + * + * @remarks + * + * Not all reader implementations may take this field into account. + */ + signal?: AbortSignal; +}; + +/** + * A response object for {@link UrlReaderService.readUrl} operations. + * + * @public + */ +export type ReadUrlResponse = { + /** + * Returns the data that was read from the remote URL. + */ + buffer(): Promise; + + /** + * Returns the data that was read from the remote URL as a Readable stream. + * + * @remarks + * + * This method will be required in a future release. + */ + stream?(): Readable; + + /** + * Etag returned by content provider. + * + * @remarks + * + * Can be used to compare and cache responses when doing subsequent calls. + */ + etag?: string; +}; + +/** + * An options object for {@link UrlReaderService.readTree} operations. + * + * @public + */ +export type ReadTreeOptions = { + /** + * A filter that can be used to select which files should be included. + * + * @remarks + * + * The path passed to the filter function is the relative path from the URL + * that the file tree is fetched from, without any leading '/'. + * + * For example, given the URL https://github.com/my/repo/tree/master/my-dir, a file + * at https://github.com/my/repo/blob/master/my-dir/my-subdir/my-file.txt will + * be represented as my-subdir/my-file.txt + * + * If no filter is provided, all files are extracted. + */ + filter?(path: string, info?: { size: number }): boolean; + + /** + * An ETag which can be provided to check whether a + * {@link UrlReaderService.readTree} response has changed from a previous execution. + * + * @remarks + * + * In the {@link UrlReaderService.readTree} response, an ETag is returned along with + * the tree blob. The ETag is a unique identifier of the tree blob, usually + * the commit SHA or ETag from the target. + * + * When an ETag is given as a request option, {@link UrlReaderService.readTree} will + * first compare the ETag against the ETag on the target branch. If they + * match, {@link UrlReaderService.readTree} will throw a + * {@link @backstage/errors#NotModifiedError} indicating that the response + * will not differ from the previous response which included this particular + * ETag. If they do not match, {@link UrlReaderService.readTree} will return the + * rest of the response along with a new ETag. + */ + etag?: string; + + /** + * An abort signal to pass down to the underlying request. + * + * @remarks + * + * Not all reader implementations may take this field into account. + */ + signal?: AbortSignal; +}; + +/** + * Options that control {@link ReadTreeResponse.dir} execution. + * + * @public + */ +export type ReadTreeResponseDirOptions = { + /** + * The directory to write files to. + * + * @remarks + * + * Defaults to the OS tmpdir, or `backend.workingDirectory` if set in config. + */ + targetDir?: string; +}; + +/** + * A response object for {@link UrlReaderService.readTree} operations. + * + * @public + */ +export type ReadTreeResponse = { + /** + * Returns an array of all the files inside the tree, and corresponding + * functions to read their content. + */ + files(): Promise; + + /** + * Returns the tree contents as a binary archive, using a stream. + */ + archive(): Promise; + + /** + * Extracts the tree response into a directory and returns the path of the + * directory. + * + * **NOTE**: It is the responsibility of the caller to remove the directory after use. + */ + dir(options?: ReadTreeResponseDirOptions): Promise; + + /** + * Etag returned by content provider. + * + * @remarks + * + * Can be used to compare and cache responses when doing subsequent calls. + */ + etag: string; +}; + +/** + * Represents a single file in a {@link UrlReaderService.readTree} response. + * + * @public + */ +export type ReadTreeResponseFile = { + path: string; + content(): Promise; +}; + +/** + * An options object for search operations. + * + * @public + */ +export type SearchOptions = { + /** + * An etag can be provided to check whether the search response has changed from a previous execution. + * + * In the search() response, an etag is returned along with the files. The etag is a unique identifier + * of the current tree, usually the commit SHA or etag from the target. + * + * When an etag is given in SearchOptions, search will first compare the etag against the etag + * on the target branch. If they match, search will throw a NotModifiedError indicating that the search + * response will not differ from the previous response which included this particular etag. If they mismatch, + * search will return the rest of SearchResponse along with a new etag. + */ + etag?: string; + + /** + * An abort signal to pass down to the underlying request. + * + * @remarks + * + * Not all reader implementations may take this field into account. + */ + signal?: AbortSignal; +}; + +/** + * The output of a search operation. + * + * @public + */ +export type SearchResponse = { + /** + * The files that matched the search query. + */ + files: SearchResponseFile[]; + + /** + * A unique identifier of the current remote tree, usually the commit SHA or etag from the target. + */ + etag: string; +}; + +/** + * Represents a single file in a search response. + * + * @public + */ +export type SearchResponseFile = { + /** + * The full URL to the file. + */ + url: string; + + /** + * The binary contents of the file. + */ + content(): Promise; +}; /** * @public diff --git a/packages/backend-tasks/CHANGELOG.md b/packages/backend-tasks/CHANGELOG.md index 9d9d300439..7a8b189581 100644 --- a/packages/backend-tasks/CHANGELOG.md +++ b/packages/backend-tasks/CHANGELOG.md @@ -1,5 +1,28 @@ # @backstage/backend-tasks +## 0.4.0 + +### Minor Changes + +- de8a975911: Changed to use native `AbortController` and `AbortSignal` from Node.js, instead + of the one from `node-abort-controller`. This is possible now that the minimum + supported Node.js version of the project is 16. + + Note that their interfaces are very slightly different, but typically not in a + way that matters to consumers. If you see any typescript errors as a direct + result from this, they are compatible with each other in the ways that we + interact with them, and should be possible to type-cast across without ill + effects. + +### Patch Changes + +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + ## 0.4.0-next.3 ### Patch Changes diff --git a/packages/backend-tasks/package.json b/packages/backend-tasks/package.json index bc23a082ba..df46f22bfb 100644 --- a/packages/backend-tasks/package.json +++ b/packages/backend-tasks/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-tasks", "description": "Common distributed task management library for Backstage backends", - "version": "0.4.0-next.3", + "version": "0.4.0", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/packages/backend-test-utils/CHANGELOG.md b/packages/backend-test-utils/CHANGELOG.md index d9c2e769ee..954ceb58c3 100644 --- a/packages/backend-test-utils/CHANGELOG.md +++ b/packages/backend-test-utils/CHANGELOG.md @@ -1,5 +1,29 @@ # @backstage/backend-test-utils +## 0.1.32-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.22.1-next.0 + - @backstage/backend-app-api@0.2.4 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/config@1.0.5 + +## 0.1.31 + +### Patch Changes + +- afa3bf5657: Backends started with `startTestBackend` are now automatically stopped after all tests have run. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-app-api@0.2.4 + - @backstage/cli@0.22.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/config@1.0.5 + ## 0.1.31-next.4 ### Patch Changes diff --git a/packages/backend-test-utils/package.json b/packages/backend-test-utils/package.json index dbd8b32739..c7c04926dd 100644 --- a/packages/backend-test-utils/package.json +++ b/packages/backend-test-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-test-utils", "description": "Test helpers library for Backstage backends", - "version": "0.1.31-next.4", + "version": "0.1.32-next.0", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/packages/backend-test-utils/src/next/wiring/TestBackend.ts b/packages/backend-test-utils/src/next/wiring/TestBackend.ts index 1d401bbf6f..647ebc9dda 100644 --- a/packages/backend-test-utils/src/next/wiring/TestBackend.ts +++ b/packages/backend-test-utils/src/next/wiring/TestBackend.ts @@ -18,6 +18,7 @@ import { Backend, createSpecializedBackend, lifecycleFactory, + rootLifecycleFactory, loggerFactory, rootLoggerFactory, } from '@backstage/backend-app-api'; @@ -57,6 +58,7 @@ const defaultServiceFactories = [ rootLoggerFactory(), loggerFactory(), lifecycleFactory(), + rootLifecycleFactory(), ]; const backendInstancesToCleanUp = new Array(); diff --git a/packages/backend/CHANGELOG.md b/packages/backend/CHANGELOG.md index d1f3757f7b..8f993ff421 100644 --- a/packages/backend/CHANGELOG.md +++ b/packages/backend/CHANGELOG.md @@ -1,5 +1,99 @@ # example-backend +## 0.2.79-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-search-backend-module-elasticsearch@1.1.1-next.0 + - @backstage/plugin-search-backend-node@1.1.1-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/plugin-explore-backend@0.0.2-next.0 + - @backstage/plugin-code-coverage-backend@0.2.6-next.0 + - @backstage/plugin-scaffolder-backend-module-rails@0.4.8-next.0 + - @backstage/plugin-scaffolder-backend@1.9.1-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/plugin-search-backend@1.2.1-next.0 + - example-app@0.2.79-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/integration@1.4.1 + - @backstage/plugin-app-backend@0.3.39 + - @backstage/plugin-auth-backend@0.17.3-next.0 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/plugin-azure-devops-backend@0.3.18 + - @backstage/plugin-azure-sites-backend@0.1.1 + - @backstage/plugin-badges-backend@0.1.34-next.0 + - @backstage/plugin-catalog-node@1.3.1-next.0 + - @backstage/plugin-events-backend@0.2.0 + - @backstage/plugin-events-node@0.2.0 + - @backstage/plugin-graphql-backend@0.1.30-next.0 + - @backstage/plugin-jenkins-backend@0.1.30-next.0 + - @backstage/plugin-kafka-backend@0.2.33-next.0 + - @backstage/plugin-kubernetes-backend@0.9.1-next.0 + - @backstage/plugin-permission-backend@0.5.14 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-node@0.7.2 + - @backstage/plugin-playlist-backend@0.2.3-next.0 + - @backstage/plugin-proxy-backend@0.2.33 + - @backstage/plugin-rollbar-backend@0.1.36 + - @backstage/plugin-search-backend-module-pg@0.5.1-next.0 + - @backstage/plugin-search-common@1.2.0 + - @backstage/plugin-tech-insights-backend@0.5.6-next.0 + - @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.23 + - @backstage/plugin-tech-insights-node@0.3.7 + - @backstage/plugin-techdocs-backend@1.5.1-next.0 + - @backstage/plugin-todo-backend@0.1.37-next.0 + +## 0.2.78 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.9.0 + - @backstage/plugin-azure-devops-backend@0.3.18 + - @backstage/plugin-kubernetes-backend@0.9.0 + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/catalog-client@1.2.0 + - @backstage/plugin-scaffolder-backend-module-rails@0.4.7 + - @backstage/plugin-search-backend@1.2.0 + - @backstage/plugin-search-backend-module-elasticsearch@1.1.0 + - @backstage/plugin-search-backend-node@1.1.0 + - @backstage/plugin-playlist-backend@0.2.2 + - @backstage/plugin-search-backend-module-pg@0.5.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-app-backend@0.3.39 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/plugin-events-backend@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/plugin-permission-backend@0.5.14 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-node@0.7.2 + - @backstage/plugin-kafka-backend@0.2.32 + - @backstage/plugin-jenkins-backend@0.1.29 + - @backstage/plugin-events-node@0.2.0 + - @backstage/integration@1.4.1 + - @backstage/plugin-auth-backend@0.17.2 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/plugin-azure-sites-backend@0.1.1 + - @backstage/plugin-code-coverage-backend@0.2.5 + - @backstage/plugin-graphql-backend@0.1.29 + - @backstage/plugin-proxy-backend@0.2.33 + - @backstage/plugin-rollbar-backend@0.1.36 + - @backstage/plugin-techdocs-backend@1.5.0 + - @backstage/plugin-todo-backend@0.1.36 + - @backstage/plugin-explore-backend@0.0.1 + - @backstage/plugin-search-common@1.2.0 + - example-app@0.2.78 + - @backstage/plugin-badges-backend@0.1.33 + - @backstage/plugin-tech-insights-backend@0.5.5 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.23 + - @backstage/plugin-tech-insights-node@0.3.7 + ## 0.2.78-next.4 ### Patch Changes diff --git a/packages/backend/README.md b/packages/backend/README.md index f4c115db65..e4fd81749d 100644 --- a/packages/backend/README.md +++ b/packages/backend/README.md @@ -31,7 +31,7 @@ The backend starts up on port 7007 per default. ### Debugging -The backend is a node process that can be inspected to allow breakpoints and live debugging. To enable this, pass the `--inspect` flag to [backend:dev](https://backstage.io/docs/cli/commands#backenddev). +The backend is a node process that can be inspected to allow breakpoints and live debugging. To enable this, pass the `--inspect` flag to [backend:dev](https://backstage.io/docs/local-dev/cli-build-system#backend-development). To debug the backend in [Visual Studio Code](https://code.visualstudio.com/): diff --git a/packages/backend/package.json b/packages/backend/package.json index 781eff31a3..5229a4a141 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -1,6 +1,6 @@ { "name": "example-backend", - "version": "0.2.78-next.4", + "version": "0.2.79-next.0", "main": "dist/index.cjs.js", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/catalog-client/CHANGELOG.md b/packages/catalog-client/CHANGELOG.md index 3a7bbc124a..b2e9ed7c99 100644 --- a/packages/catalog-client/CHANGELOG.md +++ b/packages/catalog-client/CHANGELOG.md @@ -1,5 +1,30 @@ # @backstage/catalog-client +## 1.3.0-next.0 + +### Minor Changes + +- f75bf76330: Implemented support for the `order` directive on `getEntities` + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/errors@1.1.4 + +## 1.2.0 + +### Minor Changes + +- 00d90b520a: **BREAKING PRODUCERS**: Added a new `getEntitiesByRefs` endpoint to `CatalogApi`, for efficient batch fetching of entities by ref. + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/errors@1.1.4 + - @backstage/catalog-model@1.1.4 + ## 1.2.0-next.1 ### Patch Changes diff --git a/packages/catalog-client/api-report.md b/packages/catalog-client/api-report.md index 2f76be79e2..a81314308b 100644 --- a/packages/catalog-client/api-report.md +++ b/packages/catalog-client/api-report.md @@ -161,6 +161,17 @@ export type EntityFilterQuery = | Record[] | Record; +// @public +export type EntityOrderQuery = + | { + field: string; + order: 'asc' | 'desc'; + } + | Array<{ + field: string; + order: 'asc' | 'desc'; + }>; + // @public export interface GetEntitiesByRefsRequest { entityRefs: string[]; @@ -179,6 +190,7 @@ export interface GetEntitiesRequest { filter?: EntityFilterQuery; limit?: number; offset?: number; + order?: EntityOrderQuery; } // @public diff --git a/packages/catalog-client/package.json b/packages/catalog-client/package.json index 3f2ffe255a..a7e2094417 100644 --- a/packages/catalog-client/package.json +++ b/packages/catalog-client/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/catalog-client", "description": "An isomorphic client for the catalog backend", - "version": "1.2.0-next.1", + "version": "1.3.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/catalog-client/src/CatalogClient.test.ts b/packages/catalog-client/src/CatalogClient.test.ts index 1206d557c1..8587a5a2e1 100644 --- a/packages/catalog-client/src/CatalogClient.test.ts +++ b/packages/catalog-client/src/CatalogClient.test.ts @@ -193,6 +193,31 @@ describe('CatalogClient', () => { expect(response.items).toEqual([]); }); + + it('handles ordering properly', async () => { + expect.assertions(2); + + server.use( + rest.get(`${mockBaseUrl}/entities`, (req, res, ctx) => { + expect(req.url.search).toBe( + '?order=asc:kind&order=desc:metadata.name', + ); + return res(ctx.json([])); + }), + ); + + const response = await client.getEntities( + { + order: [ + { field: 'kind', order: 'asc' }, + { field: 'metadata.name', order: 'desc' }, + ], + }, + { token }, + ); + + expect(response.items).toEqual([]); + }); }); describe('getEntitiesByRefs', () => { diff --git a/packages/catalog-client/src/CatalogClient.ts b/packages/catalog-client/src/CatalogClient.ts index d15f382ddd..81f7343555 100644 --- a/packages/catalog-client/src/CatalogClient.ts +++ b/packages/catalog-client/src/CatalogClient.ts @@ -99,7 +99,14 @@ export class CatalogClient implements CatalogApi { request?: GetEntitiesRequest, options?: CatalogRequestOptions, ): Promise { - const { filter = [], fields = [], offset, limit, after } = request ?? {}; + const { + filter = [], + fields = [], + order, + offset, + limit, + after, + } = request ?? {}; const params: string[] = []; // filter param can occur multiple times, for example @@ -129,6 +136,18 @@ export class CatalogClient implements CatalogApi { params.push(`fields=${fields.map(encodeURIComponent).join(',')}`); } + if (order) { + for (const directive of [order].flat()) { + if (directive) { + params.push( + `order=${encodeURIComponent(directive.order)}:${encodeURIComponent( + directive.field, + )}`, + ); + } + } + } + if (offset !== undefined) { params.push(`offset=${offset}`); } diff --git a/packages/catalog-client/src/types/api.ts b/packages/catalog-client/src/types/api.ts index 771adaaeee..d662a9d106 100644 --- a/packages/catalog-client/src/types/api.ts +++ b/packages/catalog-client/src/types/api.ts @@ -98,6 +98,48 @@ export type EntityFilterQuery = */ export type EntityFieldsQuery = string[]; +/** + * Dot-separated field based ordering directives, controlling the sort order of + * the output entities. + * + * @remarks + * + * Each field is a dot-separated path into an entity's keys. The order is either + * ascending (`asc`, lexicographical order) or descending (`desc`, reverse + * lexicographical order). The ordering is case insensitive. + * + * If more than one order directive is given, later directives have lower + * precedence (they are applied only when directives of higher precedence have + * equal values). + * + * Example: + * + * ``` + * [ + * { field: 'kind', order: 'asc' }, + * { field: 'metadata.name', order: 'desc' }, + * ] + * ``` + * + * This will order the output first by kind ascending, and then within each kind + * (if there's more than one of a given kind) by their name descending. + * + * When given a field that does NOT exist on all entities in the result set, + * those entities that do not have the field will always be sorted last in that + * particular order step, no matter what the desired order was. + * + * @public + */ +export type EntityOrderQuery = + | { + field: string; + order: 'asc' | 'desc'; + } + | Array<{ + field: string; + order: 'asc' | 'desc'; + }>; + /** * The request type for {@link CatalogClient.getEntities}. * @@ -113,6 +155,10 @@ export interface GetEntitiesRequest { * declarations. */ fields?: EntityFieldsQuery; + /** + *If given, order the result set by those directives. + */ + order?: EntityOrderQuery; /** * If given, skips over the first N items in the result set. */ diff --git a/packages/catalog-client/src/types/index.ts b/packages/catalog-client/src/types/index.ts index 5ac058e349..81b985eb42 100644 --- a/packages/catalog-client/src/types/index.ts +++ b/packages/catalog-client/src/types/index.ts @@ -22,6 +22,7 @@ export type { CatalogRequestOptions, EntityFieldsQuery, EntityFilterQuery, + EntityOrderQuery, GetEntitiesByRefsRequest, GetEntitiesByRefsResponse, GetEntitiesRequest, diff --git a/packages/catalog-model/CHANGELOG.md b/packages/catalog-model/CHANGELOG.md index 1f4b669120..e45ca6d4d4 100644 --- a/packages/catalog-model/CHANGELOG.md +++ b/packages/catalog-model/CHANGELOG.md @@ -1,5 +1,24 @@ # @backstage/catalog-model +## 1.1.5-next.0 + +### Patch Changes + +- 011bd518b7: Fixed spelling mistakes in documentation. +- Updated dependencies + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + +## 1.1.4 + +### Patch Changes + +- Updated dependencies + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + ## 1.1.4-next.1 ### Patch Changes diff --git a/packages/catalog-model/package.json b/packages/catalog-model/package.json index e043a43165..8f198462db 100644 --- a/packages/catalog-model/package.json +++ b/packages/catalog-model/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/catalog-model", "description": "Types and validators that help describe the model of a Backstage Catalog", - "version": "1.1.4-next.1", + "version": "1.1.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/catalog-model/src/kinds/SystemEntityV1alpha1.ts b/packages/catalog-model/src/kinds/SystemEntityV1alpha1.ts index 7d1ab703a2..88d405ec5b 100644 --- a/packages/catalog-model/src/kinds/SystemEntityV1alpha1.ts +++ b/packages/catalog-model/src/kinds/SystemEntityV1alpha1.ts @@ -15,11 +15,11 @@ */ import type { Entity } from '../entity/Entity'; -import schema from '../schema/kinds/System.v1alpha1.schema.json'; import { ajvCompiledJsonSchemaValidator } from './util'; +import schema from '../schema/kinds/System.v1alpha1.schema.json'; /** - * Backstage catalog System kind Entity. Systems group Comopnents, Resources and APIs together. + * Backstage catalog System kind Entity. Systems group Components, Resources and APIs together. * * @remarks * diff --git a/packages/cli-common/CHANGELOG.md b/packages/cli-common/CHANGELOG.md index ced0cc1502..7e1db800de 100644 --- a/packages/cli-common/CHANGELOG.md +++ b/packages/cli-common/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/cli-common +## 0.1.11 + +### Patch Changes + +- 8015ff1258: Tweaked wording to use inclusive terminology + ## 0.1.11-next.0 ### Patch Changes diff --git a/packages/cli-common/package.json b/packages/cli-common/package.json index 6bc7cad209..eead41c946 100644 --- a/packages/cli-common/package.json +++ b/packages/cli-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/cli-common", "description": "Common functionality used by cli, backend, and create-app", - "version": "0.1.11-next.0", + "version": "0.1.11", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index ca8b940091..0f5a50d14a 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,56 @@ # @backstage/cli +## 0.22.1-next.0 + +### Patch Changes + +- 47c10706df: Fixed an issue where the CLI would fail to function when there was a mix of workspace and non-workspace versions of the same package in `yarn.lock` when using Yarn 3. +- a62a1f9dca: The frontend serve task now filters out allowed package duplicates during its package check, just like `versions:bump` and `versions:check`. +- 7c8a974515: The `repo test`, `repo lint`, and `repo build` commands will now analyze `yarn.lock` for dependency changes when searching for changed packages. This allows you to use the `--since ` flag even if you have `yarn.lock` changes. +- e1b71e142e: Workspace ranges are no longer considered invalid by version commands. +- Updated dependencies + - @backstage/cli-common@0.1.11 + - @backstage/config@1.0.5 + - @backstage/config-loader@1.1.7 + - @backstage/errors@1.1.4 + - @backstage/release-manifests@0.0.8 + - @backstage/types@1.0.2 + +## 0.22.0 + +### Minor Changes + +- 736f893f72: The Jest configuration that was previously enabled with `BACKSTAGE_NEXT_TESTS` is now enabled by default. To revert to the old configuration you can now instead set `BACKSTAGE_OLD_TESTS`. + + This new configuration uses the `babel` coverage provider rather than `v8`. It used to be that `v8` worked better when using Sucrase for transpilation, but now that we have switched to SWC, `babel` seems to work better. In addition, the new configuration also enables source maps by default, as they no longer have a negative impact on code coverage accuracy, and it also enables a modified Jest runtime with additional caching of script objects. + +### Patch Changes + +- 91d050c140: changed tests created by create-plugin to follow eslint-rules best practices particularly testing-library/prefer-screen-queries and testing-library/render-result-naming-convention +- 43b2b9c791: Removed the unused dependency on `@sucrase/jest-plugin`. +- dd721148b5: Updated Jest coverage configuration to only apply either in the root project or package configuration, depending on whether repo or package tests are run. +- 5850ef9b84: Fix webpack dev server issue where it wasn't serving `index.html` from correct endpoint on subsequent requests. +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries +- 459a3457e1: Bump `msw` version in default plugin/app templates +- c27eabef6b: Adds new web-library package option when generating a new plugin +- 8fffe42708: JSX and React Fast Refresh transforms are no longer enabled when bundling backend code. +- 309f2daca4: Updated dependency `esbuild` to `^0.16.0`. +- ee14bab716: Updated dependency `minimatch` to `5.1.1` and switch version range to `^`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- ed0cf59c59: Updated dependency `@rollup/plugin-commonjs` to `^23.0.0`. +- 16b7c2fccd: Updated dependency `@rollup/plugin-yaml` to `^4.0.0`. +- 086c0bbb45: Updated dependency `@rollup/plugin-json` to `^5.0.0`. +- 8015ff1258: Tweaked wording to use inclusive terminology +- d9d9a7a134: Removed all copyright notices from package templates. +- 8e0358e18d: Added `--skip-install` parameter to `backstage-cli versions:bump` +- Updated dependencies + - @backstage/errors@1.1.4 + - @backstage/config-loader@1.1.7 + - @backstage/release-manifests@0.0.8 + - @backstage/types@1.0.2 + - @backstage/cli-common@0.1.11 + - @backstage/config@1.0.5 + ## 0.22.0-next.4 ### Minor Changes diff --git a/packages/cli/cli-report.md b/packages/cli/cli-report.md index d82f8da60e..fa9a2aca8d 100644 --- a/packages/cli/cli-report.md +++ b/packages/cli/cli-report.md @@ -569,6 +569,7 @@ Usage: backstage-cli versions:bump [options] Options: --pattern --release + --skip-install -h, --help ``` diff --git a/packages/cli/package.json b/packages/cli/package.json index ebda11d5e7..e3efe52c77 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/cli", "description": "CLI for developing Backstage plugins and apps", - "version": "0.22.0-next.4", + "version": "0.22.1-next.0", "publishConfig": { "access": "public" }, diff --git a/packages/cli/src/commands/create-plugin/createPlugin.test.ts b/packages/cli/src/commands/create-plugin/createPlugin.test.ts index 012dc2be13..aa59f94fb4 100644 --- a/packages/cli/src/commands/create-plugin/createPlugin.test.ts +++ b/packages/cli/src/commands/create-plugin/createPlugin.test.ts @@ -22,7 +22,7 @@ import { movePlugin } from './createPlugin'; const id = 'testPluginMock'; describe('createPlugin', () => { - afterAll(() => { + afterEach(() => { mockFs.restore(); }); diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index 82cb60e62f..628e46df85 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -365,6 +365,7 @@ export function registerCommands(program: Command) { 'Bump to a specific Backstage release line or version', 'main', ) + .option('--skip-install', 'Skips yarn install step') .description('Bump Backstage packages to the latest versions') .action(lazy(() => import('./versions/bump').then(m => m.default))); diff --git a/packages/cli/src/commands/repo/build.ts b/packages/cli/src/commands/repo/build.ts index 21b1580cb9..a6bf87da82 100644 --- a/packages/cli/src/commands/repo/build.ts +++ b/packages/cli/src/commands/repo/build.ts @@ -84,6 +84,7 @@ export async function command(opts: OptionValues, cmd: Command): Promise { const graph = PackageGraph.fromPackages(packages); const changedPackages = await graph.listChangedPackages({ ref: opts.since, + analyzeLockfile: true, }); const withDevDependents = graph.collectPackageNames( changedPackages.map(pkg => pkg.name), diff --git a/packages/cli/src/commands/repo/lint.ts b/packages/cli/src/commands/repo/lint.ts index 61d85b3773..8e8ec20ff8 100644 --- a/packages/cli/src/commands/repo/lint.ts +++ b/packages/cli/src/commands/repo/lint.ts @@ -34,7 +34,10 @@ export async function command(opts: OptionValues): Promise { if (opts.since) { const graph = PackageGraph.fromPackages(packages); - packages = await graph.listChangedPackages({ ref: opts.since }); + packages = await graph.listChangedPackages({ + ref: opts.since, + analyzeLockfile: true, + }); } // Packages are ordered from most to least number of dependencies, as a diff --git a/packages/cli/src/commands/repo/test.ts b/packages/cli/src/commands/repo/test.ts index 578cb15e83..95bfe8f449 100644 --- a/packages/cli/src/commands/repo/test.ts +++ b/packages/cli/src/commands/repo/test.ts @@ -93,6 +93,7 @@ export async function command(opts: OptionValues, cmd: Command): Promise { const graph = PackageGraph.fromPackages(packages); const changedPackages = await graph.listChangedPackages({ ref: opts.since, + analyzeLockfile: true, }); const packageNames = Array.from( diff --git a/packages/cli/src/commands/start/startFrontend.ts b/packages/cli/src/commands/start/startFrontend.ts index f6923632c8..b7b81e6bff 100644 --- a/packages/cli/src/commands/start/startFrontend.ts +++ b/packages/cli/src/commands/start/startFrontend.ts @@ -21,7 +21,8 @@ import { serveBundle } from '../../lib/bundler'; import { loadCliConfig } from '../../lib/config'; import { paths } from '../../lib/paths'; import { Lockfile } from '../../lib/versioning'; -import { includedFilter } from '../versions/lint'; +import { forbiddenDuplicatesFilter, includedFilter } from '../versions/lint'; +import { PackageGraph } from '../../lib/monorepo'; interface StartAppOptions { verifyVersions?: boolean; @@ -36,10 +37,13 @@ export async function startFrontend(options: StartAppOptions) { const lockfile = await Lockfile.load(paths.resolveTargetRoot('yarn.lock')); const result = lockfile.analyze({ filter: includedFilter, + localPackages: PackageGraph.fromPackages( + await PackageGraph.listTargetPackages(), + ), }); - const problemPackages = [...result.newVersions, ...result.newRanges].map( - ({ name }) => name, - ); + const problemPackages = [...result.newVersions, ...result.newRanges] + .map(({ name }) => name) + .filter(forbiddenDuplicatesFilter); if (problemPackages.length > 1) { console.log( diff --git a/packages/cli/src/commands/versions/bump.test.ts b/packages/cli/src/commands/versions/bump.test.ts index 25682a4cd4..9e5288677d 100644 --- a/packages/cli/src/commands/versions/bump.test.ts +++ b/packages/cli/src/commands/versions/bump.test.ts @@ -122,10 +122,12 @@ describe('bump', () => { }, })); }); + afterEach(() => { mockFs.restore(); jest.resetAllMocks(); }); + const worker = setupServer(); setupRequestMockHandlers(worker); @@ -222,6 +224,102 @@ describe('bump', () => { }); }); + it('should bump backstage dependencies but not them installed', async () => { + mockFs({ + '/yarn.lock': lockfileMock, + '/package.json': JSON.stringify({ + workspaces: { + packages: ['packages/*'], + }, + }), + '/packages/a/package.json': JSON.stringify({ + name: 'a', + dependencies: { + '@backstage/core': '^1.0.5', + }, + }), + '/packages/b/package.json': JSON.stringify({ + name: 'b', + dependencies: { + '@backstage/core': '^1.0.3', + '@backstage/theme': '^1.0.0', + }, + }), + }); + + jest + .spyOn(paths, 'resolveTargetRoot') + .mockImplementation((...path) => resolvePath('/', ...path)); + jest.spyOn(runObj, 'run').mockResolvedValue(undefined); + worker.use( + rest.get( + 'https://versions.backstage.io/v1/tags/main/manifest.json', + (_, res, ctx) => + res( + ctx.status(200), + ctx.json({ + packages: [], + }), + ), + ), + ); + const { log: logs } = await withLogCollector(['log'], async () => { + await bump({ + pattern: null, + release: 'main', + skipInstall: true, + } as unknown as Command); + }); + expect(logs.filter(Boolean)).toEqual([ + 'Using default pattern glob @backstage/*', + 'Checking for updates of @backstage/core', + 'Checking for updates of @backstage/theme', + 'Checking for updates of @backstage/core-api', + 'Some packages are outdated, updating', + 'unlocking @backstage/core@^1.0.3 ~> 1.0.6', + 'unlocking @backstage/core-api@^1.0.6 ~> 1.0.7', + 'unlocking @backstage/core-api@^1.0.3 ~> 1.0.7', + 'bumping @backstage/core in a to ^1.0.6', + 'bumping @backstage/core in b to ^1.0.6', + 'bumping @backstage/theme in b to ^2.0.0', + 'Skipping yarn install', + '⚠️ The following packages may have breaking changes:', + ' @backstage/theme : 1.0.0 ~> 2.0.0', + ' https://github.com/backstage/backstage/blob/master/packages/theme/CHANGELOG.md', + 'Version bump complete!', + ]); + + expect(mockFetchPackageInfo).toHaveBeenCalledTimes(3); + expect(mockFetchPackageInfo).toHaveBeenCalledWith('@backstage/core'); + expect(mockFetchPackageInfo).toHaveBeenCalledWith('@backstage/core-api'); + expect(mockFetchPackageInfo).toHaveBeenCalledWith('@backstage/theme'); + + expect(runObj.run).not.toHaveBeenCalledWith( + 'yarn', + ['install'], + expect.any(Object), + ); + + const lockfileContents = await fs.readFile('/yarn.lock', 'utf8'); + expect(lockfileContents).toBe(lockfileMockResult); + + const packageA = await fs.readJson('/packages/a/package.json'); + expect(packageA).toEqual({ + name: 'a', + dependencies: { + '@backstage/core': '^1.0.6', + }, + }); + const packageB = await fs.readJson('/packages/b/package.json'); + expect(packageB).toEqual({ + name: 'b', + dependencies: { + '@backstage/core': '^1.0.6', + '@backstage/theme': '^2.0.0', + }, + }); + }); + it('should prefer dependency versions from release manifest', async () => { mockFs({ '/yarn.lock': lockfileMock, diff --git a/packages/cli/src/commands/versions/bump.ts b/packages/cli/src/commands/versions/bump.ts index 81f98b8421..45b966a52d 100644 --- a/packages/cli/src/commands/versions/bump.ts +++ b/packages/cli/src/commands/versions/bump.ts @@ -39,6 +39,7 @@ import { ReleaseManifest, } from '@backstage/release-manifests'; import 'global-agent/bootstrap'; +import { PackageGraph } from '../../lib/monorepo'; const DEP_TYPES = [ 'dependencies', @@ -200,7 +201,7 @@ export default async (opts: OptionValues) => { lockfile.remove(name, range); } } - await lockfile.save(); + await lockfile.save(lockfilePath); } const breakingUpdates = new Map(); @@ -255,7 +256,13 @@ export default async (opts: OptionValues) => { ); } - await runYarnInstall(); + if (!opts.skipInstall) { + await runYarnInstall(); + } else { + console.log(); + + console.log(chalk.yellow(`Skipping yarn install`)); + } if (breakingUpdates.size > 0) { console.log(); @@ -299,8 +306,12 @@ export default async (opts: OptionValues) => { // Finally we make sure the new lockfile doesn't have any duplicates const dedupLockfile = await Lockfile.load(lockfilePath); + const result = dedupLockfile.analyze({ filter, + localPackages: PackageGraph.fromPackages( + await PackageGraph.listTargetPackages(), + ), }); if (result.newVersions.length > 0) { diff --git a/packages/cli/src/commands/versions/lint.ts b/packages/cli/src/commands/versions/lint.ts index 9939b2ba51..8de38548a9 100644 --- a/packages/cli/src/commands/versions/lint.ts +++ b/packages/cli/src/commands/versions/lint.ts @@ -18,6 +18,7 @@ import { OptionValues } from 'commander'; import { Lockfile } from '../../lib/versioning'; import { paths } from '../../lib/paths'; import partition from 'lodash/partition'; +import { PackageGraph } from '../../lib/monorepo'; // Packages that we try to avoid duplicates for const INCLUDED = [/^@backstage\//]; @@ -52,9 +53,13 @@ export default async (cmd: OptionValues) => { let success = true; - const lockfile = await Lockfile.load(paths.resolveTargetRoot('yarn.lock')); + const lockfilePath = paths.resolveTargetRoot('yarn.lock'); + const lockfile = await Lockfile.load(lockfilePath); const result = lockfile.analyze({ filter: includedFilter, + localPackages: PackageGraph.fromPackages( + await PackageGraph.listTargetPackages(), + ), }); logArray( @@ -65,7 +70,7 @@ export default async (cmd: OptionValues) => { if (fix) { lockfile.replaceVersions(result.newVersions); - await lockfile.save(); + await lockfile.save(lockfilePath); } else { const [newVersionsForbidden, newVersionsAllowed] = partition( result.newVersions, diff --git a/packages/cli/src/lib/bundler/bundle.ts b/packages/cli/src/lib/bundler/bundle.ts index 2f23d5cae6..a8967bb250 100644 --- a/packages/cli/src/lib/bundler/bundle.ts +++ b/packages/cli/src/lib/bundler/bundle.ts @@ -42,7 +42,6 @@ export async function buildBundle(options: BuildOptions) { isDev: false, baseUrl: resolveBaseUrl(options.frontendConfig), }); - const compiler = webpack(config); const isCi = yn(process.env.CI, { default: false }); @@ -64,7 +63,7 @@ export async function buildBundle(options: BuildOptions) { ); } - const { stats } = await build(compiler, isCi).catch(error => { + const { stats } = await build(config, isCi).catch(error => { console.log(chalk.red('Failed to compile.\n')); throw new Error(`Failed to compile.\n${error.message || error}`); }); @@ -90,10 +89,10 @@ export async function buildBundle(options: BuildOptions) { ); } -async function build(compiler: webpack.Compiler, isCi: boolean) { +async function build(config: webpack.Configuration, isCi: boolean) { const stats = await new Promise( (resolve, reject) => { - compiler.run((err, buildStats) => { + webpack(config, (err, buildStats) => { if (err) { if (err.message) { const { errors } = formatWebpackMessages({ diff --git a/packages/cli/src/lib/bundler/config.ts b/packages/cli/src/lib/bundler/config.ts index 1974153f02..ce216f5c59 100644 --- a/packages/cli/src/lib/bundler/config.ts +++ b/packages/cli/src/lib/bundler/config.ts @@ -35,6 +35,9 @@ import { paths as cliPaths } from '../../lib/paths'; import { runPlain } from '../run'; import ESLintPlugin from 'eslint-webpack-plugin'; import pickBy from 'lodash/pickBy'; +import yn from 'yn'; + +const BUILD_CACHE_ENV_VAR = 'BACKSTAGE_CLI_EXPERIMENTAL_BUILD_CACHE'; export function resolveBaseUrl(config: Config): URL { const baseUrl = config.getString('app.baseUrl'); @@ -146,6 +149,8 @@ export async function createConfig( require.resolve('react-refresh'), ]; + const withCache = yn(process.env[BUILD_CACHE_ENV_VAR], { default: false }); + return { mode: isDev ? 'development' : 'production', profile: false, @@ -206,6 +211,16 @@ export async function createConfig( : {}), }, plugins, + ...(withCache + ? { + cache: { + type: 'filesystem', + buildDependencies: { + config: [__filename], + }, + }, + } + : {}), }; } diff --git a/packages/cli/src/lib/git.ts b/packages/cli/src/lib/git.ts index 074260b38f..c0b50f5140 100644 --- a/packages/cli/src/lib/git.ts +++ b/packages/cli/src/lib/git.ts @@ -64,3 +64,23 @@ export async function listChangedFiles(ref: string) { return Array.from(new Set([...tracked, ...untracked])); } + +/** + * Returns the contents of a file at a specific ref. + */ +export async function readFileAtRef(path: string, ref: string) { + let showRef = ref; + try { + const [base] = await runGit('merge-base', 'HEAD', ref); + showRef = base; + } catch { + // silently fall back to using the ref directly if merge base is not available + } + + const { stdout } = await execFile('git', ['show', `${showRef}:${path}`], { + shell: true, + cwd: paths.targetRoot, + maxBuffer: 1024 * 1024 * 50, + }); + return stdout; +} diff --git a/packages/cli/src/lib/monorepo/PackageGraph.test.ts b/packages/cli/src/lib/monorepo/PackageGraph.test.ts index feb1709bf7..d8edff9c81 100644 --- a/packages/cli/src/lib/monorepo/PackageGraph.test.ts +++ b/packages/cli/src/lib/monorepo/PackageGraph.test.ts @@ -14,19 +14,25 @@ * limitations under the License. */ +import { resolve as resolvePath } from 'path'; import { getPackages } from '@manypkg/get-packages'; import { PackageGraph } from './PackageGraph'; -import { listChangedFiles } from '../git'; +import { Lockfile } from '../versioning/Lockfile'; +import { listChangedFiles, readFileAtRef } from '../git'; jest.mock('../git'); const mockListChangedFiles = listChangedFiles as jest.MockedFunction< typeof listChangedFiles >; +const mockReadFileAtRef = readFileAtRef as jest.MockedFunction< + typeof readFileAtRef +>; jest.mock('../paths', () => ({ paths: { targetRoot: '/', + resolveTargetRoot: (...paths: string[]) => resolvePath('/', ...paths), }, })); @@ -177,4 +183,54 @@ describe('PackageGraph', () => { graph.listChangedPackages({ ref: 'origin/master' }), ).resolves.toEqual([graph.get('a'), graph.get('b')]); }); + + it('lists changed packages with lockfile analysis', async () => { + const graph = PackageGraph.fromPackages(testPackages); + + mockListChangedFiles.mockResolvedValueOnce( + ['README.md', 'packages/a/src/foo.ts', 'yarn.lock'].sort(), + ); + mockReadFileAtRef.mockResolvedValueOnce(` +a@^1: + version: "1.0.0" + +c@^1: + version: "1.0.0" + dependencies: + c-dep: ^1 + +c-dep@^2: + version: "2.0.0" + integrity: sha512-xyz +`); + jest.spyOn(Lockfile, 'load').mockResolvedValueOnce( + Lockfile.parse(` +a@^1: + version: "1.0.0" + +c@^1: + version: "1.0.0" + dependencies: + c-dep: ^1 + +c-dep@^2: + version: "2.0.0" + integrity: sha512-xyz-other +`), + ); + + await expect( + graph + .listChangedPackages({ + ref: 'origin/master', + analyzeLockfile: true, + }) + .then(pkgs => pkgs.map(pkg => pkg.name)), + ).resolves.toEqual(['a', 'c']); + + expect(mockReadFileAtRef).toHaveBeenCalledWith( + 'yarn.lock', + 'origin/master', + ); + }); }); diff --git a/packages/cli/src/lib/monorepo/PackageGraph.ts b/packages/cli/src/lib/monorepo/PackageGraph.ts index c65f5c003c..a1fc95e669 100644 --- a/packages/cli/src/lib/monorepo/PackageGraph.ts +++ b/packages/cli/src/lib/monorepo/PackageGraph.ts @@ -18,7 +18,8 @@ import path from 'path'; import { getPackages, Package } from '@manypkg/get-packages'; import { paths } from '../paths'; import { PackageRole } from '../role'; -import { listChangedFiles } from '../git'; +import { listChangedFiles, readFileAtRef } from '../git'; +import { Lockfile } from '../versioning'; type PackageJSON = Package['packageJson']; @@ -191,7 +192,10 @@ export class PackageGraph extends Map { return targets; } - async listChangedPackages(options: { ref: string }) { + async listChangedPackages(options: { + ref: string; + analyzeLockfile?: boolean; + }) { const changedFiles = await listChangedFiles(options.ref); const dirMap = new Map( @@ -234,6 +238,77 @@ export class PackageGraph extends Map { } } + if (changedFiles.includes('yarn.lock') && options.analyzeLockfile) { + // Load the lockfile in the working tree and the one at the ref and diff them + let thisLockfile: Lockfile; + let otherLockfile: Lockfile; + try { + thisLockfile = await Lockfile.load( + paths.resolveTargetRoot('yarn.lock'), + ); + otherLockfile = Lockfile.parse( + await readFileAtRef('yarn.lock', options.ref), + ); + } catch (error) { + console.warn( + `Failed to read lockfiles, assuming all packages have changed, ${error}`, + ); + return Array.from(this.values()); + } + const diff = thisLockfile.diff(otherLockfile); + + // Create a simplified dependency graph only keeps track of package names + const graph = thisLockfile.createSimplifiedDependencyGraph(); + + // Merge the dependency graph from the other lockfile into this one in + // order to be able to detect removals accurately. + { + const otherGraph = thisLockfile.createSimplifiedDependencyGraph(); + for (const [name, dependencies] of otherGraph) { + const node = graph.get(name); + if (node) { + dependencies.forEach(d => node.add(d)); + } else { + graph.set(name, dependencies); + } + } + } + + // The check is simplified by only considering the package names rather + // than the exact version range queries that were changed. + // TODO(Rugvip): Use a more exact check + const changedPackages = new Set( + [...diff.added, ...diff.changed, ...diff.removed].map(e => e.name), + ); + + // Starting with our set of changed packages from the diff, we loop through + // the full graph and add any package that has a dependency on a changed package. + // We keep looping until all transitive dependencies have been detected. + let changed = false; + do { + changed = false; + for (const [name, dependencies] of graph) { + if (changedPackages.has(name)) { + continue; + } + for (const dep of dependencies) { + if (changedPackages.has(dep)) { + changed = true; + changedPackages.add(name); + break; + } + } + } + } while (changed); + + // Add all local packages that had a transitive dependency change to the result set + for (const node of this.values()) { + if (changedPackages.has(node.name) && !result.includes(node)) { + result.push(node); + } + } + } + return result; } } diff --git a/packages/cli/src/lib/new/factories/webLibraryPackage.test.ts b/packages/cli/src/lib/new/factories/webLibraryPackage.test.ts index 03be32dbaa..50fef44a67 100644 --- a/packages/cli/src/lib/new/factories/webLibraryPackage.test.ts +++ b/packages/cli/src/lib/new/factories/webLibraryPackage.test.ts @@ -16,7 +16,7 @@ import fs from 'fs-extra'; import mockFs from 'mock-fs'; -import { resolve as resolvePath } from 'path'; +import { resolve as resolvePath, join as joinPath } from 'path'; import { paths } from '../../paths'; import { Task } from '../../tasks'; import { FactoryRegistry } from '../FactoryRegistry'; @@ -73,7 +73,7 @@ describe('webLibraryPackage factory', () => { '', `Creating web-library package ${expectedwebLibraryPackageName}`, 'Checking Prerequisites:', - `availability packages/${expectedwebLibraryPackageName}`, + `availability ${joinPath('packages', expectedwebLibraryPackageName)}`, 'creating temp dir', 'Executing Template:', 'copying .eslintrc.js', @@ -82,7 +82,7 @@ describe('webLibraryPackage factory', () => { 'templating index.ts.hbs', 'copying setupTests.ts', 'Installing:', - `moving packages/${expectedwebLibraryPackageName}`, + `moving ${joinPath('packages', expectedwebLibraryPackageName)}`, ]); await expect( diff --git a/packages/cli/src/lib/versioning/Lockfile.test.ts b/packages/cli/src/lib/versioning/Lockfile.test.ts index 4621b43372..0275c5ee50 100644 --- a/packages/cli/src/lib/versioning/Lockfile.test.ts +++ b/packages/cli/src/lib/versioning/Lockfile.test.ts @@ -16,14 +16,23 @@ import fs from 'fs-extra'; import mockFs from 'mock-fs'; +import { ExtendedPackage } from '../monorepo'; import { Lockfile } from './Lockfile'; -const HEADER = `# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +const LEGACY_HEADER = `# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 `; -const mockA = `${HEADER} +const MODERN_HEADER = `# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 6 + cacheKey: 8 +`; + +const mockA = `${LEGACY_HEADER} a@^1: version "1.0.1" resolved "https://my-registry/a-1.0.01.tgz#abc123" @@ -38,7 +47,7 @@ b@^2: version "2.0.0" `; -const mockADedup = `${HEADER} +const mockADedup = `${LEGACY_HEADER} a@^1: version "1.0.1" resolved "https://my-registry/a-1.0.01.tgz#abc123" @@ -50,7 +59,7 @@ b@2.0.x, b@^2: version "2.0.1" `; -const mockB = `${HEADER} +const mockB = `${LEGACY_HEADER} "@s/a@*", "@s/a@1 || 2", "@s/a@^1": version "1.0.1" @@ -58,7 +67,7 @@ const mockB = `${HEADER} version "2.0.0" `; -const mockBDedup = `${HEADER} +const mockBDedup = `${LEGACY_HEADER} "@s/a@*", "@s/a@1 || 2", "@s/a@^2.0.x": version "2.0.0" @@ -77,10 +86,12 @@ describe('Lockfile', () => { }); const lockfile = await Lockfile.load('/yarn.lock'); - expect(lockfile.get('a')).toEqual([{ range: '^1', version: '1.0.1' }]); + expect(lockfile.get('a')).toEqual([ + { range: '^1', version: '1.0.1', dataKey: 'a@^1' }, + ]); expect(lockfile.get('b')).toEqual([ - { range: '2.0.x', version: '2.0.1' }, - { range: '^2', version: '2.0.0' }, + { range: '2.0.x', version: '2.0.1', dataKey: 'b@2.0.x' }, + { range: '^2', version: '2.0.0', dataKey: 'b@^2' }, ]); expect(lockfile.toString()).toBe(mockA); }); @@ -91,7 +102,7 @@ describe('Lockfile', () => { }); const lockfile = await Lockfile.load('/yarn.lock'); - const result = lockfile.analyze(); + const result = lockfile.analyze({ localPackages: new Map() }); expect(result).toEqual({ invalidRanges: [], newRanges: [], @@ -110,7 +121,7 @@ describe('Lockfile', () => { expect(lockfile.toString()).toBe(mockADedup); await expect(fs.readFile('/yarn.lock', 'utf8')).resolves.toBe(mockA); - await expect(lockfile.save()).resolves.toBeUndefined(); + await expect(lockfile.save('/yarn.lock')).resolves.toBeUndefined(); await expect(fs.readFile('/yarn.lock', 'utf8')).resolves.toBe(mockADedup); }); @@ -120,7 +131,7 @@ describe('Lockfile', () => { }); const lockfile = await Lockfile.load('/yarn.lock'); - const result = lockfile.analyze(); + const result = lockfile.analyze({ localPackages: new Map() }); expect(result).toEqual({ invalidRanges: [], newRanges: [ @@ -154,15 +165,7 @@ describe('Lockfile', () => { }); }); -const newHeader = `# This file is generated by running "yarn install" inside your project. -# Manual changes might be lost - proceed with caution! - -__metadata: - version: 6 - cacheKey: 8 -`; - -const mockANew = `${newHeader} +const mockANew = `${MODERN_HEADER} a@^1: version: 1.0.1 dependencies: @@ -177,7 +180,7 @@ b@^2: version: 2.0.0 `; -const mockANewDedup = `${newHeader} +const mockANewDedup = `${MODERN_HEADER} a@^1: version: 1.0.1 dependencies: @@ -192,6 +195,36 @@ b@^2: version: 2.0.1 `; +const mockANewLocal = `${MODERN_HEADER} +a@^1: + version: 1.0.1 + dependencies: + b: ^2 + integrity: sha512-xyz + resolved: "https://my-registry/a-1.0.01.tgz#abc123" + +"b@2.0.x, b@^2.0.1": + version: 0.0.0-use.local + +b@^2: + version: 2.0.0 +`; + +const mockANewLocalDedup = `${MODERN_HEADER} +a@^1: + version: 1.0.1 + dependencies: + b: ^2 + integrity: sha512-xyz + resolved: "https://my-registry/a-1.0.01.tgz#abc123" + +"b@2.0.x, b@^2.0.1": + version: 0.0.0-use.local + +b@^2: + version: 0.0.0-use.local +`; + describe('New Lockfile', () => { afterEach(() => { mockFs.restore(); @@ -203,11 +236,13 @@ describe('New Lockfile', () => { }); const lockfile = await Lockfile.load('/yarn.lock'); - expect(lockfile.get('a')).toEqual([{ range: '^1', version: '1.0.1' }]); + expect(lockfile.get('a')).toEqual([ + { range: '^1', version: '1.0.1', dataKey: 'a@^1' }, + ]); expect(lockfile.get('b')).toEqual([ - { range: '2.0.x', version: '2.0.1' }, - { range: '^2.0.1', version: '2.0.1' }, - { range: '^2', version: '2.0.0' }, + { range: '2.0.x', version: '2.0.1', dataKey: 'b@2.0.x, b@^2.0.1' }, + { range: '^2.0.1', version: '2.0.1', dataKey: 'b@2.0.x, b@^2.0.1' }, + { range: '^2', version: '2.0.0', dataKey: 'b@^2' }, ]); expect(lockfile.toString()).toBe(mockANew); }); @@ -218,7 +253,7 @@ describe('New Lockfile', () => { }); const lockfile = await Lockfile.load('/yarn.lock'); - const result = lockfile.analyze(); + const result = lockfile.analyze({ localPackages: new Map() }); expect(result).toEqual({ invalidRanges: [], newRanges: [], @@ -237,9 +272,515 @@ describe('New Lockfile', () => { expect(lockfile.toString()).toBe(mockANewDedup); await expect(fs.readFile('/yarn.lock', 'utf8')).resolves.toBe(mockANew); - await expect(lockfile.save()).resolves.toBeUndefined(); + await expect(lockfile.save('/yarn.lock')).resolves.toBeUndefined(); await expect(fs.readFile('/yarn.lock', 'utf8')).resolves.toBe( mockANewDedup, ); }); + + it('should deduplicate and save mockANewLocal', async () => { + mockFs({ + '/yarn.lock': mockANewLocal, + }); + + const lockfile = await Lockfile.load('/yarn.lock'); + const result = lockfile.analyze({ + localPackages: new Map([ + [ + 'b', + { + packageJson: { version: '2.0.1' }, + } as ExtendedPackage, + ], + ]), + }); + expect(result).toEqual({ + invalidRanges: [], + newRanges: [], + newVersions: [ + { + name: 'b', + range: '^2', + oldVersion: '2.0.0', + newVersion: '0.0.0-use.local', + }, + ], + }); + + expect(lockfile.toString()).toBe(mockANewLocal); + lockfile.replaceVersions(result.newVersions); + expect(lockfile.toString()).toBe(mockANewLocalDedup); + + await expect(fs.readFile('/yarn.lock', 'utf8')).resolves.toBe( + mockANewLocal, + ); + await expect(lockfile.save('/yarn.lock')).resolves.toBeUndefined(); + await expect(fs.readFile('/yarn.lock', 'utf8')).resolves.toBe( + mockANewLocalDedup, + ); + }); + + describe('diff', () => { + const lockfileLegacyA = Lockfile.parse(`${LEGACY_HEADER} +a@^1: + version "1.0.1" + resolved "https://my-registry/a-1.0.01.tgz#abc123" + integrity sha512-xyz + dependencies: + b "^2" + +b@3: + version "3.0.1" + integrity sha512-abc1 + +b@2.0.x: + version "2.0.1" + integrity sha512-abc2 + +b@^2: + version "2.0.0" + integrity sha512-abc3 + +c@^1: + version "1.0.1" + integrity x +`); + + const lockfileLegacyB = Lockfile.parse(`${LEGACY_HEADER} +a@^1: + version "1.0.1" + resolved "https://my-registry/a-1.0.01.tgz#abc123" + integrity sha512-xyz-other + dependencies: + b "^2" + +b@2.0.x, b@^2: + version "2.0.0" + integrity sha512-abc3 + +b@4: + version "4.0.0" + integrity sha512-abc + +d@^1: + version "1.0.1" + integrity x +`); + + const lockfileModernA = Lockfile.parse(`${MODERN_HEADER} +"a@npm:^1": + version: "1.0.1" + resolved: "https://my-registry/a-1.0.01.tgz#abc123" + checksum: sha512-xyz + dependencies: + b: "^2" + +"b@npm:3": + version: "3.0.1" + checksum: sha512-abc1 + +"b@npm:2.0.x": + version: "2.0.1" + checksum: sha512-abc2 + +"b@npm:^2": + version: "2.0.0" + checksum: sha512-abc3 + +"c@npm:^1": + version: "1.0.1" + checksum: x +`); + + const lockfileModernB = Lockfile.parse(`${MODERN_HEADER} +"a@npm:^1": + version: "1.0.1" + resolution: "a@npm:1.0.1" + checksum: sha512-xyz-other + dependencies: + b: "^2" + +"b@npm:2.0.x, b@npm:^2": + version: "2.0.0" + checksum: sha512-abc3 + +"b@npm:4": + version: "4.0.0" + checksum: sha512-abc + +"d@npm:^1": + version: "1.0.1" + checksum: x +`); + + it('should diff two legacy lockfiles', async () => { + expect(lockfileLegacyA.diff(lockfileLegacyB)).toEqual({ + added: [ + { name: 'b', range: '3' }, + { name: 'c', range: '^1' }, + ], + changed: [ + { name: 'a', range: '^1' }, + { name: 'b', range: '2.0.x' }, + ], + removed: [ + { name: 'b', range: '4' }, + { name: 'd', range: '^1' }, + ], + }); + expect(lockfileLegacyB.diff(lockfileLegacyA)).toEqual({ + added: [ + { name: 'b', range: '4' }, + { name: 'd', range: '^1' }, + ], + changed: [ + { name: 'a', range: '^1' }, + { name: 'b', range: '2.0.x' }, + ], + removed: [ + { name: 'b', range: '3' }, + { name: 'c', range: '^1' }, + ], + }); + }); + + it('should diff two modern lockfiles', async () => { + expect(lockfileModernA.diff(lockfileModernB)).toEqual({ + added: [ + { name: 'b', range: '3' }, + { name: 'c', range: '^1' }, + ], + changed: [ + { name: 'a', range: '^1' }, + { name: 'b', range: '2.0.x' }, + ], + removed: [ + { name: 'b', range: '4' }, + { name: 'd', range: '^1' }, + ], + }); + expect(lockfileModernB.diff(lockfileModernA)).toEqual({ + added: [ + { name: 'b', range: '4' }, + { name: 'd', range: '^1' }, + ], + changed: [ + { name: 'a', range: '^1' }, + { name: 'b', range: '2.0.x' }, + ], + removed: [ + { name: 'b', range: '3' }, + { name: 'c', range: '^1' }, + ], + }); + }); + + it('should diff legacy and modern lockfiles', async () => { + expect(lockfileLegacyA.diff(lockfileModernB)).toEqual({ + added: [ + { name: 'b', range: '3' }, + { name: 'c', range: '^1' }, + ], + changed: [ + { name: 'a', range: '^1' }, + { name: 'b', range: '2.0.x' }, + ], + removed: [ + { name: 'b', range: '4' }, + { name: 'd', range: '^1' }, + ], + }); + expect(lockfileLegacyB.diff(lockfileModernA)).toEqual({ + added: [ + { name: 'b', range: '4' }, + { name: 'd', range: '^1' }, + ], + changed: [ + { name: 'a', range: '^1' }, + { name: 'b', range: '2.0.x' }, + ], + removed: [ + { name: 'b', range: '3' }, + { name: 'c', range: '^1' }, + ], + }); + }); + + it('should diff modern and legacy lockfiles', async () => { + expect(lockfileModernA.diff(lockfileLegacyB)).toEqual({ + added: [ + { name: 'b', range: '3' }, + { name: 'c', range: '^1' }, + ], + changed: [ + { name: 'a', range: '^1' }, + { name: 'b', range: '2.0.x' }, + ], + removed: [ + { name: 'b', range: '4' }, + { name: 'd', range: '^1' }, + ], + }); + expect(lockfileModernB.diff(lockfileLegacyA)).toEqual({ + added: [ + { name: 'b', range: '4' }, + { name: 'd', range: '^1' }, + ], + changed: [ + { name: 'a', range: '^1' }, + { name: 'b', range: '2.0.x' }, + ], + removed: [ + { name: 'b', range: '3' }, + { name: 'c', range: '^1' }, + ], + }); + }); + + it('should handle workspace ranges', async () => { + const lockfile = `${MODERN_HEADER} +"@backstage/app-defaults@workspace:^, @backstage/app-defaults@workspace:packages/app-defaults": + version: 0.0.0-use.local + resolution: "@backstage/app-defaults@workspace:packages/app-defaults" + dependencies: + "@backstage/cli": "workspace:^" + "@backstage/core-app-api": "workspace:^" + "@backstage/core-components": "workspace:^" + "@backstage/core-plugin-api": "workspace:^" + "@backstage/plugin-permission-react": "workspace:^" + "@backstage/test-utils": "workspace:^" + "@backstage/theme": "workspace:^" + "@material-ui/core": ^4.12.2 + "@material-ui/icons": ^4.9.1 + "@testing-library/jest-dom": ^5.10.1 + "@testing-library/react": ^12.1.3 + "@types/node": ^16.11.26 + "@types/react": ^16.13.1 || ^17.0.0 + peerDependencies: + react: ^16.13.1 || ^17.0.0 + react-dom: ^16.13.1 || ^17.0.0 + react-router-dom: 6.0.0-beta.0 || ^6.3.0 + languageName: unknown + linkType: soft + +"@backstage/backend-app-api@workspace:^, @backstage/backend-app-api@workspace:packages/backend-app-api": + version: 0.0.0-use.local + resolution: "@backstage/backend-app-api@workspace:packages/backend-app-api" + dependencies: + "@backstage/backend-common": "workspace:^" + "@backstage/backend-plugin-api": "workspace:^" + "@backstage/backend-tasks": "workspace:^" + "@backstage/cli": "workspace:^" + "@backstage/errors": "workspace:^" + "@backstage/plugin-permission-node": "workspace:^" + express: ^4.17.1 + express-promise-router: ^4.1.0 + winston: ^3.2.1 + languageName: unknown + linkType: soft +`; + expect(Lockfile.parse(lockfile).diff(Lockfile.parse(lockfile))).toEqual({ + added: [], + changed: [], + removed: [], + }); + }); + }); + + describe('createSimplifiedDependencyGraph', () => { + it('for modern lockfile', () => { + expect( + Lockfile.parse( + `${MODERN_HEADER} +"@backstage/app-defaults@workspace:^, @backstage/app-defaults@workspace:packages/app-defaults": + version: 0.0.0-use.local + resolution: "@backstage/app-defaults@workspace:packages/app-defaults" + dependencies: + "@backstage/cli": "workspace:^" + "@backstage/core-app-api": "workspace:^" + "@backstage/core-components": "workspace:^" + "@backstage/core-plugin-api": "workspace:^" + "@backstage/plugin-permission-react": "workspace:^" + "@backstage/test-utils": "workspace:^" + "@backstage/theme": "workspace:^" + "@material-ui/core": ^4.12.2 + "@material-ui/icons": ^4.9.1 + "@testing-library/jest-dom": ^5.10.1 + "@testing-library/react": ^12.1.3 + "@types/node": ^16.11.26 + "@types/react": ^16.13.1 || ^17.0.0 + peerDependencies: + react: ^16.13.1 || ^17.0.0 + react-dom: ^16.13.1 || ^17.0.0 + react-router-dom: 6.0.0-beta.0 || ^6.3.0 + languageName: unknown + linkType: soft + +"@backstage/backend-app-api@workspace:^, @backstage/backend-app-api@workspace:packages/backend-app-api": + version: 0.0.0-use.local + resolution: "@backstage/backend-app-api@workspace:packages/backend-app-api" + dependencies: + "@backstage/backend-common": "workspace:^" + "@backstage/backend-plugin-api": "workspace:^" + "@backstage/backend-tasks": "workspace:^" + "@backstage/cli": "workspace:^" + "@backstage/errors": "workspace:^" + "@backstage/plugin-permission-node": "workspace:^" + express: ^4.17.1 + express-promise-router: ^4.1.0 + winston: ^3.2.1 + languageName: unknown + linkType: soft +`, + ).createSimplifiedDependencyGraph(), + ).toEqual( + new Map([ + [ + '@backstage/app-defaults', + new Set([ + '@backstage/cli', + '@backstage/core-app-api', + '@backstage/core-components', + '@backstage/core-plugin-api', + '@backstage/plugin-permission-react', + '@backstage/test-utils', + '@backstage/theme', + '@material-ui/core', + '@material-ui/icons', + '@testing-library/jest-dom', + '@testing-library/react', + '@types/node', + '@types/react', + 'react', + 'react-dom', + 'react-router-dom', + ]), + ], + [ + '@backstage/backend-app-api', + new Set([ + '@backstage/backend-common', + '@backstage/backend-plugin-api', + '@backstage/backend-tasks', + '@backstage/cli', + '@backstage/errors', + '@backstage/plugin-permission-node', + 'express', + 'express-promise-router', + 'winston', + ]), + ], + ]), + ); + }); + + it('for simple lockfile without dependencies', () => { + expect( + Lockfile.parse( + `${MODERN_HEADER} +"a@npm:^1": + version: "1.0.1" + +"b@npm:3": + version: "3.0.1" + +"b@npm:2.0.x": + version: "2.0.1" + checksum: sha512-abc2 +`, + ).createSimplifiedDependencyGraph(), + ).toEqual( + new Map([ + ['a', new Set()], + ['b', new Set()], + ]), + ); + }); + + it('for lockfile with dependencies', () => { + expect( + Lockfile.parse( + `${MODERN_HEADER} +"a@npm:^1": + version: "1.0.1" + dependencies: + b: "^2" + +"b@npm:3": + version: "3.0.1" + checksum: sha512-abc1 + +"b@npm:2.0.x": + version: "2.0.1" + checksum: sha512-abc2 + dependencies: + c: "^1" + +"b@npm:^2": + version: "2.0.0" + checksum: sha512-abc3 + peerDependencies: + d: "^1" + +"c@npm:^1": + version: "1.0.1" + +"d@npm:^1": + version: "1.0.2" +`, + ).createSimplifiedDependencyGraph(), + ).toEqual( + new Map([ + ['a', new Set(['b'])], + ['b', new Set(['c', 'd'])], + ['c', new Set()], + ['d', new Set()], + ]), + ); + }); + + it('for legacy lockfile', () => { + expect( + Lockfile.parse( + `${LEGACY_HEADER} +a@^1: + version "1.0.1" + dependencies: + b "^2" + +b@3: + version "3.0.1" + integrity sha512-abc1 + +b@2.0.x: + version "2.0.1" + integrity sha512-abc2 + dependencies: + c "^1" + +b@^2: + version "2.0.0" + integrity sha512-abc3 + dependencies: + d "^1" + +c@^1: + version "1.0.1" + integrity x + +d@^1: + version "1.0.1" + integrity x +`, + ).createSimplifiedDependencyGraph(), + ).toEqual( + new Map([ + ['a', new Set(['b'])], + ['b', new Set(['c', 'd'])], + ['c', new Set()], + ['d', new Set()], + ]), + ); + }); + }); }); diff --git a/packages/cli/src/lib/versioning/Lockfile.ts b/packages/cli/src/lib/versioning/Lockfile.ts index 016593ea8d..4eadaf55f9 100644 --- a/packages/cli/src/lib/versioning/Lockfile.ts +++ b/packages/cli/src/lib/versioning/Lockfile.ts @@ -18,6 +18,7 @@ import fs from 'fs-extra'; import semver from 'semver'; import { parseSyml, stringifySyml } from '@yarnpkg/parsers'; import { stringify as legacyStringifyLockfile } from '@yarnpkg/lockfile'; +import { ExtendedPackage } from '../monorepo'; const ENTRY_PATTERN = /^((?:@[^/]+\/)?[^@/]+)@(.+)$/; @@ -25,14 +26,28 @@ type LockfileData = { [entry: string]: { version: string; resolved?: string; - integrity?: string; + integrity?: string /* old */; + checksum?: string /* new */; dependencies?: { [name: string]: string }; + peerDependencies?: { [name: string]: string }; }; }; type LockfileQueryEntry = { range: string; version: string; + dataKey: string; +}; + +type LockfileDiffEntry = { + name: string; + range: string; +}; + +type LockfileDiff = { + added: LockfileDiffEntry[]; + changed: LockfileDiffEntry[]; + removed: LockfileDiffEntry[]; }; /** Entries that have an invalid version range, for example an npm tag */ @@ -64,20 +79,6 @@ type AnalyzeResult = { newRanges: AnalyzeResultNewRange[]; }; -function parseLockfile(lockfileContents: string) { - try { - return { - object: parseSyml(lockfileContents), - type: 'success', - }; - } catch (err) { - return { - object: null, - type: err, - }; - } -} - // the new yarn header is handled out of band of the parsing // https://github.com/yarnpkg/berry/blob/0c5974f193a9397630e9aee2b3876cca62611149/packages/yarnpkg-core/sources/Project.ts#L1741-L1746 const NEW_HEADER = `${[ @@ -85,11 +86,6 @@ const NEW_HEADER = `${[ `# Manual changes might be lost - proceed with caution!\n`, ].join(``)}\n`; -function stringifyLockfile(data: LockfileData, legacy: boolean) { - return legacy - ? legacyStringifyLockfile(data) - : NEW_HEADER + stringifySyml(data); -} // taken from yarn parser package // https://github.com/yarnpkg/berry/blob/0c5974f193a9397630e9aee2b3876cca62611149/packages/yarnpkg-parsers/sources/syml.ts#L136 const LEGACY_REGEX = /^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i; @@ -110,13 +106,19 @@ const SPECIAL_OBJECT_KEYS = [ export class Lockfile { static async load(path: string) { const lockfileContents = await fs.readFile(path, 'utf8'); - const legacy = LEGACY_REGEX.test(lockfileContents); - const lockfile = parseLockfile(lockfileContents); - if (lockfile.type !== 'success') { - throw new Error(`Failed yarn.lock parse with ${lockfile.type}`); + return Lockfile.parse(lockfileContents); + } + + static parse(content: string) { + const legacy = LEGACY_REGEX.test(content); + + let data: LockfileData; + try { + data = parseSyml(content); + } catch (err) { + throw new Error(`Failed yarn.lock parse, ${err}`); } - const data = lockfile.object as LockfileData; const packages = new Map(); for (const [key, value] of Object.entries(data)) { @@ -139,15 +141,14 @@ export class Lockfile { if (range.startsWith('npm:')) { range = range.slice('npm:'.length); } - queries.push({ range, version: value.version }); + queries.push({ range, version: value.version, dataKey: key }); } } - return new Lockfile(path, packages, data, legacy); + return new Lockfile(packages, data, legacy); } private constructor( - private readonly path: string, private readonly packages: Map, private readonly data: LockfileData, private readonly legacy: boolean = false, @@ -164,8 +165,11 @@ export class Lockfile { } /** Analyzes the lockfile to identify possible actions and warnings for the entries */ - analyze(options?: { filter?: (name: string) => boolean }): AnalyzeResult { - const { filter } = options ?? {}; + analyze(options: { + filter?: (name: string) => boolean; + localPackages: Map; + }): AnalyzeResult { + const { filter, localPackages } = options; const result: AnalyzeResult = { invalidRanges: [], newVersions: [], @@ -178,7 +182,9 @@ export class Lockfile { } // Get rid of and signal any invalid ranges upfront - const invalid = allEntries.filter(e => !semver.validRange(e.range)); + const invalid = allEntries.filter( + e => !semver.validRange(e.range) && !e.range.startsWith('workspace:'), + ); result.invalidRanges.push( ...invalid.map(({ range }) => ({ name, range })), ); @@ -190,36 +196,55 @@ export class Lockfile { } // Find all versions currently in use - const versions = Array.from(new Set(entries.map(e => e.version))).sort( - (v1, v2) => semver.rcompare(v1, v2), - ); + const versions = Array.from(new Set(entries.map(e => e.version))) + .map(v => { + // Translate workspace:^ references to the actual version + if (v === '0.0.0-use.local') { + const local = localPackages.get(name); + if (!local) { + throw new Error(`No local package found for ${name}`); + } + if (!local.packageJson.version) { + throw new Error(`No version found for local package ${name}`); + } + return { + entryVersion: v, + actualVersion: local.packageJson.version, + }; + } + return { entryVersion: v, actualVersion: v }; + }) + .sort((v1, v2) => semver.rcompare(v1.actualVersion, v2.actualVersion)); // If we're not using at least 2 different versions we're done if (versions.length < 2) { continue; } + // TODO(Rugvip): Support bumping into workspace ranges too const acceptedVersions = new Set(); for (const { version, range } of entries) { // Finds the highest matching version from the the known versions // TODO(Rugvip): We may want to select the version that satisfies the most ranges rather than the highest one - const acceptedVersion = versions.find(v => semver.satisfies(v, range)); + const acceptedVersion = versions.find(v => + semver.satisfies(v.actualVersion, range), + ); if (!acceptedVersion) { throw new Error( `No existing version was accepted for range ${range}, searching through ${versions}, for package ${name}`, ); } - if (acceptedVersion !== version) { + if (acceptedVersion.entryVersion !== version) { result.newVersions.push({ name, range, - newVersion: acceptedVersion, + newVersion: acceptedVersion.entryVersion, oldVersion: version, }); } - acceptedVersions.add(acceptedVersion); + acceptedVersions.add(acceptedVersion.actualVersion); } // If all ranges were able to accept the same version, we're done @@ -315,11 +340,91 @@ export class Lockfile { } } - async save() { - await fs.writeFile(this.path, this.toString(), 'utf8'); + createSimplifiedDependencyGraph(): Map> { + const graph = new Map>(); + + for (const [name, entries] of this.packages) { + const dependencies = new Set( + entries.flatMap(e => { + const data = this.data[e.dataKey]; + return [ + ...Object.keys(data?.dependencies ?? {}), + ...Object.keys(data?.peerDependencies ?? {}), + ]; + }), + ); + graph.set(name, dependencies); + } + + return graph; + } + + /** + * Diff with another lockfile, returning entries that have been + * added, changed, and removed compared to the other lockfile. + */ + diff(otherLockfile: Lockfile): LockfileDiff { + const diff = { + added: new Array<{ name: string; range: string }>(), + changed: new Array<{ name: string; range: string }>(), + removed: new Array<{ name: string; range: string }>(), + }; + + // Keeps track of packages that only exist in this lockfile + const remainingOldNames = new Set(this.packages.keys()); + + for (const [name, otherQueries] of otherLockfile.packages) { + remainingOldNames.delete(name); + + const thisQueries = this.packages.get(name); + // If the packages doesn't exist in this lockfile, add all entries + if (!thisQueries) { + diff.removed.push(...otherQueries.map(q => ({ name, range: q.range }))); + continue; + } + + const remainingOldRanges = new Set(thisQueries.map(q => q.range)); + + for (const otherQuery of otherQueries) { + remainingOldRanges.delete(otherQuery.range); + + const thisQuery = thisQueries.find(q => q.range === otherQuery.range); + if (!thisQuery) { + diff.removed.push({ name, range: otherQuery.range }); + continue; + } + + const otherPkg = otherLockfile.data[otherQuery.dataKey]; + const thisPkg = this.data[thisQuery.dataKey]; + if (otherPkg && thisPkg) { + const thisCheck = thisPkg.integrity || thisPkg.checksum; + const otherCheck = otherPkg.integrity || otherPkg.checksum; + if (thisCheck !== otherCheck) { + diff.changed.push({ name, range: otherQuery.range }); + } + } + } + + for (const thisRange of remainingOldRanges) { + diff.added.push({ name, range: thisRange }); + } + } + + for (const name of remainingOldNames) { + const queries = this.packages.get(name) ?? []; + diff.added.push(...queries.map(q => ({ name, range: q.range }))); + } + + return diff; + } + + async save(path: string) { + await fs.writeFile(path, this.toString(), 'utf8'); } toString() { - return stringifyLockfile(this.data, this.legacy); + return this.legacy + ? legacyStringifyLockfile(this.data) + : NEW_HEADER + stringifySyml(this.data); } } diff --git a/packages/cli/templates/default-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs b/packages/cli/templates/default-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs index ae626c0d57..b04e8a2f48 100644 --- a/packages/cli/templates/default-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs +++ b/packages/cli/templates/default-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs @@ -1,7 +1,5 @@ import React from 'react'; import { ExampleComponent } from './ExampleComponent'; -import { ThemeProvider } from '@material-ui/core'; -import { lightTheme } from '@backstage/theme'; import { rest } from 'msw'; import { setupServer } from 'msw/node'; import { screen } from '@testing-library/react'; @@ -23,11 +21,7 @@ describe('ExampleComponent', () => { }); it('should render', async () => { - await renderInTestApp( - - - , - ); + await renderInTestApp(); expect(screen.getByText('Welcome to {{ id }}!')).toBeInTheDocument(); }); }); diff --git a/packages/codemods/CHANGELOG.md b/packages/codemods/CHANGELOG.md index 3c4bddbba3..2481aff8b1 100644 --- a/packages/codemods/CHANGELOG.md +++ b/packages/codemods/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/codemods +## 0.1.42 + +### Patch Changes + +- Updated dependencies + - @backstage/cli-common@0.1.11 + ## 0.1.42-next.0 ### Patch Changes diff --git a/packages/codemods/package.json b/packages/codemods/package.json index 0b49cef79a..cbcc0613d4 100644 --- a/packages/codemods/package.json +++ b/packages/codemods/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/codemods", "description": "A collection of codemods for Backstage projects", - "version": "0.1.42-next.0", + "version": "0.1.42", "publishConfig": { "access": "public", "main": "dist/index.cjs.js" diff --git a/packages/config-loader/CHANGELOG.md b/packages/config-loader/CHANGELOG.md index eaee146dc7..e937829dde 100644 --- a/packages/config-loader/CHANGELOG.md +++ b/packages/config-loader/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/config-loader +## 1.1.7 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 40e7e6e1a2: Updated dependency `typescript-json-schema` to `^0.55.0`. +- Updated dependencies + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/cli-common@0.1.11 + - @backstage/config@1.0.5 + ## 1.1.7-next.2 ### Patch Changes diff --git a/packages/config-loader/package.json b/packages/config-loader/package.json index 33b47314a6..9da952414c 100644 --- a/packages/config-loader/package.json +++ b/packages/config-loader/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/config-loader", "description": "Config loading functionality used by Backstage backend, and CLI", - "version": "1.1.7-next.2", + "version": "1.1.7", "publishConfig": { "access": "public", "main": "dist/index.cjs.js", diff --git a/packages/config/CHANGELOG.md b/packages/config/CHANGELOG.md index 212bf7e008..af6f2b07be 100644 --- a/packages/config/CHANGELOG.md +++ b/packages/config/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/config +## 1.0.5 + +### Patch Changes + +- Updated dependencies + - @backstage/types@1.0.2 + ## 1.0.5-next.1 ### Patch Changes diff --git a/packages/config/package.json b/packages/config/package.json index 5db3832789..48c8e56640 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/config", "description": "Config API used by Backstage core, backend, and CLI", - "version": "1.0.5-next.1", + "version": "1.0.5", "publishConfig": { "access": "public", "main": "dist/index.cjs.js", diff --git a/packages/config/src/reader.test.ts b/packages/config/src/reader.test.ts index c0627a200b..c4c2a4ecbf 100644 --- a/packages/config/src/reader.test.ts +++ b/packages/config/src/reader.test.ts @@ -22,6 +22,15 @@ const DATA = { one: 1, true: true, false: false, + yes: 'yes', + no: 'no', + y: 'y', + n: 'n', + on: 'on', + off: 'off', + zeroString: '0', + oneString: '1', + stringFalse: 'false', null: null, string: 'string', emptyString: '', @@ -53,6 +62,17 @@ function expectValidValues(config: ConfigReader) { expect(config.getOptional('true')).toBe(true); expect(config.getBoolean('true')).toBe(true); expect(config.getBoolean('false')).toBe(false); + expect(config.getBoolean('stringFalse')).toBe(false); + expect(config.getBoolean('zero')).toBe(false); + expect(config.getBoolean('one')).toBe(true); + expect(config.getBoolean('zeroString')).toBe(false); + expect(config.getBoolean('oneString')).toBe(true); + expect(config.getBoolean('yes')).toBe(true); + expect(config.getBoolean('no')).toBe(false); + expect(config.getBoolean('y')).toBe(true); + expect(config.getBoolean('n')).toBe(false); + expect(config.getBoolean('on')).toBe(true); + expect(config.getBoolean('off')).toBe(false); expect(config.getString('string')).toBe('string'); expect(config.get('strings')).toEqual(['string1', 'string2']); expect(config.getStringArray('strings')).toEqual(['string1', 'string2']); @@ -86,7 +106,7 @@ function expectValidValues(config: ConfigReader) { function expectInvalidValues(config: ConfigReader) { expect(() => config.getBoolean('string')).toThrow( - "Invalid type in config for key 'string' in 'ctx', got string, wanted boolean", + "Unable to convert config value for key 'string' in 'ctx' to a boolean", ); expect(() => config.getNumber('string')).toThrow( "Unable to convert config value for key 'string' in 'ctx' to a number", diff --git a/packages/config/src/reader.ts b/packages/config/src/reader.ts index 1ce54590b5..4a570b6977 100644 --- a/packages/config/src/reader.ts +++ b/packages/config/src/reader.ts @@ -280,10 +280,25 @@ export class ConfigReader implements Config { /** {@inheritdoc Config.getOptionalBoolean} */ getOptionalBoolean(key: string): boolean | undefined { - return this.readConfigValue( + const value = this.readConfigValue( key, - value => typeof value === 'boolean' || { expected: 'boolean' }, + val => + typeof val === 'boolean' || + typeof val === 'number' || + typeof val === 'string' || { expected: 'boolean' }, ); + if (typeof value === 'boolean' || value === undefined) { + return value; + } + const valueString = String(value).trim(); + + if (/^(?:y|yes|true|1|on)$/i.test(valueString)) { + return true; + } + if (/^(?:n|no|false|0|off)$/i.test(valueString)) { + return false; + } + throw new Error(errors.convert(this.fullKey(key), this.context, 'boolean')); } /** {@inheritdoc Config.getString} */ diff --git a/packages/core-app-api/CHANGELOG.md b/packages/core-app-api/CHANGELOG.md index 38170f490a..52d6779acf 100644 --- a/packages/core-app-api/CHANGELOG.md +++ b/packages/core-app-api/CHANGELOG.md @@ -1,5 +1,75 @@ # @backstage/core-app-api +## 1.3.0 + +### Minor Changes + +- e0d9c9559a: Added a new `AppRouter` component and `app.createRoot()` method that replaces `app.getRouter()` and `app.getProvider()`, which are now deprecated. The new `AppRouter` component is a drop-in replacement for the old router component, while the new `app.createRoot()` method is used instead of the old provider component. + + An old app setup might look like this: + + ```tsx + const app = createApp(/* ... */); + + const AppProvider = app.getProvider(); + const AppRouter = app.getRouter(); + + const routes = ...; + + const App = () => ( + + + + + {routes} + + + ); + + export default App; + ``` + + With these new APIs, the setup now looks like this: + + ```tsx + import { AppRouter } from '@backstage/core-app-api'; + + const app = createApp(/* ... */); + + const routes = ...; + + export default app.createRoot( + <> + + + + {routes} + + , + ); + ``` + + Note that `app.createRoot()` accepts a React element, rather than a component. + +### Patch Changes + +- d3fea4ae0a: Internal fixes to avoid implicit usage of globals +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries +- b4b5b02315: Tweak feature flag registration so that it happens immediately before the first rendering of the app, rather than just after. +- 6870b43dd1: Fix for the automatic rewriting of base URLs. +- 203271b746: Prevent duplicate feature flag components from rendering in the settings when using components +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. +- 8015ff1258: Tweaked wording to use inclusive terminology +- 653d7912ac: Made `WebStorage` notify its subscribers when `localStorage` values change in other tabs/windows +- 63310e3987: Apps will now rewrite the `app.baseUrl` configuration to match the current `location.origin`. The `backend.baseUrl` will also be rewritten in the same way when the `app.baseUrl` and `backend.baseUrl` have matching origins. This will reduce the need for separate frontend builds for different environments. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/version-bridge@1.0.3 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + ## 1.3.0-next.4 ### Minor Changes diff --git a/packages/core-app-api/package.json b/packages/core-app-api/package.json index 00873e27e7..a5d0756f5f 100644 --- a/packages/core-app-api/package.json +++ b/packages/core-app-api/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core-app-api", "description": "Core app API used by Backstage apps", - "version": "1.3.0-next.4", + "version": "1.3.0", "publishConfig": { "access": "public", "main": "dist/index.esm.js", diff --git a/packages/core-components/CHANGELOG.md b/packages/core-components/CHANGELOG.md index 76038b2b77..48d5b18506 100644 --- a/packages/core-components/CHANGELOG.md +++ b/packages/core-components/CHANGELOG.md @@ -1,5 +1,70 @@ # @backstage/core-components +## 0.12.3-next.0 + +### Patch Changes + +- f2ea446de0: Applied fix from v1.9.1 +- Updated dependencies + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/version-bridge@1.0.3 + +## 0.12.2 + +### Patch Changes + +- Fixing the UPPERCASED links in the sidebar + +## 0.12.1 + +### Patch Changes + +- a236a8830d: Update sidebar icon alignment +- d3fea4ae0a: Internal fixes to avoid implicit usage of globals +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries +- ea4a5be8f3: Create a variable for minimum height and add a prop named 'fit' for determining if the graph height should grow or be contained. +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- d2e3bf6737: Made AlertDisplay not crash on undefined messages +- 64a579a998: Add items prop to SupportButton. This prop can be used to override the items that would otherwise be grabbed from the config. +- 5d3058355d: Add `react/forbid-elements` linter rule for button, suggest MUI `Button` +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. +- 5fb6d5e92e: Updated dependency `@react-hookz/web` to `^19.0.0`. +- 17a8e32f39: Updated dependency `rc-progress` to `3.4.1`. +- 146378c146: Updated dependency `@react-hookz/web` to `^20.0.0`. +- dfc8edf9c5: Internal refactor to avoid usage of deprecated symbols. +- 8015ff1258: Tweaked wording to use inclusive terminology +- 830687539f: Sync components in @backstage/core-components with the Component Design Guidelines +- 1ae86ab5fb: Added an option to allow the `AlertMessage` to be self-closing. This is done with a new `display` property that is set to `transient` on the `AlertMessage` when triggering a message to the `AlertApi`. The length of time that these transient messages stay open for can be set using the `transientTimeoutMs` prop on the `AlertDisplay` in the `App.tsx`. Here is an example: + + ```diff + const App = () => ( + + + + + + {routes} + + + ); + ``` + + The above example will set the transient timeout to 2500ms from the default of 5000ms + +- 16e31e690f: InfoCard - Remove subheader container when there is not a subheader or icon +- a5a2d12298: Added option to pass additional headers to ``, which are passed along with the request to the underlying provider +- 91bba69ef8: Internal refactor to remove deprecated symbols. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/version-bridge@1.0.3 + - @backstage/errors@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + ## 0.12.1-next.4 ### Patch Changes diff --git a/packages/core-components/package.json b/packages/core-components/package.json index 39f5bb31ad..cca96ffe23 100644 --- a/packages/core-components/package.json +++ b/packages/core-components/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core-components", "description": "Core components used by Backstage plugins and apps", - "version": "0.12.1-next.4", + "version": "0.12.3-next.0", "publishConfig": { "access": "public", "main": "dist/index.esm.js", diff --git a/packages/core-components/src/layout/Sidebar/Bar.tsx b/packages/core-components/src/layout/Sidebar/Bar.tsx index 69b77dd5e1..95ed88b1ec 100644 --- a/packages/core-components/src/layout/Sidebar/Bar.tsx +++ b/packages/core-components/src/layout/Sidebar/Bar.tsx @@ -63,6 +63,9 @@ const useStyles = makeStyles( '&::-webkit-scrollbar': { display: 'none', }, + '& .MuiButtonBase-root': { + textTransform: 'none', + }, }), drawerOpen: props => ({ width: props.sidebarConfig.drawerWidthOpen, diff --git a/packages/core-plugin-api/CHANGELOG.md b/packages/core-plugin-api/CHANGELOG.md index 23b5e6970c..4f8ff07e31 100644 --- a/packages/core-plugin-api/CHANGELOG.md +++ b/packages/core-plugin-api/CHANGELOG.md @@ -1,5 +1,37 @@ # @backstage/core-plugin-api +## 1.2.0 + +### Minor Changes + +- 9a1864976a: Added a new `display` property to the `AlertMessage` which can accept the values `permanent` or `transient`. + + Here's a rough example of how to trigger an alert using the new `display` property: + + ```ts + import { alertApiRef, useApi } from '@backstage/core-plugin-api'; + + const ExampleTransient = () => { + const alertApi = useApi(alertApiRef); + alertApi.post({ + message: 'Example of Transient Alert', + severity: 'success', + display: 'transient', + }); + }; + ``` + +### Patch Changes + +- d56127c712: useRouteRef - Limit re-resolving to location pathname changes only +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. +- Updated dependencies + - @backstage/version-bridge@1.0.3 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + ## 1.2.0-next.2 ### Minor Changes diff --git a/packages/core-plugin-api/package.json b/packages/core-plugin-api/package.json index 4997530b77..f33d194214 100644 --- a/packages/core-plugin-api/package.json +++ b/packages/core-plugin-api/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core-plugin-api", "description": "Core API used by Backstage plugins", - "version": "1.2.0-next.2", + "version": "1.2.0", "publishConfig": { "access": "public", "main": "dist/index.esm.js", diff --git a/packages/core-plugin-api/src/routing/useRouteRef.test.tsx b/packages/core-plugin-api/src/routing/useRouteRef.test.tsx index 62f6d6da42..618f40d281 100644 --- a/packages/core-plugin-api/src/routing/useRouteRef.test.tsx +++ b/packages/core-plugin-api/src/routing/useRouteRef.test.tsx @@ -16,10 +16,11 @@ import { renderHook } from '@testing-library/react-hooks'; import React from 'react'; -import { MemoryRouter } from 'react-router-dom'; +import { MemoryRouter, Router } from 'react-router-dom'; import { createVersionedContextForTesting } from '@backstage/version-bridge'; import { useRouteRef } from './useRouteRef'; import { createRouteRef } from './RouteRef'; +import { createBrowserHistory } from 'history'; describe('v1 consumer', () => { const context = createVersionedContextForTesting('routing-context'); @@ -49,4 +50,108 @@ describe('v1 consumer', () => { }), ); }); + + it('re-resolves the routeFunc when the search parameters change', () => { + const resolve = jest.fn(() => () => '/hello'); + context.set({ 1: { resolve } }); + + const routeRef = createRouteRef({ id: 'ref1' }); + const history = createBrowserHistory(); + history.push('/my-page'); + + const { rerender } = renderHook(() => useRouteRef(routeRef), { + wrapper: ({ children }) => ( + + ), + }); + + expect(resolve).toHaveBeenCalledTimes(1); + + history.push('/my-new-page'); + rerender(); + + expect(resolve).toHaveBeenCalledTimes(2); + }); + + it('does not re-resolve the routeFunc the location pathname does not change', () => { + const resolve = jest.fn(() => () => '/hello'); + context.set({ 1: { resolve } }); + + const routeRef = createRouteRef({ id: 'ref1' }); + const history = createBrowserHistory(); + history.push('/my-page'); + + const { rerender } = renderHook(() => useRouteRef(routeRef), { + wrapper: ({ children }) => ( + + ), + }); + + expect(resolve).toHaveBeenCalledTimes(1); + + history.push('/my-page'); + rerender(); + + expect(resolve).toHaveBeenCalledTimes(1); + }); + + it('does not re-resolve the routeFunc when the search parameter changes', () => { + const resolve = jest.fn(() => () => '/hello'); + context.set({ 1: { resolve } }); + + const routeRef = createRouteRef({ id: 'ref1' }); + const history = createBrowserHistory(); + history.push('/my-page'); + + const { rerender } = renderHook(() => useRouteRef(routeRef), { + wrapper: ({ children }) => ( + + ), + }); + + expect(resolve).toHaveBeenCalledTimes(1); + + history.push('/my-page?foo=bar'); + rerender(); + + expect(resolve).toHaveBeenCalledTimes(1); + }); + + it('does not re-resolve the routeFunc when the hash parameter changes', () => { + const resolve = jest.fn(() => () => '/hello'); + context.set({ 1: { resolve } }); + + const routeRef = createRouteRef({ id: 'ref1' }); + const history = createBrowserHistory(); + history.push('/my-page'); + + const { rerender } = renderHook(() => useRouteRef(routeRef), { + wrapper: ({ children }) => ( + + ), + }); + + expect(resolve).toHaveBeenCalledTimes(1); + + history.push('/my-page#foo'); + rerender(); + + expect(resolve).toHaveBeenCalledTimes(1); + }); }); diff --git a/packages/core-plugin-api/src/routing/useRouteRef.tsx b/packages/core-plugin-api/src/routing/useRouteRef.tsx index 563bb2035c..cf292b110f 100644 --- a/packages/core-plugin-api/src/routing/useRouteRef.tsx +++ b/packages/core-plugin-api/src/routing/useRouteRef.tsx @@ -85,7 +85,7 @@ export function useRouteRef( | SubRouteRef | ExternalRouteRef, ): RouteFunc | undefined { - const sourceLocation = useLocation(); + const { pathname } = useLocation(); const versionedContext = useVersionedContext<{ 1: RouteResolver }>( 'routing-context', ); @@ -95,8 +95,8 @@ export function useRouteRef( const resolver = versionedContext.atVersion(1); const routeFunc = useMemo( - () => resolver && resolver.resolve(routeRef, sourceLocation), - [resolver, routeRef, sourceLocation], + () => resolver && resolver.resolve(routeRef, { pathname }), + [resolver, routeRef, pathname], ); if (!versionedContext) { diff --git a/packages/create-app/CHANGELOG.md b/packages/create-app/CHANGELOG.md index 280ffc3f6a..aea6266535 100644 --- a/packages/create-app/CHANGELOG.md +++ b/packages/create-app/CHANGELOG.md @@ -1,5 +1,76 @@ # @backstage/create-app +## 0.4.36-next.0 + +### Patch Changes + +- Bumped create-app version. +- Updated dependencies + - @backstage/cli-common@0.1.11 + +## 0.4.35 + +### Patch Changes + +- c4788dbb58: Fix dependency ordering in templated packages. +- 83d3167594: Bumped create-app version. +- 2cb6963f9b: Bumped create-app version. +- 6465ab3686: Bumped create-app version. +- af1358bb07: added default project name for CI job compatibility +- 935b66a646: Change step output template examples to use square bracket syntax. +- dfb269fab2: Updated the template to have the `'/test'` proxy endpoint in `app-config.yaml` be commented out by default. +- d9b3753f87: Updated the app template to use the new `AppRouter` component instead of `app.getRouter()`, as well as `app.createRoot()` instead of `app.getProvider()`. + + To apply this change to an existing app, make the following change to `packages/app/src/App.tsx`: + + ```diff + -import { FlatRoutes } from '@backstage/core-app-api'; + +import { AppRouter, FlatRoutes } from '@backstage/core-app-api'; + + ... + + -const AppProvider = app.getProvider(); + -const AppRouter = app.getRouter(); + + ... + + -const App = () => ( + +export default app.createRoot( + - + + <> + + + + {routes} + + - + + , + ); + ``` + + The final export step should end up looking something like this: + + ```tsx + export default app.createRoot( + <> + + + + {routes} + + , + ); + ``` + + Note that `app.createRoot()` accepts a React element, rather than a component. + +- 71e75c0b70: Removed the `react-router` dependency from the app package, using only `react-router-dom` instead. + + This change is just a bit of cleanup and is optional. If you want to apply it to your app, remove the `react-router` dependency from `packages/app/package.json`, and replace any imports from `react-router` with `react-router-dom` instead. + +- Updated dependencies + - @backstage/cli-common@0.1.11 + ## 0.4.35-next.4 ### Patch Changes diff --git a/packages/create-app/package.json b/packages/create-app/package.json index c6f07cabf8..35d77aa4cb 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/create-app", "description": "A CLI that helps you create your own Backstage app", - "version": "0.4.35-next.4", + "version": "0.4.36-next.0", "publishConfig": { "access": "public" }, diff --git a/packages/create-app/src/createApp.test.ts b/packages/create-app/src/createApp.test.ts index f4c94d337a..f455efa6e6 100644 --- a/packages/create-app/src/createApp.test.ts +++ b/packages/create-app/src/createApp.test.ts @@ -42,7 +42,7 @@ const moveAppMock = jest.spyOn(tasks, 'moveAppTask'); const buildAppMock = jest.spyOn(tasks, 'buildAppTask'); describe('command entrypoint', () => { - beforeAll(() => { + beforeEach(() => { mockFs({ [`${__dirname}/package.json`]: '', // required by `findPaths(__dirname)` 'templates/': mockFs.load(path.resolve(__dirname, '../templates/')), diff --git a/packages/create-app/src/lib/tasks.test.ts b/packages/create-app/src/lib/tasks.test.ts index 8dc351ac97..2894f1ffe9 100644 --- a/packages/create-app/src/lib/tasks.test.ts +++ b/packages/create-app/src/lib/tasks.test.ts @@ -284,7 +284,7 @@ describe('tasks', () => { }); describe('readGitConfig', () => { - const tmpDir = resolvePath(os.tmpdir(), 'git-temp-dir'); + const tmpDirPrefix = resolvePath(os.tmpdir(), 'git-temp-dir-'); it('should return git config if git package is installed and git credentials are set', async () => { mockExec.mockImplementation((_command, _options, callback) => { @@ -299,17 +299,17 @@ describe('tasks', () => { expect(mockExec).toHaveBeenCalledTimes(3); expect(mockExec).toHaveBeenCalledWith( 'git init', - { cwd: tmpDir }, + { cwd: expect.stringContaining(tmpDirPrefix) }, expect.any(Function), ); expect(mockExec).toHaveBeenCalledWith( 'git commit --allow-empty -m "Initial commit"', - { cwd: tmpDir }, + { cwd: expect.stringContaining(tmpDirPrefix) }, expect.any(Function), ); expect(mockExec).toHaveBeenCalledWith( 'git branch --format="%(refname:short)"', - { cwd: tmpDir }, + { cwd: expect.stringContaining(tmpDirPrefix) }, expect.any(Function), ); }); diff --git a/packages/create-app/src/lib/tasks.ts b/packages/create-app/src/lib/tasks.ts index ff519912a8..23017c8ec7 100644 --- a/packages/create-app/src/lib/tasks.ts +++ b/packages/create-app/src/lib/tasks.ts @@ -248,11 +248,9 @@ export async function moveAppTask( * @throws if `exec` fails */ export async function readGitConfig(): Promise { - const tempDir = resolvePath(os.tmpdir(), 'git-temp-dir'); + const tempDir = await fs.mkdtemp(resolvePath(os.tmpdir(), 'git-temp-dir-')); try { - await fs.mkdir(tempDir); - await exec('git init', { cwd: tempDir }); await exec('git commit --allow-empty -m "Initial commit"', { cwd: tempDir, diff --git a/packages/create-app/templates/default-app/package.json.hbs b/packages/create-app/templates/default-app/package.json.hbs index 05c2436933..734de5c6e4 100644 --- a/packages/create-app/templates/default-app/package.json.hbs +++ b/packages/create-app/templates/default-app/package.json.hbs @@ -20,7 +20,6 @@ "lint": "backstage-cli repo lint --since origin/{{defaultBranch}}", "lint:all": "backstage-cli repo lint", "prettier:check": "prettier --check .", - "create-plugin": "backstage-cli create-plugin --scope internal", "new": "backstage-cli new --scope internal" }, "workspaces": { diff --git a/packages/dev-utils/CHANGELOG.md b/packages/dev-utils/CHANGELOG.md index 65294a8ebb..2450e277b0 100644 --- a/packages/dev-utils/CHANGELOG.md +++ b/packages/dev-utils/CHANGELOG.md @@ -1,5 +1,49 @@ # @backstage/dev-utils +## 1.0.11-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/app-defaults@1.0.11-next.0 + - @backstage/core-app-api@1.3.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/integration-react@1.1.9-next.0 + - @backstage/test-utils@1.2.3 + - @backstage/theme@0.2.16 + +## 1.0.10 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/app-defaults@1.0.10 + - @backstage/integration-react@1.1.8 + - @backstage/plugin-catalog-react@1.2.3 + +## 1.0.9 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. +- 8015ff1258: Tweaked wording to use inclusive terminology +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/core-app-api@1.3.0 + - @backstage/test-utils@1.2.3 + - @backstage/app-defaults@1.0.9 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/integration-react@1.1.7 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 1.0.9-next.4 ### Patch Changes diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index 8a309b1403..db1c035df0 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/dev-utils", "description": "Utilities for developing Backstage plugins.", - "version": "1.0.9-next.4", + "version": "1.0.11-next.0", "publishConfig": { "access": "public", "main": "dist/index.esm.js", diff --git a/packages/errors/CHANGELOG.md b/packages/errors/CHANGELOG.md index 5a46b58378..e7803e2fb4 100644 --- a/packages/errors/CHANGELOG.md +++ b/packages/errors/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/errors +## 1.1.4 + +### Patch Changes + +- ac6cc9f7bd: Removed a circular import +- Updated dependencies + - @backstage/types@1.0.2 + ## 1.1.4-next.1 ### Patch Changes diff --git a/packages/errors/package.json b/packages/errors/package.json index 30656c6d41..1b9b865b74 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/errors", "description": "Common utilities for error handling within Backstage", - "version": "1.1.4-next.1", + "version": "1.1.4", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/integration-aws-node/CHANGELOG.md b/packages/integration-aws-node/CHANGELOG.md index 4b70ee97b4..d07b6ab8aa 100644 --- a/packages/integration-aws-node/CHANGELOG.md +++ b/packages/integration-aws-node/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/integration-aws-node +## 0.1.0 + +### Minor Changes + +- 13278732f6: New package for AWS integration node library + +### Patch Changes + +- Updated dependencies + - @backstage/errors@1.1.4 + - @backstage/config@1.0.5 + ## 0.1.0-next.0 ### Minor Changes diff --git a/packages/integration-aws-node/package.json b/packages/integration-aws-node/package.json index 0088f08ba8..a5b0ed08bb 100644 --- a/packages/integration-aws-node/package.json +++ b/packages/integration-aws-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/integration-aws-node", "description": "Helpers for fetching AWS account credentials", - "version": "0.1.0-next.0", + "version": "0.1.0", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/packages/integration-react/CHANGELOG.md b/packages/integration-react/CHANGELOG.md index d071eaa6a4..e4bc723d88 100644 --- a/packages/integration-react/CHANGELOG.md +++ b/packages/integration-react/CHANGELOG.md @@ -1,5 +1,35 @@ # @backstage/integration-react +## 1.1.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/integration@1.4.1 + - @backstage/theme@0.2.16 + +## 1.1.8 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + +## 1.1.7 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/integration@1.4.1 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + ## 1.1.7-next.4 ### Patch Changes diff --git a/packages/integration-react/package.json b/packages/integration-react/package.json index 8beee2abfb..d519c33967 100644 --- a/packages/integration-react/package.json +++ b/packages/integration-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/integration-react", "description": "Frontend package for managing integrations towards external systems", - "version": "1.1.7-next.4", + "version": "1.1.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/integration/CHANGELOG.md b/packages/integration/CHANGELOG.md index 0542c17989..a077352af9 100644 --- a/packages/integration/CHANGELOG.md +++ b/packages/integration/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/integration +## 1.4.1 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 34b039ca9f: Added `integrations.github.apps.allowedInstallationOwners` to the configuration schema. +- Updated dependencies + - @backstage/errors@1.1.4 + - @backstage/config@1.0.5 + ## 1.4.1-next.1 ### Patch Changes diff --git a/packages/integration/package.json b/packages/integration/package.json index bcf6da2d74..b030611b68 100644 --- a/packages/integration/package.json +++ b/packages/integration/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/integration", "description": "Helpers for managing integrations towards external systems", - "version": "1.4.1-next.1", + "version": "1.4.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/release-manifests/CHANGELOG.md b/packages/release-manifests/CHANGELOG.md index e8bb4dfb07..538de23e43 100644 --- a/packages/release-manifests/CHANGELOG.md +++ b/packages/release-manifests/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/release-manifests +## 0.0.8 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. + ## 0.0.8-next.0 ### Patch Changes diff --git a/packages/release-manifests/package.json b/packages/release-manifests/package.json index 2a53438bd2..4abeb9dc6a 100644 --- a/packages/release-manifests/package.json +++ b/packages/release-manifests/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/release-manifests", "description": "Helper library for receiving release manifests", - "version": "0.0.8-next.0", + "version": "0.0.8", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/packages/repo-tools/CHANGELOG.md b/packages/repo-tools/CHANGELOG.md index fd4d1f0f01..24ce98b30e 100644 --- a/packages/repo-tools/CHANGELOG.md +++ b/packages/repo-tools/CHANGELOG.md @@ -1,5 +1,44 @@ # @backstage/repo-tools +## 0.1.1-next.0 + +### Patch Changes + +- c447a5221b: Use the project tsconfig in case of selection all packages +- 93cff3053e: Move some dependencies as `peerDependencies` because we need to always use same version as in `api-extractor` +- 75275b0b0b: Updated dependency `@microsoft/tsdoc-config` to `0.16.2`. +- Updated dependencies + - @backstage/cli-common@0.1.11 + - @backstage/errors@1.1.4 + +## 0.1.0 + +### Minor Changes + +- 99713fd671: Introducing repo-tools package +- 03843259b4: Api reference documentation improvements + + - breadcrumbs links semantics as code spans + - new `@config` annotation to describe related config keys + +### Patch Changes + +- 9b1193f277: declare dependencies +- a8611bcac4: Add new command options to the `api-report` + + - added `--allow-warnings`, `-a` to continue processing packages if selected packages have warnings + - added `--allow-all-warnings` to continue processing packages any packages have warnings + - added `--omit-messages`, `-o` to pass some warnings messages code to be omitted from the api-report.md files + - The `paths` argument for this command now takes as default the value on `workspaces.packages` inside the root package.json + - change the path resolution to use the `@backstage/cli-common` packages instead + +- 25ec5c0c3a: Include asset-types.d.ts while running the api report command +- 71f80eb354: add the command type-deps to the repo tool package. +- ac440299ef: Updated api docs generation to be compatible with Docusaurus 2-alpha and 2.x. +- Updated dependencies + - @backstage/errors@1.1.4 + - @backstage/cli-common@0.1.11 + ## 0.1.0-next.2 ### Patch Changes diff --git a/packages/repo-tools/package.json b/packages/repo-tools/package.json index 595cbf1196..a638496887 100644 --- a/packages/repo-tools/package.json +++ b/packages/repo-tools/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/repo-tools", "description": "CLI for Backstage repo tooling ", - "version": "0.1.0-next.2", + "version": "0.1.1-next.0", "publishConfig": { "access": "public" }, @@ -35,8 +35,6 @@ "@manypkg/get-packages": "^1.1.3", "@microsoft/api-documenter": "^7.17.11", "@microsoft/api-extractor": "^7.23.0", - "@microsoft/api-extractor-model": "^7.17.2", - "@microsoft/tsdoc": "0.14.1", "chalk": "^4.0.0", "commander": "^9.1.0", "fs-extra": "10.1.0", @@ -51,6 +49,19 @@ "@types/mock-fs": "^4.13.0", "mock-fs": "^5.1.0" }, + "peerDependencies": { + "@microsoft/api-extractor-model": "*", + "@microsoft/tsdoc": "*", + "@microsoft/tsdoc-config": "*", + "@rushstack/node-core-library": "*", + "prettier": "^2.8.1", + "typescript": "> 3.0.0" + }, + "peerDependenciesMeta": { + "prettier": { + "optional": true + } + }, "files": [ "bin", "dist/**/*.js" diff --git a/packages/repo-tools/src/commands/api-reports/api-extractor.ts b/packages/repo-tools/src/commands/api-reports/api-extractor.ts index 5ec0804ee8..9e844d97c8 100644 --- a/packages/repo-tools/src/commands/api-reports/api-extractor.ts +++ b/packages/repo-tools/src/commands/api-reports/api-extractor.ts @@ -14,8 +14,6 @@ * limitations under the License. */ -/* eslint-disable import/no-extraneous-dependencies */ -/* eslint-disable no-restricted-imports */ import { resolve as resolvePath, relative as relativePath, @@ -24,7 +22,7 @@ import { join, } from 'path'; import { execFile } from 'child_process'; -import prettier from 'prettier'; +import type prettierType from 'prettier'; import fs from 'fs-extra'; import { Extractor, @@ -213,10 +211,19 @@ ApiReportGenerator.generateReviewFileContent = collector, ...moreArgs, ); - return prettier.format(content, { - ...require('@spotify/prettier-config'), - parser: 'markdown', - }); + + try { + const prettier = require('prettier') as typeof prettierType; + + const config = prettier.resolveConfig.sync(cliPaths.targetRoot) ?? {}; + return prettier.format(content, { + ...config, + parser: 'markdown', + }); + } catch (e) { + // console.warn('Failed to format API report with prettier', e); + return content; + } }; export async function createTemporaryTsConfig(includedPackageDirs: string[]) { diff --git a/packages/repo-tools/src/commands/api-reports/api-reports.test.ts b/packages/repo-tools/src/commands/api-reports/api-reports.test.ts index 7121d8a06f..a5a8635b7f 100644 --- a/packages/repo-tools/src/commands/api-reports/api-reports.test.ts +++ b/packages/repo-tools/src/commands/api-reports/api-reports.test.ts @@ -15,7 +15,7 @@ */ import mockFs from 'mock-fs'; -import { resolve as resolvePath } from 'path'; +import { normalize, resolve as resolvePath } from 'path'; import * as pathsLib from '../../lib/paths'; import { @@ -46,9 +46,11 @@ jest.mock('./api-extractor', () => ({ const projectPaths = pathsLib.paths; -jest.spyOn(projectPaths, 'targetRoot', 'get').mockReturnValue('/root'); +jest + .spyOn(projectPaths, 'targetRoot', 'get') + .mockReturnValue(normalize('/root')); jest.spyOn(projectPaths, 'resolveTargetRoot').mockImplementation((...path) => { - return resolvePath('/root', ...path); + return resolvePath(normalize('/root'), ...path); }); describe('buildApiReports', () => { @@ -87,43 +89,43 @@ describe('buildApiReports', () => { mockFs.restore(); jest.clearAllMocks(); }); - it('should run whitout any options', async () => { + + it('should run without any options', async () => { const opts = {}; const paths: string[] = []; await buildApiReports(paths, opts); expect(categorizePackageDirs).toHaveBeenCalledWith([ - 'packages/package-a', - 'packages/package-b', - 'plugins/plugin-a', - 'plugins/plugin-b', - 'plugins/plugin-c', + normalize('packages/package-a'), + normalize('packages/package-b'), + normalize('plugins/plugin-a'), + normalize('plugins/plugin-b'), + normalize('plugins/plugin-c'), ]); expect(generateTypeDeclarations).not.toHaveBeenCalled(); expect(runApiExtraction).toHaveBeenCalledWith({ packageDirs: [ - 'packages/package-a', - 'packages/package-b', - 'plugins/plugin-a', - 'plugins/plugin-b', - 'plugins/plugin-c', + normalize('packages/package-a'), + normalize('packages/package-b'), + normalize('plugins/plugin-a'), + normalize('plugins/plugin-b'), + normalize('plugins/plugin-c'), ], - tsconfigFilePath: '/root/tsconfig.json', + tsconfigFilePath: resolvePath('/root/tsconfig.json'), allowWarnings: [], omitMessages: [], isLocalBuild: true, - outputDir: '/root/node_modules/.cache/api-extractor', + outputDir: resolvePath('/root/node_modules/.cache/api-extractor'), }); expect(runCliExtraction).toHaveBeenCalledWith({ packageDirs: [ - 'packages/package-a', - 'packages/package-b', - 'plugins/plugin-a', - 'plugins/plugin-b', - - 'plugins/plugin-c', + normalize('packages/package-a'), + normalize('packages/package-b'), + normalize('plugins/plugin-a'), + normalize('plugins/plugin-b'), + normalize('plugins/plugin-c'), ], isLocalBuild: true, }); @@ -139,19 +141,19 @@ describe('buildApiReports', () => { await buildApiReports(paths, opts); expect(categorizePackageDirs).toHaveBeenCalledWith([ - 'packages/package-a', + normalize('packages/package-a'), ]); expect(runApiExtraction).toHaveBeenCalledWith({ - packageDirs: ['packages/package-a'], - tsconfigFilePath: '/root/tsconfig.json', + packageDirs: [normalize('packages/package-a')], + tsconfigFilePath: resolvePath('/root/tsconfig.json'), allowWarnings: [], omitMessages: [], isLocalBuild: true, - outputDir: '/root/node_modules/.cache/api-extractor', + outputDir: resolvePath('/root/node_modules/.cache/api-extractor'), }); expect(runCliExtraction).toHaveBeenCalledWith({ - packageDirs: ['packages/package-a'], + packageDirs: [normalize('packages/package-a')], isLocalBuild: true, }); @@ -164,20 +166,26 @@ describe('buildApiReports', () => { await buildApiReports(paths, opts); expect(categorizePackageDirs).toHaveBeenCalledWith([ - 'packages/package-a', - 'packages/package-b', + normalize('packages/package-a'), + normalize('packages/package-b'), ]); expect(runApiExtraction).toHaveBeenCalledWith({ - packageDirs: ['packages/package-a', 'packages/package-b'], - tsconfigFilePath: '/root/tsconfig.json', + packageDirs: [ + normalize('packages/package-a'), + normalize('packages/package-b'), + ], + tsconfigFilePath: resolvePath('/root/tsconfig.json'), allowWarnings: [], omitMessages: [], isLocalBuild: true, - outputDir: '/root/node_modules/.cache/api-extractor', + outputDir: resolvePath('/root/node_modules/.cache/api-extractor'), }); expect(runCliExtraction).toHaveBeenCalledWith({ - packageDirs: ['packages/package-a', 'packages/package-b'], + packageDirs: [ + normalize('packages/package-a'), + normalize('packages/package-b'), + ], isLocalBuild: true, }); @@ -190,20 +198,26 @@ describe('buildApiReports', () => { await buildApiReports(paths, opts); expect(categorizePackageDirs).toHaveBeenCalledWith([ - 'packages/package-a', - 'packages/package-b', + normalize('packages/package-a'), + normalize('packages/package-b'), ]); expect(runApiExtraction).toHaveBeenCalledWith({ - packageDirs: ['packages/package-a', 'packages/package-b'], - tsconfigFilePath: '/root/tsconfig.json', + packageDirs: [ + normalize('packages/package-a'), + normalize('packages/package-b'), + ], + tsconfigFilePath: resolvePath('/root/tsconfig.json'), allowWarnings: [], omitMessages: [], isLocalBuild: true, - outputDir: '/root/node_modules/.cache/api-extractor', + outputDir: resolvePath('/root/node_modules/.cache/api-extractor'), }); expect(runCliExtraction).toHaveBeenCalledWith({ - packageDirs: ['packages/package-a', 'packages/package-b'], + packageDirs: [ + normalize('packages/package-a'), + normalize('packages/package-b'), + ], isLocalBuild: true, }); @@ -217,28 +231,28 @@ describe('buildApiReports', () => { await buildApiReports(paths, opts); expect(categorizePackageDirs).toHaveBeenCalledWith([ - 'packages/package-a', - 'packages/package-b', - 'plugins/plugin-a', + normalize('packages/package-a'), + normalize('packages/package-b'), + normalize('plugins/plugin-a'), ]); expect(runApiExtraction).toHaveBeenCalledWith({ packageDirs: [ - 'packages/package-a', - 'packages/package-b', - 'plugins/plugin-a', + normalize('packages/package-a'), + normalize('packages/package-b'), + normalize('plugins/plugin-a'), ], - tsconfigFilePath: '/root/tsconfig.json', + tsconfigFilePath: resolvePath('/root/tsconfig.json'), allowWarnings: [], omitMessages: [], isLocalBuild: true, - outputDir: '/root/node_modules/.cache/api-extractor', + outputDir: resolvePath('/root/node_modules/.cache/api-extractor'), }); expect(runCliExtraction).toHaveBeenCalledWith({ packageDirs: [ - 'packages/package-a', - 'packages/package-b', - 'plugins/plugin-a', + normalize('packages/package-a'), + normalize('packages/package-b'), + normalize('plugins/plugin-a'), ], isLocalBuild: true, }); @@ -253,31 +267,31 @@ describe('buildApiReports', () => { await buildApiReports(paths, opts); expect(categorizePackageDirs).toHaveBeenCalledWith([ - 'packages/package-a', - 'plugins/plugin-a', - 'plugins/plugin-b', - 'plugins/plugin-c', + normalize('packages/package-a'), + normalize('plugins/plugin-a'), + normalize('plugins/plugin-b'), + normalize('plugins/plugin-c'), ]); expect(runApiExtraction).toHaveBeenCalledWith({ packageDirs: [ - 'packages/package-a', - 'plugins/plugin-a', - 'plugins/plugin-b', - 'plugins/plugin-c', + normalize('packages/package-a'), + normalize('plugins/plugin-a'), + normalize('plugins/plugin-b'), + normalize('plugins/plugin-c'), ], - tsconfigFilePath: '/root/tsconfig.json', + tsconfigFilePath: resolvePath('/root/tsconfig.json'), allowWarnings: [], omitMessages: [], isLocalBuild: true, - outputDir: '/root/node_modules/.cache/api-extractor', + outputDir: resolvePath('/root/node_modules/.cache/api-extractor'), }); expect(runCliExtraction).toHaveBeenCalledWith({ packageDirs: [ - 'packages/package-a', - 'plugins/plugin-a', - 'plugins/plugin-b', - 'plugins/plugin-c', + normalize('packages/package-a'), + normalize('plugins/plugin-a'), + normalize('plugins/plugin-b'), + normalize('plugins/plugin-c'), ], isLocalBuild: true, }); @@ -295,12 +309,15 @@ describe('buildApiReports', () => { await buildApiReports(paths, opts); expect(runApiExtraction).toHaveBeenCalledWith({ - packageDirs: ['packages/package-a', 'packages/package-b'], - tsconfigFilePath: '/root/tsconfig.json', + packageDirs: [ + normalize('packages/package-a'), + normalize('packages/package-b'), + ], + tsconfigFilePath: resolvePath('/root/tsconfig.json'), allowWarnings: ['packages/package-a'], omitMessages: [], isLocalBuild: true, - outputDir: '/root/node_modules/.cache/api-extractor', + outputDir: resolvePath('/root/node_modules/.cache/api-extractor'), }); }); @@ -313,12 +330,15 @@ describe('buildApiReports', () => { await buildApiReports(paths, opts); expect(runApiExtraction).toHaveBeenCalledWith({ - packageDirs: ['packages/package-a', 'packages/package-b'], - tsconfigFilePath: '/root/tsconfig.json', + packageDirs: [ + normalize('packages/package-a'), + normalize('packages/package-b'), + ], + tsconfigFilePath: resolvePath('/root/tsconfig.json'), allowWarnings: ['packages/package-a', 'packages/package-b'], omitMessages: [], isLocalBuild: true, - outputDir: '/root/node_modules/.cache/api-extractor', + outputDir: resolvePath('/root/node_modules/.cache/api-extractor'), }); }); @@ -331,12 +351,15 @@ describe('buildApiReports', () => { await buildApiReports(paths, opts); expect(runApiExtraction).toHaveBeenCalledWith({ - packageDirs: ['packages/package-a', 'packages/package-b'], - tsconfigFilePath: '/root/tsconfig.json', + packageDirs: [ + normalize('packages/package-a'), + normalize('packages/package-b'), + ], + tsconfigFilePath: resolvePath('/root/tsconfig.json'), allowWarnings: ['packages/package-a', 'packages/package-b'], omitMessages: [], isLocalBuild: true, - outputDir: '/root/node_modules/.cache/api-extractor', + outputDir: resolvePath('/root/node_modules/.cache/api-extractor'), }); }); }); @@ -350,12 +373,15 @@ describe('buildApiReports', () => { await buildApiReports(paths, opts); expect(runApiExtraction).toHaveBeenCalledWith({ - packageDirs: ['packages/package-a', 'packages/package-b'], - tsconfigFilePath: '/root/tsconfig.json', + packageDirs: [ + normalize('packages/package-a'), + normalize('packages/package-b'), + ], + tsconfigFilePath: resolvePath('/root/tsconfig.json'), allowWarnings: true, omitMessages: [], isLocalBuild: true, - outputDir: '/root/node_modules/.cache/api-extractor', + outputDir: resolvePath('/root/node_modules/.cache/api-extractor'), }); }); }); @@ -369,12 +395,15 @@ describe('buildApiReports', () => { await buildApiReports(paths, opts); expect(runApiExtraction).toHaveBeenCalledWith({ - packageDirs: ['packages/package-a', 'packages/package-b'], - tsconfigFilePath: '/root/tsconfig.json', + packageDirs: [ + normalize('packages/package-a'), + normalize('packages/package-b'), + ], + tsconfigFilePath: resolvePath('/root/tsconfig.json'), allowWarnings: [], omitMessages: ['ae-missing-release-tag'], isLocalBuild: true, - outputDir: '/root/node_modules/.cache/api-extractor', + outputDir: resolvePath('/root/node_modules/.cache/api-extractor'), }); }); @@ -387,12 +416,15 @@ describe('buildApiReports', () => { await buildApiReports(paths, opts); expect(runApiExtraction).toHaveBeenCalledWith({ - packageDirs: ['packages/package-a', 'packages/package-b'], - tsconfigFilePath: '/root/tsconfig.json', + packageDirs: [ + normalize('packages/package-a'), + normalize('packages/package-b'), + ], + tsconfigFilePath: resolvePath('/root/tsconfig.json'), allowWarnings: [], omitMessages: ['ae-missing-release-tag', 'ae-missing-annotations'], isLocalBuild: true, - outputDir: '/root/node_modules/.cache/api-extractor', + outputDir: resolvePath('/root/node_modules/.cache/api-extractor'), }); }); @@ -405,12 +437,15 @@ describe('buildApiReports', () => { await buildApiReports(paths, opts); expect(runApiExtraction).toHaveBeenCalledWith({ - packageDirs: ['packages/package-a', 'packages/package-b'], - tsconfigFilePath: '/root/tsconfig.json', + packageDirs: [ + normalize('packages/package-a'), + normalize('packages/package-b'), + ], + tsconfigFilePath: resolvePath('/root/tsconfig.json'), allowWarnings: [], omitMessages: ['ae-missing-release-tag', 'ae-missing-annotations'], isLocalBuild: true, - outputDir: '/root/node_modules/.cache/api-extractor', + outputDir: resolvePath('/root/node_modules/.cache/api-extractor'), }); }); }); @@ -424,15 +459,21 @@ describe('buildApiReports', () => { await buildApiReports(paths, opts); expect(runApiExtraction).toHaveBeenCalledWith({ - packageDirs: ['packages/package-a', 'packages/package-b'], - tsconfigFilePath: '/root/tsconfig.json', + packageDirs: [ + normalize('packages/package-a'), + normalize('packages/package-b'), + ], + tsconfigFilePath: resolvePath('/root/tsconfig.json'), allowWarnings: [], omitMessages: [], isLocalBuild: false, - outputDir: '/root/node_modules/.cache/api-extractor', + outputDir: resolvePath('/root/node_modules/.cache/api-extractor'), }); expect(runCliExtraction).toHaveBeenCalledWith({ - packageDirs: ['packages/package-a', 'packages/package-b'], + packageDirs: [ + normalize('packages/package-a'), + normalize('packages/package-b'), + ], isLocalBuild: false, }); }); @@ -447,8 +488,8 @@ describe('buildApiReports', () => { await buildApiReports(paths, opts); expect(buildDocs).toHaveBeenCalledWith({ - inputDir: '/root/node_modules/.cache/api-extractor', - outputDir: '/root/docs/reference', + inputDir: resolvePath('/root/node_modules/.cache/api-extractor'), + outputDir: resolvePath('/root/docs/reference'), }); }); }); diff --git a/packages/repo-tools/src/commands/api-reports/api-reports.ts b/packages/repo-tools/src/commands/api-reports/api-reports.ts index 6270072912..66436644d2 100644 --- a/packages/repo-tools/src/commands/api-reports/api-reports.ts +++ b/packages/repo-tools/src/commands/api-reports/api-reports.ts @@ -66,7 +66,7 @@ export const buildApiReports = async (paths: string[] = [], opts: Options) => { } let temporaryTsConfigPath: string | undefined; - if (selectedPackageDirs) { + if (!isAllPackages) { temporaryTsConfigPath = await createTemporaryTsConfig(selectedPackageDirs); } const tsconfigFilePath = diff --git a/packages/repo-tools/src/lib/paths.test.ts b/packages/repo-tools/src/lib/paths.test.ts index c642900612..601ba636c3 100644 --- a/packages/repo-tools/src/lib/paths.test.ts +++ b/packages/repo-tools/src/lib/paths.test.ts @@ -15,13 +15,13 @@ */ import mockFs from 'mock-fs'; -import { resolve as resolvePath } from 'path'; +import { resolve as resolvePath, join as joinPath, normalize } from 'path'; import { resolvePackagePath, paths, findPackageDirs } from './paths'; describe('paths', () => { - jest.spyOn(paths, 'targetRoot', 'get').mockReturnValue('/root'); + jest.spyOn(paths, 'targetRoot', 'get').mockReturnValue(normalize('/root')); jest.spyOn(paths, 'resolveTargetRoot').mockImplementation((...path) => { - return resolvePath('/root', ...path); + return resolvePath(normalize('/root'), ...path); }); beforeEach(() => { @@ -61,15 +61,15 @@ describe('paths', () => { }); it('should return the path to the package if it exists and has a package.json', async () => { expect(await resolvePackagePath('packages/package-a')).toBe( - 'packages/package-a', + joinPath('packages', 'package-a'), ); expect(await resolvePackagePath('packages/package-b')).toBe( - 'packages/package-b', + joinPath('packages', 'package-b'), ); }); it('should work with absolute paths', async () => { expect(await resolvePackagePath('/root/packages/package-a')).toBe( - 'packages/package-a', + joinPath('packages', 'package-a'), ); }); it('should return undefined if the pat is not a directory', async () => { @@ -79,19 +79,19 @@ describe('paths', () => { describe('findPackageDirs', () => { it('should return only the given packages', async () => { expect(await findPackageDirs(['packages/package-a'])).toEqual([ - 'packages/package-a', + joinPath('packages', 'package-a'), ]); }); it('should return only the given packages when using glob patterns', async () => { expect(await findPackageDirs(['packages/*'])).toEqual([ - 'packages/package-a', - 'packages/package-b', + joinPath('packages', 'package-a'), + joinPath('packages', 'package-b'), ]); expect(await findPackageDirs(['packages/*', 'plugins/*'])).toEqual([ - 'packages/package-a', - 'packages/package-b', - 'plugins/plugin-a', - 'plugins/plugin-b', + joinPath('packages', 'package-a'), + joinPath('packages', 'package-b'), + joinPath('plugins', 'plugin-a'), + joinPath('plugins', 'plugin-b'), ]); }); it('should return only the given packages when using absolute paths', async () => { @@ -100,15 +100,18 @@ describe('paths', () => { '/root/packages/package-a', '/root/plugins/plugin-b', ]), - ).toEqual(['packages/package-a', 'plugins/plugin-b']); + ).toEqual([ + joinPath('packages', 'package-a'), + joinPath('plugins', 'plugin-b'), + ]); }); it('should return only the given packages when using absolute paths with glob patterns', async () => { expect( await findPackageDirs(['/root/packages/*', '/root/plugins/*-a']), ).toEqual([ - 'packages/package-a', - 'packages/package-b', - 'plugins/plugin-a', + joinPath('packages', 'package-a'), + joinPath('packages', 'package-b'), + joinPath('plugins', 'plugin-a'), ]); }); }); diff --git a/packages/repo-tools/src/lib/paths.ts b/packages/repo-tools/src/lib/paths.ts index 874bb48ea1..01a5d92db1 100644 --- a/packages/repo-tools/src/lib/paths.ts +++ b/packages/repo-tools/src/lib/paths.ts @@ -52,10 +52,10 @@ export async function resolvePackagePath( export async function findPackageDirs(selectedPaths: string[] = []) { const packageDirs = new Array(); for (const packageRoot of selectedPaths) { - const fullPath = paths.resolveTargetRoot(packageRoot); - // if the path contain any glob notation we resolve all the paths to process one by one - const dirs = isGlob(fullPath) ? await glob(fullPath) : [fullPath]; + const dirs = isGlob(packageRoot) + ? await glob(packageRoot, { cwd: paths.targetRoot }) + : [packageRoot]; for (const dir of dirs) { const packageDir = await resolvePackagePath(dir); if (!packageDir) { diff --git a/packages/techdocs-cli-embedded-app/CHANGELOG.md b/packages/techdocs-cli-embedded-app/CHANGELOG.md index 5eddfdb4af..d9189d184b 100644 --- a/packages/techdocs-cli-embedded-app/CHANGELOG.md +++ b/packages/techdocs-cli-embedded-app/CHANGELOG.md @@ -1,5 +1,56 @@ # techdocs-cli-embedded-app +## 0.2.78-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.22.1-next.0 + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/plugin-techdocs-react@1.1.2-next.0 + - @backstage/plugin-techdocs@1.4.3-next.0 + - @backstage/app-defaults@1.0.11-next.0 + - @backstage/config@1.0.5 + - @backstage/core-app-api@1.3.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/integration-react@1.1.9-next.0 + - @backstage/test-utils@1.2.3 + - @backstage/theme@0.2.16 + - @backstage/plugin-catalog@1.7.2-next.0 + +## 0.2.78 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/app-defaults@1.0.10 + - @backstage/cli@0.22.0 + - @backstage/integration-react@1.1.8 + - @backstage/plugin-catalog@1.7.1 + - @backstage/plugin-techdocs@1.4.2 + - @backstage/plugin-techdocs-react@1.1.1 + +## 0.2.77 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-techdocs-react@1.1.0 + - @backstage/plugin-catalog@1.7.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/cli@0.22.0 + - @backstage/core-app-api@1.3.0 + - @backstage/plugin-techdocs@1.4.1 + - @backstage/test-utils@1.2.3 + - @backstage/app-defaults@1.0.9 + - @backstage/integration-react@1.1.7 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + ## 0.2.77-next.4 ### Patch Changes diff --git a/packages/techdocs-cli-embedded-app/package.json b/packages/techdocs-cli-embedded-app/package.json index b30faba062..8fe18bb628 100644 --- a/packages/techdocs-cli-embedded-app/package.json +++ b/packages/techdocs-cli-embedded-app/package.json @@ -1,6 +1,6 @@ { "name": "techdocs-cli-embedded-app", - "version": "0.2.77-next.4", + "version": "0.2.78-next.0", "private": true, "backstage": { "role": "frontend" diff --git a/packages/techdocs-cli/CHANGELOG.md b/packages/techdocs-cli/CHANGELOG.md index f3661fdcb3..06f782756e 100644 --- a/packages/techdocs-cli/CHANGELOG.md +++ b/packages/techdocs-cli/CHANGELOG.md @@ -1,5 +1,28 @@ # @techdocs/cli +## 1.2.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/cli-common@0.1.11 + - @backstage/config@1.0.5 + - @backstage/plugin-techdocs-node@1.4.4-next.0 + +## 1.2.4 + +### Patch Changes + +- 8015ff1258: Tweaked wording to use inclusive terminology +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/plugin-techdocs-node@1.4.3 + - @backstage/cli-common@0.1.11 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + ## 1.2.4-next.3 ### Patch Changes diff --git a/packages/techdocs-cli/package.json b/packages/techdocs-cli/package.json index 59a5f229c1..5333ea3c4c 100644 --- a/packages/techdocs-cli/package.json +++ b/packages/techdocs-cli/package.json @@ -1,7 +1,7 @@ { "name": "@techdocs/cli", "description": "Utility CLI for managing TechDocs sites in Backstage.", - "version": "1.2.4-next.3", + "version": "1.2.5-next.0", "publishConfig": { "access": "public" }, diff --git a/packages/test-utils/CHANGELOG.md b/packages/test-utils/CHANGELOG.md index b1d10ceba5..50d9f2fda6 100644 --- a/packages/test-utils/CHANGELOG.md +++ b/packages/test-utils/CHANGELOG.md @@ -1,5 +1,25 @@ # @backstage/test-utils +## 1.2.3 + +### Patch Changes + +- 5e238ed56a: The test utility for the plugin context called `MockPluginProvider` has been created. It will be handy in the cases when you use + `__experimentalConfigure` in your plugin. It is experimental and exported through `@backstage/test-utils/alpha`. +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. +- 830687539f: Sync components in @backstage/core-components with the Component Design Guidelines +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-app-api@1.3.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-react@0.4.8 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + ## 1.2.3-next.4 ### Patch Changes diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 5772a52a79..971b7f969d 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/test-utils", "description": "Utilities to test Backstage plugins and apps.", - "version": "1.2.3-next.4", + "version": "1.2.3", "publishConfig": { "access": "public", "main": "dist/index.esm.js", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index e0f1f56fa4..c3ef194c2e 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/types +## 1.0.2 + +### Patch Changes + +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. + ## 1.0.2-next.1 ### Patch Changes diff --git a/packages/types/package.json b/packages/types/package.json index fba7a644df..72de304aea 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/types", "description": "Common TypeScript types used within Backstage", - "version": "1.0.2-next.1", + "version": "1.0.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/version-bridge/CHANGELOG.md b/packages/version-bridge/CHANGELOG.md index fd5ac8500d..e495787986 100644 --- a/packages/version-bridge/CHANGELOG.md +++ b/packages/version-bridge/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/version-bridge +## 1.0.3 + +### Patch Changes + +- d3fea4ae0a: Internal fixes to avoid implicit usage of globals + ## 1.0.3-next.0 ### Patch Changes diff --git a/packages/version-bridge/package.json b/packages/version-bridge/package.json index dbb4d69d4f..d57e6e2b45 100644 --- a/packages/version-bridge/package.json +++ b/packages/version-bridge/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/version-bridge", "description": "Utilities used by @backstage packages to support multiple concurrent versions", - "version": "1.0.3-next.0", + "version": "1.0.3", "publishConfig": { "access": "public", "main": "dist/index.esm.js", diff --git a/plugins/adr-backend/CHANGELOG.md b/plugins/adr-backend/CHANGELOG.md index 9362a2b186..9a8bba28a5 100644 --- a/plugins/adr-backend/CHANGELOG.md +++ b/plugins/adr-backend/CHANGELOG.md @@ -1,5 +1,34 @@ # @backstage/plugin-adr-backend +## 0.2.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/plugin-adr-common@0.2.5-next.0 + - @backstage/plugin-search-common@1.2.0 + +## 0.2.4 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/plugin-search-common@1.2.0 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/plugin-adr-common@0.2.4 + ## 0.2.4-next.3 ### Patch Changes diff --git a/plugins/adr-backend/package.json b/plugins/adr-backend/package.json index 66886415f3..b5ce10db01 100644 --- a/plugins/adr-backend/package.json +++ b/plugins/adr-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-adr-backend", - "version": "0.2.4-next.3", + "version": "0.2.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/adr-common/CHANGELOG.md b/plugins/adr-common/CHANGELOG.md index f86a76b60f..968165e590 100644 --- a/plugins/adr-common/CHANGELOG.md +++ b/plugins/adr-common/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-adr-common +## 0.2.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/integration@1.4.1 + - @backstage/plugin-search-common@1.2.0 + +## 0.2.4 + +### Patch Changes + +- Updated dependencies + - @backstage/integration@1.4.1 + - @backstage/plugin-search-common@1.2.0 + - @backstage/catalog-model@1.1.4 + ## 0.2.4-next.3 ### Patch Changes diff --git a/plugins/adr-common/package.json b/plugins/adr-common/package.json index 595576a9fd..5a60252d92 100644 --- a/plugins/adr-common/package.json +++ b/plugins/adr-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-adr-common", "description": "Common functionalities for the adr plugin", - "version": "0.2.4-next.3", + "version": "0.2.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/adr/CHANGELOG.md b/plugins/adr/CHANGELOG.md index a50b409573..cddb10c4f2 100644 --- a/plugins/adr/CHANGELOG.md +++ b/plugins/adr/CHANGELOG.md @@ -1,5 +1,47 @@ # @backstage/plugin-adr +## 0.2.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/integration-react@1.1.9-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-adr-common@0.2.5-next.0 + - @backstage/plugin-search-common@1.2.0 + - @backstage/plugin-search-react@1.3.2-next.0 + +## 0.2.5 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/integration-react@1.1.8 + - @backstage/plugin-catalog-react@1.2.3 + - @backstage/plugin-search-react@1.3.1 + +## 0.2.4 + +### Patch Changes + +- a19cffbeed: Update search links to only have header as linkable text +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-search-react@1.3.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/integration-react@1.1.7 + - @backstage/plugin-search-common@1.2.0 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-adr-common@0.2.4 + ## 0.2.4-next.4 ### Patch Changes diff --git a/plugins/adr/package.json b/plugins/adr/package.json index 21e7ddd3ac..3a5ff925e5 100644 --- a/plugins/adr/package.json +++ b/plugins/adr/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-adr", - "version": "0.2.4-next.4", + "version": "0.2.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/airbrake-backend/CHANGELOG.md b/plugins/airbrake-backend/CHANGELOG.md index 8c5a191cdb..9a96a7cce2 100644 --- a/plugins/airbrake-backend/CHANGELOG.md +++ b/plugins/airbrake-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-airbrake-backend +## 0.2.12 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + ## 0.2.12-next.3 ### Patch Changes diff --git a/plugins/airbrake-backend/package.json b/plugins/airbrake-backend/package.json index fcb6a0da7d..9ff15f2b38 100644 --- a/plugins/airbrake-backend/package.json +++ b/plugins/airbrake-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-airbrake-backend", - "version": "0.2.12-next.3", + "version": "0.2.12", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/airbrake/CHANGELOG.md b/plugins/airbrake/CHANGELOG.md index 5ea2fd489e..2a8dd5ab42 100644 --- a/plugins/airbrake/CHANGELOG.md +++ b/plugins/airbrake/CHANGELOG.md @@ -1,5 +1,43 @@ # @backstage/plugin-airbrake +## 0.3.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/dev-utils@1.0.11-next.0 + - @backstage/test-utils@1.2.3 + - @backstage/theme@0.2.16 + +## 0.3.13 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/dev-utils@1.0.10 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.3.12 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 151c0e1477: Remove the `object-hash` dependency +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/test-utils@1.2.3 + - @backstage/dev-utils@1.0.9 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.3.12-next.4 ### Patch Changes diff --git a/plugins/airbrake/dev/components/ApiBar/ApiBar.tsx b/plugins/airbrake/dev/components/ApiBar/ApiBar.tsx index 7a4ee42f14..da3bbb1e46 100644 --- a/plugins/airbrake/dev/components/ApiBar/ApiBar.tsx +++ b/plugins/airbrake/dev/components/ApiBar/ApiBar.tsx @@ -14,12 +14,7 @@ * limitations under the License. */ import React from 'react'; -import { - createTheme, - makeStyles, - MuiThemeProvider, - TextField, -} from '@material-ui/core'; +import { makeStyles, TextField } from '@material-ui/core'; import { Context } from '../ContextProvider'; const useStyles = makeStyles({ @@ -28,30 +23,12 @@ const useStyles = makeStyles({ gap: '1em', flexWrap: 'wrap', }, -}); - -const textFieldTheme = createTheme({ - palette: { - type: 'dark', - primary: { - light: '#fff', - main: '#fff', - dark: '#fff', - contrastText: '#fff', - }, - secondary: { - light: '#fff', - main: '#fff', - dark: '#fff', - contrastText: '#fff', - }, - action: { - disabled: '#fff', - }, - text: { - primary: '#fff', - secondary: '#fff', - }, + label: { + color: '#fff !important', + }, + outline: { + color: '#fff !important', + borderColor: '#fff !important', }, }); @@ -62,16 +39,16 @@ export const ApiBar = () => { {value => (
- - - value.setProjectId?.(parseInt(e.target.value, 10) || undefined) - } - /> - + + value.setProjectId?.(parseInt(e.target.value, 10) || undefined) + } + />
)}
diff --git a/plugins/airbrake/package.json b/plugins/airbrake/package.json index 9845329e11..e61f80ae3c 100644 --- a/plugins/airbrake/package.json +++ b/plugins/airbrake/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-airbrake", - "version": "0.3.12-next.4", + "version": "0.3.14-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/allure/CHANGELOG.md b/plugins/allure/CHANGELOG.md index b5cb6574be..ccf663cc28 100644 --- a/plugins/allure/CHANGELOG.md +++ b/plugins/allure/CHANGELOG.md @@ -1,5 +1,36 @@ # @backstage/plugin-allure +## 0.1.30-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## 0.1.29 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.1.28 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.1.28-next.4 ### Patch Changes diff --git a/plugins/allure/package.json b/plugins/allure/package.json index e701545143..3252cf3823 100644 --- a/plugins/allure/package.json +++ b/plugins/allure/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-allure", "description": "A Backstage plugin that integrates with Allure", - "version": "0.1.28-next.4", + "version": "0.1.30-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/allure/src/components/AllureReportComponent/AllureReportComponent.test.tsx b/plugins/allure/src/components/AllureReportComponent/AllureReportComponent.test.tsx index e6355d861f..a21ecbe10e 100644 --- a/plugins/allure/src/components/AllureReportComponent/AllureReportComponent.test.tsx +++ b/plugins/allure/src/components/AllureReportComponent/AllureReportComponent.test.tsx @@ -15,8 +15,6 @@ */ import React from 'react'; import { AllureReportComponent } from './AllureReportComponent'; -import { ThemeProvider } from '@material-ui/core'; -import { lightTheme } from '@backstage/theme'; import { rest } from 'msw'; import { setupServer } from 'msw/node'; import { @@ -39,17 +37,15 @@ describe('ExampleComponent', () => { it('should render', async () => { const rendered = await renderInTestApp( - - - - - , + + + , ); expect(rendered.getByText('Missing Annotation')).toBeInTheDocument(); }); diff --git a/plugins/analytics-module-ga/CHANGELOG.md b/plugins/analytics-module-ga/CHANGELOG.md index 5a15ff77d5..4e9bcc1373 100644 --- a/plugins/analytics-module-ga/CHANGELOG.md +++ b/plugins/analytics-module-ga/CHANGELOG.md @@ -1,5 +1,36 @@ # @backstage/plugin-analytics-module-ga +## 0.1.25-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## 0.1.24 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + +## 0.1.23 + +### Patch Changes + +- d3fea4ae0a: Internal fixes to avoid implicit usage of globals +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 9516b0c355: Added support for sending virtual pageviews on `search` events in order to enable + Site Search functionality in GA. For more information consult [README](/plugins/analytics-module-ga/README.md#enabling-site-search) +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + ## 0.1.23-next.4 ### Patch Changes diff --git a/plugins/analytics-module-ga/package.json b/plugins/analytics-module-ga/package.json index 9e8aacf5a0..0db298e8d0 100644 --- a/plugins/analytics-module-ga/package.json +++ b/plugins/analytics-module-ga/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-analytics-module-ga", - "version": "0.1.23-next.4", + "version": "0.1.25-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/apache-airflow/CHANGELOG.md b/plugins/apache-airflow/CHANGELOG.md index 6eebd97f62..f87d852fbf 100644 --- a/plugins/apache-airflow/CHANGELOG.md +++ b/plugins/apache-airflow/CHANGELOG.md @@ -1,5 +1,29 @@ # @backstage/plugin-apache-airflow +## 0.2.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + +## 0.2.6 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + +## 0.2.5 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + ## 0.2.5-next.4 ### Patch Changes diff --git a/plugins/apache-airflow/package.json b/plugins/apache-airflow/package.json index 2a346b7831..d76d42d9e6 100644 --- a/plugins/apache-airflow/package.json +++ b/plugins/apache-airflow/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-apache-airflow", - "version": "0.2.5-next.4", + "version": "0.2.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/api-docs/CHANGELOG.md b/plugins/api-docs/CHANGELOG.md index bb842a1d64..7834ec6b17 100644 --- a/plugins/api-docs/CHANGELOG.md +++ b/plugins/api-docs/CHANGELOG.md @@ -1,5 +1,40 @@ # @backstage/plugin-api-docs +## 0.8.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-catalog@1.7.2-next.0 + +## 0.8.13 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog@1.7.1 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.8.12 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/plugin-catalog@1.7.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.8.12-next.4 ### Patch Changes diff --git a/plugins/api-docs/package.json b/plugins/api-docs/package.json index 6bf928a82f..a806fff7a7 100644 --- a/plugins/api-docs/package.json +++ b/plugins/api-docs/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-api-docs", "description": "A Backstage plugin that helps represent API entities in the frontend", - "version": "0.8.12-next.4", + "version": "0.8.14-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/apollo-explorer/CHANGELOG.md b/plugins/apollo-explorer/CHANGELOG.md index 7bbd7e60a5..9bddb69807 100644 --- a/plugins/apollo-explorer/CHANGELOG.md +++ b/plugins/apollo-explorer/CHANGELOG.md @@ -1,5 +1,31 @@ # @backstage/plugin-apollo-explorer +## 0.1.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## 0.1.6 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + +## 0.1.5 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/theme@0.2.16 + ## 0.1.5-next.4 ### Patch Changes diff --git a/plugins/apollo-explorer/package.json b/plugins/apollo-explorer/package.json index 8e52a4e8be..0309118a58 100644 --- a/plugins/apollo-explorer/package.json +++ b/plugins/apollo-explorer/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-apollo-explorer", - "version": "0.1.5-next.4", + "version": "0.1.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/app-backend/CHANGELOG.md b/plugins/app-backend/CHANGELOG.md index 2ab60bf1ee..19504256df 100644 --- a/plugins/app-backend/CHANGELOG.md +++ b/plugins/app-backend/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-app-backend +## 0.3.39 + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/config-loader@1.1.7 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + ## 0.3.39-next.3 ### Patch Changes diff --git a/plugins/app-backend/package.json b/plugins/app-backend/package.json index a77ed9a80b..70213c6513 100644 --- a/plugins/app-backend/package.json +++ b/plugins/app-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-app-backend", "description": "A Backstage backend plugin that serves the Backstage frontend app", - "version": "0.3.39-next.3", + "version": "0.3.39", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/app-backend/src/service/appPlugin.test.ts b/plugins/app-backend/src/service/appPlugin.test.ts index 8583726287..14921622c9 100644 --- a/plugins/app-backend/src/service/appPlugin.test.ts +++ b/plugins/app-backend/src/service/appPlugin.test.ts @@ -30,7 +30,7 @@ import { ConfigReader } from '@backstage/config'; import getPort from 'get-port'; describe('appPlugin', () => { - beforeAll(() => { + beforeEach(() => { mockFs({ [resolvePath(process.cwd(), 'node_modules/app')]: { 'package.json': '{}', @@ -42,7 +42,7 @@ describe('appPlugin', () => { }); }); - afterAll(() => { + afterEach(() => { mockFs.restore(); }); diff --git a/plugins/app-backend/src/service/router.ts b/plugins/app-backend/src/service/router.ts index de299fd895..4e94138439 100644 --- a/plugins/app-backend/src/service/router.ts +++ b/plugins/app-backend/src/service/router.ts @@ -96,9 +96,11 @@ export async function createRouter( const staticDir = resolvePath(appDistDir, 'static'); if (!(await fs.pathExists(staticDir))) { - logger.warn( - `Can't serve static app content from ${staticDir}, directory doesn't exist`, - ); + if (process.env.NODE_ENV === 'production') { + logger.error( + `Can't serve static app content from ${staticDir}, directory doesn't exist`, + ); + } return Router(); } diff --git a/plugins/auth-backend/CHANGELOG.md b/plugins/auth-backend/CHANGELOG.md index 55c4fcc2a3..0967fe5f02 100644 --- a/plugins/auth-backend/CHANGELOG.md +++ b/plugins/auth-backend/CHANGELOG.md @@ -1,5 +1,32 @@ # @backstage/plugin-auth-backend +## 0.17.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/plugin-auth-node@0.2.8 + +## 0.17.2 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + ## 0.17.2-next.3 ### Patch Changes diff --git a/plugins/auth-backend/package.json b/plugins/auth-backend/package.json index c52c116de5..d2a96fa9e5 100644 --- a/plugins/auth-backend/package.json +++ b/plugins/auth-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend", "description": "A Backstage backend plugin that handles authentication", - "version": "0.17.2-next.3", + "version": "0.17.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/auth-node/CHANGELOG.md b/plugins/auth-node/CHANGELOG.md index f383c720be..7e09ed80e1 100644 --- a/plugins/auth-node/CHANGELOG.md +++ b/plugins/auth-node/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-auth-node +## 0.2.8 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/config@1.0.5 + ## 0.2.8-next.3 ### Patch Changes diff --git a/plugins/auth-node/package.json b/plugins/auth-node/package.json index 8b1b621e00..304028a8a8 100644 --- a/plugins/auth-node/package.json +++ b/plugins/auth-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-node", - "version": "0.2.8-next.3", + "version": "0.2.8", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/azure-devops-backend/CHANGELOG.md b/plugins/azure-devops-backend/CHANGELOG.md index 642756a96f..4c7cb205de 100644 --- a/plugins/azure-devops-backend/CHANGELOG.md +++ b/plugins/azure-devops-backend/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-azure-devops-backend +## 0.3.18 + +### Patch Changes + +- eaccf6d628: Updated installation documentation +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/plugin-azure-devops-common@0.3.0 + ## 0.3.18-next.3 ### Patch Changes diff --git a/plugins/azure-devops-backend/package.json b/plugins/azure-devops-backend/package.json index da9a498e59..637f7e0e28 100644 --- a/plugins/azure-devops-backend/package.json +++ b/plugins/azure-devops-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-azure-devops-backend", - "version": "0.3.18-next.3", + "version": "0.3.18", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/azure-devops-backend/src/utils/azure-devops-utils.test.ts b/plugins/azure-devops-backend/src/utils/azure-devops-utils.test.ts index 74932c9653..4b912a8340 100644 --- a/plugins/azure-devops-backend/src/utils/azure-devops-utils.test.ts +++ b/plugins/azure-devops-backend/src/utils/azure-devops-utils.test.ts @@ -255,7 +255,6 @@ describe('replaceReadme', () => { }), readTree: jest.fn(), search: jest.fn(), - read: jest.fn(), }; const result = await replaceReadme( diff --git a/plugins/azure-devops/CHANGELOG.md b/plugins/azure-devops/CHANGELOG.md index 70dfc9c842..bdb58fa6e5 100644 --- a/plugins/azure-devops/CHANGELOG.md +++ b/plugins/azure-devops/CHANGELOG.md @@ -1,5 +1,41 @@ # @backstage/plugin-azure-devops +## 0.2.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-azure-devops-common@0.3.0 + +## 0.2.4 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.2.3 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-azure-devops-common@0.3.0 + ## 0.2.3-next.4 ### Patch Changes diff --git a/plugins/azure-devops/package.json b/plugins/azure-devops/package.json index 4ad62ae759..873619adef 100644 --- a/plugins/azure-devops/package.json +++ b/plugins/azure-devops/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-azure-devops", - "version": "0.2.3-next.4", + "version": "0.2.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/azure-sites-backend/CHANGELOG.md b/plugins/azure-sites-backend/CHANGELOG.md index 41bdef289b..82c4bbcc48 100644 --- a/plugins/azure-sites-backend/CHANGELOG.md +++ b/plugins/azure-sites-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-azure-sites-backend +## 0.1.1 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/plugin-azure-sites-common@0.1.0 + ## 0.1.1-next.3 ### Patch Changes diff --git a/plugins/azure-sites-backend/package.json b/plugins/azure-sites-backend/package.json index 66a0020123..a63fe892ba 100644 --- a/plugins/azure-sites-backend/package.json +++ b/plugins/azure-sites-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-azure-sites-backend", - "version": "0.1.1-next.3", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/azure-sites/CHANGELOG.md b/plugins/azure-sites/CHANGELOG.md index a8a2561b3f..acd36df67d 100644 --- a/plugins/azure-sites/CHANGELOG.md +++ b/plugins/azure-sites/CHANGELOG.md @@ -1,5 +1,38 @@ # @backstage/plugin-azure-sites +## 0.1.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-azure-sites-common@0.1.0 + +## 0.1.2 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.1.1 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-azure-sites-common@0.1.0 + ## 0.1.1-next.4 ### Patch Changes diff --git a/plugins/azure-sites/package.json b/plugins/azure-sites/package.json index 50a5c968d3..935ca4d115 100644 --- a/plugins/azure-sites/package.json +++ b/plugins/azure-sites/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-azure-sites", - "version": "0.1.1-next.4", + "version": "0.1.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/badges-backend/CHANGELOG.md b/plugins/badges-backend/CHANGELOG.md index 15ed919bab..6d22ed2319 100644 --- a/plugins/badges-backend/CHANGELOG.md +++ b/plugins/badges-backend/CHANGELOG.md @@ -1,5 +1,27 @@ # @backstage/plugin-badges-backend +## 0.1.34-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + +## 0.1.33 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + ## 0.1.33-next.3 ### Patch Changes diff --git a/plugins/badges-backend/package.json b/plugins/badges-backend/package.json index 30e3f822e0..b3acf7fbe6 100644 --- a/plugins/badges-backend/package.json +++ b/plugins/badges-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-badges-backend", "description": "A Backstage backend plugin that generates README badges for your entities", - "version": "0.1.33-next.3", + "version": "0.1.34-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/badges/CHANGELOG.md b/plugins/badges/CHANGELOG.md index 03e2200057..6a90405b9a 100644 --- a/plugins/badges/CHANGELOG.md +++ b/plugins/badges/CHANGELOG.md @@ -1,5 +1,39 @@ # @backstage/plugin-badges +## 0.2.38-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## 0.2.37 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.2.36 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.2.36-next.4 ### Patch Changes diff --git a/plugins/badges/package.json b/plugins/badges/package.json index acd0f10520..1bd09db71d 100644 --- a/plugins/badges/package.json +++ b/plugins/badges/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-badges", "description": "A Backstage plugin that generates README badges for your entities", - "version": "0.2.36-next.4", + "version": "0.2.38-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/bazaar-backend/CHANGELOG.md b/plugins/bazaar-backend/CHANGELOG.md index 37c6b898f1..40cdf18220 100644 --- a/plugins/bazaar-backend/CHANGELOG.md +++ b/plugins/bazaar-backend/CHANGELOG.md @@ -1,5 +1,29 @@ # @backstage/plugin-bazaar-backend +## 0.2.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/backend-test-utils@0.1.32-next.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + +## 0.2.2 + +### Patch Changes + +- c507aee8a2: Ensured typescript type checks in migration files. +- 9b1891061c: Column `title` has replaced column `name` for `BazaarProject` in database +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/backend-test-utils@0.1.31 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/config@1.0.5 + ## 0.2.2-next.4 ### Patch Changes diff --git a/plugins/bazaar-backend/package.json b/plugins/bazaar-backend/package.json index 5ee4031f46..010e78c11b 100644 --- a/plugins/bazaar-backend/package.json +++ b/plugins/bazaar-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-bazaar-backend", - "version": "0.2.2-next.4", + "version": "0.2.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/bazaar/CHANGELOG.md b/plugins/bazaar/CHANGELOG.md index 45c1516778..e9920b65ab 100644 --- a/plugins/bazaar/CHANGELOG.md +++ b/plugins/bazaar/CHANGELOG.md @@ -1,5 +1,46 @@ # @backstage/plugin-bazaar +## 0.2.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.22.1-next.0 + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog@1.7.2-next.0 + +## 0.2.2 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/cli@0.22.0 + - @backstage/plugin-catalog@1.7.1 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.2.1 + +### Patch Changes + +- 9b1891061c: `HomePageBazaarInfoCard` is now displaying `title` instead of `name`. Title is a string that doesn't have to be URL friendly. + The BazaarOverviewCard have the new property `fullHeight`. Link in `BazaarOverviewCard`is moved to header in card. +- 312962da30: Add `title` as optional parameter to `BazaarOverviewCard` +- Updated dependencies + - @backstage/plugin-catalog@1.7.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/catalog-client@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/cli@0.22.0 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + ## 0.2.1-next.4 ### Patch Changes diff --git a/plugins/bazaar/README.md b/plugins/bazaar/README.md index 2ad141935e..218a5a886c 100644 --- a/plugins/bazaar/README.md +++ b/plugins/bazaar/README.md @@ -49,17 +49,20 @@ Add a **Bazaar icon** to the Sidebar to easily access the Bazaar. In `packages/a Add a **Bazaar card** to the overview tab on the `packages/app/src/components/catalog/EntityPage.tsx` add: ```diff -+ import { EntityBazaarInfoCard } from '@backstage/plugin-bazaar'; ++ import { EntityBazaarInfoCard, isBazaarAvailable } from '@backstage/plugin-bazaar'; const overviewContent = ( - -+ -+ -+ ++ ++ ++ ++ ++ ++ ++ {/* ...other entity-cards */} ``` diff --git a/plugins/bazaar/api-report.md b/plugins/bazaar/api-report.md index d7c463888a..afbb7b5504 100644 --- a/plugins/bazaar/api-report.md +++ b/plugins/bazaar/api-report.md @@ -5,7 +5,9 @@ ```ts /// +import { ApiHolder } from '@backstage/core-plugin-api'; import { BackstagePlugin } from '@backstage/core-plugin-api'; +import { Entity } from '@backstage/catalog-model'; import { RouteRef } from '@backstage/core-plugin-api'; // @public (undocumented) @@ -36,6 +38,14 @@ export const bazaarPlugin: BackstagePlugin< // @public (undocumented) export const EntityBazaarInfoCard: () => JSX.Element | null; +// @public (undocumented) +export const isBazaarAvailable: ( + entity: Entity, + context: { + apis: ApiHolder; + }, +) => Promise; + // @public (undocumented) export const SortView: () => JSX.Element; diff --git a/plugins/bazaar/media/overviewCard.png b/plugins/bazaar/media/overviewCard.png index ef41ca48e5..a2c2756d9b 100644 Binary files a/plugins/bazaar/media/overviewCard.png and b/plugins/bazaar/media/overviewCard.png differ diff --git a/plugins/bazaar/package.json b/plugins/bazaar/package.json index 4aced2566c..d5c4801d76 100644 --- a/plugins/bazaar/package.json +++ b/plugins/bazaar/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-bazaar", - "version": "0.2.1-next.4", + "version": "0.2.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,6 +30,7 @@ "@backstage/errors": "workspace:^", "@backstage/plugin-catalog": "workspace:^", "@backstage/plugin-catalog-react": "workspace:^", + "@backstage/theme": "workspace:^", "@date-io/luxon": "1.x", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", diff --git a/plugins/bazaar/src/api.ts b/plugins/bazaar/src/api.ts index 33455e69fc..a2e32e274a 100644 --- a/plugins/bazaar/src/api.ts +++ b/plugins/bazaar/src/api.ts @@ -14,7 +14,9 @@ * limitations under the License. */ +import { Entity, stringifyEntityRef } from '@backstage/catalog-model'; import { + ApiHolder, createApiRef, DiscoveryApi, FetchApi, @@ -46,6 +48,25 @@ export interface BazaarApi { deleteProject(id: number): Promise; } +/** @public */ +export const isBazaarAvailable = async ( + entity: Entity, + context: { apis: ApiHolder }, +): Promise => { + const bazaarClient = context.apis.get(bazaarApiRef); + if (bazaarClient === undefined) { + return false; + } + const entityRef = stringifyEntityRef({ + kind: entity.kind, + name: entity.metadata.name, + namespace: entity.metadata.namespace, + }); + const response = await bazaarClient.getProjectByRef(entityRef); + const project = await response.json(); + return project.data.length > 0; +}; + export class BazaarClient implements BazaarApi { private readonly identityApi: IdentityApi; private readonly discoveryApi: DiscoveryApi; diff --git a/plugins/bazaar/src/components/BazaarOverviewCard/BazaarOverviewCard.tsx b/plugins/bazaar/src/components/BazaarOverviewCard/BazaarOverviewCard.tsx index c58ee3db1c..da43d4a206 100644 --- a/plugins/bazaar/src/components/BazaarOverviewCard/BazaarOverviewCard.tsx +++ b/plugins/bazaar/src/components/BazaarOverviewCard/BazaarOverviewCard.tsx @@ -146,7 +146,7 @@ export const BazaarOverviewCard = (props: BazaarOverviewCardProps) => { catalogEntities={unlinkedCatalogEntities || []} useTablePagination={false} gridSize={fullWidth ? 2 : 4} - height={fullHeight ? '13rem' : '7rem'} + height={fullHeight ? 'large' : 'small'} /> ); diff --git a/plugins/bazaar/src/components/ProjectCard/ProjectCard.tsx b/plugins/bazaar/src/components/ProjectCard/ProjectCard.tsx index 9193215804..97b247e289 100644 --- a/plugins/bazaar/src/components/ProjectCard/ProjectCard.tsx +++ b/plugins/bazaar/src/components/ProjectCard/ProjectCard.tsx @@ -29,39 +29,41 @@ import { BazaarProject } from '../../types'; import { DateTime } from 'luxon'; import { HomePageBazaarInfoCard } from '../HomePageBazaarInfoCard'; import { Entity } from '@backstage/catalog-model'; +import { BackstageTheme } from '@backstage/theme'; type Props = { project: BazaarProject; fetchBazaarProjects: () => Promise; catalogEntities: Entity[]; - height?: string; + height: 'large' | 'small'; }; -const useStyles = makeStyles({ +type StyleProps = { + height: 'large' | 'small'; +}; + +const useStyles = makeStyles((theme: BackstageTheme) => ({ + description: (props: StyleProps) => ({ + height: props.height === 'large' ? '10rem' : '4rem', + WebkitBackgroundClip: 'text', + backgroundImage: `linear-gradient(180deg, ${theme.palette.textContrast} 0%, ${theme.palette.textContrast} 60%, transparent 100%)`, + color: 'transparent', + }), statusTag: { display: 'inline-block', whiteSpace: 'nowrap', marginBottom: '0.8rem', }, - description: { - display: '-webkit-box', - WebkitLineClamp: 7, - WebkitBoxOrient: 'vertical', - overflow: 'hidden', - }, memberCount: { float: 'right', }, - content: { - height: '13rem', - }, header: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', height: '5rem', }, -}); +})); export const ProjectCard = ({ project, @@ -69,7 +71,7 @@ export const ProjectCard = ({ catalogEntities, height, }: Props) => { - const classes = useStyles(); + const classes = useStyles({ height }); const [openCard, setOpenCard] = useState(false); const { id, title, status, updatedAt, description, membersCount } = project; @@ -103,7 +105,7 @@ export const ProjectCard = ({ base: DateTime.now(), })}`} /> - + {Number(membersCount) === Number(1) diff --git a/plugins/bazaar/src/components/ProjectPreview/ProjectPreview.tsx b/plugins/bazaar/src/components/ProjectPreview/ProjectPreview.tsx index 216cf50c2f..8f7160600a 100644 --- a/plugins/bazaar/src/components/ProjectPreview/ProjectPreview.tsx +++ b/plugins/bazaar/src/components/ProjectPreview/ProjectPreview.tsx @@ -27,7 +27,7 @@ type Props = { catalogEntities: Entity[]; useTablePagination?: boolean; gridSize?: GridSize; - height: string; + height: 'large' | 'small'; }; const useStyles = makeStyles({ @@ -56,7 +56,7 @@ export const ProjectPreview = ({ catalogEntities, useTablePagination = true, gridSize = 2, - height, + height = 'large', }: Props) => { const classes = useStyles(); const [page, setPage] = useState(1); diff --git a/plugins/bazaar/src/components/SortView/SortView.tsx b/plugins/bazaar/src/components/SortView/SortView.tsx index 68b63a6885..b3e592fc6f 100644 --- a/plugins/bazaar/src/components/SortView/SortView.tsx +++ b/plugins/bazaar/src/components/SortView/SortView.tsx @@ -199,7 +199,7 @@ export const SortView = () => { bazaarProjects={getSearchResults() || []} fetchBazaarProjects={fetchBazaarProjects} catalogEntities={unlinkedCatalogEntities || []} - height="13rem" + height="large" /> diff --git a/plugins/bazaar/src/index.ts b/plugins/bazaar/src/index.ts index 0014c66b6d..c0378e60bf 100644 --- a/plugins/bazaar/src/index.ts +++ b/plugins/bazaar/src/index.ts @@ -15,6 +15,7 @@ */ export { bazaarPlugin, BazaarPage } from './plugin'; +export { isBazaarAvailable } from './api'; export { BazaarOverviewCard } from './components/BazaarOverviewCard'; export type { BazaarOverviewCardProps } from './components/BazaarOverviewCard'; export { EntityBazaarInfoCard } from './components/EntityBazaarInfoCard'; diff --git a/plugins/bitbucket-cloud-common/CHANGELOG.md b/plugins/bitbucket-cloud-common/CHANGELOG.md index 672e06f8df..abe41846a9 100644 --- a/plugins/bitbucket-cloud-common/CHANGELOG.md +++ b/plugins/bitbucket-cloud-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-bitbucket-cloud-common +## 0.2.2 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/integration@1.4.1 + ## 0.2.2-next.1 ### Patch Changes diff --git a/plugins/bitbucket-cloud-common/package.json b/plugins/bitbucket-cloud-common/package.json index d43b716d7f..9d9c62b4d3 100644 --- a/plugins/bitbucket-cloud-common/package.json +++ b/plugins/bitbucket-cloud-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-bitbucket-cloud-common", "description": "Common functionalities for bitbucket-cloud plugins", - "version": "0.2.2-next.1", + "version": "0.2.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/bitrise/CHANGELOG.md b/plugins/bitrise/CHANGELOG.md index fc2c4802d0..592633d0e4 100644 --- a/plugins/bitrise/CHANGELOG.md +++ b/plugins/bitrise/CHANGELOG.md @@ -1,5 +1,36 @@ # @backstage/plugin-bitrise +## 0.1.41-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## 0.1.40 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.1.39 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.1.39-next.4 ### Patch Changes diff --git a/plugins/bitrise/package.json b/plugins/bitrise/package.json index 47af82bf51..a5c6aca81b 100644 --- a/plugins/bitrise/package.json +++ b/plugins/bitrise/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-bitrise", "description": "A Backstage plugin that integrates towards Bitrise", - "version": "0.1.39-next.4", + "version": "0.1.41-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-aws/CHANGELOG.md b/plugins/catalog-backend-module-aws/CHANGELOG.md index 0078f38f95..8c91279d92 100644 --- a/plugins/catalog-backend-module-aws/CHANGELOG.md +++ b/plugins/catalog-backend-module-aws/CHANGELOG.md @@ -1,5 +1,38 @@ # @backstage/plugin-catalog-backend-module-aws +## 0.1.13-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/plugin-catalog-node@1.3.1-next.0 + +## 0.1.12 + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + ## 0.1.12-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-aws/package.json b/plugins/catalog-backend-module-aws/package.json index b929300b1f..40e2a8a859 100644 --- a/plugins/catalog-backend-module-aws/package.json +++ b/plugins/catalog-backend-module-aws/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-aws", "description": "A Backstage catalog backend module that helps integrate towards AWS", - "version": "0.1.12-next.3", + "version": "0.1.13-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-azure/CHANGELOG.md b/plugins/catalog-backend-module-azure/CHANGELOG.md index 57457ee462..b4f6c0219e 100644 --- a/plugins/catalog-backend-module-azure/CHANGELOG.md +++ b/plugins/catalog-backend-module-azure/CHANGELOG.md @@ -1,5 +1,39 @@ # @backstage/plugin-catalog-backend-module-azure +## 0.1.11-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/plugin-catalog-node@1.3.1-next.0 + +## 0.1.10 + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + ## 0.1.10-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-azure/package.json b/plugins/catalog-backend-module-azure/package.json index 1170fe3b9a..3697af2e88 100644 --- a/plugins/catalog-backend-module-azure/package.json +++ b/plugins/catalog-backend-module-azure/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-azure", "description": "A Backstage catalog backend module that helps integrate towards Azure", - "version": "0.1.10-next.3", + "version": "0.1.11-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md b/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md index 27b7356712..0a3b71daf5 100644 --- a/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md +++ b/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md @@ -1,5 +1,45 @@ # @backstage/plugin-catalog-backend-module-bitbucket-cloud +## 0.1.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/integration@1.4.1 + - @backstage/plugin-bitbucket-cloud-common@0.2.2 + - @backstage/plugin-catalog-common@1.0.10-next.0 + - @backstage/plugin-catalog-node@1.3.1-next.0 + - @backstage/plugin-events-node@0.2.0 + +## 0.1.6 + +### Patch Changes + +- ce08e1798e: Refresh (potentially) updated catalog files on `repo:push` more efficiently. +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 4eb0bce299: Fix repo:push topic not matching `BitbucketCloudEventRouter`. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/plugin-events-node@0.2.0 + - @backstage/integration@1.4.1 + - @backstage/plugin-bitbucket-cloud-common@0.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/plugin-catalog-common@1.0.9 + ## 0.1.6-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-bitbucket-cloud/package.json b/plugins/catalog-backend-module-bitbucket-cloud/package.json index 469d2b0914..2b85f0a991 100644 --- a/plugins/catalog-backend-module-bitbucket-cloud/package.json +++ b/plugins/catalog-backend-module-bitbucket-cloud/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-bitbucket-cloud", "description": "A Backstage catalog backend module that helps integrate towards Bitbucket Cloud", - "version": "0.1.6-next.3", + "version": "0.1.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md b/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md index 117be6acb2..db86e86567 100644 --- a/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md +++ b/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md @@ -1,5 +1,37 @@ # @backstage/plugin-catalog-backend-module-bitbucket-server +## 0.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/plugin-catalog-node@1.3.1-next.0 + +## 0.1.4 + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/integration@1.4.1 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + ## 0.1.4-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-bitbucket-server/package.json b/plugins/catalog-backend-module-bitbucket-server/package.json index df84c523fc..7b978e7676 100644 --- a/plugins/catalog-backend-module-bitbucket-server/package.json +++ b/plugins/catalog-backend-module-bitbucket-server/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-bitbucket-server", - "version": "0.1.4-next.3", + "version": "0.1.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-bitbucket/CHANGELOG.md b/plugins/catalog-backend-module-bitbucket/CHANGELOG.md index 7a95b37a5c..c51ad71f1b 100644 --- a/plugins/catalog-backend-module-bitbucket/CHANGELOG.md +++ b/plugins/catalog-backend-module-bitbucket/CHANGELOG.md @@ -1,5 +1,34 @@ # @backstage/plugin-catalog-backend-module-bitbucket +## 0.2.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/plugin-bitbucket-cloud-common@0.2.2 + +## 0.2.6 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/plugin-bitbucket-cloud-common@0.2.2 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + ## 0.2.6-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-bitbucket/package.json b/plugins/catalog-backend-module-bitbucket/package.json index 3c93b66d02..69950c4181 100644 --- a/plugins/catalog-backend-module-bitbucket/package.json +++ b/plugins/catalog-backend-module-bitbucket/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-bitbucket", "description": "A Backstage catalog backend module that helps integrate towards Bitbucket", - "version": "0.2.6-next.3", + "version": "0.2.7-next.0", "deprecated": true, "main": "src/index.ts", "types": "src/index.ts", diff --git a/plugins/catalog-backend-module-gerrit/CHANGELOG.md b/plugins/catalog-backend-module-gerrit/CHANGELOG.md index 27eca385b3..23aad8c621 100644 --- a/plugins/catalog-backend-module-gerrit/CHANGELOG.md +++ b/plugins/catalog-backend-module-gerrit/CHANGELOG.md @@ -1,5 +1,37 @@ # @backstage/plugin-catalog-backend-module-gerrit +## 0.1.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/plugin-catalog-node@1.3.1-next.0 + +## 0.1.7 + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/integration@1.4.1 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + ## 0.1.7-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-gerrit/package.json b/plugins/catalog-backend-module-gerrit/package.json index eaa9980507..66dff4d7cb 100644 --- a/plugins/catalog-backend-module-gerrit/package.json +++ b/plugins/catalog-backend-module-gerrit/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-gerrit", - "version": "0.1.7-next.3", + "version": "0.1.8-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-github/CHANGELOG.md b/plugins/catalog-backend-module-github/CHANGELOG.md index e71ab6ecc1..b2a4783fd0 100644 --- a/plugins/catalog-backend-module-github/CHANGELOG.md +++ b/plugins/catalog-backend-module-github/CHANGELOG.md @@ -1,5 +1,59 @@ # @backstage/plugin-catalog-backend-module-github +## 0.2.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/plugin-catalog-common@1.0.10-next.0 + - @backstage/plugin-catalog-node@1.3.1-next.0 + - @backstage/plugin-events-node@0.2.0 + +## 0.2.2 + +### Patch Changes + +- 70fa5ec3ec: Fixes the assignment of group member references in `GithubMultiOrgProcessor` so membership relations are resolved correctly. +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- fe93cce743: Added the githubCredentialsProvider property to the GithubLocationAnalyzerOptions to be able to override the GithubCredentialsProvider. +- a0fd4af94a: Handle GitHub `push` events at the `GithubEntityProvider` by subscribing to the topic `github.push.` + + Implements `EventSubscriber` to receive events for the topic `github.push`. + + On `github.push`, the affected repository will be refreshed. + This includes adding new Location entities, refreshing existing ones, + and removing obsolete ones. + + Please find more information at + https://backstage.io/docs/integrations/github/discovery#installation-with-events-support + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 754b5854df: Fix incorrectly exported GithubOrgEntityProvider as a type +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/plugin-events-node@0.2.0 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/plugin-catalog-common@1.0.9 + ## 0.2.2-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-github/api-report.md b/plugins/catalog-backend-module-github/api-report.md index 8ccfdb09ee..78ffd5b018 100644 --- a/plugins/catalog-backend-module-github/api-report.md +++ b/plugins/catalog-backend-module-github/api-report.md @@ -178,7 +178,9 @@ export class GitHubOrgEntityProvider extends GithubOrgEntityProvider { } // @public -export class GithubOrgEntityProvider implements EntityProvider { +export class GithubOrgEntityProvider + implements EntityProvider, EventSubscriber +{ constructor(options: { id: string; orgUrl: string; @@ -197,7 +199,11 @@ export class GithubOrgEntityProvider implements EntityProvider { ): GithubOrgEntityProvider; // (undocumented) getProviderName(): string; + // (undocumented) + onEvent(params: EventParams): Promise; read(options?: { logger?: Logger }): Promise; + // (undocumented) + supportsEventTopics(): string[]; } // @public @deprecated (undocumented) diff --git a/plugins/catalog-backend-module-github/package.json b/plugins/catalog-backend-module-github/package.json index 88c9d8f738..f1d784efa4 100644 --- a/plugins/catalog-backend-module-github/package.json +++ b/plugins/catalog-backend-module-github/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-github", "description": "A Backstage catalog backend module that helps integrate towards GitHub", - "version": "0.2.2-next.3", + "version": "0.2.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-github/src/lib/github.test.ts b/plugins/catalog-backend-module-github/src/lib/github.test.ts index d07d2f6af8..387dc8a2ee 100644 --- a/plugins/catalog-backend-module-github/src/lib/github.test.ts +++ b/plugins/catalog-backend-module-github/src/lib/github.test.ts @@ -29,6 +29,9 @@ import { QueryResponse, GithubUser, GithubTeam, + createAddEntitiesOperation, + createRemoveEntitiesOperation, + createReplaceEntitiesOperation, } from './github'; import fetch from 'node-fetch'; @@ -557,4 +560,107 @@ describe('github', () => { ).resolves.toEqual(output); }); }); + + describe('createAddEntitiesOperation', () => { + it('create a function to add deferred entities to a delta operation', () => { + const operation = createAddEntitiesOperation('my-id', 'host'); + + const userEntity: UserEntity = { + apiVersion: 'backstage.io/v1alpha1', + kind: 'User', + metadata: { + name: 'githubuser', + annotations: { + 'backstage.io/managed-by-location': + 'url:https://github.com/githubuser', + 'backstage.io/managed-by-origin-location': + 'url:https://github.com/githubuser', + 'github.com/user-login': 'githubuser', + }, + }, + spec: { + memberOf: ['new-team'], + }, + }; + expect(operation('org', [userEntity])).toEqual({ + added: [ + { + locationKey: 'github-org-provider:my-id', + entity: userEntity, + }, + ], + removed: [], + }); + }); + }); + + describe('createRemoveEntitiesOperation', () => { + it('create a function to remove deferred entities to a delta operation', () => { + const operation = createRemoveEntitiesOperation('my-id', 'host'); + + const userEntity: UserEntity = { + apiVersion: 'backstage.io/v1alpha1', + kind: 'User', + metadata: { + name: 'githubuser', + annotations: { + 'backstage.io/managed-by-location': + 'url:https://github.com/githubuser', + 'backstage.io/managed-by-origin-location': + 'url:https://github.com/githubuser', + 'github.com/user-login': 'githubuser', + }, + }, + spec: { + memberOf: ['new-team'], + }, + }; + expect(operation('org', [userEntity])).toEqual({ + removed: [ + { + locationKey: 'github-org-provider:my-id', + entity: userEntity, + }, + ], + added: [], + }); + }); + }); + describe('createReplaceEntitiesOperation', () => { + it('create a function to replace deferred entities to a delta operation', () => { + const operation = createReplaceEntitiesOperation('my-id', 'host'); + + const userEntity: UserEntity = { + apiVersion: 'backstage.io/v1alpha1', + kind: 'User', + metadata: { + name: 'githubuser', + annotations: { + 'backstage.io/managed-by-location': + 'url:https://github.com/githubuser', + 'backstage.io/managed-by-origin-location': + 'url:https://github.com/githubuser', + 'github.com/user-login': 'githubuser', + }, + }, + spec: { + memberOf: ['new-team'], + }, + }; + expect(operation('org', [userEntity])).toEqual({ + removed: [ + { + locationKey: 'github-org-provider:my-id', + entity: userEntity, + }, + ], + added: [ + { + locationKey: 'github-org-provider:my-id', + entity: userEntity, + }, + ], + }); + }); + }); }); diff --git a/plugins/catalog-backend-module-github/src/lib/github.ts b/plugins/catalog-backend-module-github/src/lib/github.ts index 4d583d0730..f719e3d506 100644 --- a/plugins/catalog-backend-module-github/src/lib/github.ts +++ b/plugins/catalog-backend-module-github/src/lib/github.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { GroupEntity, UserEntity } from '@backstage/catalog-model'; +import { Entity, GroupEntity, UserEntity } from '@backstage/catalog-model'; import { GithubCredentialType } from '@backstage/integration'; import { graphql } from '@octokit/graphql'; import { @@ -24,6 +24,9 @@ import { TransformerContext, UserTransformer, } from './defaultTransformers'; +import { withLocations } from '../providers/GithubOrgEntityProvider'; + +import { DeferredEntity } from '@backstage/plugin-catalog-backend'; // Graphql types @@ -191,7 +194,14 @@ export async function getOrganizationTeams( parentTeam { slug } members(first: 100, membership: IMMEDIATE) { pageInfo { hasNextPage } - nodes { login } + nodes { + avatarUrl, + bio, + email, + login, + name, + organizationVerifiedDomainEmails(login: $org) + } } } } @@ -238,6 +248,164 @@ export async function getOrganizationTeams( return { groups }; } +export async function getOrganizationTeamsFromUsers( + client: typeof graphql, + org: string, + userLogins: string[], + teamTransformer: TeamTransformer = defaultOrganizationTeamTransformer, +): Promise<{ + groups: GroupEntity[]; +}> { + const query = ` + query teams($org: String!, $cursor: String, $userLogins: [String!] = "") { + organization(login: $org) { + teams(first: 100, after: $cursor, userLogins: $userLogins) { + pageInfo { + hasNextPage + endCursor + } + nodes { + slug + combinedSlug + name + description + avatarUrl + editTeamUrl + parentTeam { + slug + } + members(first: 100, membership: IMMEDIATE) { + pageInfo { + hasNextPage + } + nodes { + avatarUrl, + bio, + email, + login, + name, + organizationVerifiedDomainEmails(login: $org) + } + } + } + } + } +}`; + + const materialisedTeams = async ( + item: GithubTeamResponse, + ctx: TransformerContext, + ): Promise => { + const memberNames: GithubUser[] = []; + + if (!item.members.pageInfo.hasNextPage) { + // We got all the members in one go, run the fast path + for (const user of item.members.nodes) { + memberNames.push(user); + } + } else { + // There were more than a hundred immediate members - run the slow + // path of fetching them explicitly + const { members } = await getTeamMembers(ctx.client, ctx.org, item.slug); + for (const userLogin of members) { + memberNames.push(userLogin); + } + } + + const team: GithubTeam = { + ...item, + members: memberNames, + }; + + return await teamTransformer(team, ctx); + }; + + const groups = await queryWithPaging( + client, + query, + org, + r => r.organization?.teams, + materialisedTeams, + { org, userLogins }, + ); + + return { groups }; +} + +export async function getOrganizationTeam( + client: typeof graphql, + org: string, + teamSlug: string, + teamTransformer: TeamTransformer = defaultOrganizationTeamTransformer, +): Promise<{ + group: GroupEntity; +}> { + const query = ` + query teams($org: String!, $teamSlug: String!) { + organization(login: $org) { + team(slug:$teamSlug) { + slug + combinedSlug + name + description + avatarUrl + editTeamUrl + parentTeam { slug } + members(first: 100, membership: IMMEDIATE) { + pageInfo { hasNextPage } + nodes { login } + } + } + } + }`; + + const materialisedTeam = async ( + item: GithubTeamResponse, + ctx: TransformerContext, + ): Promise => { + const memberNames: GithubUser[] = []; + + if (!item.members.pageInfo.hasNextPage) { + // We got all the members in one go, run the fast path + for (const user of item.members.nodes) { + memberNames.push(user); + } + } else { + // There were more than a hundred immediate members - run the slow + // path of fetching them explicitly + const { members } = await getTeamMembers(ctx.client, ctx.org, item.slug); + for (const userLogin of members) { + memberNames.push(userLogin); + } + } + + const team: GithubTeam = { + ...item, + members: memberNames, + }; + + return await teamTransformer(team, ctx); + }; + + const response: QueryResponse = await client(query, { + org, + teamSlug, + }); + + if (!response.organization?.team) + throw new Error(`Found no match for group ${teamSlug}`); + + const group = await materialisedTeam(response.organization?.team, { + query, + client, + org, + }); + + if (!group) throw new Error(`Can't transform for group ${teamSlug}`); + + return { group }; +} + export async function getOrganizationRepositories( client: typeof graphql, org: string, @@ -349,6 +517,7 @@ export async function getTeamMembers( * * @param client - The octokit client * @param query - The query to execute + * @param org - The slug of the org to read * @param connection - A function that, given the response, picks out the actual * Connection object that's being iterated * @param transformer - A function that, given one of the nodes in the Connection, @@ -406,3 +575,39 @@ export async function queryWithPaging< return result; } + +export type DeferredEntitiesBuilder = ( + org: string, + entities: Entity[], +) => { added: DeferredEntity[]; removed: DeferredEntity[] }; + +export const createAddEntitiesOperation = + (id: string, host: string) => (org: string, entities: Entity[]) => ({ + removed: [], + added: entities.map(entity => ({ + locationKey: `github-org-provider:${id}`, + entity: withLocations(`https://${host}`, org, entity), + })), + }); + +export const createRemoveEntitiesOperation = + (id: string, host: string) => (org: string, entities: Entity[]) => ({ + added: [], + removed: entities.map(entity => ({ + locationKey: `github-org-provider:${id}`, + entity: withLocations(`https://${host}`, org, entity), + })), + }); + +export const createReplaceEntitiesOperation = + (id: string, host: string) => (org: string, entities: Entity[]) => { + const entitiesToReplace = entities.map(entity => ({ + locationKey: `github-org-provider:${id}`, + entity: withLocations(`https://${host}`, org, entity), + })); + + return { + removed: entitiesToReplace, + added: entitiesToReplace, + }; + }; diff --git a/plugins/catalog-backend-module-github/src/providers/GithubOrgEntityProvider.test.ts b/plugins/catalog-backend-module-github/src/providers/GithubOrgEntityProvider.test.ts index 0b8765b93e..c24cd573e0 100644 --- a/plugins/catalog-backend-module-github/src/providers/GithubOrgEntityProvider.test.ts +++ b/plugins/catalog-backend-module-github/src/providers/GithubOrgEntityProvider.test.ts @@ -22,6 +22,7 @@ import { } from '@backstage/integration'; import { EntityProviderConnection } from '@backstage/plugin-catalog-backend'; import { graphql } from '@octokit/graphql'; +import { EventParams } from '@backstage/plugin-events-node'; import { GithubOrgEntityProvider, withLocations, @@ -237,4 +238,1079 @@ describe('GithubOrgEntityProvider', () => { }); }); }); + + describe('receiving events from github', () => { + afterEach(() => jest.resetAllMocks()); + + it('should apply delta added on receive a new member in the organization', async () => { + const entityProviderConnection: EntityProviderConnection = { + applyMutation: jest.fn(), + refresh: jest.fn(), + }; + + const logger = getVoidLogger(); + const gitHubConfig: GithubIntegrationConfig = { + host: 'github.com', + }; + + const mockGetCredentials = jest.fn().mockReturnValue({ + headers: { token: 'blah' }, + type: 'app', + }); + + const githubCredentialsProvider: GithubCredentialsProvider = { + getCredentials: mockGetCredentials, + }; + + const entityProvider = new GithubOrgEntityProvider({ + id: 'my-id', + githubCredentialsProvider, + orgUrl: 'https://github.com/backstage', + gitHubConfig, + logger, + }); + + entityProvider.connect(entityProviderConnection); + + const expectedEntity = { + apiVersion: 'backstage.io/v1alpha1', + kind: 'User', + metadata: { + name: 'githubuser', + annotations: { + 'backstage.io/managed-by-location': + 'url:https://github.com/githubuser', + 'backstage.io/managed-by-origin-location': + 'url:https://github.com/githubuser', + 'github.com/user-login': 'githubuser', + }, + }, + spec: { + memberOf: [], + profile: { + displayName: 'githubuser', + email: 'user1@test.com', + picture: 'https://avatars.githubusercontent.com/u/83820368', + }, + }, + }; + + const event: EventParams = { + topic: 'github.organization', + eventPayload: { + action: 'member_added', + membership: { + user: { + name: 'githubuser', + login: 'githubuser', + avatar_url: 'https://avatars.githubusercontent.com/u/83820368', + email: 'user1@test.com', + }, + }, + organization: { + login: 'test-org', + }, + }, + }; + + await entityProvider.onEvent(event); + + expect(entityProviderConnection.applyMutation).toHaveBeenCalledTimes(1); + expect(entityProviderConnection.applyMutation).toHaveBeenCalledWith({ + type: 'delta', + added: [ + { + locationKey: 'github-org-provider:my-id', + entity: expectedEntity, + }, + ], + removed: [], + }); + }); + + it('should apply delta removed on receive a removed member in the organization', async () => { + const entityProviderConnection: EntityProviderConnection = { + applyMutation: jest.fn(), + refresh: jest.fn(), + }; + + const logger = getVoidLogger(); + const gitHubConfig: GithubIntegrationConfig = { + host: 'github.com', + }; + + const mockGetCredentials = jest.fn().mockReturnValue({ + headers: { token: 'blah' }, + type: 'app', + }); + + const githubCredentialsProvider: GithubCredentialsProvider = { + getCredentials: mockGetCredentials, + }; + + const entityProvider = new GithubOrgEntityProvider({ + id: 'my-id', + githubCredentialsProvider, + orgUrl: 'https://github.com/backstage', + gitHubConfig, + logger, + }); + + entityProvider.connect(entityProviderConnection); + + const expectedEntity = { + apiVersion: 'backstage.io/v1alpha1', + kind: 'User', + metadata: { + name: 'githubuser', + annotations: { + 'backstage.io/managed-by-location': + 'url:https://github.com/githubuser', + 'backstage.io/managed-by-origin-location': + 'url:https://github.com/githubuser', + 'github.com/user-login': 'githubuser', + }, + }, + spec: { + memberOf: [], + profile: { + displayName: 'githubuser', + email: 'user1@test.com', + picture: 'https://avatars.githubusercontent.com/u/83820368', + }, + }, + }; + + const event: EventParams = { + topic: 'github.organization', + eventPayload: { + action: 'member_removed', + membership: { + user: { + name: 'githubuser', + login: 'githubuser', + avatar_url: 'https://avatars.githubusercontent.com/u/83820368', + email: 'user1@test.com', + }, + }, + organization: { + login: 'test-org', + }, + }, + }; + + await entityProvider.onEvent(event); + + expect(entityProviderConnection.applyMutation).toHaveBeenCalledTimes(1); + expect(entityProviderConnection.applyMutation).toHaveBeenCalledWith({ + type: 'delta', + removed: [ + { + locationKey: 'github-org-provider:my-id', + entity: expectedEntity, + }, + ], + added: [], + }); + }); + + it('should apply delta added on receive a created team', async () => { + const entityProviderConnection: EntityProviderConnection = { + applyMutation: jest.fn(), + refresh: jest.fn(), + }; + + const logger = getVoidLogger(); + const gitHubConfig: GithubIntegrationConfig = { + host: 'github.com', + }; + + const mockGetCredentials = jest.fn().mockReturnValue({ + headers: { token: 'blah' }, + type: 'app', + }); + + const githubCredentialsProvider: GithubCredentialsProvider = { + getCredentials: mockGetCredentials, + }; + + const entityProvider = new GithubOrgEntityProvider({ + id: 'my-id', + githubCredentialsProvider, + orgUrl: 'https://github.com/backstage', + gitHubConfig, + logger, + }); + + entityProvider.connect(entityProviderConnection); + + const expectedEntity = { + apiVersion: 'backstage.io/v1alpha1', + kind: 'Group', + metadata: { + name: 'new-team', + description: 'description from the new team', + annotations: { + 'backstage.io/edit-url': + 'https://github.com/orgs/test-org/teams/new-team/edit', + 'backstage.io/managed-by-location': + 'url:https://github.com/orgs/test-org/teams/new-team', + 'backstage.io/managed-by-origin-location': + 'url:https://github.com/orgs/test-org/teams/new-team', + 'github.com/team-slug': 'test-org/new-team', + }, + }, + spec: { + type: 'team', + children: [], + members: [], + parent: 'father-team', + profile: { + displayName: 'New Team', + }, + }, + }; + + const event: EventParams = { + topic: 'github.team', + eventPayload: { + action: 'created', + team: { + name: 'New Team', + slug: 'new-team', + description: 'description from the new team', + html_url: 'https://github.com/orgs/test-org/teams/new-team', + parent: { + slug: 'father-team', + }, + }, + organization: { + login: 'test-org', + }, + }, + }; + + await entityProvider.onEvent(event); + + expect(entityProviderConnection.applyMutation).toHaveBeenCalledTimes(1); + expect(entityProviderConnection.applyMutation).toHaveBeenCalledWith({ + type: 'delta', + added: [ + { + locationKey: 'github-org-provider:my-id', + entity: expectedEntity, + }, + ], + removed: [], + }); + }); + + it('should apply delta removed on receive a deleted team', async () => { + const entityProviderConnection: EntityProviderConnection = { + applyMutation: jest.fn(), + refresh: jest.fn(), + }; + + const logger = getVoidLogger(); + const gitHubConfig: GithubIntegrationConfig = { + host: 'github.com', + }; + + const mockGetCredentials = jest.fn().mockReturnValue({ + headers: { token: 'blah' }, + type: 'app', + }); + + const githubCredentialsProvider: GithubCredentialsProvider = { + getCredentials: mockGetCredentials, + }; + + const entityProvider = new GithubOrgEntityProvider({ + id: 'my-id', + githubCredentialsProvider, + orgUrl: 'https://github.com/backstage', + gitHubConfig, + logger, + }); + + entityProvider.connect(entityProviderConnection); + + const expectedEntity = { + apiVersion: 'backstage.io/v1alpha1', + kind: 'Group', + metadata: { + name: 'new-team', + description: 'description from the new team', + annotations: { + 'backstage.io/edit-url': + 'https://github.com/orgs/test-org/teams/new-team/edit', + 'backstage.io/managed-by-location': + 'url:https://github.com/orgs/test-org/teams/new-team', + 'backstage.io/managed-by-origin-location': + 'url:https://github.com/orgs/test-org/teams/new-team', + 'github.com/team-slug': 'test-org/new-team', + }, + }, + spec: { + type: 'team', + children: [], + members: [], + parent: 'father-team', + profile: { + displayName: 'New Team', + }, + }, + }; + + const event: EventParams = { + topic: 'github.team', + eventPayload: { + action: 'deleted', + team: { + databaseId: 1, + name: 'New Team', + slug: 'new-team', + description: 'description from the new team', + html_url: 'https://github.com/orgs/test-org/teams/new-team', + parent: { + slug: 'father-team', + }, + }, + organization: { + login: 'test-org', + }, + }, + }; + + await entityProvider.onEvent(event); + + expect(entityProviderConnection.applyMutation).toHaveBeenCalledTimes(1); + expect(entityProviderConnection.applyMutation).toHaveBeenCalledWith({ + type: 'delta', + removed: [ + { + locationKey: 'github-org-provider:my-id', + entity: expectedEntity, + }, + ], + added: [], + }); + }); + + it('should apply delta on receive a edited team', async () => { + const entityProviderConnection: EntityProviderConnection = { + applyMutation: jest.fn(), + refresh: jest.fn(), + }; + + const logger = getVoidLogger(); + const gitHubConfig: GithubIntegrationConfig = { + host: 'github.com', + }; + + const mockGetCredentials = jest.fn().mockReturnValue({ + headers: { token: 'blah' }, + type: 'app', + }); + + const githubCredentialsProvider: GithubCredentialsProvider = { + getCredentials: mockGetCredentials, + }; + + const entityProvider = new GithubOrgEntityProvider({ + id: 'my-id', + githubCredentialsProvider, + orgUrl: 'https://github.com/backstage', + gitHubConfig, + logger, + }); + + const mockClient = jest.fn(); + + mockClient + .mockResolvedValueOnce({ + organization: { + team: { + slug: 'team', + combinedSlug: 'blah/team', + name: 'Team', + description: 'The one and only team', + avatarUrl: 'http://example.com/team.jpeg', + parentTeam: { + slug: 'parent', + combinedSlug: '', + members: { pageInfo: { hasNextPage: false }, nodes: [] }, + }, + members: { + pageInfo: { hasNextPage: false }, + nodes: [{ login: 'a' }, { login: 'githubuser' }], + }, + }, + }, + }) + .mockResolvedValueOnce({ + organization: { + membersWithRole: { + pageInfo: { hasNextPage: false }, + nodes: [ + { + login: 'a', + name: 'b', + bio: 'c', + email: 'd', + avatarUrl: 'e', + }, + { + login: 'githubuser', + name: 'githubuser', + bio: 'githubuser', + email: 'd', + avatarUrl: 'e', + }, + ], + }, + }, + }) + .mockResolvedValueOnce({ + organization: { + teams: { + pageInfo: { hasNextPage: false }, + nodes: [ + { + slug: 'team', + combinedSlug: 'blah/team', + name: 'Team', + description: 'The one and only team', + avatarUrl: 'http://example.com/team.jpeg', + parentTeam: { + slug: 'parent', + combinedSlug: '', + members: { pageInfo: { hasNextPage: false }, nodes: [] }, + }, + members: { + pageInfo: { hasNextPage: false }, + nodes: [{ login: 'a' }, { login: 'githubuser' }], + }, + }, + ], + }, + }, + }); + + (graphql.defaults as jest.Mock).mockReturnValue(mockClient); + + entityProvider.connect(entityProviderConnection); + + const event: EventParams = { + topic: 'github.team', + eventPayload: { + action: 'edited', + changes: { + name: { + from: 'mygroup with spaces', + }, + }, + team: { + node_id: 'xpto', + name: 'New Team', + slug: 'new-team', + description: 'description from the new team', + html_url: 'https://github.com/orgs/test-org/teams/new-team', + parent: { + slug: 'father-team', + }, + }, + organization: { + login: 'test-org', + }, + }, + }; + + await entityProvider.onEvent(event); + await new Promise(process.nextTick); + + expect(entityProviderConnection.applyMutation).toHaveBeenCalledTimes(1); + expect(entityProviderConnection.applyMutation).toHaveBeenCalledWith({ + added: [ + { + locationKey: 'github-org-provider:my-id', + entity: { + metadata: { + annotations: { + 'backstage.io/managed-by-location': + 'url:https://github.com/a', + 'backstage.io/managed-by-origin-location': + 'url:https://github.com/a', + 'github.com/user-login': 'a', + }, + name: 'a', + description: 'c', + }, + apiVersion: 'backstage.io/v1alpha1', + kind: 'User', + spec: { + profile: { + displayName: 'b', + email: 'd', + picture: 'e', + }, + memberOf: ['team'], + }, + }, + }, + { + locationKey: 'github-org-provider:my-id', + entity: { + metadata: { + annotations: { + 'backstage.io/managed-by-location': + 'url:https://github.com/githubuser', + 'backstage.io/managed-by-origin-location': + 'url:https://github.com/githubuser', + 'github.com/user-login': 'githubuser', + }, + name: 'githubuser', + description: 'githubuser', + }, + apiVersion: 'backstage.io/v1alpha1', + kind: 'User', + spec: { + profile: { + displayName: 'githubuser', + email: 'd', + picture: 'e', + }, + memberOf: ['team'], + }, + }, + }, + { + locationKey: 'github-org-provider:my-id', + entity: { + metadata: { + annotations: { + 'backstage.io/managed-by-location': + 'url:https://github.com/orgs/backstage/teams/team', + 'backstage.io/managed-by-origin-location': + 'url:https://github.com/orgs/backstage/teams/team', + 'github.com/team-slug': 'blah/team', + }, + name: 'team', + description: 'The one and only team', + }, + apiVersion: 'backstage.io/v1alpha1', + kind: 'Group', + spec: { + type: 'team', + profile: { + displayName: 'Team', + picture: 'http://example.com/team.jpeg', + }, + children: [], + parent: 'parent', + members: ['a', 'githubuser'], + }, + }, + }, + ], + removed: [ + { + locationKey: 'github-org-provider:my-id', + entity: { + metadata: { + annotations: { + 'backstage.io/managed-by-location': + 'url:https://github.com/orgs/backstage/teams/mygroup-with-spaces', + 'backstage.io/managed-by-origin-location': + 'url:https://github.com/orgs/backstage/teams/mygroup-with-spaces', + }, + name: 'mygroup-with-spaces', + }, + apiVersion: 'backstage.io/v1alpha1', + kind: 'Group', + spec: { + type: 'team', + profile: { + displayName: 'Team', + picture: 'http://example.com/team.jpeg', + }, + children: [], + parent: 'parent', + members: ['a', 'githubuser'], + }, + }, + }, + ], + type: 'delta', + }); + }); + + it('should apply delta on receive a membership added', async () => { + const entityProviderConnection: EntityProviderConnection = { + applyMutation: jest.fn(), + refresh: jest.fn(), + }; + + const logger = getVoidLogger(); + const gitHubConfig: GithubIntegrationConfig = { + host: 'github.com', + }; + + const mockGetCredentials = jest.fn().mockReturnValue({ + headers: { token: 'blah' }, + type: 'app', + }); + + const githubCredentialsProvider: GithubCredentialsProvider = { + getCredentials: mockGetCredentials, + }; + + const entityProvider = new GithubOrgEntityProvider({ + id: 'my-id', + githubCredentialsProvider, + orgUrl: 'https://github.com/backstage', + gitHubConfig, + logger, + }); + + const mockClient = jest.fn(); + + mockClient + .mockResolvedValueOnce({ + organization: { + team: { + slug: 'team', + combinedSlug: 'blah/team', + name: 'Team', + description: 'The one and only team', + avatarUrl: 'http://example.com/team.jpeg', + parentTeam: { + slug: 'parent', + combinedSlug: '', + members: { pageInfo: { hasNextPage: false }, nodes: [] }, + }, + members: { + pageInfo: { hasNextPage: false }, + nodes: [{ login: 'a' }, { login: 'githubuser' }], + }, + }, + }, + }) + .mockResolvedValueOnce({ + organization: { + membersWithRole: { + pageInfo: { hasNextPage: false }, + nodes: [ + { + login: 'a', + name: 'b', + bio: 'c', + email: 'd', + avatarUrl: 'e', + }, + { + login: 'githubuser', + name: 'githubuser', + bio: 'githubuser', + email: 'd', + avatarUrl: 'e', + }, + ], + }, + }, + }) + .mockResolvedValueOnce({ + organization: { + teams: { + pageInfo: { hasNextPage: false }, + nodes: [ + { + slug: 'team', + combinedSlug: 'blah/team', + name: 'Team', + description: 'The one and only team', + avatarUrl: 'http://example.com/team.jpeg', + parentTeam: { + slug: 'parent', + combinedSlug: '', + members: { pageInfo: { hasNextPage: false }, nodes: [] }, + }, + members: { + pageInfo: { hasNextPage: false }, + nodes: [{ login: 'a' }, { login: 'githubuser' }], + }, + }, + ], + }, + }, + }); + + (graphql.defaults as jest.Mock).mockReturnValue(mockClient); + entityProvider.connect(entityProviderConnection); + + const event: EventParams = { + topic: 'github.membership', + eventPayload: { + action: 'added', + team: { + name: 'New Team', + slug: 'new-team', + description: 'description from the new team', + html_url: 'https://github.com/orgs/test-org/teams/new-team', + parent: { + slug: 'father-team', + }, + }, + member: { + login: 'githubuser', + }, + organization: { + login: 'test-org', + }, + }, + }; + + await entityProvider.onEvent(event); + await new Promise(process.nextTick); + + expect(entityProviderConnection.applyMutation).toHaveBeenCalledTimes(1); + expect(entityProviderConnection.applyMutation).toHaveBeenCalledWith({ + added: [ + { + locationKey: 'github-org-provider:my-id', + entity: { + metadata: { + annotations: { + 'backstage.io/managed-by-location': + 'url:https://github.com/githubuser', + 'backstage.io/managed-by-origin-location': + 'url:https://github.com/githubuser', + 'github.com/user-login': 'githubuser', + }, + name: 'githubuser', + description: 'githubuser', + }, + apiVersion: 'backstage.io/v1alpha1', + kind: 'User', + spec: { + profile: { + displayName: 'githubuser', + email: 'd', + picture: 'e', + }, + memberOf: ['team'], + }, + }, + }, + { + locationKey: 'github-org-provider:my-id', + entity: { + metadata: { + annotations: { + 'backstage.io/managed-by-location': + 'url:https://github.com/orgs/backstage/teams/team', + 'backstage.io/managed-by-origin-location': + 'url:https://github.com/orgs/backstage/teams/team', + 'github.com/team-slug': 'blah/team', + }, + name: 'team', + description: 'The one and only team', + }, + apiVersion: 'backstage.io/v1alpha1', + kind: 'Group', + spec: { + type: 'team', + profile: { + displayName: 'Team', + picture: 'http://example.com/team.jpeg', + }, + children: [], + parent: 'parent', + members: ['a', 'githubuser'], + }, + }, + }, + ], + removed: [ + { + locationKey: 'github-org-provider:my-id', + entity: { + metadata: { + annotations: { + 'backstage.io/managed-by-location': + 'url:https://github.com/githubuser', + 'backstage.io/managed-by-origin-location': + 'url:https://github.com/githubuser', + 'github.com/user-login': 'githubuser', + }, + name: 'githubuser', + description: 'githubuser', + }, + apiVersion: 'backstage.io/v1alpha1', + kind: 'User', + spec: { + profile: { + displayName: 'githubuser', + email: 'd', + picture: 'e', + }, + memberOf: ['team'], + }, + }, + }, + { + locationKey: 'github-org-provider:my-id', + entity: { + metadata: { + annotations: { + 'backstage.io/managed-by-location': + 'url:https://github.com/orgs/backstage/teams/team', + 'backstage.io/managed-by-origin-location': + 'url:https://github.com/orgs/backstage/teams/team', + 'github.com/team-slug': 'blah/team', + }, + name: 'team', + description: 'The one and only team', + }, + apiVersion: 'backstage.io/v1alpha1', + kind: 'Group', + spec: { + type: 'team', + profile: { + displayName: 'Team', + picture: 'http://example.com/team.jpeg', + }, + children: [], + parent: 'parent', + members: ['a', 'githubuser'], + }, + }, + }, + ], + type: 'delta', + }); + }); + + it('should apply delta on receive a membership removed', async () => { + const entityProviderConnection: EntityProviderConnection = { + applyMutation: jest.fn(), + refresh: jest.fn(), + }; + + const logger = getVoidLogger(); + const gitHubConfig: GithubIntegrationConfig = { + host: 'github.com', + }; + + const mockGetCredentials = jest.fn().mockReturnValue({ + headers: { token: 'blah' }, + type: 'app', + }); + + const githubCredentialsProvider: GithubCredentialsProvider = { + getCredentials: mockGetCredentials, + }; + + const entityProvider = new GithubOrgEntityProvider({ + id: 'my-id', + githubCredentialsProvider, + orgUrl: 'https://github.com/backstage', + gitHubConfig, + logger, + }); + + const mockClient = jest.fn(); + + mockClient + .mockResolvedValueOnce({ + organization: { + team: { + slug: 'team', + combinedSlug: 'blah/team', + name: 'Team', + description: 'The one and only team', + avatarUrl: 'http://example.com/team.jpeg', + parentTeam: { + slug: 'parent', + combinedSlug: '', + members: { pageInfo: { hasNextPage: false }, nodes: [] }, + }, + members: { + pageInfo: { hasNextPage: false }, + nodes: [{ login: 'a' }], + }, + }, + }, + }) + .mockResolvedValueOnce({ + organization: { + membersWithRole: { + pageInfo: { hasNextPage: false }, + nodes: [ + { + login: 'githubuser', + name: 'githubuser', + bio: 'githubuser', + email: 'd', + avatarUrl: 'e', + }, + ], + }, + }, + }) + .mockResolvedValueOnce({ + organization: { + teams: { + pageInfo: { hasNextPage: false }, + nodes: [], + }, + }, + }); + + (graphql.defaults as jest.Mock).mockReturnValue(mockClient); + entityProvider.connect(entityProviderConnection); + + const event: EventParams = { + topic: 'github.membership', + eventPayload: { + action: 'removed', + team: { + name: 'New Team', + slug: 'new-team', + description: 'description from the new team', + html_url: 'https://github.com/orgs/test-org/teams/new-team', + parent: { + slug: 'father-team', + }, + }, + member: { + login: 'githubuser', + }, + organization: { + login: 'test-org', + }, + }, + }; + + await entityProvider.onEvent(event); + await new Promise(process.nextTick); + + expect(entityProviderConnection.applyMutation).toHaveBeenCalledTimes(1); + expect(entityProviderConnection.applyMutation).toHaveBeenCalledWith({ + added: [ + { + locationKey: 'github-org-provider:my-id', + entity: { + metadata: { + annotations: { + 'backstage.io/managed-by-location': + 'url:https://github.com/githubuser', + 'backstage.io/managed-by-origin-location': + 'url:https://github.com/githubuser', + 'github.com/user-login': 'githubuser', + }, + name: 'githubuser', + description: 'githubuser', + }, + apiVersion: 'backstage.io/v1alpha1', + kind: 'User', + spec: { + profile: { + displayName: 'githubuser', + email: 'd', + picture: 'e', + }, + memberOf: [], + }, + }, + }, + { + locationKey: 'github-org-provider:my-id', + entity: { + metadata: { + annotations: { + 'backstage.io/managed-by-location': + 'url:https://github.com/orgs/backstage/teams/team', + 'backstage.io/managed-by-origin-location': + 'url:https://github.com/orgs/backstage/teams/team', + 'github.com/team-slug': 'blah/team', + }, + name: 'team', + description: 'The one and only team', + }, + apiVersion: 'backstage.io/v1alpha1', + kind: 'Group', + spec: { + type: 'team', + profile: { + displayName: 'Team', + picture: 'http://example.com/team.jpeg', + }, + children: [], + parent: 'parent', + members: ['a'], + }, + }, + }, + ], + removed: [ + { + locationKey: 'github-org-provider:my-id', + entity: { + metadata: { + annotations: { + 'backstage.io/managed-by-location': + 'url:https://github.com/githubuser', + 'backstage.io/managed-by-origin-location': + 'url:https://github.com/githubuser', + 'github.com/user-login': 'githubuser', + }, + name: 'githubuser', + description: 'githubuser', + }, + apiVersion: 'backstage.io/v1alpha1', + kind: 'User', + spec: { + profile: { + displayName: 'githubuser', + email: 'd', + picture: 'e', + }, + memberOf: [], + }, + }, + }, + { + locationKey: 'github-org-provider:my-id', + entity: { + metadata: { + annotations: { + 'backstage.io/managed-by-location': + 'url:https://github.com/orgs/backstage/teams/team', + 'backstage.io/managed-by-origin-location': + 'url:https://github.com/orgs/backstage/teams/team', + 'github.com/team-slug': 'blah/team', + }, + name: 'team', + description: 'The one and only team', + }, + apiVersion: 'backstage.io/v1alpha1', + kind: 'Group', + spec: { + type: 'team', + profile: { + displayName: 'Team', + picture: 'http://example.com/team.jpeg', + }, + children: [], + parent: 'parent', + members: ['a'], + }, + }, + }, + ], + type: 'delta', + }); + }); + }); }); diff --git a/plugins/catalog-backend-module-github/src/providers/GithubOrgEntityProvider.ts b/plugins/catalog-backend-module-github/src/providers/GithubOrgEntityProvider.ts index 210df46363..46ad089625 100644 --- a/plugins/catalog-backend-module-github/src/providers/GithubOrgEntityProvider.ts +++ b/plugins/catalog-backend-module-github/src/providers/GithubOrgEntityProvider.ts @@ -28,22 +28,43 @@ import { ScmIntegrations, SingleInstanceGithubCredentialsProvider, } from '@backstage/integration'; +import { EventParams } from '@backstage/plugin-events-node'; +import { EventSubscriber } from '@backstage/plugin-events-node'; import { EntityProvider, EntityProviderConnection, } from '@backstage/plugin-catalog-backend'; import { graphql } from '@octokit/graphql'; +import { + OrganizationEvent, + OrganizationMemberAddedEvent, + OrganizationMemberRemovedEvent, + TeamEvent, + TeamEditedEvent, + MembershipEvent, +} from '@octokit/webhooks-types'; import { merge } from 'lodash'; import * as uuid from 'uuid'; import { Logger } from 'winston'; import { assignGroupsToUsers, buildOrgHierarchy, + defaultOrganizationTeamTransformer, + defaultUserTransformer, getOrganizationTeams, getOrganizationUsers, + GithubTeam, parseGithubOrgUrl, } from '../lib'; -import { TeamTransformer, UserTransformer } from '../lib/defaultTransformers'; +import { TeamTransformer, UserTransformer } from '../lib'; +import { + createAddEntitiesOperation, + createRemoveEntitiesOperation, + createReplaceEntitiesOperation, + DeferredEntitiesBuilder, + getOrganizationTeam, + getOrganizationTeamsFromUsers, +} from '../lib/github'; /** * Options for {@link GithubOrgEntityProvider}. @@ -101,13 +122,14 @@ export interface GithubOrgEntityProviderOptions { teamTransformer?: TeamTransformer; } -// TODO: Consider supporting an (optional) webhook that reacts on org changes /** * Ingests org data (users and groups) from GitHub. * * @public */ -export class GithubOrgEntityProvider implements EntityProvider { +export class GithubOrgEntityProvider + implements EntityProvider, EventSubscriber +{ private readonly credentialsProvider: GithubCredentialsProvider; private connection?: EntityProviderConnection; private scheduleFn?: () => Promise; @@ -224,6 +246,306 @@ export class GithubOrgEntityProvider implements EntityProvider { markCommitComplete(); } + /** {@inheritdoc @backstage/plugin-events-node#EventSubscriber.onEvent} */ + async onEvent(params: EventParams): Promise { + const { logger } = this.options; + logger.debug(`Received event from ${params.topic}`); + + const addEntitiesOperation = createAddEntitiesOperation( + this.options.id, + this.options.gitHubConfig.host, + ); + const removeEntitiesOperation = createRemoveEntitiesOperation( + this.options.id, + this.options.gitHubConfig.host, + ); + + const replaceEntitiesOperation = createReplaceEntitiesOperation( + this.options.id, + this.options.gitHubConfig.host, + ); + + // handle change users in the org + // https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#organization + if (params.topic.includes('organization')) { + const orgEvent = params.eventPayload as OrganizationEvent; + + if ( + orgEvent.action === 'member_added' || + orgEvent.action === 'member_removed' + ) { + const createDeltaOperation = + orgEvent.action === 'member_added' + ? addEntitiesOperation + : removeEntitiesOperation; + await this.onMemberChangeInOrganization(orgEvent, createDeltaOperation); + } + } + + // handle change teams in the org + // https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#team + if (params.topic.includes('team')) { + const teamEvent = params.eventPayload as TeamEvent; + if (teamEvent.action === 'created' || teamEvent.action === 'deleted') { + const createDeltaOperation = + teamEvent.action === 'created' + ? addEntitiesOperation + : removeEntitiesOperation; + await this.onTeamChangeInOrganization(teamEvent, createDeltaOperation); + } else if (teamEvent.action === 'edited') { + await this.onTeamEditedInOrganization( + teamEvent, + replaceEntitiesOperation, + ); + } + } + + // handle change membership in the org + // https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#membership + if (params.topic.includes('membership')) { + const membershipEvent = params.eventPayload as MembershipEvent; + this.onMembershipChangedInOrganization( + membershipEvent, + replaceEntitiesOperation, + ); + } + + return; + } + + /** {@inheritdoc @backstage/plugin-events-node#EventSubscriber.supportsEventTopics} */ + supportsEventTopics(): string[] { + return ['github.organization', 'github.team', 'github.membership']; + } + + private async onTeamEditedInOrganization( + event: TeamEditedEvent, + createDeltaOperation: DeferredEntitiesBuilder, + ) { + if (!this.connection) { + throw new Error('Not initialized'); + } + + const teamSlug = event.team.slug; + const { headers, type: tokenType } = + await this.credentialsProvider.getCredentials({ + url: this.options.orgUrl, + }); + const client = graphql.defaults({ + baseUrl: this.options.gitHubConfig.apiBaseUrl, + headers, + }); + + const { org } = parseGithubOrgUrl(this.options.orgUrl); + const { group } = await getOrganizationTeam( + client, + org, + teamSlug, + this.options.teamTransformer, + ); + + const { users } = await getOrganizationUsers( + client, + org, + tokenType, + this.options.userTransformer, + ); + + const usersFromChangedGroup = group.spec.members || []; + const usersToRebuild = users.filter(u => + usersFromChangedGroup.includes(u.metadata.name), + ); + + const { groups } = await getOrganizationTeamsFromUsers( + client, + org, + usersToRebuild.map(u => u.metadata.name), + this.options.teamTransformer, + ); + + assignGroupsToUsers(usersToRebuild, groups); + buildOrgHierarchy(groups); + + const oldName = event.changes.name?.from || ''; + const oldSlug = oldName.toLowerCase().replaceAll(/\s/gi, '-'); + + const { removed } = createDeltaOperation(org, [ + { + ...group, + metadata: { + name: oldSlug, + }, + }, + ]); + const { added } = createDeltaOperation(org, [...usersToRebuild, ...groups]); + await this.connection.applyMutation({ + type: 'delta', + removed, + added, + }); + } + + private async onMembershipChangedInOrganization( + event: MembershipEvent, + createDeltaOperation: DeferredEntitiesBuilder, + ) { + if (!this.connection) { + throw new Error('Not initialized'); + } + + // The docs are saying I will receive the slug for the removed event, + // but the types don't reflect that, + // so I will just check to be sure the slug is there + // https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#membership + if (!('slug' in event.team)) { + return; + } + + const teamSlug = event.team.slug; + const userLogin = event.member.login; + const { headers, type: tokenType } = + await this.credentialsProvider.getCredentials({ + url: this.options.orgUrl, + }); + const client = graphql.defaults({ + baseUrl: this.options.gitHubConfig.apiBaseUrl, + headers, + }); + + const { org } = parseGithubOrgUrl(this.options.orgUrl); + const { group } = await getOrganizationTeam( + client, + org, + teamSlug, + this.options.teamTransformer, + ); + + const { users } = await getOrganizationUsers( + client, + org, + tokenType, + this.options.userTransformer, + ); + + const usersToRebuild = users.filter(u => u.metadata.name === userLogin); + + const { groups } = await getOrganizationTeamsFromUsers( + client, + org, + [userLogin], + this.options.teamTransformer, + ); + + // we include group because the removed event need to update the old group too + if (!groups.some(g => g.metadata.name === group.metadata.name)) { + groups.push(group); + } + + assignGroupsToUsers(usersToRebuild, groups); + buildOrgHierarchy(groups); + + const { added, removed } = createDeltaOperation(org, [ + ...usersToRebuild, + ...groups, + ]); + await this.connection.applyMutation({ + type: 'delta', + removed, + added, + }); + } + + private async onTeamChangeInOrganization( + event: TeamEvent, + createDeltaOperation: DeferredEntitiesBuilder, + ) { + if (!this.connection) { + throw new Error('Not initialized'); + } + + const organizationTeamTransformer = + this.options.teamTransformer || defaultOrganizationTeamTransformer; + const { name, html_url: url, description, slug } = event.team; + const org = event.organization.login; + const { headers } = await this.credentialsProvider.getCredentials({ + url: this.options.orgUrl, + }); + const client = graphql.defaults({ + baseUrl: this.options.gitHubConfig.apiBaseUrl, + headers, + }); + + const group = (await organizationTeamTransformer( + { + name, + slug, + editTeamUrl: `${url}/edit`, + combinedSlug: `${org}/${slug}`, + description: description || undefined, + parentTeam: { slug: event.team?.parent?.slug || '' } as GithubTeam, + // entity will be removed + members: [], + }, + { + org, + client, + query: '', + }, + )) as Entity; + + const { added, removed } = createDeltaOperation(org, [group]); + + await this.connection.applyMutation({ + type: 'delta', + removed, + added, + }); + } + + private async onMemberChangeInOrganization( + event: OrganizationMemberAddedEvent | OrganizationMemberRemovedEvent, + createDeltaOperation: DeferredEntitiesBuilder, + ) { + if (!this.connection) { + throw new Error('Not initialized'); + } + + const userTransformer = + this.options.userTransformer || defaultUserTransformer; + const { name, avatar_url: avatarUrl, email, login } = event.membership.user; + const org = event.organization.login; + const { headers } = await this.credentialsProvider.getCredentials({ + url: this.options.orgUrl, + }); + const client = graphql.defaults({ + baseUrl: this.options.gitHubConfig.apiBaseUrl, + headers, + }); + + const user = (await userTransformer( + { + name, + avatarUrl, + login, + email: email || undefined, + // we don't have this information in the event, so the refresh will handle that for us + organizationVerifiedDomainEmails: [], + }, + { + org, + client, + query: '', + }, + )) as Entity; + + const { added, removed } = createDeltaOperation(org, [user]); + await this.connection.applyMutation({ + type: 'delta', + removed, + added, + }); + } + private schedule(schedule: GithubOrgEntityProviderOptions['schedule']) { if (!schedule || schedule === 'manual') { return; diff --git a/plugins/catalog-backend-module-gitlab/CHANGELOG.md b/plugins/catalog-backend-module-gitlab/CHANGELOG.md index ade90d90a2..85b007d7b9 100644 --- a/plugins/catalog-backend-module-gitlab/CHANGELOG.md +++ b/plugins/catalog-backend-module-gitlab/CHANGELOG.md @@ -1,5 +1,39 @@ # @backstage/plugin-catalog-backend-module-gitlab +## 0.1.11-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/plugin-catalog-node@1.3.1-next.0 + +## 0.1.10 + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + ## 0.1.10-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-gitlab/package.json b/plugins/catalog-backend-module-gitlab/package.json index ac0ac4aa1d..6c3509e22c 100644 --- a/plugins/catalog-backend-module-gitlab/package.json +++ b/plugins/catalog-backend-module-gitlab/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-gitlab", "description": "A Backstage catalog backend module that helps integrate towards GitLab", - "version": "0.1.10-next.3", + "version": "0.1.11-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-incremental-ingestion/CHANGELOG.md b/plugins/catalog-backend-module-incremental-ingestion/CHANGELOG.md index 8b246385bd..7405ad98cb 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/CHANGELOG.md +++ b/plugins/catalog-backend-module-incremental-ingestion/CHANGELOG.md @@ -1,5 +1,55 @@ # @backstage/plugin-catalog-backend-module-incremental-ingestion +## 0.1.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/backend-test-utils@0.1.32-next.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-node@1.3.1-next.0 + - @backstage/plugin-permission-common@0.7.2 + +## 0.1.0 + +### Minor Changes + +- 98c643a1a2: Introduces incremental entity providers, which are used for streaming very large data sources into the catalog. + +### Patch Changes + +- c507aee8a2: Ensured typescript type checks in migration files. +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- de8a975911: Changed to use native `AbortController` and `AbortSignal` from Node.js, instead + of the one from `node-abort-controller`. This is possible now that the minimum + supported Node.js version of the project is 16. + + Note that their interfaces are very slightly different, but typically not in a + way that matters to consumers. If you see any typescript errors as a direct + result from this, they are compatible with each other in the ways that we + interact with them, and should be possible to type-cast across without ill + effects. + +- 05a928e296: Updated usages of types from `@backstage/backend-plugin-api`. +- 61d4efe978: Make incremental providers more resilient to failures +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/backend-test-utils@0.1.31 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + ## 0.1.0-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-incremental-ingestion/package.json b/plugins/catalog-backend-module-incremental-ingestion/package.json index d7a5ae7470..5d0e0b02e0 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/package.json +++ b/plugins/catalog-backend-module-incremental-ingestion/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-incremental-ingestion", "description": "An entity provider for streaming large asset sources into the catalog", - "version": "0.1.0-next.3", + "version": "0.1.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-ldap/CHANGELOG.md b/plugins/catalog-backend-module-ldap/CHANGELOG.md index aa2d15b1ce..a78753d1eb 100644 --- a/plugins/catalog-backend-module-ldap/CHANGELOG.md +++ b/plugins/catalog-backend-module-ldap/CHANGELOG.md @@ -1,5 +1,29 @@ # @backstage/plugin-catalog-backend-module-ldap +## 0.5.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + +## 0.5.6 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + ## 0.5.6-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-ldap/package.json b/plugins/catalog-backend-module-ldap/package.json index 68268f657f..ffc4c53711 100644 --- a/plugins/catalog-backend-module-ldap/package.json +++ b/plugins/catalog-backend-module-ldap/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-ldap", "description": "A Backstage catalog backend module that helps integrate towards LDAP", - "version": "0.5.6-next.3", + "version": "0.5.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-msgraph/CHANGELOG.md b/plugins/catalog-backend-module-msgraph/CHANGELOG.md index e26b6801c0..71ed866eaa 100644 --- a/plugins/catalog-backend-module-msgraph/CHANGELOG.md +++ b/plugins/catalog-backend-module-msgraph/CHANGELOG.md @@ -1,5 +1,31 @@ # @backstage/plugin-catalog-backend-module-msgraph +## 0.4.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/plugin-catalog-node@1.3.1-next.0 + +## 0.4.5 + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + ## 0.4.5-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-msgraph/package.json b/plugins/catalog-backend-module-msgraph/package.json index e38a1c3a09..bcc402d55f 100644 --- a/plugins/catalog-backend-module-msgraph/package.json +++ b/plugins/catalog-backend-module-msgraph/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-msgraph", "description": "A Backstage catalog backend module that helps integrate towards Microsoft Graph", - "version": "0.4.5-next.3", + "version": "0.4.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-openapi/CHANGELOG.md b/plugins/catalog-backend-module-openapi/CHANGELOG.md index c087d239dd..cd92eedb88 100644 --- a/plugins/catalog-backend-module-openapi/CHANGELOG.md +++ b/plugins/catalog-backend-module-openapi/CHANGELOG.md @@ -1,5 +1,32 @@ # @backstage/plugin-catalog-backend-module-openapi +## 0.1.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/plugin-catalog-node@1.3.1-next.0 + +## 0.1.5 + +### Patch Changes + +- dd995cdc72: Enabled support of resolving `$refs` in all kind of yaml documents, not only OpenAPI. This implicitly adds `$ref` resolving support for AsyncAPI specs. Thus, the `openApiPlaceholderResolver` has been renamed to `jsonSchemaRefPlaceholderResolver`. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + ## 0.1.5-next.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-openapi/package.json b/plugins/catalog-backend-module-openapi/package.json index 2791f54678..54c6f3bd5c 100644 --- a/plugins/catalog-backend-module-openapi/package.json +++ b/plugins/catalog-backend-module-openapi/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-openapi", "description": "A Backstage catalog backend module that helps with OpenAPI specifications", - "version": "0.1.5-next.3", + "version": "0.1.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-openapi/src/OpenApiRefProcessor.ts b/plugins/catalog-backend-module-openapi/src/OpenApiRefProcessor.ts index 6298aea77d..9dcadad61d 100644 --- a/plugins/catalog-backend-module-openapi/src/OpenApiRefProcessor.ts +++ b/plugins/catalog-backend-module-openapi/src/OpenApiRefProcessor.ts @@ -84,10 +84,14 @@ export class OpenApiRefProcessor implements CatalogProcessor { this.logger.debug(`Bundling OpenAPI specification from ${location.target}`); try { + const read = async (url: string) => { + const { buffer } = await this.reader.readUrl(url); + return await buffer(); + }; const bundledSpec = await bundleFileWithRefs( definition.toString(), location.target, - this.reader.read, + read, resolveUrl, ); diff --git a/plugins/catalog-backend/CHANGELOG.md b/plugins/catalog-backend/CHANGELOG.md index 8fc297e1b8..4fab02d5d5 100644 --- a/plugins/catalog-backend/CHANGELOG.md +++ b/plugins/catalog-backend/CHANGELOG.md @@ -1,5 +1,97 @@ # @backstage/plugin-catalog-backend +## 1.7.0-next.0 + +### Minor Changes + +- f75bf76330: Implemented server side ordering in the entities endpoint + +### Patch Changes + +- d136793ff0: Fixed an issue where internal references in the catalog would stick around for longer than expected, causing entities to not be deleted or orphaned as expected. +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-scaffolder-common@1.2.4-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/plugin-catalog-common@1.0.10-next.0 + - @backstage/plugin-catalog-node@1.3.1-next.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-node@0.7.2 + - @backstage/plugin-search-common@1.2.0 + +## 1.6.0 + +### Minor Changes + +- 16891a212c: Added new `POST /entities/by-refs` endpoint, which allows you to efficiently + batch-fetch entities by their entity ref. This can be useful e.g. in graphql + resolvers or similar contexts where you need to fetch many entities at the same + time. +- 273ba3a77f: Deprecated Prometheus metrics in favour of OpenTelemtry metrics. +- c395abb5b2: The catalog no longer stops after the first processor `validateEntityKind` + method returns `true` when validating entity kind shapes. Instead, it continues + through all registered processors that have this method, and requires that _at + least one_ of them returned true. + + The old behavior of stopping early made it harder to extend existing core kinds + with additional fields, since the `BuiltinKindsEntityProcessor` is always + present at the top of the processing chain and ensures that your additional + validation code would never be run. + + This is technically a breaking change, although it should not affect anybody + under normal circumstances, except if you had problematic validation code that + you were unaware that it was not being run. That code may now start to exhibit + those problems. + + If you need to disable this new behavior, `CatalogBuilder` as used in your + `packages/backend/src/plugins/catalog.ts` file now has a + `useLegacySingleProcessorValidation()` method to go back to the old behavior. + + ```diff + const builder = await CatalogBuilder.create(env); + +builder.useLegacySingleProcessorValidation(); + ``` + +- 3072ebfdd7: The search table also holds the original entity value now and the facets endpoint fetches the filtered entity data from the search table. + +### Patch Changes + +- ba13ff663c: Added a new `catalog.rules[].location` configuration that makes it possible to configure catalog rules to only apply to specific locations, either via exact match or a glob pattern. +- d8593ce0e6: Do not use deprecated `LocationSpec` from the `@backstage/plugin-catalog-node` package +- c507aee8a2: Ensured typescript type checks in migration files. +- 2a8e3cc0b5: Optimize `Stitcher` process to be more memory efficient +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- eacc8e2b55: Make it possible for entity providers to supply only entity refs, instead of full entities, in `delta` mutation deletions. +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries +- 5b3e2afa45: Fixed deprecated use of `substr` into `substring`. +- 71147d5c16: Internal code reorganization. +- 93870e4df1: Track the last time the final entity changed with new timestamp "last updated at" data in final entities database, which gets updated with the time when final entity is updated. +- 20a5161f04: Adds MySQL support for the catalog-backend +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- e982f77fe3: Registered shutdown hook in experimental catalog plugin. +- b3fac9c107: Ignore attempts at emitting the current entity as a child of itself. +- Updated dependencies + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-node@0.7.2 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/plugin-search-common@1.2.0 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/plugin-catalog-common@1.0.9 + - @backstage/plugin-scaffolder-common@1.2.3 + ## 1.6.0-next.3 ### Patch Changes diff --git a/plugins/catalog-backend/package.json b/plugins/catalog-backend/package.json index 2bae86b38a..fa4ba69d7c 100644 --- a/plugins/catalog-backend/package.json +++ b/plugins/catalog-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend", "description": "The Backstage backend plugin that provides the Backstage catalog", - "version": "1.6.0-next.3", + "version": "1.7.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend/src/catalog/types.ts b/plugins/catalog-backend/src/catalog/types.ts index 84673a3900..faf7451acd 100644 --- a/plugins/catalog-backend/src/catalog/types.ts +++ b/plugins/catalog-backend/src/catalog/types.ts @@ -38,6 +38,14 @@ export type EntityPagination = { after?: string; }; +/** + * A sorting rule for entities. + */ +export type EntityOrder = { + field: string; + order: 'asc' | 'desc'; +}; + /** * Matches rows in the search table. * @public @@ -71,6 +79,7 @@ export type PageInfo = export type EntitiesRequest = { filter?: EntityFilter; fields?: (entity: Entity) => Entity; + order?: EntityOrder[]; pagination?: EntityPagination; authorizationToken?: string; }; diff --git a/plugins/catalog-backend/src/database/DefaultProcessingDatabase.test.ts b/plugins/catalog-backend/src/database/DefaultProcessingDatabase.test.ts index 4fbb38b4fc..540c93ef13 100644 --- a/plugins/catalog-backend/src/database/DefaultProcessingDatabase.test.ts +++ b/plugins/catalog-backend/src/database/DefaultProcessingDatabase.test.ts @@ -462,12 +462,17 @@ describe('DefaultProcessingDatabase', () => { knexTx( 'refresh_state_references', ).select(), - ).resolves.toEqual([ - expect.objectContaining({ - source_entity_ref: 'location:default/fakelocation', - target_entity_ref: 'component:default/1', - }), - ]); + ).resolves.toEqual( + step.expectConflict + ? [] + : [ + // eslint-disable-next-line jest/no-conditional-expect + expect.objectContaining({ + source_entity_ref: 'location:default/fakelocation', + target_entity_ref: 'component:default/1', + }), + ], + ); expect(mockLogger.error).not.toHaveBeenCalled(); } diff --git a/plugins/catalog-backend/src/database/DefaultProcessingDatabase.ts b/plugins/catalog-backend/src/database/DefaultProcessingDatabase.ts index 1127deed7e..761f5bfd72 100644 --- a/plugins/catalog-backend/src/database/DefaultProcessingDatabase.ts +++ b/plugins/catalog-backend/src/database/DefaultProcessingDatabase.ts @@ -314,7 +314,6 @@ export class DefaultProcessingDatabase implements ProcessingDatabase { // Keeps track of the entities that we end up inserting to update refresh_state_references afterwards const stateReferences = new Array(); - const conflictingStateReferences = new Array(); // Upsert all of the unprocessed entities into the refresh_state table, by // their entity ref. @@ -357,13 +356,11 @@ export class DefaultProcessingDatabase implements ProcessingDatabase { this.options.logger.warn( `Detected conflicting entityRef ${entityRef} already referenced by ${conflictingKey} and now also ${locationKey}`, ); - conflictingStateReferences.push(entityRef); } } // Replace all references for the originating entity or source and then create new ones await tx('refresh_state_references') - .whereNotIn('target_entity_ref', conflictingStateReferences) .andWhere({ source_entity_ref: options.sourceEntityRef }) .delete(); await tx.batchInsert( diff --git a/plugins/catalog-backend/src/database/DefaultProviderDatabase.test.ts b/plugins/catalog-backend/src/database/DefaultProviderDatabase.test.ts index 43f2209b60..140925b6fd 100644 --- a/plugins/catalog-backend/src/database/DefaultProviderDatabase.test.ts +++ b/plugins/catalog-backend/src/database/DefaultProviderDatabase.test.ts @@ -610,6 +610,23 @@ describe('DefaultProviderDatabase', () => { }), ]), ); + let references = await knex( + 'refresh_state_references', + ).select(); + expect(references).toEqual([ + { + id: 1, + source_key: 'lols', + source_entity_ref: null, + target_entity_ref: 'component:default/a', + }, + { + id: 2, + source_key: 'lols', + source_entity_ref: null, + target_entity_ref: 'component:default/b', + }, + ]); await db.transaction(async tx => { await db.replaceUnprocessedEntities(tx, { @@ -653,6 +670,23 @@ describe('DefaultProviderDatabase', () => { }), ]), ); + references = await knex( + 'refresh_state_references', + ).select(); + expect(references).toEqual([ + { + id: 2, + source_key: 'lols', + source_entity_ref: null, + target_entity_ref: 'component:default/b', + }, + { + id: 3, + source_key: 'lols', + source_entity_ref: null, + target_entity_ref: 'component:default/a', + }, + ]); }, 60_000, ); diff --git a/plugins/catalog-backend/src/database/DefaultProviderDatabase.ts b/plugins/catalog-backend/src/database/DefaultProviderDatabase.ts index f1073fd984..a0d376327b 100644 --- a/plugins/catalog-backend/src/database/DefaultProviderDatabase.ts +++ b/plugins/catalog-backend/src/database/DefaultProviderDatabase.ts @@ -161,6 +161,11 @@ export class DefaultProviderDatabase implements ProviderDatabase { }); } + await tx('refresh_state_references') + .where('target_entity_ref', entityRef) + .andWhere({ source_key: options.sourceKey }) + .delete(); + if (ok) { await tx( 'refresh_state_references', diff --git a/plugins/catalog-backend/src/modules/core/PlaceholderProcessor.test.ts b/plugins/catalog-backend/src/modules/core/PlaceholderProcessor.test.ts index 903ac1ac6a..352ebf5df9 100644 --- a/plugins/catalog-backend/src/modules/core/PlaceholderProcessor.test.ts +++ b/plugins/catalog-backend/src/modules/core/PlaceholderProcessor.test.ts @@ -32,7 +32,6 @@ const integrations = ScmIntegrations.fromConfig(new ConfigReader({})); describe('PlaceholderProcessor', () => { const reader: jest.Mocked = { - read: jest.fn(), readTree: jest.fn(), search: jest.fn(), readUrl: jest.fn(), diff --git a/plugins/catalog-backend/src/modules/core/UrlReaderProcessor.test.ts b/plugins/catalog-backend/src/modules/core/UrlReaderProcessor.test.ts index 14c5710afc..c9575ce5cd 100644 --- a/plugins/catalog-backend/src/modules/core/UrlReaderProcessor.test.ts +++ b/plugins/catalog-backend/src/modules/core/UrlReaderProcessor.test.ts @@ -194,7 +194,6 @@ describe('UrlReaderProcessor', () => { const logger = getVoidLogger(); const reader: jest.Mocked = { - read: jest.fn(), readUrl: jest.fn(), readTree: jest.fn(), search: jest.fn().mockImplementation(async () => []), diff --git a/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.test.ts b/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.test.ts index b84596c78c..6735709662 100644 --- a/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.test.ts +++ b/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.test.ts @@ -28,6 +28,7 @@ import { import { Stitcher } from '../stitching/Stitcher'; import { buildEntitySearch } from '../stitching/buildEntitySearch'; import { DefaultEntitiesCatalog } from './DefaultEntitiesCatalog'; +import { EntitiesRequest } from '../catalog/types'; describe('DefaultEntitiesCatalog', () => { const databases = TestDatabases.create({ @@ -254,7 +255,7 @@ describe('DefaultEntitiesCatalog', () => { describe('entities', () => { it.each(databases.eachSupportedId())( - 'should return correct entity for simple filter', + 'should return correct entity for simple filter, %p', async databaseId => { const { knex } = await createDatabase(databaseId); const entity1: Entity = { @@ -284,10 +285,11 @@ describe('DefaultEntitiesCatalog', () => { expect(entities.length).toBe(1); expect(entities[0]).toEqual(entity2); }, + 60_000, ); it.each(databases.eachSupportedId())( - 'should return correct entity for negation filter', + 'should return correct entity for negation filter, %p', async databaseId => { const { knex } = await createDatabase(databaseId); const entity1: Entity = { @@ -319,10 +321,11 @@ describe('DefaultEntitiesCatalog', () => { expect(entities.length).toBe(1); expect(entities[0]).toEqual(entity1); }, + 60_000, ); it.each(databases.eachSupportedId())( - 'should return correct entities for nested filter', + 'should return correct entities for nested filter, %p', async databaseId => { const { knex } = await createDatabase(databaseId); const entity1: Entity = { @@ -388,10 +391,11 @@ describe('DefaultEntitiesCatalog', () => { expect(entities).toContainEqual(entity2); expect(entities).toContainEqual(entity4); }, + 60_000, ); it.each(databases.eachSupportedId())( - 'should return correct entities for complex negation filter', + 'should return correct entities for complex negation filter, %p', async databaseId => { const { knex } = await createDatabase(databaseId); const entity1: Entity = { @@ -429,10 +433,11 @@ describe('DefaultEntitiesCatalog', () => { expect(entities.length).toBe(1); expect(entities).toContainEqual(entity1); }, + 60_000, ); it.each(databases.eachSupportedId())( - 'should return no matches for an empty values array', + 'should return no matches for an empty values array, %p', // NOTE: An empty values array is not a sensible input in a realistic scenario. async databaseId => { const { knex } = await createDatabase(databaseId); @@ -461,6 +466,7 @@ describe('DefaultEntitiesCatalog', () => { expect(entities.length).toBe(0); }, + 60_000, ); it.each(databases.eachSupportedId())( @@ -517,12 +523,105 @@ describe('DefaultEntitiesCatalog', () => { }, ]); }, + 60_000, + ); + + it.each(databases.eachSupportedId())( + 'can order and combine with filtering, %p', + async databaseId => { + const { knex } = await createDatabase(databaseId); + + const entity1: Entity = { + apiVersion: 'a', + kind: 'k', + metadata: { name: 'n1' }, + spec: { a: 'foo' }, + }; + const entity2: Entity = { + apiVersion: 'a', + kind: 'k', + metadata: { name: 'n2' }, + spec: { a: 'bar' }, + }; + const entity3: Entity = { + apiVersion: 'a', + kind: 'k', + metadata: { name: 'n3' }, + spec: { a: 'bar', b: 'lonely' }, + }; + const entity4: Entity = { + apiVersion: 'a', + kind: 'k', + metadata: { name: 'n4' }, + spec: { a: 'baz', b: 'only' }, + }; + await addEntityToSearch(knex, entity1); + await addEntityToSearch(knex, entity2); + await addEntityToSearch(knex, entity3); + await addEntityToSearch(knex, entity4); + + const catalog = new DefaultEntitiesCatalog(knex, stitcher); + + function f(request: EntitiesRequest): Promise { + return catalog + .entities(request) + .then(response => response.entities.map(e => e.metadata.name)); + } + + await expect( + f({ order: [{ field: 'metadata.name', order: 'asc' }] }), + ).resolves.toEqual(['n1', 'n2', 'n3', 'n4']); + + await expect( + f({ order: [{ field: 'metadata.name', order: 'desc' }] }), + ).resolves.toEqual(['n4', 'n3', 'n2', 'n1']); + + await expect( + f({ + order: [ + { field: 'spec.a', order: 'asc' }, + { field: 'metadata.name', order: 'desc' }, + ], + }), + ).resolves.toEqual(['n3', 'n2', 'n4', 'n1']); + + await expect( + f({ + filter: { not: { key: 'spec.b', values: ['lonely'] } }, + order: [ + { field: 'spec.a', order: 'asc' }, + { field: 'metadata.name', order: 'desc' }, + ], + }), + ).resolves.toEqual(['n2', 'n4', 'n1']); + + // only n3 and n4 has spec.b, nulls (no match) always goes last no matter the order + await expect( + f({ + order: [ + { field: 'spec.b', order: 'asc' }, + { field: 'metadata.name', order: 'asc' }, + ], + }), + ).resolves.toEqual(['n3', 'n4', 'n1', 'n2']); + + // only n3 and n4 has spec.b, nulls (no match) always goes last no matter the order + await expect( + f({ + order: [ + { field: 'spec.b', order: 'desc' }, + { field: 'metadata.name', order: 'asc' }, + ], + }), + ).resolves.toEqual(['n4', 'n3', 'n1', 'n2']); + }, + 60_000, ); }); describe('entitiesBatch', () => { it.each(databases.eachSupportedId())( - 'queries for entities by ref, including duplicates, and gracefully returns null for missing entities', + 'queries for entities by ref, including duplicates, and gracefully returns null for missing entities, %p', async databaseId => { const { knex } = await createDatabase(databaseId); @@ -571,12 +670,13 @@ describe('DefaultEntitiesCatalog', () => { 'k:default/two', ]); }, + 60_000, ); }); describe('removeEntityByUid', () => { it.each(databases.eachSupportedId())( - 'also clears parent hashes', + 'also clears parent hashes, %p', async databaseId => { const { knex } = await createDatabase(databaseId); @@ -659,12 +759,13 @@ describe('DefaultEntitiesCatalog', () => { new Set(['k:default/unrelated1', 'k:default/unrelated2']), ); }, + 60_000, ); }); describe('facets', () => { it.each(databases.eachSupportedId())( - 'can filter and collect properly', + 'can filter and collect properly, %p', async databaseId => { const { knex } = await createDatabase(databaseId); @@ -697,10 +798,11 @@ describe('DefaultEntitiesCatalog', () => { }, }); }, + 60_000, ); it.each(databases.eachSupportedId())( - 'can match on annotations and labels with dots in them', + 'can match on annotations and labels with dots in them, %p', async databaseId => { const { knex } = await createDatabase(databaseId); @@ -743,10 +845,11 @@ describe('DefaultEntitiesCatalog', () => { }, }); }, + 60_000, ); it.each(databases.eachSupportedId())( - 'can match on strings in arrays', + 'can match on strings in arrays, %p', async databaseId => { const { knex } = await createDatabase(databaseId); @@ -784,6 +887,7 @@ describe('DefaultEntitiesCatalog', () => { }, }); }, + 60_000, ); }); }); diff --git a/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.ts b/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.ts index 14f22f862b..d598881371 100644 --- a/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.ts +++ b/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.ts @@ -97,7 +97,7 @@ function addCondition( // make a lot of sense. However, it had abysmal performance on sqlite // when datasets grew large, so we're using IN instead. const matchQuery = db('search') - .select(entityIdField) + .select('search.entity_id') .where({ key: filter.key.toLowerCase() }) .andWhere(function keyFilter() { if (filter.values) { @@ -178,14 +178,48 @@ export class DefaultEntitiesCatalog implements EntitiesCatalog { let entitiesQuery = db('final_entities').select('final_entities.*'); + + request?.order?.forEach(({ field }, index) => { + const alias = `order_${index}`; + entitiesQuery = entitiesQuery.leftOuterJoin( + { [alias]: 'search' }, + function search(inner) { + inner + .on(`${alias}.entity_id`, 'final_entities.entity_id') + .andOn(`${alias}.key`, db.raw('?', [field])); + }, + ); + }); + + entitiesQuery = entitiesQuery.whereNotNull('final_entities.final_entity'); + if (request?.filter) { - entitiesQuery = parseFilter(request.filter, entitiesQuery, db); + entitiesQuery = parseFilter( + request.filter, + entitiesQuery, + db, + false, + 'final_entities.entity_id', + ); } - // TODO: move final_entities to use entity_ref - entitiesQuery = entitiesQuery - .whereNotNull('final_entities.final_entity') - .orderBy('entity_id', 'asc'); + request?.order?.forEach(({ order }, index) => { + if (db.client.config.client === 'pg') { + // pg correctly orders by the column value and handling nulls in one go + entitiesQuery = entitiesQuery.orderBy([ + { column: `order_${index}.value`, order, nulls: 'last' }, + ]); + } else { + // sqlite and mysql translate the above statement ONLY into "order by (value is null) asc" + // no matter what the order is, for some reason, so we have to manually add back the statement + // that translates to "order by value " while avoiding to give an order + entitiesQuery = entitiesQuery.orderBy([ + { column: `order_${index}.value`, order: undefined, nulls: 'last' }, + { column: `order_${index}.value`, order }, + ]); + } + }); + entitiesQuery = entitiesQuery.orderBy('final_entities.entity_id', 'asc'); // stable sort const { limit, offset } = parsePagination(request?.pagination); if (limit !== undefined) { diff --git a/plugins/catalog-backend/src/service/createRouter.ts b/plugins/catalog-backend/src/service/createRouter.ts index 4680dbb899..6a31fcd0b6 100644 --- a/plugins/catalog-backend/src/service/createRouter.ts +++ b/plugins/catalog-backend/src/service/createRouter.ts @@ -41,6 +41,7 @@ import { parseEntityTransformParams, } from './request'; import { parseEntityFacetParams } from './request/parseEntityFacetParams'; +import { parseEntityOrderParams } from './request/parseEntityOrderParams'; import { LocationService, RefreshOptions, RefreshService } from './types'; import { disallowReadonlyMode, @@ -113,6 +114,7 @@ export async function createRouter( const { entities, pageInfo } = await entitiesCatalog.entities({ filter: parseEntityFilterParams(req.query), fields: parseEntityTransformParams(req.query), + order: parseEntityOrderParams(req.query), pagination: parseEntityPaginationParams(req.query), authorizationToken: getBearerToken(req.header('authorization')), }); diff --git a/plugins/catalog-backend/src/service/request/parseEntityOrderParams.test.ts b/plugins/catalog-backend/src/service/request/parseEntityOrderParams.test.ts new file mode 100644 index 0000000000..1433e6fd2b --- /dev/null +++ b/plugins/catalog-backend/src/service/request/parseEntityOrderParams.test.ts @@ -0,0 +1,42 @@ +/* + * Copyright 2021 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 { parseEntityOrderParams } from './parseEntityOrderParams'; + +describe('parseEntityOrderParams', () => { + it('handles missing parameter', () => { + expect(parseEntityOrderParams({})).toBeUndefined(); + }); + + it('handles parameters with various orders', () => { + expect( + parseEntityOrderParams({ order: ['asc:a', 'desc:b', 'asc:c:d'] }), + ).toEqual([ + { field: 'a', order: 'asc' }, + { field: 'b', order: 'desc' }, + { field: 'c:d', order: 'asc' }, + ]); + }); + + it.each(['', ':', 'ascii:', 'ascii:ebcdic', ':colon'])( + 'rejects missing/bad order or key, %p', + order => { + expect(() => parseEntityOrderParams({ order: [order] })).toThrow( + `Invalid order parameter "${order}", expected ":"`, + ); + }, + ); +}); diff --git a/plugins/catalog-backend/src/service/request/parseEntityOrderParams.ts b/plugins/catalog-backend/src/service/request/parseEntityOrderParams.ts new file mode 100644 index 0000000000..ff81a91ca5 --- /dev/null +++ b/plugins/catalog-backend/src/service/request/parseEntityOrderParams.ts @@ -0,0 +1,37 @@ +/* + * Copyright 2021 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 { InputError } from '@backstage/errors'; +import { EntityOrder } from '../../catalog/types'; +import { parseStringsParam } from './common'; + +export function parseEntityOrderParams( + params: Record, +): EntityOrder[] | undefined { + return parseStringsParam(params.order, 'order')?.map(item => { + const match = item.match(/^(asc|desc):(.+)$/); + if (!match) { + throw new InputError( + `Invalid order parameter "${item}", expected ":"`, + ); + } + + return { + order: match[1] as 'asc' | 'desc', + field: match[2], + }; + }); +} diff --git a/plugins/catalog-common/CHANGELOG.md b/plugins/catalog-common/CHANGELOG.md index e021480182..db253ed97e 100644 --- a/plugins/catalog-common/CHANGELOG.md +++ b/plugins/catalog-common/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-catalog-common +## 1.0.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-search-common@1.2.0 + +## 1.0.9 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-search-common@1.2.0 + - @backstage/catalog-model@1.1.4 + ## 1.0.9-next.3 ### Patch Changes diff --git a/plugins/catalog-common/package.json b/plugins/catalog-common/package.json index 5252acbfb2..133e7af092 100644 --- a/plugins/catalog-common/package.json +++ b/plugins/catalog-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-common", "description": "Common functionalities for the catalog plugin", - "version": "1.0.9-next.3", + "version": "1.0.10-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-customized/CHANGELOG.md b/plugins/catalog-customized/CHANGELOG.md index c0677a7486..4f023ccbd1 100644 --- a/plugins/catalog-customized/CHANGELOG.md +++ b/plugins/catalog-customized/CHANGELOG.md @@ -1,5 +1,29 @@ # @internal/plugin-catalog-customized +## 0.0.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/plugin-catalog@1.7.2-next.0 + +## 0.0.6 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog@1.7.1 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.0.5 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog@1.7.0 + - @backstage/plugin-catalog-react@1.2.2 + ## 0.0.5-next.4 ### Patch Changes diff --git a/plugins/catalog-customized/package.json b/plugins/catalog-customized/package.json index 08c34a0dba..a619a663c7 100644 --- a/plugins/catalog-customized/package.json +++ b/plugins/catalog-customized/package.json @@ -1,7 +1,7 @@ { "name": "@internal/plugin-catalog-customized", "description": "The internal Backstage Customizable plugin for browsing the Backstage catalog", - "version": "0.0.5-next.4", + "version": "0.0.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-graph/CHANGELOG.md b/plugins/catalog-graph/CHANGELOG.md index 51a242cc41..ed25c8f536 100644 --- a/plugins/catalog-graph/CHANGELOG.md +++ b/plugins/catalog-graph/CHANGELOG.md @@ -1,5 +1,40 @@ # @backstage/plugin-catalog-graph +## 0.2.26-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## 0.2.25 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.2.24 + +### Patch Changes + +- cb716004ef: Internal refactor to improve tests +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 454f2e90db: Set the default `maxDepth` prop for `EntityRelationsGraph` to a smaller value to provide better readability. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/catalog-client@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.2.24-next.4 ### Patch Changes diff --git a/plugins/catalog-graph/package.json b/plugins/catalog-graph/package.json index 6be542664c..65b0e75143 100644 --- a/plugins/catalog-graph/package.json +++ b/plugins/catalog-graph/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-graph", - "version": "0.2.24-next.4", + "version": "0.2.26-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-graph/src/components/CatalogGraphCard/CatalogGraphCard.test.tsx b/plugins/catalog-graph/src/components/CatalogGraphCard/CatalogGraphCard.test.tsx index 27b67102e4..adee03e298 100644 --- a/plugins/catalog-graph/src/components/CatalogGraphCard/CatalogGraphCard.test.tsx +++ b/plugins/catalog-graph/src/components/CatalogGraphCard/CatalogGraphCard.test.tsx @@ -133,7 +133,7 @@ describe('', () => { expect(button).toBeInTheDocument(); expect(button.closest('a')).toHaveAttribute( 'href', - '/catalog-graph?rootEntityRefs%5B%5D=b%3Ad%2Fc&maxDepth=2&unidirectional=true&mergeRelations=true&direction=LR', + '/catalog-graph?rootEntityRefs%5B%5D=b%3Ad%2Fc&unidirectional=true&mergeRelations=true&direction=LR', ); }); @@ -157,7 +157,7 @@ describe('', () => { expect(button).toBeInTheDocument(); expect(button.closest('a')).toHaveAttribute( 'href', - '/catalog-graph?rootEntityRefs%5B%5D=b%3Ad%2Fc&maxDepth=3&unidirectional=true&mergeRelations=false&direction=LR', + '/catalog-graph?rootEntityRefs%5B%5D=b%3Ad%2Fc&unidirectional=true&mergeRelations=false&direction=LR', ); }); diff --git a/plugins/catalog-graph/src/components/CatalogGraphCard/CatalogGraphCard.tsx b/plugins/catalog-graph/src/components/CatalogGraphCard/CatalogGraphCard.tsx index 34d3174cb3..b9a15eb569 100644 --- a/plugins/catalog-graph/src/components/CatalogGraphCard/CatalogGraphCard.tsx +++ b/plugins/catalog-graph/src/components/CatalogGraphCard/CatalogGraphCard.tsx @@ -111,7 +111,6 @@ export const CatalogGraphCard = (props: { const catalogGraphParams = qs.stringify( { rootEntityRefs: [stringifyEntityRef(entity)], - maxDepth: maxDepth + 1, unidirectional, mergeRelations, kinds, diff --git a/plugins/catalog-graphql/CHANGELOG.md b/plugins/catalog-graphql/CHANGELOG.md index 0ea129e544..698c00417e 100644 --- a/plugins/catalog-graphql/CHANGELOG.md +++ b/plugins/catalog-graphql/CHANGELOG.md @@ -1,5 +1,24 @@ # @backstage/plugin-catalog-graphql +## 0.3.17-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/config@1.0.5 + - @backstage/types@1.0.2 + +## 0.3.16 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + ## 0.3.16-next.1 ### Patch Changes diff --git a/plugins/catalog-graphql/package.json b/plugins/catalog-graphql/package.json index ea2348d7cc..7f60475530 100644 --- a/plugins/catalog-graphql/package.json +++ b/plugins/catalog-graphql/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-graphql", "description": "An experimental Backstage catalog GraphQL module", - "version": "0.3.16-next.1", + "version": "0.3.17-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-import/CHANGELOG.md b/plugins/catalog-import/CHANGELOG.md index 8b5152105b..e660fe6734 100644 --- a/plugins/catalog-import/CHANGELOG.md +++ b/plugins/catalog-import/CHANGELOG.md @@ -1,5 +1,48 @@ # @backstage/plugin-catalog-import +## 0.9.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/integration-react@1.1.9-next.0 + - @backstage/plugin-catalog-common@1.0.10-next.0 + +## 0.9.3 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/integration-react@1.1.8 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.9.2 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/catalog-client@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/integration-react@1.1.7 + - @backstage/integration@1.4.1 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/plugin-catalog-common@1.0.9 + ## 0.9.2-next.4 ### Patch Changes diff --git a/plugins/catalog-import/package.json b/plugins/catalog-import/package.json index 13f97ae38a..e1077a276d 100644 --- a/plugins/catalog-import/package.json +++ b/plugins/catalog-import/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-import", "description": "A Backstage plugin the helps you import entities into your catalog", - "version": "0.9.2-next.4", + "version": "0.9.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-node/CHANGELOG.md b/plugins/catalog-node/CHANGELOG.md index a4c12b965a..51e4b75151 100644 --- a/plugins/catalog-node/CHANGELOG.md +++ b/plugins/catalog-node/CHANGELOG.md @@ -1,5 +1,34 @@ # @backstage/plugin-catalog-node +## 1.3.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/plugin-catalog-common@1.0.10-next.0 + +## 1.3.0 + +### Minor Changes + +- eacc8e2b55: Make it possible for entity providers to supply only entity refs, instead of full entities, in `delta` mutation deletions. + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- Updated dependencies + - @backstage/catalog-client@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/plugin-catalog-common@1.0.9 + ## 1.3.0-next.3 ### Patch Changes diff --git a/plugins/catalog-node/package.json b/plugins/catalog-node/package.json index 00291f56c3..b4a6691889 100644 --- a/plugins/catalog-node/package.json +++ b/plugins/catalog-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-node", "description": "The plugin-catalog-node module for @backstage/plugin-catalog-backend", - "version": "1.3.0-next.3", + "version": "1.3.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-react/CHANGELOG.md b/plugins/catalog-react/CHANGELOG.md index 7c9adfc12d..7ec0230c4e 100644 --- a/plugins/catalog-react/CHANGELOG.md +++ b/plugins/catalog-react/CHANGELOG.md @@ -1,5 +1,54 @@ # @backstage/plugin-catalog-react +## 1.2.4-next.0 + +### Patch Changes + +- 37426f6f5e: Fixed bug in `EntityTagPicker` that filtered on unavailable tags for the selected kind. +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-catalog-common@1.0.10-next.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-react@0.4.8 + +## 1.2.3 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + +## 1.2.2 + +### Patch Changes + +- 2cb9998: Fixed bug in `EntityOwnerPicker` and `EntityLifecyclePicker` that filtered on unavailable tags for the selected kind. +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 6ffa47bb0a: Cleanup and small fixes for the kind selector +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/catalog-client@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/errors@1.1.4 + - @backstage/plugin-permission-react@0.4.8 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-catalog-common@1.0.9 + ## 1.2.2-next.4 ### Patch Changes diff --git a/plugins/catalog-react/package.json b/plugins/catalog-react/package.json index 41d59ebc41..fef5eb03d5 100644 --- a/plugins/catalog-react/package.json +++ b/plugins/catalog-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-react", "description": "A frontend library that helps other Backstage plugins interact with the catalog", - "version": "1.2.2-next.4", + "version": "1.2.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-react/src/components/EntityTagPicker/EntityTagPicker.test.tsx b/plugins/catalog-react/src/components/EntityTagPicker/EntityTagPicker.test.tsx index 7da357d806..de7bbb89be 100644 --- a/plugins/catalog-react/src/components/EntityTagPicker/EntityTagPicker.test.tsx +++ b/plugins/catalog-react/src/components/EntityTagPicker/EntityTagPicker.test.tsx @@ -202,4 +202,33 @@ describe('', () => { tags: new EntityTagFilter(['tag2']), }); }); + it('removes tags from filters if there are none available', async () => { + const updateFilters = jest.fn(); + const mockCatalogApiRefNoTags = { + getEntityFacets: async () => ({ + facets: { + 'metadata.tags': {}, + }, + }), + } as unknown as CatalogApi; + + render( + + + + + , + , + ); + await waitFor(() => + expect(updateFilters).toHaveBeenLastCalledWith({ + tags: undefined, + }), + ); + }); }); diff --git a/plugins/catalog-react/src/components/EntityTagPicker/EntityTagPicker.tsx b/plugins/catalog-react/src/components/EntityTagPicker/EntityTagPicker.tsx index 25f02e8adc..4a1dc03e96 100644 --- a/plugins/catalog-react/src/components/EntityTagPicker/EntityTagPicker.tsx +++ b/plugins/catalog-react/src/components/EntityTagPicker/EntityTagPicker.tsx @@ -93,10 +93,14 @@ export const EntityTagPicker = (props: EntityTagPickerProps) => { }, [queryParamTags]); useEffect(() => { + const tags = Object.keys(availableTags ?? {}); updateFilters({ - tags: selectedTags.length ? new EntityTagFilter(selectedTags) : undefined, + tags: + selectedTags.length && tags.length + ? new EntityTagFilter(selectedTags) + : undefined, }); - }, [selectedTags, updateFilters]); + }, [selectedTags, updateFilters, availableTags]); if (!Object.keys(availableTags ?? {}).length) return null; diff --git a/plugins/catalog/CHANGELOG.md b/plugins/catalog/CHANGELOG.md index 797154bf60..ce39f68cce 100644 --- a/plugins/catalog/CHANGELOG.md +++ b/plugins/catalog/CHANGELOG.md @@ -1,5 +1,63 @@ # @backstage/plugin-catalog +## 1.7.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/integration-react@1.1.9-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + - @backstage/plugin-catalog-common@1.0.10-next.0 + - @backstage/plugin-search-common@1.2.0 + - @backstage/plugin-search-react@1.3.2-next.0 + +## 1.7.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/integration-react@1.1.8 + - @backstage/plugin-catalog-react@1.2.3 + - @backstage/plugin-search-react@1.3.1 + +## 1.7.0 + +### Minor Changes + +- 6ffa47bb0a: Fixes in kind selectors (now `OwnershipCard` works again). `EntityKindPicker` now accepts an optional `allowedKinds` prop, just like `CatalogKindHeader`. +- 462c1d012e: Removed `CatalogKindHeader` from `DefaultCatalogPage`. Deprecated `CatalogKindHeader` in favour of `EntityKindPicker`. + +### Patch Changes + +- d3fea4ae0a: Internal fixes to avoid implicit usage of globals +- ca04d97b09: Handle refresh entity error in `AboutCard`. +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- a19cffbeed: Update search links to only have header as linkable text +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. +- 387d1d5218: Fixed Entity kind pluralisation in the `CatalogKindHeader` component. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/catalog-client@1.2.0 + - @backstage/plugin-search-react@1.3.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/integration-react@1.1.7 + - @backstage/types@1.0.2 + - @backstage/plugin-search-common@1.2.0 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-catalog-common@1.0.9 + ## 1.7.0-next.4 ### Patch Changes diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index 76eb4b4b4b..b8719aca94 100644 --- a/plugins/catalog/package.json +++ b/plugins/catalog/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog", "description": "The Backstage plugin for browsing the Backstage catalog", - "version": "1.7.0-next.4", + "version": "1.7.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog/src/components/EntityLinksCard/IconLink.test.tsx b/plugins/catalog/src/components/EntityLinksCard/IconLink.test.tsx index be784ae3e8..509a3f3741 100644 --- a/plugins/catalog/src/components/EntityLinksCard/IconLink.test.tsx +++ b/plugins/catalog/src/components/EntityLinksCard/IconLink.test.tsx @@ -14,23 +14,16 @@ * limitations under the License. */ -import { lightTheme } from '@backstage/theme'; -import { ThemeProvider } from '@material-ui/core'; +import { renderInTestApp } from '@backstage/test-utils'; import CloudIcon from '@material-ui/icons/Cloud'; -import { render, screen } from '@testing-library/react'; +import { screen } from '@testing-library/react'; import React from 'react'; import { IconLink } from './IconLink'; describe('IconLink', () => { - it('should render an icon link', () => { - render( - - - , + it('should render an icon link', async () => { + await renderInTestApp( + , ); expect(screen.getByText('I am Link')).toBeInTheDocument(); diff --git a/plugins/cicd-statistics-module-gitlab/CHANGELOG.md b/plugins/cicd-statistics-module-gitlab/CHANGELOG.md index dbd7215a8c..8280433443 100644 --- a/plugins/cicd-statistics-module-gitlab/CHANGELOG.md +++ b/plugins/cicd-statistics-module-gitlab/CHANGELOG.md @@ -1,5 +1,30 @@ # @backstage/plugin-cicd-statistics-module-gitlab +## 0.1.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-cicd-statistics@0.1.16-next.0 + +## 0.1.9 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-cicd-statistics@0.1.15 + +## 0.1.8 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-cicd-statistics@0.1.14 + - @backstage/catalog-model@1.1.4 + ## 0.1.8-next.4 ### Patch Changes diff --git a/plugins/cicd-statistics-module-gitlab/package.json b/plugins/cicd-statistics-module-gitlab/package.json index 9fbd7e8aa9..8e6d09c93e 100644 --- a/plugins/cicd-statistics-module-gitlab/package.json +++ b/plugins/cicd-statistics-module-gitlab/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-cicd-statistics-module-gitlab", "description": "CI/CD Statistics plugin module; Gitlab CICD", - "version": "0.1.8-next.4", + "version": "0.1.10-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/cicd-statistics/CHANGELOG.md b/plugins/cicd-statistics/CHANGELOG.md index 783fb8b3fd..c2b3d38677 100644 --- a/plugins/cicd-statistics/CHANGELOG.md +++ b/plugins/cicd-statistics/CHANGELOG.md @@ -1,5 +1,30 @@ # @backstage/plugin-cicd-statistics +## 0.1.16-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-plugin-api@1.2.0 + +## 0.1.15 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.2.3 + +## 0.1.14 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + ## 0.1.14-next.4 ### Patch Changes diff --git a/plugins/cicd-statistics/package.json b/plugins/cicd-statistics/package.json index 02577879fe..aa2e1f571b 100644 --- a/plugins/cicd-statistics/package.json +++ b/plugins/cicd-statistics/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-cicd-statistics", "description": "A frontend plugin visualizing CI/CD pipeline statistics (build time)", - "version": "0.1.14-next.4", + "version": "0.1.16-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/circleci/CHANGELOG.md b/plugins/circleci/CHANGELOG.md index bd72c9bf01..88d39e4319 100644 --- a/plugins/circleci/CHANGELOG.md +++ b/plugins/circleci/CHANGELOG.md @@ -1,5 +1,37 @@ # @backstage/plugin-circleci +## 0.3.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## 0.3.13 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.3.12 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.3.12-next.4 ### Patch Changes diff --git a/plugins/circleci/package.json b/plugins/circleci/package.json index ef4923f7d2..9695a995c9 100644 --- a/plugins/circleci/package.json +++ b/plugins/circleci/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-circleci", "description": "A Backstage plugin that integrates towards Circle CI", - "version": "0.3.12-next.4", + "version": "0.3.14-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/cloudbuild/CHANGELOG.md b/plugins/cloudbuild/CHANGELOG.md index 941821f33f..4cd0120e12 100644 --- a/plugins/cloudbuild/CHANGELOG.md +++ b/plugins/cloudbuild/CHANGELOG.md @@ -1,5 +1,38 @@ # @backstage/plugin-cloudbuild +## 0.3.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## 0.3.13 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.3.12 + +### Patch Changes + +- d3fea4ae0a: Internal fixes to avoid implicit usage of globals +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.3.12-next.4 ### Patch Changes diff --git a/plugins/cloudbuild/package.json b/plugins/cloudbuild/package.json index 1cfee1e1d6..66aa34dd8e 100644 --- a/plugins/cloudbuild/package.json +++ b/plugins/cloudbuild/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-cloudbuild", "description": "A Backstage plugin that integrates towards Google Cloud Build", - "version": "0.3.12-next.4", + "version": "0.3.14-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/code-climate/CHANGELOG.md b/plugins/code-climate/CHANGELOG.md index 470d6f929c..4338ac9b17 100644 --- a/plugins/code-climate/CHANGELOG.md +++ b/plugins/code-climate/CHANGELOG.md @@ -1,5 +1,37 @@ # @backstage/plugin-code-climate +## 0.1.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## 0.1.13 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.1.12 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.1.12-next.4 ### Patch Changes diff --git a/plugins/code-climate/package.json b/plugins/code-climate/package.json index cea2863f34..824d155e4e 100644 --- a/plugins/code-climate/package.json +++ b/plugins/code-climate/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-code-climate", - "version": "0.1.12-next.4", + "version": "0.1.14-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/code-climate/src/components/CodeClimateTable/CodeClimateTable.test.tsx b/plugins/code-climate/src/components/CodeClimateTable/CodeClimateTable.test.tsx index 70d34d0298..e5703a993e 100644 --- a/plugins/code-climate/src/components/CodeClimateTable/CodeClimateTable.test.tsx +++ b/plugins/code-climate/src/components/CodeClimateTable/CodeClimateTable.test.tsx @@ -15,18 +15,14 @@ */ import React from 'react'; -import { render } from '@testing-library/react'; +import { renderInTestApp } from '@backstage/test-utils'; import { CodeClimateTable } from './CodeClimateTable'; import { mockData } from '../../api/mock/mock-api'; -import { ThemeProvider } from '@material-ui/core'; -import { lightTheme } from '@backstage/theme'; describe('CodeClimateTable', () => { it('should render values in a table', async () => { - const table = await render( - - - , + const table = await renderInTestApp( + , ); expect(await table.findByText('3 months')).toBeInTheDocument(); expect(await table.findByText('88%')).toBeInTheDocument(); diff --git a/plugins/code-coverage-backend/CHANGELOG.md b/plugins/code-coverage-backend/CHANGELOG.md index d3e9285de8..f3bf90c480 100644 --- a/plugins/code-coverage-backend/CHANGELOG.md +++ b/plugins/code-coverage-backend/CHANGELOG.md @@ -1,5 +1,31 @@ # @backstage/plugin-code-coverage-backend +## 0.2.6-next.0 + +### Patch Changes + +- dcfdaeccd3: `RouterOptions` now accepts an optional `catalogApi` argument, allowing custom catalog clients to be used. This is leveraged in the local standalone development runner to pass in a catalog client that returns fake data. +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + +## 0.2.5 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + ## 0.2.5-next.3 ### Patch Changes diff --git a/plugins/code-coverage-backend/api-report.md b/plugins/code-coverage-backend/api-report.md index c33874064b..440af50714 100644 --- a/plugins/code-coverage-backend/api-report.md +++ b/plugins/code-coverage-backend/api-report.md @@ -3,6 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts +import { CatalogApi } from '@backstage/catalog-client'; import { Config } from '@backstage/config'; import express from 'express'; import { Logger } from 'winston'; @@ -15,6 +16,8 @@ export function createRouter(options: RouterOptions): Promise; // @public export interface RouterOptions { + // (undocumented) + catalogApi?: CatalogApi; // (undocumented) config: Config; // (undocumented) diff --git a/plugins/code-coverage-backend/package.json b/plugins/code-coverage-backend/package.json index b29c0d33df..166fe0fa07 100644 --- a/plugins/code-coverage-backend/package.json +++ b/plugins/code-coverage-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-code-coverage-backend", "description": "A Backstage backend plugin that helps you keep track of your code coverage", - "version": "0.2.5-next.3", + "version": "0.2.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/code-coverage-backend/src/service/CoverageUtils.test.ts b/plugins/code-coverage-backend/src/service/CoverageUtils.test.ts index e0b4c6589e..44b1411cc4 100644 --- a/plugins/code-coverage-backend/src/service/CoverageUtils.test.ts +++ b/plugins/code-coverage-backend/src/service/CoverageUtils.test.ts @@ -209,7 +209,7 @@ describe('CodeCoverageUtils', () => { } catch (error: any) { err = error; } - expect(err?.message).toEqual('Content-Type missing'); + expect(err?.message).toEqual('Content-Type header missing'); }); it('rejects unsupported content type', () => { @@ -223,7 +223,9 @@ describe('CodeCoverageUtils', () => { } catch (error: any) { err = error; } - expect(err?.message).toEqual('Illegal Content-Type'); + expect(err?.message).toEqual( + 'Content-Type header "application/json" not supported, expected "text/xml" possibly followed by a charset', + ); }); it('parses the body', () => { diff --git a/plugins/code-coverage-backend/src/service/CoverageUtils.ts b/plugins/code-coverage-backend/src/service/CoverageUtils.ts index d965ae6300..a4d3405868 100644 --- a/plugins/code-coverage-backend/src/service/CoverageUtils.ts +++ b/plugins/code-coverage-backend/src/service/CoverageUtils.ts @@ -162,9 +162,11 @@ export class CoverageUtils { validateRequestBody(req: Request) { const contentType = req.headers['content-type']; if (!contentType) { - throw new InputError('Content-Type missing'); + throw new InputError('Content-Type header missing'); } else if (!contentType.match(/^text\/xml($|;)/)) { - throw new InputError('Illegal Content-Type'); + throw new InputError( + `Content-Type header "${contentType}" not supported, expected "text/xml" possibly followed by a charset`, + ); } const body = req.body; if (!body) { diff --git a/plugins/code-coverage-backend/src/service/converter/jacoco.ts b/plugins/code-coverage-backend/src/service/converter/jacoco.ts index f3047d9f00..ac5ccbfa45 100644 --- a/plugins/code-coverage-backend/src/service/converter/jacoco.ts +++ b/plugins/code-coverage-backend/src/service/converter/jacoco.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { BranchHit, FileEntry } from '../types'; import { JacocoSourceFile, JacocoXML } from './types'; import { Logger } from 'winston'; diff --git a/plugins/code-coverage-backend/src/service/router.ts b/plugins/code-coverage-backend/src/service/router.ts index b87b21bffd..4d4fb779b5 100644 --- a/plugins/code-coverage-backend/src/service/router.ts +++ b/plugins/code-coverage-backend/src/service/router.ts @@ -46,6 +46,7 @@ export interface RouterOptions { database: PluginDatabaseManager; urlReader: UrlReader; logger: Logger; + catalogApi?: CatalogApi; } export interface CodeCoverageApi { @@ -59,7 +60,8 @@ export const makeRouter = async ( const codeCoverageDatabase = await CodeCoverageDatabase.create(database); const codecovUrl = await discovery.getExternalBaseUrl('code-coverage'); - const catalogApi: CatalogApi = new CatalogClient({ discoveryApi: discovery }); + const catalogApi = + options.catalogApi ?? new CatalogClient({ discoveryApi: discovery }); const scm = ScmIntegrations.fromConfig(config); const router = Router(); @@ -167,10 +169,10 @@ export const makeRouter = async ( * /report?entity=component:default/mycomponent&coverageType=cobertura */ router.post('/report', async (req, res) => { - const { entity, coverageType } = req.query; - const entityLookup = await catalogApi.getEntityByRef(entity as string); - if (!entityLookup) { - throw new NotFoundError(`No entity found matching ${entity}`); + const { entity: entityRef, coverageType } = req.query; + const entity = await catalogApi.getEntityByRef(entityRef as string); + if (!entity) { + throw new NotFoundError(`No entity found matching ${entityRef}`); } let converter: Converter; @@ -185,7 +187,7 @@ export const makeRouter = async ( } const { sourceLocation, vcs, scmFiles, body } = - await utils.processCoveragePayload(entityLookup, req); + await utils.processCoveragePayload(entity, req); const files = converter.convert(body, scmFiles); if (!files || files.length === 0) { @@ -193,7 +195,7 @@ export const makeRouter = async ( } const coverage = await utils.buildCoverage( - entityLookup, + entity, sourceLocation, vcs, files, @@ -204,7 +206,7 @@ export const makeRouter = async ( links: [ { rel: 'coverage', - href: `${codecovUrl}/report?entity=${entity}`, + href: `${codecovUrl}/report?entity=${entityRef}`, }, ], }); diff --git a/plugins/code-coverage-backend/src/service/standaloneServer.ts b/plugins/code-coverage-backend/src/service/standaloneServer.ts index c4ced6baeb..41493660fb 100644 --- a/plugins/code-coverage-backend/src/service/standaloneServer.ts +++ b/plugins/code-coverage-backend/src/service/standaloneServer.ts @@ -21,6 +21,8 @@ import { UrlReaders, useHotMemoize, } from '@backstage/backend-common'; +import { CatalogApi } from '@backstage/catalog-client'; +import { CompoundEntityRef, parseEntityRef } from '@backstage/catalog-model'; import { Server } from 'http'; import knexFactory from 'knex'; import { Logger } from 'winston'; @@ -52,13 +54,27 @@ export async function startStandaloneServer( return knex; }); + const catalogApi = { + async getEntityByRef(entityRef: string | CompoundEntityRef) { + const { kind, namespace, name } = parseEntityRef(entityRef); + return { + apiVersion: 'backstage.io/v1alpha1', + kind, + metadata: { name, namespace }, + spec: {}, + }; + }, + } as Partial as CatalogApi; + logger.debug('Starting application server...'); + const router = await createRouter({ database: { getClient: async () => db }, config, discovery: SingleHostDiscovery.fromConfig(config), urlReader: UrlReaders.default({ logger, config }), logger, + catalogApi, }); let service = createServiceBuilder(module) diff --git a/plugins/code-coverage/CHANGELOG.md b/plugins/code-coverage/CHANGELOG.md index c685912850..d844d752c0 100644 --- a/plugins/code-coverage/CHANGELOG.md +++ b/plugins/code-coverage/CHANGELOG.md @@ -1,5 +1,41 @@ # @backstage/plugin-code-coverage +## 0.2.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## 0.2.6 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.2.5 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + ## 0.2.5-next.4 ### Patch Changes diff --git a/plugins/code-coverage/package.json b/plugins/code-coverage/package.json index 9407f653a5..8b42f28aae 100644 --- a/plugins/code-coverage/package.json +++ b/plugins/code-coverage/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-code-coverage", "description": "A Backstage plugin that helps you keep track of your code coverage", - "version": "0.2.5-next.4", + "version": "0.2.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/codescene/CHANGELOG.md b/plugins/codescene/CHANGELOG.md index ffb7e9929e..01343539e6 100644 --- a/plugins/codescene/CHANGELOG.md +++ b/plugins/codescene/CHANGELOG.md @@ -1,5 +1,36 @@ # @backstage/plugin-codescene +## 0.1.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## 0.1.8 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + +## 0.1.7 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 17a8e32f39: Updated dependency `rc-progress` to `3.4.1`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + ## 0.1.7-next.4 ### Patch Changes diff --git a/plugins/codescene/package.json b/plugins/codescene/package.json index 1abbd34834..1a814486e2 100644 --- a/plugins/codescene/package.json +++ b/plugins/codescene/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-codescene", - "version": "0.1.7-next.4", + "version": "0.1.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/codescene/src/components/CodeScenePageComponent/CodeScenePageComponent.test.tsx b/plugins/codescene/src/components/CodeScenePageComponent/CodeScenePageComponent.test.tsx index d8ffca841d..a1d7690ca8 100644 --- a/plugins/codescene/src/components/CodeScenePageComponent/CodeScenePageComponent.test.tsx +++ b/plugins/codescene/src/components/CodeScenePageComponent/CodeScenePageComponent.test.tsx @@ -15,8 +15,6 @@ */ import React from 'react'; import { CodeScenePageComponent } from './CodeScenePageComponent'; -import { ThemeProvider } from '@material-ui/core'; -import { lightTheme } from '@backstage/theme'; import { rest } from 'msw'; import { setupServer } from 'msw/node'; import { rootRouteRef } from '../../routes'; @@ -54,9 +52,7 @@ describe('CodeScenePageComponent', () => { it('should render', async () => { const rendered = await renderInTestApp( - - - + , { mountedRoutes: { diff --git a/plugins/codescene/src/components/CodeSceneProjectDetailsPage/CodeSceneProjectDetailsPage.test.tsx b/plugins/codescene/src/components/CodeSceneProjectDetailsPage/CodeSceneProjectDetailsPage.test.tsx index 9ace0f1224..8ea1a0235f 100644 --- a/plugins/codescene/src/components/CodeSceneProjectDetailsPage/CodeSceneProjectDetailsPage.test.tsx +++ b/plugins/codescene/src/components/CodeSceneProjectDetailsPage/CodeSceneProjectDetailsPage.test.tsx @@ -15,8 +15,6 @@ */ import React from 'react'; import { CodeSceneProjectDetailsPage } from './CodeSceneProjectDetailsPage'; -import { ThemeProvider } from '@material-ui/core'; -import { lightTheme } from '@backstage/theme'; import { rest } from 'msw'; import { setupServer } from 'msw/node'; import { @@ -90,9 +88,7 @@ describe('CodeSceneProjectDetailsPage', () => { it('should render', async () => { const rendered = await renderInTestApp( - - - + , ); expect(rendered.getByText('CodeScene: test-project')).toBeInTheDocument(); diff --git a/plugins/codescene/src/components/ProjectsComponent/ProjectsComponent.test.tsx b/plugins/codescene/src/components/ProjectsComponent/ProjectsComponent.test.tsx index 4c9ee9ed42..40aee57312 100644 --- a/plugins/codescene/src/components/ProjectsComponent/ProjectsComponent.test.tsx +++ b/plugins/codescene/src/components/ProjectsComponent/ProjectsComponent.test.tsx @@ -15,8 +15,6 @@ */ import React from 'react'; import { ProjectsComponent } from './ProjectsComponent'; -import { ThemeProvider } from '@material-ui/core'; -import { lightTheme } from '@backstage/theme'; import { rest } from 'msw'; import { setupServer } from 'msw/node'; import { rootRouteRef } from '../../routes'; @@ -90,9 +88,7 @@ describe('ProjectsComponent', () => { it('should render', async () => { const rendered = await renderInTestApp( - - - + , { mountedRoutes: { diff --git a/plugins/config-schema/CHANGELOG.md b/plugins/config-schema/CHANGELOG.md index 23677aea1c..2d697c5bfb 100644 --- a/plugins/config-schema/CHANGELOG.md +++ b/plugins/config-schema/CHANGELOG.md @@ -1,5 +1,39 @@ # @backstage/plugin-config-schema +## 0.1.37-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + +## 0.1.36 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + +## 0.1.35 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + ## 0.1.35-next.4 ### Patch Changes diff --git a/plugins/config-schema/package.json b/plugins/config-schema/package.json index 07ea1dd566..2621057bcd 100644 --- a/plugins/config-schema/package.json +++ b/plugins/config-schema/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-config-schema", "description": "A Backstage plugin that lets you browse the configuration schema of your app", - "version": "0.1.35-next.4", + "version": "0.1.37-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/cost-insights/CHANGELOG.md b/plugins/cost-insights/CHANGELOG.md index f709693152..7d9eab807e 100644 --- a/plugins/cost-insights/CHANGELOG.md +++ b/plugins/cost-insights/CHANGELOG.md @@ -1,5 +1,48 @@ # @backstage/plugin-cost-insights +## 0.12.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/test-utils@1.2.3 + - @backstage/theme@0.2.16 + - @backstage/plugin-cost-insights-common@0.1.1 + +## 0.12.2 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.12.1 + +### Patch Changes + +- 593c22253a: Added Y axis for metric data, with relevant formatting and data domain +- f9bbb3be37: Provide the ability to change the base currency from USD to any other currency in cost insights plugin +- d379b6f070: Internal refactor to avoid usage of deprecated symbols +- 5960d0902e: Internal refactor to avoid usage of deprecated symbols +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- f97c7fd1f7: added an optional config entry `costInsights.engineerThreshold` to allow users to control the threshold value for the 'negligible' change in costs. +- a5ecdb99f0: Making a possibility to hide a trending line in a cost insights plugin +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/test-utils@1.2.3 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + - @backstage/plugin-cost-insights-common@0.1.1 + ## 0.12.1-next.4 ### Patch Changes diff --git a/plugins/cost-insights/package.json b/plugins/cost-insights/package.json index 1ed5c08d4d..d8c4805f73 100644 --- a/plugins/cost-insights/package.json +++ b/plugins/cost-insights/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-cost-insights", "description": "A Backstage plugin that helps you keep track of your cloud spend", - "version": "0.12.1-next.4", + "version": "0.12.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -38,7 +38,6 @@ "@backstage/core-plugin-api": "workspace:^", "@backstage/plugin-catalog-react": "workspace:^", "@backstage/plugin-cost-insights-common": "workspace:^", - "@backstage/test-utils": "workspace:^", "@backstage/theme": "workspace:^", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", diff --git a/plugins/dynatrace/CHANGELOG.md b/plugins/dynatrace/CHANGELOG.md index 4f10cfb0bc..4cf2e34619 100644 --- a/plugins/dynatrace/CHANGELOG.md +++ b/plugins/dynatrace/CHANGELOG.md @@ -1,5 +1,36 @@ # @backstage/plugin-dynatrace +## 1.0.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## 1.0.3 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 1.0.2 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 1.0.2-next.4 ### Patch Changes diff --git a/plugins/dynatrace/package.json b/plugins/dynatrace/package.json index f708207647..018a2c3f5a 100644 --- a/plugins/dynatrace/package.json +++ b/plugins/dynatrace/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-dynatrace", - "version": "1.0.2-next.4", + "version": "1.0.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/events-backend-module-aws-sqs/CHANGELOG.md b/plugins/events-backend-module-aws-sqs/CHANGELOG.md index 0983c7801c..991f845cdc 100644 --- a/plugins/events-backend-module-aws-sqs/CHANGELOG.md +++ b/plugins/events-backend-module-aws-sqs/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-events-backend-module-aws-sqs +## 0.1.1 + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- dd008a10c1: Upgrade to AWS SDK for Javascript v3 +- Updated dependencies + - @backstage/backend-tasks@0.4.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/plugin-events-node@0.2.0 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + ## 0.1.1-next.3 ### Patch Changes diff --git a/plugins/events-backend-module-aws-sqs/package.json b/plugins/events-backend-module-aws-sqs/package.json index 4033ccceb0..15c859a8bc 100644 --- a/plugins/events-backend-module-aws-sqs/package.json +++ b/plugins/events-backend-module-aws-sqs/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-events-backend-module-aws-sqs", - "version": "0.1.1-next.3", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/events-backend-module-azure/CHANGELOG.md b/plugins/events-backend-module-azure/CHANGELOG.md index e462c72f25..77498eeb99 100644 --- a/plugins/events-backend-module-azure/CHANGELOG.md +++ b/plugins/events-backend-module-azure/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-events-backend-module-azure +## 0.1.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.2.0 + - @backstage/plugin-events-node@0.2.0 + ## 0.1.1-next.3 ### Patch Changes diff --git a/plugins/events-backend-module-azure/package.json b/plugins/events-backend-module-azure/package.json index 1e86c041b2..3b6302200f 100644 --- a/plugins/events-backend-module-azure/package.json +++ b/plugins/events-backend-module-azure/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-events-backend-module-azure", - "version": "0.1.1-next.3", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/events-backend-module-bitbucket-cloud/CHANGELOG.md b/plugins/events-backend-module-bitbucket-cloud/CHANGELOG.md index 81ca8ab68c..f4a6fa5ae0 100644 --- a/plugins/events-backend-module-bitbucket-cloud/CHANGELOG.md +++ b/plugins/events-backend-module-bitbucket-cloud/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-events-backend-module-bitbucket-cloud +## 0.1.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.2.0 + - @backstage/plugin-events-node@0.2.0 + ## 0.1.1-next.3 ### Patch Changes diff --git a/plugins/events-backend-module-bitbucket-cloud/package.json b/plugins/events-backend-module-bitbucket-cloud/package.json index 07906ded6c..c44c1ef1cc 100644 --- a/plugins/events-backend-module-bitbucket-cloud/package.json +++ b/plugins/events-backend-module-bitbucket-cloud/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-events-backend-module-bitbucket-cloud", - "version": "0.1.1-next.3", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/events-backend-module-gerrit/CHANGELOG.md b/plugins/events-backend-module-gerrit/CHANGELOG.md index 6c44b4d5bc..bf3bdf34b4 100644 --- a/plugins/events-backend-module-gerrit/CHANGELOG.md +++ b/plugins/events-backend-module-gerrit/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-events-backend-module-gerrit +## 0.1.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.2.0 + - @backstage/plugin-events-node@0.2.0 + ## 0.1.1-next.3 ### Patch Changes diff --git a/plugins/events-backend-module-gerrit/package.json b/plugins/events-backend-module-gerrit/package.json index d3f073234f..497756bc93 100644 --- a/plugins/events-backend-module-gerrit/package.json +++ b/plugins/events-backend-module-gerrit/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-events-backend-module-gerrit", - "version": "0.1.1-next.3", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/events-backend-module-github/CHANGELOG.md b/plugins/events-backend-module-github/CHANGELOG.md index b66ef189dc..b3e4d2821b 100644 --- a/plugins/events-backend-module-github/CHANGELOG.md +++ b/plugins/events-backend-module-github/CHANGELOG.md @@ -1,5 +1,24 @@ # @backstage/plugin-events-backend-module-github +## 0.1.1 + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- 0f46ec304c: Add `createGithubSignatureValidator(config)` which can be used + to create a validator used at an ingress for topic `github`. + + On top, there is a new `githubWebhookEventsModule` for the new backend plugin API + which auto-registers the `HttpPostIngress` for topic `github` incl. the validator. + + Please find more information at + https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-github/README.md. + +- Updated dependencies + - @backstage/backend-plugin-api@0.2.0 + - @backstage/plugin-events-node@0.2.0 + - @backstage/config@1.0.5 + ## 0.1.1-next.3 ### Patch Changes diff --git a/plugins/events-backend-module-github/package.json b/plugins/events-backend-module-github/package.json index ac243fa3b2..8be3fd4c7b 100644 --- a/plugins/events-backend-module-github/package.json +++ b/plugins/events-backend-module-github/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-events-backend-module-github", - "version": "0.1.1-next.3", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/events-backend-module-gitlab/CHANGELOG.md b/plugins/events-backend-module-gitlab/CHANGELOG.md index 44ec6ec11b..a3d25cefac 100644 --- a/plugins/events-backend-module-gitlab/CHANGELOG.md +++ b/plugins/events-backend-module-gitlab/CHANGELOG.md @@ -1,5 +1,24 @@ # @backstage/plugin-events-backend-module-gitlab +## 0.1.1 + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- 31fe8f256a: Add `createGitlabTokenValidator(config)` which can be used + to create a validator used at an ingress for topic `gitlab`. + + On top, there is a new `gitlabWebhookEventsModule` for the new backend plugin API + which auto-registers the `HttpPostIngress` for topic `gitlab` incl. the validator. + + Please find more information at + https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-gitlab/README.md. + +- Updated dependencies + - @backstage/backend-plugin-api@0.2.0 + - @backstage/plugin-events-node@0.2.0 + - @backstage/config@1.0.5 + ## 0.1.1-next.3 ### Patch Changes diff --git a/plugins/events-backend-module-gitlab/package.json b/plugins/events-backend-module-gitlab/package.json index 8f8ac8778e..019052ba11 100644 --- a/plugins/events-backend-module-gitlab/package.json +++ b/plugins/events-backend-module-gitlab/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-events-backend-module-gitlab", - "version": "0.1.1-next.3", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/events-backend-test-utils/CHANGELOG.md b/plugins/events-backend-test-utils/CHANGELOG.md index a40e6013a9..f5ce89f47d 100644 --- a/plugins/events-backend-test-utils/CHANGELOG.md +++ b/plugins/events-backend-test-utils/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-events-backend-test-utils +## 0.1.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-events-node@0.2.0 + ## 0.1.1-next.3 ### Patch Changes diff --git a/plugins/events-backend-test-utils/package.json b/plugins/events-backend-test-utils/package.json index 2587f5182b..2cd90d985b 100644 --- a/plugins/events-backend-test-utils/package.json +++ b/plugins/events-backend-test-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-events-backend-test-utils", "description": "The plugin-events-backend-test-utils for @backstage/plugin-events-node", - "version": "0.1.1-next.3", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/events-backend/CHANGELOG.md b/plugins/events-backend/CHANGELOG.md index d033777e13..50074a6f07 100644 --- a/plugins/events-backend/CHANGELOG.md +++ b/plugins/events-backend/CHANGELOG.md @@ -1,5 +1,41 @@ # @backstage/plugin-events-backend +## 0.2.0 + +### Minor Changes + +- cf41eedf43: **BREAKING:** Remove required field `router` at `HttpPostIngressEventPublisher.fromConfig` + and replace it with `bind(router: Router)`. + Additionally, the path prefix `/http` will be added inside `HttpPostIngressEventPublisher`. + + ```diff + // at packages/backend/src/plugins/events.ts + const eventsRouter = Router(); + - const httpRouter = Router(); + - eventsRouter.use('/http', httpRouter); + + const http = HttpPostIngressEventPublisher.fromConfig({ + config: env.config, + logger: env.logger, + - router: httpRouter, + }); + + http.bind(eventsRouter); + ``` + +### Patch Changes + +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- cf41eedf43: Introduce a new interface `RequestDetails` to abstract `Request` + providing access to request body and headers. + + **BREAKING:** Replace `request: Request` with `request: RequestDetails` at `RequestValidator`. + +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/plugin-events-node@0.2.0 + - @backstage/config@1.0.5 + ## 0.2.0-next.3 ### Patch Changes diff --git a/plugins/events-backend/package.json b/plugins/events-backend/package.json index d61ef47724..6aee64754c 100644 --- a/plugins/events-backend/package.json +++ b/plugins/events-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-events-backend", - "version": "0.2.0-next.3", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/events-backend/src/service/InMemoryEventBroker.test.ts b/plugins/events-backend/src/service/InMemoryEventBroker.test.ts index 68a6f63a72..861cdda940 100644 --- a/plugins/events-backend/src/service/InMemoryEventBroker.test.ts +++ b/plugins/events-backend/src/service/InMemoryEventBroker.test.ts @@ -16,6 +16,7 @@ import { getVoidLogger } from '@backstage/backend-common'; import { TestEventSubscriber } from '@backstage/plugin-events-backend-test-utils'; +import { EventParams, EventSubscriber } from '@backstage/plugin-events-node'; import { InMemoryEventBroker } from './InMemoryEventBroker'; const logger = getVoidLogger(); @@ -63,4 +64,51 @@ describe('InMemoryEventBroker', () => { eventPayload: { test: 'topicC' }, }); }); + + it('logs errors from subscribers', async () => { + const topic = 'testTopic'; + + const subscriber1 = new (class Subscriber1 implements EventSubscriber { + supportsEventTopics() { + return [topic]; + } + async onEvent(event: EventParams) { + throw new Error(`NOPE ${event.eventPayload}`); + } + })(); + const subscriber2 = new (class Subscriber2 implements EventSubscriber { + supportsEventTopics() { + return [topic]; + } + async onEvent(event: EventParams) { + throw new Error(`NOPE ${event.eventPayload}`); + } + })(); + + const errorSpy = jest.spyOn(logger, 'error'); + const eventBroker = new InMemoryEventBroker(logger); + + eventBroker.subscribe(subscriber1); + await eventBroker.publish({ topic, eventPayload: '1' }); + + expect(errorSpy).toHaveBeenCalledTimes(1); + expect(errorSpy).toHaveBeenCalledWith( + 'Subscriber "Subscriber1" failed to process event', + new Error('NOPE 1'), + ); + + eventBroker.subscribe(subscriber2); + await eventBroker.publish({ topic, eventPayload: '2' }); + + // With two subscribers we should not halt on the first error but call all subscribers + expect(errorSpy).toHaveBeenCalledTimes(3); + expect(errorSpy).toHaveBeenCalledWith( + 'Subscriber "Subscriber1" failed to process event', + new Error('NOPE 2'), + ); + expect(errorSpy).toHaveBeenCalledWith( + 'Subscriber "Subscriber2" failed to process event', + new Error('NOPE 2'), + ); + }); }); diff --git a/plugins/events-backend/src/service/InMemoryEventBroker.ts b/plugins/events-backend/src/service/InMemoryEventBroker.ts index 90c7d912fe..04be01f658 100644 --- a/plugins/events-backend/src/service/InMemoryEventBroker.ts +++ b/plugins/events-backend/src/service/InMemoryEventBroker.ts @@ -42,7 +42,18 @@ export class InMemoryEventBroker implements EventBroker { ); const subscribed = this.subscribers[params.topic] ?? []; - subscribed.forEach(subscriber => subscriber.onEvent(params)); + await Promise.all( + subscribed.map(async subscriber => { + try { + await subscriber.onEvent(params); + } catch (error) { + this.logger.error( + `Subscriber "${subscriber.constructor.name}" failed to process event`, + error, + ); + } + }), + ); } subscribe( diff --git a/plugins/events-node/CHANGELOG.md b/plugins/events-node/CHANGELOG.md index 1092c53eee..b91a966342 100644 --- a/plugins/events-node/CHANGELOG.md +++ b/plugins/events-node/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-events-node +## 0.2.0 + +### Minor Changes + +- cf41eedf43: Introduce a new interface `RequestDetails` to abstract `Request` + providing access to request body and headers. + + **BREAKING:** Replace `request: Request` with `request: RequestDetails` at `RequestValidator`. + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.2.0 + ## 0.2.0-next.3 ### Patch Changes diff --git a/plugins/events-node/package.json b/plugins/events-node/package.json index 2dcd55c3c1..59123e0e27 100644 --- a/plugins/events-node/package.json +++ b/plugins/events-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-events-node", "description": "The plugin-events-node module for @backstage/plugin-events-backend", - "version": "0.2.0-next.3", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/example-todo-list-backend/CHANGELOG.md b/plugins/example-todo-list-backend/CHANGELOG.md index 3e1e24cb00..f853f231e1 100644 --- a/plugins/example-todo-list-backend/CHANGELOG.md +++ b/plugins/example-todo-list-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @internal/plugin-todo-list-backend +## 1.0.8 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/config@1.0.5 + ## 1.0.8-next.3 ### Patch Changes diff --git a/plugins/example-todo-list-backend/package.json b/plugins/example-todo-list-backend/package.json index 9f10fae96c..14b6a81c70 100644 --- a/plugins/example-todo-list-backend/package.json +++ b/plugins/example-todo-list-backend/package.json @@ -1,6 +1,6 @@ { "name": "@internal/plugin-todo-list-backend", - "version": "1.0.8-next.3", + "version": "1.0.8", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/example-todo-list-common/CHANGELOG.md b/plugins/example-todo-list-common/CHANGELOG.md index 77cf3a31ab..2cf4c41b4f 100644 --- a/plugins/example-todo-list-common/CHANGELOG.md +++ b/plugins/example-todo-list-common/CHANGELOG.md @@ -1,5 +1,12 @@ # @internal/plugin-todo-list-common +## 1.0.7 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.7.2 + ## 1.0.7-next.2 ### Patch Changes diff --git a/plugins/example-todo-list-common/package.json b/plugins/example-todo-list-common/package.json index 54ab4fc482..1392e063ff 100644 --- a/plugins/example-todo-list-common/package.json +++ b/plugins/example-todo-list-common/package.json @@ -1,6 +1,6 @@ { "name": "@internal/plugin-todo-list-common", - "version": "1.0.7-next.2", + "version": "1.0.7", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/example-todo-list/CHANGELOG.md b/plugins/example-todo-list/CHANGELOG.md index fe8d0bdf20..11155a5b8e 100644 --- a/plugins/example-todo-list/CHANGELOG.md +++ b/plugins/example-todo-list/CHANGELOG.md @@ -1,5 +1,30 @@ # @internal/plugin-todo-list +## 1.0.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## 1.0.9 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + +## 1.0.8 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/theme@0.2.16 + ## 1.0.8-next.4 ### Patch Changes diff --git a/plugins/example-todo-list/package.json b/plugins/example-todo-list/package.json index 3d52bd17f3..70db766f36 100644 --- a/plugins/example-todo-list/package.json +++ b/plugins/example-todo-list/package.json @@ -1,6 +1,6 @@ { "name": "@internal/plugin-todo-list", - "version": "1.0.8-next.4", + "version": "1.0.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/explore-backend/CHANGELOG.md b/plugins/explore-backend/CHANGELOG.md index a11847460c..c58091a05f 100644 --- a/plugins/explore-backend/CHANGELOG.md +++ b/plugins/explore-backend/CHANGELOG.md @@ -1,5 +1,34 @@ # @backstage/plugin-explore-backend +## 0.0.2-next.0 + +### Patch Changes + +- 358554ff3c: Bump `msw` to `^0.49.0` +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/plugin-explore-common@0.0.1 + - @backstage/plugin-search-common@1.2.0 + +## 0.0.1 + +### Patch Changes + +- 4dec6f16be: Added new `@backstage/plugin-explore-backend` & `@backstage/plugin-explore-common` packages. + + This deprecates the `ExploreToolsConfig` API (in `@backstage/plugin-explore-react`) which is replaced by the `ExploreApi` & `ExploreClient`. The list of `ExploreTool` data can now be provided on the backend by either using the supplied `StaticExploreToolProvider` or by implementing a custom `ExploreToolProvider`. See the [explore-backend README](https://github.com/backstage/backstage/blob/master/plugins/explore-backend/README.md) for full details. + + NOTE: Existing installations that have customized the `ExploreToolConfig` will continue to work through the new `ExploreClient`. However, existing data should be migrated over to new `explore-backend` plugin as `ExploreToolConfig` will be removed in the future. + + BREAKING CHANGE: If you have previously installed the `explore` plugin, but not yet customized the `ExploreToolConfig` API in your `packages/app`, this will result in an empty list of tools. + +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/plugin-explore-common@0.0.1 + - @backstage/plugin-search-common@1.2.0 + - @backstage/config@1.0.5 + ## 0.0.1-next.2 ### Patch Changes diff --git a/plugins/explore-backend/README.md b/plugins/explore-backend/README.md index d1714806f4..3edf48249a 100644 --- a/plugins/explore-backend/README.md +++ b/plugins/explore-backend/README.md @@ -11,32 +11,32 @@ for these tools. ```bash # From your Backstage root directory -yarn add --cwd packages/backend @backstage/plugin-explore-backend +yarn add --cwd packages/backend @backstage/plugin-explore-backend @backstage/plugin-explore-common ``` ### Adding the plugin to your `packages/backend` You'll need to add the plugin to the router in your `backend` package. You can -do this by creating a file called `packages/backend/src/plugins/explore.ts` +do this by creating a file called `packages/backend/src/plugins/explore.ts` with the following content: ```ts import { createRouter, StaticExploreToolProvider, } from '@backstage/plugin-explore-backend'; +import { ExploreTool } from '@backstage/plugin-explore-common'; import { Router } from 'express'; import { PluginEnvironment } from '../types'; // List of tools you want to surface in the Explore plugin "Tools" page. -const tools: ExploreTool[] = [ +const exploreTools: ExploreTool[] = [ { title: 'New Relic', - description:'new relic plugin', + description: 'new relic plugin', url: '/newrelic', image: 'https://i.imgur.com/L37ikrX.jpg', tags: ['newrelic', 'proxy', 'nerdGraph'], }, - ... ]; export default async function createPlugin( diff --git a/plugins/explore-backend/package.json b/plugins/explore-backend/package.json index 23ec4d9442..5ae66e8dba 100644 --- a/plugins/explore-backend/package.json +++ b/plugins/explore-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-explore-backend", - "version": "0.0.1-next.2", + "version": "0.0.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -37,7 +37,7 @@ "devDependencies": { "@backstage/cli": "workspace:^", "@types/supertest": "^2.0.8", - "msw": "^0.47.0", + "msw": "^0.49.0", "supertest": "^6.2.4" }, "files": [ diff --git a/plugins/explore-common/CHANGELOG.md b/plugins/explore-common/CHANGELOG.md index 794fe6d995..693d0b1b9d 100644 --- a/plugins/explore-common/CHANGELOG.md +++ b/plugins/explore-common/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-explore-common +## 0.0.1 + +### Patch Changes + +- 4dec6f16be: Added new `@backstage/plugin-explore-backend` & `@backstage/plugin-explore-common` packages. + + This deprecates the `ExploreToolsConfig` API (in `@backstage/plugin-explore-react`) which is replaced by the `ExploreApi` & `ExploreClient`. The list of `ExploreTool` data can now be provided on the backend by either using the supplied `StaticExploreToolProvider` or by implementing a custom `ExploreToolProvider`. See the [explore-backend README](https://github.com/backstage/backstage/blob/master/plugins/explore-backend/README.md) for full details. + + NOTE: Existing installations that have customized the `ExploreToolConfig` will continue to work through the new `ExploreClient`. However, existing data should be migrated over to new `explore-backend` plugin as `ExploreToolConfig` will be removed in the future. + + BREAKING CHANGE: If you have previously installed the `explore` plugin, but not yet customized the `ExploreToolConfig` API in your `packages/app`, this will result in an empty list of tools. + ## 0.0.1-next.0 ### Patch Changes diff --git a/plugins/explore-common/package.json b/plugins/explore-common/package.json index 5887a26d06..988745a8f7 100644 --- a/plugins/explore-common/package.json +++ b/plugins/explore-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-explore-common", "description": "Common functionalities for the explore plugin", - "version": "0.0.1-next.0", + "version": "0.0.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/explore-react/CHANGELOG.md b/plugins/explore-react/CHANGELOG.md index d6eb6f1994..358a51dd10 100644 --- a/plugins/explore-react/CHANGELOG.md +++ b/plugins/explore-react/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-explore-react +## 0.0.24 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 4dec6f16be: Added new `@backstage/plugin-explore-backend` & `@backstage/plugin-explore-common` packages. + + This deprecates the `ExploreToolsConfig` API (in `@backstage/plugin-explore-react`) which is replaced by the `ExploreApi` & `ExploreClient`. The list of `ExploreTool` data can now be provided on the backend by either using the supplied `StaticExploreToolProvider` or by implementing a custom `ExploreToolProvider`. See the [explore-backend README](https://github.com/backstage/backstage/blob/master/plugins/explore-backend/README.md) for full details. + + NOTE: Existing installations that have customized the `ExploreToolConfig` will continue to work through the new `ExploreClient`. However, existing data should be migrated over to new `explore-backend` plugin as `ExploreToolConfig` will be removed in the future. + + BREAKING CHANGE: If you have previously installed the `explore` plugin, but not yet customized the `ExploreToolConfig` API in your `packages/app`, this will result in an empty list of tools. + +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-explore-common@0.0.1 + ## 0.0.24-next.2 ### Patch Changes diff --git a/plugins/explore-react/package.json b/plugins/explore-react/package.json index 9eccf90a35..ec96a184f4 100644 --- a/plugins/explore-react/package.json +++ b/plugins/explore-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-explore-react", "description": "A frontend library for Backstage plugins that want to interact with the explore plugin", - "version": "0.0.24-next.2", + "version": "0.0.24", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/explore/CHANGELOG.md b/plugins/explore/CHANGELOG.md index f29ba3f331..7d48154ca3 100644 --- a/plugins/explore/CHANGELOG.md +++ b/plugins/explore/CHANGELOG.md @@ -1,5 +1,60 @@ # @backstage/plugin-explore +## 0.3.45-next.0 + +### Patch Changes + +- d318d4f659: Makes the `GroupsDiagram` not grown on screen on its own. +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-explore-common@0.0.1 + - @backstage/plugin-explore-react@0.0.24 + - @backstage/plugin-search-common@1.2.0 + - @backstage/plugin-search-react@1.3.2-next.0 + +## 0.3.44 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + - @backstage/plugin-search-react@1.3.1 + - @backstage/plugin-explore-react@0.0.24 + +## 0.3.43 + +### Patch Changes + +- c8f49ed4d0: Update search links to only have header as linkable text +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- ea4a5be8f3: Adds styling to graph forcing it to always fill out the available space. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 4dec6f16be: Added new `@backstage/plugin-explore-backend` & `@backstage/plugin-explore-common` packages. + + This deprecates the `ExploreToolsConfig` API (in `@backstage/plugin-explore-react`) which is replaced by the `ExploreApi` & `ExploreClient`. The list of `ExploreTool` data can now be provided on the backend by either using the supplied `StaticExploreToolProvider` or by implementing a custom `ExploreToolProvider`. See the [explore-backend README](https://github.com/backstage/backstage/blob/master/plugins/explore-backend/README.md) for full details. + + NOTE: Existing installations that have customized the `ExploreToolConfig` will continue to work through the new `ExploreClient`. However, existing data should be migrated over to new `explore-backend` plugin as `ExploreToolConfig` will be removed in the future. + + BREAKING CHANGE: If you have previously installed the `explore` plugin, but not yet customized the `ExploreToolConfig` API in your `packages/app`, this will result in an empty list of tools. + +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-search-react@1.3.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/plugin-explore-react@0.0.24 + - @backstage/plugin-explore-common@0.0.1 + - @backstage/plugin-search-common@1.2.0 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.3.43-next.4 ### Patch Changes diff --git a/plugins/explore/README.md b/plugins/explore/README.md index f60d83eafb..5b1de8f632 100644 --- a/plugins/explore/README.md +++ b/plugins/explore/README.md @@ -68,6 +68,7 @@ ready to make modifications, add the following code snippet to add the ```diff +import { ToolSearchResultListItem } from '@backstage/plugin-explore'; ++import BuildIcon from '@material-ui/icons/Build'; const SearchPage = () => { ... diff --git a/plugins/explore/package.json b/plugins/explore/package.json index d12e4bd681..ab764106b9 100644 --- a/plugins/explore/package.json +++ b/plugins/explore/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-explore", "description": "A Backstage plugin for building an exploration page of your software ecosystem", - "version": "0.3.43-next.4", + "version": "0.3.45-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/explore/src/components/GroupsExplorerContent/GroupsDiagram.tsx b/plugins/explore/src/components/GroupsExplorerContent/GroupsDiagram.tsx index 674ef1e43f..fd1d5ba5fb 100644 --- a/plugins/explore/src/components/GroupsExplorerContent/GroupsDiagram.tsx +++ b/plugins/explore/src/components/GroupsExplorerContent/GroupsDiagram.tsx @@ -44,8 +44,10 @@ import useAsync from 'react-use/lib/useAsync'; const useStyles = makeStyles((theme: BackstageTheme) => ({ graph: { minHeight: '100%', + flex: 1, }, graphWrapper: { + display: 'flex', height: '100%', }, organizationNode: { diff --git a/plugins/explore/src/components/ToolExplorerContent/ToolExplorerContent.test.tsx b/plugins/explore/src/components/ToolExplorerContent/ToolExplorerContent.test.tsx index f3cca5642f..7c5259d96b 100644 --- a/plugins/explore/src/components/ToolExplorerContent/ToolExplorerContent.test.tsx +++ b/plugins/explore/src/components/ToolExplorerContent/ToolExplorerContent.test.tsx @@ -16,8 +16,6 @@ import { ExploreTool } from '@backstage/plugin-explore-common'; import { renderInTestApp, TestApiProvider } from '@backstage/test-utils'; -import { lightTheme } from '@backstage/theme'; -import { ThemeProvider } from '@material-ui/core'; import { waitFor } from '@testing-library/react'; import React from 'react'; import { exploreApiRef } from '../../api'; @@ -29,11 +27,9 @@ describe('', () => { }; const Wrapper = ({ children }: { children?: React.ReactNode }) => ( - - - {children} - - + + {children} + ); beforeEach(() => { diff --git a/plugins/firehydrant/CHANGELOG.md b/plugins/firehydrant/CHANGELOG.md index c2f1b44960..6c36794380 100644 --- a/plugins/firehydrant/CHANGELOG.md +++ b/plugins/firehydrant/CHANGELOG.md @@ -1,5 +1,34 @@ # @backstage/plugin-firehydrant +## 0.1.31-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## 0.1.30 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.1.29 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/theme@0.2.16 + ## 0.1.29-next.4 ### Patch Changes diff --git a/plugins/firehydrant/package.json b/plugins/firehydrant/package.json index dd756058d9..95ef78ac5f 100644 --- a/plugins/firehydrant/package.json +++ b/plugins/firehydrant/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-firehydrant", "description": "A Backstage plugin that integrates towards FireHydrant", - "version": "0.1.29-next.4", + "version": "0.1.31-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/fossa/CHANGELOG.md b/plugins/fossa/CHANGELOG.md index f30d7581e9..1c71cbb118 100644 --- a/plugins/fossa/CHANGELOG.md +++ b/plugins/fossa/CHANGELOG.md @@ -1,5 +1,38 @@ # @backstage/plugin-fossa +## 0.2.46-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## 0.2.45 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.2.44 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.2.44-next.4 ### Patch Changes diff --git a/plugins/fossa/package.json b/plugins/fossa/package.json index 73c92439e4..3174653bd0 100644 --- a/plugins/fossa/package.json +++ b/plugins/fossa/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-fossa", "description": "A Backstage plugin that integrates towards FOSSA", - "version": "0.2.44-next.4", + "version": "0.2.46-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/gcalendar/CHANGELOG.md b/plugins/gcalendar/CHANGELOG.md index 2963ca88b0..8fbc2de101 100644 --- a/plugins/gcalendar/CHANGELOG.md +++ b/plugins/gcalendar/CHANGELOG.md @@ -1,5 +1,33 @@ # @backstage/plugin-gcalendar +## 0.3.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## 0.3.9 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + +## 0.3.8 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + ## 0.3.8-next.4 ### Patch Changes diff --git a/plugins/gcalendar/package.json b/plugins/gcalendar/package.json index 6b741e04d0..7d791a7944 100644 --- a/plugins/gcalendar/package.json +++ b/plugins/gcalendar/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-gcalendar", - "version": "0.3.8-next.4", + "version": "0.3.10-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/gcp-projects/CHANGELOG.md b/plugins/gcp-projects/CHANGELOG.md index 1d8dcf7925..6d4246b981 100644 --- a/plugins/gcp-projects/CHANGELOG.md +++ b/plugins/gcp-projects/CHANGELOG.md @@ -1,5 +1,34 @@ # @backstage/plugin-gcp-projects +## 0.3.33-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## 0.3.32 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + +## 0.3.31 + +### Patch Changes + +- d3fea4ae0a: Internal fixes to avoid implicit usage of globals +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 5fb6d5e92e: Updated dependency `@react-hookz/web` to `^19.0.0`. +- 146378c146: Updated dependency `@react-hookz/web` to `^20.0.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/theme@0.2.16 + ## 0.3.31-next.4 ### Patch Changes diff --git a/plugins/gcp-projects/package.json b/plugins/gcp-projects/package.json index 78707f0486..5073aaa3ff 100644 --- a/plugins/gcp-projects/package.json +++ b/plugins/gcp-projects/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-gcp-projects", "description": "A Backstage plugin that helps you manage projects in GCP", - "version": "0.3.31-next.4", + "version": "0.3.33-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/git-release-manager/CHANGELOG.md b/plugins/git-release-manager/CHANGELOG.md index 7df674e09a..28bc204a2e 100644 --- a/plugins/git-release-manager/CHANGELOG.md +++ b/plugins/git-release-manager/CHANGELOG.md @@ -1,5 +1,34 @@ # @backstage/plugin-git-release-manager +## 0.3.27-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/integration@1.4.1 + - @backstage/theme@0.2.16 + +## 0.3.26 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + +## 0.3.25 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/integration@1.4.1 + - @backstage/theme@0.2.16 + ## 0.3.25-next.4 ### Patch Changes diff --git a/plugins/git-release-manager/package.json b/plugins/git-release-manager/package.json index 01ce1b9a44..f757ee36fd 100644 --- a/plugins/git-release-manager/package.json +++ b/plugins/git-release-manager/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-git-release-manager", "description": "A Backstage plugin that helps you manage releases in git", - "version": "0.3.25-next.4", + "version": "0.3.27-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/github-actions/CHANGELOG.md b/plugins/github-actions/CHANGELOG.md index 1f59fd04fd..10665d7a8f 100644 --- a/plugins/github-actions/CHANGELOG.md +++ b/plugins/github-actions/CHANGELOG.md @@ -1,5 +1,40 @@ # @backstage/plugin-github-actions +## 0.5.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/integration@1.4.1 + - @backstage/theme@0.2.16 + +## 0.5.13 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.5.12 + +### Patch Changes + +- d3fea4ae0a: Internal fixes to avoid implicit usage of globals +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/integration@1.4.1 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.5.12-next.4 ### Patch Changes diff --git a/plugins/github-actions/package.json b/plugins/github-actions/package.json index 68120c898d..dc5139629a 100644 --- a/plugins/github-actions/package.json +++ b/plugins/github-actions/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-github-actions", "description": "A Backstage plugin that integrates towards GitHub Actions", - "version": "0.5.12-next.4", + "version": "0.5.14-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/github-actions/src/__fixtures__/get-workflow-run.json b/plugins/github-actions/src/__fixtures__/get-workflow-run.json index 38c3513b15..7b6b3b3890 100644 --- a/plugins/github-actions/src/__fixtures__/get-workflow-run.json +++ b/plugins/github-actions/src/__fixtures__/get-workflow-run.json @@ -3,6 +3,7 @@ "name": "Build", "node_id": "MDEyOldvcmtmbG93IFJ1bjI2OTI4OQ==", "check_suite_id": 42, + "display_title": "foo", "check_suite_node_id": "MDEwOkNoZWNrU3VpdGU0Mg==", "head_branch": "main", "head_sha": "acb5820ced9479c074f688cc328bf03f341a511d", diff --git a/plugins/github-deployments/CHANGELOG.md b/plugins/github-deployments/CHANGELOG.md index 0eac699d59..f74c9e6e1c 100644 --- a/plugins/github-deployments/CHANGELOG.md +++ b/plugins/github-deployments/CHANGELOG.md @@ -1,5 +1,43 @@ # @backstage/plugin-github-deployments +## 0.1.45-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/integration-react@1.1.9-next.0 + - @backstage/theme@0.2.16 + +## 0.1.44 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/integration-react@1.1.8 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.1.43 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/integration-react@1.1.7 + - @backstage/integration@1.4.1 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.1.43-next.4 ### Patch Changes diff --git a/plugins/github-deployments/package.json b/plugins/github-deployments/package.json index ce249a12e9..2f427f9d43 100644 --- a/plugins/github-deployments/package.json +++ b/plugins/github-deployments/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-github-deployments", "description": "A Backstage plugin that integrates towards GitHub Deployments", - "version": "0.1.43-next.4", + "version": "0.1.45-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/github-issues/CHANGELOG.md b/plugins/github-issues/CHANGELOG.md index cae20b4ee6..7b1021d9e1 100644 --- a/plugins/github-issues/CHANGELOG.md +++ b/plugins/github-issues/CHANGELOG.md @@ -1,5 +1,40 @@ # @backstage/plugin-github-issues +## 0.2.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/theme@0.2.16 + +## 0.2.2 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.2.1 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/integration@1.4.1 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.2.1-next.4 ### Patch Changes diff --git a/plugins/github-issues/package.json b/plugins/github-issues/package.json index aa4ba3d723..b82f580727 100644 --- a/plugins/github-issues/package.json +++ b/plugins/github-issues/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-github-issues", - "version": "0.2.1-next.4", + "version": "0.2.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/github-pull-requests-board/CHANGELOG.md b/plugins/github-pull-requests-board/CHANGELOG.md index 7deb9bf2ce..d95a3ef35a 100644 --- a/plugins/github-pull-requests-board/CHANGELOG.md +++ b/plugins/github-pull-requests-board/CHANGELOG.md @@ -1,5 +1,38 @@ # @backstage/plugin-github-pull-requests-board +## 0.1.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/integration@1.4.1 + - @backstage/theme@0.2.16 + +## 0.1.7 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.1.6 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/integration@1.4.1 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.1.6-next.4 ### Patch Changes diff --git a/plugins/github-pull-requests-board/package.json b/plugins/github-pull-requests-board/package.json index 5e30308cde..2211465eaf 100644 --- a/plugins/github-pull-requests-board/package.json +++ b/plugins/github-pull-requests-board/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-github-pull-requests-board", "description": "A Backstage plugin that allows you to see all open Pull Requests for all the repositories owned by your team", - "version": "0.1.6-next.4", + "version": "0.1.8-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/gitops-profiles/CHANGELOG.md b/plugins/gitops-profiles/CHANGELOG.md index 3e6b1a0bd6..f8a2949b11 100644 --- a/plugins/gitops-profiles/CHANGELOG.md +++ b/plugins/gitops-profiles/CHANGELOG.md @@ -1,5 +1,31 @@ # @backstage/plugin-gitops-profiles +## 0.3.32-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## 0.3.31 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + +## 0.3.30 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/theme@0.2.16 + ## 0.3.30-next.4 ### Patch Changes diff --git a/plugins/gitops-profiles/package.json b/plugins/gitops-profiles/package.json index b9a603648d..bb41e8ffc5 100644 --- a/plugins/gitops-profiles/package.json +++ b/plugins/gitops-profiles/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-gitops-profiles", "description": "A Backstage plugin that helps you manage GitOps profiles", - "version": "0.3.30-next.4", + "version": "0.3.32-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/gitops-profiles/src/components/ProfileCatalog/ProfileCatalog.test.tsx b/plugins/gitops-profiles/src/components/ProfileCatalog/ProfileCatalog.test.tsx index e158bcf6ad..5aa59a1cae 100644 --- a/plugins/gitops-profiles/src/components/ProfileCatalog/ProfileCatalog.test.tsx +++ b/plugins/gitops-profiles/src/components/ProfileCatalog/ProfileCatalog.test.tsx @@ -15,8 +15,6 @@ */ import { renderInTestApp, TestApiRegistry } from '@backstage/test-utils'; -import { lightTheme } from '@backstage/theme'; -import { ThemeProvider } from '@material-ui/core'; import React from 'react'; import { gitOpsApiRef, GitOpsRestApi } from '../../api'; import ProfileCatalog from './ProfileCatalog'; @@ -47,11 +45,9 @@ describe('ProfileCatalog', () => { ); const { getByText } = await renderInTestApp( - - - - - , + + + , ); expect(getByText('Create GitOps-managed Cluster')).toBeInTheDocument(); diff --git a/plugins/gocd/CHANGELOG.md b/plugins/gocd/CHANGELOG.md index db096b9395..2f90bd9ab8 100644 --- a/plugins/gocd/CHANGELOG.md +++ b/plugins/gocd/CHANGELOG.md @@ -1,5 +1,38 @@ # @backstage/plugin-gocd +## 0.1.20-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## 0.1.19 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.1.18 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.1.18-next.4 ### Patch Changes diff --git a/plugins/gocd/package.json b/plugins/gocd/package.json index ad4e3fd21e..a0f146e602 100644 --- a/plugins/gocd/package.json +++ b/plugins/gocd/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-gocd", "description": "A Backstage plugin that integrates towards GoCD", - "version": "0.1.18-next.4", + "version": "0.1.20-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/graphiql/CHANGELOG.md b/plugins/graphiql/CHANGELOG.md index 867cb10b2f..8f704104c7 100644 --- a/plugins/graphiql/CHANGELOG.md +++ b/plugins/graphiql/CHANGELOG.md @@ -1,5 +1,32 @@ # @backstage/plugin-graphiql +## 0.2.46-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## 0.2.45 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + +## 0.2.44 + +### Patch Changes + +- d3fea4ae0a: Internal fixes to avoid implicit usage of globals +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/theme@0.2.16 + ## 0.2.44-next.4 ### Patch Changes diff --git a/plugins/graphiql/package.json b/plugins/graphiql/package.json index 986cae5bfa..45bcd08599 100644 --- a/plugins/graphiql/package.json +++ b/plugins/graphiql/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-graphiql", "description": "Backstage plugin for browsing GraphQL APIs", - "version": "0.2.44-next.4", + "version": "0.2.46-next.0", "publishConfig": { "access": "public", "main": "dist/index.esm.js", diff --git a/plugins/graphiql/src/components/GraphiQLBrowser/GraphiQLBrowser.test.tsx b/plugins/graphiql/src/components/GraphiQLBrowser/GraphiQLBrowser.test.tsx index 7724a2ae23..3156662bf3 100644 --- a/plugins/graphiql/src/components/GraphiQLBrowser/GraphiQLBrowser.test.tsx +++ b/plugins/graphiql/src/components/GraphiQLBrowser/GraphiQLBrowser.test.tsx @@ -15,41 +15,33 @@ */ import React from 'react'; -import { render } from '@testing-library/react'; +import { renderInTestApp } from '@backstage/test-utils'; import { GraphiQLBrowser } from './GraphiQLBrowser'; -import { ThemeProvider } from '@material-ui/core'; -import { lightTheme } from '@backstage/theme'; -jest.mock('graphiql', () => () => ''); +jest.mock('graphiql', () => ({ GraphiQL: () => '' })); describe('GraphiQLBrowser', () => { - it('should render error text if there are no endpoints', () => { - const rendered = render( - - - , - ); + it('should render error text if there are no endpoints', async () => { + const rendered = await renderInTestApp(); rendered.getByText('No endpoints available'); }); - it('should render endpoint tabs', () => { - const rendered = render( - - - , + it('should render endpoint tabs', async () => { + const rendered = await renderInTestApp( + , ); rendered.getByText('Endpoint A'); rendered.getByText('Endpoint B'); diff --git a/plugins/graphiql/src/components/GraphiQLPage/GraphiQLPage.test.tsx b/plugins/graphiql/src/components/GraphiQLPage/GraphiQLPage.test.tsx index 90f8edd4ad..9923facc7b 100644 --- a/plugins/graphiql/src/components/GraphiQLPage/GraphiQLPage.test.tsx +++ b/plugins/graphiql/src/components/GraphiQLPage/GraphiQLPage.test.tsx @@ -16,13 +16,9 @@ import React from 'react'; import { GraphiQLPage } from './GraphiQLPage'; -import { ThemeProvider } from '@material-ui/core'; -import { lightTheme } from '@backstage/theme'; import { act } from '@testing-library/react'; -import { renderWithEffects, TestApiProvider } from '@backstage/test-utils'; +import { renderInTestApp, TestApiProvider } from '@backstage/test-utils'; import { GraphQLBrowseApi, graphQlBrowseApiRef } from '../../lib/api'; -import { configApiRef } from '@backstage/core-plugin-api'; -import { ConfigReader } from '@backstage/core-app-api'; jest.mock('../GraphiQLBrowser', () => ({ GraphiQLBrowser: () => '', @@ -38,17 +34,9 @@ describe('GraphiQLPage', () => { }, }; - const rendered = await renderWithEffects( - - - - - , + const rendered = await renderInTestApp( + + , , ); act(() => { @@ -66,16 +54,9 @@ describe('GraphiQLPage', () => { }, }; - const rendered = await renderWithEffects( - - - - + const rendered = await renderInTestApp( + + , ); @@ -90,16 +71,9 @@ describe('GraphiQLPage', () => { }, }; - const rendered = await renderWithEffects( - - - - + const rendered = await renderInTestApp( + + , ); diff --git a/plugins/graphql-backend/CHANGELOG.md b/plugins/graphql-backend/CHANGELOG.md index 1aa0d94040..19c55e9d4b 100644 --- a/plugins/graphql-backend/CHANGELOG.md +++ b/plugins/graphql-backend/CHANGELOG.md @@ -1,5 +1,24 @@ # @backstage/plugin-graphql-backend +## 0.1.30-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/plugin-catalog-graphql@0.3.17-next.0 + +## 0.1.29 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-graphql@0.3.16 + - @backstage/config@1.0.5 + ## 0.1.29-next.3 ### Patch Changes diff --git a/plugins/graphql-backend/package.json b/plugins/graphql-backend/package.json index 9d5775bdcc..4efa773b91 100644 --- a/plugins/graphql-backend/package.json +++ b/plugins/graphql-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-graphql-backend", "description": "An experimental Backstage backend plugin for GraphQL", - "version": "0.1.29-next.3", + "version": "0.1.30-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/home/CHANGELOG.md b/plugins/home/CHANGELOG.md index f8f150ab4b..017c221abf 100644 --- a/plugins/home/CHANGELOG.md +++ b/plugins/home/CHANGELOG.md @@ -1,5 +1,43 @@ # @backstage/plugin-home +## 0.4.30-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-stack-overflow@0.1.10-next.0 + +## 0.4.29 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + - @backstage/plugin-stack-overflow@0.1.9 + +## 0.4.28 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- edf2404e9f: Adjusted the description's empty state on the starred entities table, +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/plugin-stack-overflow@0.1.8 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + ## 0.4.28-next.4 ### Patch Changes diff --git a/plugins/home/package.json b/plugins/home/package.json index 71e768e460..7d52f85eb9 100644 --- a/plugins/home/package.json +++ b/plugins/home/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-home", "description": "A Backstage plugin that helps you build a home page", - "version": "0.4.28-next.4", + "version": "0.4.30-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/home/src/homePageComponents/HeaderWorldClock/HeaderWorldClock.test.tsx b/plugins/home/src/homePageComponents/HeaderWorldClock/HeaderWorldClock.test.tsx index db92fbb89f..03f19fb046 100644 --- a/plugins/home/src/homePageComponents/HeaderWorldClock/HeaderWorldClock.test.tsx +++ b/plugins/home/src/homePageComponents/HeaderWorldClock/HeaderWorldClock.test.tsx @@ -17,8 +17,6 @@ import { renderInTestApp } from '@backstage/test-utils'; import { HeaderWorldClock, ClockConfig } from './HeaderWorldClock'; import React from 'react'; -import { lightTheme } from '@backstage/theme'; -import { ThemeProvider } from '@material-ui/core'; describe('HeaderWorldClock with valid Time Zones', () => { it('displays Time Zones as expected', async () => { @@ -42,9 +40,7 @@ describe('HeaderWorldClock with valid Time Zones', () => { ]; const rendered = await renderInTestApp( - - - , + , ); expect(rendered.getByText('NYC')).toBeInTheDocument(); @@ -59,9 +55,7 @@ describe('HeaderWorldClock with no Time Zones provided', () => { const clockConfigs: ClockConfig[] = []; const rendered = await renderInTestApp( - - - , + , ); expect(rendered.container).toBeEmptyDOMElement(); @@ -78,9 +72,7 @@ describe('HeaderWorldClock with invalid Time Zone', () => { ]; const rendered = await renderInTestApp( - - - , + , ); expect(rendered.getByText('GMT')).toBeInTheDocument(); @@ -105,12 +97,10 @@ describe('HeaderWorldClock with custom Time Format', () => { }; const rendered = await renderInTestApp( - - - , + , ); expect(rendered.getByText('09:10')).toBeInTheDocument(); diff --git a/plugins/ilert/CHANGELOG.md b/plugins/ilert/CHANGELOG.md index edd024f953..5b0baf044a 100644 --- a/plugins/ilert/CHANGELOG.md +++ b/plugins/ilert/CHANGELOG.md @@ -1,5 +1,39 @@ # @backstage/plugin-ilert +## 0.2.3-next.0 + +### Patch Changes + +- b1279d396d: fixed error on service page not showing if historical uptime was disabled on a service +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## 0.2.2 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.2.1 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.2.1-next.4 ### Patch Changes diff --git a/plugins/ilert/package.json b/plugins/ilert/package.json index a41b5baf97..93d341062e 100644 --- a/plugins/ilert/package.json +++ b/plugins/ilert/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-ilert", "description": "A Backstage plugin that integrates towards iLert", - "version": "0.2.1-next.4", + "version": "0.2.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/ilert/src/components/ServicesPage/ServicesTable.tsx b/plugins/ilert/src/components/ServicesPage/ServicesTable.tsx index 30a83e4cec..2597986031 100644 --- a/plugins/ilert/src/components/ServicesPage/ServicesTable.tsx +++ b/plugins/ilert/src/components/ServicesPage/ServicesTable.tsx @@ -86,7 +86,7 @@ export const ServicesTable = ({ cellStyle: smColumnStyle, headerStyle: smColumnStyle, render: rowData => ( - {rowData.uptime.uptimePercentage.p90} + {rowData.uptime?.uptimePercentage?.p90 || ''} ), }; const actionsColumn: TableColumn = { diff --git a/plugins/jenkins-backend/CHANGELOG.md b/plugins/jenkins-backend/CHANGELOG.md index 38c3799d0f..027e54e3e1 100644 --- a/plugins/jenkins-backend/CHANGELOG.md +++ b/plugins/jenkins-backend/CHANGELOG.md @@ -1,5 +1,36 @@ # @backstage/plugin-jenkins-backend +## 0.1.30-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/plugin-jenkins-common@0.1.12-next.0 + - @backstage/plugin-permission-common@0.7.2 + +## 0.1.29 + +### Patch Changes + +- cfe2b98fbe: Remove unnecessary dependency `promise-any-polyfill`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 9447b0fb46: added support for standalone jenkins projects +- Updated dependencies + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/plugin-jenkins-common@0.1.11 + ## 0.1.29-next.3 ### Patch Changes diff --git a/plugins/jenkins-backend/package.json b/plugins/jenkins-backend/package.json index d486459a58..9078ddf51c 100644 --- a/plugins/jenkins-backend/package.json +++ b/plugins/jenkins-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-jenkins-backend", "description": "A Backstage backend plugin that integrates towards Jenkins", - "version": "0.1.29-next.3", + "version": "0.1.30-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/jenkins-common/CHANGELOG.md b/plugins/jenkins-common/CHANGELOG.md index c8a4523ded..86cab7defe 100644 --- a/plugins/jenkins-common/CHANGELOG.md +++ b/plugins/jenkins-common/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-jenkins-common +## 0.1.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-common@1.0.10-next.0 + - @backstage/plugin-permission-common@0.7.2 + +## 0.1.11 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-catalog-common@1.0.9 + ## 0.1.11-next.3 ### Patch Changes diff --git a/plugins/jenkins-common/package.json b/plugins/jenkins-common/package.json index 5ae59c1656..dc99c7861e 100644 --- a/plugins/jenkins-common/package.json +++ b/plugins/jenkins-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-jenkins-common", - "version": "0.1.11-next.3", + "version": "0.1.12-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/jenkins/CHANGELOG.md b/plugins/jenkins/CHANGELOG.md index 872a636156..529f42e53b 100644 --- a/plugins/jenkins/CHANGELOG.md +++ b/plugins/jenkins/CHANGELOG.md @@ -1,5 +1,41 @@ # @backstage/plugin-jenkins +## 0.7.13-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-jenkins-common@0.1.12-next.0 + +## 0.7.12 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.7.11 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-jenkins-common@0.1.11 + ## 0.7.11-next.4 ### Patch Changes diff --git a/plugins/jenkins/package.json b/plugins/jenkins/package.json index 6ec0dfa449..5cb72c6ca5 100644 --- a/plugins/jenkins/package.json +++ b/plugins/jenkins/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-jenkins", "description": "A Backstage plugin that integrates towards Jenkins", - "version": "0.7.11-next.4", + "version": "0.7.13-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/kafka-backend/CHANGELOG.md b/plugins/kafka-backend/CHANGELOG.md index badfbc3e5b..84a3776e48 100644 --- a/plugins/kafka-backend/CHANGELOG.md +++ b/plugins/kafka-backend/CHANGELOG.md @@ -1,5 +1,26 @@ # @backstage/plugin-kafka-backend +## 0.2.33-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + +## 0.2.32 + +### Patch Changes + +- 0b54dbaf7d: Internal tweak to adapt to `kafkajs` 2.2.3 +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + ## 0.2.32-next.3 ### Patch Changes diff --git a/plugins/kafka-backend/package.json b/plugins/kafka-backend/package.json index a95076d34a..e5feaa34fb 100644 --- a/plugins/kafka-backend/package.json +++ b/plugins/kafka-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kafka-backend", "description": "A Backstage backend plugin that integrates towards Kafka", - "version": "0.2.32-next.3", + "version": "0.2.33-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/kafka/CHANGELOG.md b/plugins/kafka/CHANGELOG.md index e17ff155f4..208ac47962 100644 --- a/plugins/kafka/CHANGELOG.md +++ b/plugins/kafka/CHANGELOG.md @@ -1,5 +1,39 @@ # @backstage/plugin-kafka +## 0.3.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## 0.3.13 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.3.12 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + ## 0.3.12-next.4 ### Patch Changes diff --git a/plugins/kafka/package.json b/plugins/kafka/package.json index c39811f422..4050cea0ee 100644 --- a/plugins/kafka/package.json +++ b/plugins/kafka/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kafka", "description": "A Backstage plugin that integrates towards Kafka", - "version": "0.3.12-next.4", + "version": "0.3.14-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/kubernetes-backend/CHANGELOG.md b/plugins/kubernetes-backend/CHANGELOG.md index c0c21c42bc..d06d99e6f9 100644 --- a/plugins/kubernetes-backend/CHANGELOG.md +++ b/plugins/kubernetes-backend/CHANGELOG.md @@ -1,5 +1,40 @@ # @backstage/plugin-kubernetes-backend +## 0.9.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-test-utils@0.1.32-next.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/plugin-kubernetes-common@0.5.1-next.0 + +## 0.9.0 + +### Minor Changes + +- 2db8acffe7: Kubernetes plugin now gracefully surfaces transport-level errors (like DNS or timeout, or other socket errors) occurring while fetching data. This will be merged into any data that is fetched successfully, fixing a bug where the whole page would be empty if any fetch operation encountered such an error. + +### Patch Changes + +- 22e20b3a59: Clusters declared in the app-config can now have their CA configured via a local filesystem path using the `caFile` property. +- 9ce7866ecd: Updated dependency `@kubernetes/client-node` to `0.18.0`. +- b585179770: Added Kubernetes proxy API route to backend Kubernetes plugin, allowing Backstage plugin developers to read/write new information from Kubernetes (if proper credentials are provided). +- Updated dependencies + - @backstage/plugin-kubernetes-common@0.5.0 + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-test-utils@0.1.31 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + ## 0.8.1-next.4 ### Patch Changes diff --git a/plugins/kubernetes-backend/package.json b/plugins/kubernetes-backend/package.json index 21e8613456..6f938818d9 100644 --- a/plugins/kubernetes-backend/package.json +++ b/plugins/kubernetes-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kubernetes-backend", "description": "A Backstage backend plugin that integrates towards Kubernetes", - "version": "0.8.1-next.4", + "version": "0.9.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/kubernetes-common/CHANGELOG.md b/plugins/kubernetes-common/CHANGELOG.md index 38fa766fd3..3d6a83c355 100644 --- a/plugins/kubernetes-common/CHANGELOG.md +++ b/plugins/kubernetes-common/CHANGELOG.md @@ -1,5 +1,25 @@ # @backstage/plugin-kubernetes-common +## 0.5.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + +## 0.5.0 + +### Minor Changes + +- 2db8acffe7: Kubernetes plugin now gracefully surfaces transport-level errors (like DNS or timeout, or other socket errors) occurring while fetching data. This will be merged into any data that is fetched successfully, fixing a bug where the whole page would be empty if any fetch operation encountered such an error. + +### Patch Changes + +- 9ce7866ecd: Updated dependency `@kubernetes/client-node` to `0.18.0`. +- b585179770: Added Kubernetes proxy API route to backend Kubernetes plugin, allowing Backstage plugin developers to read/write new information from Kubernetes (if proper credentials are provided). +- Updated dependencies + - @backstage/catalog-model@1.1.4 + ## 0.4.5-next.1 ### Patch Changes diff --git a/plugins/kubernetes-common/package.json b/plugins/kubernetes-common/package.json index 3dc122fd6a..9c346dcec9 100644 --- a/plugins/kubernetes-common/package.json +++ b/plugins/kubernetes-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kubernetes-common", "description": "Common functionalities for kubernetes, to be shared between kubernetes and kubernetes-backend plugin", - "version": "0.4.5-next.1", + "version": "0.5.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/kubernetes/CHANGELOG.md b/plugins/kubernetes/CHANGELOG.md index fcf853831f..d5424be52a 100644 --- a/plugins/kubernetes/CHANGELOG.md +++ b/plugins/kubernetes/CHANGELOG.md @@ -1,5 +1,43 @@ # @backstage/plugin-kubernetes +## 0.7.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-kubernetes-common@0.5.1-next.0 + +## 0.7.6 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.7.5 + +### Patch Changes + +- 2db8acffe7: Kubernetes plugin now gracefully surfaces transport-level errors (like DNS or timeout, or other socket errors) occurring while fetching data. This will be merged into any data that is fetched successfully, fixing a bug where the whole page would be empty if any fetch operation encountered such an error. +- 365f887717: Removed rendering for ErrorEmptyState in ErrorReporting component, so nothing is rendered when there are no errors. Also removed Divider on Kubernetes page. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 9ce7866ecd: Updated dependency `@kubernetes/client-node` to `0.18.0`. +- Updated dependencies + - @backstage/plugin-kubernetes-common@0.5.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + ## 0.7.5-next.4 ### Patch Changes diff --git a/plugins/kubernetes/package.json b/plugins/kubernetes/package.json index 7de34f1fb1..be9da8bf8e 100644 --- a/plugins/kubernetes/package.json +++ b/plugins/kubernetes/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kubernetes", "description": "A Backstage plugin that integrates towards Kubernetes", - "version": "0.7.5-next.4", + "version": "0.7.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/lighthouse/CHANGELOG.md b/plugins/lighthouse/CHANGELOG.md index b87fb2b475..a8239ad58d 100644 --- a/plugins/lighthouse/CHANGELOG.md +++ b/plugins/lighthouse/CHANGELOG.md @@ -1,5 +1,39 @@ # @backstage/plugin-lighthouse +## 0.3.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## 0.3.13 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.3.12 + +### Patch Changes + +- e3dfef3f63: Fixed "Emulated Form Factor" field in the audit creation form not working with the latest version (1.0.2) of `lighthouse-audit-service`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + ## 0.3.12-next.4 ### Patch Changes diff --git a/plugins/lighthouse/package.json b/plugins/lighthouse/package.json index e1ed2b7cf6..61736711e6 100644 --- a/plugins/lighthouse/package.json +++ b/plugins/lighthouse/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-lighthouse", "description": "A Backstage plugin that integrates towards Lighthouse", - "version": "0.3.12-next.4", + "version": "0.3.14-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/lighthouse/src/components/AuditList/AuditListForEntity.test.tsx b/plugins/lighthouse/src/components/AuditList/AuditListForEntity.test.tsx index 3e34eed6e3..59892e1475 100644 --- a/plugins/lighthouse/src/components/AuditList/AuditListForEntity.test.tsx +++ b/plugins/lighthouse/src/components/AuditList/AuditListForEntity.test.tsx @@ -16,11 +16,8 @@ import { Entity } from '@backstage/catalog-model'; import { EntityProvider } from '@backstage/plugin-catalog-react'; -import { lightTheme } from '@backstage/theme'; -import { ThemeProvider } from '@material-ui/core'; -import { render } from '@testing-library/react'; +import { renderInTestApp, TestApiProvider } from '@backstage/test-utils'; import React from 'react'; -import { MemoryRouter } from 'react-router-dom'; import { lighthouseApiRef, LighthouseRestApi, @@ -30,36 +27,18 @@ import { useWebsiteForEntity } from '../../hooks/useWebsiteForEntity'; import * as data from '../../__fixtures__/website-list-response.json'; import { AuditListForEntity } from './AuditListForEntity'; -import { ApiProvider } from '@backstage/core-app-api'; -import { errorApiRef } from '@backstage/core-plugin-api'; -import { TestApiRegistry } from '@backstage/test-utils'; - jest.mock('../../hooks/useWebsiteForEntity', () => ({ useWebsiteForEntity: jest.fn(), })); +const useWebsiteForEntityMock = useWebsiteForEntity as jest.Mock; + const websiteListResponse = data as WebsiteListResponse; const entityWebsite = websiteListResponse.items[0]; describe('', () => { - let apis: TestApiRegistry; - - const mockErrorApi: jest.Mocked = { - post: jest.fn(), - error$: jest.fn(), - }; - - beforeEach(() => { - apis = TestApiRegistry.from( - [lighthouseApiRef, new LighthouseRestApi('http://lighthouse')], - [errorApiRef, mockErrorApi], - ); - - (useWebsiteForEntity as jest.Mock).mockReturnValue({ - value: entityWebsite, - loading: false, - error: null, - }); + afterEach(() => { + jest.resetAllMocks(); }); const entity: Entity = { @@ -78,66 +57,55 @@ describe('', () => { }, }; - const subject = () => - render( - - - - - - - - - , - ); + const subject = () => ( + + + + + + ); it('renders the audit list for the entity', async () => { - const { findByText } = subject(); + useWebsiteForEntityMock.mockReturnValue({ + value: entityWebsite, + loading: false, + error: null, + }); + const { findByText } = await renderInTestApp(subject()); expect(await findByText(entityWebsite.url)).toBeInTheDocument(); }); - describe('where the data is loading', () => { - beforeEach(() => { - (useWebsiteForEntity as jest.Mock).mockReturnValue({ - value: null, - loading: true, - error: null, - }); + it('renders a Progress element where the data is loading', async () => { + useWebsiteForEntityMock.mockReturnValue({ + value: null, + loading: true, + error: null, }); - it('renders a Progress element', async () => { - const { findByTestId } = subject(); - expect(await findByTestId('progress')).toBeInTheDocument(); - }); + const { findByTestId } = await renderInTestApp(subject()); + expect(await findByTestId('progress')).toBeInTheDocument(); }); - describe('where there is an error loading data', () => { - beforeEach(() => { - (useWebsiteForEntity as jest.Mock).mockReturnValue({ - value: null, - loading: false, - error: 'error', - }); - }); - - it('renders nothing', async () => { - const { queryByTestId } = subject(); - expect(queryByTestId('AuditListTable')).toBeNull(); + it('renders nothing where there is an error loading data', async () => { + useWebsiteForEntityMock.mockReturnValue({ + value: null, + loading: false, + error: 'error', }); + const { queryByTestId } = await renderInTestApp(subject()); + expect(queryByTestId('AuditListTable')).toBeNull(); }); - describe('where there is not data', () => { - beforeEach(() => { - (useWebsiteForEntity as jest.Mock).mockReturnValue({ - value: null, - loading: false, - error: null, - }); + it('renders nothing where there is not data', async () => { + useWebsiteForEntityMock.mockReturnValue({ + value: null, + loading: false, + error: null, }); - it('renders nothing', async () => { - const { queryByTestId } = subject(); - expect(queryByTestId('AuditListTable')).toBeNull(); - }); + const { queryByTestId } = await renderInTestApp(subject()); + expect(queryByTestId('AuditListTable')).toBeNull(); }); }); diff --git a/plugins/lighthouse/src/components/Cards/LastLighthouseAuditCard.test.tsx b/plugins/lighthouse/src/components/Cards/LastLighthouseAuditCard.test.tsx index ab1e2683b6..c59458f3f3 100644 --- a/plugins/lighthouse/src/components/Cards/LastLighthouseAuditCard.test.tsx +++ b/plugins/lighthouse/src/components/Cards/LastLighthouseAuditCard.test.tsx @@ -16,11 +16,8 @@ import { Entity } from '@backstage/catalog-model'; import { EntityProvider } from '@backstage/plugin-catalog-react'; -import { lightTheme } from '@backstage/theme'; -import { ThemeProvider } from '@material-ui/core'; -import { render } from '@testing-library/react'; +import { renderInTestApp } from '@backstage/test-utils'; import React from 'react'; -import { MemoryRouter } from 'react-router-dom'; import { AuditCompleted, LighthouseCategoryId, @@ -64,22 +61,15 @@ describe('', () => { }, }; - const subject = () => - render( - - - - - - - , - ); - describe('where the last audit completed successfully', () => { const audit = entityWebsite.lastAudit as AuditCompleted; it('renders the performance data for the audit', async () => { - const { findByText } = subject(); + const { findByText } = await renderInTestApp( + + + , + ); expect(await findByText(audit.url)).toBeInTheDocument(); expect(await findByText(audit.status)).toBeInTheDocument(); for (const category of Object.keys(audit.categories)) { @@ -101,7 +91,11 @@ describe('', () => { }); it('renders the performance data for the audit', async () => { - const { findByText } = subject(); + const { findByText } = await renderInTestApp( + + + , + ); expect(await findByText('N/A')).toBeInTheDocument(); }); }); @@ -119,7 +113,11 @@ describe('', () => { }); it('renders the url and status of the audit', async () => { - const { findByText } = subject(); + const { findByText } = await renderInTestApp( + + + , + ); expect(await findByText(audit.url)).toBeInTheDocument(); expect(await findByText(audit.status)).toBeInTheDocument(); }); @@ -135,7 +133,11 @@ describe('', () => { }); it('renders a Progress element', async () => { - const { findByTestId } = subject(); + const { findByTestId } = await renderInTestApp( + + + , + ); expect(await findByTestId('progress')).toBeInTheDocument(); }); }); @@ -150,7 +152,11 @@ describe('', () => { }); it('renders nothing', async () => { - const { queryByTestId } = subject(); + const { queryByTestId } = await renderInTestApp( + + + , + ); expect(queryByTestId('AuditListTable')).toBeNull(); }); }); @@ -165,7 +171,11 @@ describe('', () => { }); it('renders nothing', async () => { - const { queryByTestId } = subject(); + const { queryByTestId } = await renderInTestApp( + + + , + ); expect(queryByTestId('AuditListTable')).toBeNull(); }); }); diff --git a/plugins/newrelic-dashboard/CHANGELOG.md b/plugins/newrelic-dashboard/CHANGELOG.md index 6829b313e0..3b44ee9f9a 100644 --- a/plugins/newrelic-dashboard/CHANGELOG.md +++ b/plugins/newrelic-dashboard/CHANGELOG.md @@ -1,5 +1,35 @@ # @backstage/plugin-newrelic-dashboard +## 0.2.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + +## 0.2.6 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.2.5 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + ## 0.2.5-next.4 ### Patch Changes diff --git a/plugins/newrelic-dashboard/package.json b/plugins/newrelic-dashboard/package.json index 16b08ca2e4..93ae31d937 100644 --- a/plugins/newrelic-dashboard/package.json +++ b/plugins/newrelic-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-newrelic-dashboard", - "version": "0.2.5-next.4", + "version": "0.2.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/newrelic/CHANGELOG.md b/plugins/newrelic/CHANGELOG.md index 7f02f2630c..0c8ad823db 100644 --- a/plugins/newrelic/CHANGELOG.md +++ b/plugins/newrelic/CHANGELOG.md @@ -1,5 +1,31 @@ # @backstage/plugin-newrelic +## 0.3.32-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## 0.3.31 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + +## 0.3.30 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/theme@0.2.16 + ## 0.3.30-next.4 ### Patch Changes diff --git a/plugins/newrelic/package.json b/plugins/newrelic/package.json index 6b0d1f8c51..c4812d561e 100644 --- a/plugins/newrelic/package.json +++ b/plugins/newrelic/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-newrelic", "description": "A Backstage plugin that integrates towards New Relic", - "version": "0.3.30-next.4", + "version": "0.3.32-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/org-react/CHANGELOG.md b/plugins/org-react/CHANGELOG.md index 1bcb54c86f..7f85bb12a8 100644 --- a/plugins/org-react/CHANGELOG.md +++ b/plugins/org-react/CHANGELOG.md @@ -1,5 +1,39 @@ # @backstage/plugin-org-react +## 0.1.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## 0.1.2 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.1.1 + +### Patch Changes + +- 4cb5066828: Bug fixes and adding the possibility to add a default value for the `GroupListPicker`. Fixes: Vertical size jump on text entry, left align for text, selecting a value closes the popup, auto focus on the popup when opening +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/catalog-client@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.1.1-next.4 ### Patch Changes diff --git a/plugins/org-react/package.json b/plugins/org-react/package.json index 78af6d23b0..41c1fd2d1e 100644 --- a/plugins/org-react/package.json +++ b/plugins/org-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-org-react", - "version": "0.1.1-next.4", + "version": "0.1.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/org/CHANGELOG.md b/plugins/org/CHANGELOG.md index 1f8d0f446e..6a5a25304c 100644 --- a/plugins/org/CHANGELOG.md +++ b/plugins/org/CHANGELOG.md @@ -1,5 +1,39 @@ # @backstage/plugin-org +## 0.6.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## 0.6.3 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.6.2 + +### Patch Changes + +- 4395eac4d8: Made all the ownership boxes the same size +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 67cedfe42e: Update `UserProfileCard` and `GroupProfileCard` to not render links unless the `showLinks` prop is set. The primary component for rendering links are the `EntityLinksCard` from plugin-catalog. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.6.2-next.4 ### Patch Changes diff --git a/plugins/org/package.json b/plugins/org/package.json index ac09ef2cb6..e2538a5c0c 100644 --- a/plugins/org/package.json +++ b/plugins/org/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-org", "description": "A Backstage plugin that helps you create entity pages for your organization", - "version": "0.6.2-next.4", + "version": "0.6.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/pagerduty/CHANGELOG.md b/plugins/pagerduty/CHANGELOG.md index 44bcfd7daf..49cf4ea69c 100644 --- a/plugins/pagerduty/CHANGELOG.md +++ b/plugins/pagerduty/CHANGELOG.md @@ -1,5 +1,39 @@ # @backstage/plugin-pagerduty +## 0.5.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## 0.5.6 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.5.5 + +### Patch Changes + +- cb716004ef: Internal refactor to improve tests +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.5.5-next.4 ### Patch Changes diff --git a/plugins/pagerduty/package.json b/plugins/pagerduty/package.json index e3fbbec6cd..9279e53b30 100644 --- a/plugins/pagerduty/package.json +++ b/plugins/pagerduty/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-pagerduty", "description": "A Backstage plugin that integrates towards PagerDuty", - "version": "0.5.5-next.4", + "version": "0.5.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/periskop-backend/CHANGELOG.md b/plugins/periskop-backend/CHANGELOG.md index 9e4f61284b..bd58a06593 100644 --- a/plugins/periskop-backend/CHANGELOG.md +++ b/plugins/periskop-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-periskop-backend +## 0.1.10 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + ## 0.1.10-next.3 ### Patch Changes diff --git a/plugins/periskop-backend/package.json b/plugins/periskop-backend/package.json index d131e52aec..102569ad79 100644 --- a/plugins/periskop-backend/package.json +++ b/plugins/periskop-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-periskop-backend", - "version": "0.1.10-next.3", + "version": "0.1.10", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/periskop/CHANGELOG.md b/plugins/periskop/CHANGELOG.md index 880ea18569..5da6ee061a 100644 --- a/plugins/periskop/CHANGELOG.md +++ b/plugins/periskop/CHANGELOG.md @@ -1,5 +1,38 @@ # @backstage/plugin-periskop +## 0.1.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + +## 0.1.11 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.1.10 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.1.10-next.4 ### Patch Changes diff --git a/plugins/periskop/package.json b/plugins/periskop/package.json index ac7008395a..0863fc6402 100644 --- a/plugins/periskop/package.json +++ b/plugins/periskop/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-periskop", - "version": "0.1.10-next.4", + "version": "0.1.12-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/permission-backend/CHANGELOG.md b/plugins/permission-backend/CHANGELOG.md index 3de6381a17..f33b09f657 100644 --- a/plugins/permission-backend/CHANGELOG.md +++ b/plugins/permission-backend/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-permission-backend +## 0.5.14 + +### Patch Changes + +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-node@0.7.2 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/config@1.0.5 + ## 0.5.14-next.3 ### Patch Changes diff --git a/plugins/permission-backend/package.json b/plugins/permission-backend/package.json index 90ca3b24f2..f9ed36a35d 100644 --- a/plugins/permission-backend/package.json +++ b/plugins/permission-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-permission-backend", - "version": "0.5.14-next.3", + "version": "0.5.14", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/permission-common/CHANGELOG.md b/plugins/permission-common/CHANGELOG.md index ca97b2e586..5c11ef95af 100644 --- a/plugins/permission-common/CHANGELOG.md +++ b/plugins/permission-common/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-permission-common +## 0.7.2 + +### Patch Changes + +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + ## 0.7.2-next.2 ### Patch Changes diff --git a/plugins/permission-common/package.json b/plugins/permission-common/package.json index d1bda3215a..5b5ca74560 100644 --- a/plugins/permission-common/package.json +++ b/plugins/permission-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-permission-common", "description": "Isomorphic types and client for Backstage permissions and authorization", - "version": "0.7.2-next.2", + "version": "0.7.2", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/plugins/permission-node/CHANGELOG.md b/plugins/permission-node/CHANGELOG.md index e9dd8f4bed..4c38e7a895 100644 --- a/plugins/permission-node/CHANGELOG.md +++ b/plugins/permission-node/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-permission-node +## 0.7.2 + +### Patch Changes + +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/config@1.0.5 + ## 0.7.2-next.3 ### Patch Changes diff --git a/plugins/permission-node/package.json b/plugins/permission-node/package.json index 668d148174..b23670017e 100644 --- a/plugins/permission-node/package.json +++ b/plugins/permission-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-permission-node", "description": "Common permission and authorization utilities for backend plugins", - "version": "0.7.2-next.3", + "version": "0.7.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/permission-react/CHANGELOG.md b/plugins/permission-react/CHANGELOG.md index b6cdffe52e..708b30abdc 100644 --- a/plugins/permission-react/CHANGELOG.md +++ b/plugins/permission-react/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-permission-react +## 0.4.8 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/config@1.0.5 + ## 0.4.8-next.3 ### Patch Changes diff --git a/plugins/permission-react/package.json b/plugins/permission-react/package.json index 69464c312d..c69d2899ee 100644 --- a/plugins/permission-react/package.json +++ b/plugins/permission-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-permission-react", - "version": "0.4.8-next.3", + "version": "0.4.8", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/playlist-backend/CHANGELOG.md b/plugins/playlist-backend/CHANGELOG.md index f3651e6276..4686f83912 100644 --- a/plugins/playlist-backend/CHANGELOG.md +++ b/plugins/playlist-backend/CHANGELOG.md @@ -1,5 +1,40 @@ # @backstage/plugin-playlist-backend +## 0.2.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-test-utils@0.1.32-next.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-node@0.7.2 + - @backstage/plugin-playlist-common@0.1.3 + +## 0.2.2 + +### Patch Changes + +- c507aee8a2: Ensured typescript type checks in migration files. +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-node@0.7.2 + - @backstage/backend-test-utils@0.1.31 + - @backstage/errors@1.1.4 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/plugin-playlist-common@0.1.3 + ## 0.2.2-next.4 ### Patch Changes diff --git a/plugins/playlist-backend/package.json b/plugins/playlist-backend/package.json index 22a3579299..20426c56aa 100644 --- a/plugins/playlist-backend/package.json +++ b/plugins/playlist-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-playlist-backend", - "version": "0.2.2-next.4", + "version": "0.2.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/playlist-common/CHANGELOG.md b/plugins/playlist-common/CHANGELOG.md index 47a0eb1dc5..3db070e10d 100644 --- a/plugins/playlist-common/CHANGELOG.md +++ b/plugins/playlist-common/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-playlist-common +## 0.1.3 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.7.2 + ## 0.1.3-next.2 ### Patch Changes diff --git a/plugins/playlist-common/package.json b/plugins/playlist-common/package.json index 4a3662b057..9a3820e306 100644 --- a/plugins/playlist-common/package.json +++ b/plugins/playlist-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-playlist-common", "description": "Common functionalities for the playlist plugin", - "version": "0.1.3-next.2", + "version": "0.1.3", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/playlist/CHANGELOG.md b/plugins/playlist/CHANGELOG.md index 7755808035..a33c434e9f 100644 --- a/plugins/playlist/CHANGELOG.md +++ b/plugins/playlist/CHANGELOG.md @@ -1,5 +1,50 @@ # @backstage/plugin-playlist +## 0.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-catalog-common@1.0.10-next.0 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/plugin-permission-react@0.4.8 + - @backstage/plugin-playlist-common@0.1.3 + - @backstage/plugin-search-react@1.3.2-next.0 + +## 0.1.4 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + - @backstage/plugin-search-react@1.3.1 + +## 0.1.3 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/plugin-search-react@1.3.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-permission-common@0.7.2 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/plugin-permission-react@0.4.8 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/plugin-catalog-common@1.0.9 + - @backstage/plugin-playlist-common@0.1.3 + ## 0.1.3-next.4 ### Patch Changes diff --git a/plugins/playlist/package.json b/plugins/playlist/package.json index c2a991d59a..4beea85e27 100644 --- a/plugins/playlist/package.json +++ b/plugins/playlist/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-playlist", - "version": "0.1.3-next.4", + "version": "0.1.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/playlist/src/components/PlaylistCard/PlaylistCard.test.tsx b/plugins/playlist/src/components/PlaylistCard/PlaylistCard.test.tsx index 177cc23b81..5a34aa93e2 100644 --- a/plugins/playlist/src/components/PlaylistCard/PlaylistCard.test.tsx +++ b/plugins/playlist/src/components/PlaylistCard/PlaylistCard.test.tsx @@ -16,8 +16,6 @@ import { entityRouteRef } from '@backstage/plugin-catalog-react'; import { renderInTestApp } from '@backstage/test-utils'; -import { lightTheme } from '@backstage/theme'; -import { ThemeProvider } from '@material-ui/core'; import React from 'react'; import { rootRouteRef } from '../../routes'; @@ -26,20 +24,18 @@ import { PlaylistCard } from './PlaylistCard'; describe('', () => { it('renders playlist info', async () => { const rendered = await renderInTestApp( - - - , + , { mountedRoutes: { '/playlists': rootRouteRef, diff --git a/plugins/proxy-backend/CHANGELOG.md b/plugins/proxy-backend/CHANGELOG.md index 7ae2b77512..4a7a1c3554 100644 --- a/plugins/proxy-backend/CHANGELOG.md +++ b/plugins/proxy-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-proxy-backend +## 0.2.33 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 03843259b4: Documented the `createRouter` method. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + ## 0.2.33-next.3 ### Patch Changes diff --git a/plugins/proxy-backend/package.json b/plugins/proxy-backend/package.json index 7acaa0dce2..b4342ad43c 100644 --- a/plugins/proxy-backend/package.json +++ b/plugins/proxy-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-proxy-backend", "description": "A Backstage backend plugin that helps you set up proxy endpoints in the backend", - "version": "0.2.33-next.3", + "version": "0.2.33", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/rollbar-backend/CHANGELOG.md b/plugins/rollbar-backend/CHANGELOG.md index 1b5d5e4af6..06c6af4fe4 100644 --- a/plugins/rollbar-backend/CHANGELOG.md +++ b/plugins/rollbar-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-rollbar-backend +## 0.1.36 + +### Patch Changes + +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + ## 0.1.36-next.3 ### Patch Changes diff --git a/plugins/rollbar-backend/package.json b/plugins/rollbar-backend/package.json index 131900ae21..552a534058 100644 --- a/plugins/rollbar-backend/package.json +++ b/plugins/rollbar-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-rollbar-backend", "description": "A Backstage backend plugin that integrates towards Rollbar", - "version": "0.1.36-next.3", + "version": "0.1.36", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/rollbar/CHANGELOG.md b/plugins/rollbar/CHANGELOG.md index c01af407d1..808f14c81d 100644 --- a/plugins/rollbar/CHANGELOG.md +++ b/plugins/rollbar/CHANGELOG.md @@ -1,5 +1,37 @@ # @backstage/plugin-rollbar +## 0.4.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/core-plugin-api@1.2.0 + - @backstage/theme@0.2.16 + +## 0.4.13 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/plugin-catalog-react@1.2.3 + +## 0.4.12 + +### Patch Changes + +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/catalog-model@1.1.4 + - @backstage/theme@0.2.16 + ## 0.4.12-next.4 ### Patch Changes diff --git a/plugins/rollbar/package.json b/plugins/rollbar/package.json index b4ac81738d..3a29ab0847 100644 --- a/plugins/rollbar/package.json +++ b/plugins/rollbar/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-rollbar", "description": "A Backstage plugin that integrates towards Rollbar", - "version": "0.4.12-next.4", + "version": "0.4.14-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md index 25aac82142..630249b954 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md @@ -1,5 +1,61 @@ # @backstage/plugin-scaffolder-backend-module-cookiecutter +## 0.2.15-next.0 + +### Patch Changes + +- e4c0240445: Added `catalogFilter` field to OwnerPicker and EntityPicker components to support filtering options by any field(s) of an entity. + + The `allowedKinds` field has been deprecated. Use `catalogFilter` instead. This field allows users to specify a filter on the shape of [EntityFilterQuery](https://github.com/backstage/backstage/blob/774c42003782121d3d6b2aa5f2865d53370c160e/packages/catalog-client/src/types/api.ts#L74), which can be passed into the CatalogClient. See examples below: + + - Get all entities of kind `Group` + + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + ``` + + - Get entities of kind `Group` and spec.type `team` + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + spec.type: team + ``` + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.9.1-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + +## 0.2.14 + +### Patch Changes + +- 935b66a646: Change step output template examples to use square bracket syntax. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.9.0 + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + ## 0.2.14-next.3 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-cookiecutter/README.md b/plugins/scaffolder-backend-module-cookiecutter/README.md index 8516139e64..ae34e09c96 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/README.md +++ b/plugins/scaffolder-backend-module-cookiecutter/README.md @@ -73,16 +73,16 @@ spec: description: Owner of the component ui:field: OwnerPicker ui:options: - allowedKinds: - - Group + catalogFilter: + kind: Group system: title: System type: string description: System of the component ui:field: EntityPicker ui:options: - allowedKinds: - - System + catalogFilter: + kind: System defaultKind: System - title: Choose a location diff --git a/plugins/scaffolder-backend-module-cookiecutter/package.json b/plugins/scaffolder-backend-module-cookiecutter/package.json index 170c63d5be..f31bc54e84 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/package.json +++ b/plugins/scaffolder-backend-module-cookiecutter/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend-module-cookiecutter", "description": "A module for the scaffolder backend that lets you template projects using cookiecutter", - "version": "0.2.14-next.3", + "version": "0.2.15-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/scaffolder-backend-module-cookiecutter/src/actions/fetch/cookiecutter.test.ts b/plugins/scaffolder-backend-module-cookiecutter/src/actions/fetch/cookiecutter.test.ts index bfa4aa0507..15e5d25183 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/src/actions/fetch/cookiecutter.test.ts +++ b/plugins/scaffolder-backend-module-cookiecutter/src/actions/fetch/cookiecutter.test.ts @@ -75,7 +75,6 @@ describe('fetch:cookiecutter', () => { const mockReader: UrlReader = { readUrl: jest.fn(), - read: jest.fn(), readTree: jest.fn(), search: jest.fn(), }; diff --git a/plugins/scaffolder-backend-module-rails/CHANGELOG.md b/plugins/scaffolder-backend-module-rails/CHANGELOG.md index e611266bdb..5a30e61310 100644 --- a/plugins/scaffolder-backend-module-rails/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-rails/CHANGELOG.md @@ -1,5 +1,61 @@ # @backstage/plugin-scaffolder-backend-module-rails +## 0.4.8-next.0 + +### Patch Changes + +- e4c0240445: Added `catalogFilter` field to OwnerPicker and EntityPicker components to support filtering options by any field(s) of an entity. + + The `allowedKinds` field has been deprecated. Use `catalogFilter` instead. This field allows users to specify a filter on the shape of [EntityFilterQuery](https://github.com/backstage/backstage/blob/774c42003782121d3d6b2aa5f2865d53370c160e/packages/catalog-client/src/types/api.ts#L74), which can be passed into the CatalogClient. See examples below: + + - Get all entities of kind `Group` + + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + ``` + + - Get entities of kind `Group` and spec.type `team` + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + spec.type: team + ``` + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.9.1-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + +## 0.4.7 + +### Patch Changes + +- 935b66a646: Change step output template examples to use square bracket syntax. +- 27b23a86ad: Added more (optional) arguments to the `createFetchRailsAction` to be passed to `rails new` +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.9.0 + - @backstage/backend-common@0.17.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + ## 0.4.7-next.3 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-rails/README.md b/plugins/scaffolder-backend-module-rails/README.md index 738cd43cff..f4ec086775 100644 --- a/plugins/scaffolder-backend-module-rails/README.md +++ b/plugins/scaffolder-backend-module-rails/README.md @@ -74,16 +74,16 @@ spec: description: Owner of the component ui:field: OwnerPicker ui:options: - allowedKinds: - - Group + catalogFilter: + kind: Group system: title: System type: string description: System of the component ui:field: EntityPicker ui:options: - allowedKinds: - - System + catalogFilter: + kind: System defaultKind: System - title: Choose a location diff --git a/plugins/scaffolder-backend-module-rails/package.json b/plugins/scaffolder-backend-module-rails/package.json index eed87255ad..90cf0e0f40 100644 --- a/plugins/scaffolder-backend-module-rails/package.json +++ b/plugins/scaffolder-backend-module-rails/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend-module-rails", "description": "A module for the scaffolder backend that lets you template projects using Rails", - "version": "0.4.7-next.3", + "version": "0.4.8-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/scaffolder-backend-module-rails/src/actions/fetch/rails/index.test.ts b/plugins/scaffolder-backend-module-rails/src/actions/fetch/rails/index.test.ts index 98ac3a403f..56f85d002e 100644 --- a/plugins/scaffolder-backend-module-rails/src/actions/fetch/rails/index.test.ts +++ b/plugins/scaffolder-backend-module-rails/src/actions/fetch/rails/index.test.ts @@ -74,7 +74,6 @@ describe('fetch:rails', () => { }; const mockReader: UrlReader = { - read: jest.fn(), readUrl: jest.fn(), readTree: jest.fn(), search: jest.fn(), diff --git a/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md b/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md index d1e0dbec96..b1eec339ae 100644 --- a/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md @@ -1,5 +1,54 @@ # @backstage/plugin-scaffolder-backend-module-yeoman +## 0.2.13-next.0 + +### Patch Changes + +- e4c0240445: Added `catalogFilter` field to OwnerPicker and EntityPicker components to support filtering options by any field(s) of an entity. + + The `allowedKinds` field has been deprecated. Use `catalogFilter` instead. This field allows users to specify a filter on the shape of [EntityFilterQuery](https://github.com/backstage/backstage/blob/774c42003782121d3d6b2aa5f2865d53370c160e/packages/catalog-client/src/types/api.ts#L74), which can be passed into the CatalogClient. See examples below: + + - Get all entities of kind `Group` + + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + ``` + + - Get entities of kind `Group` and spec.type `team` + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + spec.type: team + ``` + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.9.1-next.0 + - @backstage/config@1.0.5 + - @backstage/types@1.0.2 + +## 0.2.12 + +### Patch Changes + +- 935b66a646: Change step output template examples to use square bracket syntax. +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.9.0 + - @backstage/types@1.0.2 + - @backstage/config@1.0.5 + ## 0.2.12-next.3 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-yeoman/README.md b/plugins/scaffolder-backend-module-yeoman/README.md index 5242ef298c..b5c7b4d026 100644 --- a/plugins/scaffolder-backend-module-yeoman/README.md +++ b/plugins/scaffolder-backend-module-yeoman/README.md @@ -73,16 +73,16 @@ spec: description: Owner of the component ui:field: OwnerPicker ui:options: - allowedKinds: - - Group + catalogFilter: + kind: Group system: title: System type: string description: System of the component ui:field: EntityPicker ui:options: - allowedKinds: - - System + catalogFilter: + kind: System defaultKind: System - title: Choose a location diff --git a/plugins/scaffolder-backend-module-yeoman/package.json b/plugins/scaffolder-backend-module-yeoman/package.json index f99d2a1a0d..ff48903d1d 100644 --- a/plugins/scaffolder-backend-module-yeoman/package.json +++ b/plugins/scaffolder-backend-module-yeoman/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-yeoman", - "version": "0.2.12-next.3", + "version": "0.2.13-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/scaffolder-backend/CHANGELOG.md b/plugins/scaffolder-backend/CHANGELOG.md index f2299cb85e..a2150fc2c8 100644 --- a/plugins/scaffolder-backend/CHANGELOG.md +++ b/plugins/scaffolder-backend/CHANGELOG.md @@ -1,5 +1,107 @@ # @backstage/plugin-scaffolder-backend +## 1.9.1-next.0 + +### Patch Changes + +- e4c0240445: Added `catalogFilter` field to OwnerPicker and EntityPicker components to support filtering options by any field(s) of an entity. + + The `allowedKinds` field has been deprecated. Use `catalogFilter` instead. This field allows users to specify a filter on the shape of [EntityFilterQuery](https://github.com/backstage/backstage/blob/774c42003782121d3d6b2aa5f2865d53370c160e/packages/catalog-client/src/types/api.ts#L74), which can be passed into the CatalogClient. See examples below: + + - Get all entities of kind `Group` + + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + ``` + + - Get entities of kind `Group` and spec.type `team` + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + spec.type: team + ``` + +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-scaffolder-common@1.2.4-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/plugin-catalog-backend@1.7.0-next.0 + - @backstage/backend-common@0.17.0 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/config@1.0.5 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/plugin-catalog-node@1.3.1-next.0 + +## 1.9.0 + +### Minor Changes + +- a20a0ea698: Added `requiredConversationResolution` template option to `github:repo:create`, `github:repo:push` and `publish:github` +- b32005e98a: Deprecated the `taskWorkers` option in RouterOptions in favor of `concurrentTasksLimit` which sets the limit of concurrent tasks in a single TaskWorker + + TaskWorker can now run multiple (defaults to 10) tasks concurrently using the `concurrentTasksLimit` option available in both `RouterOptions` and `CreateWorkerOptions`. + + To use the option to create a TaskWorker: + + ```diff + const worker = await TaskWorker.create({ + taskBroker, + actionRegistry, + integrations, + logger, + workingDirectory, + additionalTemplateFilters, + + concurrentTasksLimit: 10 // (1 to Infinity) + }); + ``` + +- fc51bd8aa0: Add support for disabling Github repository wiki, issues and projects +- 0053d07bee: Update the `github:publish` action to allow passing wether to dismiss stale reviews on the protected default branch. + +### Patch Changes + +- cb716004ef: Internal refactor to improve tests +- 935b66a646: Change step output template examples to use square bracket syntax. +- 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`. +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries +- 26404430bc: Use Json types from @backstage/types +- b07ccffad0: Backend now returns 'ui:options' value from template metadata, it can be used by all your custom scaffolder components. +- 309f2daca4: Updated dependency `esbuild` to `^0.16.0`. +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. +- Updated dependencies + - @backstage/plugin-catalog-backend@1.6.0 + - @backstage/catalog-client@1.2.0 + - @backstage/backend-common@0.17.0 + - @backstage/plugin-catalog-node@1.3.0 + - @backstage/backend-tasks@0.4.0 + - @backstage/errors@1.1.4 + - @backstage/backend-plugin-api@0.2.0 + - @backstage/integration@1.4.1 + - @backstage/plugin-auth-node@0.2.8 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/plugin-scaffolder-common@1.2.3 + ## 1.9.0-next.3 ### Minor Changes diff --git a/plugins/scaffolder-backend/api-report.md b/plugins/scaffolder-backend/api-report.md index 40a0ec11a0..66757a01cd 100644 --- a/plugins/scaffolder-backend/api-report.md +++ b/plugins/scaffolder-backend/api-report.md @@ -195,6 +195,12 @@ export function createGithubRepoCreateAction(options: { gitAuthorEmail?: string | undefined; allowRebaseMerge?: boolean | undefined; allowSquashMerge?: boolean | undefined; + squashMergeCommitTitle?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' | undefined; + squashMergeCommitMessage?: + | 'PR_BODY' + | 'COMMIT_MESSAGES' + | 'BLANK' + | undefined; allowMergeCommit?: boolean | undefined; allowAutoMerge?: boolean | undefined; requireCodeOwnerReviews?: boolean | undefined; @@ -213,11 +219,11 @@ export function createGithubRepoCreateAction(options: { | ( | { user: string; - access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; + access: string; } | { team: string; - access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; + access: string; } | { username: string; @@ -225,6 +231,9 @@ export function createGithubRepoCreateAction(options: { } )[] | undefined; + hasProjects?: boolean | undefined; + hasWiki?: boolean | undefined; + hasIssues?: boolean | undefined; token?: string | undefined; topics?: string[] | undefined; }>; @@ -380,6 +389,12 @@ export function createPublishGithubAction(options: { gitAuthorEmail?: string | undefined; allowRebaseMerge?: boolean | undefined; allowSquashMerge?: boolean | undefined; + squashMergeCommitTitle?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' | undefined; + squashMergeCommitMessage?: + | 'PR_BODY' + | 'COMMIT_MESSAGES' + | 'BLANK' + | undefined; allowMergeCommit?: boolean | undefined; allowAutoMerge?: boolean | undefined; sourcePath?: string | undefined; @@ -400,11 +415,11 @@ export function createPublishGithubAction(options: { | ( | { user: string; - access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; + access: string; } | { team: string; - access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; + access: string; } | { username: string; @@ -412,6 +427,9 @@ export function createPublishGithubAction(options: { } )[] | undefined; + hasProjects?: boolean | undefined; + hasWiki?: boolean | undefined; + hasIssues?: boolean | undefined; token?: string | undefined; topics?: string[] | undefined; }>; diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index e7af93efaa..d57e330b5d 100644 --- a/plugins/scaffolder-backend/package.json +++ b/plugins/scaffolder-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend", "description": "The Backstage backend plugin that helps you create new things", - "version": "1.9.0-next.3", + "version": "1.9.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/scaffolder-backend/sample-templates/bitbucket-demo/template.yaml b/plugins/scaffolder-backend/sample-templates/bitbucket-demo/template.yaml index 58955582d2..0a7c841d8f 100644 --- a/plugins/scaffolder-backend/sample-templates/bitbucket-demo/template.yaml +++ b/plugins/scaffolder-backend/sample-templates/bitbucket-demo/template.yaml @@ -49,8 +49,8 @@ spec: description: Owner of the component ui:field: OwnerPicker ui:options: - allowedKinds: - - Group + catalogFilter: + kind: Group steps: - id: fetch-base diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/debug/log.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/debug/log.test.ts index 544784acb5..c53caff018 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/debug/log.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/debug/log.test.ts @@ -15,7 +15,7 @@ */ import { getVoidLogger } from '@backstage/backend-common'; -import mock from 'mock-fs'; +import mockFs from 'mock-fs'; import os from 'os'; import { Writable } from 'stream'; import { createDebugLogAction } from './log'; @@ -40,7 +40,7 @@ describe('debug:log', () => { const action = createDebugLogAction(); beforeEach(() => { - mock({ + mockFs({ [`${mockContext.workspacePath}/README.md`]: '', [`${mockContext.workspacePath}/a-directory/index.md`]: '', }); @@ -48,7 +48,7 @@ describe('debug:log', () => { }); afterEach(() => { - mock.restore(); + mockFs.restore(); }); it('should do nothing', async () => { diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/helpers.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/helpers.test.ts index 50ec94e099..86d5f17803 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/helpers.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/helpers.test.ts @@ -39,7 +39,6 @@ describe('fetchContent helper', () => { const readTree = jest.fn(); const reader: UrlReader = { - read: jest.fn(), readUrl: jest.fn(), readTree, search: jest.fn(), diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/plain.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/plain.test.ts index 1595578666..0469ffec06 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/plain.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/plain.test.ts @@ -34,7 +34,6 @@ describe('fetch:plain', () => { ); const reader: UrlReader = { readUrl: jest.fn(), - read: jest.fn(), readTree: jest.fn(), search: jest.fn(), }; diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.test.ts index 5692682882..824db27e84 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.test.ts @@ -106,6 +106,8 @@ describe('github:repo:create', () => { private: true, delete_branch_on_merge: false, allow_squash_merge: true, + squash_merge_commit_title: 'COMMIT_OR_PR_TITLE', + squash_merge_commit_message: 'COMMIT_MESSAGES', allow_merge_commit: true, allow_rebase_merge: true, allow_auto_merge: false, @@ -126,6 +128,8 @@ describe('github:repo:create', () => { private: false, delete_branch_on_merge: false, allow_squash_merge: true, + squash_merge_commit_title: 'COMMIT_OR_PR_TITLE', + squash_merge_commit_message: 'COMMIT_MESSAGES', allow_merge_commit: true, allow_rebase_merge: true, allow_auto_merge: false, @@ -147,11 +151,67 @@ describe('github:repo:create', () => { private: true, delete_branch_on_merge: false, allow_squash_merge: true, + squash_merge_commit_title: 'COMMIT_OR_PR_TITLE', + squash_merge_commit_message: 'COMMIT_MESSAGES', allow_merge_commit: true, allow_rebase_merge: true, allow_auto_merge: false, visibility: 'private', }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + hasWiki: true, + hasProjects: true, + hasIssues: true, + }, + }); + expect(mockOctokit.rest.repos.createInOrg).toHaveBeenCalledWith({ + description: 'description', + name: 'repo', + org: 'owner', + private: true, + delete_branch_on_merge: false, + allow_squash_merge: true, + squash_merge_commit_message: 'COMMIT_MESSAGES', + squash_merge_commit_title: 'COMMIT_OR_PR_TITLE', + allow_merge_commit: true, + allow_rebase_merge: true, + allow_auto_merge: false, + visibility: 'private', + has_wiki: true, + has_projects: true, + has_issues: true, + }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + hasWiki: false, + hasProjects: false, + hasIssues: false, + }, + }); + expect(mockOctokit.rest.repos.createInOrg).toHaveBeenCalledWith({ + description: 'description', + name: 'repo', + org: 'owner', + private: true, + delete_branch_on_merge: false, + allow_squash_merge: true, + squash_merge_commit_message: 'COMMIT_MESSAGES', + squash_merge_commit_title: 'COMMIT_OR_PR_TITLE', + allow_merge_commit: true, + allow_rebase_merge: true, + allow_auto_merge: false, + visibility: 'private', + has_wiki: false, + has_projects: false, + has_issues: false, + }); }); it('should call the githubApis with the correct values for createForAuthenticatedUser', async () => { @@ -172,6 +232,8 @@ describe('github:repo:create', () => { private: true, delete_branch_on_merge: false, allow_squash_merge: true, + squash_merge_commit_title: 'COMMIT_OR_PR_TITLE', + squash_merge_commit_message: 'COMMIT_MESSAGES', allow_merge_commit: true, allow_rebase_merge: true, allow_auto_merge: false, @@ -192,6 +254,8 @@ describe('github:repo:create', () => { private: false, delete_branch_on_merge: false, allow_squash_merge: true, + squash_merge_commit_title: 'COMMIT_OR_PR_TITLE', + squash_merge_commit_message: 'COMMIT_MESSAGES', allow_merge_commit: true, allow_rebase_merge: true, allow_auto_merge: false, @@ -213,10 +277,66 @@ describe('github:repo:create', () => { private: true, delete_branch_on_merge: false, allow_squash_merge: true, + squash_merge_commit_title: 'COMMIT_OR_PR_TITLE', + squash_merge_commit_message: 'COMMIT_MESSAGES', allow_merge_commit: true, allow_rebase_merge: true, allow_auto_merge: false, }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + hasWiki: true, + hasProjects: true, + hasIssues: true, + }, + }); + expect( + mockOctokit.rest.repos.createForAuthenticatedUser, + ).toHaveBeenCalledWith({ + description: 'description', + name: 'repo', + private: true, + delete_branch_on_merge: false, + allow_squash_merge: true, + squash_merge_commit_message: 'COMMIT_MESSAGES', + squash_merge_commit_title: 'COMMIT_OR_PR_TITLE', + allow_merge_commit: true, + allow_rebase_merge: true, + allow_auto_merge: false, + has_wiki: true, + has_projects: true, + has_issues: true, + }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + hasWiki: false, + hasProjects: false, + hasIssues: false, + }, + }); + expect( + mockOctokit.rest.repos.createForAuthenticatedUser, + ).toHaveBeenCalledWith({ + description: 'description', + name: 'repo', + private: true, + delete_branch_on_merge: false, + allow_squash_merge: true, + squash_merge_commit_message: 'COMMIT_MESSAGES', + squash_merge_commit_title: 'COMMIT_OR_PR_TITLE', + allow_merge_commit: true, + allow_rebase_merge: true, + allow_auto_merge: false, + has_wiki: false, + has_projects: false, + has_issues: false, + }); }); it('should add access for the team when it starts with the owner', async () => { diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts index 4f2cf4a71e..f41150b504 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts @@ -49,6 +49,8 @@ export function createGithubRepoCreateAction(options: { gitAuthorEmail?: string; allowRebaseMerge?: boolean; allowSquashMerge?: boolean; + squashMergeCommitTitle?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE'; + squashMergeCommitMessage?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK'; allowMergeCommit?: boolean; allowAutoMerge?: boolean; requireCodeOwnerReviews?: boolean; @@ -64,11 +66,11 @@ export function createGithubRepoCreateAction(options: { collaborators?: Array< | { user: string; - access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; + access: string; } | { team: string; - access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; + access: string; } | { /** @deprecated This field is deprecated in favor of team */ @@ -76,6 +78,9 @@ export function createGithubRepoCreateAction(options: { access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; } >; + hasProjects?: boolean; + hasWiki?: boolean; + hasIssues?: boolean; token?: string; topics?: string[]; }>({ @@ -100,9 +105,14 @@ export function createGithubRepoCreateAction(options: { deleteBranchOnMerge: inputProps.deleteBranchOnMerge, allowMergeCommit: inputProps.allowMergeCommit, allowSquashMerge: inputProps.allowSquashMerge, + squashMergeCommitTitle: inputProps.squashMergeCommitTitle, + squashMergeCommitMessage: inputProps.squashMergeCommitMessage, allowRebaseMerge: inputProps.allowRebaseMerge, allowAutoMerge: inputProps.allowAutoMerge, collaborators: inputProps.collaborators, + hasProjects: inputProps.hasProjects, + hasWiki: inputProps.hasWiki, + hasIssues: inputProps.hasIssues, token: inputProps.token, topics: inputProps.topics, }, @@ -125,9 +135,14 @@ export function createGithubRepoCreateAction(options: { deleteBranchOnMerge = false, allowMergeCommit = true, allowSquashMerge = true, + squashMergeCommitTitle = 'COMMIT_OR_PR_TITLE', + squashMergeCommitMessage = 'COMMIT_MESSAGES', allowRebaseMerge = true, allowAutoMerge = false, collaborators, + hasProjects = undefined, + hasWiki = undefined, + hasIssues = undefined, topics, token: providedToken, } = ctx.input; @@ -156,10 +171,15 @@ export function createGithubRepoCreateAction(options: { deleteBranchOnMerge, allowMergeCommit, allowSquashMerge, + squashMergeCommitTitle, + squashMergeCommitMessage, allowRebaseMerge, allowAutoMerge, access, collaborators, + hasProjects, + hasWiki, + hasIssues, topics, ctx.logger, ); diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/helpers.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/helpers.ts index 216a94ac57..9caee49f98 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/helpers.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/helpers.ts @@ -102,6 +102,8 @@ export async function createGithubRepoWithCollaboratorsAndTopics( deleteBranchOnMerge: boolean, allowMergeCommit: boolean, allowSquashMerge: boolean, + squashMergeCommitTitle: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' | undefined, + squashMergeCommitMessage: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' | undefined, allowRebaseMerge: boolean, allowAutoMerge: boolean, access: string | undefined, @@ -109,11 +111,11 @@ export async function createGithubRepoWithCollaboratorsAndTopics( | ( | { user: string; - access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; + access: string; } | { team: string; - access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; + access: string; } | { /** @deprecated This field is deprecated in favor of team */ @@ -122,6 +124,9 @@ export async function createGithubRepoWithCollaboratorsAndTopics( } )[] | undefined, + hasProjects: boolean | undefined, + hasWiki: boolean | undefined, + hasIssues: boolean | undefined, topics: string[] | undefined, logger: Logger, ) { @@ -141,9 +146,14 @@ export async function createGithubRepoWithCollaboratorsAndTopics( delete_branch_on_merge: deleteBranchOnMerge, allow_merge_commit: allowMergeCommit, allow_squash_merge: allowSquashMerge, + squash_merge_commit_title: squashMergeCommitTitle, + squash_merge_commit_message: squashMergeCommitMessage, allow_rebase_merge: allowRebaseMerge, allow_auto_merge: allowAutoMerge, homepage: homepage, + has_projects: hasProjects, + has_wiki: hasWiki, + has_issues: hasIssues, }) : client.rest.repos.createForAuthenticatedUser({ name: repo, @@ -152,9 +162,14 @@ export async function createGithubRepoWithCollaboratorsAndTopics( delete_branch_on_merge: deleteBranchOnMerge, allow_merge_commit: allowMergeCommit, allow_squash_merge: allowSquashMerge, + squash_merge_commit_title: squashMergeCommitTitle, + squash_merge_commit_message: squashMergeCommitMessage, allow_rebase_merge: allowRebaseMerge, allow_auto_merge: allowAutoMerge, homepage: homepage, + has_projects: hasProjects, + has_wiki: hasWiki, + has_issues: hasIssues, }); let newRepo; diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/inputProperties.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/inputProperties.ts index a99a3030ac..3fc7126754 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/inputProperties.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/inputProperties.ts @@ -94,6 +94,17 @@ const allowSquashMerge = { type: 'boolean', description: `Allow squash merges. The default value is 'true'`, }; +const squashMergeCommitTitle = { + title: 'Default squash merge commit title', + enum: ['PR_TITLE', 'COMMIT_OR_PR_TITLE'], + description: `Sets the default value for a squash merge commit title. The default value is 'COMMIT_OR_PR_TITLE'`, +}; +const squashMergeCommitMessage = { + title: 'Default squash merge commit message', + enum: ['PR_BODY', 'COMMIT_MESSAGES', 'BLANK'], + description: `Sets the default value for a squash merge commit message. The default value is 'COMMIT_MESSAGES'`, +}; + const allowRebaseMerge = { title: 'Allow Rebase Merges', type: 'boolean', @@ -116,7 +127,6 @@ const collaborators = { access: { type: 'string', description: 'The type of access for the user', - enum: ['push', 'pull', 'admin', 'maintain', 'triage'], }, user: { type: 'string', @@ -132,6 +142,21 @@ const collaborators = { oneOf: [{ required: ['user'] }, { required: ['team'] }], }, }; +const hasProjects = { + title: 'Enable projects', + type: 'boolean', + description: `Enable projects for the repository. The default value is 'true' unless the organization has disabled repository projects`, +}; +const hasWiki = { + title: 'Enable the wiki', + type: 'boolean', + description: `Enable the wiki for the repository. The default value is 'true'`, +}; +const hasIssues = { + title: 'Enable issues', + type: 'boolean', + description: `Enable issues for the repository. The default value is 'true'`, +}; const token = { title: 'Authentication Token', type: 'string', @@ -204,6 +229,8 @@ export { access }; export { allowMergeCommit }; export { allowRebaseMerge }; export { allowSquashMerge }; +export { squashMergeCommitTitle }; +export { squashMergeCommitMessage }; export { allowAutoMerge }; export { collaborators }; export { defaultBranch }; @@ -223,6 +250,9 @@ export { dismissStaleReviews }; export { requiredStatusCheckContexts }; export { requireBranchesToBeUpToDate }; export { requiredConversationResolution }; +export { hasProjects }; +export { hasIssues }; +export { hasWiki }; export { sourcePath }; export { token }; export { topics }; diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.test.ts index fa3b3c9b45..e4c92c624e 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.test.ts @@ -111,6 +111,8 @@ describe('publish:github', () => { private: true, delete_branch_on_merge: false, allow_squash_merge: true, + squash_merge_commit_title: 'COMMIT_OR_PR_TITLE', + squash_merge_commit_message: 'COMMIT_MESSAGES', allow_merge_commit: true, allow_rebase_merge: true, allow_auto_merge: false, @@ -131,6 +133,8 @@ describe('publish:github', () => { private: false, delete_branch_on_merge: false, allow_squash_merge: true, + squash_merge_commit_title: 'COMMIT_OR_PR_TITLE', + squash_merge_commit_message: 'COMMIT_MESSAGES', allow_merge_commit: true, allow_rebase_merge: true, allow_auto_merge: false, @@ -152,11 +156,67 @@ describe('publish:github', () => { private: true, delete_branch_on_merge: false, allow_squash_merge: true, + squash_merge_commit_title: 'COMMIT_OR_PR_TITLE', + squash_merge_commit_message: 'COMMIT_MESSAGES', allow_merge_commit: true, allow_rebase_merge: true, allow_auto_merge: false, visibility: 'private', }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + hasWiki: true, + hasProjects: true, + hasIssues: true, + }, + }); + expect(mockOctokit.rest.repos.createInOrg).toHaveBeenCalledWith({ + description: 'description', + name: 'repo', + org: 'owner', + private: true, + delete_branch_on_merge: false, + allow_squash_merge: true, + squash_merge_commit_message: 'COMMIT_MESSAGES', + squash_merge_commit_title: 'COMMIT_OR_PR_TITLE', + allow_merge_commit: true, + allow_rebase_merge: true, + allow_auto_merge: false, + visibility: 'private', + has_wiki: true, + has_projects: true, + has_issues: true, + }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + hasWiki: false, + hasProjects: false, + hasIssues: false, + }, + }); + expect(mockOctokit.rest.repos.createInOrg).toHaveBeenCalledWith({ + description: 'description', + name: 'repo', + org: 'owner', + private: true, + delete_branch_on_merge: false, + allow_squash_merge: true, + squash_merge_commit_message: 'COMMIT_MESSAGES', + squash_merge_commit_title: 'COMMIT_OR_PR_TITLE', + allow_merge_commit: true, + allow_rebase_merge: true, + allow_auto_merge: false, + visibility: 'private', + has_wiki: false, + has_projects: false, + has_issues: false, + }); }); it('should call the githubApis with the correct values for createForAuthenticatedUser', async () => { @@ -177,6 +237,8 @@ describe('publish:github', () => { private: true, delete_branch_on_merge: false, allow_squash_merge: true, + squash_merge_commit_title: 'COMMIT_OR_PR_TITLE', + squash_merge_commit_message: 'COMMIT_MESSAGES', allow_merge_commit: true, allow_rebase_merge: true, allow_auto_merge: false, @@ -197,6 +259,8 @@ describe('publish:github', () => { private: false, delete_branch_on_merge: false, allow_squash_merge: true, + squash_merge_commit_title: 'COMMIT_OR_PR_TITLE', + squash_merge_commit_message: 'COMMIT_MESSAGES', allow_merge_commit: true, allow_rebase_merge: true, allow_auto_merge: false, @@ -218,10 +282,66 @@ describe('publish:github', () => { private: true, delete_branch_on_merge: false, allow_squash_merge: true, + squash_merge_commit_title: 'COMMIT_OR_PR_TITLE', + squash_merge_commit_message: 'COMMIT_MESSAGES', allow_merge_commit: true, allow_rebase_merge: true, allow_auto_merge: false, }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + hasWiki: true, + hasProjects: true, + hasIssues: true, + }, + }); + expect( + mockOctokit.rest.repos.createForAuthenticatedUser, + ).toHaveBeenCalledWith({ + description: 'description', + name: 'repo', + private: true, + delete_branch_on_merge: false, + allow_squash_merge: true, + squash_merge_commit_message: 'COMMIT_MESSAGES', + squash_merge_commit_title: 'COMMIT_OR_PR_TITLE', + allow_merge_commit: true, + allow_rebase_merge: true, + allow_auto_merge: false, + has_wiki: true, + has_projects: true, + has_issues: true, + }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + hasWiki: false, + hasProjects: false, + hasIssues: false, + }, + }); + expect( + mockOctokit.rest.repos.createForAuthenticatedUser, + ).toHaveBeenCalledWith({ + description: 'description', + name: 'repo', + private: true, + delete_branch_on_merge: false, + allow_squash_merge: true, + squash_merge_commit_message: 'COMMIT_MESSAGES', + squash_merge_commit_title: 'COMMIT_OR_PR_TITLE', + allow_merge_commit: true, + allow_rebase_merge: true, + allow_auto_merge: false, + has_wiki: false, + has_projects: false, + has_issues: false, + }); }); it('should call initRepoAndPush with the correct values', async () => { diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts index e246234d2c..5430f30657 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts @@ -57,6 +57,8 @@ export function createPublishGithubAction(options: { gitAuthorEmail?: string; allowRebaseMerge?: boolean; allowSquashMerge?: boolean; + squashMergeCommitTitle?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE'; + squashMergeCommitMessage?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK'; allowMergeCommit?: boolean; allowAutoMerge?: boolean; sourcePath?: string; @@ -76,11 +78,11 @@ export function createPublishGithubAction(options: { collaborators?: Array< | { user: string; - access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; + access: string; } | { team: string; - access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; + access: string; } | { /** @deprecated This field is deprecated in favor of team */ @@ -88,6 +90,9 @@ export function createPublishGithubAction(options: { access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage'; } >; + hasProjects?: boolean | undefined; + hasWiki?: boolean | undefined; + hasIssues?: boolean | undefined; token?: string; topics?: string[]; }>({ @@ -120,10 +125,15 @@ export function createPublishGithubAction(options: { gitAuthorEmail: inputProps.gitAuthorEmail, allowMergeCommit: inputProps.allowMergeCommit, allowSquashMerge: inputProps.allowSquashMerge, + squashMergeCommitTitle: inputProps.squashMergeCommitTitle, + squashMergeCommitMessage: inputProps.squashMergeCommitMessage, allowRebaseMerge: inputProps.allowRebaseMerge, allowAutoMerge: inputProps.allowAutoMerge, sourcePath: inputProps.sourcePath, collaborators: inputProps.collaborators, + hasProjects: inputProps.hasProjects, + hasWiki: inputProps.hasWiki, + hasIssues: inputProps.hasIssues, token: inputProps.token, topics: inputProps.topics, }, @@ -158,9 +168,14 @@ export function createPublishGithubAction(options: { gitAuthorEmail, allowMergeCommit = true, allowSquashMerge = true, + squashMergeCommitTitle = 'COMMIT_OR_PR_TITLE', + squashMergeCommitMessage = 'COMMIT_MESSAGES', allowRebaseMerge = true, allowAutoMerge = false, collaborators, + hasProjects = undefined, + hasWiki = undefined, + hasIssues = undefined, topics, token: providedToken, } = ctx.input; @@ -189,10 +204,15 @@ export function createPublishGithubAction(options: { deleteBranchOnMerge, allowMergeCommit, allowSquashMerge, + squashMergeCommitTitle, + squashMergeCommitMessage, allowRebaseMerge, allowAutoMerge, access, collaborators, + hasProjects, + hasWiki, + hasIssues, topics, ctx.logger, ); diff --git a/plugins/scaffolder-common/CHANGELOG.md b/plugins/scaffolder-common/CHANGELOG.md index d37b2219d9..8642dc63c6 100644 --- a/plugins/scaffolder-common/CHANGELOG.md +++ b/plugins/scaffolder-common/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-scaffolder-common +## 1.2.4-next.0 + +### Patch Changes + +- 011bd518b7: Fixed spelling mistakes in documentation. +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/types@1.0.2 + +## 1.2.3 + +### Patch Changes + +- Updated dependencies + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + ## 1.2.3-next.1 ### Patch Changes diff --git a/plugins/scaffolder-common/package.json b/plugins/scaffolder-common/package.json index c84599b228..fa7286b180 100644 --- a/plugins/scaffolder-common/package.json +++ b/plugins/scaffolder-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-common", "description": "Common functionalities for the scaffolder, to be shared between scaffolder and scaffolder-backend plugin", - "version": "1.2.3-next.1", + "version": "1.2.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/scaffolder-common/src/TaskSpec.ts b/plugins/scaffolder-common/src/TaskSpec.ts index 1c71790736..7c06fe2b99 100644 --- a/plugins/scaffolder-common/src/TaskSpec.ts +++ b/plugins/scaffolder-common/src/TaskSpec.ts @@ -15,7 +15,7 @@ */ import type { EntityMeta, UserEntity } from '@backstage/catalog-model'; -import type { JsonValue, JsonObject } from '@backstage/types'; +import type { JsonObject, JsonValue } from '@backstage/types'; /** * Information about a template that is stored on a task specification. @@ -51,7 +51,7 @@ export type TemplateInfo = { */ export interface TaskStep { /** - * A unqiue identifier for this step. + * A unique identifier for this step. */ id: string; /** diff --git a/plugins/scaffolder/CHANGELOG.md b/plugins/scaffolder/CHANGELOG.md index e79c409e0a..4cb61dfa18 100644 --- a/plugins/scaffolder/CHANGELOG.md +++ b/plugins/scaffolder/CHANGELOG.md @@ -1,5 +1,129 @@ # @backstage/plugin-scaffolder +## 1.10.0-next.0 + +### Minor Changes + +- e4c0240445: Added `catalogFilter` field to OwnerPicker and EntityPicker components to support filtering options by any field(s) of an entity. + + The `allowedKinds` field has been deprecated. Use `catalogFilter` instead. This field allows users to specify a filter on the shape of [EntityFilterQuery](https://github.com/backstage/backstage/blob/774c42003782121d3d6b2aa5f2865d53370c160e/packages/catalog-client/src/types/api.ts#L74), which can be passed into the CatalogClient. See examples below: + + - Get all entities of kind `Group` + + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + ``` + + - Get entities of kind `Group` and spec.type `team` + ```yaml + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + catalogFilter: + - kind: Group + spec.type: team + ``` + +### Patch Changes + +- 3c112f6967: rollback `@rjsf/validator-ajv8` to `@rjsf/validator-v6` +- 223e2c5f03: add `onChange` handler to`Stepper` component +- Updated dependencies + - @backstage/catalog-model@1.1.5-next.0 + - @backstage/plugin-scaffolder-common@1.2.4-next.0 + - @backstage/catalog-client@1.3.0-next.0 + - @backstage/plugin-catalog-react@1.2.4-next.0 + - @backstage/core-components@0.12.3-next.0 + - @backstage/config@1.0.5 + - @backstage/core-plugin-api@1.2.0 + - @backstage/errors@1.1.4 + - @backstage/integration@1.4.1 + - @backstage/integration-react@1.1.9-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + - @backstage/plugin-catalog-common@1.0.10-next.0 + - @backstage/plugin-permission-react@0.4.8 + +## 1.9.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.12.2 + - @backstage/integration-react@1.1.8 + - @backstage/plugin-catalog-react@1.2.3 + +## 1.9.0 + +### Minor Changes + +- ddd1c3308d: Implement Custom Field Explorer to view and play around with available installed custom field extensions +- adb1b01e32: Adds the ability to supply a `transformErrors` function to the `Stepper` for `/next` +- 34a48cdc4f: The `RepoUrlPicker` field extension now has an `allowedProjects` option for narrowing the selection of Bitbucket URLs. + +### Patch Changes + +- d4d07cf55e: Enabling the customization of the last step in the scaffolder template. + + To override the content you have to do the next: + + ```typescript jsx + + ``` + +- ef803022f1: Initialize all `formData` in the `Stepper` in `/next` +- 9b1fadf6d8: Added `noHtml5Validate` prop to `FormProps` on `NextScaffolderPage` +- b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries +- 2e701b3796: Internal refactor to use `react-router-dom` rather than `react-router`. +- 9000952e87: Form data is now passed to validator functions in 'next' scaffolder, so it's now possible to perform validation for fields that depend on other field values. This is something that we discourage due to the coupling that it creates, but is sometimes still the most sensible solution. + + ```typescript jsx + export const myCustomValidation = ( + value: string, + validation: FieldValidation, + { apiHolder, formData }: { apiHolder: ApiHolder; formData: JsonObject }, + ) => { + // validate + }; + ``` + +- 5b10b2485a: Parse `formData` from `window.location.query` for `scaffolder/next` +- 57ad6553d0: Pass through `transformErrors` to `TemplateWizardPage` +- 3280711113: Updated dependency `msw` to `^0.49.0`. +- 19356df560: Updated dependency `zen-observable` to `^0.9.0`. +- c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`. +- 5fb6d5e92e: Updated dependency `@react-hookz/web` to `^19.0.0`. +- 146378c146: Updated dependency `@react-hookz/web` to `^20.0.0`. +- 380f549b75: bump `@rjsf/*-v5` dependencies +- a63e2df559: fixed `headerOptions` not passed to `TemplatePage` component +- 9b606366bf: Bump `json-schema-library` to version `^7.3.9` which does not pull in the `gson-pointer` library +- db6310b6a0: Show input type array correctly on installed actions page. +- Updated dependencies + - @backstage/core-plugin-api@1.2.0 + - @backstage/catalog-client@1.2.0 + - @backstage/core-components@0.12.1 + - @backstage/errors@1.1.4 + - @backstage/plugin-catalog-react@1.2.2 + - @backstage/plugin-permission-react@0.4.8 + - @backstage/integration-react@1.1.7 + - @backstage/integration@1.4.1 + - @backstage/types@1.0.2 + - @backstage/catalog-model@1.1.4 + - @backstage/config@1.0.5 + - @backstage/theme@0.2.16 + - @backstage/plugin-catalog-common@1.0.9 + - @backstage/plugin-scaffolder-common@1.2.3 + ## 1.9.0-next.4 ### Minor Changes diff --git a/plugins/scaffolder/api-report.md b/plugins/scaffolder/api-report.md index 68bc893b6f..1c4d163123 100644 --- a/plugins/scaffolder/api-report.md +++ b/plugins/scaffolder/api-report.md @@ -11,7 +11,6 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { ComponentType } from 'react'; import { DiscoveryApi } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; -import type { ErrorTransformer } from '@rjsf/utils'; import { Extension } from '@backstage/core-plugin-api'; import { ExternalRouteRef } from '@backstage/core-plugin-api'; import { FetchApi } from '@backstage/core-plugin-api'; @@ -19,7 +18,8 @@ import { FieldProps } from '@rjsf/core'; import { FieldProps as FieldProps_2 } from '@rjsf/utils'; import { FieldValidation } from '@rjsf/core'; import { FieldValidation as FieldValidation_2 } from '@rjsf/utils'; -import type { FormProps } from '@rjsf/core'; +import type { FormProps as FormProps_2 } from '@rjsf/core'; +import type { FormProps as FormProps_3 } from '@rjsf/core-v5'; import { IdentityApi } from '@backstage/core-plugin-api'; import { JsonObject } from '@backstage/types'; import { JSONSchema7 } from 'json-schema'; @@ -88,6 +88,10 @@ export const EntityPickerFieldExtension: FieldExtensionComponent< defaultNamespace?: string | false | undefined; allowedKinds?: string[] | undefined; allowArbitraryValues?: boolean | undefined; + catalogFilter?: + | Record + | Record[] + | undefined; } >; @@ -99,6 +103,10 @@ export const EntityPickerFieldSchema: FieldSchema< defaultNamespace?: string | false | undefined; allowedKinds?: string[] | undefined; allowArbitraryValues?: boolean | undefined; + catalogFilter?: + | Record + | Record[] + | undefined; } >; @@ -167,6 +175,12 @@ export interface FieldSchema { readonly uiOptionsType: TUiOptions; } +// @alpha +export type FormProps = Pick< + FormProps_3, + 'transformErrors' | 'noHtml5Validate' +>; + // @public export type LayoutComponent<_TInputProps> = () => null; @@ -179,7 +193,7 @@ export interface LayoutOptions

{ } // @public -export type LayoutTemplate = FormProps['ObjectFieldTemplate']; +export type LayoutTemplate = FormProps_2['ObjectFieldTemplate']; // @public export type ListActionsResponse = Array<{ @@ -264,7 +278,7 @@ export type NextRouterProps = { TaskPageComponent?: React_2.ComponentType<{}>; }; groups?: TemplateGroupFilter[]; - transformErrors?: ErrorTransformer; + FormProps?: FormProps; }; // @alpha @@ -310,6 +324,10 @@ export const OwnerPickerFieldExtension: FieldExtensionComponent< defaultNamespace?: string | false | undefined; allowedKinds?: string[] | undefined; allowArbitraryValues?: boolean | undefined; + catalogFilter?: + | Record + | Record[] + | undefined; } >; @@ -320,6 +338,10 @@ export const OwnerPickerFieldSchema: FieldSchema< defaultNamespace?: string | false | undefined; allowedKinds?: string[] | undefined; allowArbitraryValues?: boolean | undefined; + catalogFilter?: + | Record + | Record[] + | undefined; } >; diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index 90c76fe9c9..4bb7b29068 100644 --- a/plugins/scaffolder/package.json +++ b/plugins/scaffolder/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder", "description": "The Backstage plugin that helps you create new things", - "version": "1.9.0-next.4", + "version": "1.10.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -59,7 +59,7 @@ "@rjsf/material-ui": "^3.2.1", "@rjsf/material-ui-v5": "npm:@rjsf/material-ui@^5.0.0-beta.14", "@rjsf/utils": "^5.0.0-beta.14", - "@rjsf/validator-ajv8": "^5.0.0-beta.14", + "@rjsf/validator-ajv6": "^5.0.0-beta.14", "@types/json-schema": "^7.0.9", "@uiw/react-codemirror": "^4.9.3", "classnames": "^2.2.6", diff --git a/plugins/scaffolder/src/components/TaskPage/IconLink.test.tsx b/plugins/scaffolder/src/components/TaskPage/IconLink.test.tsx index f7ce850cd8..0b6092c37d 100644 --- a/plugins/scaffolder/src/components/TaskPage/IconLink.test.tsx +++ b/plugins/scaffolder/src/components/TaskPage/IconLink.test.tsx @@ -14,23 +14,15 @@ * limitations under the License. */ -import { lightTheme } from '@backstage/theme'; -import { ThemeProvider } from '@material-ui/core'; +import { renderInTestApp } from '@backstage/test-utils'; import CloudIcon from '@material-ui/icons/Cloud'; -import { render } from '@testing-library/react'; import React from 'react'; import { IconLink } from './IconLink'; describe('IconLink', () => { - it('should render an icon link', () => { - const rendered = render( - - - , + it('should render an icon link', async () => { + const rendered = await renderInTestApp( + , ); expect(rendered.getByText('I am Link')).toBeInTheDocument(); diff --git a/plugins/scaffolder/src/components/TemplateEditorPage/TemplateFormPreviewer.tsx b/plugins/scaffolder/src/components/TemplateEditorPage/TemplateFormPreviewer.tsx index 041b7797ee..5bc32ed581 100644 --- a/plugins/scaffolder/src/components/TemplateEditorPage/TemplateFormPreviewer.tsx +++ b/plugins/scaffolder/src/components/TemplateEditorPage/TemplateFormPreviewer.tsx @@ -53,8 +53,8 @@ parameters: description: Owner of the component ui:field: OwnerPicker ui:options: - allowedKinds: - - Group + catalogFilter: + kind: Group - title: Choose a location required: - repoUrl diff --git a/plugins/scaffolder/src/components/fields/EntityPicker/EntityPicker.test.tsx b/plugins/scaffolder/src/components/fields/EntityPicker/EntityPicker.test.tsx index 942eef9d82..b6d6688a09 100644 --- a/plugins/scaffolder/src/components/fields/EntityPicker/EntityPicker.test.tsx +++ b/plugins/scaffolder/src/components/fields/EntityPicker/EntityPicker.test.tsx @@ -14,6 +14,7 @@ * limitations under the License. */ +import { EntityFilterQuery } from '@backstage/catalog-client'; import { Entity } from '@backstage/catalog-model'; import { CatalogApi, catalogApiRef } from '@backstage/plugin-catalog-react'; import { renderInTestApp, TestApiProvider } from '@backstage/test-utils'; @@ -34,7 +35,13 @@ describe('', () => { const schema = {}; const required = false; let uiSchema: { - 'ui:options': { allowedKinds?: string[]; defaultKind?: string }; + 'ui:options': { + allowedKinds?: string[]; + defaultKind?: string; + allowArbitraryValues?: boolean; + defaultNamespace?: string | false; + catalogFilter?: EntityFilterQuery; + }; }; const rawErrors: string[] = []; const formData = undefined; @@ -66,7 +73,7 @@ describe('', () => { afterEach(() => jest.resetAllMocks()); - describe('without allowedKinds', () => { + describe('without allowedKinds and catalogFilter', () => { beforeEach(() => { uiSchema = { 'ui:options': {} }; props = { @@ -136,4 +143,97 @@ describe('', () => { }); }); }); + + describe('with catalogFilter', () => { + beforeEach(() => { + uiSchema = { + 'ui:options': { + catalogFilter: [ + { + kind: ['Group'], + 'metadata.name': 'test-entity', + }, + { + kind: ['User'], + 'metadata.name': 'test-entity', + }, + ], + }, + }; + props = { + onChange, + schema, + required, + uiSchema, + rawErrors, + formData, + } as unknown as FieldProps; + + catalogApi.getEntities.mockResolvedValue({ items: entities }); + }); + + it('searches for a specific group entity', async () => { + await renderInTestApp( + + + , + ); + + expect(catalogApi.getEntities).toHaveBeenCalledWith({ + filter: [ + { + kind: ['Group'], + 'metadata.name': 'test-entity', + }, + { + kind: ['User'], + 'metadata.name': 'test-entity', + }, + ], + }); + }); + }); + + describe('catalogFilter should take precedence over allowedKinds', () => { + beforeEach(() => { + uiSchema = { + 'ui:options': { + catalogFilter: [ + { + kind: ['Group'], + 'metadata.name': 'test-group', + }, + ], + allowedKinds: ['User'], + }, + }; + props = { + onChange, + schema, + required, + uiSchema, + rawErrors, + formData, + } as unknown as FieldProps; + + catalogApi.getEntities.mockResolvedValue({ items: entities }); + }); + + it('searches for a Group entity', async () => { + await renderInTestApp( + + + , + ); + + expect(catalogApi.getEntities).toHaveBeenCalledWith({ + filter: [ + { + kind: ['Group'], + 'metadata.name': 'test-group', + }, + ], + }); + }); + }); }); diff --git a/plugins/scaffolder/src/components/fields/EntityPicker/EntityPicker.tsx b/plugins/scaffolder/src/components/fields/EntityPicker/EntityPicker.tsx index bc78e00576..48e60b60ad 100644 --- a/plugins/scaffolder/src/components/fields/EntityPicker/EntityPicker.tsx +++ b/plugins/scaffolder/src/components/fields/EntityPicker/EntityPicker.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { type EntityFilterQuery } from '@backstage/catalog-client'; import { useApi } from '@backstage/core-plugin-api'; import { catalogApiRef, @@ -44,6 +45,11 @@ export const EntityPicker = (props: EntityPickerProps) => { idSchema, } = props; const allowedKinds = uiSchema['ui:options']?.allowedKinds; + + const catalogFilter: EntityFilterQuery | undefined = + uiSchema['ui:options']?.catalogFilter || + (allowedKinds && { kind: allowedKinds }); + const defaultKind = uiSchema['ui:options']?.defaultKind; const defaultNamespace = uiSchema['ui:options']?.defaultNamespace; @@ -51,7 +57,7 @@ export const EntityPicker = (props: EntityPickerProps) => { const { value: entities, loading } = useAsync(() => catalogApi.getEntities( - allowedKinds ? { filter: { kind: allowedKinds } } : undefined, + catalogFilter ? { filter: catalogFilter } : undefined, ), ); diff --git a/plugins/scaffolder/src/components/fields/EntityPicker/schema.ts b/plugins/scaffolder/src/components/fields/EntityPicker/schema.ts index 9236457fc0..f83dfbf817 100644 --- a/plugins/scaffolder/src/components/fields/EntityPicker/schema.ts +++ b/plugins/scaffolder/src/components/fields/EntityPicker/schema.ts @@ -16,16 +16,28 @@ import { z } from 'zod'; import { makeFieldSchemaFromZod } from '../utils'; +/** + * @public + */ +export const entityQueryFilterExpressionSchema = z.record( + z.string().or(z.array(z.string())), +); + /** * @public */ export const EntityPickerFieldSchema = makeFieldSchemaFromZod( z.string(), z.object({ + /** + * @deprecated Use `catalogFilter` instead. + */ allowedKinds: z .array(z.string()) .optional() - .describe('List of kinds of entities to derive options from'), + .describe( + 'DEPRECATED: Use `catalogFilter` instead. List of kinds of entities to derive options from', + ), defaultKind: z .string() .optional() @@ -42,6 +54,11 @@ export const EntityPickerFieldSchema = makeFieldSchemaFromZod( .describe( 'The default namespace. Options with this namespace will not be prefixed.', ), + catalogFilter: z + .array(entityQueryFilterExpressionSchema) + .or(entityQueryFilterExpressionSchema) + .optional() + .describe('List of key-value filter expression for entities'), }), ); diff --git a/plugins/scaffolder/src/components/fields/OwnerPicker/OwnerPicker.test.tsx b/plugins/scaffolder/src/components/fields/OwnerPicker/OwnerPicker.test.tsx index b78d3add9e..00508593f5 100644 --- a/plugins/scaffolder/src/components/fields/OwnerPicker/OwnerPicker.test.tsx +++ b/plugins/scaffolder/src/components/fields/OwnerPicker/OwnerPicker.test.tsx @@ -14,6 +14,7 @@ * limitations under the License. */ +import { type EntityFilterQuery } from '@backstage/catalog-client'; import { Entity } from '@backstage/catalog-model'; import { CatalogApi, catalogApiRef } from '@backstage/plugin-catalog-react'; import { renderInTestApp, TestApiProvider } from '@backstage/test-utils'; @@ -32,7 +33,15 @@ describe('', () => { const onChange = jest.fn(); const schema = {}; const required = false; - let uiSchema: { 'ui:options': { allowedKinds?: string[] } }; + let uiSchema: { + 'ui:options': { + allowedKinds?: string[]; + defaultKind?: string; + allowArbitraryValues?: boolean; + defaultNamespace?: string | false; + catalogFilter?: EntityFilterQuery; + }; + }; const rawErrors: string[] = []; const formData = undefined; @@ -63,7 +72,7 @@ describe('', () => { afterEach(() => jest.resetAllMocks()); - describe('without allowedKinds', () => { + describe('without catalogFilter and allowedKinds', () => { beforeEach(() => { uiSchema = { 'ui:options': {} }; props = { @@ -108,7 +117,7 @@ describe('', () => { catalogApi.getEntities.mockResolvedValue({ items: entities }); }); - it('searches for users and groups', async () => { + it('searches for users', async () => { await renderInTestApp( @@ -122,4 +131,93 @@ describe('', () => { }); }); }); + + describe('with catalogFilter', () => { + beforeEach(() => { + uiSchema = { + 'ui:options': { + catalogFilter: [ + { + kind: ['Group'], + 'spec.type': 'team', + }, + ], + }, + }; + props = { + onChange, + schema, + required, + uiSchema, + rawErrors, + formData, + } as unknown as FieldProps; + + catalogApi.getEntities.mockResolvedValue({ items: entities }); + }); + + it('searches for group entities of type team', async () => { + await renderInTestApp( + + + , + ); + + expect(catalogApi.getEntities).toHaveBeenCalledWith({ + filter: [ + { + kind: ['Group'], + 'spec.type': 'team', + }, + ], + }); + }); + }); + + describe('catalogFilter should take precedence over allowedKinds', () => { + beforeEach(() => { + uiSchema = { + 'ui:options': { + allowedKinds: ['User'], + catalogFilter: [ + { + kind: ['Group', 'User'], + }, + { + 'spec.type': ['team', 'business-unit'], + }, + ], + }, + }; + props = { + onChange, + schema, + required, + uiSchema, + rawErrors, + formData, + } as unknown as FieldProps; + + catalogApi.getEntities.mockResolvedValue({ items: entities }); + }); + + it('searches for users and groups or teams and business units', async () => { + await renderInTestApp( + + + , + ); + + expect(catalogApi.getEntities).toHaveBeenCalledWith({ + filter: [ + { + kind: ['Group', 'User'], + }, + { + 'spec.type': ['team', 'business-unit'], + }, + ], + }); + }); + }); }); diff --git a/plugins/scaffolder/src/components/fields/OwnerPicker/OwnerPicker.tsx b/plugins/scaffolder/src/components/fields/OwnerPicker/OwnerPicker.tsx index 1c4c356906..5c69e73e12 100644 --- a/plugins/scaffolder/src/components/fields/OwnerPicker/OwnerPicker.tsx +++ b/plugins/scaffolder/src/components/fields/OwnerPicker/OwnerPicker.tsx @@ -33,14 +33,16 @@ export const OwnerPicker = (props: OwnerPickerProps) => { } = props; const defaultNamespace = uiSchema['ui:options']?.defaultNamespace; + const allowedKinds = uiSchema['ui:options']?.allowedKinds; + + const catalogFilter = uiSchema['ui:options']?.catalogFilter || { + kind: allowedKinds || ['Group', 'User'], + }; const ownerUiSchema = { ...uiSchema, 'ui:options': { - allowedKinds: (uiSchema['ui:options']?.allowedKinds || [ - 'Group', - 'User', - ]) as string[], + catalogFilter, defaultKind: 'Group', allowArbitraryValues: uiSchema['ui:options']?.allowArbitraryValues ?? true, diff --git a/plugins/scaffolder/src/components/fields/OwnerPicker/schema.ts b/plugins/scaffolder/src/components/fields/OwnerPicker/schema.ts index 56edef1343..0dbe2fa74f 100644 --- a/plugins/scaffolder/src/components/fields/OwnerPicker/schema.ts +++ b/plugins/scaffolder/src/components/fields/OwnerPicker/schema.ts @@ -15,6 +15,7 @@ */ import { z } from 'zod'; import { makeFieldSchemaFromZod } from '../utils'; +import { entityQueryFilterExpressionSchema } from '../EntityPicker/schema'; /** * @public @@ -22,12 +23,15 @@ import { makeFieldSchemaFromZod } from '../utils'; export const OwnerPickerFieldSchema = makeFieldSchemaFromZod( z.string(), z.object({ + /** + * @deprecated Use `catalogFilter` instead. + */ allowedKinds: z .array(z.string()) .default(['Group', 'User']) .optional() .describe( - 'List of kinds of entities to derive options from. Defaults to Group and User', + 'DEPRECATED: Use `catalogFilter` instead. List of kinds of entities to derive options from. Defaults to Group and User', ), allowArbitraryValues: z .boolean() @@ -39,6 +43,11 @@ export const OwnerPickerFieldSchema = makeFieldSchemaFromZod( .describe( 'The default namespace. Options with this namespace will not be prefixed.', ), + catalogFilter: z + .array(entityQueryFilterExpressionSchema) + .or(entityQueryFilterExpressionSchema) + .optional() + .describe('List of key-value filter expression for entities'), }), ); diff --git a/plugins/scaffolder/src/index.ts b/plugins/scaffolder/src/index.ts index 0e5e2630ac..1ed1346176 100644 --- a/plugins/scaffolder/src/index.ts +++ b/plugins/scaffolder/src/index.ts @@ -74,6 +74,7 @@ export type { TaskPageProps } from './components/TaskPage'; export { NextScaffolderPage } from './plugin'; export type { NextRouterProps } from './next'; export type { TemplateGroupFilter } from './next'; +export type { FormProps } from './next'; export { createNextScaffolderFieldExtension, type NextCustomFieldValidator, diff --git a/plugins/scaffolder/src/next/Router/Router.test.tsx b/plugins/scaffolder/src/next/Router/Router.test.tsx index 1aaca1a94b..89f8f6ecd3 100644 --- a/plugins/scaffolder/src/next/Router/Router.test.tsx +++ b/plugins/scaffolder/src/next/Router/Router.test.tsx @@ -54,6 +54,31 @@ describe('Router', () => { expect(TemplateWizardPage).toHaveBeenCalled(); }); + it('should pass through the FormProps property', async () => { + const transformErrorsMock = jest.fn(); + + await renderInTestApp( + , + { + routeEntries: ['/templates/default/foo'], + }, + ); + + const mock = TemplateWizardPage as jest.Mock; + + const [{ FormProps }] = mock.mock.calls[0]; + + expect(FormProps).toEqual({ + transformErrors: transformErrorsMock, + noHtml5Validate: true, + }); + }); + it('should extract the fieldExtensions and pass them through', async () => { const mockComponent = () => null; const CustomFieldExtension = scaffolderPlugin.provide( diff --git a/plugins/scaffolder/src/next/Router/Router.tsx b/plugins/scaffolder/src/next/Router/Router.tsx index 9ca1e39681..7a2d2826e7 100644 --- a/plugins/scaffolder/src/next/Router/Router.tsx +++ b/plugins/scaffolder/src/next/Router/Router.tsx @@ -30,7 +30,7 @@ import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common'; import { TemplateGroupFilter } from '../TemplateListPage/TemplateGroups'; import { nextSelectedTemplateRouteRef } from '../../routes'; import { SecretsContextProvider } from '../../components/secrets/SecretsContext'; -import type { ErrorTransformer } from '@rjsf/utils'; +import type { FormProps } from '../types'; /** * The Props for the Scaffolder Router @@ -45,7 +45,7 @@ export type NextRouterProps = { TaskPageComponent?: React.ComponentType<{}>; }; groups?: TemplateGroupFilter[]; - transformErrors?: ErrorTransformer; + FormProps?: FormProps; }; /** @@ -93,7 +93,10 @@ export const Router = (props: PropsWithChildren) => { path={nextSelectedTemplateRouteRef.path} element={ - + } /> diff --git a/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/Stepper.test.tsx b/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/Stepper.test.tsx index 6c02492cd8..2660eed47d 100644 --- a/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/Stepper.test.tsx +++ b/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/Stepper.test.tsx @@ -20,6 +20,7 @@ import { renderInTestApp } from '@backstage/test-utils'; import { act, fireEvent } from '@testing-library/react'; import type { RJSFValidationError } from '@rjsf/utils'; import { JsonValue } from '@backstage/types'; +import { NextFieldExtensionComponentProps } from '../../../extensions/types'; describe('Stepper', () => { it('should render the step titles for each step of the manifest', async () => { @@ -110,6 +111,98 @@ describe('Stepper', () => { ); }); + it('should merge nested formData correctly in multiple steps', async () => { + const Repo = ({ + onChange, + }: NextFieldExtensionComponentProps<{ repository: string }, any>) => ( + onChange({ repository: e.target.value })} + defaultValue="" + /> + ); + + const Owner = ({ + onChange, + }: NextFieldExtensionComponentProps<{ owner: string }, any>) => ( + onChange({ owner: e.target.value })} + defaultValue="" + /> + ); + + const manifest: TemplateParameterSchema = { + steps: [ + { + title: 'Step 1', + schema: { + properties: { + first: { + type: 'object', + 'ui:field': 'Repo', + }, + }, + }, + }, + { + title: 'Step 2', + schema: { + properties: { + second: { + type: 'object', + 'ui:field': 'Owner', + }, + }, + }, + }, + ], + title: 'React JSON Schema Form Test', + }; + + const onComplete = jest.fn(async (values: Record) => { + expect(values).toEqual({ + first: { repository: 'Repo' }, + second: { owner: 'Owner' }, + }); + }); + + const { getByRole } = await renderInTestApp( + , + ); + + await fireEvent.change(getByRole('textbox', { name: 'repo' }), { + target: { value: 'Repo' }, + }); + + await act(async () => { + await fireEvent.click(getByRole('button', { name: 'Next' })); + }); + + await fireEvent.change(getByRole('textbox', { name: 'owner' }), { + target: { value: 'Owner' }, + }); + + await act(async () => { + await fireEvent.click(getByRole('button', { name: 'Review' })); + }); + + await act(async () => { + await fireEvent.click(getByRole('button', { name: 'Create' })); + }); + + expect(onComplete).toHaveBeenCalled(); + }); + it('should render custom field extensions properly', async () => { const MockComponent = () => { return

im a custom field extension

; @@ -174,7 +267,7 @@ describe('Stepper', () => { manifest={manifest} extensions={[]} onComplete={jest.fn()} - transformErrors={transformErrors} + FormProps={{ transformErrors }} />, ); @@ -189,6 +282,38 @@ describe('Stepper', () => { expect(getByText('invalid postcode')).toBeInTheDocument(); }); + it('should grab the initial formData from the query', async () => { + const manifest: TemplateParameterSchema = { + steps: [ + { + title: 'Step 1', + schema: { + properties: { + firstName: { + type: 'string', + }, + }, + }, + }, + ], + title: 'initialize formData', + }; + + const mockFormData = { firstName: 'John' }; + + Object.defineProperty(window, 'location', { + value: { + search: `?formData=${JSON.stringify(mockFormData)}`, + }, + }); + + const { getByRole } = await renderInTestApp( + , + ); + + expect(getByRole('textbox', { name: 'firstName' })).toHaveValue('John'); + }); + it('should initialize formState with undefined form values', async () => { const manifest: TemplateParameterSchema = { steps: [ diff --git a/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/Stepper.tsx b/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/Stepper.tsx index 7051b197f1..d4d57eed22 100644 --- a/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/Stepper.tsx +++ b/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/Stepper.tsx @@ -26,18 +26,18 @@ import { Button, makeStyles, } from '@material-ui/core'; -import { withTheme } from '@rjsf/core-v5'; +import { type IChangeEvent, withTheme } from '@rjsf/core-v5'; import { ErrorSchema, FieldValidation } from '@rjsf/utils'; -import React, { useMemo, useState } from 'react'; +import React, { useCallback, useMemo, useState } from 'react'; import { NextFieldExtensionOptions } from '../../../extensions'; import { TemplateParameterSchema } from '../../../types'; import { createAsyncValidators } from './createAsyncValidators'; import { useTemplateSchema } from './useTemplateSchema'; import { ReviewState } from './ReviewState'; -import validator from '@rjsf/validator-ajv8'; +import validator from '@rjsf/validator-ajv6'; import { selectedTemplateRouteRef } from '../../../routes'; -import type { ErrorTransformer } from '@rjsf/utils'; -import { getDefaultFormState } from '@rjsf/utils'; +import { useFormData } from './useFormData'; +import { FormProps } from '../../types'; const useStyles = makeStyles(theme => ({ backButton: { @@ -54,12 +54,12 @@ const useStyles = makeStyles(theme => ({ }, })); -export interface StepperProps { +export type StepperProps = { manifest: TemplateParameterSchema; extensions: NextFieldExtensionOptions[]; onComplete: (values: Record) => Promise; - transformErrors?: ErrorTransformer; -} + FormProps?: FormProps; +}; // TODO(blam): We require here, as the types in this package depend on @rjsf/core explicitly // which is what we're using here as the default types, it needs to depend on @rjsf/core-v5 because @@ -72,7 +72,8 @@ export const Stepper = (props: StepperProps) => { const { steps } = useTemplateSchema(props.manifest); const apiHolder = useApiHolder(); const [activeStep, setActiveStep] = useState(0); - const [formState, setFormState] = useState>({}); + const [formState, setFormState] = useFormData(); + const [errors, setErrors] = useState< undefined | Record >(); @@ -100,6 +101,12 @@ export const Stepper = (props: StepperProps) => { setActiveStep(prevActiveStep => prevActiveStep - 1); }; + const handleChange = useCallback( + (e: IChangeEvent) => + setFormState(current => ({ ...current, ...e.formData })), + [setFormState], + ); + const handleNext = async ({ formData, }: { @@ -109,18 +116,7 @@ export const Stepper = (props: StepperProps) => { // to display it's own loading? Or should we grey out the entire form. setErrors(undefined); - const schema = steps[activeStep]?.schema; - const rootSchema = steps[activeStep]?.mergedSchema; - - const newFormData = getDefaultFormState( - validator, - schema, - formData, - rootSchema, - true, - ); - - const returnedValidation = await validation(newFormData); + const returnedValidation = await validation(formData); const hasErrors = Object.values(returnedValidation).some( i => i.__errors?.length, @@ -136,7 +132,7 @@ export const Stepper = (props: StepperProps) => { return stepNum; }); } - setFormState(current => ({ ...current, ...newFormData })); + setFormState(current => ({ ...current, ...formData })); }; return ( @@ -163,7 +159,8 @@ export const Stepper = (props: StepperProps) => { onSubmit={handleNext} fields={extensions} showErrorList={false} - transformErrors={props.transformErrors} + onChange={handleChange} + {...(props.FormProps ?? {})} >