Skip to content

Commit 4370ce0

Browse files
committed
enable list deprecations for workspace and resolve existing
Signed-off-by: Kurt King <[email protected]>
1 parent adfea13 commit 4370ce0

File tree

6 files changed

+11
-16
lines changed

6 files changed

+11
-16
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@backstage-community/plugin-newrelic-dashboard': minor
3+
---
4+
5+
Removes all existing deprecation notices. If you are still using `DashboardSnapshotComponent`, this will be a breaking change.

workspaces/newrelic/bcp.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"autoVersionBump": true,
3-
"knipReports": false
3+
"knipReports": false,
4+
"listDeprecations": true
45
}

workspaces/newrelic/plugins/newrelic-dashboard/src/components/NewRelicDashboard/NewRelicDashboard.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
import { NewRelicDashboard } from './NewRelicDashboard';
18-
import { MockStorageApi, TestApiProvider } from '@backstage/test-utils';
18+
import { mockApis, TestApiProvider } from '@backstage/test-utils';
1919
import { EntityProvider } from '@backstage/plugin-catalog-react';
2020
import { newRelicDashboardApiRef } from '../../api';
2121
import { NEWRELIC_GUID_ANNOTATION } from '../../constants';
@@ -115,7 +115,7 @@ export const NewRelicDashboardWithSnapshots = () => (
115115
<TestApiProvider
116116
apis={[
117117
[newRelicDashboardApiRef, newRelicApiMockFull],
118-
[storageApiRef, MockStorageApi.create()],
118+
[storageApiRef, mockApis.storage()],
119119
]}
120120
>
121121
<EntityProvider entity={entity}>

workspaces/newrelic/plugins/newrelic-dashboard/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@ export {
2020
EntityNewRelicDashboardContent,
2121
DashboardSnapshot,
2222
DashboardSnapshotList,
23-
DashboardSnapshotComponent,
2423
} from './plugin';
2524
export { isNewRelicDashboardAvailable } from './Router';

workspaces/newrelic/plugins/newrelic-dashboard/src/plugin.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,6 @@ export const DashboardSnapshot = newRelicDashboardPlugin.provide(
9292
}),
9393
);
9494

95-
/**
96-
* Render dashboard snapshots from Newrelic in backstage. Use dashboards which have the tag `isDashboardPage: true`
97-
*
98-
* @deprecated
99-
* Use DashboardSnapshot export name instead
100-
*
101-
* @public
102-
*/
103-
export const DashboardSnapshotComponent = DashboardSnapshot;
104-
10595
/**
10696
* Render a dashboard snapshots list from Newrelic in backstage. Use dashboards which have the tag `isDashboardPage: true`
10797
*

workspaces/newrelic/plugins/newrelic/src/api/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { NewRelicApplication, NewRelicClient } from '.';
1818
import { DiscoveryApi } from '@backstage/core-plugin-api';
1919
import { rest } from 'msw';
2020
import { setupServer } from 'msw/node';
21-
import { MockFetchApi, setupRequestMockHandlers } from '@backstage/test-utils';
21+
import { MockFetchApi, registerMswTestHooks } from '@backstage/test-utils';
2222

2323
const mockedDiscoveryApi: DiscoveryApi = {
2424
getBaseUrl: async () => 'https://test.test',
@@ -30,7 +30,7 @@ beforeEach(() => {
3030

3131
describe('NewRelicClient', () => {
3232
const server = setupServer();
33-
setupRequestMockHandlers(server);
33+
registerMswTestHooks(server);
3434

3535
beforeEach(() => {
3636
server.resetHandlers();

0 commit comments

Comments
 (0)