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/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/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/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/ADOPTERS.md b/ADOPTERS.md index 9ee67e9bed..efa0003f2d 100644 --- a/ADOPTERS.md +++ b/ADOPTERS.md @@ -224,4 +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](https://www.garantibbva.com.tr/) | [Caglar Cataloglu](https://github.com/crozwise) | We are using Backstage focusing on improving experience of developer, minimizing friction from idea to code. We call our portal as "Hyperspace" and very excited for our community (2000+ engineers) that finally we have a platform to boost our productivity! +| [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/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/microsite-next/yarn.lock b/microsite-next/yarn.lock index c7dcd41c28..3a632b3079 100644 --- a/microsite-next/yarn.lock +++ b/microsite-next/yarn.lock @@ -6749,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 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/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/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/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/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/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/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/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/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/README.md b/plugins/explore/README.md index 0204f34714..2388d97ac1 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/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/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/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/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/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/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/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/sentry/src/components/ErrorCell/ErrorCell.test.tsx b/plugins/sentry/src/components/ErrorCell/ErrorCell.test.tsx index ff1960aa4f..22cb5cf0a0 100644 --- a/plugins/sentry/src/components/ErrorCell/ErrorCell.test.tsx +++ b/plugins/sentry/src/components/ErrorCell/ErrorCell.test.tsx @@ -16,10 +16,8 @@ import { ErrorCell } from './ErrorCell'; import React from 'react'; -import { render } from '@testing-library/react'; import mockIssue from '../../api/mock/sentry-issue-mock.json'; -import { ThemeProvider } from '@material-ui/core'; -import { lightTheme } from '@backstage/theme'; +import { renderInTestApp } from '@backstage/test-utils'; describe('Sentry error cell component', () => { it('should render a link that lead to Sentry', async () => { @@ -33,11 +31,7 @@ describe('Sentry error cell component', () => { userCount: 2, permalink: 'http://example.com', }; - const cell = render( - - - , - ); + const cell = await renderInTestApp(); const errorType = await cell.findByText('Exception'); expect(errorType.closest('a')).toHaveAttribute( 'href', @@ -53,11 +47,7 @@ describe('Sentry error cell component', () => { userCount: 2, permalink: 'http://example.com', }; - const cell = render( - - - , - ); + const cell = await renderInTestApp(); const errorType = await cell.findByText('Exception: Could not load cr...'); expect(errorType.closest('a')).toHaveAttribute( 'href', diff --git a/plugins/sentry/src/components/SentryIssuesTable/SentryIssuesTable.test.tsx b/plugins/sentry/src/components/SentryIssuesTable/SentryIssuesTable.test.tsx index 2516d37788..647208f141 100644 --- a/plugins/sentry/src/components/SentryIssuesTable/SentryIssuesTable.test.tsx +++ b/plugins/sentry/src/components/SentryIssuesTable/SentryIssuesTable.test.tsx @@ -15,12 +15,10 @@ */ import React from 'react'; -import { render } from '@testing-library/react'; import SentryIssuesTable from './SentryIssuesTable'; import { SentryIssue } from '../../api'; import mockIssue from '../../api/mock/sentry-issue-mock.json'; -import { ThemeProvider } from '@material-ui/core'; -import { lightTheme } from '@backstage/theme'; +import { renderInTestApp } from '@backstage/test-utils'; describe('SentryIssuesTable', () => { it('should render headers in a table', async () => { @@ -35,19 +33,17 @@ describe('SentryIssuesTable', () => { userCount: 2, }, ]; - const table = await render( - - - , + const table = await renderInTestApp( + , ); expect(await table.findByText('Error')).toBeInTheDocument(); expect(await table.findByText('Graph')).toBeInTheDocument(); @@ -68,19 +64,17 @@ describe('SentryIssuesTable', () => { userCount: 202, }, ]; - const table = await render( - - - , + const table = await renderInTestApp( + , ); expect(await table.findByText('Exception')).toBeInTheDocument(); expect(await table.findByText('exception was thrown')).toBeInTheDocument(); @@ -99,19 +93,17 @@ describe('SentryIssuesTable', () => { userCount: 202, }, ]; - const table = await render( - - - , + const table = await renderInTestApp( + , ); expect(await table.findByText('Last 24h')).toBeInTheDocument(); }); diff --git a/plugins/sonarqube/src/components/SonarQubeContentPage/SonarQubeContentPage.test.tsx b/plugins/sonarqube/src/components/SonarQubeContentPage/SonarQubeContentPage.test.tsx index 22175d14bc..59258e5312 100644 --- a/plugins/sonarqube/src/components/SonarQubeContentPage/SonarQubeContentPage.test.tsx +++ b/plugins/sonarqube/src/components/SonarQubeContentPage/SonarQubeContentPage.test.tsx @@ -16,8 +16,6 @@ import { EntityProvider } from '@backstage/plugin-catalog-react'; import { renderInTestApp, TestApiProvider } from '@backstage/test-utils'; -import { lightTheme } from '@backstage/theme'; -import { ThemeProvider } from '@material-ui/core'; import React from 'react'; import { isSonarQubeAvailable, @@ -44,7 +42,7 @@ const Providers = ({ kind: 'Component', }} > - {children} + {children} ); diff --git a/plugins/tech-radar/src/components/Radar/Radar.test.tsx b/plugins/tech-radar/src/components/Radar/Radar.test.tsx index 1b9e10ae5b..b76eb20a16 100644 --- a/plugins/tech-radar/src/components/Radar/Radar.test.tsx +++ b/plugins/tech-radar/src/components/Radar/Radar.test.tsx @@ -15,9 +15,7 @@ */ import React from 'react'; -import { render } from '@testing-library/react'; -import { ThemeProvider } from '@material-ui/core'; -import { lightTheme } from '@backstage/theme'; +import { renderInTestApp } from '@backstage/test-utils'; import GetBBoxPolyfill from '../../utils/polyfills/getBBox'; import Radar, { Props } from './Radar'; @@ -48,12 +46,8 @@ describe('Radar', () => { GetBBoxPolyfill.remove(); }); - it('should render', () => { - const rendered = render( - - - , - ); + it('should render', async () => { + const rendered = await renderInTestApp(); const svg = rendered.container.querySelector('svg'); expect(svg).not.toBeNull(); diff --git a/plugins/tech-radar/src/components/RadarBubble/RadarBubble.test.tsx b/plugins/tech-radar/src/components/RadarBubble/RadarBubble.test.tsx index 9af1f5caff..ab8070c146 100644 --- a/plugins/tech-radar/src/components/RadarBubble/RadarBubble.test.tsx +++ b/plugins/tech-radar/src/components/RadarBubble/RadarBubble.test.tsx @@ -15,9 +15,7 @@ */ import React from 'react'; -import { render } from '@testing-library/react'; -import { ThemeProvider } from '@material-ui/core'; -import { lightTheme } from '@backstage/theme'; +import { renderInTestApp } from '@backstage/test-utils'; import GetBBoxPolyfill from '../../utils/polyfills/getBBox'; import RadarBubble, { Props } from './RadarBubble'; @@ -38,13 +36,11 @@ describe('RadarBubble', () => { GetBBoxPolyfill.remove(); }); - it('should render', () => { - const rendered = render( - - - - - , + it('should render', async () => { + const rendered = await renderInTestApp( + + + , ); expect(rendered.getByText(minProps.text)).toBeInTheDocument(); diff --git a/plugins/tech-radar/src/components/RadarComponent.test.tsx b/plugins/tech-radar/src/components/RadarComponent.test.tsx index 3d3b1bfd17..4bb207a1de 100644 --- a/plugins/tech-radar/src/components/RadarComponent.test.tsx +++ b/plugins/tech-radar/src/components/RadarComponent.test.tsx @@ -15,10 +15,7 @@ */ import React from 'react'; -import { act, render, waitFor } from '@testing-library/react'; -import { ThemeProvider } from '@material-ui/core'; -import { lightTheme } from '@backstage/theme'; -import { TestApiProvider, withLogCollector } from '@backstage/test-utils'; +import { renderInTestApp, TestApiProvider } from '@backstage/test-utils'; import GetBBoxPolyfill from '../utils/polyfills/getBBox'; import { RadarComponent } from './RadarComponent'; @@ -36,7 +33,9 @@ describe('RadarComponent', () => { }); class MockClient implements TechRadarApi { + constructor(private delay = 0) {} async load(): Promise { + await new Promise(resolve => setTimeout(resolve, this.delay)); return { entries: [], quadrants: [], @@ -45,87 +44,52 @@ describe('RadarComponent', () => { } } - const mockClient = new MockClient(); - it('should render a progress bar', async () => { jest.useFakeTimers(); - const errorApi = { post: () => {} }; - const { getByTestId, findByTestId } = render( - - - - - , + const { findByTestId } = await renderInTestApp( + + + , ); - act(() => { - jest.advanceTimersByTime(250); - }); - expect(getByTestId('progress')).toBeInTheDocument(); + jest.advanceTimersByTime(250); + await expect(findByTestId('progress')).resolves.toBeInTheDocument(); + + jest.advanceTimersByTime(250); + await expect(findByTestId('tech-radar-svg')).resolves.toBeInTheDocument(); - await findByTestId('tech-radar-svg'); jest.useRealTimers(); }); it('should call the errorApi if load fails', async () => { const errorApi = { post: jest.fn() }; + const mockClient = new MockClient(); jest .spyOn(mockClient, 'load') .mockRejectedValue(new Error('404 Page Not Found')); - const { queryByTestId } = render( - - - - - , + const { queryByTestId } = await renderInTestApp( + + + , ); - await waitFor(() => !queryByTestId('progress')); - expect(errorApi.post).toHaveBeenCalledTimes(1); expect(errorApi.post).toHaveBeenCalledWith(new Error('404 Page Not Found')); expect(queryByTestId('tech-radar-svg')).not.toBeInTheDocument(); }); - - it('should not render without errorApiRef', () => { - expect( - withLogCollector(['error'], () => { - expect(() => { - render( - - - - - , - ); - }).toThrow(); - }).error[0], - ).toMatchObject({ - detail: new Error('No implementation available for apiRef{core.error}'), - }); - }); }); diff --git a/plugins/tech-radar/src/components/RadarDescription/RadarDescription.test.tsx b/plugins/tech-radar/src/components/RadarDescription/RadarDescription.test.tsx index 7249b9f194..7f2dcbe6ac 100644 --- a/plugins/tech-radar/src/components/RadarDescription/RadarDescription.test.tsx +++ b/plugins/tech-radar/src/components/RadarDescription/RadarDescription.test.tsx @@ -15,11 +15,10 @@ */ import React from 'react'; -import { render, screen } from '@testing-library/react'; -import { ThemeProvider } from '@material-ui/core'; -import { lightTheme } from '@backstage/theme'; +import { screen } from '@testing-library/react'; import { Props, RadarDescription } from './RadarDescription'; +import { renderInTestApp } from '@backstage/test-utils'; const minProps: Props = { open: true, @@ -29,12 +28,8 @@ const minProps: Props = { }; describe('RadarDescription', () => { - it('should render', () => { - render( - - - , - ); + it('should render', async () => { + await renderInTestApp(); const radarDescription = screen.getByTestId('radar-description'); expect(radarDescription).toBeInTheDocument(); diff --git a/plugins/tech-radar/src/components/RadarEntry/RadarEntry.test.tsx b/plugins/tech-radar/src/components/RadarEntry/RadarEntry.test.tsx index b1e468899d..36f304330d 100644 --- a/plugins/tech-radar/src/components/RadarEntry/RadarEntry.test.tsx +++ b/plugins/tech-radar/src/components/RadarEntry/RadarEntry.test.tsx @@ -15,10 +15,9 @@ */ import React from 'react'; -import { render, screen } from '@testing-library/react'; +import { screen } from '@testing-library/react'; +import { renderInTestApp } from '@backstage/test-utils'; import userEvent from '@testing-library/user-event'; -import { ThemeProvider } from '@material-ui/core'; -import { lightTheme } from '@backstage/theme'; import GetBBoxPolyfill from '../../utils/polyfills/getBBox'; import RadarEntry, { Props } from './RadarEntry'; @@ -45,13 +44,11 @@ describe('RadarEntry', () => { GetBBoxPolyfill.remove(); }); - it('should render link only', () => { - render( - - - - - , + it('should render link only', async () => { + await renderInTestApp( + + + , ); const radarEntry = screen.getByTestId('radar-entry'); @@ -62,12 +59,10 @@ describe('RadarEntry', () => { }); it('should render with description', async () => { - render( - - - - - , + await renderInTestApp( + + + , ); await userEvent.click(screen.getByRole('button')); @@ -80,17 +75,15 @@ describe('RadarEntry', () => { expect(screen.getByText(String(minProps.value))).toBeInTheDocument(); }); - it('should render blip with url equal to # if description present', () => { + it('should render blip with url equal to # if description present', async () => { const withUrl = { ...optionalProps, url: 'http://backstage.io', }; - render( - - - - - , + await renderInTestApp( + + + , ); expect(screen.getByRole('button')).toHaveAttribute('href', '#'); diff --git a/plugins/tech-radar/src/components/RadarFooter/RadarFooter.test.tsx b/plugins/tech-radar/src/components/RadarFooter/RadarFooter.test.tsx index b76405f2bf..df56e2ad2c 100644 --- a/plugins/tech-radar/src/components/RadarFooter/RadarFooter.test.tsx +++ b/plugins/tech-radar/src/components/RadarFooter/RadarFooter.test.tsx @@ -15,9 +15,7 @@ */ import React from 'react'; -import { render } from '@testing-library/react'; -import { ThemeProvider } from '@material-ui/core'; -import { lightTheme } from '@backstage/theme'; +import { renderInTestApp } from '@backstage/test-utils'; import GetBBoxPolyfill from '../../utils/polyfills/getBBox'; import RadarFooter, { Props } from './RadarFooter'; @@ -36,13 +34,11 @@ describe('RadarFooter', () => { GetBBoxPolyfill.remove(); }); - it('should render', () => { - const rendered = render( - - - - - , + it('should render', async () => { + const rendered = await renderInTestApp( + + + , ); const radarFooter = rendered.getByTestId('radar-footer'); const { x, y } = minProps; diff --git a/plugins/tech-radar/src/components/RadarGrid/RadarGrid.test.tsx b/plugins/tech-radar/src/components/RadarGrid/RadarGrid.test.tsx index d5636d74b8..2e0a5a225c 100644 --- a/plugins/tech-radar/src/components/RadarGrid/RadarGrid.test.tsx +++ b/plugins/tech-radar/src/components/RadarGrid/RadarGrid.test.tsx @@ -15,9 +15,7 @@ */ import React from 'react'; -import { render } from '@testing-library/react'; -import { ThemeProvider } from '@material-ui/core'; -import { lightTheme } from '@backstage/theme'; +import { renderInTestApp } from '@backstage/test-utils'; import GetBBoxPolyfill from '../../utils/polyfills/getBBox'; import RadarGrid, { Props } from './RadarGrid'; @@ -36,13 +34,11 @@ describe('RadarGrid', () => { GetBBoxPolyfill.remove(); }); - it('should render', () => { - const rendered = render( - - - - - , + it('should render', async () => { + const rendered = await renderInTestApp( + + + , ); expect(rendered.getByTestId('radar-grid-x-line')).toBeInTheDocument(); diff --git a/plugins/tech-radar/src/components/RadarLegend/RadarLegend.test.tsx b/plugins/tech-radar/src/components/RadarLegend/RadarLegend.test.tsx index e0b5f09a63..de8bfd15d7 100644 --- a/plugins/tech-radar/src/components/RadarLegend/RadarLegend.test.tsx +++ b/plugins/tech-radar/src/components/RadarLegend/RadarLegend.test.tsx @@ -14,9 +14,7 @@ * limitations under the License. */ -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 GetBBoxPolyfill from '../../utils/polyfills/getBBox'; @@ -47,13 +45,11 @@ describe('RadarLegend', () => { GetBBoxPolyfill.remove(); }); - it('should render', () => { - const rendered = render( - - - - - , + it('should render', async () => { + const rendered = await renderInTestApp( + + + , ); expect(rendered.getByTestId('radar-legend')).toBeInTheDocument(); diff --git a/plugins/tech-radar/src/components/RadarPage.test.tsx b/plugins/tech-radar/src/components/RadarPage.test.tsx index f0c2a04590..b65d9b31b2 100644 --- a/plugins/tech-radar/src/components/RadarPage.test.tsx +++ b/plugins/tech-radar/src/components/RadarPage.test.tsx @@ -20,8 +20,6 @@ import { TestApiProvider, wrapInTestApp, } from '@backstage/test-utils'; -import { lightTheme } from '@backstage/theme'; -import { ThemeProvider } from '@material-ui/core'; import { act, render, waitFor } from '@testing-library/react'; import React from 'react'; import GetBBoxPolyfill from '../utils/polyfills/getBBox'; @@ -61,11 +59,9 @@ describe('RadarPage', () => { const { getByTestId, findByTestId } = render( wrapInTestApp( - - - - - , + + + , ), ); @@ -87,11 +83,9 @@ describe('RadarPage', () => { jest.spyOn(mockClient, 'load'); const { getByText, findByTestId } = await renderInTestApp( - - - - - , + + + , ); await expect(findByTestId('tech-radar-svg')).resolves.toBeInTheDocument(); @@ -111,11 +105,9 @@ describe('RadarPage', () => { jest.spyOn(mockClient, 'load'); const { findByTestId } = await renderInTestApp( - - - - - , + + + , ); await expect(findByTestId('tech-radar-svg')).resolves.toBeInTheDocument(); @@ -136,16 +128,14 @@ describe('RadarPage', () => { }; const { queryByTestId } = await renderInTestApp( - - - - - , + + + , ); await waitFor(() => !queryByTestId('progress')); diff --git a/plugins/tech-radar/src/components/RadarPlot/RadarPlot.test.tsx b/plugins/tech-radar/src/components/RadarPlot/RadarPlot.test.tsx index fd03111b49..7557755ed2 100644 --- a/plugins/tech-radar/src/components/RadarPlot/RadarPlot.test.tsx +++ b/plugins/tech-radar/src/components/RadarPlot/RadarPlot.test.tsx @@ -15,9 +15,7 @@ */ import React from 'react'; -import { render } from '@testing-library/react'; -import { ThemeProvider } from '@material-ui/core'; -import { lightTheme } from '@backstage/theme'; +import { renderInTestApp } from '@backstage/test-utils'; import GetBBoxPolyfill from '../../utils/polyfills/getBBox'; import RadarPlot, { Props } from './RadarPlot'; @@ -49,13 +47,11 @@ describe('RadarPlot', () => { GetBBoxPolyfill.remove(); }); - it('should render', () => { - const rendered = render( - - - - - , + it('should render', async () => { + const rendered = await renderInTestApp( + + + , ); expect(rendered.getByTestId('radar-plot')).toBeInTheDocument(); diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPage/TechDocsReaderPage.test.tsx b/plugins/techdocs/src/reader/components/TechDocsReaderPage/TechDocsReaderPage.test.tsx index 808cb84ccf..4e8f331c7f 100644 --- a/plugins/techdocs/src/reader/components/TechDocsReaderPage/TechDocsReaderPage.test.tsx +++ b/plugins/techdocs/src/reader/components/TechDocsReaderPage/TechDocsReaderPage.test.tsx @@ -15,10 +15,8 @@ */ import React from 'react'; import { act } from '@testing-library/react'; -import { ThemeProvider } from '@material-ui/core'; import { scmIntegrationsApiRef } from '@backstage/integration-react'; -import { lightTheme } from '@backstage/theme'; import { entityRouteRef } from '@backstage/plugin-catalog-react'; import { renderInTestApp, TestApiProvider } from '@backstage/test-utils'; @@ -84,17 +82,15 @@ jest.mock('@backstage/core-components', () => ({ const Wrapper = ({ children }: { children: React.ReactNode }) => { return ( - - - {children} - - + + {children} + ); }; diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContent.test.tsx b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContent.test.tsx index 7db00f6590..3e5a4c73c3 100644 --- a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContent.test.tsx +++ b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContent.test.tsx @@ -16,9 +16,6 @@ import React from 'react'; import { act, waitFor } from '@testing-library/react'; -import { ThemeProvider } from '@material-ui/core'; - -import { lightTheme } from '@backstage/theme'; import { CompoundEntityRef } from '@backstage/catalog-model'; import { techdocsApiRef, @@ -79,13 +76,11 @@ const Wrapper = ({ entityRef?: CompoundEntityRef; children: React.ReactNode; }) => ( - - - - {children} - - - + + + {children} + + ); describe('', () => { diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPageHeader/TechDocsReaderPageHeader.test.tsx b/plugins/techdocs/src/reader/components/TechDocsReaderPageHeader/TechDocsReaderPageHeader.test.tsx index da193430d5..a3e03b7cf0 100644 --- a/plugins/techdocs/src/reader/components/TechDocsReaderPageHeader/TechDocsReaderPageHeader.test.tsx +++ b/plugins/techdocs/src/reader/components/TechDocsReaderPageHeader/TechDocsReaderPageHeader.test.tsx @@ -16,9 +16,6 @@ import React from 'react'; import { act, waitFor } from '@testing-library/react'; -import { ThemeProvider } from '@material-ui/core'; - -import { lightTheme } from '@backstage/theme'; import { CompoundEntityRef } from '@backstage/catalog-model'; import { entityRouteRef } from '@backstage/plugin-catalog-react'; import { @@ -71,13 +68,11 @@ const Wrapper = ({ entityRef?: CompoundEntityRef; children: React.ReactNode; }) => ( - - - - {children} - - - + + + {children} + + ); describe('', () => { diff --git a/yarn.lock b/yarn.lock index 9a0e0e00f7..5469b12d98 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9234,9 +9234,9 @@ __metadata: languageName: node linkType: hard -"@eslint/eslintrc@npm:^1.4.0": - version: 1.4.0 - resolution: "@eslint/eslintrc@npm:1.4.0" +"@eslint/eslintrc@npm:^1.4.1": + version: 1.4.1 + resolution: "@eslint/eslintrc@npm:1.4.1" dependencies: ajv: ^6.12.4 debug: ^4.3.2 @@ -9247,7 +9247,7 @@ __metadata: js-yaml: ^4.1.0 minimatch: ^3.1.2 strip-json-comments: ^3.1.1 - checksum: 73e39c833deafde8d8706e6fa9b52b6d99927c094ead8e405ea4174e8197ec24aac9ba88ae38cc8ad32eaccf07b9c7fc5dc70761d1fba6da41a928691447305f + checksum: cd3e5a8683db604739938b1c1c8b77927dc04fce3e28e0c88e7f2cd4900b89466baf83dfbad76b2b9e4d2746abdd00dd3f9da544d3e311633d8693f327d04cd7 languageName: node linkType: hard @@ -13957,11 +13957,11 @@ __metadata: linkType: hard "@types/codemirror@npm:^5.0.0": - version: 5.60.5 - resolution: "@types/codemirror@npm:5.60.5" + version: 5.60.6 + resolution: "@types/codemirror@npm:5.60.6" dependencies: "@types/tern": "*" - checksum: 423b6378b6415b626d9f54d37d69477f96940b30a695d4ec36402feb59a96f7ab42d1c17b8472fbb222a0966f6061deee234e37bcd3e34c75836e989dc95929d + checksum: 10b8c2a689f9ed610b0048d9d5ded1a7eb90c45014156b84b41c4f52f4720172414f7172d56f13c8a0b35d429704fb9d240414cf205776c807caa39105b33481 languageName: node linkType: hard @@ -14114,9 +14114,9 @@ __metadata: linkType: hard "@types/d3-force@npm:^3.0.0": - version: 3.0.3 - resolution: "@types/d3-force@npm:3.0.3" - checksum: 1082a07c028b454fccbb250381e1388818606faff0a7b81d80bc4ab53c5f86f2618fcbb12226402880476d96be9bb24c6c38f175c5e697e94ea4cf8af389be6c + version: 3.0.4 + resolution: "@types/d3-force@npm:3.0.4" + checksum: 779fb597fb41e7bc6a5e1b8969d500deb95c4a73428c7c268bf0ca6f3ed668dd2ed6aa652de7af14d2f9c192dad4f6e7badf2c5bc330624bd8405ac88440b278 languageName: node linkType: hard @@ -14169,9 +14169,9 @@ __metadata: linkType: hard "@types/d3-selection@npm:*, @types/d3-selection@npm:^3.0.1": - version: 3.0.3 - resolution: "@types/d3-selection@npm:3.0.3" - checksum: 24d4ac0b8f76bfdf5d3d90e6724ff7703057375ba482d2924f8d959e5481eaab55e0e39b5ca68a6d4e99bce100561333dee4146f497c9fc3605f1a308a7e713c + version: 3.0.4 + resolution: "@types/d3-selection@npm:3.0.4" + checksum: b1e486db7f020610c854996a96b2f59a43b89d48bc7ac2ef9479f6f6e6324d3b21d7dfc8031a0b6d049a84b769b14eca65d73fc42613ab0044ef67973a9fe6ca languageName: node linkType: hard @@ -14194,11 +14194,11 @@ __metadata: linkType: hard "@types/d3-shape@npm:^3.0.1": - version: 3.1.0 - resolution: "@types/d3-shape@npm:3.1.0" + version: 3.1.1 + resolution: "@types/d3-shape@npm:3.1.1" dependencies: "@types/d3-path": "*" - checksum: 19d43b9762cbff503806d014be1b8a5d22dd12c71635f1f0b30696d3b3b31528b978175afe2ba183542fd16e4fc740f56e7a84100ead00f7d95eaeb890ac8b78 + checksum: 8f1762ecdeb4833a3802be1c65363cbc7cca753d0b836a3855fde4ba12f8e6fc142dba3c5f6d669a9e89374cc6dc414464e4f2d04e72fafd4bc64819ce30bb63 languageName: node linkType: hard @@ -14210,12 +14210,12 @@ __metadata: linkType: hard "@types/d3-zoom@npm:^3.0.1": - version: 3.0.1 - resolution: "@types/d3-zoom@npm:3.0.1" + version: 3.0.2 + resolution: "@types/d3-zoom@npm:3.0.2" dependencies: "@types/d3-interpolate": "*" "@types/d3-selection": "*" - checksum: f813b3e6f27efc8508d6a2d575c21d0b1ba338160e498b901bc103d813c47ce609f691912a4ef73e9678cdbbdebbee81fecaf7432f777e9a8a54bf4087c21eba + checksum: c55b18ec5d5108c265d3e19299f51469e48d215f179a665f5797ac18bf8458dcbefd0c682154f8d8eb9d297a7486a5853115f72444af9cd02b3b4b5d1e4f9b22 languageName: node linkType: hard @@ -14326,7 +14326,18 @@ __metadata: languageName: node linkType: hard -"@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:4.17.31, @types/express-serve-static-core@npm:^4.17.18, @types/express-serve-static-core@npm:^4.17.5": +"@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^4.17.18, @types/express-serve-static-core@npm:^4.17.5": + version: 4.17.32 + resolution: "@types/express-serve-static-core@npm:4.17.32" + dependencies: + "@types/node": "*" + "@types/qs": "*" + "@types/range-parser": "*" + checksum: 70ec1b8f386628850b315a7b9fd4240a5a70297b41ef1c39af65c8b9661d2c775cfff4686b491fd90e5b6eef43088af203700c5541aec0d063db0c6cbeff254c + languageName: node + linkType: hard + +"@types/express-serve-static-core@npm:4.17.31": version: 4.17.31 resolution: "@types/express-serve-static-core@npm:4.17.31" dependencies: @@ -14562,12 +14573,12 @@ __metadata: linkType: hard "@types/jest@npm:*, @types/jest@npm:^29.0.0": - version: 29.2.4 - resolution: "@types/jest@npm:29.2.4" + version: 29.2.5 + resolution: "@types/jest@npm:29.2.5" dependencies: expect: ^29.0.0 pretty-format: ^29.0.0 - checksum: 9deb4756fe1b438d41ff1aae7d6c216c9e49e5fe60f539f8edb6698ffeb530ff7b25d37e223439b03602ca3a7397c9c2e53e1a39c7bd616353472fce0cc04107 + checksum: d668470f00ec4cb8b8457f1fd90f7358fad8f22d74b85006dad6be522d6b9bf10f49f597e88d1d1a518d211c1b65be32a1f27f0e49ce0658d110a9206b8ea310 languageName: node linkType: hard @@ -14582,11 +14593,11 @@ __metadata: linkType: hard "@types/jquery@npm:^3.3.34": - version: 3.5.14 - resolution: "@types/jquery@npm:3.5.14" + version: 3.5.16 + resolution: "@types/jquery@npm:3.5.16" dependencies: "@types/sizzle": "*" - checksum: 159d6f804ed1a204b3f79f2d591a271d82e866bd45bd49fb6ef40561a25dbe0f47ec7815681b44cc2db5598425f72811e7e80ab0e983d980470998ac56feb375 + checksum: 13c995f15d1c2f1d322103dc1cb0a22b95eecc3e7546f00279b8731aea21d7ec04550af40e609ee48e755d4e11bf61c25b4aa9f53df3bcbec4b8fe8e81471732 languageName: node linkType: hard @@ -14734,9 +14745,9 @@ __metadata: linkType: hard "@types/luxon@npm:*, @types/luxon@npm:^3.0.0": - version: 3.1.0 - resolution: "@types/luxon@npm:3.1.0" - checksum: 04768029342ad76fc2a9339436c143ea64797b35cf9b03ddded787c13eae30f0ca1246e51c2c5365ed912f98068e13a967a3931b137eb4585248a0ad7ec3fa86 + version: 3.2.0 + resolution: "@types/luxon@npm:3.2.0" + checksum: 051bfbf841c6ce98728df6538342ce4aaddfcf0ec6e8b473e0195dcfc3ba6b1fe4b3ce17f2ba6d25344f41cb70032c1debe96da9e384e5f6e639665c1e6d368c languageName: node linkType: hard @@ -14818,11 +14829,11 @@ __metadata: linkType: hard "@types/morgan@npm:^1.9.0": - version: 1.9.3 - resolution: "@types/morgan@npm:1.9.3" + version: 1.9.4 + resolution: "@types/morgan@npm:1.9.4" dependencies: "@types/node": "*" - checksum: 0b9bc8641ce03f7176f617523b8da300e5d47225b1667396749950ac7fdfa1f990447d490648fbaff050c2b0ef5fa60c3f2f00c6b76efec06fe5148de5020813 + checksum: d1e99c66a43501dcdf6e94e013dfff4e6c152cbb5f782d954bb722d230a9c1c0fe06fab6df3f3dfa3547735a7598f9471633cc6813d794e9562fd022e217c6ae languageName: node linkType: hard @@ -15825,9 +15836,9 @@ __metadata: languageName: node linkType: hard -"@uiw/codemirror-extensions-basic-setup@npm:4.19.4": - version: 4.19.4 - resolution: "@uiw/codemirror-extensions-basic-setup@npm:4.19.4" +"@uiw/codemirror-extensions-basic-setup@npm:4.19.5": + version: 4.19.5 + resolution: "@uiw/codemirror-extensions-basic-setup@npm:4.19.5" dependencies: "@codemirror/autocomplete": ^6.0.0 "@codemirror/commands": ^6.0.0 @@ -15844,19 +15855,19 @@ __metadata: "@codemirror/search": ">=6.0.0" "@codemirror/state": ">=6.0.0" "@codemirror/view": ">=6.0.0" - checksum: 041f6c67ad43a1991b2b5dea49bc907937b47de26f44d75de81c9937c9ac61193ed08e114b8dfacfa3de45fd05799d76cab0f529577671e61c04d52536287bb1 + checksum: adc49a56f592d34744c67eabdd878512a92387c8d10c6b4fa1cf947a8af1e5075308149d3bcc69778fa78a78f58a40e1b604615167b1374c917408cb50cfcccc languageName: node linkType: hard "@uiw/react-codemirror@npm:^4.9.3": - version: 4.19.4 - resolution: "@uiw/react-codemirror@npm:4.19.4" + version: 4.19.5 + resolution: "@uiw/react-codemirror@npm:4.19.5" dependencies: "@babel/runtime": ^7.18.6 "@codemirror/commands": ^6.1.0 "@codemirror/state": ^6.1.1 "@codemirror/theme-one-dark": ^6.0.0 - "@uiw/codemirror-extensions-basic-setup": 4.19.4 + "@uiw/codemirror-extensions-basic-setup": 4.19.5 codemirror: ^6.0.0 peerDependencies: "@babel/runtime": ">=7.11.0" @@ -15866,7 +15877,7 @@ __metadata: codemirror: ">=6.0.0" react: ">=16.8.0" react-dom: ">=16.8.0" - checksum: 88f931ae71f42609db4ca81453d9d68774a57938c06827423588c7e8dabc0c5e0dfce18ca790d5ca078b69b68372ab5a929344333ca7915b27f6a6f66470c5d8 + checksum: 5fb99c3599dabf9b52331016e6b42f790afc3858b3c8f034044f8fca9d52a1b6230a0df2ef21df4f2fae86856a4c1a3134d09a40ae3cd81084288dfab958f4d4 languageName: node linkType: hard @@ -19337,9 +19348,9 @@ __metadata: linkType: hard "core-js@npm:^3.4.1, core-js@npm:^3.6.5": - version: 3.27.0 - resolution: "core-js@npm:3.27.0" - checksum: 14bf6772e1c73a1cb3848ff63cae8d8f28354195e95ff550f2c4a7ae04650987691e37d6c9fe73789ffd97055b024fc7df825c203965f9a9b9aa6fb9f26f8571 + version: 3.27.1 + resolution: "core-js@npm:3.27.1" + checksum: d50b5f88aea4302512ad9446c18e90f4d35dea1e6d8d3f87337690677061565ff11a670f1e0c87de57aa6074375fbb25ed5784076c040d3c4de8b4bce7d2ebeb languageName: node linkType: hard @@ -21818,8 +21829,8 @@ __metadata: linkType: hard "eslint-plugin-jest@npm:^27.0.0": - version: 27.1.7 - resolution: "eslint-plugin-jest@npm:27.1.7" + version: 27.2.0 + resolution: "eslint-plugin-jest@npm:27.2.0" dependencies: "@typescript-eslint/utils": ^5.10.0 peerDependencies: @@ -21830,7 +21841,7 @@ __metadata: optional: true jest: optional: true - checksum: 1173e60450d8fa7a913d654e80e26176cc64c35f287d680d6fe4187a53974fd8c6883749924c8ea2a9328e295cba4d1be0b3047492653270e9341da1a3fec580 + checksum: 83554bb8eed289f903e2e03871a42a9b7b37b5e443d4a1501a42e004db49cddad894592ccec9840221b412ea3d2388428a1b11938031e5628d21c5a3210f1240 languageName: node linkType: hard @@ -21992,10 +22003,10 @@ __metadata: linkType: hard "eslint@npm:^8.6.0": - version: 8.30.0 - resolution: "eslint@npm:8.30.0" + version: 8.31.0 + resolution: "eslint@npm:8.31.0" dependencies: - "@eslint/eslintrc": ^1.4.0 + "@eslint/eslintrc": ^1.4.1 "@humanwhocodes/config-array": ^0.11.8 "@humanwhocodes/module-importer": ^1.0.1 "@nodelib/fs.walk": ^1.2.8 @@ -22036,7 +22047,7 @@ __metadata: text-table: ^0.2.0 bin: eslint: bin/eslint.js - checksum: b7525bb465b342665c3b8bab7e114d514ef1bc4e79f211c919863f9c71767e7412ec82383a22614a92d159783f91101018817000f7c61ce69a5e7015280cafaf + checksum: 5e5688bb864edc6b12d165849994812eefa67fb3fc44bb26f53659b63edcd8bcc68389d27cc6cc9e5b79ee22f24b6f311fa3ed047bddcafdec7d84c1b5561e4f languageName: node linkType: hard @@ -22731,9 +22742,9 @@ __metadata: linkType: hard "fast-json-patch@npm:^3.0.0-1": - version: 3.0.0-1 - resolution: "fast-json-patch@npm:3.0.0-1" - checksum: d4a8dff174357a90f3e2b79812df4bcc179143524e7eb1ab84a3bd5a80bd283f6be53996abe5c38527aeb28e994f0d03084c9ce5fcd8eb3e2881986e991105aa + version: 3.1.1 + resolution: "fast-json-patch@npm:3.1.1" + checksum: c4525b61b2471df60d4b025b4118b036d99778a93431aa44d1084218182841d82ce93056f0f3bbd731a24e6a8e69820128adf1873eb2199a26c62ef58d137833 languageName: node linkType: hard @@ -26645,9 +26656,9 @@ __metadata: linkType: hard "jose@npm:^4.10.0, jose@npm:^4.6.0": - version: 4.11.1 - resolution: "jose@npm:4.11.1" - checksum: cd15cba258d0fd20f6168631ce2e94fda8442df80e43c1033c523915cecdf390a1cc8efe0eab0c2d65935ca973d791c668aea80724d2aa9c2879d4e70f3081d7 + version: 4.11.2 + resolution: "jose@npm:4.11.2" + checksum: bc9b2271c31683603857b2fd2903afa29f826fffd4bcefc0845355ed86995def87eaadf502033207996109d76698c912e5a986e279326d9629321a50504fe466 languageName: node linkType: hard @@ -27126,11 +27137,11 @@ __metadata: linkType: hard "json5@npm:^2.1.2, json5@npm:^2.1.3, json5@npm:^2.2.0, json5@npm:^2.2.1": - version: 2.2.2 - resolution: "json5@npm:2.2.2" + version: 2.2.3 + resolution: "json5@npm:2.2.3" bin: json5: lib/cli.js - checksum: 9a878d66b72157b073cf0017f3e5d93ec209fa5943abcb38d37a54b208917c166bd473c26a24695e67a016ce65759aeb89946592991f8f9174fb96c8e2492683 + checksum: 2a7436a93393830bce797d4626275152e37e877b265e94ca69c99e3d20c2b9dab021279146a39cdb700e71b2dd32a4cebd1514cd57cee102b1af906ce5040349 languageName: node linkType: hard @@ -28311,9 +28322,9 @@ __metadata: linkType: hard "luxon@npm:^3.0.0": - version: 3.1.1 - resolution: "luxon@npm:3.1.1" - checksum: 388fb35d3c51a19d8b305a3338e7e74634b08562e7d2f9ed5c05a7f4bc9ee1c1ab6a2546b6d9c4c104516b24043757d65f5f3fe3d78b206fbf55a9586ab62230 + version: 3.2.0 + resolution: "luxon@npm:3.2.0" + checksum: 9a54fc68f1735259095299616c7d01967fb52a9c3500c6b31f97c477574122c62dc0f119d13abc04daaf545e1b8f37a63642b45cd04a240ff59987ceb6ec02c0 languageName: node linkType: hard @@ -32398,11 +32409,11 @@ __metadata: linkType: hard "prom-client@npm:^14.0.1": - version: 14.1.0 - resolution: "prom-client@npm:14.1.0" + version: 14.1.1 + resolution: "prom-client@npm:14.1.1" dependencies: tdigest: ^0.1.1 - checksum: 88f8e67020c0af07d09ab8f15caaa2a3d0810b01d903d0977d82947d3b0100a539db77bcccfde0bf2449a85060475f7fb05b64e7c34951c8a54b84240ae7ae81 + checksum: 7ff3e85636b1f0ca590b38ad7c7c5f9998b985c06a1c572ffffc69f052d5b4baf84c9124923e3824c63f78b5e8400081c6472173d04382ca296ebdf36d774a88 languageName: node linkType: hard