From 5a477ce8344c98cf6fe4c51a4d35be6a0e5a3168 Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Tue, 5 Mar 2024 14:05:49 -0500 Subject: [PATCH 001/151] feat(apollo-explorer): allow callbacks using apiholder Signed-off-by: Karl Haworth --- plugins/apollo-explorer/package.json | 2 ++ .../ApolloExplorerPage/ApolloExplorerPage.tsx | 23 +++++++++++++++++-- yarn.lock | 4 +++- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/plugins/apollo-explorer/package.json b/plugins/apollo-explorer/package.json index cd7b3e6b51..563b16f951 100644 --- a/plugins/apollo-explorer/package.json +++ b/plugins/apollo-explorer/package.json @@ -36,7 +36,9 @@ "@backstage/core-components": "workspace:^", "@backstage/core-plugin-api": "workspace:^", "@material-ui/core": "^4.12.2", + "@material-ui/lab": "^4.0.0-alpha.61", "@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0", + "react-use": "^17.5.0", "use-deep-compare-effect": "^1.8.1" }, "devDependencies": { diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx index f90af9bc17..f6bda693b5 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx @@ -18,6 +18,10 @@ import React from 'react'; import { Content, Header, Page } from '@backstage/core-components'; import { ApolloExplorerBrowser } from '../ApolloExplorerBrowser'; import { JSONObject } from '@apollo/explorer/src/helpers/types'; +import { ApiHolder, useApiHolder } from '@backstage/core-plugin-api'; +import { useAsync } from 'react-use'; +import { CircularProgress } from '@material-ui/core'; +import { Alert } from '@material-ui/lab'; type EndpointProps = { title: string; @@ -35,19 +39,34 @@ type EndpointProps = { }; }; +type EndpointPropsCallback = (options: { + apiHolder: ApiHolder; +}) => Promise; + type Props = { title?: string | undefined; subtitle?: string | undefined; - endpoints: EndpointProps[]; + endpoints: EndpointProps[] | EndpointPropsCallback; }; export const ApolloExplorerPage = (props: Props) => { const { title, subtitle, endpoints } = props; + const apiHolder = useApiHolder(); + + const { value, loading, error } = useAsync(async () => { + if (typeof endpoints === 'function') { + return await endpoints({ apiHolder }); + } + return endpoints; + }, []); + return (
- + {loading && } + {error && {error?.message}} + {value && } ); diff --git a/yarn.lock b/yarn.lock index eb05400306..edfc9eadb9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4676,10 +4676,12 @@ __metadata: "@backstage/core-plugin-api": "workspace:^" "@backstage/dev-utils": "workspace:^" "@material-ui/core": ^4.12.2 + "@material-ui/lab": ^4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 "@testing-library/react": ^14.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 + react-use: ^17.5.0 use-deep-compare-effect: ^1.8.1 peerDependencies: react: ^16.13.1 || ^17.0.0 || ^18.0.0 @@ -40267,7 +40269,7 @@ __metadata: languageName: node linkType: hard -"react-use@npm:^17.2.4, react-use@npm:^17.3.1, react-use@npm:^17.3.2, react-use@npm:^17.4.0": +"react-use@npm:^17.2.4, react-use@npm:^17.3.1, react-use@npm:^17.3.2, react-use@npm:^17.4.0, react-use@npm:^17.5.0": version: 17.5.0 resolution: "react-use@npm:17.5.0" dependencies: From c664b15b37f937d7e93105b72d7b29484d2b61a2 Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Tue, 5 Mar 2024 14:11:42 -0500 Subject: [PATCH 002/151] add changeset Signed-off-by: Karl Haworth --- .changeset/warm-pugs-pretend.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/warm-pugs-pretend.md diff --git a/.changeset/warm-pugs-pretend.md b/.changeset/warm-pugs-pretend.md new file mode 100644 index 0000000000..f7adea6cc0 --- /dev/null +++ b/.changeset/warm-pugs-pretend.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-apollo-explorer': minor +--- + +feat(apollo-explorer): allow callbacks using apiholder From 626cf35c1806a504a2f0b1d26977e7bab56a9926 Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Tue, 5 Mar 2024 14:19:38 -0500 Subject: [PATCH 003/151] update readme for functionality improvements Signed-off-by: Karl Haworth --- plugins/apollo-explorer/README.md | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/plugins/apollo-explorer/README.md b/plugins/apollo-explorer/README.md index 23ea71e934..71cb76c592 100644 --- a/plugins/apollo-explorer/README.md +++ b/plugins/apollo-explorer/README.md @@ -69,3 +69,41 @@ That's it! You should now see an `Apollo Explorer` item in your sidebar, and if Once you authenticate, your graph is ready to use 🚀 ![Logged In](./docs/img/logged-in.png) + +### Authentication Tokens for Apollo Studio + +If you need to utilize an ApiRef to supply a token to Apollo, you may do so using an ApiHolder. + +In `packages/app/src/App.tsx` perform the following modifications from above. The import `ssoAuthApiRef` is used as an example + +```typescript +import { ApolloExplorerPage, EndpointProps } from '@backstage/plugin-apollo-explorer'; +import { ssoAuthApiRef } from '@backstage/devkit'; +import { ApiHolder } from '@backstage/core-plugin-api'; + + +async function apolloPluginEndpointsCallback(options: { apiHolder: ApiHolder }): Promise { + const sso = options.apiHolder.get(ssoAuthApiRef) + return [{ + title: 'Github', + graphRef: 'my-github-graph-ref@current', + initialState: { + headers: { + authorization: `Bearer ${await sso.getToken()}`, + }, + }, + }] +} + +const routes = ( + + {/* other routes... */} + + } + /> +``` From b90857e2ffc59fe823592d489fffad21c65db65e Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Tue, 5 Mar 2024 14:19:55 -0500 Subject: [PATCH 004/151] add exports to reduce duplication Signed-off-by: Karl Haworth --- .../apollo-explorer/src/components/ApolloExplorerPage/index.ts | 1 + plugins/apollo-explorer/src/index.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerPage/index.ts b/plugins/apollo-explorer/src/components/ApolloExplorerPage/index.ts index 8f62872fe6..0ecfb16ee5 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerPage/index.ts +++ b/plugins/apollo-explorer/src/components/ApolloExplorerPage/index.ts @@ -14,3 +14,4 @@ * limitations under the License. */ export { ApolloExplorerPage } from './ApolloExplorerPage'; +export type { EndpointProps } from './components/ApolloExplorerPage'; diff --git a/plugins/apollo-explorer/src/index.ts b/plugins/apollo-explorer/src/index.ts index 565557e79f..6d0be1311f 100644 --- a/plugins/apollo-explorer/src/index.ts +++ b/plugins/apollo-explorer/src/index.ts @@ -20,3 +20,4 @@ * @packageDocumentation */ export { apolloExplorerPlugin, ApolloExplorerPage } from './plugin'; +export type { EndpointProps } from './ApolloExplorerPage'; From 7a408f720b5e4e29131b04eaa41f0d1dfe3a7a06 Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Tue, 5 Mar 2024 14:24:09 -0500 Subject: [PATCH 005/151] update exports Signed-off-by: Karl Haworth --- .../src/components/ApolloExplorerPage/ApolloExplorerPage.tsx | 2 +- .../apollo-explorer/src/components/ApolloExplorerPage/index.ts | 2 +- plugins/apollo-explorer/src/index.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx index f6bda693b5..bb94c69063 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx @@ -23,7 +23,7 @@ import { useAsync } from 'react-use'; import { CircularProgress } from '@material-ui/core'; import { Alert } from '@material-ui/lab'; -type EndpointProps = { +export type EndpointProps = { title: string; graphRef: string; persistExplorerState?: boolean; diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerPage/index.ts b/plugins/apollo-explorer/src/components/ApolloExplorerPage/index.ts index 0ecfb16ee5..1eef091978 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerPage/index.ts +++ b/plugins/apollo-explorer/src/components/ApolloExplorerPage/index.ts @@ -14,4 +14,4 @@ * limitations under the License. */ export { ApolloExplorerPage } from './ApolloExplorerPage'; -export type { EndpointProps } from './components/ApolloExplorerPage'; +export type { EndpointProps } from './ApolloExplorerPage'; diff --git a/plugins/apollo-explorer/src/index.ts b/plugins/apollo-explorer/src/index.ts index 6d0be1311f..5911e246f0 100644 --- a/plugins/apollo-explorer/src/index.ts +++ b/plugins/apollo-explorer/src/index.ts @@ -20,4 +20,4 @@ * @packageDocumentation */ export { apolloExplorerPlugin, ApolloExplorerPage } from './plugin'; -export type { EndpointProps } from './ApolloExplorerPage'; +export type { EndpointProps } from './components/ApolloExplorerPage'; From 5fb1aa7fb1f5a439092673135389738336dfad4a Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Tue, 5 Mar 2024 15:19:50 -0500 Subject: [PATCH 006/151] update import for `useAsync` Signed-off-by: Karl Haworth --- .../src/components/ApolloExplorerPage/ApolloExplorerPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx index bb94c69063..a3ca428803 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx @@ -19,7 +19,7 @@ import { Content, Header, Page } from '@backstage/core-components'; import { ApolloExplorerBrowser } from '../ApolloExplorerBrowser'; import { JSONObject } from '@apollo/explorer/src/helpers/types'; import { ApiHolder, useApiHolder } from '@backstage/core-plugin-api'; -import { useAsync } from 'react-use'; +import useAsync from 'react-use/lib/useAsync'; import { CircularProgress } from '@material-ui/core'; import { Alert } from '@material-ui/lab'; From 347b45a63c5c15999422a51f5cf88032496731aa Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Tue, 5 Mar 2024 15:31:15 -0500 Subject: [PATCH 007/151] update api report Signed-off-by: Karl Haworth --- plugins/apollo-explorer/api-report.md | 40 +++++++++++++++------------ 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/plugins/apollo-explorer/api-report.md b/plugins/apollo-explorer/api-report.md index 7d06876e89..978d90d062 100644 --- a/plugins/apollo-explorer/api-report.md +++ b/plugins/apollo-explorer/api-report.md @@ -5,6 +5,7 @@ ```ts /// +import { ApiHolder } from '@backstage/core-plugin-api'; import { BackstagePlugin } from '@backstage/core-plugin-api'; import { JSONObject } from '@apollo/explorer/src/helpers/types'; import { JSX as JSX_2 } from 'react'; @@ -14,23 +15,9 @@ import { RouteRef } from '@backstage/core-plugin-api'; export const ApolloExplorerPage: (props: { title?: string | undefined; subtitle?: string | undefined; - endpoints: { - title: string; - graphRef: string; - persistExplorerState?: boolean | undefined; - initialState?: - | { - document?: string | undefined; - variables?: JSONObject | undefined; - headers?: Record | undefined; - displayOptions: { - docsPanelState?: 'closed' | 'open' | undefined; - showHeadersAndEnvVars?: boolean | undefined; - theme?: 'dark' | 'light' | undefined; - }; - } - | undefined; - }[]; + endpoints: + | EndpointProps[] + | ((options: { apiHolder: ApiHolder }) => Promise); }) => JSX_2.Element; // @public @@ -40,4 +27,23 @@ export const apolloExplorerPlugin: BackstagePlugin< }, {} >; + +// Warning: (ae-missing-release-tag) "EndpointProps" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export type EndpointProps = { + title: string; + graphRef: string; + persistExplorerState?: boolean; + initialState?: { + document?: string; + variables?: JSONObject; + headers?: Record; + displayOptions: { + docsPanelState?: 'open' | 'closed'; + showHeadersAndEnvVars?: boolean; + theme?: 'dark' | 'light'; + }; + }; +}; ``` From 3d0d57228966a99c9806361d0b6b5126c74963cd Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Tue, 5 Mar 2024 15:45:28 -0500 Subject: [PATCH 008/151] add required release tag for exporting of type Signed-off-by: Karl Haworth --- plugins/apollo-explorer/api-report.md | 4 +--- .../src/components/ApolloExplorerPage/ApolloExplorerPage.tsx | 5 +++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/apollo-explorer/api-report.md b/plugins/apollo-explorer/api-report.md index 978d90d062..b5bed224bc 100644 --- a/plugins/apollo-explorer/api-report.md +++ b/plugins/apollo-explorer/api-report.md @@ -28,9 +28,7 @@ export const apolloExplorerPlugin: BackstagePlugin< {} >; -// Warning: (ae-missing-release-tag) "EndpointProps" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) +// @public export type EndpointProps = { title: string; graphRef: string; diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx index a3ca428803..c0e4180909 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx @@ -23,6 +23,11 @@ import useAsync from 'react-use/lib/useAsync'; import { CircularProgress } from '@material-ui/core'; import { Alert } from '@material-ui/lab'; +/** + * Exports types to be used with {@link @backstage/apollo-explorer#ApolloExplorerPage}. + * + * @public + */ export type EndpointProps = { title: string; graphRef: string; From 5410d196c82d5f3e34761b9e37a41535c30475fc Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Tue, 5 Mar 2024 15:46:08 -0500 Subject: [PATCH 009/151] fix typo Signed-off-by: Karl Haworth --- .../src/components/ApolloExplorerPage/ApolloExplorerPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx index c0e4180909..0a0ea0ccdc 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx @@ -24,7 +24,7 @@ import { CircularProgress } from '@material-ui/core'; import { Alert } from '@material-ui/lab'; /** - * Exports types to be used with {@link @backstage/apollo-explorer#ApolloExplorerPage}. + * Export types to be used with {@link @backstage/apollo-explorer#ApolloExplorerPage}. * * @public */ From 86a6223c028b0e830d5834feb8bb98948a1db5f9 Mon Sep 17 00:00:00 2001 From: Anna Carolina <8171749+accezar@users.noreply.github.com> Date: Mon, 11 Mar 2024 13:24:20 -0300 Subject: [PATCH 010/151] docs(microsite): adding library check plugin to marketplace Signed-off-by: Anna Carolina <8171749+accezar@users.noreply.github.com> --- microsite/data/plugins/library-check.yaml | 10 ++++++++++ microsite/static/img/library-check-logo.png | Bin 0 -> 15306 bytes 2 files changed, 10 insertions(+) create mode 100644 microsite/data/plugins/library-check.yaml create mode 100644 microsite/static/img/library-check-logo.png diff --git a/microsite/data/plugins/library-check.yaml b/microsite/data/plugins/library-check.yaml new file mode 100644 index 0000000000..edd647cec1 --- /dev/null +++ b/microsite/data/plugins/library-check.yaml @@ -0,0 +1,10 @@ +--- +title: Library Check +author: anakrz +authorUrl: https://github.com/anakzr +category: Services +description: Check the status of project package or library based on main registries. +documentation: https://github.com/anakzr/backstage-plugin-library-check +iconUrl: /img/library-check-logo.png +npmPackageName: '@anakz/backstage-plugin-library-check' +addedDate: '2024-03-11' \ No newline at end of file diff --git a/microsite/static/img/library-check-logo.png b/microsite/static/img/library-check-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..299b1a01e842fd5e06c5e47454f5fc8e3b0ce237 GIT binary patch literal 15306 zcmd^m^;ebA*XIR6LRv&cLb|);(%sUX64K43QyQhaq(Qp7K|(q&NF&k`lG1bdzVED= z`4eX52NnzNx%)ZK?)dC*rT0>p=!EDH2n16`T3iJJLFjq>L46ATSG094xyD&zwJ?9M2ICR9{NQZ(L^Iw$f%7t5VFyKggu=_i0HPoeB*rSA$VW> zTQJK@wkv*o`;-K+Kt<;99#p2p;FmuYJ{bgZOc;R!fw*Hzph6&RA>>F9h=CX`A_P*I zgNgw0pHm8gK)S4HMIn$iuK(+gr-i{F5W$6vSFgzv8=HPei}Z^s2P;w1XLM3FB*2&< zf_SuvvhddsjD?mIDh{WDK6`U*wVUmCJn4z=27~Ge%KcVTdC&$g3#)UznzbXHYqe!G z1EyInwxUQ!(LWDOI@&;1gmDoqxl;@>8@N-E)oJKL;^LNtd_#y>c;-^M2gS(d`_7ox>=vZ=ncQc z^)J@qhSg_X6F`*E4;w=-#tp51$nx*$!WxMkaVf7$fT9;%cZA~bC7nwCZkyjV_R(f!*^ki-i)dl7*nEb+#;mxd^>F4OO< zqS}^qv;Q($`aS1i25eSZWbm^yg~@|aCW>%YHY$Qz6{S-@yffpZ$PhKb$qCEOs6m>o zVZ!;S<)30v)fi$n3(&HI`Rb4LW;(F`N+A~pcg97r!pYd|g{gMo{EUo)J7>|J3v+FA zgf%EWneZEKYRRAsEBS}b^a*-wxV9Qq+;f3s)8xg~wws`W52ckgV^6x&X+`}t%Je%N zEa{gs>N)C0KEsm6*kjQxZjsZ6l+Zm*x=-dwwYCw~2=U3fo+L?hod0la%`GkxP5WL} zYoVf)RPAjOJJ4wT_ZDYO5YX~te3o^;*j*8ae8vOLeW}r`co^J>|64q4Eb6f$qA_)e%293-THRKG`w6aQ>U4 zxz1E0m4~L=kIDGS?6i;SEZHx|_{`7QPyKxC#7EHJ9uO^{Pb^H)8TIEewk!KZo?NL_ zV?D@sQ}Q}r884S=>FsVf;o1-vV7_fN>`r4eLVR2Dt$*fh%7$Sg=Y12yTMBt4?QW8N zwqN_8&-^RE9bYz3Nup#}Nb{xqruh3~bJunv>ZHXopD4{NxrM>bo^_uQ(&A5!6v)GO zvS}@ZlyKg*I}#nhnr8g-ZMNokbK$?&UKJiZp0mv0c6G=Ss86jGMskb2%2izx-VI4e z5Ux-rD@tZ^RQi=oo^HIT)_qwGB#cQb%K9#RcvatHgwv}#cI8~d9qZd`a^A_~VFFCC zeQ#HZKA*7dP$MO!AR{G%Xz#xZv4<}NPL~{!zhQPDlW$h(h0geXTwcj|j_Z~NBY`Lg z<9=FMXrdC~_j7G>(KYrK)>%H+Uq!*krfpP3P3!xY25+zf-`mkEnqhKmWy^kgMiPN@ zHkFC@CDPk`e;kX~{wtal_s7g|dm>8FJ-6jL`no>z^OMAMjoPs%+06K4I|b^KpL=>q zT3?MrQI;-dc!#f*RXUF^HOg*cU<45L98{5`Hr&6z5`_@yKe6E@=ps6aM|?o8Kxynd z>iO7}t*I20%|jqAFL%#;yp>Hpg7TX&CvLD+IzJ=kAn8`*c3TW6-wrB1nZwG^eDF98 zL#HIZKSyA6L zSKN{2zM#V{kNeI`#N`(W&;*@8a-{d3G`F*>zL!is?5(9E**rfspB;%(Y))%egbK?3 zGv)*m#umjzH2YdlzQU3(;(~?@;Wj4PB#rZ~6gV54l@A z`9=seV4UhAo(ZCp^{F8Lt`hqnQ|b5=7|Ghx=f(c~vXKcao9=$K?7lbna1Vb&aF~O% z%-g<)&f_BKh@{ljJQKO;N9%<2Pny---)sR#xtGVcI4(#Ms5*^~X5UX=nx^hwUX~ws zIScQgHab!4WtwZ;)YTkKJ5w0HuNr$20xU_Vp3$k_e8BdZA#}F%M-Yr)LZ~~n|Kx9< zLF@C421S!hWQ>;)IGlC^3$wrel>E6{{kQrmeV@74TX?4~o5-Z^JL1t3$G@bC#^4|} zIB2En?Y{Ftd++{9H2hu77-C3Y`-t@Gv=8d<=D!~mxKU_qxYAi*fP==W-Yz@ATW2hn zSWTO=MiG^C6C~q!6r0D4i?<@w0W2foS{^|AC;Vtdcj^jo?GLYd>vyi?1XxLNT+9c} zrVH1(4AQ;JmMMx@qI#Tcv$^rfzL{AYf3a5&{C&V8pz`ts-%v0f1MjS3Fkb z*=qz7AGoW-z>LXz&6@>e4DDkBdE$M>Y{2q~ z52Tgh&do~ko@b%iC;loZy!-DU55M&2^26scrUOTBS9)&6c4+a*T%<)udg!FYQx~x? z%NjpsB4-QqGN*9y8?3@~ZT`R|fLdJUpynu`DSw80@29mK#~Ie*0`)A}iziD`pg+H% zWp|xMglqe^f`^ujT5E=lYZe*K&vo*n4(A34o&vw+%{a^rb6aZc2DEr`P}c?d;AIW` z`d+)g+P2PcbfGyk?LH?jhW$6vQ9@s@-UpY`W}Q z@7)_lEfD|GXvTGBzQkOy7!b7E@d0u0frq>M^~HH~rW92O!dtu50*Db27C3KfJf{C$ z$4GqEpfnc7#Lh}K4 z9URI9024#H>h+`rPUWqoWLl*{%IA;C07-2?vWAWO*HwH(U3uq4g=-ndz=I}4q1Fax z;<;uyWuUHiV@T!g+YF%C82C8>?liwSxr{(P^r9WDNVkS3 z^Ka=Xty8QCCoP1+l}nT`Ium{yIRWEK3*S!x(OHgnXshjimyHxcJANeRol+ROu6h zC=UncZnARByL6!0*15Nc#B#qL5ic8w7fCaSsL|xW%F$IFet)-eWy0RB6QuRxssD|Q zb+9R%GCNtdh2*^c#M4=0-l@!R=mV`N)*?736c9oNf={C|3+=g38s4cz)F_&L@DS?d*`oqj~@xo>+Qq7#{$KlAa?xhf1m!_ z-O*p7v2iPu#>nki2sqb9+U}xU$nSTJdxZWlQlUkF>0kMH$6p@XXB|lh8y}fI_wT4Y zRSLoommFKV4!ntMtbo~f*H}P=#l^*#Q@JB;|NNCSJ-Zett3AeyPzuG%-KxCmKe+Bu zBQ1`_c!3Hj-$}JDOG!9tbu+t#(}7dS5lT`95osA7ONLXJ`=1bnz1r*v=}zp zhx=0p8*s%(#k#B#;kG&gCl`Vw@r{fR-X9h%qcWCp5*uV{0!4yYgxd#5^K#A!!m40v z6RC2!j;(5d&6#yD^|GUamYG15Ps2~Dm}wz95$46QPNFS~1teP?wOit4??$1~f?~L? zqTXk1$6|#)*QIWFbU=0ux#c_ot}Tpu6?2_|=hszEnot|7wvol4f-&j_y_2~;BrB`kd5-@9g^Jm*>O}FhOhW3KE2VZUSMh%1 zAd`+tQiL{Mzu5qVB!1;69OF zD7j5<&+(k!&1hr3W;wDQX{l9$n4f3fuoj%HE>}`x_0U>24b$E;xinm$eZ>spDy_LX z3XzzSgZ#Ssl4;xw*Pg^EGk91j2pjkHUwFsey+mHEfSDGlq=cAF;LhhY))Q8kF|ou3 zdioHbi}jhjLK@c8&WiZ9QraeO01QJZ;Jd8I;?0%<>a#3gApZ(c+y-M+z4@Id`X@9? z4pL|(LyIGcD<`j{DyT02$0anxlv^nz!^523$hpLXLhIrDeWOj=%oIwM+r$fn55E8##TeWRq$x_AKq@RY@#YRaEYa-E(AOZ~cyL0h%^3 zTAT@Z7c%Eij?g}B_9uD!REOxFeH(llG=y9B#hL!(-d*)2XIXx4w9H4Lp@MrRvzY`Q z56NM6*cGhe9ty;*Q;WJzGjFq=udILA6Xy`ARq9GDZAMU_W&z~41Im@U?b_xOJb|{J zQ`i1KpYo~y64|z9SM$7!#KJ0LL$Y^yEyuFqkz??4u93*C>pp;-G8Y@KS5%e=|DWDB zi@FU6q0w?63?uW06|KtdIp)bndK;AkdX+4uoooI=wH@5>#82?=j2S~vl$UFvLbwGp z+lS@-9iQk^r(xv4Xn|Rnr{Sw4${k3WpkP<)8pfx+PmWvs&M3GuMljp$s(|e}d2O#0V zMc8+x<+^yCL#^l5uiluuA|8FN($P7mgySEiAixDIQuOT&1W{Uk>gB*4sYcZa-{+DV zw|0sE{?$Yw95n5%l3T^fT%Be=khvQMMMg;4!(X5Ey-kPctVCvw!yn4tRl*&2&#w|D zmA$Xw7;?iP{NJpaYP;?p#<022iKMM1>az2FIRF*?abv5RSb>IM_Sgm>G3rGI_xb1`_u#Xk|iUu$jn;P%{k>Ud7- zl5A)VtbKW-K;@D{T|2$qOx5>doj9j~?5t*y7QDciFeotYw@B)$2Z#s{Sp8x6WAF4c z3u8}Bx$u=E%S0%)*^xN-`!_tu9G*tt9PXJc6Q8z|#H@ZxEykvy)ZG1e$`qLaeDzgZ z5L3GUbEP1V0o4l7OcaTH)*e{P_!5GM`Slrv)X}Duv0}Kd{a@EU@--}cvI(Q~uV

CJYj3wJN*VMQ+{xBw86imN{}36PxQ0xG60>p*?K8=ORb*7mp2@sm$BXk1 zLR?=i6<-(g)l`WQO;)a#q+}%zR`IwzqQH9`eEWm2*kQFwa|PW!)l;f<0W zHmT$IPF&SAsiNfkU6lpuyGnlZqsi1Z? z?w{0@!NPTKVDBX;W>DDpGQEKyRrT}91+7Z3%GJ0K=0oaQySOL?UR+Fm1c8-CgOY2n z!gbk>CcN6;9MpQ}z}e{hxg!Vnua4@G8I2$)$6t3Jkh08}Hj2!eQ_3jsh$2VI9xYh;gS zjo6$ZzQVXCGre$};6+o}W)0T}oM(|-zVF3yBTF6pFV>2{DZPr(kHiQN7l_25s+$HU z!g9|6ykY$(*W z9iW^CxdmUdK;F_uJVxnQ442Msd&mNl2vS;6auxK$2O8n_w%BW(E6dxq26DN`tmhCY ziUjHeIzw!;Mxo-&a5|^&d&mya;{&bCFkNb!MK`u>`wyQ(G6K)PKuB^c)!pbV=v!}A z_2r4ecP>s`Kw?T+)6z=nOt6TD8>>b}kt6Kj=6FEeoB&d^a3o1J>O`Y(E(jLro7MHm zn!bN{W*|%bfS(pVkrG7Nrfce^5!USHQmpj0>1Nw)>)B9(6X2$Fj+zR%=g1d%m#aC5 zKNjfa@&~n7&x#3MRE7V=zQ4+RAV5blrDCTc2kIQoAO^we<`9Jti=iPpJo|rQER&&3 zQE5($;EoE$OBo+*O}n9p$2j24-ia~dS4TnkgZ`tk^rmGL5Nt4|@aND;pcS1E0Fx$% z5G8+7nQX5nGHeKR`kO^zy21;!8Sl@))P9@oiPoPy1sP(@C;S9u!$Bzde~8vmS5_ye z?4RyqpRA!O zqMAy5Zw0v&!A0!y!I!0KkM9T&WVseQ;Pn?f@KjcmWAR*YWJT6;kIQNf)!9y!R9wEh z{8Y#eHGl<=sTHXLGJs!Ya9#wGM=ss8#nyxfc3!m(4S1wMRkI~DJttvE0taWP&0z#!J!cPOu5%9ao3fj=WVULHTHby%1*d1>C{_Dj`|KC!X` z=hb`f$utBxdrkO*7eXxPmhZermIen#A`KjTK2^-UoM`AFeaz=tlmd5&vcUidf`dEx z&H1SKjDG?=FJ$37_c0m3z3{0|DYF$|!kj2YM1J)Oq)tI@YH~rH&5vO%zexzT?L_>i}y2}?P zOfzV1(6tM8idDLCIA*`p3snV?@;7C}tlc}VNT(e|@Ju?Lws_xG7=dQ!1Q;Gb6uIcr zET;-AuFv7ASnYxnJ)ezRIwj-vLo9iraARi3>A9a+%sfqd1; zy3`Mqa|rS=j5zU0RBaUHGyZgHV*0^UcDBY7s^<6=MzjX{st{~jmfKYB&7-3U>numl z1VJ=U#f@n)7c)>4656eX78bQB4wP0Hl_1}KjsY{ziSjQYq6^9{F|uh4i#`Xmq4%Ep zpWMQbBiV=V&nY{ly-S*R&s-Lv=Gj3H$UXl9GJm+~CyUm#{GTU}IaU>C{S3iM_iQ z%oYR@IQ}&3gy?k4+rzGxctkeS@q(B-@&+H7ThRKussr9wMC_x&+59OUN#Z7-O0>4} zG^M_q;IDj8sw#+%QmH1xd!;OYIfv2mCuigFkVEz#q&wezo7T#7P&e3DB;1Y&Sj3$w z0U}QxKd;K$Np`gl4_OGAU_VNBc^*cQ^sh}CRJ&ROkbZFB>7npXG^n0q_41q#LEFE> zttRhv@`gOa>v9#ZPH|QYAdM%N`n!K!dFJ(jjdB^=Zv&qh! zZV{bKT<%7G7jnpHA~xjVL}3@VB$2D`DsBCuy*M38SB!eHoxw`jpiyz>Oy4dKxZ)x5E5xJvs`v9xO0A>ceMl%F-E zIC*}Jm>6AdQ*3)aPSc8UWJ*85^C+=|MJ;(eZTe4AZo zH}gmoWNpv*=u}fj`wQu(Mli687@<+ygwj4xEq zMxWPSPzaqeXNIGAJ_RrDUopGcaOJ3|YTlkH+zDQRm{GA%u3p=Ucy)LvImx|qe#;t> zv84oNH=+1=Bee;&m8}7kpGZ5j;U9y|d_@hDiE@7Lsnti3TFrgtMjo-ggwqr%AAk0} zmwgNh6Kay@C;i-p(?2B&OLeU1DvJ|>C@E2@xnOLLe`ctfbYYu-&Gw<&t7xnJlY2CvGY59QgIcwl44Z<&Z6-#?@U|SW9Z_^jLPm z*_Y`&D`Gzu| zCLVkqdqsCZ3;hOX#uIORi8{Z?mqy);p}zkQJ~K$j>B_tYW{ds-xadf>zHQ2pa);X*&Orh?>V?S7}KDgtp2{B$jATc z_lnu?v|$^qMEBh)2sDb&vm($@nSp){+X;7mc9fof|9(LdWDwXxHneIt8HSfpk76kH z@wTSdvHB*elQ-#%=mxw}Nqh6h?9L1Yo5kBEX(RE1Df;@cJLNU+6Lx21FP7f6ewDPW zj?}5WQwy_;iuVdhoqUQD)LP{mi{$EcM(VFgx`){Lg99KTrR|w7*x#V_f&0o?}wzRi0+eBs#H-Cz6dOIzS0XM zYC?=MsX7!uiH|B>62tar7NCo=D-VO#UZU86)*hs3-(gciC$Uv(|A+z~HEd@!(AvdP zw_DNWIO)O;CGZ{;OC_FJ_?hJ-%VXXTMR$PMMS{`?MD3}X5ye4q zi?Z2Kdu?7#=S+|!S0)A{2@9=*n&f^{N1xf2`JM3Go|CrJg;UHVhP8EA98V#3k>>p|VAfk>p$1gQY2lF)M!? zi)gX1-6-@4B$-M^#lqnF<3fg?|K9J&vW;&xQj;Q{3}%@t$;}NZbbSX$ziigrg|zw; zzQ5vrIuTWO&7YQjPxgXGa{{qa1{51+#KmId>_P>f>r-7SwxIj88DDf8x~zJB>*NiZx3fW~o$QMY0g{ix`jSqRcpl`T+z ztcZPlPu;$tt9Kti`-mx(L|kW-8OXI_h>M5o!J}=CH;ZYS`9ye?Qby&mc)O8}o_<%< z4O*(wC!8?&&zod9sxz@Gnd`#ev`>4#<>+RrlYmCPKRG42kaKh}^9w4!WGJnc6vBku zV-GdxH~m4|)f>>!FF<=AJ^5-N0I-lMwo5wiNS!%xVzOj7fl;O)uraQ>v@PvB6XFSv z>tfgAL;}7e)N<&lqP#{w;4BKkeB=QlQ=3JM0_42zSi?Hj7W5^XBl}zmsWaoKie1W? zlL5D8M0I?tOI|9CI{U4gldMM^R}@w9W!}u!BQ;7Pa9W71bhJK@*zAf$8NYFQz8Ie# z{zN-sWN>vU@V~ll(uE1C@uIToOfWU7(gH$lfy~meY^Vo?e#xluzeZMhmJGM|dD~h= zpmnz{^l8**8>*f}mAtrdLF>A99TG1#soL7|btCCSb(LYE}0nNov%e`r0iey zwKORfRgd++XnU|0@L%$JcJ55wQ``}bJkIegc0>-|!(#eE{JCfI462@g6oe9>>r8wUBGX(x;N%7awT8ON?rthMFB_blz~M0T>J9_UxZTZGR3-zj2_?PQMHKxkD7! zbt-B${9@a>^6NjkZ2s)Q*Eg>b{V$fA-<)4tHV$_u2^e_uG16x`QnrVX&&1eTn|zm< zrAv;w)cdyJAwrvJ1^_p9pxfsUL6`XUxNd zq*rue9JaNc5qI!t7=fTL?w*q9%q^GDf;scM#o8ZQ0Z`y(&&KeFX$Wrq7~nR(kjvXe zjfe>t98As1tYY+D*XopHoO=oZy{>%#2+Ez=C_Q)NQ}Ty~keizN$j{HH{fzvkA2{41 z7y0)A;$I1DI?a2b!y!z2aJsfP$Os7d8MWiVUffqNLf2H7|27$(EaH`8N(w z7%17OywvfZ;{jV@P(&9`GbF=S{>pMZ zTi0OJ`1S#T6^VjHhx2{RIjI1TF|u9YBR*&2Yj~??Uf(iD?iLBf4WB24DzIR?YsSH9>k+@&))a!Ly{o)2a-s8YK>qlK;rfNPx%cZ!+qe6S6CVF^EZ;T^_;KwV#NAhZ5j59kvFnz# z1u(sfGPCn^v-a&=ButbFRLqIAlwc05aQ3-d-l~-la5XWuw-QV2%D)=P$v-}K4d-Ef zM6@wEnsr4kv|$RlF?qB1y#&0N*);f=@6EkT*WRgqG_fm}tN}pdX`$qt4giw#Sy84U zlXpuMH*Wa_I13%B{VvUW($bqKWrHZTYJeAs_V+1<#NhLNfW=1~vZ z5Zl+zV>PZ?&X?-L#)4h8N+e)xA`bvL1q0uCKlowUbe)R%qwqV9mASgt+K-&1C;(X@ zEQ{ctOhnbA{W>f8Lh5%(O9CtRdY1GJVdaz#pN__~^`6*t+GOdB3bzS!hy#q!7V%$l zU#mI8;qt9I(azl}Z2SBW#x}>1t6#!$56LT7x~XH(XH_8E(rNtF{u8Ba3Z8{(DgGLf zCG59&dyRr={Ln3YA$9Q}rJj*G6h>_XDp|L_{*kP^JXn8-v&d*a@DdioF~fxld4w%Y z5#cL!!7zfyvC)#buCZR%=5^gs=bEq5G9eawzuoMe)Pu8|oB5lNubP<90fP_i{H^5+5uZ z4FQmP$r=D*pNV6akxyk2?dzS8jL$8(=FRx(mGf)olB ze)Tn92cO%q$Nh@lU~;7L#aD0cy=xdZdINn*mRKKfpgqkh(mAg+62*`MIJTvzya%Az zuR#63Gg3HT<>*JN>UIbG!q-Q67Ri#Gk8+k0RvdfLFkS}=0CcQSHmXRGYneV%2icG1 z(^Bh|+LxZ3CRGGWo5?IHZ7KVYaJ>cq*MoF|<%DqJQj-JKlG;w_Oo96hS0@1l0C^Kv zrb`YLv1hXQ5Ouba?lX3Q#+s3ps^0IN-Uw?iER2fo0~L}qhXtJzt^=Hb$lH;+i5`^Mr)kC-zF@zlotG%^i zhjT{JTKj>gKYn`~gYbTVu+wYs%dNpW1#>FTPx!B4wX8@XYjuHgMt3?{oF;V5pe_#v z6M~UV!K*Xpq+69j0 z9Uq%VN(_WSJ~(zwX%`K60U-u<-hQg_J>l8Sb<$9WDsfc4*NcX~R*JurT(;ZG+$NF(ME43zcSDzVan{ShsOycO-*RoJcH%~R1Kd}1_pe2fKqlVamE+C7I%op@`KVy84O?ko zDB$JC(7wW>sJn(m-Jc@+VwGt!+S}_TB9?_U5-$TA>NP*TX{3yRC87y0I)F7Cd;(tQ zeaHPzb5q_0g()$Loc~IS&(LJ%M$xJl2_AQ0z&71lebIC38U1q`Ru-4_?E@9C*+8Aq z$l#^6CIt49f*$vhj1T~=Mlv?W-{RBfs}FnX8`Ram#%I?DPq)rPdwd%}Zto8^^16h2 zC|2$r&ByQYA&xI|(&2-`9Qsrtd%u7Rr#H^%&l43>@-EZ93KA zJgJR*p-9kl*Ua{T#x)#e=Pl?rM!*NePD+{ zwINUb^#Z(`paBb8?@?Evl3%A3hFpq!wjUZsU%$ODXyM!oJkr{NOlWFZ<7Yo#p(nlV zSsZB1zaofmxqoAp4ASQk)pm11vt>RUD%5O2J+RC-czZnOEAK@A+L>9}s_fu0&2@=x zUwPjkha*`$!Rn?Rg7J9yK!6%dcZy@@&iGpl8*-cd6XXqW(2|BVCBE`|js257e|y2k z9^CTe7UB&!GV#gQ+W617OvOW-iS~1EQ{lkimhD{?tNb%&Zo5MY$A4bVJumaPQgI=6 zU>nn7GOE7xd*j~F3PVg{dy0wjhOP|-7gKHG8}$X+Z`$4umtUpd0|fcoM)cU8qNV)F z_U^W_qN;tVqrNij0a`%_3)sSYH6QZ|cY-n5l}jbATA215H#>njvld?HwhsgYd<=Fy mS$z=yf7t~6- Date: Mon, 11 Mar 2024 13:56:07 -0300 Subject: [PATCH 011/151] docs(microsite): fixed dot and re-run prettier Signed-off-by: Anna Carolina <8171749+accezar@users.noreply.github.com> --- microsite/data/plugins/library-check.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microsite/data/plugins/library-check.yaml b/microsite/data/plugins/library-check.yaml index edd647cec1..fdd2db1cd4 100644 --- a/microsite/data/plugins/library-check.yaml +++ b/microsite/data/plugins/library-check.yaml @@ -1,9 +1,9 @@ --- title: Library Check -author: anakrz +author: anakzr authorUrl: https://github.com/anakzr category: Services -description: Check the status of project package or library based on main registries. +description: Check the status of project package or library based on main registries documentation: https://github.com/anakzr/backstage-plugin-library-check iconUrl: /img/library-check-logo.png npmPackageName: '@anakz/backstage-plugin-library-check' From b0fcb2d8a3e3267ab395ed4f9fec84a3b40dbb22 Mon Sep 17 00:00:00 2001 From: Anna Carolina <8171749+accezar@users.noreply.github.com> Date: Mon, 11 Mar 2024 14:17:32 -0300 Subject: [PATCH 012/151] docs(microsite): fixed missed endline on plugin .yaml file declaration Signed-off-by: Anna Carolina <8171749+accezar@users.noreply.github.com> --- microsite/data/plugins/library-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsite/data/plugins/library-check.yaml b/microsite/data/plugins/library-check.yaml index fdd2db1cd4..68489d676f 100644 --- a/microsite/data/plugins/library-check.yaml +++ b/microsite/data/plugins/library-check.yaml @@ -7,4 +7,4 @@ description: Check the status of project package or library based on main regist documentation: https://github.com/anakzr/backstage-plugin-library-check iconUrl: /img/library-check-logo.png npmPackageName: '@anakz/backstage-plugin-library-check' -addedDate: '2024-03-11' \ No newline at end of file +addedDate: '2024-03-11' From 1f622289218f917dde15dce7a23848102d3e2d59 Mon Sep 17 00:00:00 2001 From: Karl Haworth <58607256+karlhaworth@users.noreply.github.com> Date: Wed, 13 Mar 2024 06:35:38 -0400 Subject: [PATCH 013/151] Update plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx Co-authored-by: Vincenzo Scamporlino Signed-off-by: Karl Haworth <58607256+karlhaworth@users.noreply.github.com> --- .../src/components/ApolloExplorerPage/ApolloExplorerPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx index 0a0ea0ccdc..a3eb44362a 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx @@ -63,7 +63,7 @@ export const ApolloExplorerPage = (props: Props) => { return await endpoints({ apiHolder }); } return endpoints; - }, []); + }, [endpoints]); return ( From 24d302fce045e45a7cc20c43f146efe6e315371b Mon Sep 17 00:00:00 2001 From: Zach Hammer Date: Wed, 20 Mar 2024 12:55:33 -0400 Subject: [PATCH 014/151] Only hide EntityAutocompletePicker if there are no options Signed-off-by: Zach Hammer --- .../EntityAutocompletePicker.test.tsx | 50 +++++++++++++++++++ .../EntityAutocompletePicker.tsx | 4 +- 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.test.tsx b/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.test.tsx index 94af52f374..0516267041 100644 --- a/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.test.tsx +++ b/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.test.tsx @@ -88,6 +88,56 @@ describe('', () => { }); }); + it('hides filter if there are no available options', async () => { + const mockCatalogApiNoOptions: Partial> = { + getEntityFacets: jest.fn().mockResolvedValue({ + facets: { + 'spec.options': [], + }, + }), + }; + render( + + + + label="Options" + path="spec.options" + name="options" + Filter={EntityOptionFilter} + /> + + , + ); + await waitFor(() => { + expect(screen.queryByText('Options')).not.toBeInTheDocument(); + }); + }); + + it('renders filter if there is one available option', async () => { + const mockCatalogApiOneOption: Partial> = { + getEntityFacets: jest.fn().mockResolvedValue({ + facets: { + 'spec.options': [{ value: 'option1', count: 1 }], + }, + }), + }; + render( + + + + label="Options" + path="spec.options" + name="options" + Filter={EntityOptionFilter} + /> + + , + ); + await waitFor(() => { + expect(screen.queryByText('Options')).toBeInTheDocument(); + }); + }); + it('renders unique options in alphabetical order', async () => { render( diff --git a/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx b/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx index 5e5bedaceb..a9b96f7e70 100644 --- a/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx +++ b/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx @@ -144,8 +144,8 @@ export function EntityAutocompletePicker< return null; } - // Hide if there are 1 or fewer options; nothing to pick from - if (availableOptions.length <= 1) return null; + // Hide if there are no options; nothing to pick from + if (availableOptions.length === 0) return null; return ( From ddf05c64932119575b434d523e0ac0364baa8dd6 Mon Sep 17 00:00:00 2001 From: Karl Haworth <58607256+karlhaworth@users.noreply.github.com> Date: Mon, 1 Apr 2024 07:20:27 -0400 Subject: [PATCH 015/151] add type Co-authored-by: Patrik Oldsberg Signed-off-by: Karl Haworth <58607256+karlhaworth@users.noreply.github.com> --- plugins/apollo-explorer/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/apollo-explorer/README.md b/plugins/apollo-explorer/README.md index 71cb76c592..78c8920814 100644 --- a/plugins/apollo-explorer/README.md +++ b/plugins/apollo-explorer/README.md @@ -83,7 +83,7 @@ import { ApiHolder } from '@backstage/core-plugin-api'; async function apolloPluginEndpointsCallback(options: { apiHolder: ApiHolder }): Promise { - const sso = options.apiHolder.get(ssoAuthApiRef) + const sso = options.apiHolder.get(ssoAuthApiRef) return [{ title: 'Github', graphRef: 'my-github-graph-ref@current', From b863830aaa060c913b6424c1ff572a1b5dd0394b Mon Sep 17 00:00:00 2001 From: Zach Hammer Date: Wed, 20 Mar 2024 13:00:10 -0400 Subject: [PATCH 016/151] Add changeset Signed-off-by: Zach Hammer --- .changeset/moody-rice-jump.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/moody-rice-jump.md diff --git a/.changeset/moody-rice-jump.md b/.changeset/moody-rice-jump.md new file mode 100644 index 0000000000..00e71aa2af --- /dev/null +++ b/.changeset/moody-rice-jump.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-react': patch +--- + +Change behavior in EntityAutoCompletePicker to only hide filter if there are no available options. Previously the filter was hidden if there were <= 1 available options. From dd6b3f01c8ea4a7e849e433642dd520fa406d2cf Mon Sep 17 00:00:00 2001 From: Zach Hammer Date: Mon, 1 Apr 2024 17:01:08 -0400 Subject: [PATCH 017/151] remove redundant line Signed-off-by: Zach Hammer --- .../EntityAutocompletePicker/EntityAutocompletePicker.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx b/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx index a9b96f7e70..590a896a06 100644 --- a/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx +++ b/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx @@ -144,9 +144,6 @@ export function EntityAutocompletePicker< return null; } - // Hide if there are no options; nothing to pick from - if (availableOptions.length === 0) return null; - return ( From fecdba04d0f6b451bccdc217fc9e4896fd9378a8 Mon Sep 17 00:00:00 2001 From: Zach Hammer Date: Mon, 1 Apr 2024 17:09:50 -0400 Subject: [PATCH 018/151] refactor mock catalog api gen into function Signed-off-by: Zach Hammer --- .../EntityAutocompletePicker.test.tsx | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.test.tsx b/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.test.tsx index 0516267041..26dee40ec3 100644 --- a/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.test.tsx +++ b/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.test.tsx @@ -30,7 +30,7 @@ interface EntityFilters extends DefaultEntityFilters { options?: EntityOptionFilter; } -const options = ['option1', 'option2', 'option3', 'option4']; +const defaultOptions = ['option1', 'option2', 'option3', 'option4']; class EntityOptionFilter implements EntityFilter { constructor(readonly values: string[]) {} @@ -46,20 +46,25 @@ class EntityOptionFilter implements EntityFilter { } } -describe('', () => { - const mockCatalogApi: Partial> = { +const makeMockCatalogApi = ( + opts: string[] = defaultOptions, +): Partial> => { + return { getEntityFacets: jest.fn().mockResolvedValue({ facets: { - 'spec.options': options.map((value, idx) => ({ value, count: idx })), + 'spec.options': opts.map((value, idx) => ({ value, count: idx })), }, }), }; +}; +describe('', () => { beforeEach(() => { jest.clearAllMocks(); }); it('renders all options', async () => { + const mockCatalogApi = makeMockCatalogApi(); render( @@ -83,21 +88,15 @@ describe('', () => { }); fireEvent.click(screen.getByTestId('options-picker-expand')); - options.forEach(option => { + defaultOptions.forEach(option => { expect(screen.getByText(option)).toBeInTheDocument(); }); }); it('hides filter if there are no available options', async () => { - const mockCatalogApiNoOptions: Partial> = { - getEntityFacets: jest.fn().mockResolvedValue({ - facets: { - 'spec.options': [], - }, - }), - }; + const mockCatalogApi = makeMockCatalogApi([]); render( - + label="Options" @@ -114,15 +113,9 @@ describe('', () => { }); it('renders filter if there is one available option', async () => { - const mockCatalogApiOneOption: Partial> = { - getEntityFacets: jest.fn().mockResolvedValue({ - facets: { - 'spec.options': [{ value: 'option1', count: 1 }], - }, - }), - }; + const mockCatalogApi = makeMockCatalogApi(['option1']); render( - + label="Options" @@ -139,6 +132,7 @@ describe('', () => { }); it('renders unique options in alphabetical order', async () => { + const mockCatalogApi = makeMockCatalogApi(); render( @@ -166,6 +160,7 @@ describe('', () => { }); it('renders options with counts', async () => { + const mockCatalogApi = makeMockCatalogApi(); render( @@ -194,6 +189,7 @@ describe('', () => { }); it('respects the query parameter filter value', async () => { + const mockCatalogApi = makeMockCatalogApi(); const updateFilters = jest.fn(); const queryParameters = { options: ['option3'] }; render( @@ -222,6 +218,7 @@ describe('', () => { }); it('adds options to filters', async () => { + const mockCatalogApi = makeMockCatalogApi(); const updateFilters = jest.fn(); render( @@ -251,6 +248,7 @@ describe('', () => { }); it('removes options from filters', async () => { + const mockCatalogApi = makeMockCatalogApi(); const updateFilters = jest.fn(); render( @@ -284,6 +282,7 @@ describe('', () => { }); it('responds to external queryParameters changes', async () => { + const mockCatalogApi = makeMockCatalogApi(); const updateFilters = jest.fn(); const rendered = render( @@ -330,6 +329,7 @@ describe('', () => { }); it('filters available values by kind as default', async () => { + const mockCatalogApi = makeMockCatalogApi(); render( ', () => { }); it('can be supplied with filters for available values', async () => { + const mockCatalogApi = makeMockCatalogApi(); render( Date: Thu, 14 Mar 2024 12:51:12 +0100 Subject: [PATCH 019/151] chore: use colors from theme for notification's severity Signed-off-by: Marek Libra --- .../src/service/router.ts | 4 +-- .../src/api/NotificationsClient.ts | 2 +- .../NotificationsTable/SeverityIcon.tsx | 26 ++++++++++++++++--- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/plugins/notifications-backend/src/service/router.ts b/plugins/notifications-backend/src/service/router.ts index f9e87335ed..a1b7bb3eaf 100644 --- a/plugins/notifications-backend/src/service/router.ts +++ b/plugins/notifications-backend/src/service/router.ts @@ -213,9 +213,9 @@ export async function createRouter( } opts.createdAfter = new Date(sinceEpoch); } - if (req.query.minimal_severity) { + if (req.query.minimumSeverity) { opts.minimumSeverity = normalizeSeverity( - req.query.minimal_severity.toString(), + req.query.minimumSeverity.toString(), ); } diff --git a/plugins/notifications/src/api/NotificationsClient.ts b/plugins/notifications/src/api/NotificationsClient.ts index c4fffded9e..10ad58bd92 100644 --- a/plugins/notifications/src/api/NotificationsClient.ts +++ b/plugins/notifications/src/api/NotificationsClient.ts @@ -68,7 +68,7 @@ export class NotificationsClient implements NotificationsApi { queryString.append('createdAfter', options.createdAfter.toISOString()); } if (options?.minimumSeverity !== undefined) { - queryString.append('minimal_severity', options.minimumSeverity); + queryString.append('minimumSeverity', options.minimumSeverity); } const urlSegment = `?${queryString}`; diff --git a/plugins/notifications/src/components/NotificationsTable/SeverityIcon.tsx b/plugins/notifications/src/components/NotificationsTable/SeverityIcon.tsx index 37680db3c2..062c2ae5b7 100644 --- a/plugins/notifications/src/components/NotificationsTable/SeverityIcon.tsx +++ b/plugins/notifications/src/components/NotificationsTable/SeverityIcon.tsx @@ -19,21 +19,39 @@ import NormalIcon from '@material-ui/icons/CheckOutlined'; import CriticalIcon from '@material-ui/icons/ErrorOutline'; import HighIcon from '@material-ui/icons/WarningOutlined'; import LowIcon from '@material-ui/icons/InfoOutlined'; +import { makeStyles } from '@material-ui/core/styles'; + +const useStyles = makeStyles(theme => ({ + critical: { + color: theme.palette.status.error, + }, + high: { + color: theme.palette.status.warning, + }, + normal: { + color: theme.palette.status.ok, + }, + low: { + color: theme.palette.status.running, + }, +})); export const SeverityIcon = ({ severity, }: { severity?: NotificationSeverity; }) => { + const classes = useStyles(); + switch (severity) { case 'critical': - return ; + return ; case 'high': - return ; + return ; case 'low': - return ; + return ; case 'normal': default: - return ; + return ; } }; From 939b4ecead509718473c057f28dd6b2ffbfeaf03 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 1 Apr 2024 12:19:30 +0200 Subject: [PATCH 020/151] .changesets: added changesets for notifications changes Signed-off-by: Patrik Oldsberg --- .changeset/clean-drinks-poke.md | 6 ++++++ .changeset/wet-plants-help.md | 5 +++++ 2 files changed, 11 insertions(+) create mode 100644 .changeset/clean-drinks-poke.md create mode 100644 .changeset/wet-plants-help.md diff --git a/.changeset/clean-drinks-poke.md b/.changeset/clean-drinks-poke.md new file mode 100644 index 0000000000..9c57c3ac56 --- /dev/null +++ b/.changeset/clean-drinks-poke.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-notifications-backend': minor +'@backstage/plugin-notifications': minor +--- + +Notifications-backend URL query parameter changed from `minimal_severity` to `minimumSeverity`. diff --git a/.changeset/wet-plants-help.md b/.changeset/wet-plants-help.md new file mode 100644 index 0000000000..c497c68421 --- /dev/null +++ b/.changeset/wet-plants-help.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-notifications': patch +--- + +The severity icons now get their colors from the theme. From 7528e1f487552f213f391cede9329c431bf8f740 Mon Sep 17 00:00:00 2001 From: Joe Van Alstyne Date: Wed, 3 Apr 2024 16:32:34 +0900 Subject: [PATCH 021/151] enable custom config of `name` and `title` Signed-off-by: Joe Van Alstyne --- .../src/InternalOpenApiDocumentationProvider.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/catalog-backend-module-backstage-openapi/src/InternalOpenApiDocumentationProvider.ts b/plugins/catalog-backend-module-backstage-openapi/src/InternalOpenApiDocumentationProvider.ts index dd94000ad7..ff6e3d522c 100644 --- a/plugins/catalog-backend-module-backstage-openapi/src/InternalOpenApiDocumentationProvider.ts +++ b/plugins/catalog-backend-module-backstage-openapi/src/InternalOpenApiDocumentationProvider.ts @@ -229,13 +229,19 @@ export class InternalOpenApiDocumentationProvider implements EntityProvider { const pluginsToMerge = this.config.getStringArray( 'catalog.providers.backstageOpenapi.plugins', ); + const name = this.config.getOptionalString( + 'catalog.providers.backstageOpenapi.name', + ); + const title = this.config.getOptionalString( + 'catalog.providers.backstageOpenapi.title', + ); logger.info(`Loading specs from from ${pluginsToMerge}.`); const documentationEntity: ApiEntity = { apiVersion: 'backstage.io/v1beta1', kind: 'API', metadata: { - name: 'INTERNAL_instance_openapi_doc', - title: 'Your Backstage Instance documentation', + name: name ?? 'INTERNAL_instance_openapi_doc', + title: title ?? 'Your Backstage Instance documentation', annotations: { [ANNOTATION_LOCATION]: 'internal-package:@backstage/plugin-catalog-backend-module-backstage-openapi', From 5a079cd70d6bfdb70d40687089498cfdb95214dc Mon Sep 17 00:00:00 2001 From: Joe Van Alstyne Date: Wed, 3 Apr 2024 16:33:16 +0900 Subject: [PATCH 022/151] add new config options to README.md Signed-off-by: Joe Van Alstyne --- .../catalog-backend-module-backstage-openapi/README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/catalog-backend-module-backstage-openapi/README.md b/plugins/catalog-backend-module-backstage-openapi/README.md index a7f4727669..cd1c5f06c6 100644 --- a/plugins/catalog-backend-module-backstage-openapi/README.md +++ b/plugins/catalog-backend-module-backstage-openapi/README.md @@ -2,7 +2,7 @@ ## Summary -This module installs an entity provider that exports a single entity, your Backstage instance documentation, which merges as many backend plugins as you have defined in the config value `catalog.providers.openapi.plugins`. +This module installs an entity provider that exports a single entity, your Backstage instance documentation, which merges as many backend plugins as you have defined in the config value `catalog.providers.backstageOpenapi.plugins`. ## Notes @@ -10,7 +10,7 @@ This module installs an entity provider that exports a single entity, your Backs ## Installation -To your new backend file, add +To your new backend file, add: ```ts title="packages/backend/src/index.ts" backend.add( @@ -18,12 +18,14 @@ backend.add( ); ``` -Add a list of plugins to your config like, +Add a list of plugins (and optionally, a custom name/title) to your config like: ```yaml title="app-config.yaml" catalog: providers: - openapi: + backstageOpenapi: + name: 'internal_backstage_api' # Optional + title: 'Backstage API' # Optional plugins: - catalog - todo From 2e2167a8c589e1014cbd1f17096c7d80224e5d56 Mon Sep 17 00:00:00 2001 From: Joe Van Alstyne Date: Wed, 3 Apr 2024 16:43:44 +0900 Subject: [PATCH 023/151] changesets: minor bump Signed-off-by: Joe Van Alstyne --- .changeset/shaggy-books-mate.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/shaggy-books-mate.md diff --git a/.changeset/shaggy-books-mate.md b/.changeset/shaggy-books-mate.md new file mode 100644 index 0000000000..db1ca0bb09 --- /dev/null +++ b/.changeset/shaggy-books-mate.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-backstage-openapi': minor +--- + +The name and title of the returned openapi doc entity are now configurable From d9c317469d71d5c36f0798eed385110168da41fc Mon Sep 17 00:00:00 2001 From: Johannes Nicolai Date: Wed, 3 Apr 2024 17:57:19 +0200 Subject: [PATCH 024/151] Added link to GUI visualising OAS spec of software-catalog API * as a follow up to #23471 adding link to Postman workspace * workspace provides to visualize software-catalog API * workspace allows to try out API calls in browser Signed-off-by: Johannes Nicolai --- docs/features/software-catalog/api.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/features/software-catalog/api.md b/docs/features/software-catalog/api.md index 1a0eaaf485..d002b12015 100644 --- a/docs/features/software-catalog/api.md +++ b/docs/features/software-catalog/api.md @@ -7,6 +7,7 @@ description: The Software Catalog API The software catalog backend has a JSON based REST API, which can be leveraged by external systems. This page describes its shape and features. The OpenAPI spec for this API can be found [here](https://github.com/backstage/backstage/blob/master/plugins/catalog-backend/src/schema/openapi.yaml). +A UI visualizing the OpenAPI endpoints including the ability to try them out in the browser can be found [here](https://www.postman.com/backstage-io/workspace/catalog-api/overview). ## Overview From 89d9e2ee6c741e6a116dfaa4c9a37af25fc39d8d Mon Sep 17 00:00:00 2001 From: Joe Van Alstyne Date: Thu, 4 Apr 2024 16:23:48 +0900 Subject: [PATCH 025/151] feat: expand config options Signed-off-by: Joe Van Alstyne --- .../InternalOpenApiDocumentationProvider.ts | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/plugins/catalog-backend-module-backstage-openapi/src/InternalOpenApiDocumentationProvider.ts b/plugins/catalog-backend-module-backstage-openapi/src/InternalOpenApiDocumentationProvider.ts index ff6e3d522c..d55cb05a6d 100644 --- a/plugins/catalog-backend-module-backstage-openapi/src/InternalOpenApiDocumentationProvider.ts +++ b/plugins/catalog-backend-module-backstage-openapi/src/InternalOpenApiDocumentationProvider.ts @@ -229,19 +229,22 @@ export class InternalOpenApiDocumentationProvider implements EntityProvider { const pluginsToMerge = this.config.getStringArray( 'catalog.providers.backstageOpenapi.plugins', ); - const name = this.config.getOptionalString( - 'catalog.providers.backstageOpenapi.name', - ); - const title = this.config.getOptionalString( - 'catalog.providers.backstageOpenapi.title', - ); - logger.info(`Loading specs from from ${pluginsToMerge}.`); + + const getOverride = (key: string, fallbackValue: string = '') => { + return ( + this.config.getOptionalString( + `catalog.providers.backstageOpenapi.entityOverrides.${key}`, + ) ?? fallbackValue + ); + }; + + logger.info(`Loading specs from ${pluginsToMerge}.`); const documentationEntity: ApiEntity = { apiVersion: 'backstage.io/v1beta1', kind: 'API', metadata: { - name: name ?? 'INTERNAL_instance_openapi_doc', - title: title ?? 'Your Backstage Instance documentation', + name: getOverride('metadata.name', 'backstage_openapi_doc'), + title: getOverride('metadata.title', 'Backstage API Documentation'), annotations: { [ANNOTATION_LOCATION]: 'internal-package:@backstage/plugin-catalog-backend-module-backstage-openapi', @@ -250,9 +253,9 @@ export class InternalOpenApiDocumentationProvider implements EntityProvider { }, }, spec: { - type: 'openapi', - lifecycle: 'production', - owner: 'backstage', + type: getOverride('spec.type', 'openapi'), + lifecycle: getOverride('spec.lifecycle', 'production'), + owner: getOverride('spec.owner', 'backstage'), definition: JSON.stringify( await loadSpecs({ baseUrl: this.config.getString('backend.baseUrl'), From 2e22245e4528e5575544d6d73482f57a3c6f327c Mon Sep 17 00:00:00 2001 From: Joe Van Alstyne Date: Thu, 4 Apr 2024 16:24:37 +0900 Subject: [PATCH 026/151] chore: add config options to Config type Signed-off-by: Joe Van Alstyne --- .../config.d.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/plugins/catalog-backend-module-backstage-openapi/config.d.ts b/plugins/catalog-backend-module-backstage-openapi/config.d.ts index ce51640495..b7f197ca48 100644 --- a/plugins/catalog-backend-module-backstage-openapi/config.d.ts +++ b/plugins/catalog-backend-module-backstage-openapi/config.d.ts @@ -25,6 +25,20 @@ export interface Config { * A list of plugins, whose OpenAPI specs you want to collate in `InternalOpenApiDocumentationProvider`. */ plugins: string[]; + /** + * Options to ovveride the provided entity's default metadata and spec properties + */ + entityOverrides?: { + metadata?: { + name?: string; + title?: string; + }; + spec?: { + type?: string; + lifecycle?: string; + owner?: string; + }; + }; }; }; }; From 431dc50cd44f1f31764fb583513d624047338e24 Mon Sep 17 00:00:00 2001 From: Joe Van Alstyne Date: Thu, 4 Apr 2024 16:25:16 +0900 Subject: [PATCH 027/151] docs: add config options to example Signed-off-by: Joe Van Alstyne --- .../catalog-backend-module-backstage-openapi/README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/catalog-backend-module-backstage-openapi/README.md b/plugins/catalog-backend-module-backstage-openapi/README.md index cd1c5f06c6..8df5b5d6c9 100644 --- a/plugins/catalog-backend-module-backstage-openapi/README.md +++ b/plugins/catalog-backend-module-backstage-openapi/README.md @@ -18,18 +18,22 @@ backend.add( ); ``` -Add a list of plugins (and optionally, a custom name/title) to your config like: +Add a list of plugins and optional entity overrides to your config. For example: ```yaml title="app-config.yaml" catalog: providers: backstageOpenapi: - name: 'internal_backstage_api' # Optional - title: 'Backstage API' # Optional plugins: - catalog - todo - search + entityOverrides: # All optional + metadata: + name: 'my name' + title: 'my title' + spec: + owner: 'my team' ``` We will attempt to load each plugin's OpenAPI spec hosted at `${pluginRoute}/openapi.json`. These are automatically added if you are using `@backstage/backend-openapi-utils`'s `createValidatedOpenApiRouter`. From dee8dbf5060b3aaf8bf22ecd5e65ad932943cc8e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 4 Apr 2024 08:02:09 +0000 Subject: [PATCH 028/151] fix(deps): update material-ui monorepo Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 170 +++++++++++++++++++++++++++--------------------------- 1 file changed, 85 insertions(+), 85 deletions(-) diff --git a/yarn.lock b/yarn.lock index d96b24dbbe..85cbdfbdb3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3192,12 +3192,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.1, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.18.6, @babel/runtime@npm:^7.2.0, @babel/runtime@npm:^7.20.1, @babel/runtime@npm:^7.20.13, @babel/runtime@npm:^7.20.6, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.23.8, @babel/runtime@npm:^7.3.1, @babel/runtime@npm:^7.4.4, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.0, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.3, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": - version: 7.23.8 - resolution: "@babel/runtime@npm:7.23.8" +"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.1, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.18.6, @babel/runtime@npm:^7.2.0, @babel/runtime@npm:^7.20.1, @babel/runtime@npm:^7.20.13, @babel/runtime@npm:^7.20.6, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.23.9, @babel/runtime@npm:^7.3.1, @babel/runtime@npm:^7.4.4, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.0, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.3, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 0bd5543c26811153822a9f382fd39886f66825ff2a397a19008011376533747cd05c33a91f6248c0b8b0edf0448d7c167ebfba34786088f1b7eb11c65be7dfc3 + checksum: 2f27d4c0ffac7ae7999ac0385e1106f2a06992a8bdcbf3da06adcac7413863cd08c198c2e4e970041bbea849e17f02e1df18875539b6afba76c781b6b59a07c3 languageName: node linkType: hard @@ -11333,38 +11333,38 @@ __metadata: languageName: node linkType: hard -"@floating-ui/core@npm:^1.5.3": - version: 1.5.3 - resolution: "@floating-ui/core@npm:1.5.3" +"@floating-ui/core@npm:^1.0.0": + version: 1.6.0 + resolution: "@floating-ui/core@npm:1.6.0" dependencies: - "@floating-ui/utils": ^0.2.0 - checksum: 72af8563e1742791acee82e86f82a0fbca7445809988d31eea3fd5771909463aa7655a6cb001cc244f8fe3a9de600420257e4dfb887ca33e2a31ac47b52e39a2 + "@floating-ui/utils": ^0.2.1 + checksum: 2e25c53b0c124c5c9577972f8ae21d081f2f7895e6695836a53074463e8c65b47722744d6d2b5a993164936da006a268bcfe87fe68fd24dc235b1cb86bed3127 languageName: node linkType: hard -"@floating-ui/dom@npm:^1.5.4": - version: 1.5.4 - resolution: "@floating-ui/dom@npm:1.5.4" +"@floating-ui/dom@npm:^1.6.1": + version: 1.6.3 + resolution: "@floating-ui/dom@npm:1.6.3" dependencies: - "@floating-ui/core": ^1.5.3 + "@floating-ui/core": ^1.0.0 "@floating-ui/utils": ^0.2.0 - checksum: 5e6f05532ff4e6daf9f2d91534184d8f942ddb8fd260c2543a49bdf0c0ff69fd0867937ce1d023126008724ac238f8fc89b5e48f82cdf9f8355a1d04edd085bd + checksum: 81cbb18ece3afc37992f436e469e7fabab2e433248e46fff4302d12493a175b0c64310f8a971e6e1eda7218df28ace6b70237b0f3c22fe12a21bba05b5579555 languageName: node linkType: hard -"@floating-ui/react-dom@npm:^2.0.0, @floating-ui/react-dom@npm:^2.0.5": - version: 2.0.6 - resolution: "@floating-ui/react-dom@npm:2.0.6" +"@floating-ui/react-dom@npm:^2.0.0, @floating-ui/react-dom@npm:^2.0.8": + version: 2.0.8 + resolution: "@floating-ui/react-dom@npm:2.0.8" dependencies: - "@floating-ui/dom": ^1.5.4 + "@floating-ui/dom": ^1.6.1 peerDependencies: react: ">=16.8.0" react-dom: ">=16.8.0" - checksum: 3608537be6cae5f0442d3f826379b8e4a9ce5c4bdecf1d2b34e6709842d80444be1a00eca3641d680e2e6405d833092f58005d1b120a9d39ffd341c60b0c017c + checksum: 5da7f13a69281e38859a3203a608fe9de1d850b332b355c10c0c2427c7b7209a0374c10f6295b6577c1a70237af8b678340bd4cc0a4b1c66436a94755d81e526 languageName: node linkType: hard -"@floating-ui/utils@npm:^0.2.0": +"@floating-ui/utils@npm:^0.2.0, @floating-ui/utils@npm:^0.2.1": version: 0.2.1 resolution: "@floating-ui/utils@npm:0.2.1" checksum: 9ed4380653c7c217cd6f66ae51f20fdce433730dbc77f95b5abfb5a808f5fdb029c6ae249b4e0490a816f2453aa6e586d9a873cd157fdba4690f65628efc6e06 @@ -13147,14 +13147,14 @@ __metadata: languageName: node linkType: hard -"@mui/base@npm:5.0.0-beta.32": - version: 5.0.0-beta.32 - resolution: "@mui/base@npm:5.0.0-beta.32" +"@mui/base@npm:5.0.0-beta.40": + version: 5.0.0-beta.40 + resolution: "@mui/base@npm:5.0.0-beta.40" dependencies: - "@babel/runtime": ^7.23.8 - "@floating-ui/react-dom": ^2.0.5 - "@mui/types": ^7.2.13 - "@mui/utils": ^5.15.5 + "@babel/runtime": ^7.23.9 + "@floating-ui/react-dom": ^2.0.8 + "@mui/types": ^7.2.14 + "@mui/utils": ^5.15.14 "@popperjs/core": ^2.11.8 clsx: ^2.1.0 prop-types: ^15.8.1 @@ -13165,30 +13165,30 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 5f27be8914c072ffcbe6720de9aa6129180e68927657e8bcbc03a6f322d1ee6c6740a199d72ed0b490a7b29b79cc0c59d1e05a427089b17f4cbc9cc756e67506 + checksum: 9c084ee67de372411a71af5eca9a5367db9f5bce57bb43973629c522760fe64fa2a43d2934dccd24d6dcbcd0ed399c5fc5c461226c86104f5767de1c9b8deba2 languageName: node linkType: hard -"@mui/core-downloads-tracker@npm:^5.15.5": - version: 5.15.5 - resolution: "@mui/core-downloads-tracker@npm:5.15.5" - checksum: 4c9b1281ebe8d17d402e22f7f50c347c0b3918b1ed17af721f4de5ce282d90bc6d90fe9730595998b2bbb2f7ebe57fc55d4c858f31754fccdb606af472a59dc8 +"@mui/core-downloads-tracker@npm:^5.15.15": + version: 5.15.15 + resolution: "@mui/core-downloads-tracker@npm:5.15.15" + checksum: 3e99a04e03f66d5fa5f0c23cdce0f9fa2331ba08c99a75dc2347ccaa1c6ed520153e04aaeb0d613c9dca099a3e6242558a6284c33d93f95cc65e3243b17860bc languageName: node linkType: hard "@mui/material@npm:^5.12.2": - version: 5.15.5 - resolution: "@mui/material@npm:5.15.5" + version: 5.15.15 + resolution: "@mui/material@npm:5.15.15" dependencies: - "@babel/runtime": ^7.23.8 - "@mui/base": 5.0.0-beta.32 - "@mui/core-downloads-tracker": ^5.15.5 - "@mui/system": ^5.15.5 - "@mui/types": ^7.2.13 - "@mui/utils": ^5.15.5 + "@babel/runtime": ^7.23.9 + "@mui/base": 5.0.0-beta.40 + "@mui/core-downloads-tracker": ^5.15.15 + "@mui/system": ^5.15.15 + "@mui/types": ^7.2.14 + "@mui/utils": ^5.15.14 "@types/react-transition-group": ^4.4.10 clsx: ^2.1.0 - csstype: ^3.1.2 + csstype: ^3.1.3 prop-types: ^15.8.1 react-is: ^18.2.0 react-transition-group: ^4.4.5 @@ -13205,16 +13205,16 @@ __metadata: optional: true "@types/react": optional: true - checksum: dbfcb31810c674d9ab3b9145752433de3917d9c0d1b491bdff84c44b8f1124e8fe8ab04fa09b974b497983b7bd3011b86fb441ad365f979f971d3ddb46712060 + checksum: ee0dc22fc4d617f7cf69f2451b6d5139978e6c5319e3056e7719159aff786ee3b80abd07691e230371811d9b5b574aef4559d7855bfe2f8493d596d960a91ab7 languageName: node linkType: hard -"@mui/private-theming@npm:^5.15.5": - version: 5.15.5 - resolution: "@mui/private-theming@npm:5.15.5" +"@mui/private-theming@npm:^5.15.14": + version: 5.15.14 + resolution: "@mui/private-theming@npm:5.15.14" dependencies: - "@babel/runtime": ^7.23.8 - "@mui/utils": ^5.15.5 + "@babel/runtime": ^7.23.9 + "@mui/utils": ^5.15.14 prop-types: ^15.8.1 peerDependencies: "@types/react": ^17.0.0 || ^18.0.0 @@ -13222,17 +13222,17 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 3a5f7f190aa69a0ad69a34f77e54ee2fdcb088d21a61d4720b76d098d178e1c3f6a470fc5e7a30d351db10efbc062cb11af75b8789e2f38eaa2ca612bcb0f851 + checksum: 1b1ef54e8281c9b13fcc58f4c39682efc610946a68402283c19fcfbce8a7d7a231d61b536d6df9bf7a59a1426591bd403a453a59eb8efb9689437fb58554dc8c languageName: node linkType: hard -"@mui/styled-engine@npm:^5.15.5": - version: 5.15.5 - resolution: "@mui/styled-engine@npm:5.15.5" +"@mui/styled-engine@npm:^5.15.14": + version: 5.15.14 + resolution: "@mui/styled-engine@npm:5.15.14" dependencies: - "@babel/runtime": ^7.23.8 + "@babel/runtime": ^7.23.9 "@emotion/cache": ^11.11.0 - csstype: ^3.1.2 + csstype: ^3.1.3 prop-types: ^15.8.1 peerDependencies: "@emotion/react": ^11.4.1 @@ -13243,21 +13243,21 @@ __metadata: optional: true "@emotion/styled": optional: true - checksum: 42bb7f50ed33ec88f799bd90a00337689837ee0b2d603681fe69c9a14850e5ae1d037505365ce78cd564307cc2c0654c46cece8d9250adb21c77b1de316e3c45 + checksum: 23b45c859a4f0d2b10933d06a6082c0ff093f7b6d8d32a2bfe3a6e515fe46d7a38ca9e7150d45c025a2e98d963bae9a5991d131cf4748b62670075ef0fa321ed languageName: node linkType: hard "@mui/styles@npm:^5.14.18": - version: 5.15.5 - resolution: "@mui/styles@npm:5.15.5" + version: 5.15.15 + resolution: "@mui/styles@npm:5.15.15" dependencies: - "@babel/runtime": ^7.23.8 + "@babel/runtime": ^7.23.9 "@emotion/hash": ^0.9.1 - "@mui/private-theming": ^5.15.5 - "@mui/types": ^7.2.13 - "@mui/utils": ^5.15.5 + "@mui/private-theming": ^5.15.14 + "@mui/types": ^7.2.14 + "@mui/utils": ^5.15.14 clsx: ^2.1.0 - csstype: ^3.1.2 + csstype: ^3.1.3 hoist-non-react-statics: ^3.3.2 jss: ^10.10.0 jss-plugin-camel-case: ^10.10.0 @@ -13274,21 +13274,21 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: dc131c0e7763f7ac4fd96a1db3dd85abf59de5429a73f7cf9ed15d423fb9bb5883835c1951d36e8804da9ab2ed13d603ed349f12e7cd15885f8279d90d13511b + checksum: 5e436a8a22ae9a2e6fcb63ead3a6eff2092cc9731fce0b22d04ab9c67639a173a0e27fb617628e7720592862118a32248be458bedfabaf1de5448543a97b0307 languageName: node linkType: hard -"@mui/system@npm:^5.15.5": - version: 5.15.5 - resolution: "@mui/system@npm:5.15.5" +"@mui/system@npm:^5.15.15": + version: 5.15.15 + resolution: "@mui/system@npm:5.15.15" dependencies: - "@babel/runtime": ^7.23.8 - "@mui/private-theming": ^5.15.5 - "@mui/styled-engine": ^5.15.5 - "@mui/types": ^7.2.13 - "@mui/utils": ^5.15.5 + "@babel/runtime": ^7.23.9 + "@mui/private-theming": ^5.15.14 + "@mui/styled-engine": ^5.15.14 + "@mui/types": ^7.2.14 + "@mui/utils": ^5.15.14 clsx: ^2.1.0 - csstype: ^3.1.2 + csstype: ^3.1.3 prop-types: ^15.8.1 peerDependencies: "@emotion/react": ^11.5.0 @@ -13302,27 +13302,27 @@ __metadata: optional: true "@types/react": optional: true - checksum: 3f736f120d65fa14588cd7554a9ef63c9d4480716807d7ee5543b9f25d936b5ac0396a51a565c53b2905114fed5f94880c896f091e8d269260bfc53e8a8e2fb5 + checksum: 9ca96d5f66b2a9d6471909cc98c671eea5ec0a6d58a7ec071073b9e5200b95c3f017f0ca5cc946abc7f83074bd11830ca18f5e30bc98e25cd6ca217bd1b3a26f languageName: node linkType: hard -"@mui/types@npm:^7.2.13": - version: 7.2.13 - resolution: "@mui/types@npm:7.2.13" +"@mui/types@npm:^7.2.14": + version: 7.2.14 + resolution: "@mui/types@npm:7.2.14" peerDependencies: "@types/react": ^17.0.0 || ^18.0.0 peerDependenciesMeta: "@types/react": optional: true - checksum: 58dfc96f9654288519ff01d6b54e6a242f05cadad51210deb85710a81be4fa1501a116c8968e2614b16c748fc1f407dc23beeeeae70fa37fceb6c6de876ff70d + checksum: 615c9f9110933157f5d3c4fee69d6e70b98fc0d9ebc3b63079b6a1e23e6b389748687a25ab4ac15b56166fc228885da87c3929503b41fa322cfdee0f6d411206 languageName: node linkType: hard -"@mui/utils@npm:^5.14.15, @mui/utils@npm:^5.15.5": - version: 5.15.5 - resolution: "@mui/utils@npm:5.15.5" +"@mui/utils@npm:^5.14.15, @mui/utils@npm:^5.15.14": + version: 5.15.14 + resolution: "@mui/utils@npm:5.15.14" dependencies: - "@babel/runtime": ^7.23.8 + "@babel/runtime": ^7.23.9 "@types/prop-types": ^15.7.11 prop-types: ^15.8.1 react-is: ^18.2.0 @@ -13332,7 +13332,7 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: fe71ce69e23cb4c00886138da1422e4baa66959cd10f97b2aa00f7324a038b13084ea4a0da123774c0018f48ddb6ce4f3cb20a915ec3c5c1ff5495bf337f665f + checksum: 36543ba7e3b65fb3219ed27e8f1455aff15b47a74c9b642c63e60774e22baa6492a196079e72bcfa5a570421dab32160398f892110bd444428bcf8b266b11893 languageName: node linkType: hard @@ -24780,10 +24780,10 @@ __metadata: languageName: node linkType: hard -"csstype@npm:^3.0.2, csstype@npm:^3.1.2": - version: 3.0.9 - resolution: "csstype@npm:3.0.9" - checksum: 199f9af7e673f9f188525c3102a329d637ff46c52f6385a4427ff5cb17adcb736189150170a7af7c5701d18d7704bdad130273f4aa7e44c6c4f9967e6115dc93 +"csstype@npm:^3.0.2, csstype@npm:^3.1.2, csstype@npm:^3.1.3": + version: 3.1.3 + resolution: "csstype@npm:3.1.3" + checksum: 8db785cc92d259102725b3c694ec0c823f5619a84741b5c7991b8ad135dfaa66093038a1cc63e03361a6cd28d122be48f2106ae72334e067dd619a51f49eddf7 languageName: node linkType: hard From 84c4560c4fa9862a9560bbc7c9431875086b8d84 Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Thu, 4 Apr 2024 10:23:32 -0400 Subject: [PATCH 029/151] use authcallback method instead Signed-off-by: Karl Haworth --- .../ApolloExplorerBrowser.tsx | 45 ++++++++++++++++++- .../ApolloExplorerPage/ApolloExplorerPage.tsx | 27 +++++------ 2 files changed, 54 insertions(+), 18 deletions(-) diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx index 57f9eb7f8a..9f09ba9967 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx @@ -19,6 +19,8 @@ import { Divider, makeStyles, Tab, Tabs } from '@material-ui/core'; import { JSONObject } from '@apollo/explorer/src/helpers/types'; import { ApolloExplorer } from '@apollo/explorer/react'; import { Content } from '@backstage/core-components'; +import { ApiHolder } from '@backstage/core-plugin-api'; +import { HandleRequest } from '@apollo/explorer/src/helpers/postMessageRelayHelpers'; const useStyles = makeStyles(theme => ({ tabs: { @@ -53,9 +55,42 @@ export type ApolloEndpointProps = { type Props = { endpoints: ApolloEndpointProps[]; + authCallback?: () => Promise; + apiHolder?: ApiHolder; }; -export const ApolloExplorerBrowser = ({ endpoints }: Props) => { +export const handleAuthRequest = ({ + legacyIncludeCookies, + authCallback, +}: { + legacyIncludeCookies?: boolean; + authCallback: any; +}): HandleRequest => { + let cookies = {}; + if (legacyIncludeCookies) { + cookies = { credentials: 'include' }; + } else if (legacyIncludeCookies !== undefined) { + cookies = { credentials: 'omit' }; + } else { + cookies = {}; + } + + const handleRequestWithCookiePref: HandleRequest = async ( + endpointUrl, + options, + ) => + fetch(endpointUrl, { + ...options, + headers: { + ...options.headers, + Authorization: `Bearer ${await authCallback({})}`, + }, + ...cookies, + }); + return handleRequestWithCookiePref; +}; + +export const ApolloExplorerBrowser = ({ endpoints, authCallback }: Props) => { const classes = useStyles(); const [tabIndex, setTabIndex] = useState(0); @@ -76,6 +111,14 @@ export const ApolloExplorerBrowser = ({ endpoints }: Props) => { diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx index 0a0ea0ccdc..250b304fac 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx @@ -19,9 +19,6 @@ import { Content, Header, Page } from '@backstage/core-components'; import { ApolloExplorerBrowser } from '../ApolloExplorerBrowser'; import { JSONObject } from '@apollo/explorer/src/helpers/types'; import { ApiHolder, useApiHolder } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; -import { CircularProgress } from '@material-ui/core'; -import { Alert } from '@material-ui/lab'; /** * Export types to be used with {@link @backstage/apollo-explorer#ApolloExplorerPage}. @@ -44,34 +41,30 @@ export type EndpointProps = { }; }; -type EndpointPropsCallback = (options: { +export type authCallback = (options: { apiHolder: ApiHolder; -}) => Promise; +}) => Promise; type Props = { title?: string | undefined; subtitle?: string | undefined; - endpoints: EndpointProps[] | EndpointPropsCallback; + endpoints: EndpointProps[]; + authCallback: authCallback; }; export const ApolloExplorerPage = (props: Props) => { - const { title, subtitle, endpoints } = props; - const apiHolder = useApiHolder(); + const { title, subtitle, endpoints, authCallback } = props; - const { value, loading, error } = useAsync(async () => { - if (typeof endpoints === 'function') { - return await endpoints({ apiHolder }); - } - return endpoints; - }, []); + const apiHolder = useApiHolder(); return (
- {loading && } - {error && {error?.message}} - {value && } + authCallback({ apiHolder })} + /> ); From a03eb38ae8ea2413a57c31d0affa164eaa94be28 Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Thu, 4 Apr 2024 11:31:04 -0400 Subject: [PATCH 030/151] update readme for authCallback Signed-off-by: Karl Haworth --- plugins/apollo-explorer/README.md | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/plugins/apollo-explorer/README.md b/plugins/apollo-explorer/README.md index 78c8920814..258675f82d 100644 --- a/plugins/apollo-explorer/README.md +++ b/plugins/apollo-explorer/README.md @@ -74,25 +74,16 @@ Once you authenticate, your graph is ready to use 🚀 If you need to utilize an ApiRef to supply a token to Apollo, you may do so using an ApiHolder. -In `packages/app/src/App.tsx` perform the following modifications from above. The import `ssoAuthApiRef` is used as an example +In `packages/app/src/App.tsx` perform the following modifications from above. The import `ssoAuthApiRef` is used as an example and does not exist. ```typescript import { ApolloExplorerPage, EndpointProps } from '@backstage/plugin-apollo-explorer'; import { ssoAuthApiRef } from '@backstage/devkit'; import { ApiHolder } from '@backstage/core-plugin-api'; - -async function apolloPluginEndpointsCallback(options: { apiHolder: ApiHolder }): Promise { - const sso = options.apiHolder.get(ssoAuthApiRef) - return [{ - title: 'Github', - graphRef: 'my-github-graph-ref@current', - initialState: { - headers: { - authorization: `Bearer ${await sso.getToken()}`, - }, - }, - }] +async function authCallback(options: { apiHolder: ApiHolder }): Promise { + const sso = options.apiHolder.get(ssoAuthApiRef) + return await sso.getToken() } const routes = ( @@ -102,8 +93,12 @@ const routes = ( path="/apollo-explorer" element={ } + authCallback={authCallback} /> ``` From 7a4074d3adc0b76567b36803b611ee57f676c877 Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Thu, 4 Apr 2024 11:39:18 -0400 Subject: [PATCH 031/151] add exports Signed-off-by: Karl Haworth --- .../ApolloExplorerPage/ApolloExplorerPage.tsx | 13 ++++++++++--- .../src/components/ApolloExplorerPage/index.ts | 2 +- plugins/apollo-explorer/src/index.ts | 5 ++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx index 250b304fac..fbbced24d1 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx @@ -41,7 +41,12 @@ export type EndpointProps = { }; }; -export type authCallback = (options: { +/** + * Export types to be used with {@link @backstage/apollo-explorer#ApolloExplorerPage}. + * + * @public + */ +export type AuthCallback = (options: { apiHolder: ApiHolder; }) => Promise; @@ -49,7 +54,7 @@ type Props = { title?: string | undefined; subtitle?: string | undefined; endpoints: EndpointProps[]; - authCallback: authCallback; + authCallback?: AuthCallback; }; export const ApolloExplorerPage = (props: Props) => { @@ -63,7 +68,9 @@ export const ApolloExplorerPage = (props: Props) => { authCallback({ apiHolder })} + authCallback={ + authCallback ? () => authCallback({ apiHolder }) : undefined + } /> diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerPage/index.ts b/plugins/apollo-explorer/src/components/ApolloExplorerPage/index.ts index 1eef091978..3ca6d12fd0 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerPage/index.ts +++ b/plugins/apollo-explorer/src/components/ApolloExplorerPage/index.ts @@ -14,4 +14,4 @@ * limitations under the License. */ export { ApolloExplorerPage } from './ApolloExplorerPage'; -export type { EndpointProps } from './ApolloExplorerPage'; +export type { EndpointProps, AuthCallback } from './ApolloExplorerPage'; diff --git a/plugins/apollo-explorer/src/index.ts b/plugins/apollo-explorer/src/index.ts index 5911e246f0..471ec9e710 100644 --- a/plugins/apollo-explorer/src/index.ts +++ b/plugins/apollo-explorer/src/index.ts @@ -20,4 +20,7 @@ * @packageDocumentation */ export { apolloExplorerPlugin, ApolloExplorerPage } from './plugin'; -export type { EndpointProps } from './components/ApolloExplorerPage'; +export type { + EndpointProps, + AuthCallback, +} from './components/ApolloExplorerPage'; From 5cafdc8206ff43c6a2bad53b596b7588ad6eadb2 Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Thu, 4 Apr 2024 11:39:31 -0400 Subject: [PATCH 032/151] update api report Signed-off-by: Karl Haworth --- plugins/apollo-explorer/api-report.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/apollo-explorer/api-report.md b/plugins/apollo-explorer/api-report.md index b5bed224bc..df84f0e7d3 100644 --- a/plugins/apollo-explorer/api-report.md +++ b/plugins/apollo-explorer/api-report.md @@ -15,9 +15,8 @@ import { RouteRef } from '@backstage/core-plugin-api'; export const ApolloExplorerPage: (props: { title?: string | undefined; subtitle?: string | undefined; - endpoints: - | EndpointProps[] - | ((options: { apiHolder: ApiHolder }) => Promise); + endpoints: EndpointProps[]; + authCallback?: AuthCallback | undefined; }) => JSX_2.Element; // @public @@ -25,9 +24,15 @@ export const apolloExplorerPlugin: BackstagePlugin< { root: RouteRef; }, + {}, {} >; +// @public +export type AuthCallback = (options: { + apiHolder: ApiHolder; +}) => Promise; + // @public export type EndpointProps = { title: string; From 7da377383f7fe30ca5b89f782d348c1b9199d203 Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Thu, 4 Apr 2024 12:10:48 -0400 Subject: [PATCH 033/151] update api-report Signed-off-by: Karl Haworth --- plugins/apollo-explorer/api-report.md | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/apollo-explorer/api-report.md b/plugins/apollo-explorer/api-report.md index df84f0e7d3..bbd220ab49 100644 --- a/plugins/apollo-explorer/api-report.md +++ b/plugins/apollo-explorer/api-report.md @@ -24,7 +24,6 @@ export const apolloExplorerPlugin: BackstagePlugin< { root: RouteRef; }, - {}, {} >; From e31bacc553e2ed49a0aadcd6eab512bf6f5f6be1 Mon Sep 17 00:00:00 2001 From: secustor Date: Thu, 4 Apr 2024 19:15:57 +0200 Subject: [PATCH 034/151] feat(packages/backend-common): allows providing authentification in parameters Signed-off-by: secustor --- .changeset/tame-pianos-hunt.md | 5 +++++ .../src/util/ContainerRunner.ts | 16 ++++++++++++++ .../src/util/DockerContainerRunner.test.ts | 22 +++++++++++++++++++ .../src/util/DockerContainerRunner.ts | 19 ++++++++++------ 4 files changed, 55 insertions(+), 7 deletions(-) create mode 100644 .changeset/tame-pianos-hunt.md diff --git a/.changeset/tame-pianos-hunt.md b/.changeset/tame-pianos-hunt.md new file mode 100644 index 0000000000..b19f69a8b9 --- /dev/null +++ b/.changeset/tame-pianos-hunt.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-common': minor +--- + +Allow to provide authentification which in turn allows usage of private registries diff --git a/packages/backend-common/src/util/ContainerRunner.ts b/packages/backend-common/src/util/ContainerRunner.ts index 7dc12919b3..11d75bcd8d 100644 --- a/packages/backend-common/src/util/ContainerRunner.ts +++ b/packages/backend-common/src/util/ContainerRunner.ts @@ -16,6 +16,21 @@ import { Writable } from 'stream'; +/** + * Allows defining access credentials for a registry + * Follows dockerode auth configuration: + * {@link https://github.com/apocas/dockerode?tab=readme-ov-file#pull-from-private-repos} + * + * @public + */ +export interface DockerAuthentication { + username?: string; + password?: string; + auth?: string; + email?: string; + serveraddress?: string; +} + /** * Options passed to the {@link ContainerRunner.runContainer} method. * @@ -31,6 +46,7 @@ export type RunContainerOptions = { envVars?: Record; pullImage?: boolean; defaultUser?: boolean; + authentication?: DockerAuthentication; }; /** diff --git a/packages/backend-common/src/util/DockerContainerRunner.test.ts b/packages/backend-common/src/util/DockerContainerRunner.test.ts index 737bf3d178..dde4e48113 100644 --- a/packages/backend-common/src/util/DockerContainerRunner.test.ts +++ b/packages/backend-common/src/util/DockerContainerRunner.test.ts @@ -83,6 +83,28 @@ describe('DockerContainerRunner', () => { expect(mockDocker.run).toHaveBeenCalled(); }); + it('should pull the docker container with authentication', async () => { + await containerTaskApi.runContainer({ + imageName, + args, + authentication: { + auth: 'aaaaaaaaa', + }, + }); + + expect(mockDocker.pull).toHaveBeenCalledWith( + imageName, + { + authconfig: { + auth: 'aaaaaaaaa', + }, + }, + expect.any(Function), + ); + + expect(mockDocker.run).toHaveBeenCalled(); + }); + it('should not pull the docker container when pullImage is false', async () => { await containerTaskApi.runContainer({ imageName, diff --git a/packages/backend-common/src/util/DockerContainerRunner.ts b/packages/backend-common/src/util/DockerContainerRunner.ts index 986470eb98..675b618cab 100644 --- a/packages/backend-common/src/util/DockerContainerRunner.ts +++ b/packages/backend-common/src/util/DockerContainerRunner.ts @@ -47,6 +47,7 @@ export class DockerContainerRunner implements ContainerRunner { envVars = {}, pullImage = true, defaultUser = false, + authentication, } = options; // Show a better error message when Docker is unavailable. @@ -61,13 +62,17 @@ export class DockerContainerRunner implements ContainerRunner { if (pullImage) { await new Promise((resolve, reject) => { - this.dockerClient.pull(imageName, {}, (err, stream) => { - if (err) return reject(err); - stream.pipe(logStream, { end: false }); - stream.on('end', () => resolve()); - stream.on('error', (error: Error) => reject(error)); - return undefined; - }); + this.dockerClient.pull( + imageName, + { authconfig: authentication }, + (err, stream) => { + if (err) return reject(err); + stream.pipe(logStream, { end: false }); + stream.on('end', () => resolve()); + stream.on('error', (error: Error) => reject(error)); + return undefined; + }, + ); }); } From 5fad80cf78cfeccba52c5135956231d5f62c582b Mon Sep 17 00:00:00 2001 From: secustor Date: Thu, 4 Apr 2024 19:26:30 +0200 Subject: [PATCH 035/151] docs(packages/backend-common): changeset grammar Signed-off-by: secustor --- .changeset/tame-pianos-hunt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/tame-pianos-hunt.md b/.changeset/tame-pianos-hunt.md index b19f69a8b9..3ab3e88623 100644 --- a/.changeset/tame-pianos-hunt.md +++ b/.changeset/tame-pianos-hunt.md @@ -2,4 +2,4 @@ '@backstage/backend-common': minor --- -Allow to provide authentification which in turn allows usage of private registries +Allow providing authentication which in turn allows usage of private registries From a0f55a1217073f43c13a744d803ca11113bdbd42 Mon Sep 17 00:00:00 2001 From: secustor Date: Thu, 4 Apr 2024 19:37:46 +0200 Subject: [PATCH 036/151] docs(packages/backend-common): fix api report Signed-off-by: secustor --- packages/backend-common/api-report.md | 15 +++++++++++++++ packages/backend-common/src/util/index.ts | 6 +++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/packages/backend-common/api-report.md b/packages/backend-common/api-report.md index 55cb3b34dc..be9d3f5658 100644 --- a/packages/backend-common/api-report.md +++ b/packages/backend-common/api-report.md @@ -305,6 +305,20 @@ export type DatabaseManagerOptions = { logger?: LoggerService; }; +// @public +export interface DockerAuthentication { + // (undocumented) + auth?: string; + // (undocumented) + email?: string; + // (undocumented) + password?: string; + // (undocumented) + serveraddress?: string; + // (undocumented) + username?: string; +} + // @public export class DockerContainerRunner implements ContainerRunner { constructor(options: { dockerClient: Docker }); @@ -740,6 +754,7 @@ export type RunContainerOptions = { envVars?: Record; pullImage?: boolean; defaultUser?: boolean; + authentication?: DockerAuthentication; }; export { SearchOptions }; diff --git a/packages/backend-common/src/util/index.ts b/packages/backend-common/src/util/index.ts index 3e7b762519..5767653253 100644 --- a/packages/backend-common/src/util/index.ts +++ b/packages/backend-common/src/util/index.ts @@ -14,7 +14,11 @@ * limitations under the License. */ -export type { ContainerRunner, RunContainerOptions } from './ContainerRunner'; +export type { + ContainerRunner, + RunContainerOptions, + DockerAuthentication, +} from './ContainerRunner'; export { DockerContainerRunner } from './DockerContainerRunner'; export type { KubernetesContainerRunnerOptions, From 5b02d00f2e149adbbb303c124faa19e0dc992c46 Mon Sep 17 00:00:00 2001 From: secustor Date: Thu, 4 Apr 2024 21:54:45 +0200 Subject: [PATCH 037/151] refactor(packages/backend-common): allow supplying generic options to pull images Signed-off-by: secustor --- packages/backend-common/api-report.md | 31 ++++++++++--------- .../src/util/ContainerRunner.ts | 18 ++++++----- .../src/util/DockerContainerRunner.test.ts | 6 ++-- .../src/util/DockerContainerRunner.ts | 20 +++++------- packages/backend-common/src/util/index.ts | 2 +- 5 files changed, 40 insertions(+), 37 deletions(-) diff --git a/packages/backend-common/api-report.md b/packages/backend-common/api-report.md index be9d3f5658..888bc1639c 100644 --- a/packages/backend-common/api-report.md +++ b/packages/backend-common/api-report.md @@ -305,20 +305,6 @@ export type DatabaseManagerOptions = { logger?: LoggerService; }; -// @public -export interface DockerAuthentication { - // (undocumented) - auth?: string; - // (undocumented) - email?: string; - // (undocumented) - password?: string; - // (undocumented) - serveraddress?: string; - // (undocumented) - username?: string; -} - // @public export class DockerContainerRunner implements ContainerRunner { constructor(options: { dockerClient: Docker }); @@ -656,6 +642,21 @@ export { PluginDatabaseManager }; export { PluginEndpointDiscovery }; +// @public +export interface PullOptions { + // (undocumented) + [key: string]: unknown; + // (undocumented) + authconfig?: { + username?: string; + password?: string; + auth?: string; + email?: string; + serveraddress?: string; + [key: string]: unknown; + }; +} + // @public export type ReaderFactory = (options: { config: Config; @@ -754,7 +755,7 @@ export type RunContainerOptions = { envVars?: Record; pullImage?: boolean; defaultUser?: boolean; - authentication?: DockerAuthentication; + pullOptions?: PullOptions; }; export { SearchOptions }; diff --git a/packages/backend-common/src/util/ContainerRunner.ts b/packages/backend-common/src/util/ContainerRunner.ts index 11d75bcd8d..351a5da613 100644 --- a/packages/backend-common/src/util/ContainerRunner.ts +++ b/packages/backend-common/src/util/ContainerRunner.ts @@ -23,12 +23,16 @@ import { Writable } from 'stream'; * * @public */ -export interface DockerAuthentication { - username?: string; - password?: string; - auth?: string; - email?: string; - serveraddress?: string; +export interface PullOptions { + authconfig?: { + username?: string; + password?: string; + auth?: string; + email?: string; + serveraddress?: string; + [key: string]: unknown; + }; + [key: string]: unknown; } /** @@ -46,7 +50,7 @@ export type RunContainerOptions = { envVars?: Record; pullImage?: boolean; defaultUser?: boolean; - authentication?: DockerAuthentication; + pullOptions?: PullOptions; }; /** diff --git a/packages/backend-common/src/util/DockerContainerRunner.test.ts b/packages/backend-common/src/util/DockerContainerRunner.test.ts index dde4e48113..f5d0e18480 100644 --- a/packages/backend-common/src/util/DockerContainerRunner.test.ts +++ b/packages/backend-common/src/util/DockerContainerRunner.test.ts @@ -87,8 +87,10 @@ describe('DockerContainerRunner', () => { await containerTaskApi.runContainer({ imageName, args, - authentication: { - auth: 'aaaaaaaaa', + pullOptions: { + authconfig: { + auth: 'aaaaaaaaa', + }, }, }); diff --git a/packages/backend-common/src/util/DockerContainerRunner.ts b/packages/backend-common/src/util/DockerContainerRunner.ts index 675b618cab..89a17fff51 100644 --- a/packages/backend-common/src/util/DockerContainerRunner.ts +++ b/packages/backend-common/src/util/DockerContainerRunner.ts @@ -47,7 +47,7 @@ export class DockerContainerRunner implements ContainerRunner { envVars = {}, pullImage = true, defaultUser = false, - authentication, + pullOptions = {}, } = options; // Show a better error message when Docker is unavailable. @@ -62,17 +62,13 @@ export class DockerContainerRunner implements ContainerRunner { if (pullImage) { await new Promise((resolve, reject) => { - this.dockerClient.pull( - imageName, - { authconfig: authentication }, - (err, stream) => { - if (err) return reject(err); - stream.pipe(logStream, { end: false }); - stream.on('end', () => resolve()); - stream.on('error', (error: Error) => reject(error)); - return undefined; - }, - ); + this.dockerClient.pull(imageName, pullOptions, (err, stream) => { + if (err) return reject(err); + stream.pipe(logStream, { end: false }); + stream.on('end', () => resolve()); + stream.on('error', (error: Error) => reject(error)); + return undefined; + }); }); } diff --git a/packages/backend-common/src/util/index.ts b/packages/backend-common/src/util/index.ts index 5767653253..39bade08be 100644 --- a/packages/backend-common/src/util/index.ts +++ b/packages/backend-common/src/util/index.ts @@ -17,7 +17,7 @@ export type { ContainerRunner, RunContainerOptions, - DockerAuthentication, + PullOptions, } from './ContainerRunner'; export { DockerContainerRunner } from './DockerContainerRunner'; export type { From af8e0e63315da46021d287d28cce62ee0ad2bbb2 Mon Sep 17 00:00:00 2001 From: Joe Van Alstyne Date: Fri, 5 Apr 2024 15:12:30 +0900 Subject: [PATCH 038/151] Update plugins/catalog-backend-module-backstage-openapi/config.d.ts Co-authored-by: Aramis Sennyey <159921952+aramissennyeydd@users.noreply.github.com> Signed-off-by: Joe Van Alstyne --- .../config.d.ts | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/plugins/catalog-backend-module-backstage-openapi/config.d.ts b/plugins/catalog-backend-module-backstage-openapi/config.d.ts index b7f197ca48..e403010951 100644 --- a/plugins/catalog-backend-module-backstage-openapi/config.d.ts +++ b/plugins/catalog-backend-module-backstage-openapi/config.d.ts @@ -28,17 +28,10 @@ export interface Config { /** * Options to ovveride the provided entity's default metadata and spec properties */ - entityOverrides?: { - metadata?: { - name?: string; - title?: string; - }; - spec?: { - type?: string; - lifecycle?: string; - owner?: string; - }; - }; + /** + * Properties to override on the final entity object. + */ + entityOverrides?: object; }; }; }; From b422f1e5b03e5e6f463f38baa0bd7807dba1ab49 Mon Sep 17 00:00:00 2001 From: ishikawa-pro Date: Fri, 5 Apr 2024 19:18:57 +0900 Subject: [PATCH 039/151] feat: change link column on cloudbuild plugin Signed-off-by: ishikawa-pro --- .../WorkflowRunsTable/WorkflowRunsTable.tsx | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx b/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx index 5dc9005126..15dc31b730 100644 --- a/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx +++ b/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx @@ -48,11 +48,18 @@ const generatedColumns: TableColumn[] = [ field: 'id', type: 'numeric', width: '150px', - render: (row: Partial) => ( - - {row.id?.substring(0, 8)} - - ), + render: (row: Partial) => { + const LinkWrapper = () => { + const routeLink = useRouteRef(buildRouteRef); + return ( + + {row.id?.substring(0, 8)} + + ); + }; + + return ; + }, }, { title: 'Trigger Name', @@ -67,18 +74,11 @@ const generatedColumns: TableColumn[] = [ field: 'source', highlight: true, width: '200px', - render: (row: Partial) => { - const LinkWrapper = () => { - const routeLink = useRouteRef(buildRouteRef); - return ( - - {row.message} - - ); - }; - - return ; - }, + render: (row: Partial) => ( + + {row.message} + + ), }, { title: 'Ref', From 4be63350464338f69cb152fbf994a87b71a4e3fe Mon Sep 17 00:00:00 2001 From: ishikawa-pro Date: Fri, 5 Apr 2024 19:19:12 +0900 Subject: [PATCH 040/151] add: changesets for cloudbuild plugin Signed-off-by: ishikawa-pro --- .changeset/lovely-flowers-promise.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/lovely-flowers-promise.md diff --git a/.changeset/lovely-flowers-promise.md b/.changeset/lovely-flowers-promise.md new file mode 100644 index 0000000000..71c34bb8b6 --- /dev/null +++ b/.changeset/lovely-flowers-promise.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-cloudbuild': minor +--- + +Changed the column that serves as a hyperlink from SOURCE to BUILD. From d6b80d823763cea345071d8830f56f9c19fa672f Mon Sep 17 00:00:00 2001 From: Karl Haworth <58607256+karlhaworth@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:06:39 -0400 Subject: [PATCH 041/151] Update plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx Co-authored-by: Patrik Oldsberg Signed-off-by: Karl Haworth <58607256+karlhaworth@users.noreply.github.com> --- .../components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx index c72c64df15..4947e3639f 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx @@ -67,7 +67,7 @@ export const handleAuthRequest = ({ authCallback, }: { legacyIncludeCookies?: boolean; - authCallback: any; + authCallback: Props['authCallback']; }): HandleRequest => { let cookies = {}; if (legacyIncludeCookies) { From 147b15bd6dafd6f9d28b8acc34557536d32f5900 Mon Sep 17 00:00:00 2001 From: Karl Haworth <58607256+karlhaworth@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:07:27 -0400 Subject: [PATCH 042/151] Update plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx Co-authored-by: Patrik Oldsberg Signed-off-by: Karl Haworth <58607256+karlhaworth@users.noreply.github.com> --- .../components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx index 4947e3639f..f5b0014974 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx @@ -59,7 +59,6 @@ export type ApolloEndpointProps = { type Props = { endpoints: ApolloEndpointProps[]; authCallback?: () => Promise; - apiHolder?: ApiHolder; }; export const handleAuthRequest = ({ From bd13a562fa4fefddc3fe17a0445f1feefefc2c74 Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Fri, 5 Apr 2024 10:08:12 -0400 Subject: [PATCH 043/151] remove unused Signed-off-by: Karl Haworth --- .../components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx index f5b0014974..6238885a29 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx @@ -22,7 +22,6 @@ import { makeStyles } from '@material-ui/core/styles'; import { JSONObject } from '@apollo/explorer/src/helpers/types'; import { ApolloExplorer } from '@apollo/explorer/react'; import { Content } from '@backstage/core-components'; -import { ApiHolder } from '@backstage/core-plugin-api'; import { HandleRequest } from '@apollo/explorer/src/helpers/postMessageRelayHelpers'; const useStyles = makeStyles(theme => ({ From 04164bdfeffafcdf41f59ef97233e1b9a4c0cc92 Mon Sep 17 00:00:00 2001 From: Karl Haworth <58607256+karlhaworth@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:10:25 -0400 Subject: [PATCH 044/151] Update plugins/apollo-explorer/api-report.md Co-authored-by: Patrik Oldsberg Signed-off-by: Karl Haworth <58607256+karlhaworth@users.noreply.github.com> --- plugins/apollo-explorer/api-report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/apollo-explorer/api-report.md b/plugins/apollo-explorer/api-report.md index bbd220ab49..5f010946c4 100644 --- a/plugins/apollo-explorer/api-report.md +++ b/plugins/apollo-explorer/api-report.md @@ -30,7 +30,7 @@ export const apolloExplorerPlugin: BackstagePlugin< // @public export type AuthCallback = (options: { apiHolder: ApiHolder; -}) => Promise; +}) => Promise<{ token: string }>; // @public export type EndpointProps = { From 6ecacd3ffec0a25663803337363ad59d0d189906 Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Fri, 5 Apr 2024 10:14:13 -0400 Subject: [PATCH 045/151] =?UTF-8?q?This'll=20need=20an=20update=20for=20th?= =?UTF-8?q?e=20return=20type=20tweak,=20but=20you=20can=20also=20skip=20pa?= =?UTF-8?q?ssing=20{}=20here,=20mainly=20just=20confusing=20to=20the=20rea?= =?UTF-8?q?der=20=F0=9F=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Karl Haworth --- .../components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx index 6238885a29..7cb6957aae 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx @@ -84,7 +84,7 @@ export const handleAuthRequest = ({ ...options, headers: { ...options.headers, - Authorization: `Bearer ${await authCallback({})}`, + Authorization: `Bearer ${await authCallback()}`, }, ...cookies, }); From a1e39ffd2a711b6eb3129c497b2e2b11f059e429 Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Fri, 5 Apr 2024 10:38:42 -0400 Subject: [PATCH 046/151] update for the return type tweak Signed-off-by: Karl Haworth --- .../ApolloExplorerBrowser.tsx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx index 7cb6957aae..680e3964ca 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx @@ -84,7 +84,9 @@ export const handleAuthRequest = ({ ...options, headers: { ...options.headers, - Authorization: `Bearer ${await authCallback()}`, + ...(authCallback && { + Authorization: `Bearer ${await authCallback()}`, + }), }, ...cookies, }); @@ -112,14 +114,10 @@ export const ApolloExplorerBrowser = ({ endpoints, authCallback }: Props) => { From c3bcd080801f9947d889b79c91698a7840c52b65 Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Fri, 5 Apr 2024 10:39:46 -0400 Subject: [PATCH 047/151] remove cookies Signed-off-by: Karl Haworth --- .../ApolloExplorerBrowser.tsx | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx index 680e3964ca..e50b4847a2 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx @@ -61,25 +61,11 @@ type Props = { }; export const handleAuthRequest = ({ - legacyIncludeCookies, authCallback, }: { - legacyIncludeCookies?: boolean; authCallback: Props['authCallback']; }): HandleRequest => { - let cookies = {}; - if (legacyIncludeCookies) { - cookies = { credentials: 'include' }; - } else if (legacyIncludeCookies !== undefined) { - cookies = { credentials: 'omit' }; - } else { - cookies = {}; - } - - const handleRequestWithCookiePref: HandleRequest = async ( - endpointUrl, - options, - ) => + const handleRequest: HandleRequest = async (endpointUrl, options) => fetch(endpointUrl, { ...options, headers: { @@ -88,9 +74,8 @@ export const handleAuthRequest = ({ Authorization: `Bearer ${await authCallback()}`, }), }, - ...cookies, }); - return handleRequestWithCookiePref; + return handleRequest; }; export const ApolloExplorerBrowser = ({ endpoints, authCallback }: Props) => { @@ -115,7 +100,6 @@ export const ApolloExplorerBrowser = ({ endpoints, authCallback }: Props) => { className={classes.explorer} graphRef={endpoints[tabIndex].graphRef} handleRequest={handleAuthRequest({ - legacyIncludeCookies: false, authCallback: authCallback, })} persistExplorerState={endpoints[tabIndex].persistExplorerState} From 63adc945239824c3b9a54c14cb3943162755ad26 Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Fri, 5 Apr 2024 12:02:07 -0400 Subject: [PATCH 048/151] update api-report Signed-off-by: Karl Haworth --- plugins/apollo-explorer/api-report.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/apollo-explorer/api-report.md b/plugins/apollo-explorer/api-report.md index 5f010946c4..a009c99aca 100644 --- a/plugins/apollo-explorer/api-report.md +++ b/plugins/apollo-explorer/api-report.md @@ -28,9 +28,9 @@ export const apolloExplorerPlugin: BackstagePlugin< >; // @public -export type AuthCallback = (options: { - apiHolder: ApiHolder; -}) => Promise<{ token: string }>; +export type AuthCallback = (options: { apiHolder: ApiHolder }) => Promise<{ + token: string; +}>; // @public export type EndpointProps = { From 970fb4955caab4fd7fd9fd88e0f218e768a8ed17 Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Fri, 5 Apr 2024 12:02:33 -0400 Subject: [PATCH 049/151] update types and use of authcallback Signed-off-by: Karl Haworth --- .../ApolloExplorerBrowser/ApolloExplorerBrowser.tsx | 4 ++-- .../src/components/ApolloExplorerPage/ApolloExplorerPage.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx index e50b4847a2..d0c90708a1 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx @@ -57,7 +57,7 @@ export type ApolloEndpointProps = { type Props = { endpoints: ApolloEndpointProps[]; - authCallback?: () => Promise; + authCallback?: () => Promise<{ token: string }>; }; export const handleAuthRequest = ({ @@ -71,7 +71,7 @@ export const handleAuthRequest = ({ headers: { ...options.headers, ...(authCallback && { - Authorization: `Bearer ${await authCallback()}`, + Authorization: `Bearer ${(await authCallback()).token}`, }), }, }); diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx index fbbced24d1..b9d25a1a06 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx @@ -48,7 +48,7 @@ export type EndpointProps = { */ export type AuthCallback = (options: { apiHolder: ApiHolder; -}) => Promise; +}) => Promise<{ token: string }>; type Props = { title?: string | undefined; From 3f422fbd66bc0262d9df60c7f8c5a6ca5fa182c0 Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Fri, 5 Apr 2024 14:33:44 -0400 Subject: [PATCH 050/151] add `authCallback` to `EndpointProps` Signed-off-by: Karl Haworth --- .../ApolloExplorerBrowser.tsx | 33 ++++++++----------- .../ApolloExplorerPage/ApolloExplorerPage.tsx | 15 +++------ 2 files changed, 17 insertions(+), 31 deletions(-) diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx index d0c90708a1..d276774003 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx @@ -19,10 +19,11 @@ import Divider from '@material-ui/core/Divider'; import Tab from '@material-ui/core/Tab'; import Tabs from '@material-ui/core/Tabs'; import { makeStyles } from '@material-ui/core/styles'; -import { JSONObject } from '@apollo/explorer/src/helpers/types'; import { ApolloExplorer } from '@apollo/explorer/react'; import { Content } from '@backstage/core-components'; import { HandleRequest } from '@apollo/explorer/src/helpers/postMessageRelayHelpers'; +import { EndpointProps } from '../ApolloExplorerPage'; +import { useApiHolder } from '@backstage/core-plugin-api'; const useStyles = makeStyles(theme => ({ tabs: { @@ -39,24 +40,8 @@ const useStyles = makeStyles(theme => ({ }, })); -export type ApolloEndpointProps = { - title: string; - graphRef: string; - persistExplorerState?: boolean; - initialState?: { - document?: string; - variables?: JSONObject; - headers?: Record; - displayOptions: { - docsPanelState?: 'open' | 'closed'; - showHeadersAndEnvVars?: boolean; - theme?: 'dark' | 'light'; - }; - }; -}; - type Props = { - endpoints: ApolloEndpointProps[]; + endpoints: EndpointProps[]; authCallback?: () => Promise<{ token: string }>; }; @@ -78,10 +63,18 @@ export const handleAuthRequest = ({ return handleRequest; }; -export const ApolloExplorerBrowser = ({ endpoints, authCallback }: Props) => { +export const ApolloExplorerBrowser = ({ endpoints }: Props) => { const classes = useStyles(); const [tabIndex, setTabIndex] = useState(0); + const apiHolder = useApiHolder(); + + const getAuthCallback = (index: number) => { + const authCallback = endpoints[index].authCallback; + if (authCallback === undefined) return undefined; + return () => authCallback({ apiHolder }); + }; + return (
{ className={classes.explorer} graphRef={endpoints[tabIndex].graphRef} handleRequest={handleAuthRequest({ - authCallback: authCallback, + authCallback: getAuthCallback(tabIndex), })} persistExplorerState={endpoints[tabIndex].persistExplorerState} initialState={endpoints[tabIndex].initialState} diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx index b9d25a1a06..53b6a54194 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx @@ -18,7 +18,7 @@ import React from 'react'; import { Content, Header, Page } from '@backstage/core-components'; import { ApolloExplorerBrowser } from '../ApolloExplorerBrowser'; import { JSONObject } from '@apollo/explorer/src/helpers/types'; -import { ApiHolder, useApiHolder } from '@backstage/core-plugin-api'; +import { ApiHolder } from '@backstage/core-plugin-api'; /** * Export types to be used with {@link @backstage/apollo-explorer#ApolloExplorerPage}. @@ -28,6 +28,7 @@ import { ApiHolder, useApiHolder } from '@backstage/core-plugin-api'; export type EndpointProps = { title: string; graphRef: string; + authCallback?: AuthCallback; persistExplorerState?: boolean; initialState?: { document?: string; @@ -54,24 +55,16 @@ type Props = { title?: string | undefined; subtitle?: string | undefined; endpoints: EndpointProps[]; - authCallback?: AuthCallback; }; export const ApolloExplorerPage = (props: Props) => { - const { title, subtitle, endpoints, authCallback } = props; - - const apiHolder = useApiHolder(); + const { title, subtitle, endpoints } = props; return (
- authCallback({ apiHolder }) : undefined - } - /> + ); From dde72a55077a5522d200594587f0e957c9ff2d55 Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Fri, 5 Apr 2024 14:34:01 -0400 Subject: [PATCH 051/151] update api report Signed-off-by: Karl Haworth --- plugins/apollo-explorer/api-report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/apollo-explorer/api-report.md b/plugins/apollo-explorer/api-report.md index a009c99aca..5371bc7219 100644 --- a/plugins/apollo-explorer/api-report.md +++ b/plugins/apollo-explorer/api-report.md @@ -16,7 +16,6 @@ export const ApolloExplorerPage: (props: { title?: string | undefined; subtitle?: string | undefined; endpoints: EndpointProps[]; - authCallback?: AuthCallback | undefined; }) => JSX_2.Element; // @public @@ -36,6 +35,7 @@ export type AuthCallback = (options: { apiHolder: ApiHolder }) => Promise<{ export type EndpointProps = { title: string; graphRef: string; + authCallback?: AuthCallback; persistExplorerState?: boolean; initialState?: { document?: string; From 8ea42d759e040ff3f22f9fefdf20d01171994780 Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Fri, 5 Apr 2024 14:34:10 -0400 Subject: [PATCH 052/151] update readme Signed-off-by: Karl Haworth --- plugins/apollo-explorer/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/apollo-explorer/README.md b/plugins/apollo-explorer/README.md index 258675f82d..b26f157635 100644 --- a/plugins/apollo-explorer/README.md +++ b/plugins/apollo-explorer/README.md @@ -74,11 +74,11 @@ Once you authenticate, your graph is ready to use 🚀 If you need to utilize an ApiRef to supply a token to Apollo, you may do so using an ApiHolder. -In `packages/app/src/App.tsx` perform the following modifications from above. The import `ssoAuthApiRef` is used as an example and does not exist. +In `packages/app/src/App.tsx` perform the following modifications from above. The import `ssoAuthApiRef` is used as an example and **does not exist**. ```typescript import { ApolloExplorerPage, EndpointProps } from '@backstage/plugin-apollo-explorer'; -import { ssoAuthApiRef } from '@backstage/devkit'; +import { ssoAuthApiRef } from '@companyxyz/devkit'; import { ApiHolder } from '@backstage/core-plugin-api'; async function authCallback(options: { apiHolder: ApiHolder }): Promise { From 342a6a9827fc6401173d2ed9399a53d1d0c044e6 Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Fri, 5 Apr 2024 15:22:54 -0400 Subject: [PATCH 053/151] update readme with proper example Signed-off-by: Karl Haworth --- plugins/apollo-explorer/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/apollo-explorer/README.md b/plugins/apollo-explorer/README.md index b26f157635..bc06612cab 100644 --- a/plugins/apollo-explorer/README.md +++ b/plugins/apollo-explorer/README.md @@ -81,7 +81,7 @@ import { ApolloExplorerPage, EndpointProps } from '@backstage/plugin-apollo-expl import { ssoAuthApiRef } from '@companyxyz/devkit'; import { ApiHolder } from '@backstage/core-plugin-api'; -async function authCallback(options: { apiHolder: ApiHolder }): Promise { +async function authCallback(options: { apiHolder: ApiHolder }): Promise<{token: string}> { const sso = options.apiHolder.get(ssoAuthApiRef) return await sso.getToken() } @@ -96,9 +96,9 @@ const routes = ( endpoints={[{ title: 'Github', graphRef: 'my-github-graph-ref@current', + authCallback: authCallback }]} /> } - authCallback={authCallback} /> ``` From d1122256a3869f68490a29cd1abde2550bbc5302 Mon Sep 17 00:00:00 2001 From: parmar-abhinav Date: Sat, 6 Apr 2024 16:36:38 +0530 Subject: [PATCH 054/151] Add examples for gitlab:projectDeployToken:create scaffolder action & improve related tests Signed-off-by: parmar-abhinav --- .changeset/tender-penguins-matter.md | 5 + ...bProjectDeployTokenAction.examples.test.ts | 179 ++++++++++++++++++ ...GitlabProjectDeployTokenAction.examples.ts | 109 +++++++++++ .../createGitlabProjectDeployTokenAction.ts | 2 + 4 files changed, 295 insertions(+) create mode 100644 .changeset/tender-penguins-matter.md create mode 100644 plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectDeployTokenAction.examples.test.ts create mode 100644 plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectDeployTokenAction.examples.ts diff --git a/.changeset/tender-penguins-matter.md b/.changeset/tender-penguins-matter.md new file mode 100644 index 0000000000..5245e251c8 --- /dev/null +++ b/.changeset/tender-penguins-matter.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend-module-gitlab': patch +--- + +Add examples for `gitlab:projectDeployToken:create` scaffolder action & improve related tests diff --git a/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectDeployTokenAction.examples.test.ts b/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectDeployTokenAction.examples.test.ts new file mode 100644 index 0000000000..dd3b694670 --- /dev/null +++ b/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectDeployTokenAction.examples.test.ts @@ -0,0 +1,179 @@ +/* + * Copyright 2023 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 { createGitlabProjectDeployTokenAction } from './createGitlabProjectDeployTokenAction'; +import { createMockActionContext } from '@backstage/plugin-scaffolder-node-test-utils'; +import { ScmIntegrations } from '@backstage/integration'; +import { ConfigReader } from '@backstage/config'; +import yaml from 'yaml'; +import { examples } from './createGitlabProjectDeployTokenAction.examples'; + +const mockGitlabClient = { + ProjectDeployTokens: { + add: jest.fn(), + }, +}; +jest.mock('@gitbeaker/node', () => ({ + Gitlab: class { + constructor() { + return mockGitlabClient; + } + }, +})); + +describe('gitlab:create-deploy-token', () => { + const config = new ConfigReader({ + integrations: { + gitlab: [ + { + host: 'gitlab.com', + token: 'tokenlols', + apiBaseUrl: 'https://api.gitlab.com', + }, + { + host: 'hosted.gitlab.com', + apiBaseUrl: 'https://api.hosted.gitlab.com', + }, + ], + }, + }); + + const integrations = ScmIntegrations.fromConfig(config); + const action = createGitlabProjectDeployTokenAction({ integrations }); + const mockContext = createMockActionContext({ + input: { + repoUrl: 'gitlab.com?repo=repo&owner=owner', + projectId: '123', + name: 'tokenname', + username: 'tokenuser', + scopes: ['read_repository'], + }, + }); + + beforeEach(() => { + jest.resetAllMocks(); + }); + + it(`Should ${examples[0].description}`, async () => { + mockGitlabClient.ProjectDeployTokens.add.mockResolvedValue({ + token: 'TOKEN', + username: 'User', + }); + + await action.handler({ + ...mockContext, + input: yaml.parse(examples[0].example).steps[0].input, + }); + + expect(mockGitlabClient.ProjectDeployTokens.add).toHaveBeenCalledWith( + '456', + 'tokenname', + undefined, + { username: undefined }, + ); + + expect(mockContext.output).toHaveBeenCalledWith('deploy_token', 'TOKEN'); + expect(mockContext.output).toHaveBeenCalledWith('user', 'User'); + }); + + it(`Should ${examples[1].description}`, async () => { + mockGitlabClient.ProjectDeployTokens.add.mockResolvedValue({ + token: 'TOKEN', + username: 'User', + }); + + await action.handler({ + ...mockContext, + input: yaml.parse(examples[1].example).steps[0].input, + }); + + expect(mockGitlabClient.ProjectDeployTokens.add).toHaveBeenCalledWith( + '789', + 'tokenname', + ['read_registry', 'write_repository'], + { username: undefined }, + ); + + expect(mockContext.output).toHaveBeenCalledWith('deploy_token', 'TOKEN'); + expect(mockContext.output).toHaveBeenCalledWith('user', 'User'); + }); + + it(`Should ${examples[2].description}`, async () => { + mockGitlabClient.ProjectDeployTokens.add.mockResolvedValue({ + token: 'TOKEN', + username: 'User', + }); + + await action.handler({ + ...mockContext, + input: yaml.parse(examples[2].example).steps[0].input, + }); + + expect(mockGitlabClient.ProjectDeployTokens.add).toHaveBeenCalledWith( + '101112', + 'my-custom-token', + undefined, + { username: undefined }, + ); + + expect(mockContext.output).toHaveBeenCalledWith('deploy_token', 'TOKEN'); + expect(mockContext.output).toHaveBeenCalledWith('user', 'User'); + }); + + it(`Should ${examples[3].description}`, async () => { + mockGitlabClient.ProjectDeployTokens.add.mockResolvedValue({ + token: 'TOKEN', + username: 'User', + }); + + await action.handler({ + ...mockContext, + input: yaml.parse(examples[3].example).steps[0].input, + }); + + expect(mockGitlabClient.ProjectDeployTokens.add).toHaveBeenCalledWith( + 42, + 'tokenname', + undefined, + { username: undefined }, + ); + + expect(mockContext.output).toHaveBeenCalledWith('deploy_token', 'TOKEN'); + expect(mockContext.output).toHaveBeenCalledWith('user', 'User'); + }); + + it(`Should ${examples[4].description}`, async () => { + mockGitlabClient.ProjectDeployTokens.add.mockResolvedValue({ + token: 'TOKEN', + username: 'User', + }); + + await action.handler({ + ...mockContext, + input: yaml.parse(examples[4].example).steps[0].input, + }); + + expect(mockGitlabClient.ProjectDeployTokens.add).toHaveBeenCalledWith( + 42, + 'tokenname', + undefined, + { username: 'tokenuser' }, + ); + + expect(mockContext.output).toHaveBeenCalledWith('deploy_token', 'TOKEN'); + expect(mockContext.output).toHaveBeenCalledWith('user', 'User'); + }); +}); diff --git a/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectDeployTokenAction.examples.ts b/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectDeployTokenAction.examples.ts new file mode 100644 index 0000000000..326747d45a --- /dev/null +++ b/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectDeployTokenAction.examples.ts @@ -0,0 +1,109 @@ +/* + * Copyright 2023 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 { TemplateExample } from '@backstage/plugin-scaffolder-node'; +import yaml from 'yaml'; + +export const examples: TemplateExample[] = [ + { + description: 'Create a GitLab project deploy token with minimal options.', + example: yaml.stringify({ + steps: [ + { + id: 'createDeployToken', + action: 'gitlab:projectDeployToken:create', + name: 'Create GitLab Project Deploy Token', + input: { + repoUrl: 'gitlab.com?repo=repo&owner=owner', + projectId: '456', + name: 'tokenname', + }, + }, + ], + }), + }, + { + description: 'Create a GitLab project deploy token with custom scopes.', + example: yaml.stringify({ + steps: [ + { + id: 'createDeployToken', + action: 'gitlab:projectDeployToken:create', + name: 'Create GitLab Project Deploy Token', + input: { + repoUrl: 'gitlab.com?repo=repo&owner=owner', + projectId: '789', + name: 'tokenname', + scopes: ['read_registry', 'write_repository'], + }, + }, + ], + }), + }, + { + description: 'Create a GitLab project deploy token with a specified name.', + example: yaml.stringify({ + steps: [ + { + id: 'createDeployToken', + action: 'gitlab:projectDeployToken:create', + name: 'Create GitLab Project Deploy Token', + input: { + repoUrl: 'gitlab.com?repo=repo&owner=owner', + projectId: '101112', + name: 'my-custom-token', + }, + }, + ], + }), + }, + { + description: + 'Create a GitLab project deploy token with a numeric project ID.', + example: yaml.stringify({ + steps: [ + { + id: 'createDeployToken', + action: 'gitlab:projectDeployToken:create', + name: 'Create GitLab Project Deploy Token', + input: { + repoUrl: 'gitlab.com?repo=repo&owner=owner', + projectId: 42, + name: 'tokenname', + }, + }, + ], + }), + }, + + { + description: 'Create a GitLab project deploy token with a custom username', + example: yaml.stringify({ + steps: [ + { + id: 'createDeployToken', + action: 'gitlab:projectDeployToken:create', + name: 'Create GitLab Project Deploy Token', + input: { + repoUrl: 'gitlab.com?repo=repo&owner=owner', + projectId: 42, + name: 'tokenname', + username: 'tokenuser', + }, + }, + ], + }), + }, +]; diff --git a/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectDeployTokenAction.ts b/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectDeployTokenAction.ts index 1665d23b39..87d4314b6f 100644 --- a/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectDeployTokenAction.ts +++ b/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabProjectDeployTokenAction.ts @@ -22,6 +22,7 @@ import commonGitlabConfig from '../commonGitlabConfig'; import { getToken } from '../util'; import { InputError } from '@backstage/errors'; import { z } from 'zod'; +import { examples } from './createGitlabProjectDeployTokenAction.examples'; /** * Creates a `gitlab:projectDeployToken:create` Scaffolder action. @@ -35,6 +36,7 @@ export const createGitlabProjectDeployTokenAction = (options: { const { integrations } = options; return createTemplateAction({ id: 'gitlab:projectDeployToken:create', + examples, schema: { input: commonGitlabConfig.merge( z.object({ From dd269e92f0c160364d373095dbfa8dac89141933 Mon Sep 17 00:00:00 2001 From: Steve Zhang Date: Thu, 4 Apr 2024 22:30:41 -0400 Subject: [PATCH 055/151] Fix for #23999 - 'req.header is not a function' Signed-off-by: Steve Zhang --- .changeset/curly-news-report.md | 21 +++++++++++++++++++ .../src/service/KubernetesProxy.ts | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .changeset/curly-news-report.md diff --git a/.changeset/curly-news-report.md b/.changeset/curly-news-report.md new file mode 100644 index 0000000000..f2a7dee6d1 --- /dev/null +++ b/.changeset/curly-news-report.md @@ -0,0 +1,21 @@ +--- +'@backstage/plugin-kubernetes-backend': patch +--- + +**BREAKING** The kubernetes backend now can handle when req.header is undefined. + +These changes are **required** to `plugins/kubernetes-backend/src/service/KubernetesProxy.ts` + +```diff +-- a/plugins/kubernetes-backend/src/service/KubernetesProxy.ts ++++ b/plugins/kubernetes-backend/src/service/KubernetesProxy.ts +@@ -172,7 +172,7 @@ export class KubernetesProxy { + )?.toString(), + }; + +- const authHeader = req.header(HEADER_KUBERNETES_AUTH); ++ const authHeader = req.header?.(HEADER_KUBERNETES_AUTH); + if (authHeader) { + req.headers.authorization = authHeader; + } else { +``` diff --git a/plugins/kubernetes-backend/src/service/KubernetesProxy.ts b/plugins/kubernetes-backend/src/service/KubernetesProxy.ts index b4536c5880..15b99e4180 100644 --- a/plugins/kubernetes-backend/src/service/KubernetesProxy.ts +++ b/plugins/kubernetes-backend/src/service/KubernetesProxy.ts @@ -172,7 +172,7 @@ export class KubernetesProxy { )?.toString(), }; - const authHeader = req.header(HEADER_KUBERNETES_AUTH); + const authHeader = req.header?.(HEADER_KUBERNETES_AUTH); if (authHeader) { req.headers.authorization = authHeader; } else { From 5f1d385489409a782d9dd416565545c4bb01ad5a Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Sun, 7 Apr 2024 05:29:51 +0100 Subject: [PATCH 056/151] feat: add support aws govcloud (us) Signed-off-by: Timothy Deakin --- .../src/helpers.test.ts | 20 ++++++++++++------- .../src/helpers.ts | 16 ++++++++++++--- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/plugins/auth-backend-module-aws-alb-provider/src/helpers.test.ts b/plugins/auth-backend-module-aws-alb-provider/src/helpers.test.ts index cb103debb0..0bbcf9b5c1 100644 --- a/plugins/auth-backend-module-aws-alb-provider/src/helpers.test.ts +++ b/plugins/auth-backend-module-aws-alb-provider/src/helpers.test.ts @@ -26,7 +26,13 @@ import { makeProfileInfo, provisionKeyCache } from './helpers'; jest.mock('crypto'); const cryptoMock = crypto as jest.Mocked; -describe('helpers', () => { +describe.each([ + ['eu-west-1', 'https://public-keys.auth.elb.eu-west-1.amazonaws.com/kid'], + [ + 'us-gov-west-1', + 'https://s3-us-gov-west-1.amazonaws.com/aws-elb-public-keys-prod-us-gov-west-1/kid', + ], +])('helpers', (region, url) => { const server = setupServer(); setupRequestMockHandlers(server); @@ -37,7 +43,7 @@ describe('helpers', () => { jest.clearAllMocks(); server.use( http.get( - 'https://public-keys.auth.elb.eu-west-1.amazonaws.com/kid', + url, () => new HttpResponse( `-----BEGIN PUBLIC KEY----- @@ -51,12 +57,12 @@ yOlxJ2VW88mLAQGJ7HPAvOdylxZsItMnzCuqNzZvie8m/NJsOjhDncVkrw== }); it('should create a key', () => { - const getKey = provisionKeyCache('eu-west-1', nodeCache); + const getKey = provisionKeyCache(region, nodeCache); expect(getKey).toBeDefined(); }); it('should return a key from cache', async () => { - const getKey = provisionKeyCache('eu-west-1', nodeCache); + const getKey = provisionKeyCache(region, nodeCache); cryptoMock.createPublicKey.mockReturnValueOnce('key'); nodeCache.get = jest.fn().mockReturnValue('key'); @@ -67,7 +73,7 @@ yOlxJ2VW88mLAQGJ7HPAvOdylxZsItMnzCuqNzZvie8m/NJsOjhDncVkrw== }); it('should update cache if key is not found', async () => { - const getKey = provisionKeyCache('eu-west-1', nodeCache); + const getKey = provisionKeyCache(region, nodeCache); nodeCache.get = jest.fn().mockReturnValue(undefined); jest.spyOn(nodeCache, 'set'); @@ -80,7 +86,7 @@ yOlxJ2VW88mLAQGJ7HPAvOdylxZsItMnzCuqNzZvie8m/NJsOjhDncVkrw== }); it('should throw error if key is not found', async () => { - const getKey = provisionKeyCache('eu-west-1', nodeCache); + const getKey = provisionKeyCache(region, nodeCache); nodeCache.get = jest.fn().mockReturnValue(undefined); cryptoMock.createPublicKey.mockReturnValue(undefined); @@ -91,7 +97,7 @@ yOlxJ2VW88mLAQGJ7HPAvOdylxZsItMnzCuqNzZvie8m/NJsOjhDncVkrw== }); it('should throw if key is not present in request header', async () => { - const getKey = provisionKeyCache('eu-west-1', nodeCache); + const getKey = provisionKeyCache(region, nodeCache); nodeCache.get = jest.fn().mockReturnValue(undefined); diff --git a/plugins/auth-backend-module-aws-alb-provider/src/helpers.ts b/plugins/auth-backend-module-aws-alb-provider/src/helpers.ts index e846b2484e..1af02ce9ec 100644 --- a/plugins/auth-backend-module-aws-alb-provider/src/helpers.ts +++ b/plugins/auth-backend-module-aws-alb-provider/src/helpers.ts @@ -70,6 +70,17 @@ export const makeProfileInfo = ( }; }; +const getPublicKeyEndpoint = (region: string) => { + const commercialEndpoint = `https://public-keys.auth.elb.${encodeURIComponent( + region, + )}.amazonaws.com/`; + const govEndpoint = `https://s3-${encodeURIComponent( + region, + )}.amazonaws.com/aws-elb-public-keys-prod-${encodeURIComponent(region)}/`; + + return region.startsWith('us-gov') ? govEndpoint : commercialEndpoint; +}; + export const provisionKeyCache = (region: string, keyCache: NodeCache) => { return async (header: JWTHeaderParameters): Promise => { if (!header.kid) { @@ -79,10 +90,9 @@ export const provisionKeyCache = (region: string, keyCache: NodeCache) => { if (optionalCacheKey) { return crypto.createPublicKey(optionalCacheKey); } + const keyText: string = await fetch( - `https://public-keys.auth.elb.${encodeURIComponent( - region, - )}.amazonaws.com/${encodeURIComponent(header.kid)}`, + getPublicKeyEndpoint(region) + header.kid, ).then(response => response.text()); const keyValue = crypto.createPublicKey(keyText); From f286d59f036f43c5b9ee588994248b4197c2d346 Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Sun, 7 Apr 2024 05:48:18 +0100 Subject: [PATCH 057/151] chore: add changeset Signed-off-by: Timothy Deakin --- .changeset/neat-weeks-wait.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/neat-weeks-wait.md diff --git a/.changeset/neat-weeks-wait.md b/.changeset/neat-weeks-wait.md new file mode 100644 index 0000000000..5fe26cba7c --- /dev/null +++ b/.changeset/neat-weeks-wait.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend-module-aws-alb-provider': minor +--- + +Added support for AWS GovCloud (US) regions From 0fb178e84abda8dd5a507f5c8b3354a74e0a5724 Mon Sep 17 00:00:00 2001 From: parmar-abhinav Date: Sun, 7 Apr 2024 19:01:56 +0530 Subject: [PATCH 058/151] Add examples for publish:gerrit:review scaffolder action & improve related tests Signed-off-by: parmar-abhinav --- .changeset/mighty-humans-tan.md | 5 + .../src/actions/gerritReview.examples.test.ts | 245 ++++++++++++++++++ .../src/actions/gerritReview.examples.ts | 126 +++++++++ .../src/actions/gerritReview.ts | 2 + 4 files changed, 378 insertions(+) create mode 100644 .changeset/mighty-humans-tan.md create mode 100644 plugins/scaffolder-backend-module-gerrit/src/actions/gerritReview.examples.test.ts create mode 100644 plugins/scaffolder-backend-module-gerrit/src/actions/gerritReview.examples.ts diff --git a/.changeset/mighty-humans-tan.md b/.changeset/mighty-humans-tan.md new file mode 100644 index 0000000000..24e209a701 --- /dev/null +++ b/.changeset/mighty-humans-tan.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend-module-gerrit': minor +--- + +Add examples for publish:gerrit:review scaffolder action & improve related tests diff --git a/plugins/scaffolder-backend-module-gerrit/src/actions/gerritReview.examples.test.ts b/plugins/scaffolder-backend-module-gerrit/src/actions/gerritReview.examples.test.ts new file mode 100644 index 0000000000..d1bc594d54 --- /dev/null +++ b/plugins/scaffolder-backend-module-gerrit/src/actions/gerritReview.examples.test.ts @@ -0,0 +1,245 @@ +/* + * Copyright 2023 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. + */ + +jest.mock('@backstage/plugin-scaffolder-node', () => { + return { + ...jest.requireActual('@backstage/plugin-scaffolder-node'), + commitAndPushRepo: jest.fn(), + }; +}); + +import { createPublishGerritReviewAction } from './gerritReview'; +import { ScmIntegrations } from '@backstage/integration'; +import { ConfigReader } from '@backstage/config'; +import { commitAndPushRepo } from '@backstage/plugin-scaffolder-node'; +import { createMockActionContext } from '@backstage/plugin-scaffolder-node-test-utils'; +import yaml from 'yaml'; +import { examples } from './gerritReview.examples'; + +describe('publish:gerrit:review', () => { + const config = new ConfigReader({ + integrations: { + gerrit: [ + { + host: 'gerrithost.org', + username: 'gerrituser', + password: 'usertoken', + }, + ], + }, + }); + + const integrations = ScmIntegrations.fromConfig(config); + const action = createPublishGerritReviewAction({ integrations, config }); + const mockContext = createMockActionContext({ + input: { + repoUrl: + 'gerrithost.org?owner=owner&workspace=parent&project=project&repo=repo', + gitCommitMessage: 'Review from backstage', + }, + }); + + beforeEach(() => { + jest.resetAllMocks(); + }); + + it(`Should ${examples[0].description}`, async () => { + expect.assertions(3); + + const input = yaml.parse(examples[0].example).steps[0].input; + await action.handler({ + ...mockContext, + input, + }); + + expect(commitAndPushRepo).toHaveBeenCalledWith({ + dir: mockContext.workspacePath, + auth: { username: 'gerrituser', password: 'usertoken' }, + logger: mockContext.logger, + commitMessage: expect.stringContaining('Initial Commit Message'), + gitAuthorInfo: {}, + branch: 'master', + remoteRef: 'refs/for/master', + }); + + expect(mockContext.output).toHaveBeenCalledWith( + 'repoContentsUrl', + 'https://gerrithost.org/repo/+/refs/heads/master', + ); + expect(mockContext.output).toHaveBeenCalledWith( + 'reviewUrl', + expect.stringMatching(new RegExp('^https://gerrithost.org/#/q/I')), + ); + }); + + it(`Should ${examples[1].description}`, async () => { + expect.assertions(3); + + const input = yaml.parse(examples[1].example).steps[0].input; + await action.handler({ + ...mockContext, + input, + }); + + expect(commitAndPushRepo).toHaveBeenCalledWith({ + dir: mockContext.workspacePath, + auth: { username: 'gerrituser', password: 'usertoken' }, + logger: mockContext.logger, + commitMessage: expect.stringContaining('Initial Commit Message'), + gitAuthorInfo: { + email: undefined, + name: 'Test User', + }, + branch: 'master', + remoteRef: 'refs/for/master', + }); + + expect(mockContext.output).toHaveBeenCalledWith( + 'repoContentsUrl', + 'https://gerrithost.org/repo/+/refs/heads/master', + ); + expect(mockContext.output).toHaveBeenCalledWith( + 'reviewUrl', + expect.stringMatching(new RegExp('^https://gerrithost.org/#/q/I')), + ); + }); + + it(`Should ${examples[2].description}`, async () => { + expect.assertions(3); + + const input = yaml.parse(examples[2].example).steps[0].input; + await action.handler({ + ...mockContext, + input, + }); + + expect(commitAndPushRepo).toHaveBeenCalledWith({ + dir: mockContext.workspacePath, + auth: { username: 'gerrituser', password: 'usertoken' }, + logger: mockContext.logger, + commitMessage: expect.stringContaining('Initial Commit Message'), + gitAuthorInfo: { + email: 'test.user@example.com', + name: 'Test User', + }, + branch: 'master', + remoteRef: 'refs/for/master', + }); + + expect(mockContext.output).toHaveBeenCalledWith( + 'repoContentsUrl', + 'https://gerrithost.org/repo/+/refs/heads/master', + ); + expect(mockContext.output).toHaveBeenCalledWith( + 'reviewUrl', + expect.stringMatching(new RegExp('^https://gerrithost.org/#/q/I')), + ); + }); + + it(`Should ${examples[3].description}`, async () => { + expect.assertions(3); + + const input = yaml.parse(examples[3].example).steps[0].input; + await action.handler({ + ...mockContext, + input, + }); + + expect(commitAndPushRepo).toHaveBeenCalledWith({ + dir: mockContext.workspacePath, + auth: { username: 'gerrituser', password: 'usertoken' }, + logger: mockContext.logger, + commitMessage: expect.stringContaining('Initial Commit Message'), + gitAuthorInfo: {}, + branch: 'develop', + remoteRef: 'refs/for/develop', + }); + + expect(mockContext.output).toHaveBeenCalledWith( + 'repoContentsUrl', + 'https://gerrithost.org/repo/+/refs/heads/develop', + ); + expect(mockContext.output).toHaveBeenCalledWith( + 'reviewUrl', + expect.stringMatching(new RegExp('^https://gerrithost.org/#/q/I')), + ); + }); + + it(`Should ${examples[4].description}`, async () => { + expect.assertions(3); + + const input = yaml.parse(examples[4].example).steps[0].input; + await action.handler({ + ...mockContext, + input, + }); + + expect(commitAndPushRepo).toHaveBeenCalledWith({ + dir: `${mockContext.workspacePath}/src`, + auth: { username: 'gerrituser', password: 'usertoken' }, + logger: mockContext.logger, + commitMessage: expect.stringContaining('Initial Commit Message'), + gitAuthorInfo: {}, + branch: 'master', + remoteRef: 'refs/for/master', + }); + + expect(mockContext.output).toHaveBeenCalledWith( + 'repoContentsUrl', + 'https://gerrithost.org/repo/+/refs/heads/master', + ); + expect(mockContext.output).toHaveBeenCalledWith( + 'reviewUrl', + expect.stringMatching(new RegExp('^https://gerrithost.org/#/q/I')), + ); + }); + + it(`Should ${examples[5].description}`, async () => { + expect.assertions(3); + + const input = yaml.parse(examples[5].example).steps[0].input; + await action.handler({ + ...mockContext, + input, + }); + + expect(commitAndPushRepo).toHaveBeenCalledWith({ + dir: `${mockContext.workspacePath}/src`, + auth: { username: 'gerrituser', password: 'usertoken' }, + logger: mockContext.logger, + commitMessage: expect.stringContaining('Initial Commit Message'), + gitAuthorInfo: { + email: 'test.user@example.com', + name: 'Test User', + }, + branch: 'develop', + remoteRef: 'refs/for/develop', + }); + + expect(mockContext.output).toHaveBeenCalledWith( + 'repoContentsUrl', + 'https://gerrithost.org/repo/+/refs/heads/develop', + ); + expect(mockContext.output).toHaveBeenCalledWith( + 'reviewUrl', + expect.stringMatching(new RegExp('^https://gerrithost.org/#/q/I')), + ); + }); + + afterEach(() => { + jest.resetAllMocks(); + }); +}); diff --git a/plugins/scaffolder-backend-module-gerrit/src/actions/gerritReview.examples.ts b/plugins/scaffolder-backend-module-gerrit/src/actions/gerritReview.examples.ts new file mode 100644 index 0000000000..fc01fd1ce3 --- /dev/null +++ b/plugins/scaffolder-backend-module-gerrit/src/actions/gerritReview.examples.ts @@ -0,0 +1,126 @@ +/* + * Copyright 2023 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 { TemplateExample } from '@backstage/plugin-scaffolder-node'; +import yaml from 'yaml'; + +export const examples: TemplateExample[] = [ + { + description: 'Creates a new Gerrit review with minimal options', + example: yaml.stringify({ + steps: [ + { + id: 'publish', + action: 'publish:gerrit:review', + name: 'Publish new gerrit review', + input: { + repoUrl: 'gerrithost.org?repo=repo&owner=owner', + gitCommitMessage: 'Initial Commit Message', + }, + }, + ], + }), + }, + { + description: 'Creates a new Gerrit review with gitAuthorName', + example: yaml.stringify({ + steps: [ + { + id: 'publish', + action: 'publish:gerrit:review', + name: 'Publish new gerrit review', + input: { + repoUrl: 'gerrithost.org?repo=repo&owner=owner', + gitCommitMessage: 'Initial Commit Message', + gitAuthorName: 'Test User', + }, + }, + ], + }), + }, + { + description: 'Creates a new Gerrit review with gitAuthorEmail', + example: yaml.stringify({ + steps: [ + { + id: 'publish', + action: 'publish:gerrit:review', + name: 'Publish new gerrit review', + input: { + repoUrl: 'gerrithost.org?repo=repo&owner=owner', + gitCommitMessage: 'Initial Commit Message', + gitAuthorName: 'Test User', + gitAuthorEmail: 'test.user@example.com', + }, + }, + ], + }), + }, + { + description: 'Creates a new Gerrit review with custom branch', + example: yaml.stringify({ + steps: [ + { + id: 'publish', + action: 'publish:gerrit:review', + name: 'Publish new gerrit review', + input: { + repoUrl: 'gerrithost.org?repo=repo&owner=owner', + gitCommitMessage: 'Initial Commit Message', + branch: 'develop', + }, + }, + ], + }), + }, + { + description: 'Creates a new Gerrit review with custom sourcePath', + example: yaml.stringify({ + steps: [ + { + id: 'publish', + action: 'publish:gerrit:review', + name: 'Publish new gerrit review', + input: { + repoUrl: 'gerrithost.org?repo=repo&owner=owner', + gitCommitMessage: 'Initial Commit Message', + sourcePath: './src', + }, + }, + ], + }), + }, + { + description: 'Creates a new Gerrit review with all properties', + example: yaml.stringify({ + steps: [ + { + id: 'publish', + action: 'publish:gerrit:review', + name: 'Publish new gerrit review', + input: { + repoUrl: 'gerrithost.org?repo=repo&owner=owner', + gitCommitMessage: 'Initial Commit Message', + gitAuthorName: 'Test User', + gitAuthorEmail: 'test.user@example.com', + branch: 'develop', + sourcePath: './src', + }, + }, + ], + }), + }, +]; diff --git a/plugins/scaffolder-backend-module-gerrit/src/actions/gerritReview.ts b/plugins/scaffolder-backend-module-gerrit/src/actions/gerritReview.ts index bd8d0321ab..b4f844b08f 100644 --- a/plugins/scaffolder-backend-module-gerrit/src/actions/gerritReview.ts +++ b/plugins/scaffolder-backend-module-gerrit/src/actions/gerritReview.ts @@ -24,6 +24,7 @@ import { getRepoSourceDirectory, parseRepoUrl, } from '@backstage/plugin-scaffolder-node'; +import { examples } from './gerritReview.examples'; const generateGerritChangeId = (): string => { const changeId = crypto.randomBytes(20).toString('hex'); @@ -50,6 +51,7 @@ export function createPublishGerritReviewAction(options: { }>({ id: 'publish:gerrit:review', description: 'Creates a new Gerrit review.', + examples, schema: { input: { type: 'object', From 95957902bb613779f4837876bfdbfcafaba6f8c8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 15:34:21 +0000 Subject: [PATCH 059/151] chore(deps): update dependency sort-package-json to v2.10.0 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2df04a207e..34d0d4410f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -41541,7 +41541,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.1.3, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.4.0, semver@npm:^7.5.3, semver@npm:^7.5.4": +"semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.1.3, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.4.0, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0": version: 7.6.0 resolution: "semver@npm:7.6.0" dependencies: @@ -42123,8 +42123,8 @@ __metadata: linkType: hard "sort-package-json@npm:^2.8.0": - version: 2.8.0 - resolution: "sort-package-json@npm:2.8.0" + version: 2.10.0 + resolution: "sort-package-json@npm:2.10.0" dependencies: detect-indent: ^7.0.1 detect-newline: ^4.0.0 @@ -42132,10 +42132,11 @@ __metadata: git-hooks-list: ^3.0.0 globby: ^13.1.2 is-plain-obj: ^4.1.0 + semver: ^7.6.0 sort-object-keys: ^1.1.3 bin: sort-package-json: cli.js - checksum: 8739392ae4f5f6aa07948e317e43c62e2165fa815175c4678b1eef815f27d93846262113a16f17c10f12856f72222c312a8a5ed2dcae60265bfbacee64967312 + checksum: 095e5c5075c9799d3d6174f82e963fa3be0a1d193af0be656b651d2e5b563dfc794f46c7aa74e3fc761de3fba76951ad2d3de716cf50b3aca4e938f63edbfcae languageName: node linkType: hard From c8080ec419c75274239513194f2b2a7c8f629462 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 16:18:07 +0000 Subject: [PATCH 060/151] chore(deps): update dependency webpack to v5.91.0 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- storybook/yarn.lock | 140 ++++++++++++++++++++++---------------------- yarn.lock | 132 ++++++++++++++++++++--------------------- 2 files changed, 136 insertions(+), 136 deletions(-) diff --git a/storybook/yarn.lock b/storybook/yarn.lock index 70f86d7e7f..5d414b5ac3 100644 --- a/storybook/yarn.lock +++ b/storybook/yarn.lock @@ -3250,13 +3250,13 @@ __metadata: languageName: node linkType: hard -"@webassemblyjs/ast@npm:1.11.6, @webassemblyjs/ast@npm:^1.11.5": - version: 1.11.6 - resolution: "@webassemblyjs/ast@npm:1.11.6" +"@webassemblyjs/ast@npm:1.12.1, @webassemblyjs/ast@npm:^1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/ast@npm:1.12.1" dependencies: "@webassemblyjs/helper-numbers": 1.11.6 "@webassemblyjs/helper-wasm-bytecode": 1.11.6 - checksum: 38ef1b526ca47c210f30975b06df2faf1a8170b1636ce239fc5738fc231ce28389dd61ecedd1bacfc03cbe95b16d1af848c805652080cb60982836eb4ed2c6cf + checksum: 31bcc64147236bd7b1b6d29d1f419c1f5845c785e1e42dc9e3f8ca2e05a029e9393a271b84f3a5bff2a32d35f51ff59e2181a6e5f953fe88576acd6750506202 languageName: node linkType: hard @@ -3274,10 +3274,10 @@ __metadata: languageName: node linkType: hard -"@webassemblyjs/helper-buffer@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/helper-buffer@npm:1.11.6" - checksum: b14d0573bf680d22b2522e8a341ec451fddd645d1f9c6bd9012ccb7e587a2973b86ab7b89fe91e1c79939ba96095f503af04369a3b356c8023c13a5893221644 +"@webassemblyjs/helper-buffer@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/helper-buffer@npm:1.12.1" + checksum: c3ffb723024130308db608e86e2bdccd4868bbb62dffb0a9a1530606496f79c87f8565bd8e02805ce64912b71f1a70ee5fb00307258b0c082c3abf961d097eca languageName: node linkType: hard @@ -3299,15 +3299,15 @@ __metadata: languageName: node linkType: hard -"@webassemblyjs/helper-wasm-section@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/helper-wasm-section@npm:1.11.6" +"@webassemblyjs/helper-wasm-section@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/helper-wasm-section@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.6 - "@webassemblyjs/helper-buffer": 1.11.6 + "@webassemblyjs/ast": 1.12.1 + "@webassemblyjs/helper-buffer": 1.12.1 "@webassemblyjs/helper-wasm-bytecode": 1.11.6 - "@webassemblyjs/wasm-gen": 1.11.6 - checksum: b2cf751bf4552b5b9999d27bbb7692d0aca75260140195cb58ea6374d7b9c2dc69b61e10b211a0e773f66209c3ddd612137ed66097e3684d7816f854997682e9 + "@webassemblyjs/wasm-gen": 1.12.1 + checksum: c19810cdd2c90ff574139b6d8c0dda254d42d168a9e5b3d353d1bc085f1d7164ccd1b3c05592a45a939c47f7e403dc8d03572bb686642f06a3d02932f6f0bc8f languageName: node linkType: hard @@ -3336,68 +3336,68 @@ __metadata: languageName: node linkType: hard -"@webassemblyjs/wasm-edit@npm:^1.11.5": - version: 1.11.6 - resolution: "@webassemblyjs/wasm-edit@npm:1.11.6" +"@webassemblyjs/wasm-edit@npm:^1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-edit@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.6 - "@webassemblyjs/helper-buffer": 1.11.6 + "@webassemblyjs/ast": 1.12.1 + "@webassemblyjs/helper-buffer": 1.12.1 "@webassemblyjs/helper-wasm-bytecode": 1.11.6 - "@webassemblyjs/helper-wasm-section": 1.11.6 - "@webassemblyjs/wasm-gen": 1.11.6 - "@webassemblyjs/wasm-opt": 1.11.6 - "@webassemblyjs/wasm-parser": 1.11.6 - "@webassemblyjs/wast-printer": 1.11.6 - checksum: 29ce75870496d6fad864d815ebb072395a8a3a04dc9c3f4e1ffdc63fc5fa58b1f34304a1117296d8240054cfdbc38aca88e71fb51483cf29ffab0a61ef27b481 + "@webassemblyjs/helper-wasm-section": 1.12.1 + "@webassemblyjs/wasm-gen": 1.12.1 + "@webassemblyjs/wasm-opt": 1.12.1 + "@webassemblyjs/wasm-parser": 1.12.1 + "@webassemblyjs/wast-printer": 1.12.1 + checksum: ae23642303f030af888d30c4ef37b08dfec7eab6851a9575a616e65d1219f880d9223913a39056dd654e49049d76e97555b285d1f7e56935047abf578cce0692 languageName: node linkType: hard -"@webassemblyjs/wasm-gen@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/wasm-gen@npm:1.11.6" +"@webassemblyjs/wasm-gen@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-gen@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.6 + "@webassemblyjs/ast": 1.12.1 "@webassemblyjs/helper-wasm-bytecode": 1.11.6 "@webassemblyjs/ieee754": 1.11.6 "@webassemblyjs/leb128": 1.11.6 "@webassemblyjs/utf8": 1.11.6 - checksum: a645a2eecbea24833c3260a249704a7f554ef4a94c6000984728e94bb2bc9140a68dfd6fd21d5e0bbb09f6dfc98e083a45760a83ae0417b41a0196ff6d45a23a + checksum: 5787626bb7f0b033044471ddd00ce0c9fe1ee4584e8b73e232051e3a4c99ba1a102700d75337151c8b6055bae77eefa4548960c610a5e4a504e356bd872138ff languageName: node linkType: hard -"@webassemblyjs/wasm-opt@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/wasm-opt@npm:1.11.6" +"@webassemblyjs/wasm-opt@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-opt@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.6 - "@webassemblyjs/helper-buffer": 1.11.6 - "@webassemblyjs/wasm-gen": 1.11.6 - "@webassemblyjs/wasm-parser": 1.11.6 - checksum: b4557f195487f8e97336ddf79f7bef40d788239169aac707f6eaa2fa5fe243557c2d74e550a8e57f2788e70c7ae4e7d32f7be16101afe183d597b747a3bdd528 + "@webassemblyjs/ast": 1.12.1 + "@webassemblyjs/helper-buffer": 1.12.1 + "@webassemblyjs/wasm-gen": 1.12.1 + "@webassemblyjs/wasm-parser": 1.12.1 + checksum: 0e8fa8a0645304a1e18ff40d3db5a2e9233ebaa169b19fcc651d6fc9fe2cac0ce092ddee927318015ae735d9cd9c5d97c0cafb6a51dcd2932ac73587b62df991 languageName: node linkType: hard -"@webassemblyjs/wasm-parser@npm:1.11.6, @webassemblyjs/wasm-parser@npm:^1.11.5": - version: 1.11.6 - resolution: "@webassemblyjs/wasm-parser@npm:1.11.6" +"@webassemblyjs/wasm-parser@npm:1.12.1, @webassemblyjs/wasm-parser@npm:^1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-parser@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.6 + "@webassemblyjs/ast": 1.12.1 "@webassemblyjs/helper-api-error": 1.11.6 "@webassemblyjs/helper-wasm-bytecode": 1.11.6 "@webassemblyjs/ieee754": 1.11.6 "@webassemblyjs/leb128": 1.11.6 "@webassemblyjs/utf8": 1.11.6 - checksum: 8200a8d77c15621724a23fdabe58d5571415cda98a7058f542e670ea965dd75499f5e34a48675184947c66f3df23adf55df060312e6d72d57908e3f049620d8a + checksum: 176015de3551ac068cd4505d837414f258d9ade7442bd71efb1232fa26c9f6d7d4e11a5c816caeed389943f409af7ebff6899289a992d7a70343cb47009d21a8 languageName: node linkType: hard -"@webassemblyjs/wast-printer@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/wast-printer@npm:1.11.6" +"@webassemblyjs/wast-printer@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wast-printer@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.6 + "@webassemblyjs/ast": 1.12.1 "@xtuc/long": 4.2.2 - checksum: d2fa6a4c427325ec81463e9c809aa6572af6d47f619f3091bf4c4a6fc34f1da3df7caddaac50b8e7a457f8784c62cd58c6311b6cb69b0162ccd8d4c072f79cf8 + checksum: 2974b5dda8d769145ba0efd886ea94a601e61fb37114c14f9a9a7606afc23456799af652ac3052f284909bd42edc3665a76bc9b50f95f0794c053a8a1757b713 languageName: node linkType: hard @@ -5357,13 +5357,13 @@ __metadata: languageName: node linkType: hard -"enhanced-resolve@npm:^5.15.0": - version: 5.15.0 - resolution: "enhanced-resolve@npm:5.15.0" +"enhanced-resolve@npm:^5.16.0": + version: 5.16.0 + resolution: "enhanced-resolve@npm:5.16.0" dependencies: graceful-fs: ^4.2.4 tapable: ^2.2.0 - checksum: fbd8cdc9263be71cc737aa8a7d6c57b43d6aa38f6cc75dde6fcd3598a130cc465f979d2f4d01bb3bf475acb43817749c79f8eef9be048683602ca91ab52e4f11 + checksum: ccfd01850ecf2aa51e8554d539973319ff7d8a539ef1e0ba3460a0ccad6223c4ef6e19165ee64161b459cd8a48df10f52af4434c60023c65fde6afa32d475f7e languageName: node linkType: hard @@ -6387,10 +6387,10 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": - version: 4.2.10 - resolution: "graceful-fs@npm:4.2.10" - checksum: 3f109d70ae123951905d85032ebeae3c2a5a7a997430df00ea30df0e3a6c60cf6689b109654d6fdacd28810a053348c4d14642da1d075049e6be1ba5216218da +"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 languageName: node linkType: hard @@ -11628,13 +11628,13 @@ __metadata: languageName: node linkType: hard -"watchpack@npm:^2.2.0, watchpack@npm:^2.4.0": - version: 2.4.0 - resolution: "watchpack@npm:2.4.0" +"watchpack@npm:^2.2.0, watchpack@npm:^2.4.1": + version: 2.4.1 + resolution: "watchpack@npm:2.4.1" dependencies: glob-to-regexp: ^0.4.1 graceful-fs: ^4.1.2 - checksum: 23d4bc58634dbe13b86093e01c6a68d8096028b664ab7139d58f0c37d962d549a940e98f2f201cecdabd6f9c340338dc73ef8bf094a2249ef582f35183d1a131 + checksum: 5b0179348655dcdf19cac7cb4ff923fdc024d630650c0bf6bec8899cf47c60e19d4f810a88dba692ed0e7f684cf0fcffea86efdbf6c35d81f031e328043b7fab languageName: node linkType: hard @@ -11747,24 +11747,24 @@ __metadata: linkType: hard "webpack@npm:^5.73.0": - version: 5.90.3 - resolution: "webpack@npm:5.90.3" + version: 5.91.0 + resolution: "webpack@npm:5.91.0" dependencies: "@types/eslint-scope": ^3.7.3 "@types/estree": ^1.0.5 - "@webassemblyjs/ast": ^1.11.5 - "@webassemblyjs/wasm-edit": ^1.11.5 - "@webassemblyjs/wasm-parser": ^1.11.5 + "@webassemblyjs/ast": ^1.12.1 + "@webassemblyjs/wasm-edit": ^1.12.1 + "@webassemblyjs/wasm-parser": ^1.12.1 acorn: ^8.7.1 acorn-import-assertions: ^1.9.0 browserslist: ^4.21.10 chrome-trace-event: ^1.0.2 - enhanced-resolve: ^5.15.0 + enhanced-resolve: ^5.16.0 es-module-lexer: ^1.2.1 eslint-scope: 5.1.1 events: ^3.2.0 glob-to-regexp: ^0.4.1 - graceful-fs: ^4.2.9 + graceful-fs: ^4.2.11 json-parse-even-better-errors: ^2.3.1 loader-runner: ^4.2.0 mime-types: ^2.1.27 @@ -11772,14 +11772,14 @@ __metadata: schema-utils: ^3.2.0 tapable: ^2.1.1 terser-webpack-plugin: ^5.3.10 - watchpack: ^2.4.0 + watchpack: ^2.4.1 webpack-sources: ^3.2.3 peerDependenciesMeta: webpack-cli: optional: true bin: webpack: bin/webpack.js - checksum: de0c824ac220f41cc1153ac33e081d46260b104c4f2fda26f011cdf7a73f74cc091f288cb1fc16f88a36e35bac44e0aa85fc9922fdf3109dfb361f46b20f3fcc + checksum: f1073715dbb1ed5c070affef293d800a867708bcbc5aba4d8baee87660e0cf53c55966a6f36fab078d1d6c9567cdcd0a9086bdfb607cab87ea68c6449791b9a3 languageName: node linkType: hard diff --git a/yarn.lock b/yarn.lock index 2df04a207e..d45efdaf4b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20470,13 +20470,13 @@ __metadata: languageName: node linkType: hard -"@webassemblyjs/ast@npm:1.11.6, @webassemblyjs/ast@npm:^1.11.5": - version: 1.11.6 - resolution: "@webassemblyjs/ast@npm:1.11.6" +"@webassemblyjs/ast@npm:1.12.1, @webassemblyjs/ast@npm:^1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/ast@npm:1.12.1" dependencies: "@webassemblyjs/helper-numbers": 1.11.6 "@webassemblyjs/helper-wasm-bytecode": 1.11.6 - checksum: 38ef1b526ca47c210f30975b06df2faf1a8170b1636ce239fc5738fc231ce28389dd61ecedd1bacfc03cbe95b16d1af848c805652080cb60982836eb4ed2c6cf + checksum: 31bcc64147236bd7b1b6d29d1f419c1f5845c785e1e42dc9e3f8ca2e05a029e9393a271b84f3a5bff2a32d35f51ff59e2181a6e5f953fe88576acd6750506202 languageName: node linkType: hard @@ -20494,10 +20494,10 @@ __metadata: languageName: node linkType: hard -"@webassemblyjs/helper-buffer@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/helper-buffer@npm:1.11.6" - checksum: b14d0573bf680d22b2522e8a341ec451fddd645d1f9c6bd9012ccb7e587a2973b86ab7b89fe91e1c79939ba96095f503af04369a3b356c8023c13a5893221644 +"@webassemblyjs/helper-buffer@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/helper-buffer@npm:1.12.1" + checksum: c3ffb723024130308db608e86e2bdccd4868bbb62dffb0a9a1530606496f79c87f8565bd8e02805ce64912b71f1a70ee5fb00307258b0c082c3abf961d097eca languageName: node linkType: hard @@ -20519,15 +20519,15 @@ __metadata: languageName: node linkType: hard -"@webassemblyjs/helper-wasm-section@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/helper-wasm-section@npm:1.11.6" +"@webassemblyjs/helper-wasm-section@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/helper-wasm-section@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.6 - "@webassemblyjs/helper-buffer": 1.11.6 + "@webassemblyjs/ast": 1.12.1 + "@webassemblyjs/helper-buffer": 1.12.1 "@webassemblyjs/helper-wasm-bytecode": 1.11.6 - "@webassemblyjs/wasm-gen": 1.11.6 - checksum: b2cf751bf4552b5b9999d27bbb7692d0aca75260140195cb58ea6374d7b9c2dc69b61e10b211a0e773f66209c3ddd612137ed66097e3684d7816f854997682e9 + "@webassemblyjs/wasm-gen": 1.12.1 + checksum: c19810cdd2c90ff574139b6d8c0dda254d42d168a9e5b3d353d1bc085f1d7164ccd1b3c05592a45a939c47f7e403dc8d03572bb686642f06a3d02932f6f0bc8f languageName: node linkType: hard @@ -20556,68 +20556,68 @@ __metadata: languageName: node linkType: hard -"@webassemblyjs/wasm-edit@npm:^1.11.5": - version: 1.11.6 - resolution: "@webassemblyjs/wasm-edit@npm:1.11.6" +"@webassemblyjs/wasm-edit@npm:^1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-edit@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.6 - "@webassemblyjs/helper-buffer": 1.11.6 + "@webassemblyjs/ast": 1.12.1 + "@webassemblyjs/helper-buffer": 1.12.1 "@webassemblyjs/helper-wasm-bytecode": 1.11.6 - "@webassemblyjs/helper-wasm-section": 1.11.6 - "@webassemblyjs/wasm-gen": 1.11.6 - "@webassemblyjs/wasm-opt": 1.11.6 - "@webassemblyjs/wasm-parser": 1.11.6 - "@webassemblyjs/wast-printer": 1.11.6 - checksum: 29ce75870496d6fad864d815ebb072395a8a3a04dc9c3f4e1ffdc63fc5fa58b1f34304a1117296d8240054cfdbc38aca88e71fb51483cf29ffab0a61ef27b481 + "@webassemblyjs/helper-wasm-section": 1.12.1 + "@webassemblyjs/wasm-gen": 1.12.1 + "@webassemblyjs/wasm-opt": 1.12.1 + "@webassemblyjs/wasm-parser": 1.12.1 + "@webassemblyjs/wast-printer": 1.12.1 + checksum: ae23642303f030af888d30c4ef37b08dfec7eab6851a9575a616e65d1219f880d9223913a39056dd654e49049d76e97555b285d1f7e56935047abf578cce0692 languageName: node linkType: hard -"@webassemblyjs/wasm-gen@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/wasm-gen@npm:1.11.6" +"@webassemblyjs/wasm-gen@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-gen@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.6 + "@webassemblyjs/ast": 1.12.1 "@webassemblyjs/helper-wasm-bytecode": 1.11.6 "@webassemblyjs/ieee754": 1.11.6 "@webassemblyjs/leb128": 1.11.6 "@webassemblyjs/utf8": 1.11.6 - checksum: a645a2eecbea24833c3260a249704a7f554ef4a94c6000984728e94bb2bc9140a68dfd6fd21d5e0bbb09f6dfc98e083a45760a83ae0417b41a0196ff6d45a23a + checksum: 5787626bb7f0b033044471ddd00ce0c9fe1ee4584e8b73e232051e3a4c99ba1a102700d75337151c8b6055bae77eefa4548960c610a5e4a504e356bd872138ff languageName: node linkType: hard -"@webassemblyjs/wasm-opt@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/wasm-opt@npm:1.11.6" +"@webassemblyjs/wasm-opt@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-opt@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.6 - "@webassemblyjs/helper-buffer": 1.11.6 - "@webassemblyjs/wasm-gen": 1.11.6 - "@webassemblyjs/wasm-parser": 1.11.6 - checksum: b4557f195487f8e97336ddf79f7bef40d788239169aac707f6eaa2fa5fe243557c2d74e550a8e57f2788e70c7ae4e7d32f7be16101afe183d597b747a3bdd528 + "@webassemblyjs/ast": 1.12.1 + "@webassemblyjs/helper-buffer": 1.12.1 + "@webassemblyjs/wasm-gen": 1.12.1 + "@webassemblyjs/wasm-parser": 1.12.1 + checksum: 0e8fa8a0645304a1e18ff40d3db5a2e9233ebaa169b19fcc651d6fc9fe2cac0ce092ddee927318015ae735d9cd9c5d97c0cafb6a51dcd2932ac73587b62df991 languageName: node linkType: hard -"@webassemblyjs/wasm-parser@npm:1.11.6, @webassemblyjs/wasm-parser@npm:^1.11.5": - version: 1.11.6 - resolution: "@webassemblyjs/wasm-parser@npm:1.11.6" +"@webassemblyjs/wasm-parser@npm:1.12.1, @webassemblyjs/wasm-parser@npm:^1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-parser@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.6 + "@webassemblyjs/ast": 1.12.1 "@webassemblyjs/helper-api-error": 1.11.6 "@webassemblyjs/helper-wasm-bytecode": 1.11.6 "@webassemblyjs/ieee754": 1.11.6 "@webassemblyjs/leb128": 1.11.6 "@webassemblyjs/utf8": 1.11.6 - checksum: 8200a8d77c15621724a23fdabe58d5571415cda98a7058f542e670ea965dd75499f5e34a48675184947c66f3df23adf55df060312e6d72d57908e3f049620d8a + checksum: 176015de3551ac068cd4505d837414f258d9ade7442bd71efb1232fa26c9f6d7d4e11a5c816caeed389943f409af7ebff6899289a992d7a70343cb47009d21a8 languageName: node linkType: hard -"@webassemblyjs/wast-printer@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/wast-printer@npm:1.11.6" +"@webassemblyjs/wast-printer@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wast-printer@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.6 + "@webassemblyjs/ast": 1.12.1 "@xtuc/long": 4.2.2 - checksum: d2fa6a4c427325ec81463e9c809aa6572af6d47f619f3091bf4c4a6fc34f1da3df7caddaac50b8e7a457f8784c62cd58c6311b6cb69b0162ccd8d4c072f79cf8 + checksum: 2974b5dda8d769145ba0efd886ea94a601e61fb37114c14f9a9a7606afc23456799af652ac3052f284909bd42edc3665a76bc9b50f95f0794c053a8a1757b713 languageName: node linkType: hard @@ -26232,13 +26232,13 @@ __metadata: languageName: node linkType: hard -"enhanced-resolve@npm:^5.15.0": - version: 5.15.0 - resolution: "enhanced-resolve@npm:5.15.0" +"enhanced-resolve@npm:^5.16.0": + version: 5.16.0 + resolution: "enhanced-resolve@npm:5.16.0" dependencies: graceful-fs: ^4.2.4 tapable: ^2.2.0 - checksum: fbd8cdc9263be71cc737aa8a7d6c57b43d6aa38f6cc75dde6fcd3598a130cc465f979d2f4d01bb3bf475acb43817749c79f8eef9be048683602ca91ab52e4f11 + checksum: ccfd01850ecf2aa51e8554d539973319ff7d8a539ef1e0ba3460a0ccad6223c4ef6e19165ee64161b459cd8a48df10f52af4434c60023c65fde6afa32d475f7e languageName: node linkType: hard @@ -45516,13 +45516,13 @@ __metadata: languageName: node linkType: hard -"watchpack@npm:^2.4.0": - version: 2.4.0 - resolution: "watchpack@npm:2.4.0" +"watchpack@npm:^2.4.1": + version: 2.4.1 + resolution: "watchpack@npm:2.4.1" dependencies: glob-to-regexp: ^0.4.1 graceful-fs: ^4.1.2 - checksum: 23d4bc58634dbe13b86093e01c6a68d8096028b664ab7139d58f0c37d962d549a940e98f2f201cecdabd6f9c340338dc73ef8bf094a2249ef582f35183d1a131 + checksum: 5b0179348655dcdf19cac7cb4ff923fdc024d630650c0bf6bec8899cf47c60e19d4f810a88dba692ed0e7f684cf0fcffea86efdbf6c35d81f031e328043b7fab languageName: node linkType: hard @@ -45697,24 +45697,24 @@ __metadata: linkType: hard "webpack@npm:^5, webpack@npm:^5.70.0": - version: 5.90.2 - resolution: "webpack@npm:5.90.2" + version: 5.91.0 + resolution: "webpack@npm:5.91.0" dependencies: "@types/eslint-scope": ^3.7.3 "@types/estree": ^1.0.5 - "@webassemblyjs/ast": ^1.11.5 - "@webassemblyjs/wasm-edit": ^1.11.5 - "@webassemblyjs/wasm-parser": ^1.11.5 + "@webassemblyjs/ast": ^1.12.1 + "@webassemblyjs/wasm-edit": ^1.12.1 + "@webassemblyjs/wasm-parser": ^1.12.1 acorn: ^8.7.1 acorn-import-assertions: ^1.9.0 browserslist: ^4.21.10 chrome-trace-event: ^1.0.2 - enhanced-resolve: ^5.15.0 + enhanced-resolve: ^5.16.0 es-module-lexer: ^1.2.1 eslint-scope: 5.1.1 events: ^3.2.0 glob-to-regexp: ^0.4.1 - graceful-fs: ^4.2.9 + graceful-fs: ^4.2.11 json-parse-even-better-errors: ^2.3.1 loader-runner: ^4.2.0 mime-types: ^2.1.27 @@ -45722,14 +45722,14 @@ __metadata: schema-utils: ^3.2.0 tapable: ^2.1.1 terser-webpack-plugin: ^5.3.10 - watchpack: ^2.4.0 + watchpack: ^2.4.1 webpack-sources: ^3.2.3 peerDependenciesMeta: webpack-cli: optional: true bin: webpack: bin/webpack.js - checksum: 4af55f314c3610e0b17afd01960c4cf9d8d90c87a58ef7d7dc7a0a019f48e2bba4eff63b02d9da56fc61df5b04af0d66b3fa4ec82937a780d37a64db84c643fe + checksum: f1073715dbb1ed5c070affef293d800a867708bcbc5aba4d8baee87660e0cf53c55966a6f36fab078d1d6c9567cdcd0a9086bdfb607cab87ea68c6449791b9a3 languageName: node linkType: hard From 0dfd660752f72abb6f922f54fa9cbb1c205999b9 Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Mon, 8 Apr 2024 20:08:16 +0100 Subject: [PATCH 061/151] chore: update changeset change to patch as the package is < 1.0 Signed-off-by: Timothy Deakin --- .changeset/neat-weeks-wait.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/neat-weeks-wait.md b/.changeset/neat-weeks-wait.md index 5fe26cba7c..c16b91fd2f 100644 --- a/.changeset/neat-weeks-wait.md +++ b/.changeset/neat-weeks-wait.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-auth-backend-module-aws-alb-provider': minor +'@backstage/plugin-auth-backend-module-aws-alb-provider': patch --- Added support for AWS GovCloud (US) regions From 6206039bb17a0369676e7e26c856197005b7467a Mon Sep 17 00:00:00 2001 From: Heikki Hellgren Date: Tue, 9 Apr 2024 15:18:59 +0300 Subject: [PATCH 062/151] fix: entity owner relation resolution in notifications use relations instead `spec.owner` field Signed-off-by: Heikki Hellgren --- .changeset/weak-feet-whisper.md | 5 ++ .../src/service/router.ts | 46 +++++++------------ 2 files changed, 22 insertions(+), 29 deletions(-) create mode 100644 .changeset/weak-feet-whisper.md diff --git a/.changeset/weak-feet-whisper.md b/.changeset/weak-feet-whisper.md new file mode 100644 index 0000000000..1d2e4013eb --- /dev/null +++ b/.changeset/weak-feet-whisper.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-notifications-backend': patch +--- + +Fix entity owner resolution in notifications diff --git a/plugins/notifications-backend/src/service/router.ts b/plugins/notifications-backend/src/service/router.ts index ea988d851b..ac50847033 100644 --- a/plugins/notifications-backend/src/service/router.ts +++ b/plugins/notifications-backend/src/service/router.ts @@ -28,6 +28,7 @@ import { isGroupEntity, isUserEntity, RELATION_HAS_MEMBER, + RELATION_OWNED_BY, RELATION_PARENT_OF, stringifyEntityRef, } from '@backstage/catalog-model'; @@ -99,17 +100,13 @@ export async function createRouter( return []; } + const fields = ['kind', 'metadata.name', 'metadata.namespace', 'relations']; + const refs = Array.isArray(entityRef) ? entityRef : [entityRef]; const entities = await catalogClient.getEntitiesByRefs( { entityRefs: refs, - fields: [ - 'kind', - 'metadata.name', - 'metadata.namespace', - 'relations', - 'spec.owner', - ], + fields, }, { token }, ); @@ -122,29 +119,17 @@ export async function createRouter( return [stringifyEntityRef(entity)]; } else if (isGroupEntity(entity) && entity.relations) { const users = entity.relations - .filter( - relation => - relation.type === RELATION_HAS_MEMBER && relation.targetRef, - ) + .filter(relation => relation.type === RELATION_HAS_MEMBER) .map(r => r.targetRef); const childGroupRefs = entity.relations - .filter( - relation => - relation.type === RELATION_PARENT_OF && relation.targetRef, - ) + .filter(relation => relation.type === RELATION_PARENT_OF) .map(r => r.targetRef); const childGroups = await catalogClient.getEntitiesByRefs( { entityRefs: childGroupRefs, - fields: [ - 'kind', - 'metadata.name', - 'metadata.namespace', - 'relations', - 'spec.owner', - ], + fields, }, { token }, ); @@ -152,13 +137,16 @@ export async function createRouter( childGroups.items.map(mapEntity), ); return [...users, ...childGroupUsers.flat(2)]; - } else if (!isGroupEntity(entity) && entity.spec?.owner) { - const owner = await catalogClient.getEntityByRef( - entity.spec.owner as string, - { token }, - ); - if (owner) { - return mapEntity(owner); + } else if (entity.relations) { + const ownerRef = entity.relations.find( + relation => relation.type === RELATION_OWNED_BY, + )?.targetRef; + + if (ownerRef) { + const owner = await catalogClient.getEntityByRef(ownerRef, { token }); + if (owner) { + return mapEntity(owner); + } } } From b0865c7cd733ff135e1f5008ab8ded22a5e66b7e Mon Sep 17 00:00:00 2001 From: Steve Zhang Date: Tue, 9 Apr 2024 10:41:09 -0400 Subject: [PATCH 063/151] updated the changeset for this pr Signed-off-by: Steve Zhang --- .changeset/curly-news-report.md | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/.changeset/curly-news-report.md b/.changeset/curly-news-report.md index f2a7dee6d1..9463b8e72f 100644 --- a/.changeset/curly-news-report.md +++ b/.changeset/curly-news-report.md @@ -2,20 +2,4 @@ '@backstage/plugin-kubernetes-backend': patch --- -**BREAKING** The kubernetes backend now can handle when req.header is undefined. - -These changes are **required** to `plugins/kubernetes-backend/src/service/KubernetesProxy.ts` - -```diff --- a/plugins/kubernetes-backend/src/service/KubernetesProxy.ts -+++ b/plugins/kubernetes-backend/src/service/KubernetesProxy.ts -@@ -172,7 +172,7 @@ export class KubernetesProxy { - )?.toString(), - }; - -- const authHeader = req.header(HEADER_KUBERNETES_AUTH); -+ const authHeader = req.header?.(HEADER_KUBERNETES_AUTH); - if (authHeader) { - req.headers.authorization = authHeader; - } else { -``` +Fixed a bug where the proxy handler did not properly handle a missing header From 2c50516d51a883e46afb70f65658794eb67bd0b6 Mon Sep 17 00:00:00 2001 From: Phil Kuang Date: Tue, 9 Apr 2024 17:48:36 -0400 Subject: [PATCH 064/151] fix(cookieAuth): prefer issuing cookies against target host instead of origin Signed-off-by: Phil Kuang --- .changeset/curly-bottles-complain.md | 5 +++++ .../implementations/httpAuth/httpAuthServiceFactory.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/curly-bottles-complain.md diff --git a/.changeset/curly-bottles-complain.md b/.changeset/curly-bottles-complain.md new file mode 100644 index 0000000000..c83a3921e2 --- /dev/null +++ b/.changeset/curly-bottles-complain.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-app-api': patch +--- + +Fix auth cookie issuance for split backend deployments by preferring to set it against the request target host instead of origin diff --git a/packages/backend-app-api/src/services/implementations/httpAuth/httpAuthServiceFactory.ts b/packages/backend-app-api/src/services/implementations/httpAuth/httpAuthServiceFactory.ts index fe927eaa5d..d6f5ceefa8 100644 --- a/packages/backend-app-api/src/services/implementations/httpAuth/httpAuthServiceFactory.ts +++ b/packages/backend-app-api/src/services/implementations/httpAuth/httpAuthServiceFactory.ts @@ -232,7 +232,7 @@ class DefaultHttpAuthService implements HttpAuthService { const externalBaseUrlStr = await this.#discovery.getExternalBaseUrl( this.#pluginId, ); - const externalBaseUrl = new URL(origin ?? externalBaseUrlStr); + const externalBaseUrl = new URL(externalBaseUrlStr ?? origin); const secure = externalBaseUrl.protocol === 'https:' || From e003e0ec87bebe60744bb671fdd12bf7eef43c9c Mon Sep 17 00:00:00 2001 From: Marek Libra Date: Thu, 28 Mar 2024 09:37:43 +0100 Subject: [PATCH 065/151] fix(notifications): export notificationSeverities for reuse The ordered array of constants is exported by the notifications-common for reusability by other plugins. Signed-off-by: Marek Libra --- .changeset/moody-pianos-notice.md | 6 +++++ .../config/vocabularies/Backstage/accept.txt | 1 + .../database/DatabaseNotificationsStore.ts | 14 +++------- plugins/notifications-common/api-report.md | 3 +++ plugins/notifications-common/src/constants.ts | 26 +++++++++++++++++++ plugins/notifications-common/src/index.ts | 1 + 6 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 .changeset/moody-pianos-notice.md create mode 100644 plugins/notifications-common/src/constants.ts diff --git a/.changeset/moody-pianos-notice.md b/.changeset/moody-pianos-notice.md new file mode 100644 index 0000000000..beb686fb6b --- /dev/null +++ b/.changeset/moody-pianos-notice.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-notifications-backend': patch +'@backstage/plugin-notifications-common': patch +--- + +The ordered list of notifications' severities is exported by notifications-common for reusability. diff --git a/.github/vale/config/vocabularies/Backstage/accept.txt b/.github/vale/config/vocabularies/Backstage/accept.txt index 043728013f..b525d7e48e 100644 --- a/.github/vale/config/vocabularies/Backstage/accept.txt +++ b/.github/vale/config/vocabularies/Backstage/accept.txt @@ -475,3 +475,4 @@ Zolotusky zoomable zsh scrollable +severities diff --git a/plugins/notifications-backend/src/database/DatabaseNotificationsStore.ts b/plugins/notifications-backend/src/database/DatabaseNotificationsStore.ts index f4f1f174be..ae548a9892 100644 --- a/plugins/notifications-backend/src/database/DatabaseNotificationsStore.ts +++ b/plugins/notifications-backend/src/database/DatabaseNotificationsStore.ts @@ -25,6 +25,7 @@ import { import { Notification, NotificationSeverity, + notificationSeverities, } from '@backstage/plugin-notifications-common'; import { Knex } from 'knex'; @@ -49,16 +50,9 @@ const NOTIFICATION_COLUMNS = [ 'saved', ]; -const severities: NotificationSeverity[] = [ - 'critical', - 'high', - 'normal', - 'low', -]; - export const normalizeSeverity = (input?: string): NotificationSeverity => { let lower = (input ?? 'normal').toLowerCase() as NotificationSeverity; - if (severities.indexOf(lower) < 0) { + if (notificationSeverities.indexOf(lower) < 0) { lower = 'normal'; } return lower; @@ -219,8 +213,8 @@ export class DatabaseNotificationsStore implements NotificationsStore { } // or match both if undefined if (options.minimumSeverity !== undefined) { - const idx = severities.indexOf(options.minimumSeverity); - const equalOrHigher = severities.slice(0, idx + 1); + const idx = notificationSeverities.indexOf(options.minimumSeverity); + const equalOrHigher = notificationSeverities.slice(0, idx + 1); query.whereIn('severity', equalOrHigher); } diff --git a/plugins/notifications-common/api-report.md b/plugins/notifications-common/api-report.md index bd01aa7f5a..bdcd202ed3 100644 --- a/plugins/notifications-common/api-report.md +++ b/plugins/notifications-common/api-report.md @@ -39,6 +39,9 @@ export type NotificationReadSignal = { notification_ids: string[]; }; +// @public +export const notificationSeverities: NotificationSeverity[]; + // @public (undocumented) export type NotificationSeverity = 'critical' | 'high' | 'normal' | 'low'; diff --git a/plugins/notifications-common/src/constants.ts b/plugins/notifications-common/src/constants.ts new file mode 100644 index 0000000000..3c0610737c --- /dev/null +++ b/plugins/notifications-common/src/constants.ts @@ -0,0 +1,26 @@ +/* + * Copyright 2024 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 { NotificationSeverity } from './types'; + +/** Ordered list of severities used by the Notifications. + * + * @public */ +export const notificationSeverities: NotificationSeverity[] = [ + 'critical', + 'high', + 'normal', + 'low', +]; diff --git a/plugins/notifications-common/src/index.ts b/plugins/notifications-common/src/index.ts index 8d9f26f07a..7d74c75be8 100644 --- a/plugins/notifications-common/src/index.ts +++ b/plugins/notifications-common/src/index.ts @@ -21,3 +21,4 @@ */ export * from './types'; +export * from './constants'; From 57e2a3c14b2efeb1d450899c60386769d6666895 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 11:52:31 +0000 Subject: [PATCH 066/151] fix(deps): update dependency @swc/core to v1.4.13 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- microsite/yarn.lock | 86 ++++++++++++++++++++++----------------------- storybook/yarn.lock | 86 ++++++++++++++++++++++----------------------- yarn.lock | 86 ++++++++++++++++++++++----------------------- 3 files changed, 129 insertions(+), 129 deletions(-) diff --git a/microsite/yarn.lock b/microsite/yarn.lock index 01c440958f..19ebed805d 100644 --- a/microsite/yarn.lock +++ b/microsite/yarn.lock @@ -2697,90 +2697,90 @@ __metadata: languageName: node linkType: hard -"@swc/core-darwin-arm64@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-darwin-arm64@npm:1.4.12" +"@swc/core-darwin-arm64@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-darwin-arm64@npm:1.4.13" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@swc/core-darwin-x64@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-darwin-x64@npm:1.4.12" +"@swc/core-darwin-x64@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-darwin-x64@npm:1.4.13" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@swc/core-linux-arm-gnueabihf@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-linux-arm-gnueabihf@npm:1.4.12" +"@swc/core-linux-arm-gnueabihf@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-linux-arm-gnueabihf@npm:1.4.13" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@swc/core-linux-arm64-gnu@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-linux-arm64-gnu@npm:1.4.12" +"@swc/core-linux-arm64-gnu@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-linux-arm64-gnu@npm:1.4.13" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@swc/core-linux-arm64-musl@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-linux-arm64-musl@npm:1.4.12" +"@swc/core-linux-arm64-musl@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-linux-arm64-musl@npm:1.4.13" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@swc/core-linux-x64-gnu@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-linux-x64-gnu@npm:1.4.12" +"@swc/core-linux-x64-gnu@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-linux-x64-gnu@npm:1.4.13" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@swc/core-linux-x64-musl@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-linux-x64-musl@npm:1.4.12" +"@swc/core-linux-x64-musl@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-linux-x64-musl@npm:1.4.13" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@swc/core-win32-arm64-msvc@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-win32-arm64-msvc@npm:1.4.12" +"@swc/core-win32-arm64-msvc@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-win32-arm64-msvc@npm:1.4.13" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@swc/core-win32-ia32-msvc@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-win32-ia32-msvc@npm:1.4.12" +"@swc/core-win32-ia32-msvc@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-win32-ia32-msvc@npm:1.4.13" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@swc/core-win32-x64-msvc@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-win32-x64-msvc@npm:1.4.12" +"@swc/core-win32-x64-msvc@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-win32-x64-msvc@npm:1.4.13" conditions: os=win32 & cpu=x64 languageName: node linkType: hard "@swc/core@npm:^1.3.46": - version: 1.4.12 - resolution: "@swc/core@npm:1.4.12" + version: 1.4.13 + resolution: "@swc/core@npm:1.4.13" dependencies: - "@swc/core-darwin-arm64": 1.4.12 - "@swc/core-darwin-x64": 1.4.12 - "@swc/core-linux-arm-gnueabihf": 1.4.12 - "@swc/core-linux-arm64-gnu": 1.4.12 - "@swc/core-linux-arm64-musl": 1.4.12 - "@swc/core-linux-x64-gnu": 1.4.12 - "@swc/core-linux-x64-musl": 1.4.12 - "@swc/core-win32-arm64-msvc": 1.4.12 - "@swc/core-win32-ia32-msvc": 1.4.12 - "@swc/core-win32-x64-msvc": 1.4.12 + "@swc/core-darwin-arm64": 1.4.13 + "@swc/core-darwin-x64": 1.4.13 + "@swc/core-linux-arm-gnueabihf": 1.4.13 + "@swc/core-linux-arm64-gnu": 1.4.13 + "@swc/core-linux-arm64-musl": 1.4.13 + "@swc/core-linux-x64-gnu": 1.4.13 + "@swc/core-linux-x64-musl": 1.4.13 + "@swc/core-win32-arm64-msvc": 1.4.13 + "@swc/core-win32-ia32-msvc": 1.4.13 + "@swc/core-win32-x64-msvc": 1.4.13 "@swc/counter": ^0.1.2 "@swc/types": ^0.1.5 peerDependencies: @@ -2809,7 +2809,7 @@ __metadata: peerDependenciesMeta: "@swc/helpers": optional: true - checksum: 53f81173eb3f5a4b9fe651091de485379f4e298d2b24f321dd4c08dfc05976556241b0ec1a91d979c6bdb8c1a9ac7a751b50fb9062d8a3071b7acb3db6e6b7c1 + checksum: 872985690821e79d6bc869f248557362097ce5dc961e170540fff480dda4d53f60f2f7eead95974a9dd753de2dc186fc19591abad7430f382483c644d7c3c05b languageName: node linkType: hard diff --git a/storybook/yarn.lock b/storybook/yarn.lock index 70f86d7e7f..97427e8779 100644 --- a/storybook/yarn.lock +++ b/storybook/yarn.lock @@ -2842,90 +2842,90 @@ __metadata: languageName: node linkType: hard -"@swc/core-darwin-arm64@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-darwin-arm64@npm:1.4.12" +"@swc/core-darwin-arm64@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-darwin-arm64@npm:1.4.13" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@swc/core-darwin-x64@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-darwin-x64@npm:1.4.12" +"@swc/core-darwin-x64@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-darwin-x64@npm:1.4.13" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@swc/core-linux-arm-gnueabihf@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-linux-arm-gnueabihf@npm:1.4.12" +"@swc/core-linux-arm-gnueabihf@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-linux-arm-gnueabihf@npm:1.4.13" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@swc/core-linux-arm64-gnu@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-linux-arm64-gnu@npm:1.4.12" +"@swc/core-linux-arm64-gnu@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-linux-arm64-gnu@npm:1.4.13" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@swc/core-linux-arm64-musl@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-linux-arm64-musl@npm:1.4.12" +"@swc/core-linux-arm64-musl@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-linux-arm64-musl@npm:1.4.13" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@swc/core-linux-x64-gnu@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-linux-x64-gnu@npm:1.4.12" +"@swc/core-linux-x64-gnu@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-linux-x64-gnu@npm:1.4.13" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@swc/core-linux-x64-musl@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-linux-x64-musl@npm:1.4.12" +"@swc/core-linux-x64-musl@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-linux-x64-musl@npm:1.4.13" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@swc/core-win32-arm64-msvc@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-win32-arm64-msvc@npm:1.4.12" +"@swc/core-win32-arm64-msvc@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-win32-arm64-msvc@npm:1.4.13" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@swc/core-win32-ia32-msvc@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-win32-ia32-msvc@npm:1.4.12" +"@swc/core-win32-ia32-msvc@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-win32-ia32-msvc@npm:1.4.13" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@swc/core-win32-x64-msvc@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-win32-x64-msvc@npm:1.4.12" +"@swc/core-win32-x64-msvc@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-win32-x64-msvc@npm:1.4.13" conditions: os=win32 & cpu=x64 languageName: node linkType: hard "@swc/core@npm:^1.3.46": - version: 1.4.12 - resolution: "@swc/core@npm:1.4.12" + version: 1.4.13 + resolution: "@swc/core@npm:1.4.13" dependencies: - "@swc/core-darwin-arm64": 1.4.12 - "@swc/core-darwin-x64": 1.4.12 - "@swc/core-linux-arm-gnueabihf": 1.4.12 - "@swc/core-linux-arm64-gnu": 1.4.12 - "@swc/core-linux-arm64-musl": 1.4.12 - "@swc/core-linux-x64-gnu": 1.4.12 - "@swc/core-linux-x64-musl": 1.4.12 - "@swc/core-win32-arm64-msvc": 1.4.12 - "@swc/core-win32-ia32-msvc": 1.4.12 - "@swc/core-win32-x64-msvc": 1.4.12 + "@swc/core-darwin-arm64": 1.4.13 + "@swc/core-darwin-x64": 1.4.13 + "@swc/core-linux-arm-gnueabihf": 1.4.13 + "@swc/core-linux-arm64-gnu": 1.4.13 + "@swc/core-linux-arm64-musl": 1.4.13 + "@swc/core-linux-x64-gnu": 1.4.13 + "@swc/core-linux-x64-musl": 1.4.13 + "@swc/core-win32-arm64-msvc": 1.4.13 + "@swc/core-win32-ia32-msvc": 1.4.13 + "@swc/core-win32-x64-msvc": 1.4.13 "@swc/counter": ^0.1.2 "@swc/types": ^0.1.5 peerDependencies: @@ -2954,7 +2954,7 @@ __metadata: peerDependenciesMeta: "@swc/helpers": optional: true - checksum: 53f81173eb3f5a4b9fe651091de485379f4e298d2b24f321dd4c08dfc05976556241b0ec1a91d979c6bdb8c1a9ac7a751b50fb9062d8a3071b7acb3db6e6b7c1 + checksum: 872985690821e79d6bc869f248557362097ce5dc961e170540fff480dda4d53f60f2f7eead95974a9dd753de2dc186fc19591abad7430f382483c644d7c3c05b languageName: node linkType: hard diff --git a/yarn.lock b/yarn.lock index e9fe0ab0e2..af485a2de6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17726,90 +17726,90 @@ __metadata: languageName: node linkType: hard -"@swc/core-darwin-arm64@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-darwin-arm64@npm:1.4.12" +"@swc/core-darwin-arm64@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-darwin-arm64@npm:1.4.13" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@swc/core-darwin-x64@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-darwin-x64@npm:1.4.12" +"@swc/core-darwin-x64@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-darwin-x64@npm:1.4.13" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@swc/core-linux-arm-gnueabihf@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-linux-arm-gnueabihf@npm:1.4.12" +"@swc/core-linux-arm-gnueabihf@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-linux-arm-gnueabihf@npm:1.4.13" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@swc/core-linux-arm64-gnu@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-linux-arm64-gnu@npm:1.4.12" +"@swc/core-linux-arm64-gnu@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-linux-arm64-gnu@npm:1.4.13" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@swc/core-linux-arm64-musl@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-linux-arm64-musl@npm:1.4.12" +"@swc/core-linux-arm64-musl@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-linux-arm64-musl@npm:1.4.13" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@swc/core-linux-x64-gnu@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-linux-x64-gnu@npm:1.4.12" +"@swc/core-linux-x64-gnu@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-linux-x64-gnu@npm:1.4.13" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@swc/core-linux-x64-musl@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-linux-x64-musl@npm:1.4.12" +"@swc/core-linux-x64-musl@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-linux-x64-musl@npm:1.4.13" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@swc/core-win32-arm64-msvc@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-win32-arm64-msvc@npm:1.4.12" +"@swc/core-win32-arm64-msvc@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-win32-arm64-msvc@npm:1.4.13" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@swc/core-win32-ia32-msvc@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-win32-ia32-msvc@npm:1.4.12" +"@swc/core-win32-ia32-msvc@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-win32-ia32-msvc@npm:1.4.13" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@swc/core-win32-x64-msvc@npm:1.4.12": - version: 1.4.12 - resolution: "@swc/core-win32-x64-msvc@npm:1.4.12" +"@swc/core-win32-x64-msvc@npm:1.4.13": + version: 1.4.13 + resolution: "@swc/core-win32-x64-msvc@npm:1.4.13" conditions: os=win32 & cpu=x64 languageName: node linkType: hard "@swc/core@npm:^1.3.46": - version: 1.4.12 - resolution: "@swc/core@npm:1.4.12" + version: 1.4.13 + resolution: "@swc/core@npm:1.4.13" dependencies: - "@swc/core-darwin-arm64": 1.4.12 - "@swc/core-darwin-x64": 1.4.12 - "@swc/core-linux-arm-gnueabihf": 1.4.12 - "@swc/core-linux-arm64-gnu": 1.4.12 - "@swc/core-linux-arm64-musl": 1.4.12 - "@swc/core-linux-x64-gnu": 1.4.12 - "@swc/core-linux-x64-musl": 1.4.12 - "@swc/core-win32-arm64-msvc": 1.4.12 - "@swc/core-win32-ia32-msvc": 1.4.12 - "@swc/core-win32-x64-msvc": 1.4.12 + "@swc/core-darwin-arm64": 1.4.13 + "@swc/core-darwin-x64": 1.4.13 + "@swc/core-linux-arm-gnueabihf": 1.4.13 + "@swc/core-linux-arm64-gnu": 1.4.13 + "@swc/core-linux-arm64-musl": 1.4.13 + "@swc/core-linux-x64-gnu": 1.4.13 + "@swc/core-linux-x64-musl": 1.4.13 + "@swc/core-win32-arm64-msvc": 1.4.13 + "@swc/core-win32-ia32-msvc": 1.4.13 + "@swc/core-win32-x64-msvc": 1.4.13 "@swc/counter": ^0.1.2 "@swc/types": ^0.1.5 peerDependencies: @@ -17838,7 +17838,7 @@ __metadata: peerDependenciesMeta: "@swc/helpers": optional: true - checksum: 53f81173eb3f5a4b9fe651091de485379f4e298d2b24f321dd4c08dfc05976556241b0ec1a91d979c6bdb8c1a9ac7a751b50fb9062d8a3071b7acb3db6e6b7c1 + checksum: 872985690821e79d6bc869f248557362097ce5dc961e170540fff480dda4d53f60f2f7eead95974a9dd753de2dc186fc19591abad7430f382483c644d7c3c05b languageName: node linkType: hard From cfefd94354d9281f88e64d30537503182c05b365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Wed, 10 Apr 2024 13:54:51 +0200 Subject: [PATCH 067/151] update the sign-in resolver docs for the new backend system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- docs/auth/identity-resolver--old.md | 379 ++++++++++++++++++++ docs/auth/identity-resolver.md | 519 +++++++++++++++------------- 2 files changed, 649 insertions(+), 249 deletions(-) create mode 100644 docs/auth/identity-resolver--old.md diff --git a/docs/auth/identity-resolver--old.md b/docs/auth/identity-resolver--old.md new file mode 100644 index 0000000000..c1a207484a --- /dev/null +++ b/docs/auth/identity-resolver--old.md @@ -0,0 +1,379 @@ +--- +id: identity-resolver--old +title: Sign-in Identities and Resolvers (Old Backend System) +description: An introduction to Backstage user identities and sign-in resolvers in the old backend system +--- + +:::info +This documentation is written for the old backend which has been replaced by +[the new backend system](../backend-system/index.md), being the default since +Backstage [version 1.24](../releases/v1.24.0.md). If have migrated to the new +backend system, you may want to read [its own article](./identity-resolver.md) +instead. +::: + +By default, every Backstage auth provider is configured only for the use-case of +access delegation. This enables Backstage to request resources and actions from +external systems on behalf of the user, for example re-triggering a build in CI. + +If you want to use an auth provider to sign in users, you need to explicitly configure +it have sign-in enabled and also tell it how the external identities should +be mapped to user identities within Backstage. + +## Quick Start + +> See [providers](../reference/plugin-auth-backend.providers.md) +> for a full list of auth providers and their built-in sign-in resolvers. + +Backstage projects created with `npx @backstage/create-app` come configured with a +sign-in resolver for GitHub guest access. This resolver makes all users share +a single "guest" identity and is only intended as a minimum requirement to quickly +get up and running. You can replace `github` for any of the other providers if you need. + +This resolver should not be used in production, as it uses a single shared identity, +and has no restrictions on who is able to sign-in. Be sure to read through the rest +of this page to understand the Backstage identity system once you need to install +a resolver for your production environment. + +The guest resolver can be useful for testing purposes too, and it looks like this: + +```ts +signIn: { + resolver(_, ctx) { + const userRef = 'user:default/guest' + return ctx.issueToken({ + claims: { + sub: userRef, + ent: [userRef], + }, + }), + }, +}, +``` + +## Backstage User Identity + +A user identity within Backstage is built up from two pieces of information, a +user [entity reference](../features/software-catalog/references.md), and a +set of ownership entity references. +When a user signs in, a Backstage token is generated with these two pieces of information, +which is then used to identify the user within the Backstage ecosystem. + +The user entity reference should uniquely identify the logged in user in Backstage. +It is encouraged that a matching user entity also exists within the Software Catalog, +but it is not required. If the user entity exists in the catalog it can be used to +store additional data about the user. There may even be some plugins that require +this for them to be able to function. + +The ownership references are also entity references, and it is likewise +encouraged that these entities exist within the catalog, but it is not a requirement. +The ownership references are used to determine what the user owns, as a set +of references that the user claims ownership though. For example, a user +Jane (`user:default/jane`) might have the ownership references `user:default/jane`, +`group:default/team-a`, and `group:default/admins`. Given these ownership claims, +any entity that is marked as owned by either of `user:jane`, `team-a`, or `admins` would +be considered owned by Jane. + +The ownership claims often contain the user entity reference itself, but it is not +required. It is also worth noting that the ownership claims can also be used to +resolve other relations similar to ownership, such as a claim for a `maintainer` or +`operator` status. + +The Backstage token that encapsulates the user identity is a JWT. The user entity +reference is stored in the `sub` claim of the payload, while the ownership references +are stored in a custom `ent` claim. Both the user and ownership references should +always be full entity references, as opposed to shorthands like just `jane` or `user:jane`. + +## Sign-in Resolvers + +Signing in a user into Backstage requires a mapping of the user identity from the +third-party auth provider to a Backstage user identity. This mapping can vary quite +a lot between different organizations and auth providers, and because of that there's +no default way to resolve user identities. The auth provider that one wants to use +for sign-in must instead be configured with a sign-in resolver, which is a function +that is responsible for creating this user identity mapping. + +The input to the sign-in resolver function is the result of a successful log in with +the given auth provider, as well as a context object that contains various helpers +for looking up users and issuing tokens. There are also a number of built-in sign-in +resolvers that can be used, which are covered a bit further down. + +Note that while it possible to configure multiple auth providers to be used for sign-in, +you should take care when doing so. It is best to make sure that the different auth +providers either do not have any user overlap, or that any users that are able to log +in with multiple providers always end up with the same Backstage identity. + +### Custom Resolver Example + +Let's look at an example of a custom sign-in resolver for the Google auth provider. +This all typically happens within your `packages/backend/src/plugins/auth.ts` file, +which is responsible for setting up and configuring the auth backend plugin. + +You provide the resolver as part of the options you pass when creating a new auth +provider factory. This means you need to replace the default Google provider with +one that you create. Be sure to also include the existing `defaultAuthProviderFactories` +if you want to keep all of the built-in auth providers installed. + +Now let's look at the example, with the rest of the commentary being made with in +the code comments: + +```ts +// File: packages/backend/src/plugins/auth.ts +import { + createRouter, + providers, + defaultAuthProviderFactories, +} from '@backstage/plugin-auth-backend'; +import { Router } from 'express'; +import { PluginEnvironment } from '../types'; + +export default async function createPlugin( + env: PluginEnvironment, +): Promise { + return await createRouter({ + ...env, + providerFactories: { + ...defaultAuthProviderFactories, + google: providers.google.create({ + signIn: { + resolver: async (info, ctx) => { + const { + profile: { email }, + } = info; + // Profiles are not always guaranteed to to have an email address. + // You can also find more provider-specific information in `info.result`. + // It typically contains a `fullProfile` object as well as ID and/or access + // tokens that you can use for additional lookups. + if (!email) { + throw new Error('User profile contained no email'); + } + + // You can add your own custom validation logic here. + // Logins can be prevented by throwing an error like the one above. + myEmailValidator(email); + + // This example resolver simply uses the local part of the email as the name. + const [name] = email.split('@'); + + // This helper function handles sign-in by looking up a user in the catalog. + // The lookup can be done either by reference, annotations, or custom filters. + // + // The helper also issues a token for the user, using the standard group + // membership logic to determine the ownership references of the user. + return ctx.signInWithCatalogUser({ + entityRef: { name }, + }); + }, + }, + }), + }, + }); +} +``` + +### Built-in Resolvers + +You don't always have to write your own custom resolver. The auth backend plugin provides +built-in resolvers for many of the common sign-in patterns. You access these via the `resolvers` +property of each of the auth provider integrations. For example, the Google provider has +a built in resolver that works just like the one we defined above: + +```ts +// File: packages/backend/src/plugins/auth.ts +export default async function createPlugin( + // ... + return await createRouter({ + // ... + providerFactories: { + // ... + google: providers.google.create({ + signIn: { + resolver: providers.google.resolvers.emailLocalPartMatchingUserEntityName(), + }, + }); + } + }) +) +``` + +There are also other options, like the this one that looks up a user +by matching the `google.com/email` annotation of user entities in the catalog: + +```ts +providers.google.create({ + signIn: { + resolver: providers.google.resolvers.emailMatchingUserEntityAnnotation(), + }, +}); +``` + +## Custom Ownership Resolution + +If you want to have more control over the membership resolution and token generation +that happens during sign-in you can replace `ctx.signInWithCatalogUser` with a set +of lower-level calls: + +```ts +// File: packages/backend/src/plugins/auth.ts +import { getDefaultOwnershipEntityRefs } from '@backstage/plugin-auth-backend'; + +export default async function createPlugin( + // ... + return await createRouter({ + // ... + providerFactories: { + // ... + google: async ({ profile: { email } }, ctx) => { + if (!email) { + throw new Error('User profile contained no email'); + } + + // This step calls the catalog to look up a user entity. You could for example + // replace it with a call to a different external system. + const { entity } = await ctx.findCatalogUser({ + annotations: { + 'acme.org/email': email, + }, + }); + + // In this step we extract the ownership references from the user entity using + // the standard logic. It uses a reference to the entity itself, as well as the + // target of each `memberOf` relation where the target is of the kind `Group`. + // + // If you replace the catalog lookup with something that does not return + // an entity you will need to replace this step as well. + // + // You might also replace it if you for example want to filter out certain groups. + // + // Note that `getDefaultOwnershipEntityRefs` only includes groups to which the + // user has a direct MEMBER_OF relationship. It's perfectly fine to include + // groups that the user is transitively part of in the claims array, but the + // catalog doesn't currently provide a direct way of accessing this list of + // groups. + const ownershipRefs = getDefaultOwnershipEntityRefs(entity); + + // The last step is to issue the token, where we might provide more options in the future. + return ctx.issueToken({ + claims: { + sub: stringifyEntityRef(entity), + ent: ownershipRefs, + }, + }); + }; + } + }) +) +``` + +## Sign-In without Users in the Catalog + +While populating the catalog with organizational data unlocks more powerful ways +to browse your software ecosystem, it might not always be a viable or prioritized +option. However, even if you do not have user entities populated in your catalog, you +can still sign in users. As there are currently no built-in sign-in resolvers for +this scenario you will need to implement your own. + +Signing in a user that doesn't exist in the catalog is as simple as skipping the +catalog lookup step from the above example. Rather than looking up the user, we +instead immediately issue a token using whatever information is available. One caveat +is that it can be tricky to determine the ownership references, although it can +be achieved for example through a lookup to an external service. You typically +want to at least use the user itself as a lone ownership reference. + +Because we no longer use the catalog as an allow-list of users, it is often important +that you limit what users are allowed to sign in. This could be a simple email domain +check like in the example below, or you might for example look up the GitHub organizations +that the user belongs to using the user access token in the provided result object. + +```ts +// File: packages/backend/src/plugins/auth.ts +import { createRouter, providers } from '@backstage/plugin-auth-backend'; +import { Router } from 'express'; +import { PluginEnvironment } from '../types'; +import { + stringifyEntityRef, + DEFAULT_NAMESPACE, +} from '@backstage/catalog-model'; + +export default async function createPlugin( + env: PluginEnvironment, +): Promise { + return await createRouter({ + ...env, + providerFactories: { + google: providers.google.create({ + signIn: { + resolver: async ({ profile }, ctx) => { + if (!profile.email) { + throw new Error( + 'Login failed, user profile does not contain an email', + ); + } + // Split the email into the local part and the domain. + const [localPart, domain] = profile.email.split('@'); + + // Next we verify the email domain. It is recommended to include this + // kind of check if you don't look up the user in an external service. + if (domain !== 'acme.org') { + throw new Error( + `Login failed, this email ${profile.email} does not belong to the expected domain`, + ); + } + + // By using `stringifyEntityRef` we ensure that the reference is formatted correctly + const userEntity = stringifyEntityRef({ + kind: 'User', + name: localPart, + namespace: DEFAULT_NAMESPACE, + }); + return ctx.issueToken({ + claims: { + sub: userEntity, + ent: [userEntity], + }, + }); + }, + }, + }), + }, + }); +} +``` + +## AuthHandler + +Similar to a custom sign-in resolver, you can also write a custom auth handler +function which is used to verify and convert the auth response into the profile +that will be presented to the user. This is where you can customize things like +display name and profile picture. + +This is also the place where you can do authorization and validation of the user +and throw errors if the user should not be allowed access in Backstage. + +```ts +// File: packages/backend/src/plugins/auth.ts +export default async function createPlugin( + env: PluginEnvironment, +): Promise { + return await createRouter({ + ... + providerFactories: { + google: providers.google.create({ + authHandler: async ({ + fullProfile // Type: passport.Profile, + idToken // Type: (Optional) string, + }) => { + // Custom validation code goes here + return { + profile: { + email, + picture, + displayName, + } + }; + } + }) + } + }) +} +``` diff --git a/docs/auth/identity-resolver.md b/docs/auth/identity-resolver.md index 0a626ef175..aedba5a9c2 100644 --- a/docs/auth/identity-resolver.md +++ b/docs/auth/identity-resolver.md @@ -4,6 +4,14 @@ title: Sign-in Identities and Resolvers description: An introduction to Backstage user identities and sign-in resolvers --- +:::info +This documentation is written for [the new backend +system](../backend-system/index.md) which is the default since Backstage +[version 1.24](../releases/v1.24.0.md). If you are still on the old backend +system, you may want to read [its own article](./identity-resolver--old.md) +instead. +::: + By default, every Backstage auth provider is configured only for the use-case of access delegation. This enables Backstage to request resources and actions from external systems on behalf of the user, for example re-triggering a build in CI. @@ -14,42 +22,24 @@ be mapped to user identities within Backstage. ## Quick Start -> See [providers](../reference/plugin-auth-backend.providers.md) -> for a full list of auth providers and their built-in sign-in resolvers. +Backstage projects created with `npx @backstage/create-app` come configured with +a [guest auth provider](https://backstage.io/docs/auth/guest/provider). This +provider makes all users share a single "guest" identity. This is useful for +testing purposes and quickly getting started locally, but is not safe for use in +production and that particular provider will refuse to work there. -Backstage projects created with `npx @backstage/create-app` come configured with a -sign-in resolver for GitHub guest access. This resolver makes all users share -a single "guest" identity and is only intended as a minimum requirement to quickly -get up and running. You can replace `github` for any of the other providers if you need. - -This resolver should not be used in production, as it uses a single shared identity, -and has no restrictions on who is able to sign-in. Be sure to read through the rest -of this page to understand the Backstage identity system once you need to install -a resolver for your production environment. - -The guest resolver can be useful for testing purposes too, and it looks like this: - -```ts -signIn: { - resolver(_, ctx) { - const userRef = 'user:default/guest' - return ctx.issueToken({ - claims: { - sub: userRef, - ent: [userRef], - }, - }), - }, -}, -``` +Because of this, one of the early things you want to do when standing up your +Backstage instance is to choose a production ready auth provider. See [the auth +overview page](./index.md) for a full list of providers and how to install and +configure them. ## Backstage User Identity -A user identity within Backstage is built up from two pieces of information, a -user [entity reference](../features/software-catalog/references.md), and a -set of ownership entity references. -When a user signs in, a Backstage token is generated with these two pieces of information, -which is then used to identify the user within the Backstage ecosystem. +A user identity within Backstage is built up from two main pieces of +information: a user [entity +reference](../features/software-catalog/references.md), and a set of ownership +references. When a user signs in, a Backstage token is generated which is then +used to identify the user within the Backstage ecosystem. The user entity reference should uniquely identify the logged in user in Backstage. It is encouraged that a matching user entity also exists within the Software Catalog, @@ -71,10 +61,13 @@ required. It is also worth noting that the ownership claims can also be used to resolve other relations similar to ownership, such as a claim for a `maintainer` or `operator` status. -The Backstage token that encapsulates the user identity is a JWT. The user entity -reference is stored in the `sub` claim of the payload, while the ownership references -are stored in a custom `ent` claim. Both the user and ownership references should -always be full entity references, as opposed to shorthands like just `jane` or `user:jane`. +The Backstage token that encapsulates the user identity is a JWT. The user +entity reference is stored in the `sub` claim of the payload, while the +ownership references are stored in a custom `ent` claim in the old backend +system but instead is made available through a user info API endpoint on the +auth backend in the new system. Both the user and ownership references should +always be full entity references, as opposed to shorthands like just `jane` or +`user:jane`. ## Sign-in Resolvers @@ -90,116 +83,156 @@ the given auth provider, as well as a context object that contains various helpe for looking up users and issuing tokens. There are also a number of built-in sign-in resolvers that can be used, which are covered a bit further down. -Note that while it possible to configure multiple auth providers to be used for sign-in, -you should take care when doing so. It is best to make sure that the different auth -providers either do not have any user overlap, or that any users that are able to log -in with multiple providers always end up with the same Backstage identity. +Note that while it possible to configure multiple auth providers to be used for +sign-in, you should take care when doing so. It is best to make sure that the +different auth providers either do not have any user overlap, or that any users +that are able to log in with multiple providers always end up with the same +Backstage identity. For most organizations, it makes the most sense to provide +only one sign-in method. -### Custom Resolver Example +### Using Builtin Resolvers -Let's look at an example of a custom sign-in resolver for the Google auth provider. -This all typically happens within your `packages/backend/src/plugins/auth.ts` file, -which is responsible for setting up and configuring the auth backend plugin. +Most auth providers come with a set of builtin sign in providers that you can +choose from. They target the most common use cases, and if they fit your needs, +you can pick one or more of them without having to write any code at all. You +still have to make a choice - as mentioned above, even if there are a set of +builtins, none of them are selected by default. -You provide the resolver as part of the options you pass when creating a new auth -provider factory. This means you need to replace the default Google provider with -one that you create. Be sure to also include the existing `defaultAuthProviderFactories` -if you want to keep all of the built-in auth providers installed. +You set up builtin sign in resolvers using [your app-config](../conf/index.md), +next to the respective provider's configuration. Here's an example for Microsoft +Azure: -Now let's look at the example, with the rest of the commentary being made with in -the code comments: +```yaml title="in e.g. app-config.yaml" +auth: + environment: development + providers: + microsoft: + development: + clientId: ${AZURE_CLIENT_ID} + clientSecret: ${AZURE_CLIENT_SECRET} + tenantId: ${AZURE_TENANT_ID} + signIn: + resolvers: + - resolver: emailMatchingUserEntityAnnotation + - resolver: emailMatchingUserEntityProfileEmail + - resolver: emailLocalPartMatchingUserEntityName +``` + +Note that in this instance it lists several resolvers, which means that the +framework will try them one by one until one succeeds. If none of them do, the +sign in attempt is rejected. + +To find the list of available resolvers, consult the documentation of the +respective provider. + +### Building Custom Resolvers + +If the builtins don't work for you, you can also provide a completely custom +sign-in resolver, through code. If you follow the installation instructions of +[one of the available providers](./index.md), you will likely have added a +dependency to your backend along with a line of code and some configuration. + +Using GitHub as an example, this is the relevant parts of the backend code: + +```ts title="in packages/backend/src/index.ts" +backend.add(import('@backstage/plugin-auth-backend')); +backend.add(import('@backstage/plugin-auth-backend-module-github-provider')); +``` + +When you want to supply a custom sign-in resolver, as a general pattern you +remove that last import and instead construct your own provider using the +facilities from the same package. You can leave the config unchanged from +before. + +```ts title="in packages/backend/src/index.ts" +/* highlight-add-start */ +import { createBackendModule } from '@backstage/backend-plugin-api'; +import { githubAuthenticator } from '@backstage/plugin-auth-backend-module-github-provider'; +import { + authProvidersExtensionPoint, + createOAuthProviderFactory, +} from '@backstage/plugin-auth-node'; + +const customAuth = createBackendModule({ + // This ID must be exactly "auth" because that's the plugin it targets + pluginId: 'auth', + // This ID must be unique, but can be anything + moduleId: 'custom-auth-provider', + register(reg) { + reg.registerInit({ + deps: { providers: authProvidersExtensionPoint }, + async init({ providers }) { + providers.registerProvider({ + // This ID must match the actual provider config, e.g. addressing + // auth.providers.github means that this must be "github". + providerId: 'github', + // Use createProxyAuthProviderFactory instead if it's one of the proxy + // based providers rather than an OAuth based one + factory: createOAuthProviderFactory({ + authenticator: githubAuthenticator, + async signInResolver(info, ctx) { + /********************************************************************* + * Custom resolver code goes here, see farther down in this article! * + * "info" is the sign in result from the upstream (github here), and * + * "ctx" contains useful utilities for token issuance etc. * + *********************************************************************/ + }, + }), + }); + }, + }); + }, +}); +/* highlight-add-end */ + +backend.add(import('@backstage/plugin-auth-backend')); +/* highlight-remove-next-line */ +backend.add(import('@backstage/plugin-auth-backend-module-github-provider')); +/* highlight-add-next-line */ +backend.add(customAuth); +``` + +The `createOAuthProviderFactory` / `createProxyAuthProviderFactory` functions +have additional options for profile and state transforms - not covered here, but +good to know about if you need them. + +So what would the body of a typical sign in resolver callback look like? Here's +an example: ```ts -// File: packages/backend/src/plugins/auth.ts -import { - createRouter, - providers, - defaultAuthProviderFactories, -} from '@backstage/plugin-auth-backend'; -import { Router } from 'express'; -import { PluginEnvironment } from '../types'; +// ... +async signInResolver(info, ctx) { + const { profile: { email } } = info; -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - return await createRouter({ - ...env, - providerFactories: { - ...defaultAuthProviderFactories, - google: providers.google.create({ - signIn: { - resolver: async (info, ctx) => { - const { - profile: { email }, - } = info; - // Profiles are not always guaranteed to to have an email address. - // You can also find more provider-specific information in `info.result`. - // It typically contains a `fullProfile` object as well as ID and/or access - // tokens that you can use for additional lookups. - if (!email) { - throw new Error('User profile contained no email'); - } + // Profiles are not always guaranteed to to have an email address. + // You can also find more provider-specific information in `info.result`. + // It typically contains a `fullProfile` object as well as ID and/or access + // tokens that you can use for additional lookups. + if (!email) { + throw new Error('User profile contained no email'); + } - // You can add your own custom validation logic here. - // Logins can be prevented by throwing an error like the one above. - myEmailValidator(email); + // You can add your own custom validation logic here. + // Logins can be prevented by throwing an error like the one above. + myEmailValidator(email); - // This example resolver simply uses the local part of the email as the name. - const [name] = email.split('@'); + // This example resolver simply uses the local part of the email as the name. + const [name] = email.split('@'); - // This helper function handles sign-in by looking up a user in the catalog. - // The lookup can be done either by reference, annotations, or custom filters. - // - // The helper also issues a token for the user, using the standard group - // membership logic to determine the ownership references of the user. - return ctx.signInWithCatalogUser({ - entityRef: { name }, - }); - }, - }, - }), - }, + // This helper function handles sign-in by looking up a user in the catalog. + // The lookup can be done either by reference, annotations, or custom filters. + // + // The helper also issues a token for the user, using the standard group + // membership logic to determine the ownership references of the user. + // + // There are a number of other methods on the ctx, feel free to explore them! + return ctx.signInWithCatalogUser({ + entityRef: { name }, }); } ``` -### Built-in Resolvers - -You don't always have to write your own custom resolver. The auth backend plugin provides -built-in resolvers for many of the common sign-in patterns. You access these via the `resolvers` -property of each of the auth provider integrations. For example, the Google provider has -a built in resolver that works just like the one we defined above: - -```ts -// File: packages/backend/src/plugins/auth.ts -export default async function createPlugin( - // ... - return await createRouter({ - // ... - providerFactories: { - // ... - google: providers.google.create({ - signIn: { - resolver: providers.google.resolvers.emailLocalPartMatchingUserEntityName(), - }, - }); - } - }) -) -``` - -There are also other options, like the this one that looks up a user -by matching the `google.com/email` annotation of user entities in the catalog: - -```ts -providers.google.create({ - signIn: { - resolver: providers.google.resolvers.emailMatchingUserEntityAnnotation(), - }, -}); -``` - -## Custom Ownership Resolution +### Custom Ownership Resolution If you want to have more control over the membership resolution and token generation that happens during sign-in you can replace `ctx.signInWithCatalogUser` with a set @@ -209,55 +242,48 @@ of lower-level calls: // File: packages/backend/src/plugins/auth.ts import { getDefaultOwnershipEntityRefs } from '@backstage/plugin-auth-backend'; -export default async function createPlugin( - // ... - return await createRouter({ - // ... - providerFactories: { - // ... - google: async ({ profile: { email } }, ctx) => { - if (!email) { - throw new Error('User profile contained no email'); - } +// ... +async signInResolver({ profile: { email} }, ctx) { + if (!email) { + throw new Error('User profile contained no email'); + } - // This step calls the catalog to look up a user entity. You could for example - // replace it with a call to a different external system. - const { entity } = await ctx.findCatalogUser({ - annotations: { - 'acme.org/email': email, - }, - }); + // This step calls the catalog to look up a user entity. You could for example + // replace it with a call to a different external system. + const { entity } = await ctx.findCatalogUser({ + annotations: { + 'acme.org/email': email, + }, + }); - // In this step we extract the ownership references from the user entity using - // the standard logic. It uses a reference to the entity itself, as well as the - // target of each `memberOf` relation where the target is of the kind `Group`. - // - // If you replace the catalog lookup with something that does not return - // an entity you will need to replace this step as well. - // - // You might also replace it if you for example want to filter out certain groups. - // - // Note that `getDefaultOwnershipEntityRefs` only includes groups to which the - // user has a direct MEMBER_OF relationship. It's perfectly fine to include - // groups that the user is transitively part of in the claims array, but the - // catalog doesn't currently provide a direct way of accessing this list of - // groups. - const ownershipRefs = getDefaultOwnershipEntityRefs(entity); + // In this step we extract the ownership references from the user entity using + // the standard logic. It uses a reference to the entity itself, as well as the + // target of each `memberOf` relation where the target is of the kind `Group`. + // + // If you replace the catalog lookup with something that does not return + // an entity you will need to replace this step as well. + // + // You might also replace it if you for example want to filter out certain groups. + // + // Note that `getDefaultOwnershipEntityRefs` only includes groups to which the + // user has a direct MEMBER_OF relationship. It's perfectly fine to include + // groups that the user is transitively part of in the claims array, but the + // catalog doesn't currently provide a direct way of accessing this list of + // groups. + const ownershipRefs = getDefaultOwnershipEntityRefs(entity); - // The last step is to issue the token, where we might provide more options in the future. - return ctx.issueToken({ - claims: { - sub: stringifyEntityRef(entity), - ent: ownershipRefs, - }, - }); - }; - } - }) -) + // The last step is to issue the token, where we might provide more options in the + // future. + return ctx.issueToken({ + claims: { + sub: stringifyEntityRef(entity), + ent: ownershipRefs, + }, + }); +} ``` -## Sign-In without Users in the Catalog +### Sign-In without Users in the Catalog While populating the catalog with organizational data unlocks more powerful ways to browse your software ecosystem, it might not always be a viable or prioritized @@ -278,63 +304,44 @@ check like in the example below, or you might for example look up the GitHub org that the user belongs to using the user access token in the provided result object. ```ts -// File: packages/backend/src/plugins/auth.ts -import { createRouter, providers } from '@backstage/plugin-auth-backend'; -import { Router } from 'express'; -import { PluginEnvironment } from '../types'; -import { - stringifyEntityRef, - DEFAULT_NAMESPACE, -} from '@backstage/catalog-model'; +import { stringifyEntityRef, DEFAULT_NAMESPACE } from '@backstage/catalog-model'; -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - return await createRouter({ - ...env, - providerFactories: { - google: providers.google.create({ - signIn: { - resolver: async ({ profile }, ctx) => { - if (!profile.email) { - throw new Error( - 'Login failed, user profile does not contain an email', - ); - } - // Split the email into the local part and the domain. - const [localPart, domain] = profile.email.split('@'); +// ... +async signInResolver({ profile }, ctx) { + if (!profile.email) { + throw new Error( + 'Login failed, user profile does not contain an email', + ); + } + // Split the email into the local part and the domain. + const [localPart, domain] = profile.email.split('@'); - // Next we verify the email domain. It is recommended to include this - // kind of check if you don't look up the user in an external service. - if (domain !== 'acme.org') { - throw new Error( - `Login failed, this email ${profile.email} does not belong to the expected domain`, - ); - } + // Next we verify the email domain. It is recommended to include this + // kind of check if you don't look up the user in an external service. + if (domain !== 'acme.org') { + throw new Error( + `Login failed, '${profile.email}' does not belong to the expected domain`, + ); + } - // By using `stringifyEntityRef` we ensure that the reference is formatted correctly - const userEntity = stringifyEntityRef({ - kind: 'User', - name: localPart, - namespace: DEFAULT_NAMESPACE, - }); - return ctx.issueToken({ - claims: { - sub: userEntity, - ent: [userEntity], - }, - }); - }, - }, - }), + // By using `stringifyEntityRef` we ensure that the reference is formatted correctly + const userEntity = stringifyEntityRef({ + kind: 'User', + name: localPart, + namespace: DEFAULT_NAMESPACE, + }); + return ctx.issueToken({ + claims: { + sub: userEntity, + ent: [userEntity], }, }); } ``` -## AuthHandler +## Profile Transforms -Similar to a custom sign-in resolver, you can also write a custom auth handler +Similar to a custom sign-in resolver, you can also write a custom profile transform function which is used to verify and convert the auth response into the profile that will be presented to the user. This is where you can customize things like display name and profile picture. @@ -343,29 +350,43 @@ This is also the place where you can do authorization and validation of the user and throw errors if the user should not be allowed access in Backstage. ```ts -// File: packages/backend/src/plugins/auth.ts -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - return await createRouter({ - ... - providerFactories: { - google: providers.google.create({ - authHandler: async ({ - fullProfile // Type: passport.Profile, - idToken // Type: (Optional) string, - }) => { - // Custom validation code goes here - return { - profile: { - email, - picture, - displayName, - } - }; - } - }) - } - }) -} +const customAuth = createBackendModule({ + // This ID must be exactly "auth" because that's the plugin it targets + pluginId: 'auth', + // This ID must be unique, but can be anything + moduleId: 'custom-auth-provider', + register(reg) { + reg.registerInit({ + deps: { providers: authProvidersExtensionPoint }, + async init({ providers }) { + providers.registerProvider({ + // This ID must match the actual provider config, e.g. addressing + // auth.providers.github means that this must be "github". + providerId: 'github', + // Use createProxyAuthProviderFactory instead if it's one of the proxy + // based providers rather than an OAuth based one + factory: createOAuthProviderFactory({ + authenticator: githubAuthenticator, + async profileTransform(result, ctx) { + /********************************************************************** + * Custom transform code goes here! * + * "info" is the sign in result from the upstream (github here), and * + * "ctx" contains useful utilities. * + **********************************************************************/ + return { + profile: { + email, + picture, + displayName, + }, + }; + }, + }), + }); + }, + }); + }, +}); ``` + +Remember to `backend.add` the created module just like above. From 9a41a7bfa8030340f9eeaa2c3e0c89e3924ca021 Mon Sep 17 00:00:00 2001 From: Heikki Hellgren Date: Fri, 1 Mar 2024 10:27:11 +0200 Subject: [PATCH 068/151] chore: migrate to new backend in local development additionally allow defining custom sidebar item for dev app page. Signed-off-by: Heikki Hellgren --- .changeset/light-eggs-switch.md | 5 + .changeset/rude-hats-bow.md | 8 + packages/dev-utils/api-report.md | 3 + packages/dev-utils/src/devApp/render.tsx | 40 +++-- plugins/notifications-backend/dev/index.ts | 64 ++++++++ plugins/notifications-backend/package.json | 5 + plugins/notifications-backend/src/run.ts | 32 ---- .../src/service/standaloneServer.ts | 150 ------------------ plugins/notifications/dev/index.tsx | 9 +- plugins/signals-backend/dev/index.ts | 59 +++++++ plugins/signals-backend/package.json | 2 + plugins/signals-backend/src/run.ts | 32 ---- .../src/service/standaloneServer.ts | 112 ------------- plugins/signals/dev/index.tsx | 31 ++-- yarn.lock | 7 + 15 files changed, 212 insertions(+), 347 deletions(-) create mode 100644 .changeset/light-eggs-switch.md create mode 100644 .changeset/rude-hats-bow.md create mode 100644 plugins/notifications-backend/dev/index.ts delete mode 100644 plugins/notifications-backend/src/run.ts delete mode 100644 plugins/notifications-backend/src/service/standaloneServer.ts create mode 100644 plugins/signals-backend/dev/index.ts delete mode 100644 plugins/signals-backend/src/run.ts delete mode 100644 plugins/signals-backend/src/service/standaloneServer.ts diff --git a/.changeset/light-eggs-switch.md b/.changeset/light-eggs-switch.md new file mode 100644 index 0000000000..3fbb77b0d8 --- /dev/null +++ b/.changeset/light-eggs-switch.md @@ -0,0 +1,5 @@ +--- +'@backstage/dev-utils': patch +--- + +Allow defining custom side bar item for page diff --git a/.changeset/rude-hats-bow.md b/.changeset/rude-hats-bow.md new file mode 100644 index 0000000000..0bd84617c0 --- /dev/null +++ b/.changeset/rude-hats-bow.md @@ -0,0 +1,8 @@ +--- +'@backstage/plugin-notifications-backend': patch +'@backstage/plugin-signals-backend': patch +'@backstage/plugin-notifications': patch +'@backstage/plugin-signals': patch +--- + +Migrate signals and notifications to the new backend in local development diff --git a/packages/dev-utils/api-report.md b/packages/dev-utils/api-report.md index 3f21ba5502..c44f7328b9 100644 --- a/packages/dev-utils/api-report.md +++ b/packages/dev-utils/api-report.md @@ -14,6 +14,7 @@ import { GridProps } from '@material-ui/core/Grid'; import { IconComponent } from '@backstage/core-plugin-api'; import { PropsWithChildren } from 'react'; import { ReactNode } from 'react'; +import { RouteRef } from '@backstage/core-plugin-api'; // @public export function createDevApp(): DevAppBuilder; @@ -42,6 +43,8 @@ export type DevAppPageOptions = { children?: JSX.Element; title?: string; icon?: IconComponent; + sideBarItem?: JSX.Element; + routeRef?: RouteRef; }; // @public (undocumented) diff --git a/packages/dev-utils/src/devApp/render.tsx b/packages/dev-utils/src/devApp/render.tsx index 79834cddc8..1b57a4b9b7 100644 --- a/packages/dev-utils/src/devApp/render.tsx +++ b/packages/dev-utils/src/devApp/render.tsx @@ -44,7 +44,7 @@ import { } from '@backstage/integration-react'; import Box from '@material-ui/core/Box'; import BookmarkIcon from '@material-ui/icons/Bookmark'; -import React, { ComponentType, ReactNode, PropsWithChildren } from 'react'; +import React, { ComponentType, PropsWithChildren, ReactNode } from 'react'; import { createRoutesFromChildren, Route } from 'react-router-dom'; import { SidebarThemeSwitcher } from './SidebarThemeSwitcher'; import 'react-dom'; @@ -80,6 +80,9 @@ export type DevAppPageOptions = { children?: JSX.Element; title?: string; icon?: IconComponent; + sideBarItem?: JSX.Element; + + routeRef?: RouteRef; }; /** @@ -141,7 +144,9 @@ export class DevAppBuilder { this.defaultPage = path; } - if (opts.title) { + if (opts.sideBarItem) { + this.sidebarItems.push(opts.sideBarItem); + } else if (opts.title) { this.sidebarItems.push( , ); } - this.routes.push( - , - ); + + if (opts.routeRef) { + const Elem = () => <>{opts.element}; + attachComponentData(Elem, 'core.mountPoint', opts.routeRef); + + this.routes.push( + } + children={opts.children} + />, + ); + } else { + this.routes.push( + , + ); + } return this; } diff --git a/plugins/notifications-backend/dev/index.ts b/plugins/notifications-backend/dev/index.ts new file mode 100644 index 0000000000..987f984dcb --- /dev/null +++ b/plugins/notifications-backend/dev/index.ts @@ -0,0 +1,64 @@ +/* + * Copyright 2024 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 { createBackend } from '@backstage/backend-defaults'; +import { + coreServices, + createBackendPlugin, +} from '@backstage/backend-plugin-api'; +import { notificationService } from '@backstage/plugin-notifications-node'; + +const notificationsDebug = createBackendPlugin({ + pluginId: 'notifications-debug', + register(env) { + env.registerInit({ + deps: { + notifications: notificationService, + lifecycle: coreServices.lifecycle, + }, + async init({ notifications, lifecycle }) { + let interval: NodeJS.Timeout | undefined; + lifecycle.addStartupHook(async () => { + interval = setInterval(async () => { + await notifications.send({ + recipients: { + type: 'entity', + entityRef: 'user:development/guest', + }, + payload: { title: 'Test notification' }, + }); + }, 5000); + }); + + lifecycle.addShutdownHook(async () => { + if (interval) { + clearInterval(interval); + } + }); + }, + }); + }, +}); + +const backend = createBackend(); +backend.add(import('@backstage/plugin-events-backend/alpha')); +backend.add(import('@backstage/plugin-signals-backend')); +backend.add(import('@backstage/plugin-auth-backend')); +backend.add(import('@backstage/plugin-auth-backend-module-guest-provider')); +backend.add(import('../src')); +backend.add(notificationsDebug); + +backend.start(); diff --git a/plugins/notifications-backend/package.json b/plugins/notifications-backend/package.json index 15297856fb..cdb7642301 100644 --- a/plugins/notifications-backend/package.json +++ b/plugins/notifications-backend/package.json @@ -51,8 +51,13 @@ "yn": "^4.0.0" }, "devDependencies": { + "@backstage/backend-defaults": "workspace:^", "@backstage/backend-test-utils": "workspace:^", "@backstage/cli": "workspace:^", + "@backstage/plugin-auth-backend": "workspace:^", + "@backstage/plugin-auth-backend-module-guest-provider": "workspace:^", + "@backstage/plugin-events-backend": "workspace:^", + "@backstage/plugin-signals-backend": "workspace:^", "@types/express": "^4.17.6", "@types/supertest": "^2.0.8", "msw": "^1.0.0", diff --git a/plugins/notifications-backend/src/run.ts b/plugins/notifications-backend/src/run.ts deleted file mode 100644 index d299ed23e9..0000000000 --- a/plugins/notifications-backend/src/run.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2023 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 { getRootLogger } from '@backstage/backend-common'; -import yn from 'yn'; -import { startStandaloneServer } from './service/standaloneServer'; - -const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7007; -const enableCors = yn(process.env.PLUGIN_CORS, { default: false }); -const logger = getRootLogger(); - -startStandaloneServer({ port, enableCors, logger }).catch(err => { - logger.error(err); - process.exit(1); -}); - -process.on('SIGINT', () => { - logger.info('CTRL+C pressed; exiting.'); - process.exit(0); -}); diff --git a/plugins/notifications-backend/src/service/standaloneServer.ts b/plugins/notifications-backend/src/service/standaloneServer.ts deleted file mode 100644 index 5445d9b6b4..0000000000 --- a/plugins/notifications-backend/src/service/standaloneServer.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright 2023 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 { - createLegacyAuthAdapters, - createServiceBuilder, - HostDiscovery, - loadBackendConfig, - PluginDatabaseManager, - ServerTokenManager, -} from '@backstage/backend-common'; -import { Server } from 'http'; -import { Logger } from 'winston'; -import { createRouter } from './router'; -import Knex from 'knex'; -import { IdentityApi } from '@backstage/plugin-auth-node'; -import { Request } from 'express'; -import { - CatalogApi, - CatalogRequestOptions, - GetEntitiesByRefsRequest, -} from '@backstage/catalog-client'; -import { DefaultSignalsService } from '@backstage/plugin-signals-node'; -import { - EventParams, - EventsService, - EventsServiceSubscribeOptions, -} from '@backstage/plugin-events-node'; -import { - AuthService, - HttpAuthService, - UserInfoService, -} from '@backstage/backend-plugin-api'; - -export interface ServerOptions { - port: number; - enableCors: boolean; - logger: Logger; -} - -export async function startStandaloneServer( - options: ServerOptions, -): Promise { - const logger = options.logger.child({ service: 'notifications-backend' }); - logger.debug('Starting application server...'); - - const config = await loadBackendConfig({ logger, argv: process.argv }); - const db = Knex(config.get('backend.database')); - - const tokenManager = ServerTokenManager.fromConfig(config, { - logger, - }); - const discovery = HostDiscovery.fromConfig(config); - - const dbMock: PluginDatabaseManager = { - async getClient() { - return db; - }, - }; - - const catalogApi = { - async getEntitiesByRefs( - _request: GetEntitiesByRefsRequest, - __options?: CatalogRequestOptions, - ) { - return { - items: [ - { - apiVersion: 'backstage.io/v1alpha1', - kind: 'User', - metadata: { name: 'user', namespace: 'default' }, - spec: {}, - }, - ], - }; - }, - } as Partial as CatalogApi; - - const identityMock: IdentityApi = { - async getIdentity({ request }: { request: Request }) { - const token = request.headers.authorization?.split(' ')[1]; - return { - identity: { - type: 'user', - ownershipEntityRefs: [], - userEntityRef: 'user:default/guest', - }, - token: token || 'no-token', - }; - }, - }; - - const mockSubscribers: EventsServiceSubscribeOptions[] = []; - const events: EventsService = { - async publish(params: EventParams): Promise { - mockSubscribers.forEach(sub => sub.onEvent(params)); - }, - async subscribe(subscription: EventsServiceSubscribeOptions) { - mockSubscribers.push(subscription); - }, - }; - - const signalService = DefaultSignalsService.create({ events }); - // TODO: Move to use services instead this hack - const { auth, httpAuth, userInfo } = createLegacyAuthAdapters< - any, - { auth: AuthService; httpAuth: HttpAuthService; userInfo: UserInfoService } - >({ - identity: identityMock, - tokenManager, - discovery, - }); - - const router = await createRouter({ - logger, - database: dbMock, - catalog: catalogApi, - discovery, - signals: signalService, - auth, - httpAuth, - userInfo, - }); - - let service = createServiceBuilder(module) - .setPort(options.port) - .addRouter('/notifications', router); - if (options.enableCors) { - service = service.enableCors({ origin: 'http://localhost:3000' }); - } - - return await service.start().catch(err => { - logger.error(err); - process.exit(1); - }); -} - -module.hot?.accept(); diff --git a/plugins/notifications/dev/index.tsx b/plugins/notifications/dev/index.tsx index f4ea31f4ab..27bfe23842 100644 --- a/plugins/notifications/dev/index.tsx +++ b/plugins/notifications/dev/index.tsx @@ -16,12 +16,17 @@ import React from 'react'; import { createDevApp } from '@backstage/dev-utils'; import { notificationsPlugin } from '../src/plugin'; +import { NotificationsPage } from '../src/components/NotificationsPage'; +import { NotificationsSidebarItem } from '../src'; +import { rootRouteRef } from '../src/routes'; +// TODO: How to sign in here as guest user? createDevApp() .registerPlugin(notificationsPlugin) .addPage({ - element:
, - title: 'Root Page', + element: , path: '/notifications', + sideBarItem: , + routeRef: rootRouteRef, }) .render(); diff --git a/plugins/signals-backend/dev/index.ts b/plugins/signals-backend/dev/index.ts new file mode 100644 index 0000000000..ae98e54eed --- /dev/null +++ b/plugins/signals-backend/dev/index.ts @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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 { createBackend } from '@backstage/backend-defaults'; +import { + coreServices, + createBackendPlugin, +} from '@backstage/backend-plugin-api'; +import { signalService } from '@backstage/plugin-signals-node'; + +const signalDebug = createBackendPlugin({ + pluginId: 'signals-debug', + register(env) { + env.registerInit({ + deps: { + signals: signalService, + lifecycle: coreServices.lifecycle, + }, + async init({ signals, lifecycle }) { + let interval: NodeJS.Timeout | undefined; + lifecycle.addStartupHook(async () => { + interval = setInterval(async () => { + await signals.publish<{ date: string }>({ + channel: 'debug', + message: { date: new Date().toISOString() }, + recipients: { type: 'broadcast' }, + }); + }, 1000); + }); + + lifecycle.addShutdownHook(async () => { + if (interval) { + clearInterval(interval); + } + }); + }, + }); + }, +}); + +const backend = createBackend(); +backend.add(import('@backstage/plugin-events-backend/alpha')); +backend.add(import('../src')); +backend.add(signalDebug); + +backend.start(); diff --git a/plugins/signals-backend/package.json b/plugins/signals-backend/package.json index 24682829e8..923b4bb150 100644 --- a/plugins/signals-backend/package.json +++ b/plugins/signals-backend/package.json @@ -45,7 +45,9 @@ "yn": "^4.0.0" }, "devDependencies": { + "@backstage/backend-defaults": "workspace:^", "@backstage/cli": "workspace:^", + "@backstage/plugin-events-backend": "workspace:^", "@types/supertest": "^2.0.8", "msw": "^1.0.0", "supertest": "^6.2.4" diff --git a/plugins/signals-backend/src/run.ts b/plugins/signals-backend/src/run.ts deleted file mode 100644 index d299ed23e9..0000000000 --- a/plugins/signals-backend/src/run.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2023 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 { getRootLogger } from '@backstage/backend-common'; -import yn from 'yn'; -import { startStandaloneServer } from './service/standaloneServer'; - -const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7007; -const enableCors = yn(process.env.PLUGIN_CORS, { default: false }); -const logger = getRootLogger(); - -startStandaloneServer({ port, enableCors, logger }).catch(err => { - logger.error(err); - process.exit(1); -}); - -process.on('SIGINT', () => { - logger.info('CTRL+C pressed; exiting.'); - process.exit(0); -}); diff --git a/plugins/signals-backend/src/service/standaloneServer.ts b/plugins/signals-backend/src/service/standaloneServer.ts deleted file mode 100644 index efb7ecedee..0000000000 --- a/plugins/signals-backend/src/service/standaloneServer.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2023 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 { - createServiceBuilder, - HostDiscovery, - loadBackendConfig, -} from '@backstage/backend-common'; -import { Server } from 'http'; -import { Logger } from 'winston'; -import { createRouter } from './router'; -import { DefaultSignalsService } from '@backstage/plugin-signals-node'; -import { DefaultIdentityClient } from '@backstage/plugin-auth-node'; -import { - EventParams, - EventsService, - EventsServiceSubscribeOptions, -} from '@backstage/plugin-events-node'; -import { - BackstageCredentials, - BackstageUserInfo, - UserInfoService, -} from '@backstage/backend-plugin-api'; - -export interface ServerOptions { - port: number; - enableCors: boolean; - logger: Logger; -} - -export async function startStandaloneServer( - options: ServerOptions, -): Promise { - const logger = options.logger.child({ service: 'signals-backend' }); - logger.debug('Starting application server...'); - const config = await loadBackendConfig({ logger, argv: process.argv }); - const discovery = HostDiscovery.fromConfig(config); - - const identity = DefaultIdentityClient.create({ - discovery, - issuer: await discovery.getExternalBaseUrl('auth'), - }); - - const mockSubscribers: EventsServiceSubscribeOptions[] = []; - const events: EventsService = { - async publish(params: EventParams): Promise { - mockSubscribers.forEach(sub => sub.onEvent(params)); - }, - async subscribe(subscription: EventsServiceSubscribeOptions) { - mockSubscribers.push(subscription); - }, - }; - - const signals = DefaultSignalsService.create({ - events, - }); - - const userInfo: UserInfoService = { - async getUserInfo(_: BackstageCredentials): Promise { - return { - userEntityRef: 'user:default/guest', - ownershipEntityRefs: ['user:default/guest'], - }; - }, - }; - - const router = await createRouter({ - logger, - identity, - events, - discovery, - userInfo, - }); - - let service = createServiceBuilder(module) - .setPort(options.port) - .addRouter('/signals', router); - if (options.enableCors) { - service = service.enableCors({ origin: 'http://localhost:3000' }); - } - - let server: Promise; - try { - server = service.start(); - - setInterval(() => { - signals.publish({ - recipients: { type: 'broadcast' }, - channel: 'test', - message: { hello: 'world' }, - }); - }, 5000); - } catch (err) { - logger.error(err); - process.exit(1); - } - return server; -} - -module.hot?.accept(); diff --git a/plugins/signals/dev/index.tsx b/plugins/signals/dev/index.tsx index 2b22424eee..629c820a8e 100644 --- a/plugins/signals/dev/index.tsx +++ b/plugins/signals/dev/index.tsx @@ -16,20 +16,33 @@ import React from 'react'; import { createDevApp } from '@backstage/dev-utils'; import { signalsPlugin } from '../src/plugin'; -import { Content, Header, Page } from '@backstage/core-components'; +import { CodeSnippet, Content, Header, Page } from '@backstage/core-components'; import Typography from '@material-ui/core/Typography'; +import { useSignal } from '@backstage/plugin-signals-react'; + +const SignalsDebugPage = () => { + const { lastSignal } = useSignal('debug'); + return ( + +
+ + Last signal: + + {lastSignal ? ( + + ) : ( + 'Not received' + )} + + + + ); +}; createDevApp() .registerPlugin(signalsPlugin) .addPage({ title: 'Debug', - element: ( - -
- - TODO - - - ), + element: , }) .render(); diff --git a/yarn.lock b/yarn.lock index bff13e8dd1..e392282e15 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7899,6 +7899,7 @@ __metadata: resolution: "@backstage/plugin-notifications-backend@workspace:plugins/notifications-backend" dependencies: "@backstage/backend-common": "workspace:^" + "@backstage/backend-defaults": "workspace:^" "@backstage/backend-plugin-api": "workspace:^" "@backstage/backend-test-utils": "workspace:^" "@backstage/catalog-client": "workspace:^" @@ -7906,10 +7907,14 @@ __metadata: "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" "@backstage/errors": "workspace:^" + "@backstage/plugin-auth-backend": "workspace:^" + "@backstage/plugin-auth-backend-module-guest-provider": "workspace:^" "@backstage/plugin-auth-node": "workspace:^" + "@backstage/plugin-events-backend": "workspace:^" "@backstage/plugin-events-node": "workspace:^" "@backstage/plugin-notifications-common": "workspace:^" "@backstage/plugin-notifications-node": "workspace:^" + "@backstage/plugin-signals-backend": "workspace:^" "@backstage/plugin-signals-node": "workspace:^" "@types/express": ^4.17.6 "@types/supertest": ^2.0.8 @@ -9276,10 +9281,12 @@ __metadata: resolution: "@backstage/plugin-signals-backend@workspace:plugins/signals-backend" dependencies: "@backstage/backend-common": "workspace:^" + "@backstage/backend-defaults": "workspace:^" "@backstage/backend-plugin-api": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" "@backstage/plugin-auth-node": "workspace:^" + "@backstage/plugin-events-backend": "workspace:^" "@backstage/plugin-events-node": "workspace:^" "@backstage/plugin-signals-node": "workspace:^" "@backstage/types": "workspace:^" From 282f62f49001da10760771b64cde0cc80b200be3 Mon Sep 17 00:00:00 2001 From: Heikki Hellgren Date: Fri, 8 Mar 2024 08:11:56 +0200 Subject: [PATCH 069/151] chore: use code snippet for signal debugging Signed-off-by: Heikki Hellgren --- packages/dev-utils/api-report.md | 4 +- packages/dev-utils/src/devApp/render.tsx | 38 ++++++------------- plugins/notifications-backend/dev/index.ts | 3 +- .../src/service/router.ts | 6 ++- plugins/notifications/dev/index.tsx | 7 +--- 5 files changed, 19 insertions(+), 39 deletions(-) diff --git a/packages/dev-utils/api-report.md b/packages/dev-utils/api-report.md index c44f7328b9..d30df29200 100644 --- a/packages/dev-utils/api-report.md +++ b/packages/dev-utils/api-report.md @@ -14,7 +14,6 @@ import { GridProps } from '@material-ui/core/Grid'; import { IconComponent } from '@backstage/core-plugin-api'; import { PropsWithChildren } from 'react'; import { ReactNode } from 'react'; -import { RouteRef } from '@backstage/core-plugin-api'; // @public export function createDevApp(): DevAppBuilder; @@ -43,8 +42,7 @@ export type DevAppPageOptions = { children?: JSX.Element; title?: string; icon?: IconComponent; - sideBarItem?: JSX.Element; - routeRef?: RouteRef; + sidebarItem?: JSX.Element; }; // @public (undocumented) diff --git a/packages/dev-utils/src/devApp/render.tsx b/packages/dev-utils/src/devApp/render.tsx index 1b57a4b9b7..26fd96052b 100644 --- a/packages/dev-utils/src/devApp/render.tsx +++ b/packages/dev-utils/src/devApp/render.tsx @@ -80,9 +80,7 @@ export type DevAppPageOptions = { children?: JSX.Element; title?: string; icon?: IconComponent; - sideBarItem?: JSX.Element; - - routeRef?: RouteRef; + sidebarItem?: JSX.Element; }; /** @@ -144,8 +142,8 @@ export class DevAppBuilder { this.defaultPage = path; } - if (opts.sideBarItem) { - this.sidebarItems.push(opts.sideBarItem); + if (opts.sidebarItem) { + this.sidebarItems.push(opts.sidebarItem); } else if (opts.title) { this.sidebarItems.push( <>{opts.element}; - attachComponentData(Elem, 'core.mountPoint', opts.routeRef); - - this.routes.push( - } - children={opts.children} - />, - ); - } else { - this.routes.push( - , - ); - } + this.routes.push( + , + ); return this; } diff --git a/plugins/notifications-backend/dev/index.ts b/plugins/notifications-backend/dev/index.ts index 987f984dcb..fe35606dd2 100644 --- a/plugins/notifications-backend/dev/index.ts +++ b/plugins/notifications-backend/dev/index.ts @@ -35,8 +35,7 @@ const notificationsDebug = createBackendPlugin({ interval = setInterval(async () => { await notifications.send({ recipients: { - type: 'entity', - entityRef: 'user:development/guest', + type: 'broadcast', }, payload: { title: 'Test notification' }, }); diff --git a/plugins/notifications-backend/src/service/router.ts b/plugins/notifications-backend/src/service/router.ts index 0bce3d4bb3..4c38d2ba2a 100644 --- a/plugins/notifications-backend/src/service/router.ts +++ b/plugins/notifications-backend/src/service/router.ts @@ -470,7 +470,7 @@ export async function createRouter( if (!recipients || !title) { logger.error(`Invalid notification request received`); - throw new InputError(); + throw new InputError(`Invalid notification request received`); } const origin = credentials.principal.subject; @@ -496,8 +496,10 @@ export async function createRouter( try { users = await getUsersForEntityRef(entityRef); } catch (e) { - throw new InputError(); + logger.error(`Failed to resolve notification receivers: ${e}`); + throw new InputError('Failed to resolve notification receivers', e); } + const userNotifications = await sendUserNotifications( baseNotification, users, diff --git a/plugins/notifications/dev/index.tsx b/plugins/notifications/dev/index.tsx index 27bfe23842..1406f55b59 100644 --- a/plugins/notifications/dev/index.tsx +++ b/plugins/notifications/dev/index.tsx @@ -15,10 +15,8 @@ */ import React from 'react'; import { createDevApp } from '@backstage/dev-utils'; -import { notificationsPlugin } from '../src/plugin'; -import { NotificationsPage } from '../src/components/NotificationsPage'; +import { NotificationsPage, notificationsPlugin } from '../src/plugin'; import { NotificationsSidebarItem } from '../src'; -import { rootRouteRef } from '../src/routes'; // TODO: How to sign in here as guest user? createDevApp() @@ -26,7 +24,6 @@ createDevApp() .addPage({ element: , path: '/notifications', - sideBarItem: , - routeRef: rootRouteRef, + sidebarItem: , }) .render(); From 58b943638fdb043d241b7fa494c75e5a76161e6f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 19:21:52 +0000 Subject: [PATCH 070/151] fix(deps): update opentelemetry-js monorepo Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- packages/backend/package.json | 2 +- yarn.lock | 58 +++++++++++++++++------------------ 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/packages/backend/package.json b/packages/backend/package.json index 9078e074fc..3e95d9bbc6 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -82,7 +82,7 @@ "@gitbeaker/node": "^35.1.0", "@octokit/rest": "^19.0.3", "@opentelemetry/api": "^1.4.1", - "@opentelemetry/exporter-prometheus": "^0.49.0", + "@opentelemetry/exporter-prometheus": "^0.50.0", "@opentelemetry/sdk-metrics": "^1.13.0", "azure-devops-node-api": "^12.0.0", "better-sqlite3": "^9.0.0", diff --git a/yarn.lock b/yarn.lock index 8da44dbf4a..7895bff57e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14587,59 +14587,59 @@ __metadata: languageName: node linkType: hard -"@opentelemetry/core@npm:1.22.0": - version: 1.22.0 - resolution: "@opentelemetry/core@npm:1.22.0" +"@opentelemetry/core@npm:1.23.0": + version: 1.23.0 + resolution: "@opentelemetry/core@npm:1.23.0" dependencies: - "@opentelemetry/semantic-conventions": 1.22.0 + "@opentelemetry/semantic-conventions": 1.23.0 peerDependencies: "@opentelemetry/api": ">=1.0.0 <1.9.0" - checksum: 0056bbaceb922816ec87e7e21aa8a7687377a41ba36a598bb6c49738d1eb5767f823e5758b5bf844d2b10aa075c553e98904dd6fd4f02c24cf335e3951fe78a6 + checksum: 88aa733364c42f90a61a6efc8b5138dcfed4763f3a0692d957d506a6fe49db943169a0631ad762ac7569723faf5eaca092d6590eca1ad8ff77583fb10512a06b languageName: node linkType: hard -"@opentelemetry/exporter-prometheus@npm:^0.49.0": - version: 0.49.1 - resolution: "@opentelemetry/exporter-prometheus@npm:0.49.1" +"@opentelemetry/exporter-prometheus@npm:^0.50.0": + version: 0.50.0 + resolution: "@opentelemetry/exporter-prometheus@npm:0.50.0" dependencies: - "@opentelemetry/core": 1.22.0 - "@opentelemetry/resources": 1.22.0 - "@opentelemetry/sdk-metrics": 1.22.0 + "@opentelemetry/core": 1.23.0 + "@opentelemetry/resources": 1.23.0 + "@opentelemetry/sdk-metrics": 1.23.0 peerDependencies: "@opentelemetry/api": ^1.3.0 - checksum: 979d5d981c3b9efc3c0f03e6ddbc3c37b6552e5284f738297582896274b06b18a8a95d84e855ce6e263d01aba18ab9a2b5c8ff17e35822749f564836f3f9615e + checksum: 0bb3e6c36f2a6ef4822d31eb23254e6f6380b3bf50b29767349881ce606bd685bb4e728adb93187c9df190291e3d64f7f98593f96ec7bb5eff76be9e338f1d05 languageName: node linkType: hard -"@opentelemetry/resources@npm:1.22.0": - version: 1.22.0 - resolution: "@opentelemetry/resources@npm:1.22.0" +"@opentelemetry/resources@npm:1.23.0": + version: 1.23.0 + resolution: "@opentelemetry/resources@npm:1.23.0" dependencies: - "@opentelemetry/core": 1.22.0 - "@opentelemetry/semantic-conventions": 1.22.0 + "@opentelemetry/core": 1.23.0 + "@opentelemetry/semantic-conventions": 1.23.0 peerDependencies: "@opentelemetry/api": ">=1.0.0 <1.9.0" - checksum: f1da492d9fa7dbe3e5f08a511654b45265fcd16c4695bb1ae92488baa45ae9910d5a962166aaa4ae63be4c75393680c6f064450a5f10b86501b9df427ac49f27 + checksum: e780d34f8107cdd2853aab3c0c680a817da54d9c6020bba9b8a6b8e7b637487592d87440e5c4f09a10dfad7aededde34532e0e337a5c2d441bf26dd921836cfc languageName: node linkType: hard -"@opentelemetry/sdk-metrics@npm:1.22.0, @opentelemetry/sdk-metrics@npm:^1.13.0": - version: 1.22.0 - resolution: "@opentelemetry/sdk-metrics@npm:1.22.0" +"@opentelemetry/sdk-metrics@npm:1.23.0, @opentelemetry/sdk-metrics@npm:^1.13.0": + version: 1.23.0 + resolution: "@opentelemetry/sdk-metrics@npm:1.23.0" dependencies: - "@opentelemetry/core": 1.22.0 - "@opentelemetry/resources": 1.22.0 + "@opentelemetry/core": 1.23.0 + "@opentelemetry/resources": 1.23.0 lodash.merge: ^4.6.2 peerDependencies: "@opentelemetry/api": ">=1.3.0 <1.9.0" - checksum: 43b6599432bece2e41a48d40653f4f928ad7ba0b74c50a17bdb38f13bcb47cec1e08ce9af7f8cc643dc2c28cb127ef5ef4ce3e53cd1bf386d54fdaca361f29f2 + checksum: ca24338ceb537fa9c4d9a87b4e81164db1275d96ecf97347a2e48f07cfaab0fb25013091898fb435751eb488efcd6d01232150cce3c034263fe293ce6bd83abd languageName: node linkType: hard -"@opentelemetry/semantic-conventions@npm:1.22.0": - version: 1.22.0 - resolution: "@opentelemetry/semantic-conventions@npm:1.22.0" - checksum: cb3bdca1a29d3c32c44599bdf5ee5143b84e81aaa61edcd3f750133bfaffd7c1b36755c877921e4993e2468284a0564388844a7dda388122bee486d3f67fa4c8 +"@opentelemetry/semantic-conventions@npm:1.23.0": + version: 1.23.0 + resolution: "@opentelemetry/semantic-conventions@npm:1.23.0" + checksum: a4bd6e67e0fe5821be7dc14baff77574e9881d208a63740a3ab416b367c132bc77cf3c0b398daea1344c9af2f32383cf6c7da3141ba6d1e87e30756e4f2234b8 languageName: node linkType: hard @@ -27702,7 +27702,7 @@ __metadata: "@gitbeaker/node": ^35.1.0 "@octokit/rest": ^19.0.3 "@opentelemetry/api": ^1.4.1 - "@opentelemetry/exporter-prometheus": ^0.49.0 + "@opentelemetry/exporter-prometheus": ^0.50.0 "@opentelemetry/sdk-metrics": ^1.13.0 "@types/dockerode": ^3.3.0 "@types/express": ^4.17.6 From 2706c3b181a08c9c31370cb12f2b06ed9451e094 Mon Sep 17 00:00:00 2001 From: Phil Kuang Date: Wed, 10 Apr 2024 16:06:23 -0400 Subject: [PATCH 071/151] fix(cookieAuth): set cookie against request host instead of origin Signed-off-by: Phil Kuang --- .../implementations/httpAuth/httpAuthServiceFactory.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/backend-app-api/src/services/implementations/httpAuth/httpAuthServiceFactory.ts b/packages/backend-app-api/src/services/implementations/httpAuth/httpAuthServiceFactory.ts index d6f5ceefa8..d7de0ae4ea 100644 --- a/packages/backend-app-api/src/services/implementations/httpAuth/httpAuthServiceFactory.ts +++ b/packages/backend-app-api/src/services/implementations/httpAuth/httpAuthServiceFactory.ts @@ -225,14 +225,12 @@ class DefaultHttpAuthService implements HttpAuthService { priority: 'high'; sameSite: 'none' | 'lax'; }> { - const originHeader = req.headers.origin; - const origin = - !originHeader || originHeader === 'null' ? undefined : originHeader; + const requestBaseUrl = `${req.protocol}://${req.hostname}`; const externalBaseUrlStr = await this.#discovery.getExternalBaseUrl( this.#pluginId, ); - const externalBaseUrl = new URL(externalBaseUrlStr ?? origin); + const externalBaseUrl = new URL(requestBaseUrl ?? externalBaseUrlStr); const secure = externalBaseUrl.protocol === 'https:' || From f28242025e29066478364b511ade883fedc31d5d Mon Sep 17 00:00:00 2001 From: Heikki Hellgren Date: Thu, 21 Mar 2024 07:41:02 +0100 Subject: [PATCH 072/151] feat: support login for the development app this fixes the local development issue with new backend system where the user is not logged in thus resulting 401 errors from all api endpoints. adds possibility to also add other login providers for testing plugins independently. Signed-off-by: Heikki Hellgren --- .changeset/light-eggs-switch.md | 2 +- packages/dev-utils/api-report.md | 11 ++++- .../SidebarSignOutButton.tsx | 44 +++++++++++++++++++ .../components/SidebarSignOutButton/index.ts | 16 +++++++ packages/dev-utils/src/components/index.ts | 1 + packages/dev-utils/src/devApp/render.test.tsx | 3 +- packages/dev-utils/src/devApp/render.tsx | 40 +++++++++++++++-- plugins/notifications/dev/index.tsx | 3 +- plugins/signals-backend/dev/index.ts | 2 + plugins/signals-backend/package.json | 2 + yarn.lock | 2 + 11 files changed, 117 insertions(+), 9 deletions(-) create mode 100644 packages/dev-utils/src/components/SidebarSignOutButton/SidebarSignOutButton.tsx create mode 100644 packages/dev-utils/src/components/SidebarSignOutButton/index.ts diff --git a/.changeset/light-eggs-switch.md b/.changeset/light-eggs-switch.md index 3fbb77b0d8..26934f155e 100644 --- a/.changeset/light-eggs-switch.md +++ b/.changeset/light-eggs-switch.md @@ -2,4 +2,4 @@ '@backstage/dev-utils': patch --- -Allow defining custom side bar item for page +Allow defining custom sidebar item for page and login for the development app diff --git a/packages/dev-utils/api-report.md b/packages/dev-utils/api-report.md index d30df29200..0a5b3d10e8 100644 --- a/packages/dev-utils/api-report.md +++ b/packages/dev-utils/api-report.md @@ -13,7 +13,9 @@ import { Entity } from '@backstage/catalog-model'; import { GridProps } from '@material-ui/core/Grid'; import { IconComponent } from '@backstage/core-plugin-api'; import { PropsWithChildren } from 'react'; +import { default as React_2 } from 'react'; import { ReactNode } from 'react'; +import { SignInProviderConfig } from '@backstage/core-components'; // @public export function createDevApp(): DevAppBuilder; @@ -22,6 +24,8 @@ export function createDevApp(): DevAppBuilder; export class DevAppBuilder { addPage(opts: DevAppPageOptions): DevAppBuilder; addRootChild(node: ReactNode): DevAppBuilder; + addSidebarItem(sidebarItem: JSX.Element): DevAppBuilder; + addSignInProvider(provider: SignInProviderConfig): this; addThemes(themes: AppTheme[]): this; build(): ComponentType>; registerApi< @@ -42,7 +46,6 @@ export type DevAppPageOptions = { children?: JSX.Element; title?: string; icon?: IconComponent; - sidebarItem?: JSX.Element; }; // @public (undocumented) @@ -51,4 +54,10 @@ export const EntityGridItem: ( entity: Entity; }, ) => JSX.Element; + +// @public +export const SidebarSignOutButton: (props: { + icon?: IconComponent; + text?: string; +}) => React_2.JSX.Element; ``` diff --git a/packages/dev-utils/src/components/SidebarSignOutButton/SidebarSignOutButton.tsx b/packages/dev-utils/src/components/SidebarSignOutButton/SidebarSignOutButton.tsx new file mode 100644 index 0000000000..9cfe888d4d --- /dev/null +++ b/packages/dev-utils/src/components/SidebarSignOutButton/SidebarSignOutButton.tsx @@ -0,0 +1,44 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import { SidebarItem } from '@backstage/core-components'; +import LockIcon from '@material-ui/icons/Lock'; +import { + IconComponent, + identityApiRef, + useApi, +} from '@backstage/core-plugin-api'; + +/** + * Button for sidebar that signs out user + * + * @public + */ +export const SidebarSignOutButton = (props: { + icon?: IconComponent; + text?: string; +}) => { + const identityApi = useApi(identityApiRef); + + return ( + identityApi.signOut()} + icon={props.icon ?? LockIcon} + text={props.text ?? 'Sign Out'} + /> + ); +}; diff --git a/packages/dev-utils/src/components/SidebarSignOutButton/index.ts b/packages/dev-utils/src/components/SidebarSignOutButton/index.ts new file mode 100644 index 0000000000..6182e1fa12 --- /dev/null +++ b/packages/dev-utils/src/components/SidebarSignOutButton/index.ts @@ -0,0 +1,16 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export * from './SidebarSignOutButton'; diff --git a/packages/dev-utils/src/components/index.ts b/packages/dev-utils/src/components/index.ts index d71b424a34..8959b6e7b1 100644 --- a/packages/dev-utils/src/components/index.ts +++ b/packages/dev-utils/src/components/index.ts @@ -15,3 +15,4 @@ */ export * from './EntityGridItem'; +export * from './SidebarSignOutButton'; diff --git a/packages/dev-utils/src/devApp/render.test.tsx b/packages/dev-utils/src/devApp/render.test.tsx index 2da6ef370a..7fc0024cc3 100644 --- a/packages/dev-utils/src/devApp/render.test.tsx +++ b/packages/dev-utils/src/devApp/render.test.tsx @@ -17,7 +17,7 @@ import React from 'react'; import { render } from '@testing-library/react'; import { createDevApp } from './render'; -import { useApi, configApiRef } from '@backstage/core-plugin-api'; +import { configApiRef, useApi } from '@backstage/core-plugin-api'; const anyEnv = (process.env = { ...process.env }) as any; @@ -28,6 +28,7 @@ describe('DevAppBuilder', () => { context: 'test', data: { app: { title: 'Test App' }, + backend: { baseUrl: 'http://localhost' }, }, }, ]; diff --git a/packages/dev-utils/src/devApp/render.tsx b/packages/dev-utils/src/devApp/render.tsx index 26fd96052b..3b3c993a6b 100644 --- a/packages/dev-utils/src/devApp/render.tsx +++ b/packages/dev-utils/src/devApp/render.tsx @@ -25,6 +25,8 @@ import { SidebarPage, SidebarSpace, SidebarSpacer, + SignInPage, + SignInProviderConfig, } from '@backstage/core-components'; import { AnyApiFactory, @@ -48,6 +50,7 @@ import React, { ComponentType, PropsWithChildren, ReactNode } from 'react'; import { createRoutesFromChildren, Route } from 'react-router-dom'; import { SidebarThemeSwitcher } from './SidebarThemeSwitcher'; import 'react-dom'; +import { SidebarSignOutButton } from '../components'; let ReactDOMPromise: Promise< typeof import('react-dom') | typeof import('react-dom/client') @@ -80,7 +83,6 @@ export type DevAppPageOptions = { children?: JSX.Element; title?: string; icon?: IconComponent; - sidebarItem?: JSX.Element; }; /** @@ -95,6 +97,7 @@ export class DevAppBuilder { private readonly rootChildren = new Array(); private readonly routes = new Array(); private readonly sidebarItems = new Array(); + private readonly signInProviders = new Array(); private defaultPage?: string; private themes?: Array; @@ -129,6 +132,16 @@ export class DevAppBuilder { return this; } + /** + * Adds a new sidebar item to the dev app. + * + * Useful for adding only sidebar items without a corresponding page. + */ + addSidebarItem(sidebarItem: JSX.Element): DevAppBuilder { + this.sidebarItems.push(sidebarItem); + return this; + } + /** * Adds a page component along with accompanying sidebar item. * @@ -142,9 +155,7 @@ export class DevAppBuilder { this.defaultPage = path; } - if (opts.sidebarItem) { - this.sidebarItems.push(opts.sidebarItem); - } else if (opts.title) { + if (opts.title) { this.sidebarItems.push( { + return ( + + ); + }, + }, bindRoutes: ({ bind }) => { for (const plugin of this.plugins ?? []) { const targets: Record> = {}; @@ -221,6 +252,7 @@ export class DevAppBuilder { + {this.routes} diff --git a/plugins/notifications/dev/index.tsx b/plugins/notifications/dev/index.tsx index 1406f55b59..f4d9176a70 100644 --- a/plugins/notifications/dev/index.tsx +++ b/plugins/notifications/dev/index.tsx @@ -18,12 +18,11 @@ import { createDevApp } from '@backstage/dev-utils'; import { NotificationsPage, notificationsPlugin } from '../src/plugin'; import { NotificationsSidebarItem } from '../src'; -// TODO: How to sign in here as guest user? createDevApp() .registerPlugin(notificationsPlugin) .addPage({ element: , path: '/notifications', - sidebarItem: , }) + .addSidebarItem() .render(); diff --git a/plugins/signals-backend/dev/index.ts b/plugins/signals-backend/dev/index.ts index ae98e54eed..39021a9fcd 100644 --- a/plugins/signals-backend/dev/index.ts +++ b/plugins/signals-backend/dev/index.ts @@ -53,6 +53,8 @@ const signalDebug = createBackendPlugin({ const backend = createBackend(); backend.add(import('@backstage/plugin-events-backend/alpha')); +backend.add(import('@backstage/plugin-auth-backend')); +backend.add(import('@backstage/plugin-auth-backend-module-guest-provider')); backend.add(import('../src')); backend.add(signalDebug); diff --git a/plugins/signals-backend/package.json b/plugins/signals-backend/package.json index 923b4bb150..a6ebb228e4 100644 --- a/plugins/signals-backend/package.json +++ b/plugins/signals-backend/package.json @@ -47,6 +47,8 @@ "devDependencies": { "@backstage/backend-defaults": "workspace:^", "@backstage/cli": "workspace:^", + "@backstage/plugin-auth-backend": "workspace:^", + "@backstage/plugin-auth-backend-module-guest-provider": "workspace:^", "@backstage/plugin-events-backend": "workspace:^", "@types/supertest": "^2.0.8", "msw": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index e392282e15..893930d505 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9285,6 +9285,8 @@ __metadata: "@backstage/backend-plugin-api": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" + "@backstage/plugin-auth-backend": "workspace:^" + "@backstage/plugin-auth-backend-module-guest-provider": "workspace:^" "@backstage/plugin-auth-node": "workspace:^" "@backstage/plugin-events-backend": "workspace:^" "@backstage/plugin-events-node": "workspace:^" From 1e851d01911253410977e54e201c310c125f7ae6 Mon Sep 17 00:00:00 2001 From: Joe Van Alstyne Date: Thu, 11 Apr 2024 15:10:09 +0900 Subject: [PATCH 073/151] build: add lodash to @backstage/plugin-catalog-backend-module-backstage-openapi dependencies Signed-off-by: Joe Van Alstyne --- plugins/catalog-backend-module-backstage-openapi/package.json | 1 + yarn.lock | 1 + 2 files changed, 2 insertions(+) diff --git a/plugins/catalog-backend-module-backstage-openapi/package.json b/plugins/catalog-backend-module-backstage-openapi/package.json index c4a26902d2..45bb3e3d7b 100644 --- a/plugins/catalog-backend-module-backstage-openapi/package.json +++ b/plugins/catalog-backend-module-backstage-openapi/package.json @@ -39,6 +39,7 @@ "@backstage/errors": "workspace:^", "@backstage/plugin-catalog-node": "workspace:^", "cross-fetch": "^4.0.0", + "lodash": "^4.17.21", "openapi-merge": "^1.3.2", "uuid": "^9.0.0" }, diff --git a/yarn.lock b/yarn.lock index 1834eb2cf6..34c3fefed3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5473,6 +5473,7 @@ __metadata: "@backstage/errors": "workspace:^" "@backstage/plugin-catalog-node": "workspace:^" cross-fetch: ^4.0.0 + lodash: ^4.17.21 openapi-merge: ^1.3.2 openapi3-ts: ^3.1.2 uuid: ^9.0.0 From ff346bdb6a3400e97b85c8b27bf828b06744d500 Mon Sep 17 00:00:00 2001 From: Joe Van Alstyne Date: Thu, 11 Apr 2024 15:12:07 +0900 Subject: [PATCH 074/151] refactor: use lodash.merge to setup plugin-catalog-backend-module-backstage-openapi config Signed-off-by: Joe Van Alstyne --- .../InternalOpenApiDocumentationProvider.ts | 38 ++++++++++++------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/plugins/catalog-backend-module-backstage-openapi/src/InternalOpenApiDocumentationProvider.ts b/plugins/catalog-backend-module-backstage-openapi/src/InternalOpenApiDocumentationProvider.ts index d55cb05a6d..bef0626830 100644 --- a/plugins/catalog-backend-module-backstage-openapi/src/InternalOpenApiDocumentationProvider.ts +++ b/plugins/catalog-backend-module-backstage-openapi/src/InternalOpenApiDocumentationProvider.ts @@ -38,7 +38,8 @@ import { DiscoveryService, LoggerService, } from '@backstage/backend-plugin-api'; -import * as uuid from 'uuid'; +import uuid from 'uuid'; +import lodash from 'lodash'; import { PluginTaskScheduler, TaskRunner } from '@backstage/backend-tasks'; const HTTP_VERBS: (keyof PathItemObject)[] = [ @@ -229,22 +230,26 @@ export class InternalOpenApiDocumentationProvider implements EntityProvider { const pluginsToMerge = this.config.getStringArray( 'catalog.providers.backstageOpenapi.plugins', ); + const configToMerge = this.config.getOptional( + 'catalog.providers.backstageOpenapi.entityOverrides', + ); - const getOverride = (key: string, fallbackValue: string = '') => { - return ( - this.config.getOptionalString( - `catalog.providers.backstageOpenapi.entityOverrides.${key}`, - ) ?? fallbackValue - ); + const baseConfig = { + metadata: { + name: 'internal_backstage_plugin', + title: 'Default Backstage API', + }, + spec: { + owner: 'backstage', + lifecycle: 'production', + }, }; logger.info(`Loading specs from ${pluginsToMerge}.`); - const documentationEntity: ApiEntity = { + const requiredConfig = { apiVersion: 'backstage.io/v1beta1', kind: 'API', metadata: { - name: getOverride('metadata.name', 'backstage_openapi_doc'), - title: getOverride('metadata.title', 'Backstage API Documentation'), annotations: { [ANNOTATION_LOCATION]: 'internal-package:@backstage/plugin-catalog-backend-module-backstage-openapi', @@ -253,9 +258,7 @@ export class InternalOpenApiDocumentationProvider implements EntityProvider { }, }, spec: { - type: getOverride('spec.type', 'openapi'), - lifecycle: getOverride('spec.lifecycle', 'production'), - owner: getOverride('spec.owner', 'backstage'), + type: 'openapi', definition: JSON.stringify( await loadSpecs({ baseUrl: this.config.getString('backend.baseUrl'), @@ -267,6 +270,15 @@ export class InternalOpenApiDocumentationProvider implements EntityProvider { ), }, }; + + // Overwrite base config with options from config file. + const mergedConfig = lodash.merge(baseConfig, configToMerge); + // Overwite mergedConfig with requiredConfig (i.e., spec.type and spec.definition) to avoid bad configuration. + const documentationEntity = lodash.merge( + mergedConfig, + requiredConfig, + ) as ApiEntity; + await this.connection?.applyMutation({ type: 'full', entities: [ From 6102b73bb3085ba7655c72c4eb05a47816584c6b Mon Sep 17 00:00:00 2001 From: Joe Van Alstyne Date: Thu, 11 Apr 2024 15:18:21 +0900 Subject: [PATCH 075/151] refactor: update baseConfig strings Signed-off-by: Joe Van Alstyne --- .../src/InternalOpenApiDocumentationProvider.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/catalog-backend-module-backstage-openapi/src/InternalOpenApiDocumentationProvider.ts b/plugins/catalog-backend-module-backstage-openapi/src/InternalOpenApiDocumentationProvider.ts index bef0626830..971a5fbc47 100644 --- a/plugins/catalog-backend-module-backstage-openapi/src/InternalOpenApiDocumentationProvider.ts +++ b/plugins/catalog-backend-module-backstage-openapi/src/InternalOpenApiDocumentationProvider.ts @@ -236,12 +236,12 @@ export class InternalOpenApiDocumentationProvider implements EntityProvider { const baseConfig = { metadata: { - name: 'internal_backstage_plugin', - title: 'Default Backstage API', + name: 'internal_backstage_openapi_doc', + title: 'Backstage API', }, spec: { - owner: 'backstage', lifecycle: 'production', + owner: 'backstage', }, }; @@ -271,8 +271,9 @@ export class InternalOpenApiDocumentationProvider implements EntityProvider { }, }; - // Overwrite base config with options from config file. + // Overwrite baseConfig with options from config file. const mergedConfig = lodash.merge(baseConfig, configToMerge); + // Overwite mergedConfig with requiredConfig (i.e., spec.type and spec.definition) to avoid bad configuration. const documentationEntity = lodash.merge( mergedConfig, From ec471d3023743986039d3eed02938b070dd7095a Mon Sep 17 00:00:00 2001 From: Joe Van Alstyne Date: Thu, 11 Apr 2024 19:58:47 +0900 Subject: [PATCH 076/151] remove redundant comment in config Signed-off-by: Joe Van Alstyne --- plugins/catalog-backend-module-backstage-openapi/config.d.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugins/catalog-backend-module-backstage-openapi/config.d.ts b/plugins/catalog-backend-module-backstage-openapi/config.d.ts index e403010951..376c702999 100644 --- a/plugins/catalog-backend-module-backstage-openapi/config.d.ts +++ b/plugins/catalog-backend-module-backstage-openapi/config.d.ts @@ -25,9 +25,6 @@ export interface Config { * A list of plugins, whose OpenAPI specs you want to collate in `InternalOpenApiDocumentationProvider`. */ plugins: string[]; - /** - * Options to ovveride the provided entity's default metadata and spec properties - */ /** * Properties to override on the final entity object. */ From bf1dd900da99faa99379858594bf82acaa0fbf33 Mon Sep 17 00:00:00 2001 From: Camila Belo Date: Thu, 11 Apr 2024 13:22:17 +0200 Subject: [PATCH 077/151] fix: app base url on the router resolver Signed-off-by: Camila Belo --- .../src/routing/RouteResolver.test.ts | 59 +------------------ .../src/routing/RouteResolver.ts | 16 +++-- 2 files changed, 8 insertions(+), 67 deletions(-) diff --git a/packages/frontend-app-api/src/routing/RouteResolver.test.ts b/packages/frontend-app-api/src/routing/RouteResolver.test.ts index 251241a7f9..ba0a66a380 100644 --- a/packages/frontend-app-api/src/routing/RouteResolver.test.ts +++ b/packages/frontend-app-api/src/routing/RouteResolver.test.ts @@ -92,63 +92,6 @@ describe('RouteResolver', () => { expect(r.resolve(externalRef4, src('/'))?.({ x: '6x' })).toBe(undefined); }); - it('should resolve an absolute route and sub route with an app base path', () => { - const r = new RouteResolver( - new Map([ - [ref2, 'my-parent/:x'], - [ref1, 'my-route'], - ]), - new Map([[ref1, ref2]]), - [ - { - routeRefs: new Set([ref2]), - path: 'my-parent/:x', - ...rest, - children: [ - MATCH_ALL_ROUTE, - { routeRefs: new Set([ref1]), path: 'my-route', ...rest }, - ], - }, - ], - new Map(), - '/base', - ); - - expect(r.resolve(ref1, src('/my-parent/1x'))?.()).toBe( - '/base/my-parent/1x/my-route', - ); - expect(r.resolve(ref1, src('/base/my-parent/1x'))?.()).toBe( - '/base/my-parent/1x/my-route', - ); - expect(r.resolve(ref2, src('/'))?.({ x: '1x' })).toBe('/base/my-parent/1x'); - expect(r.resolve(ref2, src('/base'))?.({ x: '1x' })).toBe( - '/base/my-parent/1x', - ); - expect(r.resolve(ref3, src('/'))?.({ y: '1y' })).toBe(undefined); - expect(r.resolve(subRef1, src('/my-parent/2x'))?.()).toBe( - '/base/my-parent/2x/my-route/foo', - ); - expect(r.resolve(subRef1, src('/base/my-parent/2x'))?.()).toBe( - '/base/my-parent/2x/my-route/foo', - ); - expect(r.resolve(subRef2, src('/my-parent/3x'))?.({ a: '2a' })).toBe( - '/base/my-parent/3x/my-route/foo/2a', - ); - expect(r.resolve(subRef2, src('/base/my-parent/3x'))?.({ a: '2a' })).toBe( - '/base/my-parent/3x/my-route/foo/2a', - ); - expect(r.resolve(subRef3, src('/'))?.({ x: '5x' })).toBe( - '/base/my-parent/5x/bar', - ); - expect(r.resolve(subRef4, src('/'))?.({ x: '6x', a: '4a' })).toBe( - '/base/my-parent/6x/bar/4a', - ); - expect(r.resolve(externalRef1, src('/'))?.()).toBe(undefined); - expect(r.resolve(externalRef2, src('/'))?.()).toBe(undefined); - expect(r.resolve(externalRef3, src('/'))?.({ x: '5x' })).toBe(undefined); - expect(r.resolve(externalRef4, src('/'))?.({ x: '6x' })).toBe(undefined); - }); - it('should resolve an absolute route with a param and with a parent', () => { const r = new RouteResolver( new Map([ @@ -377,7 +320,7 @@ describe('RouteResolver', () => { ); expect(r.resolve(ref2, src('/'))?.({ x: 'a/#&?b' })).toBe( - '/base/my-parent/a%2F%23%26%3Fb', + '/my-parent/a%2F%23%26%3Fb', ); }); }); diff --git a/packages/frontend-app-api/src/routing/RouteResolver.ts b/packages/frontend-app-api/src/routing/RouteResolver.ts index 5405bb4d7f..1ec1822fe9 100644 --- a/packages/frontend-app-api/src/routing/RouteResolver.ts +++ b/packages/frontend-app-api/src/routing/RouteResolver.ts @@ -215,15 +215,13 @@ export class RouteResolver implements RouteResolutionApi { // Next we figure out the base path, which is the combination of the common parent path // between our current location and our target location, as well as the additional path // that is the difference between the parent path and the base of our target location. - const basePath = - this.appBasePath + - resolveBasePath( - targetRef, - relativeSourceLocation, - this.routePaths, - this.routeParents, - this.routeObjects, - ); + const basePath = resolveBasePath( + targetRef, + relativeSourceLocation, + this.routePaths, + this.routeParents, + this.routeObjects, + ); const routeFunc: RouteFunc = (...[params]) => { // We selectively encode some some known-dangerous characters in the From 438245968b10daa91937ed52417e6e6263c71427 Mon Sep 17 00:00:00 2001 From: Phil Kuang Date: Thu, 11 Apr 2024 09:00:42 -0400 Subject: [PATCH 078/151] refactor(cookieAuth): set cookie domain against discovery base url Signed-off-by: Phil Kuang --- .../implementations/httpAuth/httpAuthServiceFactory.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/backend-app-api/src/services/implementations/httpAuth/httpAuthServiceFactory.ts b/packages/backend-app-api/src/services/implementations/httpAuth/httpAuthServiceFactory.ts index d7de0ae4ea..c85ba6e4b3 100644 --- a/packages/backend-app-api/src/services/implementations/httpAuth/httpAuthServiceFactory.ts +++ b/packages/backend-app-api/src/services/implementations/httpAuth/httpAuthServiceFactory.ts @@ -218,19 +218,19 @@ class DefaultHttpAuthService implements HttpAuthService { return { expiresAt }; } - async #getCookieOptions(req: Request): Promise<{ + async #getCookieOptions(_req: Request): Promise<{ domain: string; httpOnly: true; secure: boolean; priority: 'high'; sameSite: 'none' | 'lax'; }> { - const requestBaseUrl = `${req.protocol}://${req.hostname}`; - + // TODO: eventually we should read from `${req.protocol}://${req.hostname}` + // once https://github.com/backstage/backstage/issues/24169 has landed const externalBaseUrlStr = await this.#discovery.getExternalBaseUrl( this.#pluginId, ); - const externalBaseUrl = new URL(requestBaseUrl ?? externalBaseUrlStr); + const externalBaseUrl = new URL(externalBaseUrlStr); const secure = externalBaseUrl.protocol === 'https:' || From b94aefccf12de305602a51c90e30bfe7b4bdeec3 Mon Sep 17 00:00:00 2001 From: Steve Zhang Date: Thu, 11 Apr 2024 09:27:07 -0400 Subject: [PATCH 079/151] get authHeader using req.headers instead Signed-off-by: Steve Zhang --- plugins/kubernetes-backend/src/service/KubernetesProxy.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/kubernetes-backend/src/service/KubernetesProxy.ts b/plugins/kubernetes-backend/src/service/KubernetesProxy.ts index 15b99e4180..faf4a90846 100644 --- a/plugins/kubernetes-backend/src/service/KubernetesProxy.ts +++ b/plugins/kubernetes-backend/src/service/KubernetesProxy.ts @@ -172,8 +172,9 @@ export class KubernetesProxy { )?.toString(), }; - const authHeader = req.header?.(HEADER_KUBERNETES_AUTH); - if (authHeader) { + const authHeader = + req.headers[HEADER_KUBERNETES_AUTH.toLocaleLowerCase()]; + if (typeof authHeader === 'string') { req.headers.authorization = authHeader; } else { // Map Backstage-Kubernetes-Authorization-X-X headers to a KubernetesRequestAuth object From fae9638d6553cee5e802b46076a8544eff61ffab Mon Sep 17 00:00:00 2001 From: parmar-abhinav Date: Thu, 11 Apr 2024 19:40:24 +0530 Subject: [PATCH 080/151] Add examples for scaffolder action. Signed-off-by: parmar-abhinav --- .changeset/wet-buttons-buy.md | 5 + .../package.json | 1 + .../src/actions/run/yeoman.examples.test.ts | 115 ++++++++++++++++++ .../src/actions/run/yeoman.examples.ts | 87 +++++++++++++ .../src/actions/run/yeoman.ts | 2 + yarn.lock | 1 + 6 files changed, 211 insertions(+) create mode 100644 .changeset/wet-buttons-buy.md create mode 100644 plugins/scaffolder-backend-module-yeoman/src/actions/run/yeoman.examples.test.ts create mode 100644 plugins/scaffolder-backend-module-yeoman/src/actions/run/yeoman.examples.ts diff --git a/.changeset/wet-buttons-buy.md b/.changeset/wet-buttons-buy.md new file mode 100644 index 0000000000..522be0fc54 --- /dev/null +++ b/.changeset/wet-buttons-buy.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend-module-yeoman': minor +--- + +Add examples for `run:yeoman` scaffolder action. diff --git a/plugins/scaffolder-backend-module-yeoman/package.json b/plugins/scaffolder-backend-module-yeoman/package.json index 1f82a64962..92de03b93d 100644 --- a/plugins/scaffolder-backend-module-yeoman/package.json +++ b/plugins/scaffolder-backend-module-yeoman/package.json @@ -45,6 +45,7 @@ "@backstage/plugin-scaffolder-node-test-utils": "workspace:^", "@backstage/types": "workspace:^", "winston": "^3.2.1", + "yaml": "^2.0.0", "yeoman-environment": "^3.9.1" }, "devDependencies": { diff --git a/plugins/scaffolder-backend-module-yeoman/src/actions/run/yeoman.examples.test.ts b/plugins/scaffolder-backend-module-yeoman/src/actions/run/yeoman.examples.test.ts new file mode 100644 index 0000000000..4875089090 --- /dev/null +++ b/plugins/scaffolder-backend-module-yeoman/src/actions/run/yeoman.examples.test.ts @@ -0,0 +1,115 @@ +/* + * Copyright 2023 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 { yeomanRun } from './yeomanRun'; + +jest.mock('./yeomanRun'); + +import { createMockActionContext } from '@backstage/plugin-scaffolder-node-test-utils'; +import os from 'os'; +import { createRunYeomanAction } from './yeoman'; +import type { ActionContext } from '@backstage/plugin-scaffolder-node'; +import { JsonObject } from '@backstage/types'; +import yaml from 'yaml'; +import { examples } from './yeoman.examples'; + +describe('run:yeoman', () => { + const mockTmpDir = os.tmpdir(); + + let mockContext: ActionContext<{ + namespace: string; + args?: string[]; + options?: JsonObject; + }>; + + const action = createRunYeomanAction(); + + beforeEach(() => { + jest.resetAllMocks(); + }); + + it(`should ${examples[0].description}`, async () => { + const namespace = yaml.parse(examples[0].example).steps[0].input.namespace; + const input = yaml.parse(examples[0].example).steps[0].input; + mockContext = createMockActionContext({ + input: input, + workspacePath: mockTmpDir, + }); + + await action.handler(mockContext); + expect(yeomanRun).toHaveBeenCalledWith( + mockTmpDir, + namespace, + undefined, + undefined, + ); + }); + + it(`should ${examples[1].description}`, async () => { + const namespace = yaml.parse(examples[1].example).steps[0].input.namespace; + const input = yaml.parse(examples[1].example).steps[0].input; + const args: string[] = yaml.parse(examples[1].example).steps[0].input.args; + mockContext = createMockActionContext({ + input: input, + workspacePath: mockTmpDir, + }); + + await action.handler(mockContext); + expect(yeomanRun).toHaveBeenCalledWith( + mockTmpDir, + namespace, + args, + undefined, + ); + }); + + it(`should ${examples[2].description}`, async () => { + const namespace = yaml.parse(examples[2].example).steps[0].input.namespace; + const input = yaml.parse(examples[2].example).steps[0].input; + const options = yaml.parse(examples[2].example).steps[0].input.options; + mockContext = createMockActionContext({ + input: input, + workspacePath: mockTmpDir, + }); + + await action.handler(mockContext); + expect(yeomanRun).toHaveBeenCalledWith( + mockTmpDir, + namespace, + undefined, + options, + ); + }); + + it(`should ${examples[3].description}`, async () => { + const namespace = yaml.parse(examples[3].example).steps[0].input.namespace; + const input = yaml.parse(examples[3].example).steps[0].input; + const options = yaml.parse(examples[3].example).steps[0].input.options; + const args: string[] = yaml.parse(examples[1].example).steps[0].input.args; + mockContext = createMockActionContext({ + input: input, + workspacePath: mockTmpDir, + }); + + await action.handler(mockContext); + expect(yeomanRun).toHaveBeenCalledWith( + mockTmpDir, + namespace, + args, + options, + ); + }); +}); diff --git a/plugins/scaffolder-backend-module-yeoman/src/actions/run/yeoman.examples.ts b/plugins/scaffolder-backend-module-yeoman/src/actions/run/yeoman.examples.ts new file mode 100644 index 0000000000..067cd71fab --- /dev/null +++ b/plugins/scaffolder-backend-module-yeoman/src/actions/run/yeoman.examples.ts @@ -0,0 +1,87 @@ +/* + * Copyright 2023 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 { TemplateExample } from '@backstage/plugin-scaffolder-node'; +import yaml from 'yaml'; + +export const examples: TemplateExample[] = [ + { + description: 'Run a Yeoman generator with minimal options', + example: yaml.stringify({ + steps: [ + { + id: 'run:yeoman', + action: 'run:yeoman', + name: 'Running a yeoman generator', + input: { + namespace: 'node:app', + }, + }, + ], + }), + }, + { + description: + 'Run a yeoman generator with arguments to pass on to Yeoman for templating', + example: yaml.stringify({ + steps: [ + { + id: 'run:yeoman', + action: 'run:yeoman', + name: 'Running a yeoman generator', + input: { + namespace: 'node:app', + args: ['arg1', 'arg2'], + }, + }, + ], + }), + }, + { + description: + 'Run a yeoman generator with options to pass on to Yeoman for templating', + example: yaml.stringify({ + steps: [ + { + id: 'run:yeoman', + action: 'run:yeoman', + name: 'Running a yeoman generator', + input: { + namespace: 'node:app', + options: { option1: 'value1', option2: 'value2' }, + }, + }, + ], + }), + }, + { + description: 'Run a yeoman generator with all options', + example: yaml.stringify({ + steps: [ + { + id: 'run:yeoman', + action: 'run:yeoman', + name: 'Running a yeoman generator', + input: { + namespace: 'node:app', + args: ['arg1', 'arg2'], + options: { option1: 'value1', option2: 'value2' }, + }, + }, + ], + }), + }, +]; diff --git a/plugins/scaffolder-backend-module-yeoman/src/actions/run/yeoman.ts b/plugins/scaffolder-backend-module-yeoman/src/actions/run/yeoman.ts index 62d62807ae..a8bbbf945d 100644 --- a/plugins/scaffolder-backend-module-yeoman/src/actions/run/yeoman.ts +++ b/plugins/scaffolder-backend-module-yeoman/src/actions/run/yeoman.ts @@ -17,6 +17,7 @@ import { JsonObject } from '@backstage/types'; import { createTemplateAction } from '@backstage/plugin-scaffolder-node'; import { yeomanRun } from './yeomanRun'; +import { examples } from './yeoman.examples'; /** * Creates a `run:yeoman` Scaffolder action. @@ -35,6 +36,7 @@ export function createRunYeomanAction() { }>({ id: 'run:yeoman', description: 'Runs Yeoman on an installed Yeoman generator', + examples, schema: { input: { type: 'object', diff --git a/yarn.lock b/yarn.lock index dffbf4f6d3..07a752711f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8719,6 +8719,7 @@ __metadata: "@backstage/plugin-scaffolder-node-test-utils": "workspace:^" "@backstage/types": "workspace:^" winston: ^3.2.1 + yaml: ^2.0.0 yeoman-environment: ^3.9.1 languageName: unknown linkType: soft From 0702291e8f95312e72b85f49e153c4c0238cc7eb Mon Sep 17 00:00:00 2001 From: parmar-abhinav Date: Thu, 11 Apr 2024 19:52:13 +0530 Subject: [PATCH 081/151] chore: updated changeset description as per review feedback Signed-off-by: parmar-abhinav --- .changeset/mighty-humans-tan.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/mighty-humans-tan.md b/.changeset/mighty-humans-tan.md index 24e209a701..cc3a35ccba 100644 --- a/.changeset/mighty-humans-tan.md +++ b/.changeset/mighty-humans-tan.md @@ -2,4 +2,4 @@ '@backstage/plugin-scaffolder-backend-module-gerrit': minor --- -Add examples for publish:gerrit:review scaffolder action & improve related tests +Add examples for `publish:gerrit:review` scaffolder action & improve related tests From 7ef7cc8d4dafa4023146db956e50a0e720a064f4 Mon Sep 17 00:00:00 2001 From: Camila Belo Date: Thu, 11 Apr 2024 17:05:33 +0200 Subject: [PATCH 082/151] docs: add changeset file Signed-off-by: Camila Belo --- .changeset/orange-cherries-sort.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/orange-cherries-sort.md diff --git a/.changeset/orange-cherries-sort.md b/.changeset/orange-cherries-sort.md new file mode 100644 index 0000000000..2b572491a1 --- /dev/null +++ b/.changeset/orange-cherries-sort.md @@ -0,0 +1,5 @@ +--- +'@backstage/frontend-app-api': patch +--- + +Fix duplicated subpath on routes resolved by the `useRouteRef` hook. From 71aafd507a85964b58e183ec1bd5f6e2356f9a8d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 11 Apr 2024 15:38:29 +0000 Subject: [PATCH 083/151] chore(deps): update dependency knip to v5.9.4 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 60 +++++++++++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/yarn.lock b/yarn.lock index 30da40a007..fdd86f2cb5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13677,18 +13677,6 @@ __metadata: languageName: node linkType: hard -"@npmcli/map-workspaces@npm:3.0.4": - version: 3.0.4 - resolution: "@npmcli/map-workspaces@npm:3.0.4" - dependencies: - "@npmcli/name-from-folder": ^2.0.0 - glob: ^10.2.2 - minimatch: ^9.0.0 - read-package-json-fast: ^3.0.0 - checksum: 99607dbc502b16d0ce7a47a81ccc496b3f5ed10df4e61e61a505929de12c356092996044174ae0cfd6d8cc177ef3b597eef4987b674fc0c5a306d3a8cc1fe91a - languageName: node - linkType: hard - "@npmcli/map-workspaces@npm:^2.0.0": version: 2.0.0 resolution: "@npmcli/map-workspaces@npm:2.0.0" @@ -13701,6 +13689,18 @@ __metadata: languageName: node linkType: hard +"@npmcli/map-workspaces@npm:^3.0.4": + version: 3.0.6 + resolution: "@npmcli/map-workspaces@npm:3.0.6" + dependencies: + "@npmcli/name-from-folder": ^2.0.0 + glob: ^10.2.2 + minimatch: ^9.0.0 + read-package-json-fast: ^3.0.0 + checksum: bdb09ee1d044bb9b2857d9e2d7ca82f40783a8549b5a7e150e25f874ee354cdbc8109ad7c3df42ec412f7057d95baa05920c4d361c868a93a42146b8e4390d3d + languageName: node + linkType: hard + "@npmcli/metavuln-calculator@npm:^2.0.0": version: 2.0.0 resolution: "@npmcli/metavuln-calculator@npm:2.0.0" @@ -13754,9 +13754,18 @@ __metadata: languageName: node linkType: hard -"@npmcli/package-json@npm:5.0.0": - version: 5.0.0 - resolution: "@npmcli/package-json@npm:5.0.0" +"@npmcli/package-json@npm:^1.0.1": + version: 1.0.1 + resolution: "@npmcli/package-json@npm:1.0.1" + dependencies: + json-parse-even-better-errors: ^2.3.1 + checksum: 08b66c8ddb1d6b678975a83006d2fe5070b3013bcb68ea9d54c0142538a614596ddfd1143183fbb8f82c5cecf477d98f3c4e473ef34df3bbf3814e97e37e18d3 + languageName: node + linkType: hard + +"@npmcli/package-json@npm:^5.0.0": + version: 5.0.2 + resolution: "@npmcli/package-json@npm:5.0.2" dependencies: "@npmcli/git": ^5.0.0 glob: ^10.2.2 @@ -13765,16 +13774,7 @@ __metadata: normalize-package-data: ^6.0.0 proc-log: ^3.0.0 semver: ^7.5.3 - checksum: 0d128e84e05e8a1771c8cc1f4232053fecf32e28f44e123ad16366ca3a7fd06f272f25f0b7d058f2763cab26bc479c8fc3c570af5de6324b05cb39868dcc6264 - languageName: node - linkType: hard - -"@npmcli/package-json@npm:^1.0.1": - version: 1.0.1 - resolution: "@npmcli/package-json@npm:1.0.1" - dependencies: - json-parse-even-better-errors: ^2.3.1 - checksum: 08b66c8ddb1d6b678975a83006d2fe5070b3013bcb68ea9d54c0142538a614596ddfd1143183fbb8f82c5cecf477d98f3c4e473ef34df3bbf3814e97e37e18d3 + checksum: f0e69d093a5733c7d31ce45098e2ce059f01d09b79329a7f3e975baf91d87f4bf3171fadc27442f4f540dc546954259f178be40ca632b87cfe16bcfe04f00dd3 languageName: node linkType: hard @@ -33249,13 +33249,13 @@ __metadata: linkType: hard "knip@npm:^5.0.0": - version: 5.9.3 - resolution: "knip@npm:5.9.3" + version: 5.9.4 + resolution: "knip@npm:5.9.4" dependencies: "@ericcornelissen/bash-parser": 0.5.2 "@nodelib/fs.walk": 2.0.0 - "@npmcli/map-workspaces": 3.0.4 - "@npmcli/package-json": 5.0.0 + "@npmcli/map-workspaces": ^3.0.4 + "@npmcli/package-json": ^5.0.0 "@pnpm/logger": 5.0.0 "@pnpm/workspace.pkgs-graph": 2.0.14 "@snyk/github-codeowners": 1.1.0 @@ -33280,7 +33280,7 @@ __metadata: typescript: ">=5.0.4" bin: knip: bin/knip.js - checksum: 5a4b8696ddd6d603a490fb759f91c4fa81e66a2f090a0010abcdb3c7cb53467833a0c37ecbde91aee7b8289172a3d161f8b74af1fd5e78bbd2cc9be4203ec53c + checksum: 112f93982090c8947bd28904ad835b4b2793f9ee23fcb895ba0815e759d6b644e9d6ff6d6661af56ecbebb2f6bff21e4e3afcccce93df778aadf9c6d52ca9541 languageName: node linkType: hard From 63fecfae4e2a6440b0841b9fcea86692c14c4f5d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 11 Apr 2024 16:33:36 +0000 Subject: [PATCH 084/151] fix(deps): update dependency swagger-ui-react to v5.15.1 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index fdd86f2cb5..1d98839107 100644 --- a/yarn.lock +++ b/yarn.lock @@ -43336,8 +43336,8 @@ __metadata: linkType: hard "swagger-ui-react@npm:^5.0.0": - version: 5.15.0 - resolution: "swagger-ui-react@npm:5.15.0" + version: 5.15.1 + resolution: "swagger-ui-react@npm:5.15.1" dependencies: "@babel/runtime-corejs3": ^7.24.4 "@braintree/sanitize-url": =7.0.1 @@ -43376,7 +43376,7 @@ __metadata: peerDependencies: react: ">=16.8.0 <19" react-dom: ">=16.8.0 <19" - checksum: cacd3d64f49649d254f658a4868143c356fe106ec193ddcb483a254e997052a13619fababac23e4f939894ca586ba60970ecba9fba09b6c2c65f2c357b8bdfeb + checksum: f1819ac2d50675305ba606364380da1f8e5c78b6f8e4c8bd824766f14fb7c6e4013f2e9d7294147b7045e8676ed73145cf59b030545fe93d9d962dd3fad2d7d4 languageName: node linkType: hard From 507a3e8848f2e191b0c774f5b4d292bde4f08228 Mon Sep 17 00:00:00 2001 From: Ben Lambert Date: Thu, 11 Apr 2024 22:55:53 +0200 Subject: [PATCH 085/151] Revert "chore(deps): update dependency @testing-library/react to v14.3.0" Signed-off-by: blam --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 1d98839107..0150e49562 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18041,8 +18041,8 @@ __metadata: linkType: hard "@testing-library/react@npm:^14.0.0": - version: 14.3.0 - resolution: "@testing-library/react@npm:14.3.0" + version: 14.2.2 + resolution: "@testing-library/react@npm:14.2.2" dependencies: "@babel/runtime": ^7.12.5 "@testing-library/dom": ^9.0.0 @@ -18050,7 +18050,7 @@ __metadata: peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - checksum: 4aa7e583feac7e9bd93ff981d1dc5113329181bf01ad955af2f748f263dc52cdbff6ead6664a8762481e30b70d7f402aaac7a497d9d1a1747ad6906dfb0eabad + checksum: cb73df588592d9101429f057eaa6f320fc12524d5eb2acc8a16002c1ee2d9422a49e44841003bba42974c9ae1ced6b134f0d647826eca42ab8f19e4592971b16 languageName: node linkType: hard From abfbcfca9c8cbbfc9d6f9224adb44272b8af8186 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 11 Apr 2024 21:06:12 +0000 Subject: [PATCH 086/151] chore(deps): update dependency @testing-library/react to v15 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .changeset/renovate-33d4b67.md | 101 ++++++++ packages/app-defaults/package.json | 2 +- packages/app-next/package.json | 2 +- packages/app/package.json | 2 +- packages/core-app-api/package.json | 2 +- packages/core-compat-api/package.json | 2 +- packages/core-components/package.json | 2 +- packages/core-plugin-api/package.json | 2 +- packages/dev-utils/package.json | 2 +- packages/frontend-app-api/package.json | 2 +- packages/frontend-plugin-api/package.json | 2 +- packages/frontend-test-utils/package.json | 2 +- .../techdocs-cli-embedded-app/package.json | 2 +- packages/test-utils/package.json | 2 +- packages/theme/package.json | 2 +- packages/version-bridge/package.json | 2 +- plugins/adr/package.json | 2 +- plugins/airbrake/package.json | 2 +- plugins/allure/package.json | 2 +- plugins/analytics-module-ga/package.json | 2 +- plugins/analytics-module-ga4/package.json | 2 +- .../package.json | 2 +- plugins/apache-airflow/package.json | 2 +- plugins/api-docs/package.json | 2 +- plugins/apollo-explorer/package.json | 2 +- plugins/auth-react/package.json | 2 +- plugins/azure-devops/package.json | 2 +- plugins/azure-sites/package.json | 2 +- plugins/bitrise/package.json | 2 +- plugins/catalog-graph/package.json | 2 +- plugins/catalog-import/package.json | 2 +- plugins/catalog-react/package.json | 2 +- .../catalog-unprocessed-entities/package.json | 2 +- plugins/catalog/package.json | 2 +- plugins/cloudbuild/package.json | 2 +- plugins/code-climate/package.json | 2 +- plugins/code-coverage/package.json | 2 +- plugins/codescene/package.json | 2 +- plugins/config-schema/package.json | 2 +- plugins/cost-insights/package.json | 2 +- plugins/dynatrace/package.json | 2 +- plugins/entity-feedback/package.json | 2 +- plugins/entity-validation/package.json | 2 +- plugins/example-todo-list/package.json | 2 +- plugins/explore-react/package.json | 2 +- plugins/explore/package.json | 2 +- plugins/firehydrant/package.json | 2 +- plugins/fossa/package.json | 2 +- plugins/gcalendar/package.json | 2 +- plugins/gcp-projects/package.json | 2 +- plugins/git-release-manager/package.json | 2 +- plugins/github-actions/package.json | 2 +- plugins/github-deployments/package.json | 2 +- plugins/github-issues/package.json | 2 +- .../github-pull-requests-board/package.json | 2 +- plugins/gitops-profiles/package.json | 2 +- plugins/gocd/package.json | 2 +- plugins/graphiql/package.json | 2 +- plugins/graphql-voyager/package.json | 2 +- plugins/home/package.json | 2 +- plugins/ilert/package.json | 2 +- plugins/jenkins/package.json | 2 +- plugins/kafka/package.json | 2 +- plugins/kubernetes-cluster/package.json | 2 +- plugins/kubernetes-react/package.json | 2 +- plugins/kubernetes/package.json | 2 +- plugins/lighthouse/package.json | 2 +- plugins/microsoft-calendar/package.json | 2 +- plugins/newrelic/package.json | 2 +- plugins/nomad/package.json | 2 +- plugins/notifications/package.json | 2 +- plugins/octopus-deploy/package.json | 2 +- plugins/org-react/package.json | 2 +- plugins/org/package.json | 2 +- plugins/pagerduty/package.json | 2 +- plugins/periskop/package.json | 2 +- plugins/permission-react/package.json | 2 +- plugins/playlist/package.json | 2 +- plugins/puppetdb/package.json | 2 +- plugins/rollbar/package.json | 2 +- plugins/scaffolder-react/package.json | 2 +- plugins/scaffolder/package.json | 2 +- plugins/search-react/package.json | 2 +- plugins/search/package.json | 2 +- plugins/sentry/package.json | 2 +- plugins/shortcuts/package.json | 2 +- plugins/signals-react/package.json | 2 +- plugins/signals/package.json | 2 +- plugins/sonarqube/package.json | 2 +- plugins/splunk-on-call/package.json | 2 +- plugins/stack-overflow/package.json | 2 +- plugins/stackstorm/package.json | 2 +- plugins/tech-insights/package.json | 2 +- plugins/tech-radar/package.json | 2 +- .../techdocs-addons-test-utils/package.json | 2 +- .../package.json | 2 +- plugins/techdocs-react/package.json | 2 +- plugins/techdocs/package.json | 2 +- plugins/todo/package.json | 2 +- plugins/user-settings/package.json | 2 +- plugins/vault/package.json | 2 +- plugins/xcmetrics/package.json | 2 +- yarn.lock | 230 ++++++++++-------- 103 files changed, 325 insertions(+), 208 deletions(-) create mode 100644 .changeset/renovate-33d4b67.md diff --git a/.changeset/renovate-33d4b67.md b/.changeset/renovate-33d4b67.md new file mode 100644 index 0000000000..4c042133d3 --- /dev/null +++ b/.changeset/renovate-33d4b67.md @@ -0,0 +1,101 @@ +--- +'@backstage/app-defaults': patch +'@backstage/core-app-api': patch +'@backstage/core-compat-api': patch +'@backstage/core-components': patch +'@backstage/core-plugin-api': patch +'@backstage/dev-utils': patch +'@backstage/frontend-app-api': patch +'@backstage/frontend-plugin-api': patch +'@backstage/frontend-test-utils': patch +'@backstage/test-utils': patch +'@backstage/theme': patch +'@backstage/version-bridge': patch +'@backstage/plugin-adr': patch +'@backstage/plugin-airbrake': patch +'@backstage/plugin-allure': patch +'@backstage/plugin-analytics-module-ga': patch +'@backstage/plugin-analytics-module-ga4': patch +'@backstage/plugin-analytics-module-newrelic-browser': patch +'@backstage/plugin-apache-airflow': patch +'@backstage/plugin-api-docs': patch +'@backstage/plugin-apollo-explorer': patch +'@backstage/plugin-auth-react': patch +'@backstage/plugin-azure-devops': patch +'@backstage/plugin-azure-sites': patch +'@backstage/plugin-bitrise': patch +'@backstage/plugin-catalog-graph': patch +'@backstage/plugin-catalog-import': patch +'@backstage/plugin-catalog-react': patch +'@backstage/plugin-catalog-unprocessed-entities': patch +'@backstage/plugin-catalog': patch +'@backstage/plugin-cloudbuild': patch +'@backstage/plugin-code-climate': 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-entity-feedback': patch +'@backstage/plugin-entity-validation': 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-voyager': patch +'@backstage/plugin-home': patch +'@backstage/plugin-ilert': patch +'@backstage/plugin-jenkins': patch +'@backstage/plugin-kafka': patch +'@backstage/plugin-kubernetes-cluster': patch +'@backstage/plugin-kubernetes-react': patch +'@backstage/plugin-kubernetes': patch +'@backstage/plugin-lighthouse': patch +'@backstage/plugin-microsoft-calendar': patch +'@backstage/plugin-newrelic': patch +'@backstage/plugin-nomad': patch +'@backstage/plugin-notifications': patch +'@backstage/plugin-octopus-deploy': patch +'@backstage/plugin-org-react': patch +'@backstage/plugin-org': patch +'@backstage/plugin-pagerduty': patch +'@backstage/plugin-periskop': patch +'@backstage/plugin-permission-react': patch +'@backstage/plugin-playlist': patch +'@backstage/plugin-puppetdb': patch +'@backstage/plugin-rollbar': patch +'@backstage/plugin-scaffolder-react': patch +'@backstage/plugin-scaffolder': patch +'@backstage/plugin-search-react': patch +'@backstage/plugin-search': patch +'@backstage/plugin-sentry': patch +'@backstage/plugin-shortcuts': patch +'@backstage/plugin-signals-react': patch +'@backstage/plugin-signals': patch +'@backstage/plugin-sonarqube': patch +'@backstage/plugin-splunk-on-call': patch +'@backstage/plugin-stack-overflow': patch +'@backstage/plugin-stackstorm': patch +'@backstage/plugin-tech-insights': patch +'@backstage/plugin-tech-radar': patch +'@backstage/plugin-techdocs-addons-test-utils': patch +'@backstage/plugin-techdocs-module-addons-contrib': patch +'@backstage/plugin-techdocs-react': patch +'@backstage/plugin-techdocs': patch +'@backstage/plugin-todo': patch +'@backstage/plugin-user-settings': patch +'@backstage/plugin-vault': patch +'@backstage/plugin-xcmetrics': patch +--- + +Updated dependency `@testing-library/react` to `^15.0.0`. diff --git a/packages/app-defaults/package.json b/packages/app-defaults/package.json index 49bee12aae..c1f31dca88 100644 --- a/packages/app-defaults/package.json +++ b/packages/app-defaults/package.json @@ -48,7 +48,7 @@ "@backstage/cli": "workspace:^", "@backstage/test-utils": "workspace:^", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@types/react": "^16.13.1 || ^17.0.0" }, "peerDependencies": { diff --git a/packages/app-next/package.json b/packages/app-next/package.json index 7b2ae446b2..ab2ea632ad 100644 --- a/packages/app-next/package.json +++ b/packages/app-next/package.json @@ -105,7 +105,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "@types/jquery": "^3.3.34", "@types/react": "*", diff --git a/packages/app/package.json b/packages/app/package.json index 0a653f26e8..87d4ec3352 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -136,7 +136,7 @@ "@playwright/test": "^1.32.3", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "@types/jquery": "^3.3.34", "@types/react": "*", diff --git a/packages/core-app-api/package.json b/packages/core-app-api/package.json index 6877a9f6be..2b0fca15e4 100644 --- a/packages/core-app-api/package.json +++ b/packages/core-app-api/package.json @@ -66,7 +66,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/react-hooks": "^8.0.0", "@testing-library/user-event": "^14.0.0", "@types/zen-observable": "^0.8.0", diff --git a/packages/core-compat-api/package.json b/packages/core-compat-api/package.json index c77c484968..da4a79d9c3 100644 --- a/packages/core-compat-api/package.json +++ b/packages/core-compat-api/package.json @@ -46,7 +46,7 @@ "@backstage/plugin-stackstorm": "workspace:^", "@oriflame/backstage-plugin-score-card": "^0.8.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/packages/core-components/package.json b/packages/core-components/package.json index f2dac2421c..6b1f926826 100644 --- a/packages/core-components/package.json +++ b/packages/core-components/package.json @@ -102,7 +102,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "@types/ansi-regex": "^5.0.0", "@types/classnames": "^2.2.9", diff --git a/packages/core-plugin-api/package.json b/packages/core-plugin-api/package.json index 3bb2d48a22..579ee33307 100644 --- a/packages/core-plugin-api/package.json +++ b/packages/core-plugin-api/package.json @@ -64,7 +64,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0" }, "files": [ diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index 36dc8a1b27..31eb338668 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -54,7 +54,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "zen-observable": "^0.10.0" }, diff --git a/packages/frontend-app-api/package.json b/packages/frontend-app-api/package.json index 802788f56e..b7eae93e53 100644 --- a/packages/frontend-app-api/package.json +++ b/packages/frontend-app-api/package.json @@ -50,7 +50,7 @@ "@backstage/cli": "workspace:^", "@backstage/test-utils": "workspace:^", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/packages/frontend-plugin-api/package.json b/packages/frontend-plugin-api/package.json index e1e13c6e22..6eef853725 100644 --- a/packages/frontend-plugin-api/package.json +++ b/packages/frontend-plugin-api/package.json @@ -47,7 +47,7 @@ "@backstage/frontend-test-utils": "workspace:^", "@backstage/test-utils": "workspace:^", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "history": "^5.3.0" }, "peerDependencies": { diff --git a/packages/frontend-test-utils/package.json b/packages/frontend-test-utils/package.json index cc25424f2d..99f09da8ab 100644 --- a/packages/frontend-test-utils/package.json +++ b/packages/frontend-test-utils/package.json @@ -42,7 +42,7 @@ "@types/react": "*" }, "peerDependencies": { - "@testing-library/react": "^12.1.3 || ^13.0.0 || ^14.0.0", + "@testing-library/react": "^15.0.0", "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" } diff --git a/packages/techdocs-cli-embedded-app/package.json b/packages/techdocs-cli-embedded-app/package.json index 6004e282e0..90dcd4bc60 100644 --- a/packages/techdocs-cli-embedded-app/package.json +++ b/packages/techdocs-cli-embedded-app/package.json @@ -38,7 +38,7 @@ "@backstage/cli": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "@types/react": "*", "@types/react-dom": "*", diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 0fbef16d15..6d379d8817 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -69,7 +69,7 @@ "msw": "^1.0.0" }, "peerDependencies": { - "@testing-library/react": "^12.1.3 || ^13.0.0 || ^14.0.0", + "@testing-library/react": "^15.0.0", "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" diff --git a/packages/theme/package.json b/packages/theme/package.json index d58570f57d..4e5b5608b7 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -44,7 +44,7 @@ "@backstage/cli": "workspace:^", "@mui/styles": "^5.14.18", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@types/react": "^16.13.1 || ^17.0.0" }, "peerDependencies": { diff --git a/packages/version-bridge/package.json b/packages/version-bridge/package.json index 402e60465c..1eb65407ef 100644 --- a/packages/version-bridge/package.json +++ b/packages/version-bridge/package.json @@ -41,7 +41,7 @@ "devDependencies": { "@backstage/cli": "workspace:^", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/adr/package.json b/plugins/adr/package.json index 1609d3ebc4..d99a004761 100644 --- a/plugins/adr/package.json +++ b/plugins/adr/package.json @@ -64,7 +64,7 @@ "@backstage/cli": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/airbrake/package.json b/plugins/airbrake/package.json index 733297f372..3722e9a491 100644 --- a/plugins/airbrake/package.json +++ b/plugins/airbrake/package.json @@ -50,7 +50,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "msw": "^1.0.0" }, "peerDependencies": { diff --git a/plugins/allure/package.json b/plugins/allure/package.json index 8ce1bc8527..e4efe16170 100644 --- a/plugins/allure/package.json +++ b/plugins/allure/package.json @@ -46,7 +46,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "msw": "^1.0.0" }, "peerDependencies": { diff --git a/plugins/analytics-module-ga/package.json b/plugins/analytics-module-ga/package.json index 94c9166d5f..f0ec76c6ba 100644 --- a/plugins/analytics-module-ga/package.json +++ b/plugins/analytics-module-ga/package.json @@ -44,7 +44,7 @@ "@backstage/dev-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@types/react": "^16.13.1 || ^17.0.0" }, "peerDependencies": { diff --git a/plugins/analytics-module-ga4/package.json b/plugins/analytics-module-ga4/package.json index 803bda911f..0ad7bfcf2d 100644 --- a/plugins/analytics-module-ga4/package.json +++ b/plugins/analytics-module-ga4/package.json @@ -44,7 +44,7 @@ "@backstage/dev-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@types/jest": "^29.0.0", "@types/react": "^16.13.1 || ^17.0.0" }, diff --git a/plugins/analytics-module-newrelic-browser/package.json b/plugins/analytics-module-newrelic-browser/package.json index 6225003830..108b99e34c 100644 --- a/plugins/analytics-module-newrelic-browser/package.json +++ b/plugins/analytics-module-newrelic-browser/package.json @@ -42,7 +42,7 @@ "@backstage/cli": "workspace:^", "@backstage/dev-utils": "workspace:^", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0" diff --git a/plugins/apache-airflow/package.json b/plugins/apache-airflow/package.json index 85a2d981c4..a88a3db84c 100644 --- a/plugins/apache-airflow/package.json +++ b/plugins/apache-airflow/package.json @@ -50,7 +50,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "msw": "^1.0.0" }, "peerDependencies": { diff --git a/plugins/api-docs/package.json b/plugins/api-docs/package.json index d9c1199564..de5510bbab 100644 --- a/plugins/api-docs/package.json +++ b/plugins/api-docs/package.json @@ -78,7 +78,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "@types/swagger-ui-react": "^4.18.0" }, diff --git a/plugins/apollo-explorer/package.json b/plugins/apollo-explorer/package.json index 334e70ee06..4516ab6404 100644 --- a/plugins/apollo-explorer/package.json +++ b/plugins/apollo-explorer/package.json @@ -44,7 +44,7 @@ "@backstage/dev-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/auth-react/package.json b/plugins/auth-react/package.json index a142908585..43990a1e6a 100644 --- a/plugins/auth-react/package.json +++ b/plugins/auth-react/package.json @@ -43,7 +43,7 @@ "@backstage/cli": "workspace:^", "@backstage/test-utils": "workspace:^", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "msw": "^1.0.0" }, diff --git a/plugins/azure-devops/package.json b/plugins/azure-devops/package.json index 66973d1566..cee631381d 100644 --- a/plugins/azure-devops/package.json +++ b/plugins/azure-devops/package.json @@ -67,7 +67,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/azure-sites/package.json b/plugins/azure-sites/package.json index 91416e248e..9501893847 100644 --- a/plugins/azure-sites/package.json +++ b/plugins/azure-sites/package.json @@ -57,7 +57,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "msw": "^1.0.0" }, "peerDependencies": { diff --git a/plugins/bitrise/package.json b/plugins/bitrise/package.json index 8bdc067fbf..e9efeb161f 100644 --- a/plugins/bitrise/package.json +++ b/plugins/bitrise/package.json @@ -54,7 +54,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "@types/recharts": "^1.8.15", "msw": "^1.0.0" diff --git a/plugins/catalog-graph/package.json b/plugins/catalog-graph/package.json index c57250edad..ae4c71c510 100644 --- a/plugins/catalog-graph/package.json +++ b/plugins/catalog-graph/package.json @@ -71,7 +71,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0" }, "peerDependencies": { diff --git a/plugins/catalog-import/package.json b/plugins/catalog-import/package.json index dae1473b91..949d25371f 100644 --- a/plugins/catalog-import/package.json +++ b/plugins/catalog-import/package.json @@ -81,7 +81,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "msw": "^1.0.0" }, diff --git a/plugins/catalog-react/package.json b/plugins/catalog-react/package.json index 91481f0c71..9594beef19 100644 --- a/plugins/catalog-react/package.json +++ b/plugins/catalog-react/package.json @@ -84,7 +84,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "@types/zen-observable": "^0.8.0", "react-test-renderer": "^16.13.1" diff --git a/plugins/catalog-unprocessed-entities/package.json b/plugins/catalog-unprocessed-entities/package.json index b2f315f9cf..0b745e7f7d 100644 --- a/plugins/catalog-unprocessed-entities/package.json +++ b/plugins/catalog-unprocessed-entities/package.json @@ -46,7 +46,7 @@ "@backstage/cli": "workspace:^", "@backstage/dev-utils": "workspace:^", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index 81189db116..f50cd81c4f 100644 --- a/plugins/catalog/package.json +++ b/plugins/catalog/package.json @@ -86,7 +86,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0" }, "peerDependencies": { diff --git a/plugins/cloudbuild/package.json b/plugins/cloudbuild/package.json index 3e9cd24699..d3fdeb26c0 100644 --- a/plugins/cloudbuild/package.json +++ b/plugins/cloudbuild/package.json @@ -54,7 +54,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/code-climate/package.json b/plugins/code-climate/package.json index 3c5019c220..8de5b2dca2 100644 --- a/plugins/code-climate/package.json +++ b/plugins/code-climate/package.json @@ -48,7 +48,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@types/humanize-duration": "^3.27.1", "@types/luxon": "^3.0.0" }, diff --git a/plugins/code-coverage/package.json b/plugins/code-coverage/package.json index dd31234e51..f032340751 100644 --- a/plugins/code-coverage/package.json +++ b/plugins/code-coverage/package.json @@ -54,7 +54,7 @@ "@backstage/dev-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@types/highlightjs": "^10.1.0", "@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0", "@types/recharts": "^1.8.15" diff --git a/plugins/codescene/package.json b/plugins/codescene/package.json index fce2c0bba0..2bc758b48c 100644 --- a/plugins/codescene/package.json +++ b/plugins/codescene/package.json @@ -54,7 +54,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "msw": "^1.0.0" }, "peerDependencies": { diff --git a/plugins/config-schema/package.json b/plugins/config-schema/package.json index 19bcf59ab9..f1467c4b45 100644 --- a/plugins/config-schema/package.json +++ b/plugins/config-schema/package.json @@ -50,7 +50,7 @@ "@backstage/dev-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/cost-insights/package.json b/plugins/cost-insights/package.json index f893fb15b9..05b881f344 100644 --- a/plugins/cost-insights/package.json +++ b/plugins/cost-insights/package.json @@ -67,7 +67,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "@types/pluralize": "^0.0.33", "@types/recharts": "^1.8.14", diff --git a/plugins/dynatrace/package.json b/plugins/dynatrace/package.json index ad995b92c3..b5fb3cb704 100644 --- a/plugins/dynatrace/package.json +++ b/plugins/dynatrace/package.json @@ -47,7 +47,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "@backstage/plugin-catalog-react": "workspace:^", diff --git a/plugins/entity-feedback/package.json b/plugins/entity-feedback/package.json index 6582d45b08..5b13c0114e 100644 --- a/plugins/entity-feedback/package.json +++ b/plugins/entity-feedback/package.json @@ -48,7 +48,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "msw": "^1.0.0" }, diff --git a/plugins/entity-validation/package.json b/plugins/entity-validation/package.json index e70e8af180..cf5ded9e7b 100644 --- a/plugins/entity-validation/package.json +++ b/plugins/entity-validation/package.json @@ -58,7 +58,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/example-todo-list/package.json b/plugins/example-todo-list/package.json index b555a30940..9537be025f 100644 --- a/plugins/example-todo-list/package.json +++ b/plugins/example-todo-list/package.json @@ -43,7 +43,7 @@ "@backstage/cli": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@types/react": "^16.13.1 || ^17.0.0" }, "peerDependencies": { diff --git a/plugins/explore-react/package.json b/plugins/explore-react/package.json index 1f7a5daa6e..57724a3425 100644 --- a/plugins/explore-react/package.json +++ b/plugins/explore-react/package.json @@ -43,7 +43,7 @@ "@backstage/cli": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@types/react": "^16.13.1 || ^17.0.0" }, "peerDependencies": { diff --git a/plugins/explore/package.json b/plugins/explore/package.json index 1fe23cd805..3a6ed39175 100644 --- a/plugins/explore/package.json +++ b/plugins/explore/package.json @@ -74,7 +74,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "msw": "^1.0.0" }, "peerDependencies": { diff --git a/plugins/firehydrant/package.json b/plugins/firehydrant/package.json index 98954c20d0..a42c45ea85 100644 --- a/plugins/firehydrant/package.json +++ b/plugins/firehydrant/package.json @@ -50,7 +50,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/fossa/package.json b/plugins/fossa/package.json index fd6cca18eb..c988f76d3c 100644 --- a/plugins/fossa/package.json +++ b/plugins/fossa/package.json @@ -58,7 +58,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "msw": "^1.0.0" }, "peerDependencies": { diff --git a/plugins/gcalendar/package.json b/plugins/gcalendar/package.json index 3b00286389..16d41e0d26 100644 --- a/plugins/gcalendar/package.json +++ b/plugins/gcalendar/package.json @@ -55,7 +55,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@types/dompurify": "^3.0.0", "@types/sanitize-html": "^2.6.2" }, diff --git a/plugins/gcp-projects/package.json b/plugins/gcp-projects/package.json index 5db043a18b..c2a59caa2d 100644 --- a/plugins/gcp-projects/package.json +++ b/plugins/gcp-projects/package.json @@ -48,7 +48,7 @@ "@backstage/dev-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/git-release-manager/package.json b/plugins/git-release-manager/package.json index c8e6673eb7..65307b4b74 100644 --- a/plugins/git-release-manager/package.json +++ b/plugins/git-release-manager/package.json @@ -53,7 +53,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@types/recharts": "^1.8.15" }, "peerDependencies": { diff --git a/plugins/github-actions/package.json b/plugins/github-actions/package.json index 09af45c11a..c929ffd639 100644 --- a/plugins/github-actions/package.json +++ b/plugins/github-actions/package.json @@ -60,7 +60,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/github-deployments/package.json b/plugins/github-deployments/package.json index 33f4e4aba9..53912cecdb 100644 --- a/plugins/github-deployments/package.json +++ b/plugins/github-deployments/package.json @@ -54,7 +54,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "msw": "^1.0.0" }, "peerDependencies": { diff --git a/plugins/github-issues/package.json b/plugins/github-issues/package.json index 72d950cdfe..fb7882ed0b 100644 --- a/plugins/github-issues/package.json +++ b/plugins/github-issues/package.json @@ -52,7 +52,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/github-pull-requests-board/package.json b/plugins/github-pull-requests-board/package.json index 42e4cf2fac..5077c22bd9 100644 --- a/plugins/github-pull-requests-board/package.json +++ b/plugins/github-pull-requests-board/package.json @@ -56,7 +56,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/gitops-profiles/package.json b/plugins/gitops-profiles/package.json index 4fda2a1155..e9c1ed67e4 100644 --- a/plugins/gitops-profiles/package.json +++ b/plugins/gitops-profiles/package.json @@ -52,7 +52,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/gocd/package.json b/plugins/gocd/package.json index 0fbfd31271..9565223943 100644 --- a/plugins/gocd/package.json +++ b/plugins/gocd/package.json @@ -54,7 +54,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "@types/lodash": "^4.14.173", "@types/luxon": "^3.0.0", diff --git a/plugins/graphiql/package.json b/plugins/graphiql/package.json index dc424845d8..04cf087512 100644 --- a/plugins/graphiql/package.json +++ b/plugins/graphiql/package.json @@ -66,7 +66,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@types/codemirror": "^5.0.0" }, "peerDependencies": { diff --git a/plugins/graphql-voyager/package.json b/plugins/graphql-voyager/package.json index 02d30e71e2..1f1df3ef22 100644 --- a/plugins/graphql-voyager/package.json +++ b/plugins/graphql-voyager/package.json @@ -47,7 +47,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "files": [ "dist" diff --git a/plugins/home/package.json b/plugins/home/package.json index 991cb58ad6..19d89a45a0 100644 --- a/plugins/home/package.json +++ b/plugins/home/package.json @@ -83,7 +83,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "@types/react-grid-layout": "^1.3.2" }, diff --git a/plugins/ilert/package.json b/plugins/ilert/package.json index f985f566a8..ef47e4d654 100644 --- a/plugins/ilert/package.json +++ b/plugins/ilert/package.json @@ -54,7 +54,7 @@ "@backstage/dev-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/jenkins/package.json b/plugins/jenkins/package.json index e8ca26f96d..9c519ceacf 100644 --- a/plugins/jenkins/package.json +++ b/plugins/jenkins/package.json @@ -55,7 +55,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@types/testing-library__jest-dom": "^5.9.1" }, "peerDependencies": { diff --git a/plugins/kafka/package.json b/plugins/kafka/package.json index 3d007d8996..72d328738a 100644 --- a/plugins/kafka/package.json +++ b/plugins/kafka/package.json @@ -49,7 +49,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "jest-when": "^3.1.0" }, "peerDependencies": { diff --git a/plugins/kubernetes-cluster/package.json b/plugins/kubernetes-cluster/package.json index 8c4ec3e718..071b26eb4c 100644 --- a/plugins/kubernetes-cluster/package.json +++ b/plugins/kubernetes-cluster/package.json @@ -60,7 +60,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@types/node": "^16.11.26" }, "peerDependencies": { diff --git a/plugins/kubernetes-react/package.json b/plugins/kubernetes-react/package.json index 1aef7ad1ca..1101282e7e 100644 --- a/plugins/kubernetes-react/package.json +++ b/plugins/kubernetes-react/package.json @@ -61,7 +61,7 @@ "@backstage/core-app-api": "workspace:^", "@backstage/test-utils": "workspace:^", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "jest-websocket-mock": "^2.5.0", "msw": "^1.3.1" }, diff --git a/plugins/kubernetes/package.json b/plugins/kubernetes/package.json index 5d6ed86496..13293d6b22 100644 --- a/plugins/kubernetes/package.json +++ b/plugins/kubernetes/package.json @@ -65,7 +65,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "files": [ "dist" diff --git a/plugins/lighthouse/package.json b/plugins/lighthouse/package.json index 2dc57c8e50..e11200ef82 100644 --- a/plugins/lighthouse/package.json +++ b/plugins/lighthouse/package.json @@ -55,7 +55,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "msw": "^1.0.0" }, "peerDependencies": { diff --git a/plugins/microsoft-calendar/package.json b/plugins/microsoft-calendar/package.json index 83ab9d9300..082be7e47c 100644 --- a/plugins/microsoft-calendar/package.json +++ b/plugins/microsoft-calendar/package.json @@ -73,7 +73,7 @@ "@backstage/dev-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "files": [ "dist" diff --git a/plugins/newrelic/package.json b/plugins/newrelic/package.json index b664387f55..91031dd807 100644 --- a/plugins/newrelic/package.json +++ b/plugins/newrelic/package.json @@ -51,7 +51,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@types/parse-link-header": "^2.0.1", "msw": "^1.2.3" }, diff --git a/plugins/nomad/package.json b/plugins/nomad/package.json index 3b269efd13..94786255d6 100644 --- a/plugins/nomad/package.json +++ b/plugins/nomad/package.json @@ -46,7 +46,7 @@ "@backstage/cli": "workspace:^", "@backstage/dev-utils": "workspace:^", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "cross-fetch": "^4.0.0" }, "peerDependencies": { diff --git a/plugins/notifications/package.json b/plugins/notifications/package.json index e6c4f2f765..bed10c1eda 100644 --- a/plugins/notifications/package.json +++ b/plugins/notifications/package.json @@ -52,7 +52,7 @@ "@backstage/dev-utils": "workspace:^", "@backstage/test-utils": "workspace:^", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "msw": "^1.0.0" }, diff --git a/plugins/octopus-deploy/package.json b/plugins/octopus-deploy/package.json index c8bf7823a6..395b692dba 100644 --- a/plugins/octopus-deploy/package.json +++ b/plugins/octopus-deploy/package.json @@ -47,7 +47,7 @@ "@backstage/dev-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/org-react/package.json b/plugins/org-react/package.json index b705fe000e..4aa606151d 100644 --- a/plugins/org-react/package.json +++ b/plugins/org-react/package.json @@ -52,7 +52,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0" }, "peerDependencies": { diff --git a/plugins/org/package.json b/plugins/org/package.json index afa413d5f3..67db6c2816 100644 --- a/plugins/org/package.json +++ b/plugins/org/package.json @@ -75,7 +75,7 @@ "@backstage/types": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0" }, "peerDependencies": { diff --git a/plugins/pagerduty/package.json b/plugins/pagerduty/package.json index 64f0c99a17..384b6129a9 100644 --- a/plugins/pagerduty/package.json +++ b/plugins/pagerduty/package.json @@ -58,7 +58,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/periskop/package.json b/plugins/periskop/package.json index 795ce3b603..68f148d5c8 100644 --- a/plugins/periskop/package.json +++ b/plugins/periskop/package.json @@ -47,7 +47,7 @@ "@backstage/dev-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@types/luxon": "^3.0.0" }, "peerDependencies": { diff --git a/plugins/permission-react/package.json b/plugins/permission-react/package.json index a4f5dad7d4..590fb04205 100644 --- a/plugins/permission-react/package.json +++ b/plugins/permission-react/package.json @@ -45,7 +45,7 @@ "@backstage/cli": "workspace:^", "@backstage/test-utils": "workspace:^", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/playlist/package.json b/plugins/playlist/package.json index 873c5ee1f0..045be29fa3 100644 --- a/plugins/playlist/package.json +++ b/plugins/playlist/package.json @@ -61,7 +61,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "msw": "^1.0.0", "swr": "^2.0.0" }, diff --git a/plugins/puppetdb/package.json b/plugins/puppetdb/package.json index 7c278b44da..f9070a0196 100644 --- a/plugins/puppetdb/package.json +++ b/plugins/puppetdb/package.json @@ -53,7 +53,7 @@ "@backstage/dev-utils": "workspace:^", "@backstage/test-utils": "workspace:^", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "msw": "^1.0.1" }, "peerDependencies": { diff --git a/plugins/rollbar/package.json b/plugins/rollbar/package.json index dc31f1d9e7..d75e74df82 100644 --- a/plugins/rollbar/package.json +++ b/plugins/rollbar/package.json @@ -55,7 +55,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/scaffolder-react/package.json b/plugins/scaffolder-react/package.json index 635584bbb8..7954abe274 100644 --- a/plugins/scaffolder-react/package.json +++ b/plugins/scaffolder-react/package.json @@ -90,7 +90,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "@types/humanize-duration": "^3.18.1", "@types/luxon": "^3.0.0" diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index d9f301f9fb..bc636bdaff 100644 --- a/plugins/scaffolder/package.json +++ b/plugins/scaffolder/package.json @@ -101,7 +101,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "@types/humanize-duration": "^3.18.1", "@types/json-schema": "^7.0.9", diff --git a/plugins/search-react/package.json b/plugins/search-react/package.json index ff52d2e9eb..fc7d509315 100644 --- a/plugins/search-react/package.json +++ b/plugins/search-react/package.json @@ -71,7 +71,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0" }, "peerDependencies": { diff --git a/plugins/search/package.json b/plugins/search/package.json index 26a4b3416e..8c23419779 100644 --- a/plugins/search/package.json +++ b/plugins/search/package.json @@ -73,7 +73,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "history": "^5.0.0" }, diff --git a/plugins/sentry/package.json b/plugins/sentry/package.json index ed82f10616..a9ba41f8f6 100644 --- a/plugins/sentry/package.json +++ b/plugins/sentry/package.json @@ -56,7 +56,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@types/luxon": "^3.0.0" }, "peerDependencies": { diff --git a/plugins/shortcuts/package.json b/plugins/shortcuts/package.json index c24d7b16c0..c7d08f0151 100644 --- a/plugins/shortcuts/package.json +++ b/plugins/shortcuts/package.json @@ -51,7 +51,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@types/zen-observable": "^0.8.2" }, "peerDependencies": { diff --git a/plugins/signals-react/package.json b/plugins/signals-react/package.json index fb6cf4b98c..bbce764ed3 100644 --- a/plugins/signals-react/package.json +++ b/plugins/signals-react/package.json @@ -40,7 +40,7 @@ "@backstage/cli": "workspace:^", "@backstage/test-utils": "workspace:^", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0" diff --git a/plugins/signals/package.json b/plugins/signals/package.json index d9b8e72642..c88567be5e 100644 --- a/plugins/signals/package.json +++ b/plugins/signals/package.json @@ -48,7 +48,7 @@ "@backstage/dev-utils": "workspace:^", "@backstage/test-utils": "workspace:^", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "jest-websocket-mock": "^2.5.0", "msw": "^1.0.0" diff --git a/plugins/sonarqube/package.json b/plugins/sonarqube/package.json index fa2c6ca71a..12957788b1 100644 --- a/plugins/sonarqube/package.json +++ b/plugins/sonarqube/package.json @@ -61,7 +61,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "msw": "^1.0.0" }, "peerDependencies": { diff --git a/plugins/splunk-on-call/package.json b/plugins/splunk-on-call/package.json index f9c5911e8c..3b7a2fa8b0 100644 --- a/plugins/splunk-on-call/package.json +++ b/plugins/splunk-on-call/package.json @@ -56,7 +56,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@types/luxon": "^3.0.0" }, "peerDependencies": { diff --git a/plugins/stack-overflow/package.json b/plugins/stack-overflow/package.json index f2f1954ad4..357591e315 100644 --- a/plugins/stack-overflow/package.json +++ b/plugins/stack-overflow/package.json @@ -66,7 +66,7 @@ "@backstage/cli": "workspace:^", "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "msw": "^1.0.0" }, diff --git a/plugins/stackstorm/package.json b/plugins/stackstorm/package.json index f89cb7a463..93474fe35d 100644 --- a/plugins/stackstorm/package.json +++ b/plugins/stackstorm/package.json @@ -54,7 +54,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "msw": "^1.0.0" }, "peerDependencies": { diff --git a/plugins/tech-insights/package.json b/plugins/tech-insights/package.json index 1d98b674af..755c6e7643 100644 --- a/plugins/tech-insights/package.json +++ b/plugins/tech-insights/package.json @@ -51,7 +51,7 @@ "@backstage/dev-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/tech-radar/package.json b/plugins/tech-radar/package.json index c2928d974d..319636ee3c 100644 --- a/plugins/tech-radar/package.json +++ b/plugins/tech-radar/package.json @@ -67,7 +67,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "@types/color": "^3.0.1", "@types/d3-force": "^3.0.0" diff --git a/plugins/techdocs-addons-test-utils/package.json b/plugins/techdocs-addons-test-utils/package.json index f8181b4a56..b6ca34c702 100644 --- a/plugins/techdocs-addons-test-utils/package.json +++ b/plugins/techdocs-addons-test-utils/package.json @@ -54,7 +54,7 @@ "@testing-library/jest-dom": "^6.0.0" }, "peerDependencies": { - "@testing-library/react": "^12.1.3 || ^13.0.0 || ^14.0.0", + "@testing-library/react": "^15.0.0", "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" diff --git a/plugins/techdocs-module-addons-contrib/package.json b/plugins/techdocs-module-addons-contrib/package.json index 0953f44f66..495f565b2a 100644 --- a/plugins/techdocs-module-addons-contrib/package.json +++ b/plugins/techdocs-module-addons-contrib/package.json @@ -54,7 +54,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@types/react": "^16.13.1 || ^17.0.0" }, "peerDependencies": { diff --git a/plugins/techdocs-react/package.json b/plugins/techdocs-react/package.json index 7880acd9ac..f5859fa84f 100644 --- a/plugins/techdocs-react/package.json +++ b/plugins/techdocs-react/package.json @@ -56,7 +56,7 @@ "@backstage/test-utils": "workspace:^", "@backstage/theme": "workspace:^", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/techdocs/package.json b/plugins/techdocs/package.json index 653302011b..3b139a5d2a 100644 --- a/plugins/techdocs/package.json +++ b/plugins/techdocs/package.json @@ -87,7 +87,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "@types/dompurify": "^3.0.0", "@types/event-source-polyfill": "^1.0.0", diff --git a/plugins/todo/package.json b/plugins/todo/package.json index 10c1e6cd0b..ae38a0e2a2 100644 --- a/plugins/todo/package.json +++ b/plugins/todo/package.json @@ -48,7 +48,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0" + "@testing-library/react": "^15.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/plugins/user-settings/package.json b/plugins/user-settings/package.json index a95aea446f..946fd67d6d 100644 --- a/plugins/user-settings/package.json +++ b/plugins/user-settings/package.json @@ -72,7 +72,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "msw": "^1.0.0" }, diff --git a/plugins/vault/package.json b/plugins/vault/package.json index 47c6ffa641..9005283af9 100644 --- a/plugins/vault/package.json +++ b/plugins/vault/package.json @@ -55,7 +55,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "msw": "^1.0.0" }, "peerDependencies": { diff --git a/plugins/xcmetrics/package.json b/plugins/xcmetrics/package.json index 7ff7e5d2f8..6950dec80b 100644 --- a/plugins/xcmetrics/package.json +++ b/plugins/xcmetrics/package.json @@ -51,7 +51,7 @@ "@backstage/test-utils": "workspace:^", "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", + "@testing-library/react": "^15.0.0", "@testing-library/user-event": "^14.0.0", "@types/luxon": "^3.0.0" }, diff --git a/yarn.lock b/yarn.lock index 0150e49562..2b309213e0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3255,7 +3255,7 @@ __metadata: "@material-ui/core": ^4.12.2 "@material-ui/icons": ^4.9.1 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 peerDependencies: react: ^16.13.1 || ^17.0.0 || ^18.0.0 @@ -3851,7 +3851,7 @@ __metadata: "@backstage/version-bridge": "workspace:^" "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/react-hooks": ^8.0.0 "@testing-library/user-event": ^14.0.0 "@types/prop-types": ^15.7.3 @@ -3892,7 +3892,7 @@ __metadata: "@backstage/version-bridge": "workspace:^" "@oriflame/backstage-plugin-score-card": ^0.8.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 peerDependencies: react: ^16.13.1 || ^17.0.0 || ^18.0.0 @@ -4023,7 +4023,7 @@ __metadata: "@react-hookz/web": ^24.0.0 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/ansi-regex": ^5.0.0 "@types/classnames": ^2.2.9 @@ -4088,7 +4088,7 @@ __metadata: "@backstage/version-bridge": "workspace:^" "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 history: ^5.0.0 @@ -4144,7 +4144,7 @@ __metadata: "@material-ui/icons": ^4.9.1 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 react-use: ^17.2.4 @@ -4213,7 +4213,7 @@ __metadata: "@material-ui/core": ^4.12.4 "@material-ui/icons": ^4.11.3 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 lodash: ^4.17.21 peerDependencies: @@ -4256,7 +4256,7 @@ __metadata: "@backstage/version-bridge": "workspace:^" "@material-ui/core": ^4.12.4 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 history: ^5.3.0 lodash: ^4.17.21 @@ -4280,7 +4280,7 @@ __metadata: "@testing-library/jest-dom": ^6.0.0 "@types/react": "*" peerDependencies: - "@testing-library/react": ^12.1.3 || ^13.0.0 || ^14.0.0 + "@testing-library/react": ^15.0.0 react: ^16.13.1 || ^17.0.0 || ^18.0.0 react-router-dom: 6.0.0-beta.0 || ^6.3.0 languageName: unknown @@ -4442,7 +4442,7 @@ __metadata: "@material-ui/icons": ^4.9.1 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 lodash: ^4.17.21 react-use: ^17.2.4 @@ -4489,7 +4489,7 @@ __metadata: "@material-ui/icons": ^4.9.1 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 msw: ^1.0.0 react-use: ^17.2.4 @@ -4513,7 +4513,7 @@ __metadata: "@backstage/test-utils": "workspace:^" "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 msw: ^1.0.0 react-use: ^17.2.4 @@ -4536,7 +4536,7 @@ __metadata: "@backstage/frontend-plugin-api": "workspace:^" "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/jest": ^29.0.0 "@types/react": ^16.13.1 || ^17.0.0 react-ga4: ^2.0.0 @@ -4559,7 +4559,7 @@ __metadata: "@backstage/frontend-plugin-api": "workspace:^" "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 react-ga: ^3.3.0 peerDependencies: @@ -4581,7 +4581,7 @@ __metadata: "@backstage/frontend-plugin-api": "workspace:^" "@newrelic/browser-agent": ^1.236.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 peerDependencies: react: ^16.13.1 || ^17.0.0 || ^18.0.0 languageName: unknown @@ -4602,7 +4602,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 cross-fetch: ^4.0.0 msw: ^1.0.0 @@ -4654,7 +4654,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 "@types/swagger-ui-react": ^4.18.0 @@ -4683,7 +4683,7 @@ __metadata: "@material-ui/core": ^4.12.2 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 use-deep-compare-effect: ^1.8.1 peerDependencies: @@ -5128,7 +5128,7 @@ __metadata: "@material-ui/core": ^4.9.13 "@react-hookz/web": ^24.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 msw: ^1.0.0 @@ -5198,7 +5198,7 @@ __metadata: "@material-ui/icons": ^4.9.1 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 humanize-duration: ^3.27.0 luxon: ^3.0.0 @@ -5267,7 +5267,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 luxon: ^3.0.0 msw: ^1.0.0 @@ -5408,7 +5408,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 "@types/recharts": ^1.8.15 @@ -5905,7 +5905,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 classnames: ^2.3.1 @@ -5946,7 +5946,7 @@ __metadata: "@octokit/rest": ^19.0.3 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 git-url-parse: ^14.0.0 @@ -6042,7 +6042,7 @@ __metadata: "@react-hookz/web": ^24.0.0 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 "@types/zen-observable": ^0.8.0 @@ -6084,7 +6084,7 @@ __metadata: "@material-ui/icons": ^4.9.1 "@material-ui/lab": ^4.0.0-alpha.60 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 react-use: ^17.2.4 peerDependencies: @@ -6124,7 +6124,7 @@ __metadata: "@mui/utils": ^5.14.15 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 dataloader: ^2.0.0 @@ -6230,7 +6230,7 @@ __metadata: "@material-ui/icons": ^4.9.1 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 luxon: ^3.0.0 qs: ^6.9.4 @@ -6256,7 +6256,7 @@ __metadata: "@material-ui/core": ^4.12.2 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/humanize-duration": ^3.27.1 "@types/luxon": ^3.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 @@ -6316,7 +6316,7 @@ __metadata: "@material-ui/styles": ^4.11.0 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/highlightjs": ^10.1.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 "@types/recharts": ^1.8.15 @@ -6350,7 +6350,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 luxon: ^3.4.4 msw: ^1.0.0 @@ -6378,7 +6378,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 jsonschema: ^1.2.6 react-use: ^17.2.4 @@ -6419,7 +6419,7 @@ __metadata: "@material-ui/styles": ^4.9.6 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/pluralize": ^0.0.33 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 @@ -6530,7 +6530,7 @@ __metadata: "@material-ui/core": ^4.12.2 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 react-use: ^17.2.4 peerDependencies: @@ -6591,7 +6591,7 @@ __metadata: "@material-ui/icons": ^4.9.1 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 msw: ^1.0.0 @@ -6626,7 +6626,7 @@ __metadata: "@react-hookz/web": ^24.0.0 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 "@uiw/react-codemirror": ^4.9.3 lodash: ^4.17.21 @@ -6801,7 +6801,7 @@ __metadata: "@backstage/plugin-explore-common": "workspace:^" "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 peerDependencies: react: ^16.13.1 || ^17.0.0 || ^18.0.0 @@ -6833,7 +6833,7 @@ __metadata: "@material-ui/icons": ^4.9.1 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 classnames: ^2.2.6 msw: ^1.0.0 @@ -6862,7 +6862,7 @@ __metadata: "@material-ui/icons": ^4.9.1 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 luxon: ^3.0.0 react-use: ^17.2.4 @@ -6890,7 +6890,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 cross-fetch: ^4.0.0 luxon: ^3.0.0 @@ -6920,7 +6920,7 @@ __metadata: "@tanstack/react-query": ^4.1.3 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/dompurify": ^3.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 "@types/sanitize-html": ^2.6.2 @@ -6949,7 +6949,7 @@ __metadata: "@react-hookz/web": ^24.0.0 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 peerDependencies: react: ^16.13.1 || ^17.0.0 || ^18.0.0 @@ -6975,7 +6975,7 @@ __metadata: "@octokit/rest": ^19.0.3 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 "@types/recharts": ^1.8.15 luxon: ^3.0.0 @@ -7009,7 +7009,7 @@ __metadata: "@octokit/rest": ^19.0.3 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 git-url-parse: ^14.0.0 luxon: ^3.0.0 @@ -7041,7 +7041,7 @@ __metadata: "@octokit/graphql": ^5.0.0 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 luxon: ^3.0.0 msw: ^1.0.0 @@ -7071,7 +7071,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 luxon: ^3.0.0 octokit: ^3.0.0 @@ -7100,7 +7100,7 @@ __metadata: "@octokit/rest": ^19.0.3 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 luxon: ^3.0.0 p-limit: ^3.1.0 @@ -7126,7 +7126,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 react-use: ^17.2.4 peerDependencies: @@ -7154,7 +7154,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/lodash": ^4.14.173 "@types/luxon": ^3.0.0 @@ -7184,7 +7184,7 @@ __metadata: "@material-ui/core": ^4.12.2 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/codemirror": ^5.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 graphiql: ^3.0.6 @@ -7209,7 +7209,7 @@ __metadata: "@material-ui/core": ^4.12.2 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 graphql-voyager: ^1.0.0-rc.31 react-use: ^17.2.4 @@ -7284,7 +7284,7 @@ __metadata: "@rjsf/validator-ajv8": 5.17.1 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 "@types/react-grid-layout": ^1.3.2 @@ -7319,7 +7319,7 @@ __metadata: "@material-ui/pickers": ^3.3.10 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 humanize-duration: ^3.26.0 luxon: ^3.0.0 @@ -7386,7 +7386,7 @@ __metadata: "@material-ui/icons": ^4.9.1 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 "@types/testing-library__jest-dom": ^5.9.1 luxon: ^3.0.0 @@ -7435,7 +7435,7 @@ __metadata: "@material-ui/icons": ^4.9.1 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 jest-when: ^3.1.0 react-use: ^17.2.4 @@ -7518,7 +7518,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/node": ^16.11.26 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 cronstrue: ^2.2.0 @@ -7590,7 +7590,7 @@ __metadata: "@material-ui/icons": ^4.11.3 "@material-ui/lab": ^4.0.0-alpha.61 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 cronstrue: ^2.32.0 jest-websocket-mock: ^2.5.0 @@ -7627,7 +7627,7 @@ __metadata: "@material-ui/core": ^4.12.2 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 cronstrue: ^2.2.0 js-yaml: ^4.0.0 @@ -7689,7 +7689,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 msw: ^1.0.0 react-use: ^17.2.4 @@ -7784,7 +7784,7 @@ __metadata: "@tanstack/react-query": ^4.1.3 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 classnames: ^2.3.1 dompurify: ^3.0.0 @@ -7836,7 +7836,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/parse-link-header": ^2.0.1 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 msw: ^1.2.3 @@ -7882,7 +7882,7 @@ __metadata: "@material-ui/core": ^4.9.13 "@material-ui/icons": ^4.9.1 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 cross-fetch: ^4.0.0 luxon: ^3.3.0 @@ -7972,7 +7972,7 @@ __metadata: "@material-ui/icons": ^4.9.1 "@material-ui/lab": ^4.0.0-alpha.61 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/react": ^16.13.1 || ^17.0.0 lodash: ^4.17.21 @@ -7999,7 +7999,7 @@ __metadata: "@material-ui/core": ^4.9.13 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 react-use: ^17.2.4 peerDependencies: @@ -8051,7 +8051,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 react-use: ^17.2.4 @@ -8087,7 +8087,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 lodash: ^4.17.21 @@ -8121,7 +8121,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 luxon: ^3.0.0 react-use: ^17.2.4 @@ -8164,7 +8164,7 @@ __metadata: "@backstage/plugin-catalog-react": "workspace:^" "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/luxon": ^3.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 luxon: ^3.0.0 @@ -8266,7 +8266,7 @@ __metadata: "@backstage/plugin-permission-common": "workspace:^" "@backstage/test-utils": "workspace:^" "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 swr: ^2.0.0 peerDependencies: @@ -8339,7 +8339,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 lodash: ^4.17.21 msw: ^1.0.0 @@ -8399,7 +8399,7 @@ __metadata: "@backstage/test-utils": "workspace:^" "@material-ui/core": ^4.12.2 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 msw: ^1.0.1 react-use: ^17.2.4 @@ -8450,7 +8450,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 lodash: ^4.17.21 react-sparklines: ^1.7.0 @@ -8863,7 +8863,7 @@ __metadata: "@rjsf/validator-ajv8": 5.17.1 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/humanize-duration": ^3.18.1 "@types/json-schema": ^7.0.9 @@ -8926,7 +8926,7 @@ __metadata: "@rjsf/validator-ajv8": 5.17.1 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/humanize-duration": ^3.18.1 "@types/json-schema": ^7.0.9 @@ -9165,7 +9165,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 lodash: ^4.17.21 @@ -9200,7 +9200,7 @@ __metadata: "@material-ui/icons": ^4.9.1 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 history: ^5.0.0 @@ -9229,7 +9229,7 @@ __metadata: "@material-ui/core": ^4.12.2 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/luxon": ^3.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 luxon: ^3.0.0 @@ -9257,7 +9257,7 @@ __metadata: "@material-ui/icons": ^4.9.1 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 "@types/zen-observable": ^0.8.2 react-hook-form: ^7.12.2 @@ -9326,7 +9326,7 @@ __metadata: "@backstage/types": "workspace:^" "@material-ui/core": ^4.12.4 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 peerDependencies: react: ^16.13.1 || ^17.0.0 languageName: unknown @@ -9349,7 +9349,7 @@ __metadata: "@material-ui/icons": ^4.9.1 "@material-ui/lab": ^4.0.0-alpha.61 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 jest-websocket-mock: ^2.5.0 msw: ^1.0.0 @@ -9415,7 +9415,7 @@ __metadata: "@material-ui/styles": ^4.10.0 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 cross-fetch: ^4.0.0 luxon: ^3.0.0 @@ -9446,7 +9446,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/luxon": ^3.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 luxon: ^3.0.0 @@ -9488,7 +9488,7 @@ __metadata: "@material-ui/icons": ^4.9.1 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 cross-fetch: ^4.0.0 @@ -9518,7 +9518,7 @@ __metadata: "@material-ui/icons": ^4.9.1 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 msw: ^1.0.0 react-use: ^17.2.4 @@ -9629,7 +9629,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 qs: ^6.9.4 react-use: ^17.2.4 @@ -9656,7 +9656,7 @@ __metadata: "@material-ui/icons": ^4.9.1 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/color": ^3.0.1 "@types/d3-force": ^3.0.0 @@ -9690,7 +9690,7 @@ __metadata: "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 testing-library__dom: ^7.29.4-beta.1 peerDependencies: - "@testing-library/react": ^12.1.3 || ^13.0.0 || ^14.0.0 + "@testing-library/react": ^15.0.0 react: ^16.13.1 || ^17.0.0 || ^18.0.0 react-dom: ^16.13.1 || ^17.0.0 || ^18.0.0 react-router-dom: 6.0.0-beta.0 || ^6.3.0 @@ -9747,7 +9747,7 @@ __metadata: "@react-hookz/web": ^24.0.0 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 git-url-parse: ^14.0.0 photoswipe: ^5.3.7 @@ -9817,7 +9817,7 @@ __metadata: "@material-ui/core": ^4.12.2 "@material-ui/styles": ^4.11.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 jss: ~10.10.0 lodash: ^4.17.21 @@ -9860,7 +9860,7 @@ __metadata: "@material-ui/styles": ^4.10.0 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/dompurify": ^3.0.0 "@types/event-source-polyfill": ^1.0.0 @@ -9920,7 +9920,7 @@ __metadata: "@material-ui/icons": ^4.9.1 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 peerDependencies: react: ^16.13.1 || ^17.0.0 || ^18.0.0 @@ -9974,7 +9974,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 msw: ^1.0.0 @@ -10043,7 +10043,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 msw: ^1.0.0 react-use: ^17.2.4 @@ -10069,7 +10069,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/luxon": ^3.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 @@ -10173,7 +10173,7 @@ __metadata: msw: ^1.0.0 zen-observable: ^0.10.0 peerDependencies: - "@testing-library/react": ^12.1.3 || ^13.0.0 || ^14.0.0 + "@testing-library/react": ^15.0.0 react: ^16.13.1 || ^17.0.0 || ^18.0.0 react-dom: ^16.13.1 || ^17.0.0 || ^18.0.0 react-router-dom: 6.0.0-beta.0 || ^6.3.0 @@ -10190,7 +10190,7 @@ __metadata: "@mui/material": ^5.12.2 "@mui/styles": ^5.14.18 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 peerDependencies: "@material-ui/core": ^4.12.2 @@ -10217,7 +10217,7 @@ __metadata: dependencies: "@backstage/cli": "workspace:^" "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 peerDependencies: react: ^16.13.1 || ^17.0.0 || ^18.0.0 @@ -12107,7 +12107,7 @@ __metadata: "@material-ui/lab": 4.0.0-alpha.61 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 react-use: ^17.2.4 peerDependencies: @@ -17969,6 +17969,22 @@ __metadata: languageName: unknown linkType: soft +"@testing-library/dom@npm:^10.0.0": + version: 10.0.0 + resolution: "@testing-library/dom@npm:10.0.0" + dependencies: + "@babel/code-frame": ^7.10.4 + "@babel/runtime": ^7.12.5 + "@types/aria-query": ^5.0.1 + aria-query: 5.3.0 + chalk: ^4.1.0 + dom-accessibility-api: ^0.5.9 + lz-string: ^1.5.0 + pretty-format: ^27.0.2 + checksum: 682cc22cb3414ffbcf5d9bac777907167c5523f2dcbe5d96cd2e99386009acd879640c7fe5b1c66b199c2d2679f97057410557b3848b871f59c547b1dc8fc28a + languageName: node + linkType: hard + "@testing-library/dom@npm:^9.0.0": version: 9.3.4 resolution: "@testing-library/dom@npm:9.3.4" @@ -18040,17 +18056,17 @@ __metadata: languageName: node linkType: hard -"@testing-library/react@npm:^14.0.0": - version: 14.2.2 - resolution: "@testing-library/react@npm:14.2.2" +"@testing-library/react@npm:^15.0.0": + version: 15.0.1 + resolution: "@testing-library/react@npm:15.0.1" dependencies: "@babel/runtime": ^7.12.5 - "@testing-library/dom": ^9.0.0 + "@testing-library/dom": ^10.0.0 "@types/react-dom": ^18.0.0 peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - checksum: cb73df588592d9101429f057eaa6f320fc12524d5eb2acc8a16002c1ee2d9422a49e44841003bba42974c9ae1ced6b134f0d647826eca42ab8f19e4592971b16 + checksum: 9992087563279bc975e5be69c0d380ecee84eb9e5c5e474b8b01b95804477ecae0978c61ded15821335d926fec058ab6c23442150584b0f19bee72c561ad19b7 languageName: node linkType: hard @@ -21363,7 +21379,7 @@ __metadata: languageName: node linkType: hard -"aria-query@npm:^5.0.0, aria-query@npm:^5.3.0": +"aria-query@npm:5.3.0, aria-query@npm:^5.0.0, aria-query@npm:^5.3.0": version: 5.3.0 resolution: "aria-query@npm:5.3.0" dependencies: @@ -27453,7 +27469,7 @@ __metadata: "@roadiehq/backstage-plugin-travis-ci": ^2.0.5 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/jquery": ^3.3.34 "@types/react": "*" @@ -27570,7 +27586,7 @@ __metadata: "@roadiehq/backstage-plugin-travis-ci": ^2.0.5 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/jquery": ^3.3.34 "@types/react": "*" @@ -43554,7 +43570,7 @@ __metadata: "@material-ui/icons": ^4.9.1 "@testing-library/dom": ^9.0.0 "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 + "@testing-library/react": ^15.0.0 "@testing-library/user-event": ^14.0.0 "@types/react": "*" "@types/react-dom": "*" From a6b1ccbf272325035256893906f1aadf13705df9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 11 Apr 2024 21:39:23 +0000 Subject: [PATCH 087/151] fix(deps): update aws-sdk-js-v3 monorepo Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 216 +++++++++++++++++++++++++++--------------------------- 1 file changed, 108 insertions(+), 108 deletions(-) diff --git a/yarn.lock b/yarn.lock index 6df3a27d32..3d51ff73ba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -364,14 +364,14 @@ __metadata: linkType: hard "@aws-sdk/client-codecommit@npm:^3.350.0": - version: 3.552.0 - resolution: "@aws-sdk/client-codecommit@npm:3.552.0" + version: 3.554.0 + resolution: "@aws-sdk/client-codecommit@npm:3.554.0" dependencies: "@aws-crypto/sha256-browser": 3.0.0 "@aws-crypto/sha256-js": 3.0.0 - "@aws-sdk/client-sts": 3.552.0 - "@aws-sdk/core": 3.552.0 - "@aws-sdk/credential-provider-node": 3.552.0 + "@aws-sdk/client-sts": 3.554.0 + "@aws-sdk/core": 3.554.0 + "@aws-sdk/credential-provider-node": 3.554.0 "@aws-sdk/middleware-host-header": 3.535.0 "@aws-sdk/middleware-logger": 3.535.0 "@aws-sdk/middleware-recursion-detection": 3.535.0 @@ -408,19 +408,19 @@ __metadata: "@smithy/util-utf8": ^2.3.0 tslib: ^2.6.2 uuid: ^9.0.1 - checksum: a4261081180610249e10038398b61b3dd5d0cda47a2302cb3b2d5661519f7928d912a97c56e0b7ef4c7573c971590cc0c9b29b921420af37ac93693d3e46a05a + checksum: b2d67666dd81fb985973508d61a531f48b691b09ae4bbeaee97b1f9ee4b314c202f580ea680ed2a6637897d56b30850888597e8195fdf1e426fca22e7c043309 languageName: node linkType: hard -"@aws-sdk/client-cognito-identity@npm:3.552.0": - version: 3.552.0 - resolution: "@aws-sdk/client-cognito-identity@npm:3.552.0" +"@aws-sdk/client-cognito-identity@npm:3.554.0": + version: 3.554.0 + resolution: "@aws-sdk/client-cognito-identity@npm:3.554.0" dependencies: "@aws-crypto/sha256-browser": 3.0.0 "@aws-crypto/sha256-js": 3.0.0 - "@aws-sdk/client-sts": 3.552.0 - "@aws-sdk/core": 3.552.0 - "@aws-sdk/credential-provider-node": 3.552.0 + "@aws-sdk/client-sts": 3.554.0 + "@aws-sdk/core": 3.554.0 + "@aws-sdk/credential-provider-node": 3.554.0 "@aws-sdk/middleware-host-header": 3.535.0 "@aws-sdk/middleware-logger": 3.535.0 "@aws-sdk/middleware-recursion-detection": 3.535.0 @@ -456,19 +456,19 @@ __metadata: "@smithy/util-retry": ^2.2.0 "@smithy/util-utf8": ^2.3.0 tslib: ^2.6.2 - checksum: d64a94f8ced7583e00fd1f07a614e1737c642a3cdcdb20eaaaffc12be4a2b99e64d14673995a0b4fd38cac4e7e6e89c7604cd6b245afb0e44d265ecdc6425125 + checksum: 7e8ae5313e8ef0e13feb38d5725e1f022af5f69ff0fbdfb28965b58a38c0403b528885aff351bc9e0eca5953ca514742772d829ff90e3e99dee81ec98bc72400 languageName: node linkType: hard "@aws-sdk/client-eks@npm:^3.350.0": - version: 3.552.0 - resolution: "@aws-sdk/client-eks@npm:3.552.0" + version: 3.554.0 + resolution: "@aws-sdk/client-eks@npm:3.554.0" dependencies: "@aws-crypto/sha256-browser": 3.0.0 "@aws-crypto/sha256-js": 3.0.0 - "@aws-sdk/client-sts": 3.552.0 - "@aws-sdk/core": 3.552.0 - "@aws-sdk/credential-provider-node": 3.552.0 + "@aws-sdk/client-sts": 3.554.0 + "@aws-sdk/core": 3.554.0 + "@aws-sdk/credential-provider-node": 3.554.0 "@aws-sdk/middleware-host-header": 3.535.0 "@aws-sdk/middleware-logger": 3.535.0 "@aws-sdk/middleware-recursion-detection": 3.535.0 @@ -506,19 +506,19 @@ __metadata: "@smithy/util-waiter": ^2.2.0 tslib: ^2.6.2 uuid: ^9.0.1 - checksum: f29fcc9853f7be09d25c2a79e8d3b72a930cd97791b2949a9de47f17fbfbed6db53fd53560b141b468905b0037bcebb73569ce51e40848d02ad99716759d110f + checksum: bd8108f350ba6727366ab32392168de5b9d0e13974700f5c5ba2de4673cf92f4b124a720000eb82a804f5371c17f0896247b18bbc9ebebb07bf8d2a2b54999d2 languageName: node linkType: hard "@aws-sdk/client-organizations@npm:^3.350.0": - version: 3.552.0 - resolution: "@aws-sdk/client-organizations@npm:3.552.0" + version: 3.554.0 + resolution: "@aws-sdk/client-organizations@npm:3.554.0" dependencies: "@aws-crypto/sha256-browser": 3.0.0 "@aws-crypto/sha256-js": 3.0.0 - "@aws-sdk/client-sts": 3.552.0 - "@aws-sdk/core": 3.552.0 - "@aws-sdk/credential-provider-node": 3.552.0 + "@aws-sdk/client-sts": 3.554.0 + "@aws-sdk/core": 3.554.0 + "@aws-sdk/credential-provider-node": 3.554.0 "@aws-sdk/middleware-host-header": 3.535.0 "@aws-sdk/middleware-logger": 3.535.0 "@aws-sdk/middleware-recursion-detection": 3.535.0 @@ -554,20 +554,20 @@ __metadata: "@smithy/util-retry": ^2.2.0 "@smithy/util-utf8": ^2.3.0 tslib: ^2.6.2 - checksum: cc682721fe9d7f8aac6d2c8dc2e972bf236283345da15aab02679f6d447f45e23b7b3b405254302a8243daea6b66130e3a3d3c1dd946a634e67e0643ce20e97a + checksum: d537400c280ea56a6ee071851f9db358038b6406806129f5c92acbb4b76b393a8aaacb3a51250eb37dc119996826d92f1dd6108cf95102b4ec8097d42c8cb35e languageName: node linkType: hard "@aws-sdk/client-s3@npm:^3.350.0": - version: 3.552.0 - resolution: "@aws-sdk/client-s3@npm:3.552.0" + version: 3.554.0 + resolution: "@aws-sdk/client-s3@npm:3.554.0" dependencies: "@aws-crypto/sha1-browser": 3.0.0 "@aws-crypto/sha256-browser": 3.0.0 "@aws-crypto/sha256-js": 3.0.0 - "@aws-sdk/client-sts": 3.552.0 - "@aws-sdk/core": 3.552.0 - "@aws-sdk/credential-provider-node": 3.552.0 + "@aws-sdk/client-sts": 3.554.0 + "@aws-sdk/core": 3.554.0 + "@aws-sdk/credential-provider-node": 3.554.0 "@aws-sdk/middleware-bucket-endpoint": 3.535.0 "@aws-sdk/middleware-expect-continue": 3.535.0 "@aws-sdk/middleware-flexible-checksums": 3.535.0 @@ -619,19 +619,19 @@ __metadata: "@smithy/util-utf8": ^2.3.0 "@smithy/util-waiter": ^2.2.0 tslib: ^2.6.2 - checksum: 9852151d998191e3443f0a8700df159ace26966a9eae29c191ac2decab69ca099ed33639bf88ddefebe3ecca33010d934cb10b044e4416d802f8299b7b77aee0 + checksum: bf5b0bd41af005e2acc3565b28410bc49bb150750d7ec3037040b0baaf6a594b760336f4a4aa7d434c80ff134e3e717c46c8187ebd2d872c199cbc85b934baf4 languageName: node linkType: hard "@aws-sdk/client-sqs@npm:^3.350.0": - version: 3.552.0 - resolution: "@aws-sdk/client-sqs@npm:3.552.0" + version: 3.554.0 + resolution: "@aws-sdk/client-sqs@npm:3.554.0" dependencies: "@aws-crypto/sha256-browser": 3.0.0 "@aws-crypto/sha256-js": 3.0.0 - "@aws-sdk/client-sts": 3.552.0 - "@aws-sdk/core": 3.552.0 - "@aws-sdk/credential-provider-node": 3.552.0 + "@aws-sdk/client-sts": 3.554.0 + "@aws-sdk/core": 3.554.0 + "@aws-sdk/credential-provider-node": 3.554.0 "@aws-sdk/middleware-host-header": 3.535.0 "@aws-sdk/middleware-logger": 3.535.0 "@aws-sdk/middleware-recursion-detection": 3.535.0 @@ -669,18 +669,18 @@ __metadata: "@smithy/util-retry": ^2.2.0 "@smithy/util-utf8": ^2.3.0 tslib: ^2.6.2 - checksum: b18d578d3be249f089af85e5e77ea554f9f471de303330f12d68f3310638fc62ce17dd25dbf4a35f774846839f0c3774287f1fddb70f2e1728de4bdefd8aceee + checksum: 98d3a82e658980ff9437a01e60cce87e6ee75838aeb7b13017b70c2d342dce1f226ef4e87c15da15bf1fe5679fecf3f91f4222901823e481abae7ca9ec50b00e languageName: node linkType: hard -"@aws-sdk/client-sso-oidc@npm:3.552.0": - version: 3.552.0 - resolution: "@aws-sdk/client-sso-oidc@npm:3.552.0" +"@aws-sdk/client-sso-oidc@npm:3.554.0": + version: 3.554.0 + resolution: "@aws-sdk/client-sso-oidc@npm:3.554.0" dependencies: "@aws-crypto/sha256-browser": 3.0.0 "@aws-crypto/sha256-js": 3.0.0 - "@aws-sdk/client-sts": 3.552.0 - "@aws-sdk/core": 3.552.0 + "@aws-sdk/client-sts": 3.554.0 + "@aws-sdk/core": 3.554.0 "@aws-sdk/middleware-host-header": 3.535.0 "@aws-sdk/middleware-logger": 3.535.0 "@aws-sdk/middleware-recursion-detection": 3.535.0 @@ -717,18 +717,18 @@ __metadata: "@smithy/util-utf8": ^2.3.0 tslib: ^2.6.2 peerDependencies: - "@aws-sdk/credential-provider-node": ^3.552.0 - checksum: 4a5601a1e61c6bb46f533076aa710b13f039c33b6ad163eb5da19dc3c64b971b5bff491230062cb42407e552c9c799003ab1ec5f035d1d4c77dac1ddb0dcee61 + "@aws-sdk/credential-provider-node": ^3.554.0 + checksum: 91d0f6b8c5c787e2b705803d615f9400430ea0bca9d12171a5e7abe5c53cd83f711300e5c0a106dc4f1f1259adf08f87b728f9820679aa5ca73cd66a09bf8dd4 languageName: node linkType: hard -"@aws-sdk/client-sso@npm:3.552.0": - version: 3.552.0 - resolution: "@aws-sdk/client-sso@npm:3.552.0" +"@aws-sdk/client-sso@npm:3.554.0": + version: 3.554.0 + resolution: "@aws-sdk/client-sso@npm:3.554.0" dependencies: "@aws-crypto/sha256-browser": 3.0.0 "@aws-crypto/sha256-js": 3.0.0 - "@aws-sdk/core": 3.552.0 + "@aws-sdk/core": 3.554.0 "@aws-sdk/middleware-host-header": 3.535.0 "@aws-sdk/middleware-logger": 3.535.0 "@aws-sdk/middleware-recursion-detection": 3.535.0 @@ -764,17 +764,17 @@ __metadata: "@smithy/util-retry": ^2.2.0 "@smithy/util-utf8": ^2.3.0 tslib: ^2.6.2 - checksum: 4472e3c098962e4b2fe166239dfb67e71416a9234ac4cbcab51ed872217a73e4561fed03dd5f8fc09f7c9be58b17b553cc09790f2fdd8f2fa5b3e18015dfe7e6 + checksum: 08dbaca87bb25d7662a2e856dca16f92bc461b9cf50e048c679969df93189f653c2bc74c8be1ac3e82e720d2742fc81af554a04f0ebf83353c1fa6e30fdbbecf languageName: node linkType: hard -"@aws-sdk/client-sts@npm:3.552.0, @aws-sdk/client-sts@npm:^3.350.0": - version: 3.552.0 - resolution: "@aws-sdk/client-sts@npm:3.552.0" +"@aws-sdk/client-sts@npm:3.554.0, @aws-sdk/client-sts@npm:^3.350.0": + version: 3.554.0 + resolution: "@aws-sdk/client-sts@npm:3.554.0" dependencies: "@aws-crypto/sha256-browser": 3.0.0 "@aws-crypto/sha256-js": 3.0.0 - "@aws-sdk/core": 3.552.0 + "@aws-sdk/core": 3.554.0 "@aws-sdk/middleware-host-header": 3.535.0 "@aws-sdk/middleware-logger": 3.535.0 "@aws-sdk/middleware-recursion-detection": 3.535.0 @@ -811,14 +811,14 @@ __metadata: "@smithy/util-utf8": ^2.3.0 tslib: ^2.6.2 peerDependencies: - "@aws-sdk/credential-provider-node": ^3.552.0 - checksum: 01319abc7f25b13089c83d6c6b72ad29dcb3257428e032c9e377fe9d83fb614470f33139df59ec28c1a51f0a23d0043070cead552b7d67e618b4ff5d615360af + "@aws-sdk/credential-provider-node": ^3.554.0 + checksum: dee932b55e89f9b68275d21861f534ae1cdf006410841fe84bab38df12253ebafd4928e440d6243391c3234f2509b943628c5368d2bcd0489ea240464d65edc6 languageName: node linkType: hard -"@aws-sdk/core@npm:3.552.0": - version: 3.552.0 - resolution: "@aws-sdk/core@npm:3.552.0" +"@aws-sdk/core@npm:3.554.0": + version: 3.554.0 + resolution: "@aws-sdk/core@npm:3.554.0" dependencies: "@smithy/core": ^1.4.2 "@smithy/protocol-http": ^3.3.0 @@ -827,20 +827,20 @@ __metadata: "@smithy/types": ^2.12.0 fast-xml-parser: 4.2.5 tslib: ^2.6.2 - checksum: bca924bbe6baf0256db3315e13a01384c16c10552acb63b5a3d684821d0e82a89b9ed008a1525989c55f62792eb277b9d04476adb2331d4a85e6604a3a4e9eb7 + checksum: 61e48deee6146aa92fca14f787dfcfe1ef91e0b9feda897d375174643071119aa5b0d51185f9a23843a8aaa82372187af4bb6aa9489e20b1fc651c1734592b40 languageName: node linkType: hard -"@aws-sdk/credential-provider-cognito-identity@npm:3.552.0": - version: 3.552.0 - resolution: "@aws-sdk/credential-provider-cognito-identity@npm:3.552.0" +"@aws-sdk/credential-provider-cognito-identity@npm:3.554.0": + version: 3.554.0 + resolution: "@aws-sdk/credential-provider-cognito-identity@npm:3.554.0" dependencies: - "@aws-sdk/client-cognito-identity": 3.552.0 + "@aws-sdk/client-cognito-identity": 3.554.0 "@aws-sdk/types": 3.535.0 "@smithy/property-provider": ^2.2.0 "@smithy/types": ^2.12.0 tslib: ^2.6.2 - checksum: e1ee21c5742f9d0fa0ad44a6917e61622363c12c30b1a90b9b321fe768e843186631ca4a1a80683c3686882867450fdb69ff049a82c3b9ac801c6c700035dbf4 + checksum: 69157094507519ce82e912273746da1bde642e536da0073e16d9bcdcfa52f1ae864d2acdbb8a03c3bade86a8847b8ab00b3590dc4357301ecda569c47dff1767 languageName: node linkType: hard @@ -873,42 +873,42 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/credential-provider-ini@npm:3.552.0": - version: 3.552.0 - resolution: "@aws-sdk/credential-provider-ini@npm:3.552.0" +"@aws-sdk/credential-provider-ini@npm:3.554.0": + version: 3.554.0 + resolution: "@aws-sdk/credential-provider-ini@npm:3.554.0" dependencies: - "@aws-sdk/client-sts": 3.552.0 + "@aws-sdk/client-sts": 3.554.0 "@aws-sdk/credential-provider-env": 3.535.0 "@aws-sdk/credential-provider-process": 3.535.0 - "@aws-sdk/credential-provider-sso": 3.552.0 - "@aws-sdk/credential-provider-web-identity": 3.552.0 + "@aws-sdk/credential-provider-sso": 3.554.0 + "@aws-sdk/credential-provider-web-identity": 3.554.0 "@aws-sdk/types": 3.535.0 "@smithy/credential-provider-imds": ^2.3.0 "@smithy/property-provider": ^2.2.0 "@smithy/shared-ini-file-loader": ^2.4.0 "@smithy/types": ^2.12.0 tslib: ^2.6.2 - checksum: 94488273e6c5c7c53087f876f0925c9b9fea7cc8727f4170c910073f65b6ce4d50b48cf7214b4e41318653447488c45d581317e068f6751a3b24ede97aa82443 + checksum: 5b93ba3d3cf98cd0738b871db1036303ab0b05538171a650168aefc0071a1e51e4bbd0b88d06047b6170fbf20417069beb29d8f71cae13d87c4e17c736a5a252 languageName: node linkType: hard -"@aws-sdk/credential-provider-node@npm:3.552.0, @aws-sdk/credential-provider-node@npm:^3.350.0": - version: 3.552.0 - resolution: "@aws-sdk/credential-provider-node@npm:3.552.0" +"@aws-sdk/credential-provider-node@npm:3.554.0, @aws-sdk/credential-provider-node@npm:^3.350.0": + version: 3.554.0 + resolution: "@aws-sdk/credential-provider-node@npm:3.554.0" dependencies: "@aws-sdk/credential-provider-env": 3.535.0 "@aws-sdk/credential-provider-http": 3.552.0 - "@aws-sdk/credential-provider-ini": 3.552.0 + "@aws-sdk/credential-provider-ini": 3.554.0 "@aws-sdk/credential-provider-process": 3.535.0 - "@aws-sdk/credential-provider-sso": 3.552.0 - "@aws-sdk/credential-provider-web-identity": 3.552.0 + "@aws-sdk/credential-provider-sso": 3.554.0 + "@aws-sdk/credential-provider-web-identity": 3.554.0 "@aws-sdk/types": 3.535.0 "@smithy/credential-provider-imds": ^2.3.0 "@smithy/property-provider": ^2.2.0 "@smithy/shared-ini-file-loader": ^2.4.0 "@smithy/types": ^2.12.0 tslib: ^2.6.2 - checksum: 7d187fc9d4ae9442a98f5f0b8b0d77566c2b26dc73669a0036890e38911284f32316ca196380b11a268e951fa288b4cf9942c9709df6428b97259d7cec95935a + checksum: b8dfbbace2c279792934057de6879d47fb95b5c068aed0938f5c104b79034982b04e34739dba78274c9fabaf97f6079a9938ff3b01765fc3042b15abbf273190 languageName: node linkType: hard @@ -925,55 +925,55 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/credential-provider-sso@npm:3.552.0": - version: 3.552.0 - resolution: "@aws-sdk/credential-provider-sso@npm:3.552.0" +"@aws-sdk/credential-provider-sso@npm:3.554.0": + version: 3.554.0 + resolution: "@aws-sdk/credential-provider-sso@npm:3.554.0" dependencies: - "@aws-sdk/client-sso": 3.552.0 - "@aws-sdk/token-providers": 3.552.0 + "@aws-sdk/client-sso": 3.554.0 + "@aws-sdk/token-providers": 3.554.0 "@aws-sdk/types": 3.535.0 "@smithy/property-provider": ^2.2.0 "@smithy/shared-ini-file-loader": ^2.4.0 "@smithy/types": ^2.12.0 tslib: ^2.6.2 - checksum: 75380dceb7383fee1f0b9dae74b1e1fd667d22a8ad1ed3e00c99b78b2c93515b5271e21883c1c5636f1b084e929f7d3f0cb12c947705ea3237b4d4b556f598ed + checksum: 0665748fce2ef6c4572570be35af31a55cee3fa3be49ef7a15be9e25ac54d3528c5a0b82c9672b7e147a9114525aeef7d9bb2a9270ef3d3e09de91d940da3779 languageName: node linkType: hard -"@aws-sdk/credential-provider-web-identity@npm:3.552.0": - version: 3.552.0 - resolution: "@aws-sdk/credential-provider-web-identity@npm:3.552.0" +"@aws-sdk/credential-provider-web-identity@npm:3.554.0": + version: 3.554.0 + resolution: "@aws-sdk/credential-provider-web-identity@npm:3.554.0" dependencies: - "@aws-sdk/client-sts": 3.552.0 + "@aws-sdk/client-sts": 3.554.0 "@aws-sdk/types": 3.535.0 "@smithy/property-provider": ^2.2.0 "@smithy/types": ^2.12.0 tslib: ^2.6.2 - checksum: e738fc5f8f7a655bc5c5e6fc2f472efadb3bc888d30bb282b2bbf967c566b3e96ba87362718e1280ea377c900d40d599f5e3b700c5c7371f36a69cb4265631e7 + checksum: e47772ca693bb2a0b02a1bf1b7ce288fd141510e944145d3188f532feffa3f7511f037ed5203c581764ab9d397c358c63baf28f3cf96bbce98c303ed7b9f1a2a languageName: node linkType: hard "@aws-sdk/credential-providers@npm:^3.350.0": - version: 3.552.0 - resolution: "@aws-sdk/credential-providers@npm:3.552.0" + version: 3.554.0 + resolution: "@aws-sdk/credential-providers@npm:3.554.0" dependencies: - "@aws-sdk/client-cognito-identity": 3.552.0 - "@aws-sdk/client-sso": 3.552.0 - "@aws-sdk/client-sts": 3.552.0 - "@aws-sdk/credential-provider-cognito-identity": 3.552.0 + "@aws-sdk/client-cognito-identity": 3.554.0 + "@aws-sdk/client-sso": 3.554.0 + "@aws-sdk/client-sts": 3.554.0 + "@aws-sdk/credential-provider-cognito-identity": 3.554.0 "@aws-sdk/credential-provider-env": 3.535.0 "@aws-sdk/credential-provider-http": 3.552.0 - "@aws-sdk/credential-provider-ini": 3.552.0 - "@aws-sdk/credential-provider-node": 3.552.0 + "@aws-sdk/credential-provider-ini": 3.554.0 + "@aws-sdk/credential-provider-node": 3.554.0 "@aws-sdk/credential-provider-process": 3.535.0 - "@aws-sdk/credential-provider-sso": 3.552.0 - "@aws-sdk/credential-provider-web-identity": 3.552.0 + "@aws-sdk/credential-provider-sso": 3.554.0 + "@aws-sdk/credential-provider-web-identity": 3.554.0 "@aws-sdk/types": 3.535.0 "@smithy/credential-provider-imds": ^2.3.0 "@smithy/property-provider": ^2.2.0 "@smithy/types": ^2.12.0 tslib: ^2.6.2 - checksum: 1c419e8b6eb71f05a5344aad93d586c310992b0870eaa39d32bc772cdf867ed0f628421887d86c937f96f2aef6a8712b55dd4c5c09b9f918e1064951f423c5a1 + checksum: a0584c6d9bbbd2ee75f061e748f9f3d529ad9ba47e1c3c15cc87f21eceef0a4099df02a73ecb75a2403acd6fc05fd9cce78dc87d1c8afa5e17d06c15a3bdbd46 languageName: node linkType: hard @@ -999,8 +999,8 @@ __metadata: linkType: hard "@aws-sdk/lib-storage@npm:^3.350.0": - version: 3.552.0 - resolution: "@aws-sdk/lib-storage@npm:3.552.0" + version: 3.554.0 + resolution: "@aws-sdk/lib-storage@npm:3.554.0" dependencies: "@smithy/abort-controller": ^2.2.0 "@smithy/middleware-endpoint": ^2.5.1 @@ -1011,7 +1011,7 @@ __metadata: tslib: ^2.6.2 peerDependencies: "@aws-sdk/client-s3": ^3.0.0 - checksum: 24d5502234a1d4cc723d740873e6463b2fac88dbae621d92f83a6d8be79df24bce40947038016766900c17a4502e4474e020250f229c753d26a6eb5ec76abed8 + checksum: 544ccc6fe0fa325fdbabae45120b217e54cacef0423a69836a715366b5c411f7541338cd43984520664481c36640d5765db850610aa806f9621e88141bb90c7d languageName: node linkType: hard @@ -1285,17 +1285,17 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/token-providers@npm:3.552.0": - version: 3.552.0 - resolution: "@aws-sdk/token-providers@npm:3.552.0" +"@aws-sdk/token-providers@npm:3.554.0": + version: 3.554.0 + resolution: "@aws-sdk/token-providers@npm:3.554.0" dependencies: - "@aws-sdk/client-sso-oidc": 3.552.0 + "@aws-sdk/client-sso-oidc": 3.554.0 "@aws-sdk/types": 3.535.0 "@smithy/property-provider": ^2.2.0 "@smithy/shared-ini-file-loader": ^2.4.0 "@smithy/types": ^2.12.0 tslib: ^2.6.2 - checksum: 9bd5d17225a07041a19379cfc12a03e73f2e04210f775f3a3b8b136044aa095192ca066f48c1e72f7169762190ff6cfa5ccfef057fd59541d1ff2771937f9c33 + checksum: ff6e13ab91ac9d5e0f7de8673a16b541b41dc445c7ec3dae66d85e47514c808ed059af4702156b437c4d2a510d378a83662ee988a853cdf2625cde886fe962cb languageName: node linkType: hard From 41b7530123c6ae748763dfe8ccf1c9e2967c934d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 11 Apr 2024 22:17:41 +0000 Subject: [PATCH 088/151] fix(deps): update dependency react-hook-form to v7.51.3 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 7f73601f70..140340f6cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -39639,11 +39639,11 @@ __metadata: linkType: hard "react-hook-form@npm:^7.12.2, react-hook-form@npm:^7.13.0": - version: 7.51.2 - resolution: "react-hook-form@npm:7.51.2" + version: 7.51.3 + resolution: "react-hook-form@npm:7.51.3" peerDependencies: react: ^16.8.0 || ^17 || ^18 - checksum: d725475587bc64c048927c0442693630fe1238e424d48996626a394811e495fb7019b20a657de6bb2e77385044592dd5d885fafb420d12bffc8a07c5a7d85872 + checksum: 4ac71033b66ae0b7b9d75a1bc2053a6747fb37f68c6895ee85a72cabb890168d82990c8ca7bddd271e80fdbf58f471d14d6a0e0714400d017590d4f56b3d241f languageName: node linkType: hard From e5a2ccc3704f70a7d469ac124f4eba2fdddb14c1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 11 Apr 2024 22:18:29 +0000 Subject: [PATCH 089/151] chore(deps): update dependency @types/http-proxy-middleware to v1 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .changeset/renovate-32f5da3.md | 7 +++++ plugins/airbrake-backend/package.json | 2 +- plugins/kubernetes-backend/package.json | 2 +- plugins/proxy-backend/package.json | 2 +- yarn.lock | 34 +++++++++++++++++-------- 5 files changed, 33 insertions(+), 14 deletions(-) create mode 100644 .changeset/renovate-32f5da3.md diff --git a/.changeset/renovate-32f5da3.md b/.changeset/renovate-32f5da3.md new file mode 100644 index 0000000000..a5a96917e1 --- /dev/null +++ b/.changeset/renovate-32f5da3.md @@ -0,0 +1,7 @@ +--- +'@backstage/plugin-airbrake-backend': patch +'@backstage/plugin-kubernetes-backend': patch +'@backstage/plugin-proxy-backend': patch +--- + +Updated dependency `@types/http-proxy-middleware` to `^1.0.0`. diff --git a/plugins/airbrake-backend/package.json b/plugins/airbrake-backend/package.json index b1c4211adb..251a52deeb 100644 --- a/plugins/airbrake-backend/package.json +++ b/plugins/airbrake-backend/package.json @@ -40,7 +40,7 @@ }, "devDependencies": { "@backstage/cli": "workspace:^", - "@types/http-proxy-middleware": "^0.19.3", + "@types/http-proxy-middleware": "^1.0.0", "@types/supertest": "^2.0.8", "supertest": "^6.1.6" }, diff --git a/plugins/kubernetes-backend/package.json b/plugins/kubernetes-backend/package.json index 459db8a952..e82289b9b0 100644 --- a/plugins/kubernetes-backend/package.json +++ b/plugins/kubernetes-backend/package.json @@ -69,7 +69,7 @@ "@jest-mock/express": "^2.0.1", "@kubernetes/client-node": "0.20.0", "@types/express": "^4.17.6", - "@types/http-proxy-middleware": "^0.19.3", + "@types/http-proxy-middleware": "^1.0.0", "@types/luxon": "^3.0.0", "compression": "^1.7.4", "cors": "^2.8.5", diff --git a/plugins/proxy-backend/package.json b/plugins/proxy-backend/package.json index d51cb33e9a..6fb7e344ba 100644 --- a/plugins/proxy-backend/package.json +++ b/plugins/proxy-backend/package.json @@ -68,7 +68,7 @@ "@backstage/backend-test-utils": "workspace:^", "@backstage/cli": "workspace:^", "@backstage/config-loader": "workspace:^", - "@types/http-proxy-middleware": "^0.19.3", + "@types/http-proxy-middleware": "^1.0.0", "@types/supertest": "^2.0.8", "@types/uuid": "^9.0.0", "@types/yup": "^0.32.0", diff --git a/yarn.lock b/yarn.lock index 7f73601f70..e3f68ed4f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4462,7 +4462,7 @@ __metadata: "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" "@types/express": "*" - "@types/http-proxy-middleware": ^0.19.3 + "@types/http-proxy-middleware": ^1.0.0 "@types/supertest": ^2.0.8 express: ^4.17.1 express-promise-router: ^4.1.0 @@ -7478,7 +7478,7 @@ __metadata: "@kubernetes/client-node": 0.20.0 "@types/aws4": ^1.5.1 "@types/express": ^4.17.6 - "@types/http-proxy-middleware": ^0.19.3 + "@types/http-proxy-middleware": ^1.0.0 "@types/luxon": ^3.0.0 compression: ^1.7.4 cors: ^2.8.5 @@ -8366,7 +8366,7 @@ __metadata: "@backstage/config": "workspace:^" "@backstage/config-loader": "workspace:^" "@types/express": ^4.17.6 - "@types/http-proxy-middleware": ^0.19.3 + "@types/http-proxy-middleware": ^1.0.0 "@types/supertest": ^2.0.8 "@types/uuid": ^9.0.0 "@types/yup": ^0.32.0 @@ -18840,18 +18840,16 @@ __metadata: languageName: node linkType: hard -"@types/http-proxy-middleware@npm:^0.19.3": - version: 0.19.3 - resolution: "@types/http-proxy-middleware@npm:0.19.3" +"@types/http-proxy-middleware@npm:^1.0.0": + version: 1.0.0 + resolution: "@types/http-proxy-middleware@npm:1.0.0" dependencies: - "@types/connect": "*" - "@types/http-proxy": "*" - "@types/node": "*" - checksum: 51000558db0aad31947fd60b6ba6cbd05782e09c17ded63bf9de2574200695885b362d23cf16cb796797d5779c1e3b32792bbef69386dd2a9ce688f7856cd8ec + http-proxy-middleware: "*" + checksum: 643ce3ec3b9f302328eadd8d6487c01dd8702dd17beaa1bcf35c3cdb4c9eaf512ffd3c8aa8c66790900ec60315ecdbbc8895244203c5296fdd24843d451496ae languageName: node linkType: hard -"@types/http-proxy@npm:*, @types/http-proxy@npm:^1.17.4, @types/http-proxy@npm:^1.17.8": +"@types/http-proxy@npm:^1.17.10, @types/http-proxy@npm:^1.17.4, @types/http-proxy@npm:^1.17.8": version: 1.17.14 resolution: "@types/http-proxy@npm:1.17.14" dependencies: @@ -30201,6 +30199,20 @@ __metadata: languageName: node linkType: hard +"http-proxy-middleware@npm:*": + version: 3.0.0 + resolution: "http-proxy-middleware@npm:3.0.0" + dependencies: + "@types/http-proxy": ^1.17.10 + debug: ^4.3.4 + http-proxy: ^1.18.1 + is-glob: ^4.0.1 + is-plain-obj: ^3.0.0 + micromatch: ^4.0.5 + checksum: 2c286f0604f7a08af707a8df8e6f043fca022e55df6f7f843ea48081c9288277fc7fd7196446a7c8e8568dd1db8bf89f1555b2bc8a11bda87123f9f28aebd3a5 + languageName: node + linkType: hard + "http-proxy-middleware@npm:^2.0.0, http-proxy-middleware@npm:^2.0.3, http-proxy-middleware@npm:^2.0.6": version: 2.0.6 resolution: "http-proxy-middleware@npm:2.0.6" From 2dd7ec9a336e5e77567b1ff3741dbc96831e9744 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 11 Apr 2024 23:39:00 +0000 Subject: [PATCH 090/151] fix(deps): update dependency sass to v1.75.0 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- microsite/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/microsite/yarn.lock b/microsite/yarn.lock index 6cad3f3c41..6e5aba85c8 100644 --- a/microsite/yarn.lock +++ b/microsite/yarn.lock @@ -10400,15 +10400,15 @@ __metadata: linkType: hard "sass@npm:^1.57.1": - version: 1.74.1 - resolution: "sass@npm:1.74.1" + version: 1.75.0 + resolution: "sass@npm:1.75.0" dependencies: chokidar: ">=3.0.0 <4.0.0" immutable: ^4.0.0 source-map-js: ">=0.6.2 <2.0.0" bin: sass: sass.js - checksum: 3cbcd73d91e65607f7987656b7f6b0c6143724304544768079ecbe95505f1ce71036916e0e02dcc9923551c3779863bcdd522732a8f4409e89205271966a36f4 + checksum: bfb9f5ddb6a2e1fe0c1ba6191cdb17afa7b40c1eb892c7152f6a29ff2b06dc7a510bdb648f8cca0179dcb3965920ebeb8894f0710b0b450a99db563831345033 languageName: node linkType: hard From 3f3f0ba14e4cd5f0287960fec6b9d382423b2e85 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 12 Apr 2024 00:42:36 +0000 Subject: [PATCH 091/151] chore(deps): update dependency @types/puppeteer to v7 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- packages/e2e-test/package.json | 2 +- yarn.lock | 274 ++++++++++++++++++++++++++------- 2 files changed, 217 insertions(+), 59 deletions(-) diff --git a/packages/e2e-test/package.json b/packages/e2e-test/package.json index 564dc0344e..c84e781857 100644 --- a/packages/e2e-test/package.json +++ b/packages/e2e-test/package.json @@ -43,7 +43,7 @@ "@backstage/cli": "workspace:^", "@types/fs-extra": "^11.0.0", "@types/node": "^18.17.8", - "@types/puppeteer": "^5.4.4", + "@types/puppeteer": "^7.0.0", "nodemon": "^3.0.1" }, "nodemonConfig": { diff --git a/yarn.lock b/yarn.lock index 1e6ef2a4b8..fd2f11567e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14941,6 +14941,24 @@ __metadata: languageName: node linkType: hard +"@puppeteer/browsers@npm:2.2.1": + version: 2.2.1 + resolution: "@puppeteer/browsers@npm:2.2.1" + dependencies: + debug: 4.3.4 + extract-zip: 2.0.1 + progress: 2.0.3 + proxy-agent: 6.4.0 + semver: 7.6.0 + tar-fs: 3.0.5 + unbzip2-stream: 1.4.3 + yargs: 17.7.2 + bin: + browsers: lib/cjs/main-cli.js + checksum: c2ec8bac9978ae6279d67442a3a81c517db1e172bd4603d1983eb48de12b088d8b565b1817abe21ba6df76be9a68e3fc543d4c7111c964a93f3ac9b14f7c76e5 + languageName: node + linkType: hard + "@radix-ui/primitive@npm:1.0.1": version: 1.0.1 resolution: "@radix-ui/primitive@npm:1.0.1" @@ -19440,12 +19458,12 @@ __metadata: languageName: node linkType: hard -"@types/puppeteer@npm:^5.4.4": - version: 5.4.7 - resolution: "@types/puppeteer@npm:5.4.7" +"@types/puppeteer@npm:^7.0.0": + version: 7.0.4 + resolution: "@types/puppeteer@npm:7.0.4" dependencies: - "@types/node": "*" - checksum: 491c0ca2d879b72e869f5152a9ea7de1356a66f44ef6210fdd5c5036d893b4ee2956212e2f3353c7045b9e56d1a4cea408f41a26d7cf3708774c4d6c19a7c654 + puppeteer: "*" + checksum: c84a44b054454c13935a9cf0f8983166e238532397af4f321c918d89b43a91f854460e3d0dda122f72c258b444dbcdc04ada950e35adc1938ff3b7831c6fd7a4 languageName: node linkType: hard @@ -20077,7 +20095,7 @@ __metadata: languageName: node linkType: hard -"@types/yauzl@npm:^2.10.0": +"@types/yauzl@npm:^2.10.0, @types/yauzl@npm:^2.9.1": version: 2.10.3 resolution: "@types/yauzl@npm:2.10.3" dependencies: @@ -22699,7 +22717,7 @@ __metadata: languageName: node linkType: hard -"buffer@npm:^5.5.0, buffer@npm:^5.7.1": +"buffer@npm:^5.2.1, buffer@npm:^5.5.0, buffer@npm:^5.7.1": version: 5.7.1 resolution: "buffer@npm:5.7.1" dependencies: @@ -23205,6 +23223,19 @@ __metadata: languageName: node linkType: hard +"chromium-bidi@npm:0.5.17": + version: 0.5.17 + resolution: "chromium-bidi@npm:0.5.17" + dependencies: + mitt: 3.0.1 + urlpattern-polyfill: 10.0.0 + zod: 3.22.4 + peerDependencies: + devtools-protocol: "*" + checksum: 522da996ed5abfb47707583cc24785f9aa05d87bd968dbd520f245cf8972fa3ec102f8d1d72fa07558daa70495d8c6f2bf364d8599eb60b77504e528601d8a30 + languageName: node + linkType: hard + "ci-info@npm:^2.0.0": version: 2.0.0 resolution: "ci-info@npm:2.0.0" @@ -24278,6 +24309,23 @@ __metadata: languageName: node linkType: hard +"cosmiconfig@npm:9.0.0": + version: 9.0.0 + resolution: "cosmiconfig@npm:9.0.0" + dependencies: + env-paths: ^2.2.1 + import-fresh: ^3.3.0 + js-yaml: ^4.1.0 + parse-json: ^5.2.0 + peerDependencies: + typescript: ">=4.9.5" + peerDependenciesMeta: + typescript: + optional: true + checksum: a30c424b53d442ea0bdd24cb1b3d0d8687c8dda4a17ab6afcdc439f8964438801619cdb66e8e79f63b9caa3e6586b60d8bab9ce203e72df6c5e80179b971fe8f + languageName: node + linkType: hard + "cosmiconfig@npm:^6.0.0": version: 6.0.0 resolution: "cosmiconfig@npm:6.0.0" @@ -25663,6 +25711,13 @@ __metadata: languageName: node linkType: hard +"devtools-protocol@npm:0.0.1262051": + version: 0.0.1262051 + resolution: "devtools-protocol@npm:0.0.1262051" + checksum: beaad00059964a661ab056d5e993492742c612c0370c6f08acd91490181c4d4ecf57d316eedb5a37fb6bb59321901d09ce50762f79ea09a50751d86f601b8f8e + languageName: node + linkType: hard + "dezalgo@npm:^1.0.0, dezalgo@npm:^1.0.4": version: 1.0.4 resolution: "dezalgo@npm:1.0.4" @@ -26081,7 +26136,7 @@ __metadata: "@backstage/errors": "workspace:^" "@types/fs-extra": ^11.0.0 "@types/node": ^18.17.8 - "@types/puppeteer": ^5.4.4 + "@types/puppeteer": ^7.0.0 chalk: ^4.0.0 commander: ^12.0.0 cross-fetch: ^4.0.0 @@ -27978,6 +28033,23 @@ __metadata: languageName: node linkType: hard +"extract-zip@npm:2.0.1": + version: 2.0.1 + resolution: "extract-zip@npm:2.0.1" + dependencies: + "@types/yauzl": ^2.9.1 + debug: ^4.1.1 + get-stream: ^5.1.0 + yauzl: ^2.10.0 + dependenciesMeta: + "@types/yauzl": + optional: true + bin: + extract-zip: cli.js + checksum: 8cbda9debdd6d6980819cc69734d874ddd71051c9fe5bde1ef307ebcedfe949ba57b004894b585f758b7c9eeeea0e3d87f2dda89b7d25320459c2c9643ebb635 + languageName: node + linkType: hard + "extsprintf@npm:1.3.0": version: 1.3.0 resolution: "extsprintf@npm:1.3.0" @@ -28232,6 +28304,15 @@ __metadata: languageName: node linkType: hard +"fd-slicer@npm:~1.1.0": + version: 1.1.0 + resolution: "fd-slicer@npm:1.1.0" + dependencies: + pend: ~1.2.0 + checksum: c8585fd5713f4476eb8261150900d2cb7f6ff2d87f8feb306ccc8a1122efd152f1783bdb2b8dc891395744583436bfd8081d8e63ece0ec8687eeefea394d4ff2 + languageName: node + linkType: hard + "fecha@npm:^4.2.0": version: 4.2.0 resolution: "fecha@npm:4.2.0" @@ -30191,13 +30272,13 @@ __metadata: languageName: node linkType: hard -"http-proxy-agent@npm:^7.0.0": - version: 7.0.0 - resolution: "http-proxy-agent@npm:7.0.0" +"http-proxy-agent@npm:^7.0.0, http-proxy-agent@npm:^7.0.1": + version: 7.0.2 + resolution: "http-proxy-agent@npm:7.0.2" dependencies: agent-base: ^7.1.0 debug: ^4.3.4 - checksum: 48d4fac997917e15f45094852b63b62a46d0c8a4f0b9c6c23ca26d27b8df8d178bed88389e604745e748bd9a01f5023e25093722777f0593c3f052009ff438b6 + checksum: 670858c8f8f3146db5889e1fa117630910101db601fff7d5a8aa637da0abedf68c899f03d3451cac2f83bcc4c3d2dabf339b3aa00ff8080571cceb02c3ce02f3 languageName: node linkType: hard @@ -30285,13 +30366,13 @@ __metadata: languageName: node linkType: hard -"https-proxy-agent@npm:^7.0.1, https-proxy-agent@npm:^7.0.2": - version: 7.0.2 - resolution: "https-proxy-agent@npm:7.0.2" +"https-proxy-agent@npm:^7.0.1, https-proxy-agent@npm:^7.0.2, https-proxy-agent@npm:^7.0.3": + version: 7.0.4 + resolution: "https-proxy-agent@npm:7.0.4" dependencies: agent-base: ^7.0.2 debug: 4 - checksum: 088969a0dd476ea7a0ed0a2cf1283013682b08f874c3bc6696c83fa061d2c157d29ef0ad3eb70a2046010bb7665573b2388d10fdcb3e410a66995e5248444292 + checksum: daaab857a967a2519ddc724f91edbbd388d766ff141b9025b629f92b9408fc83cee8a27e11a907aede392938e9c398e240d643e178408a59e4073539cde8cfe9 languageName: node linkType: hard @@ -35493,10 +35574,10 @@ __metadata: languageName: node linkType: hard -"mitt@npm:^3.0.0": - version: 3.0.0 - resolution: "mitt@npm:3.0.0" - checksum: f7be5049d27d18b1dbe9408452d66376fa60ae4a79fe9319869d1b90ae8cbaedadc7e9dab30b32d781411256d468be5538996bb7368941c09009ef6bbfa6bfc7 +"mitt@npm:3.0.1, mitt@npm:^3.0.0": + version: 3.0.1 + resolution: "mitt@npm:3.0.1" + checksum: b55a489ac9c2949ab166b7f060601d3b6d893a852515ae9eca4e11df01c013876df777ea109317622b5c1c60e8aae252558e33c8c94e14124db38f64a39614b1 languageName: node linkType: hard @@ -37212,7 +37293,7 @@ __metadata: languageName: node linkType: hard -"pac-proxy-agent@npm:^7.0.0": +"pac-proxy-agent@npm:^7.0.0, pac-proxy-agent@npm:^7.0.1": version: 7.0.1 resolution: "pac-proxy-agent@npm:7.0.1" dependencies: @@ -38878,6 +38959,13 @@ __metadata: languageName: node linkType: hard +"progress@npm:2.0.3": + version: 2.0.3 + resolution: "progress@npm:2.0.3" + checksum: f67403fe7b34912148d9252cb7481266a354bd99ce82c835f79070643bb3c6583d10dbcfda4d41e04bbc1d8437e9af0fb1e1f2135727878f5308682a579429b7 + languageName: node + linkType: hard + "prom-client@npm:^15.0.0": version: 15.1.1 resolution: "prom-client@npm:15.1.1" @@ -39065,6 +39153,22 @@ __metadata: languageName: node linkType: hard +"proxy-agent@npm:6.4.0": + version: 6.4.0 + resolution: "proxy-agent@npm:6.4.0" + dependencies: + agent-base: ^7.0.2 + debug: ^4.3.4 + http-proxy-agent: ^7.0.1 + https-proxy-agent: ^7.0.3 + lru-cache: ^7.14.1 + pac-proxy-agent: ^7.0.1 + proxy-from-env: ^1.1.0 + socks-proxy-agent: ^8.0.2 + checksum: 4d3794ad5e07486298902f0a7f250d0f869fa0e92d790767ca3f793a81374ce0ab6c605f8ab8e791c4d754da96656b48d1c24cb7094bfd310a15867e4a0841d7 + languageName: node + linkType: hard + "proxy-from-env@npm:^1.1.0": version: 1.1.0 resolution: "proxy-from-env@npm:1.1.0" @@ -39154,6 +39258,33 @@ __metadata: languageName: node linkType: hard +"puppeteer-core@npm:22.6.4": + version: 22.6.4 + resolution: "puppeteer-core@npm:22.6.4" + dependencies: + "@puppeteer/browsers": 2.2.1 + chromium-bidi: 0.5.17 + debug: 4.3.4 + devtools-protocol: 0.0.1262051 + ws: 8.16.0 + checksum: 76d4328e7d2a788a7a2dc3a8b19571f8eda842ff990da2fe773c3e5c01236a03856b67d9a2a6ae976f8fa74ab38813e2c7e7c4b15b9715965b2156e9ca1f9a78 + languageName: node + linkType: hard + +"puppeteer@npm:*": + version: 22.6.4 + resolution: "puppeteer@npm:22.6.4" + dependencies: + "@puppeteer/browsers": 2.2.1 + cosmiconfig: 9.0.0 + devtools-protocol: 0.0.1262051 + puppeteer-core: 22.6.4 + bin: + puppeteer: lib/esm/puppeteer/node/cli.js + checksum: 7dcbda7fc3b999f3ee7808d1c67da41be0aeabd66b0831711a46a897a2681d117f044263e57aeb7d0a096c420bb9f5871c5c2b21c38e40d323fa675e1de322c9 + languageName: node + linkType: hard + "pure-color@npm:^1.2.0": version: 1.3.0 resolution: "pure-color@npm:1.3.0" @@ -41637,16 +41768,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^6.0.0, semver@npm:^6.1.0, semver@npm:^6.2.0, semver@npm:^6.3.0, semver@npm:^6.3.1": - version: 6.3.1 - resolution: "semver@npm:6.3.1" - bin: - semver: bin/semver.js - checksum: ae47d06de28836adb9d3e25f22a92943477371292d9b665fb023fae278d345d508ca1958232af086d85e0155aee22e313e100971898bbb8d5d89b8b1d4054ca2 - languageName: node - linkType: hard - -"semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.1.3, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.4.0, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0": +"semver@npm:7.6.0, semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.1.3, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.4.0, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0": version: 7.6.0 resolution: "semver@npm:7.6.0" dependencies: @@ -41657,6 +41779,15 @@ __metadata: languageName: node linkType: hard +"semver@npm:^6.0.0, semver@npm:^6.1.0, semver@npm:^6.2.0, semver@npm:^6.3.0, semver@npm:^6.3.1": + version: 6.3.1 + resolution: "semver@npm:6.3.1" + bin: + semver: bin/semver.js + checksum: ae47d06de28836adb9d3e25f22a92943477371292d9b665fb023fae278d345d508ca1958232af086d85e0155aee22e313e100971898bbb8d5d89b8b1d4054ca2 + languageName: node + linkType: hard + "send@npm:0.18.0": version: 0.18.0 resolution: "send@npm:0.18.0" @@ -43433,19 +43564,7 @@ __metadata: languageName: node linkType: hard -"tar-fs@npm:^2.0.0": - version: 2.1.1 - resolution: "tar-fs@npm:2.1.1" - dependencies: - chownr: ^1.1.1 - mkdirp-classic: ^0.5.2 - pump: ^3.0.0 - tar-stream: ^2.1.4 - checksum: f5b9a70059f5b2969e65f037b4e4da2daf0fa762d3d232ffd96e819e3f94665dbbbe62f76f084f1acb4dbdcce16c6e4dac08d12ffc6d24b8d76720f4d9cf032d - languageName: node - linkType: hard - -"tar-fs@npm:^3.0.5": +"tar-fs@npm:3.0.5, tar-fs@npm:^3.0.5": version: 3.0.5 resolution: "tar-fs@npm:3.0.5" dependencies: @@ -43462,6 +43581,18 @@ __metadata: languageName: node linkType: hard +"tar-fs@npm:^2.0.0": + version: 2.1.1 + resolution: "tar-fs@npm:2.1.1" + dependencies: + chownr: ^1.1.1 + mkdirp-classic: ^0.5.2 + pump: ^3.0.0 + tar-stream: ^2.1.4 + checksum: f5b9a70059f5b2969e65f037b4e4da2daf0fa762d3d232ffd96e819e3f94665dbbbe62f76f084f1acb4dbdcce16c6e4dac08d12ffc6d24b8d76720f4d9cf032d + languageName: node + linkType: hard + "tar-fs@npm:~2.0.1": version: 2.0.1 resolution: "tar-fs@npm:2.0.1" @@ -43729,7 +43860,7 @@ __metadata: languageName: node linkType: hard -"through@npm:2, through@npm:^2.3.6": +"through@npm:2, through@npm:^2.3.6, through@npm:^2.3.8": version: 2.3.8 resolution: "through@npm:2.3.8" checksum: a38c3e059853c494af95d50c072b83f8b676a9ba2818dcc5b108ef252230735c54e0185437618596c790bbba8fcdaef5b290405981ffa09dce67b1f1bf190cbd @@ -44600,6 +44731,16 @@ __metadata: languageName: node linkType: hard +"unbzip2-stream@npm:1.4.3": + version: 1.4.3 + resolution: "unbzip2-stream@npm:1.4.3" + dependencies: + buffer: ^5.2.1 + through: ^2.3.8 + checksum: 0e67c4a91f4fa0fc7b4045f8b914d3498c2fc2e8c39c359977708ec85ac6d6029840e97f508675fdbdf21fcb8d276ca502043406f3682b70f075e69aae626d1d + languageName: node + linkType: hard + "undefsafe@npm:^2.0.5": version: 2.0.5 resolution: "undefsafe@npm:2.0.5" @@ -44997,6 +45138,13 @@ __metadata: languageName: node linkType: hard +"urlpattern-polyfill@npm:10.0.0": + version: 10.0.0 + resolution: "urlpattern-polyfill@npm:10.0.0" + checksum: 61d890f151ea4ecf34a3dcab32c65ad1f3cda857c9d154af198260c6e5b2ad96d024593409baaa6d4428dd1ab206c14799bf37fe011117ac93a6a44913ac5aa4 + languageName: node + linkType: hard + "urlpattern-polyfill@npm:^9.0.0": version: 9.0.0 resolution: "urlpattern-polyfill@npm:9.0.0" @@ -46188,7 +46336,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:*, ws@npm:^8.11.0, ws@npm:^8.12.0, ws@npm:^8.13.0, ws@npm:^8.14.2, ws@npm:^8.16.0, ws@npm:^8.8.0": +"ws@npm:*, ws@npm:8.16.0, ws@npm:^8.11.0, ws@npm:^8.12.0, ws@npm:^8.13.0, ws@npm:^8.14.2, ws@npm:^8.16.0, ws@npm:^8.8.0": version: 8.16.0 resolution: "ws@npm:8.16.0" peerDependencies: @@ -46489,6 +46637,21 @@ __metadata: languageName: node linkType: hard +"yargs@npm:17.7.2, yargs@npm:^17.1.1, yargs@npm:^17.3.1, yargs@npm:^17.7.1, yargs@npm:^17.7.2": + version: 17.7.2 + resolution: "yargs@npm:17.7.2" + dependencies: + cliui: ^8.0.1 + escalade: ^3.1.1 + get-caller-file: ^2.0.5 + require-directory: ^2.1.1 + string-width: ^4.2.3 + y18n: ^5.0.5 + yargs-parser: ^21.1.1 + checksum: 73b572e863aa4a8cbef323dd911d79d193b772defd5a51aab0aca2d446655216f5002c42c5306033968193bdbf892a7a4c110b0d77954a7fdf563e653967b56a + languageName: node + linkType: hard + "yargs@npm:^15.1.0": version: 15.4.1 resolution: "yargs@npm:15.4.1" @@ -46523,18 +46686,13 @@ __metadata: languageName: node linkType: hard -"yargs@npm:^17.1.1, yargs@npm:^17.3.1, yargs@npm:^17.7.1, yargs@npm:^17.7.2": - version: 17.7.2 - resolution: "yargs@npm:17.7.2" +"yauzl@npm:^2.10.0": + version: 2.10.0 + resolution: "yauzl@npm:2.10.0" dependencies: - cliui: ^8.0.1 - escalade: ^3.1.1 - get-caller-file: ^2.0.5 - require-directory: ^2.1.1 - string-width: ^4.2.3 - y18n: ^5.0.5 - yargs-parser: ^21.1.1 - checksum: 73b572e863aa4a8cbef323dd911d79d193b772defd5a51aab0aca2d446655216f5002c42c5306033968193bdbf892a7a4c110b0d77954a7fdf563e653967b56a + buffer-crc32: ~0.2.3 + fd-slicer: ~1.1.0 + checksum: 7f21fe0bbad6e2cb130044a5d1d0d5a0e5bf3d8d4f8c4e6ee12163ce798fee3de7388d22a7a0907f563ac5f9d40f8699a223d3d5c1718da90b0156da6904022b languageName: node linkType: hard @@ -46732,7 +46890,7 @@ __metadata: languageName: node linkType: hard -"zod@npm:^3.22.4": +"zod@npm:3.22.4, zod@npm:^3.22.4": version: 3.22.4 resolution: "zod@npm:3.22.4" checksum: 80bfd7f8039b24fddeb0718a2ec7c02aa9856e4838d6aa4864335a047b6b37a3273b191ef335bf0b2002e5c514ef261ffcda5a589fb084a48c336ffc4cdbab7f From 01a7024f5dde6154a3da4fdde18ed8366ec97cc7 Mon Sep 17 00:00:00 2001 From: Yash Oswal Date: Fri, 12 Apr 2024 10:31:12 +0530 Subject: [PATCH 092/151] microsite: add feedback plugin to plugins directory Signed-off-by: Yash Oswal --- microsite/data/plugins/feedback.yaml | 10 ++++++++++ microsite/static/img/plugin-feedback-logo.svg | 1 + 2 files changed, 11 insertions(+) create mode 100644 microsite/data/plugins/feedback.yaml create mode 100644 microsite/static/img/plugin-feedback-logo.svg diff --git a/microsite/data/plugins/feedback.yaml b/microsite/data/plugins/feedback.yaml new file mode 100644 index 0000000000..8e8e00165e --- /dev/null +++ b/microsite/data/plugins/feedback.yaml @@ -0,0 +1,10 @@ +--- +title: Feedback +author: Red Hat +authorUrl: https://redhat.com +category: Quality +description: A plugin for collecting user feedbacks for your application. # Max 170 characters +documentation: https://github.com/janus-idp/backstage-plugins/tree/main/plugins/feedback#readme +iconUrl: /img/plugin-feedback-logo.svg +npmPackageName: '@janus-idp/backstage-plugin-feedback' +addedDate: '2024-04-09' diff --git a/microsite/static/img/plugin-feedback-logo.svg b/microsite/static/img/plugin-feedback-logo.svg new file mode 100644 index 0000000000..bd8014f9c7 --- /dev/null +++ b/microsite/static/img/plugin-feedback-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file From 69a44e055e582fe9430928481df82a91b8a0882e Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 12 Apr 2024 10:41:44 +0200 Subject: [PATCH 093/151] workflows: relax PR stalebot deadlines Signed-off-by: Patrik Oldsberg --- .github/workflows/automate_stale.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/automate_stale.yml b/.github/workflows/automate_stale.yml index b4a7271875..691066fb61 100644 --- a/.github/workflows/automate_stale.yml +++ b/.github/workflows/automate_stale.yml @@ -35,8 +35,8 @@ jobs: recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! - days-before-pr-stale: 7 - days-before-pr-close: 5 + days-before-pr-stale: 14 + days-before-pr-close: 7 exempt-pr-labels: after-vacations,will-fix stale-pr-label: stale operations-per-run: 100 From d10120aa0e6079cf9826598bb02b987838bccd38 Mon Sep 17 00:00:00 2001 From: blam Date: Fri, 12 Apr 2024 10:47:09 +0200 Subject: [PATCH 094/151] chore: exclude warning Signed-off-by: blam --- storybook/.storybook/webpack-plugin-fail-build-on-warning.js | 1 + 1 file changed, 1 insertion(+) diff --git a/storybook/.storybook/webpack-plugin-fail-build-on-warning.js b/storybook/.storybook/webpack-plugin-fail-build-on-warning.js index 005507bf09..b94fb2d3b9 100644 --- a/storybook/.storybook/webpack-plugin-fail-build-on-warning.js +++ b/storybook/.storybook/webpack-plugin-fail-build-on-warning.js @@ -36,6 +36,7 @@ class WebpackPluginFailBuildOnWarning { 'AssetsOverSizeLimitWarning', 'EntrypointsOverSizeLimitWarning', 'NoAsyncChunksWarning', + 'ModuleDependencyWarning', // @testing-library/react added support for React 19 which throws a warning https://github.com/testing-library/react-testing-library/pull/1294/files ]); /* Entry point for the Webpack plugin. */ From 70e962ceaf6f7ee3e8f3abfec9207a52fbfdf5e8 Mon Sep 17 00:00:00 2001 From: Sebastian Poxhofer Date: Fri, 12 Apr 2024 11:09:18 +0200 Subject: [PATCH 095/151] Update .changeset/tame-pianos-hunt.md Co-authored-by: Vincenzo Scamporlino Signed-off-by: Sebastian Poxhofer --- .changeset/tame-pianos-hunt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/tame-pianos-hunt.md b/.changeset/tame-pianos-hunt.md index 3ab3e88623..2799a3a1da 100644 --- a/.changeset/tame-pianos-hunt.md +++ b/.changeset/tame-pianos-hunt.md @@ -2,4 +2,4 @@ '@backstage/backend-common': minor --- -Allow providing authentication which in turn allows usage of private registries +Added `pullOptions` to `DockerContainerRunner#runContainer` method to pass down options when pulling an image. From 6798a05eda1b51ecf28e89c275953b11c8b464ef Mon Sep 17 00:00:00 2001 From: James Wen Date: Thu, 11 Apr 2024 20:48:43 -0400 Subject: [PATCH 096/151] Remove Netflix from ADOPTERS.md - Netflix is no longer using Backstage in its internal developer portal at all Signed-off-by: James Wen Signed-off-by: James Wen --- ADOPTERS.md | 1 - 1 file changed, 1 deletion(-) diff --git a/ADOPTERS.md b/ADOPTERS.md index f08b84a8c2..0f4506f1b1 100644 --- a/ADOPTERS.md +++ b/ADOPTERS.md @@ -30,7 +30,6 @@ _You can do this by using the [Adopter form](https://info.backstage.spotify.com/ | [Brex](https://www.brex.com/) | [Vamsi Chitters](https://github.com/vamsikc) | A centralized UI to understand how a service fits in the whole Brex architecture and manage a team’s engineering dependencies. | | [Oriflame](https://www.oriflame.com/) | [Oriflame](https://github.com/oriflame) | Internal developer portal for services, single page apps and packages overview, API documentation, technical guides, tech-radar and more. | | [Booz Allen Hamilton](https://www.boozallen.com/) | [Jason Miller](https://github.com/JasonMiller-BAH) | Developer portal for a full-stack software development ecosystem that accelerates consistent and repeatable Modern Software Development practices for internal innovation and investments. | -| [Netflix](https://www.netflix.com/) | [bleathem](https://github.com/bleathem) | Our Backstage implementation will be the front door to a unified experience connecting our internal platform products across important workflows with integrated knowledge and support. | | [b.well](https://www.icanbwell.com/) | [Jacob Rosales](https://github.com/jrosales) | Foundation for our engineering portal and cloud insights. | | [PagerDuty](https://www.pagerduty.com/) | [Mark Shaw](https://github.com/markshawtoronto) | Developer portal, initially focused on software templates and tech-docs. | | [MoonShiner](https://moonshiner.at) | [Fabian Hippmann](https://github.com/FabianHippmann) | Developer portal - helps us keep track of our customer projects, onboard new developers & improve our development process 🌕🚀🧑‍🚀 | From 0ebd8a28fd650bdd3d69d7f5fdbf96539c60e6bc Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 12 Apr 2024 17:24:00 +0200 Subject: [PATCH 097/151] docs/integration/github/discovery: mention require scope and permissions Signed-off-by: Patrik Oldsberg --- docs/integrations/github/discovery.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/integrations/github/discovery.md b/docs/integrations/github/discovery.md index fadf800335..93ab00146e 100644 --- a/docs/integrations/github/discovery.md +++ b/docs/integrations/github/discovery.md @@ -115,7 +115,7 @@ You can check the official docs to [configure your webhook](https://docs.github. ## Configuration To use the discovery provider, you'll need a GitHub integration -[set up](locations.md) with either a [Personal Access Token](../../getting-started/config/authentication.md) or [GitHub Apps](./github-apps.md). +[set up](locations.md) with either a [Personal Access Token](../../getting-started/config/authentication.md) or [GitHub Apps](./github-apps.md). For Personal Access Tokens you should pay attention to the [required scopes](https://backstage.io/docs/integrations/github/locations/#token-scopes), where you will need at least the `repo` scope for reading components. For GitHub Apps you will need to grant it the [required permissions](https://backstage.io/docs/integrations/github/github-apps#app-permissions) instead, where you will need at least the `Contents: Read-only` permissions for reading components. Then you can add a `github` config to the catalog providers configuration: From db72263219683200088d03d58e29ae36e0d926e9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 12 Apr 2024 18:47:18 +0000 Subject: [PATCH 098/151] fix(deps): update dependency recharts to v2.12.5 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 01ac7a614b..e26297086f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -40350,8 +40350,8 @@ __metadata: linkType: hard "recharts@npm:^2.5.0": - version: 2.12.4 - resolution: "recharts@npm:2.12.4" + version: 2.12.5 + resolution: "recharts@npm:2.12.5" dependencies: clsx: ^2.0.0 eventemitter3: ^4.0.1 @@ -40364,7 +40364,7 @@ __metadata: peerDependencies: react: ^16.0.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.0.0 || ^17.0.0 || ^18.0.0 - checksum: b617ef44380d74d3664bb45ef725823bfb50faac94b93908ffd5b1b1a31128185acec8efcc7bce9eae260465335bb4d48152ce6fc8185b6ce61f033bd112a63c + checksum: b6fda724ed514e6901c8d620cf984483ec7809d7aa018ce50f5ec316673c26c5bdea1e2fa6f54a9f9a78947c50c8e7771dbc53bc4936d83d4da81c43ff9a5a38 languageName: node linkType: hard From 42770dab28085ba2a5696b3b73251a5ff8ffd414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Sat, 13 Apr 2024 10:11:39 +0200 Subject: [PATCH 099/151] address review comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- docs/auth/identity-resolver.md | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/docs/auth/identity-resolver.md b/docs/auth/identity-resolver.md index aedba5a9c2..b09b47a572 100644 --- a/docs/auth/identity-resolver.md +++ b/docs/auth/identity-resolver.md @@ -16,9 +16,11 @@ By default, every Backstage auth provider is configured only for the use-case of access delegation. This enables Backstage to request resources and actions from external systems on behalf of the user, for example re-triggering a build in CI. -If you want to use an auth provider to sign in users, you need to explicitly configure -it have sign-in enabled and also tell it how the external identities should -be mapped to user identities within Backstage. +If you want to use an auth provider to sign in users, you need to explicitly +configure it have sign-in enabled and also tell it how the external identities +should be mapped to user identities within Backstage. You do this by either +choosing a built-in sign in resolver, or supplying your own. Both methods are +listed below. ## Quick Start @@ -99,21 +101,20 @@ still have to make a choice - as mentioned above, even if there are a set of builtins, none of them are selected by default. You set up builtin sign in resolvers using [your app-config](../conf/index.md), -next to the respective provider's configuration. Here's an example for Microsoft -Azure: +next to the respective provider's configuration. Here's an example for GitHub: ```yaml title="in e.g. app-config.yaml" auth: environment: development providers: - microsoft: + github: development: - clientId: ${AZURE_CLIENT_ID} - clientSecret: ${AZURE_CLIENT_SECRET} - tenantId: ${AZURE_TENANT_ID} + clientId: ${AUTH_GITHUB_CLIENT_ID} + clientSecret: ${AUTH_GITHUB_CLIENT_SECRET} + enterpriseInstanceUrl: ${AUTH_GITHUB_ENTERPRISE_INSTANCE_URL} signIn: resolvers: - - resolver: emailMatchingUserEntityAnnotation + - resolver: usernameMatchingUserEntityName - resolver: emailMatchingUserEntityProfileEmail - resolver: emailLocalPartMatchingUserEntityName ``` @@ -122,8 +123,9 @@ Note that in this instance it lists several resolvers, which means that the framework will try them one by one until one succeeds. If none of them do, the sign in attempt is rejected. -To find the list of available resolvers, consult the documentation of the -respective provider. +The list of available resolvers is different for each provider, since they often +depend on the information model returned from the upstream provider service. +Consult the documentation of the respective provider to find the list. ### Building Custom Resolvers From 2ce31b3954ee4693ea7bba14965f23b8b5188280 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 11 Apr 2024 22:27:14 +0200 Subject: [PATCH 100/151] config-loader: trim strings when reading env vars Signed-off-by: Patrik Oldsberg --- .changeset/chatty-parrots-trade.md | 13 ++++++++ packages/config-loader/api-report.md | 1 - .../src/sources/ConfigSources.ts | 8 +++++ .../src/sources/transform/apply.test.ts | 31 ++++++++++++++++++- .../src/sources/transform/apply.ts | 6 ++-- 5 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 .changeset/chatty-parrots-trade.md diff --git a/.changeset/chatty-parrots-trade.md b/.changeset/chatty-parrots-trade.md new file mode 100644 index 0000000000..149fc3b2e1 --- /dev/null +++ b/.changeset/chatty-parrots-trade.md @@ -0,0 +1,13 @@ +--- +'@backstage/config-loader': minor +--- + +The default environment variable substitution function will now trim whitespace characters from the substituted value. This alleviates bugs where whitespace characters are mistakenly included in environment variables. + +If you depend on the old behavior, you can override the default substitution function with your own, for example: + +```ts +ConfigSources.default({ + substitutionFunc: async name => process.env[name], +}); +``` diff --git a/packages/config-loader/api-report.md b/packages/config-loader/api-report.md index 66572dd960..bc8f217bbb 100644 --- a/packages/config-loader/api-report.md +++ b/packages/config-loader/api-report.md @@ -25,7 +25,6 @@ export interface BaseConfigSourcesOptions { remote?: Pick; // (undocumented) rootDir?: string; - // (undocumented) substitutionFunc?: EnvFunc; // (undocumented) watch?: boolean; diff --git a/packages/config-loader/src/sources/ConfigSources.ts b/packages/config-loader/src/sources/ConfigSources.ts index 03fc6d83d6..ecff39da2d 100644 --- a/packages/config-loader/src/sources/ConfigSources.ts +++ b/packages/config-loader/src/sources/ConfigSources.ts @@ -74,6 +74,14 @@ export interface BaseConfigSourcesOptions { watch?: boolean; rootDir?: string; remote?: Pick; + + /** + * A custom substitution function that overrides the default one. + * + * @remarks + * The substitution function handles syntax like `${MY_ENV_VAR}` in configuration values. + * The default substitution will read the value from the environment and trim whitespace. + */ substitutionFunc?: SubstitutionFunc; } diff --git a/packages/config-loader/src/sources/transform/apply.test.ts b/packages/config-loader/src/sources/transform/apply.test.ts index 9f1dfbc672..3e5a4bd5e6 100644 --- a/packages/config-loader/src/sources/transform/apply.test.ts +++ b/packages/config-loader/src/sources/transform/apply.test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { applyConfigTransforms } from './apply'; +import { applyConfigTransforms, createConfigTransformer } from './apply'; describe('applyConfigTransforms', () => { it('should apply no transforms to input', async () => { @@ -84,3 +84,32 @@ describe('applyConfigTransforms', () => { }); }); }); + +describe('createConfigTransformer', () => { + const origEnv = process.env; + process.env = { + ...process.env, + SECRET: 'my-secret', + PADDED_SECRET: ' \nmy-space \t', + }; + + afterAll(() => { + process.env = origEnv; + }); + + it('should substitute environment variables', async () => { + const transformer = createConfigTransformer({}); + + await expect( + transformer({ + testAlone: '${SECRET}', + testMiddle: 'hello ${SECRET}!', + testSpace: 'hello ${PADDED_SECRET}!', + }), + ).resolves.toEqual({ + testAlone: 'my-secret', + testMiddle: 'hello my-secret!', + testSpace: 'hello my-space!', + }); + }); +}); diff --git a/packages/config-loader/src/sources/transform/apply.ts b/packages/config-loader/src/sources/transform/apply.ts index 48d9c5a1e8..89ca647a1a 100644 --- a/packages/config-loader/src/sources/transform/apply.ts +++ b/packages/config-loader/src/sources/transform/apply.ts @@ -105,8 +105,10 @@ export function createConfigTransformer(options: { substitutionFunc?: SubstitutionFunc; readFile?(path: string): Promise; }): ConfigTransformer { - const { substitutionFunc = async name => process.env[name], readFile } = - options; + const { + substitutionFunc = async name => process.env[name]?.trim(), + readFile, + } = options; const substitutionTransform = createSubstitutionTransform(substitutionFunc); const transforms = [substitutionTransform]; if (readFile) { From ed5c901fd86db06b891a64efd62e30a7dcdf2a62 Mon Sep 17 00:00:00 2001 From: Patrick Jungermann Date: Sat, 13 Apr 2024 13:59:22 +0200 Subject: [PATCH 101/151] fix: no `undefined` class name used at `MarkdownContent` if no custom class name was provided Signed-off-by: Patrick Jungermann --- .changeset/lemon-months-press.md | 5 ++++ .../MarkdownContent/MarkdownContent.test.tsx | 30 +++++++++++++++++++ .../MarkdownContent/MarkdownContent.tsx | 2 +- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .changeset/lemon-months-press.md diff --git a/.changeset/lemon-months-press.md b/.changeset/lemon-months-press.md new file mode 100644 index 0000000000..ecefc64daa --- /dev/null +++ b/.changeset/lemon-months-press.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-components': patch +--- + +No `undefined` class name used at `MarkdownContent` if no custom class name was provided. diff --git a/packages/core-components/src/components/MarkdownContent/MarkdownContent.test.tsx b/packages/core-components/src/components/MarkdownContent/MarkdownContent.test.tsx index 4f28da0118..d9d82437e4 100644 --- a/packages/core-components/src/components/MarkdownContent/MarkdownContent.test.tsx +++ b/packages/core-components/src/components/MarkdownContent/MarkdownContent.test.tsx @@ -45,6 +45,36 @@ describe('', () => { ).toBeInTheDocument(); }); + it('Render MarkdownContent component without custom class', async () => { + await renderInTestApp( + , + ); + const content = screen.getByText('https://example.com', { selector: 'p' }); + + expect( + Array.from(content.parentElement?.classList?.values() ?? []).map(cls => + cls.replace(/-\d+$/, ''), + ), + ).toEqual(['BackstageMarkdownContent-markdown']); + }); + + it('Render MarkdownContent component with custom class', async () => { + await renderInTestApp( + , + ); + const content = screen.getByText('https://example.com', { selector: 'p' }); + + expect( + Array.from(content.parentElement?.classList?.values() ?? []).map(cls => + cls.replace(/-\d+$/, ''), + ), + ).toEqual(['BackstageMarkdownContent-markdown', 'custom-class']); + }); + it('render MarkdownContent component with CodeSnippet for code blocks', async () => { await renderInTestApp( , diff --git a/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx b/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx index b422a62b6c..f536b20106 100644 --- a/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx +++ b/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx @@ -127,7 +127,7 @@ export function MarkdownContent(props: Props) { return ( Date: Sat, 13 Apr 2024 15:50:52 +0200 Subject: [PATCH 102/151] yarn.lock: stick to existing version of csstype Signed-off-by: Patrik Oldsberg --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 85cbdfbdb3..0bac998445 100644 --- a/yarn.lock +++ b/yarn.lock @@ -24781,9 +24781,9 @@ __metadata: linkType: hard "csstype@npm:^3.0.2, csstype@npm:^3.1.2, csstype@npm:^3.1.3": - version: 3.1.3 - resolution: "csstype@npm:3.1.3" - checksum: 8db785cc92d259102725b3c694ec0c823f5619a84741b5c7991b8ad135dfaa66093038a1cc63e03361a6cd28d122be48f2106ae72334e067dd619a51f49eddf7 + version: 3.0.9 + resolution: "csstype@npm:3.0.9" + checksum: 199f9af7e673f9f188525c3102a329d637ff46c52f6385a4427ff5cb17adcb736189150170a7af7c5701d18d7704bdad130273f4aa7e44c6c4f9967e6115dc93 languageName: node linkType: hard From 42738859dd5d725941b7956ff573d9e5ce8b6e8b Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 13 Apr 2024 15:56:08 +0200 Subject: [PATCH 103/151] Update .changeset/lovely-flowers-promise.md Signed-off-by: Patrik Oldsberg --- .changeset/lovely-flowers-promise.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/lovely-flowers-promise.md b/.changeset/lovely-flowers-promise.md index 71c34bb8b6..5a778d903f 100644 --- a/.changeset/lovely-flowers-promise.md +++ b/.changeset/lovely-flowers-promise.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-cloudbuild': minor +'@backstage/plugin-cloudbuild': patch --- Changed the column that serves as a hyperlink from SOURCE to BUILD. From 4eb66c43fe8f0eac6ce0dba140826ed753dbd352 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 13 Apr 2024 16:00:52 +0200 Subject: [PATCH 104/151] cli: fix type error from webpack bump Signed-off-by: Patrik Oldsberg --- packages/cli/src/lib/bundler/backend.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/src/lib/bundler/backend.ts b/packages/cli/src/lib/bundler/backend.ts index 3094450d4b..598b77bc51 100644 --- a/packages/cli/src/lib/bundler/backend.ts +++ b/packages/cli/src/lib/bundler/backend.ts @@ -30,7 +30,7 @@ export async function serveBackend(options: BackendServeOptions) { // not include dependencies in node_modules. So we set it here at runtime as well. (process.env as { NODE_ENV: string }).NODE_ENV = 'development'; - const compiler = webpack(config, (err: Error | undefined) => { + const compiler = webpack(config, (err: Error | null) => { if (err) { console.error(err); } else console.log('Build succeeded'); From 13a85bbe0584128d989b3c3630c44d46868f61c2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 13 Apr 2024 14:37:10 +0000 Subject: [PATCH 105/151] chore(deps): update dependency @playwright/test to v1.43.1 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/yarn.lock b/yarn.lock index c9483840d0..457478c597 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14678,13 +14678,13 @@ __metadata: linkType: hard "@playwright/test@npm:^1.32.3": - version: 1.43.0 - resolution: "@playwright/test@npm:1.43.0" + version: 1.43.1 + resolution: "@playwright/test@npm:1.43.1" dependencies: - playwright: 1.43.0 + playwright: 1.43.1 bin: playwright: cli.js - checksum: c7c0c6e8fde4e9dceea22d48384642b78c3d539fb0512edeaa581dc4dc07cedfd166dba92c5e9e69a378b7fd63362b142450dbdd5c9b65d76c4def162a5c470d + checksum: f9db387b488a03125e5dc22dd7ffed9c661d1f2428188912a35a2235b3bd9d826b390e7600d04998639994f5a96695b9dc9034ca9cb59e261d2fdee93a60df3f languageName: node linkType: hard @@ -38132,27 +38132,27 @@ __metadata: languageName: node linkType: hard -"playwright-core@npm:1.43.0": - version: 1.43.0 - resolution: "playwright-core@npm:1.43.0" +"playwright-core@npm:1.43.1": + version: 1.43.1 + resolution: "playwright-core@npm:1.43.1" bin: playwright-core: cli.js - checksum: b35265d356d87eb4114997e6af985ee3cb5a473f15a465d6e02834288a55f0cae4233a18178658389ff443f92405e020815fc165274d2262c3ca1c2b5be948cf + checksum: 7c96b3a4a4bce2ee22c3cd680c9b0bb9e4bf07ee4b51d1e9a7f47a6489c7b0b960d4b550e530b8f41d1ffeadd26c7c6bb626ae8689dfd90dce1cb8e35ae78ff7 languageName: node linkType: hard -"playwright@npm:1.43.0": - version: 1.43.0 - resolution: "playwright@npm:1.43.0" +"playwright@npm:1.43.1": + version: 1.43.1 + resolution: "playwright@npm:1.43.1" dependencies: fsevents: 2.3.2 - playwright-core: 1.43.0 + playwright-core: 1.43.1 dependenciesMeta: fsevents: optional: true bin: playwright: cli.js - checksum: edd4ef9644398c197d20e957cf2a5e5a95d7e0144f3c971923e709247f5b48551bf6168c74b34909f263ab96fac6e49466b65a9cd1349ad400dabd4b8b364acf + checksum: de9db021f93018a18275bbb5af09ebf1804aa0534f47578b35b440064abc774509740205802824afc94a99fc84dd55ffe9e215718ad3ecc691b251ab3882b096 languageName: node linkType: hard From b48c678877492a1d27a54739d833655bd16bf78f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 13 Apr 2024 14:40:44 +0000 Subject: [PATCH 106/151] fix(deps): update docusaurus monorepo to v3.2.1 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- microsite/yarn.lock | 392 ++++++++++++++++++++++---------------------- 1 file changed, 192 insertions(+), 200 deletions(-) diff --git a/microsite/yarn.lock b/microsite/yarn.lock index 6e5aba85c8..a8e4699105 100644 --- a/microsite/yarn.lock +++ b/microsite/yarn.lock @@ -509,7 +509,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.22.7, @babel/parser@npm:^7.23.9": +"@babel/parser@npm:^7.23.9": version: 7.23.9 resolution: "@babel/parser@npm:7.23.9" bin: @@ -1689,9 +1689,9 @@ __metadata: languageName: node linkType: hard -"@docusaurus/core@npm:3.1.1, @docusaurus/core@npm:^3.1.1": - version: 3.1.1 - resolution: "@docusaurus/core@npm:3.1.1" +"@docusaurus/core@npm:3.2.1, @docusaurus/core@npm:^3.1.1": + version: 3.2.1 + resolution: "@docusaurus/core@npm:3.2.1" dependencies: "@babel/core": ^7.23.3 "@babel/generator": ^7.23.3 @@ -1703,14 +1703,13 @@ __metadata: "@babel/runtime": ^7.22.6 "@babel/runtime-corejs3": ^7.22.6 "@babel/traverse": ^7.22.8 - "@docusaurus/cssnano-preset": 3.1.1 - "@docusaurus/logger": 3.1.1 - "@docusaurus/mdx-loader": 3.1.1 + "@docusaurus/cssnano-preset": 3.2.1 + "@docusaurus/logger": 3.2.1 + "@docusaurus/mdx-loader": 3.2.1 "@docusaurus/react-loadable": 5.5.2 - "@docusaurus/utils": 3.1.1 - "@docusaurus/utils-common": 3.1.1 - "@docusaurus/utils-validation": 3.1.1 - "@slorber/static-site-generator-webpack-plugin": ^4.0.7 + "@docusaurus/utils": 3.2.1 + "@docusaurus/utils-common": 3.2.1 + "@docusaurus/utils-validation": 3.2.1 "@svgr/webpack": ^6.5.1 autoprefixer: ^10.4.14 babel-loader: ^9.1.3 @@ -1731,6 +1730,7 @@ __metadata: detect-port: ^1.5.1 escape-html: ^1.0.3 eta: ^2.2.0 + eval: ^0.1.8 file-loader: ^6.2.0 fs-extra: ^11.1.1 html-minifier-terser: ^7.2.0 @@ -1739,6 +1739,7 @@ __metadata: leven: ^3.1.0 lodash: ^4.17.21 mini-css-extract-plugin: ^2.7.6 + p-map: ^4.0.0 postcss: ^8.4.26 postcss-loader: ^7.3.3 prompts: ^2.4.2 @@ -1767,41 +1768,39 @@ __metadata: react-dom: ^18.0.0 bin: docusaurus: bin/docusaurus.mjs - checksum: a35851dd6dc5ff5d2c8a8efb36b9875dc33a9e067a4677e5c9437a8635970e55a3cf14bb6eba9c9e356f4189283fb401b39423d497eb17bb09a16dd0ed84b1da + checksum: 9267f08b41240cb9d399abbd8a41ff66e0082551284325db3f17fcce9643bef81d06564797a7cc4c528fe8bde2858c20666e74a0308f3ecc80f3be1dbee14bb5 languageName: node linkType: hard -"@docusaurus/cssnano-preset@npm:3.1.1": - version: 3.1.1 - resolution: "@docusaurus/cssnano-preset@npm:3.1.1" +"@docusaurus/cssnano-preset@npm:3.2.1": + version: 3.2.1 + resolution: "@docusaurus/cssnano-preset@npm:3.2.1" dependencies: cssnano-preset-advanced: ^5.3.10 postcss: ^8.4.26 postcss-sort-media-queries: ^4.4.1 tslib: ^2.6.0 - checksum: 562d96c2ff60826459c255831cd57b12393e6f41b3827c499d43d00ec1887fbeebfea7c68aa72d9e56a5d64419847d11a5d66021acb4f1e3ce4c87b781f33954 + checksum: ee23a1229d23732d936fe1d68732d1305abf0132b43a398336fee500504a3e7566d3b0c6222f89f565e24e68e00e353765e0cbbab5611a3b35ecf88305558b6d languageName: node linkType: hard -"@docusaurus/logger@npm:3.1.1": - version: 3.1.1 - resolution: "@docusaurus/logger@npm:3.1.1" +"@docusaurus/logger@npm:3.2.1": + version: 3.2.1 + resolution: "@docusaurus/logger@npm:3.2.1" dependencies: chalk: ^4.1.2 tslib: ^2.6.0 - checksum: d9673035a7eff14c1820b6c07a07e92a21e7f8e824305a784250d025c79bf9cfc51d0e6007b7660da4f810b78793572d382db48033201902c335c916d735433b + checksum: 9d5db5253eda98871563faddb5318bcb6b17ddf5882ababad4803d526917844819751e84ee8028e794fd5507646db6409f9041fd7f41b7f7971015df11cc6376 languageName: node linkType: hard -"@docusaurus/mdx-loader@npm:3.1.1": - version: 3.1.1 - resolution: "@docusaurus/mdx-loader@npm:3.1.1" +"@docusaurus/mdx-loader@npm:3.2.1": + version: 3.2.1 + resolution: "@docusaurus/mdx-loader@npm:3.2.1" dependencies: - "@babel/parser": ^7.22.7 - "@babel/traverse": ^7.22.8 - "@docusaurus/logger": 3.1.1 - "@docusaurus/utils": 3.1.1 - "@docusaurus/utils-validation": 3.1.1 + "@docusaurus/logger": 3.2.1 + "@docusaurus/utils": 3.2.1 + "@docusaurus/utils-validation": 3.2.1 "@mdx-js/mdx": ^3.0.0 "@slorber/remark-comment": ^1.0.0 escape-html: ^1.0.3 @@ -1826,16 +1825,16 @@ __metadata: peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - checksum: e6b2483b20db41c8264c47edc42e2a738239fbad9b69eb520c7dab421dc2cde4f73f6ec871ccf277dfbc285ae9b202af892771ce800c4ce56739bff6c4c3c231 + checksum: 4609faf2d8b76085a3aa86ac5ca4ac3b3420e3cfd796f1b39c46f368c82b3db0db5b1308646cf35fdad0a1f6f088d367116eb0e2a8c3fa728ed886ee37516476 languageName: node linkType: hard -"@docusaurus/module-type-aliases@npm:3.1.1, @docusaurus/module-type-aliases@npm:^3.1.1": - version: 3.1.1 - resolution: "@docusaurus/module-type-aliases@npm:3.1.1" +"@docusaurus/module-type-aliases@npm:3.2.1, @docusaurus/module-type-aliases@npm:^3.1.1": + version: 3.2.1 + resolution: "@docusaurus/module-type-aliases@npm:3.2.1" dependencies: "@docusaurus/react-loadable": 5.5.2 - "@docusaurus/types": 3.1.1 + "@docusaurus/types": 3.2.1 "@types/history": ^4.7.11 "@types/react": "*" "@types/react-router-config": "*" @@ -1845,19 +1844,19 @@ __metadata: peerDependencies: react: "*" react-dom: "*" - checksum: 937e52b57af5e459df26621dba57a1e399c48ebb1bc0fe10450c0238a79ef76d26a69ba9a42317e236d50bbd6c3e0fbb10fe97f8153373331947b90125aeee38 + checksum: 37b4a40f9afebbe76e350c10c857737b544c141a988462436904ae16993a52e4429018d406e2f55ad57a533e5a108dd7cdb903434abb84721deeec0d5f195d80 languageName: node linkType: hard "@docusaurus/plugin-client-redirects@npm:^3.1.1": - version: 3.1.1 - resolution: "@docusaurus/plugin-client-redirects@npm:3.1.1" + version: 3.2.1 + resolution: "@docusaurus/plugin-client-redirects@npm:3.2.1" dependencies: - "@docusaurus/core": 3.1.1 - "@docusaurus/logger": 3.1.1 - "@docusaurus/utils": 3.1.1 - "@docusaurus/utils-common": 3.1.1 - "@docusaurus/utils-validation": 3.1.1 + "@docusaurus/core": 3.2.1 + "@docusaurus/logger": 3.2.1 + "@docusaurus/utils": 3.2.1 + "@docusaurus/utils-common": 3.2.1 + "@docusaurus/utils-validation": 3.2.1 eta: ^2.2.0 fs-extra: ^11.1.1 lodash: ^4.17.21 @@ -1865,21 +1864,21 @@ __metadata: peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - checksum: 48a101b88e0f537323cb54c0de6d0a711f7987358699929f0bba17ae60038205a154b2ce179e1a1e065d2732186d23b53f4a1922ca8d875f6aea364abf77bdd7 + checksum: 84f031a9f660028cf745ad4f3b8ea8820e34fdabed75321b06a8145078b3b8c496369c902dc3f46a2bb973cfaaa433474a9891bd836494ff72c65258fa67b64c languageName: node linkType: hard -"@docusaurus/plugin-content-blog@npm:3.1.1": - version: 3.1.1 - resolution: "@docusaurus/plugin-content-blog@npm:3.1.1" +"@docusaurus/plugin-content-blog@npm:3.2.1": + version: 3.2.1 + resolution: "@docusaurus/plugin-content-blog@npm:3.2.1" dependencies: - "@docusaurus/core": 3.1.1 - "@docusaurus/logger": 3.1.1 - "@docusaurus/mdx-loader": 3.1.1 - "@docusaurus/types": 3.1.1 - "@docusaurus/utils": 3.1.1 - "@docusaurus/utils-common": 3.1.1 - "@docusaurus/utils-validation": 3.1.1 + "@docusaurus/core": 3.2.1 + "@docusaurus/logger": 3.2.1 + "@docusaurus/mdx-loader": 3.2.1 + "@docusaurus/types": 3.2.1 + "@docusaurus/utils": 3.2.1 + "@docusaurus/utils-common": 3.2.1 + "@docusaurus/utils-validation": 3.2.1 cheerio: ^1.0.0-rc.12 feed: ^4.2.2 fs-extra: ^11.1.1 @@ -1893,21 +1892,22 @@ __metadata: peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - checksum: 8680e47cc1250cd0c0987c7471e8679860d867de5bf3917e0088185cfa4f5abdb7a847f652cea7c61afbce9dad8bb3cd9f8924b13b064087eab4f9654a9de05d + checksum: d95147a28aad832cd2dc39af634e1902a8a36f958dd2ff5fa6eaa47b574b58df42609a64da823951826f647337ad35c1f1c8be8a0a085913e192936f38839413 languageName: node linkType: hard -"@docusaurus/plugin-content-docs@npm:3.1.1": - version: 3.1.1 - resolution: "@docusaurus/plugin-content-docs@npm:3.1.1" +"@docusaurus/plugin-content-docs@npm:3.2.1": + version: 3.2.1 + resolution: "@docusaurus/plugin-content-docs@npm:3.2.1" dependencies: - "@docusaurus/core": 3.1.1 - "@docusaurus/logger": 3.1.1 - "@docusaurus/mdx-loader": 3.1.1 - "@docusaurus/module-type-aliases": 3.1.1 - "@docusaurus/types": 3.1.1 - "@docusaurus/utils": 3.1.1 - "@docusaurus/utils-validation": 3.1.1 + "@docusaurus/core": 3.2.1 + "@docusaurus/logger": 3.2.1 + "@docusaurus/mdx-loader": 3.2.1 + "@docusaurus/module-type-aliases": 3.2.1 + "@docusaurus/types": 3.2.1 + "@docusaurus/utils": 3.2.1 + "@docusaurus/utils-common": 3.2.1 + "@docusaurus/utils-validation": 3.2.1 "@types/react-router-config": ^5.0.7 combine-promises: ^1.1.0 fs-extra: ^11.1.1 @@ -1919,133 +1919,133 @@ __metadata: peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - checksum: 1d96477ca575e01e3e2de080075f07a7f35da7a839632d2ad2d06bf3b651fbd91dd4e70861bb16e1ccb8b2a99f0602461f4c181c04557e0a98ece1b5e5ba61de + checksum: c182466c3ff513b36a8975a3899b07ffc4b227ab45ef69eacc0a77119d6f0cd6a0727a3e886cfcf4a56e4f522f64e1e6a2647ddc57eb8493b93c03240b1d9b39 languageName: node linkType: hard -"@docusaurus/plugin-content-pages@npm:3.1.1": - version: 3.1.1 - resolution: "@docusaurus/plugin-content-pages@npm:3.1.1" +"@docusaurus/plugin-content-pages@npm:3.2.1": + version: 3.2.1 + resolution: "@docusaurus/plugin-content-pages@npm:3.2.1" dependencies: - "@docusaurus/core": 3.1.1 - "@docusaurus/mdx-loader": 3.1.1 - "@docusaurus/types": 3.1.1 - "@docusaurus/utils": 3.1.1 - "@docusaurus/utils-validation": 3.1.1 + "@docusaurus/core": 3.2.1 + "@docusaurus/mdx-loader": 3.2.1 + "@docusaurus/types": 3.2.1 + "@docusaurus/utils": 3.2.1 + "@docusaurus/utils-validation": 3.2.1 fs-extra: ^11.1.1 tslib: ^2.6.0 webpack: ^5.88.1 peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - checksum: ccb9c58802b56c79f2b9bc4445dad316e50438fea995c2a6543637c472c4c2ccfbe3984abb462a1359bce3e3dfad84fecf6e4faab8e242dac4182146043ea005 + checksum: 3cce99f8aa863b97cbb54a50b448073222a0678528b09f5bec2196e73ec4740f412f8675ed05d283ff672756a5d3005f7a1e4d8c8f882cd0d6d5691cbccb604c languageName: node linkType: hard -"@docusaurus/plugin-debug@npm:3.1.1": - version: 3.1.1 - resolution: "@docusaurus/plugin-debug@npm:3.1.1" +"@docusaurus/plugin-debug@npm:3.2.1": + version: 3.2.1 + resolution: "@docusaurus/plugin-debug@npm:3.2.1" dependencies: - "@docusaurus/core": 3.1.1 - "@docusaurus/types": 3.1.1 - "@docusaurus/utils": 3.1.1 + "@docusaurus/core": 3.2.1 + "@docusaurus/types": 3.2.1 + "@docusaurus/utils": 3.2.1 fs-extra: ^11.1.1 react-json-view-lite: ^1.2.0 tslib: ^2.6.0 peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - checksum: 843780bf7eb57d41d198832ad9a7a53e45302c2a10f0221a77c4340e3b1c1dd4e92f77f2ecae3fdb8eef0aed1b7314f2ce1c8323fe25eec759bcde10e0e50149 + checksum: b3fb1c8935463afb97f233042692c247d4147c03e18ef9fb37fbf0c46d4adaefa4af0d5c357025992dadfe7b83a9fd3754946b8947bfb8b9535dca390a3668d0 languageName: node linkType: hard -"@docusaurus/plugin-google-analytics@npm:3.1.1": - version: 3.1.1 - resolution: "@docusaurus/plugin-google-analytics@npm:3.1.1" +"@docusaurus/plugin-google-analytics@npm:3.2.1": + version: 3.2.1 + resolution: "@docusaurus/plugin-google-analytics@npm:3.2.1" dependencies: - "@docusaurus/core": 3.1.1 - "@docusaurus/types": 3.1.1 - "@docusaurus/utils-validation": 3.1.1 + "@docusaurus/core": 3.2.1 + "@docusaurus/types": 3.2.1 + "@docusaurus/utils-validation": 3.2.1 tslib: ^2.6.0 peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - checksum: 4efcaf9f95353485965e299a971e761b3dadac1370d6d8a6582d653535ce76e36b6788283aa1a6dfd7f55ac64fca3d7e97239f94a5163e4cf192a5c2854b1d61 + checksum: e1e881fd6adbe408029257d526759b9217f7d70e5e068c7e9241a5f0c3050b0fa46acfeb4f8a23c3f36e1739d0a3d810642d69c6648ff6801ce13b646e44e6c1 languageName: node linkType: hard -"@docusaurus/plugin-google-gtag@npm:3.1.1": - version: 3.1.1 - resolution: "@docusaurus/plugin-google-gtag@npm:3.1.1" +"@docusaurus/plugin-google-gtag@npm:3.2.1": + version: 3.2.1 + resolution: "@docusaurus/plugin-google-gtag@npm:3.2.1" dependencies: - "@docusaurus/core": 3.1.1 - "@docusaurus/types": 3.1.1 - "@docusaurus/utils-validation": 3.1.1 + "@docusaurus/core": 3.2.1 + "@docusaurus/types": 3.2.1 + "@docusaurus/utils-validation": 3.2.1 "@types/gtag.js": ^0.0.12 tslib: ^2.6.0 peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - checksum: 65ede5352fa16492b23ac37343eb62f4855c4e306ce07552f3257894ddc2329a6244d371bf989bd034cd685965ef8c667d87322497e475d1e54f014fa44225f1 + checksum: b7758289d8453e98baf95d41e754c1e4c8fd5b1c000ba444c4bdf13fc97674a3cddf3215b6406266729e23898641b5bae297c5422c5bd079ef04773fa5a15c1b languageName: node linkType: hard -"@docusaurus/plugin-google-tag-manager@npm:3.1.1": - version: 3.1.1 - resolution: "@docusaurus/plugin-google-tag-manager@npm:3.1.1" +"@docusaurus/plugin-google-tag-manager@npm:3.2.1": + version: 3.2.1 + resolution: "@docusaurus/plugin-google-tag-manager@npm:3.2.1" dependencies: - "@docusaurus/core": 3.1.1 - "@docusaurus/types": 3.1.1 - "@docusaurus/utils-validation": 3.1.1 + "@docusaurus/core": 3.2.1 + "@docusaurus/types": 3.2.1 + "@docusaurus/utils-validation": 3.2.1 tslib: ^2.6.0 peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - checksum: 9a1a014a39da0e5ef234c0eb427b7d97b59fd797152c24e05c13a6a11db4269a0223ad474d17714d02a3ad14a97a9072b6757554b3f274b5f0480d7409749a7c + checksum: 82355aed046b12ce0fead68339e24a3c6f2f517bc2b80c9c26c502cc49d86c1b6d0f797d5269d1d5e73ac78fd748c8a2f4528f7f3feee1137ae8e73876426426 languageName: node linkType: hard -"@docusaurus/plugin-sitemap@npm:3.1.1": - version: 3.1.1 - resolution: "@docusaurus/plugin-sitemap@npm:3.1.1" +"@docusaurus/plugin-sitemap@npm:3.2.1": + version: 3.2.1 + resolution: "@docusaurus/plugin-sitemap@npm:3.2.1" dependencies: - "@docusaurus/core": 3.1.1 - "@docusaurus/logger": 3.1.1 - "@docusaurus/types": 3.1.1 - "@docusaurus/utils": 3.1.1 - "@docusaurus/utils-common": 3.1.1 - "@docusaurus/utils-validation": 3.1.1 + "@docusaurus/core": 3.2.1 + "@docusaurus/logger": 3.2.1 + "@docusaurus/types": 3.2.1 + "@docusaurus/utils": 3.2.1 + "@docusaurus/utils-common": 3.2.1 + "@docusaurus/utils-validation": 3.2.1 fs-extra: ^11.1.1 sitemap: ^7.1.1 tslib: ^2.6.0 peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - checksum: 69b584dc9143b816a06eac7bbd13501c201c24dadd339dfd18179f7a7ddcabfe76640fd87ab14f73f624916e74b7192eee5f3aca7e745f2d6a92b5754c8d7bb3 + checksum: b2e4c4fddd0fbdd4a6a4c93a0f9c16b1294162146eb9911ce378f33d70396f08dfa98d92aed133bba2a8df2b1710c257bf00c0657933ee6cd9c5edb36c8054dc languageName: node linkType: hard "@docusaurus/preset-classic@npm:^3.1.1": - version: 3.1.1 - resolution: "@docusaurus/preset-classic@npm:3.1.1" + version: 3.2.1 + resolution: "@docusaurus/preset-classic@npm:3.2.1" dependencies: - "@docusaurus/core": 3.1.1 - "@docusaurus/plugin-content-blog": 3.1.1 - "@docusaurus/plugin-content-docs": 3.1.1 - "@docusaurus/plugin-content-pages": 3.1.1 - "@docusaurus/plugin-debug": 3.1.1 - "@docusaurus/plugin-google-analytics": 3.1.1 - "@docusaurus/plugin-google-gtag": 3.1.1 - "@docusaurus/plugin-google-tag-manager": 3.1.1 - "@docusaurus/plugin-sitemap": 3.1.1 - "@docusaurus/theme-classic": 3.1.1 - "@docusaurus/theme-common": 3.1.1 - "@docusaurus/theme-search-algolia": 3.1.1 - "@docusaurus/types": 3.1.1 + "@docusaurus/core": 3.2.1 + "@docusaurus/plugin-content-blog": 3.2.1 + "@docusaurus/plugin-content-docs": 3.2.1 + "@docusaurus/plugin-content-pages": 3.2.1 + "@docusaurus/plugin-debug": 3.2.1 + "@docusaurus/plugin-google-analytics": 3.2.1 + "@docusaurus/plugin-google-gtag": 3.2.1 + "@docusaurus/plugin-google-tag-manager": 3.2.1 + "@docusaurus/plugin-sitemap": 3.2.1 + "@docusaurus/theme-classic": 3.2.1 + "@docusaurus/theme-common": 3.2.1 + "@docusaurus/theme-search-algolia": 3.2.1 + "@docusaurus/types": 3.2.1 peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - checksum: c0fba593e9d1670ea21b6caefe297ee35ca22f6b8bc63037d8f3fa652d62516494d0a557f8949520424d01a4e92b563800599ec16a1a33655324b42d5f15c55a + checksum: 343c896f22bffbda9db4af7d652588f353c5f60336e545eb07be0dfe9bc29ca04a3978d88d5a8b3fa7caafc56a48b341349ffd08006885fa0d4de216cfdc5401 languageName: node linkType: hard @@ -2061,22 +2061,22 @@ __metadata: languageName: node linkType: hard -"@docusaurus/theme-classic@npm:3.1.1": - version: 3.1.1 - resolution: "@docusaurus/theme-classic@npm:3.1.1" +"@docusaurus/theme-classic@npm:3.2.1": + version: 3.2.1 + resolution: "@docusaurus/theme-classic@npm:3.2.1" dependencies: - "@docusaurus/core": 3.1.1 - "@docusaurus/mdx-loader": 3.1.1 - "@docusaurus/module-type-aliases": 3.1.1 - "@docusaurus/plugin-content-blog": 3.1.1 - "@docusaurus/plugin-content-docs": 3.1.1 - "@docusaurus/plugin-content-pages": 3.1.1 - "@docusaurus/theme-common": 3.1.1 - "@docusaurus/theme-translations": 3.1.1 - "@docusaurus/types": 3.1.1 - "@docusaurus/utils": 3.1.1 - "@docusaurus/utils-common": 3.1.1 - "@docusaurus/utils-validation": 3.1.1 + "@docusaurus/core": 3.2.1 + "@docusaurus/mdx-loader": 3.2.1 + "@docusaurus/module-type-aliases": 3.2.1 + "@docusaurus/plugin-content-blog": 3.2.1 + "@docusaurus/plugin-content-docs": 3.2.1 + "@docusaurus/plugin-content-pages": 3.2.1 + "@docusaurus/theme-common": 3.2.1 + "@docusaurus/theme-translations": 3.2.1 + "@docusaurus/types": 3.2.1 + "@docusaurus/utils": 3.2.1 + "@docusaurus/utils-common": 3.2.1 + "@docusaurus/utils-validation": 3.2.1 "@mdx-js/react": ^3.0.0 clsx: ^2.0.0 copy-text-to-clipboard: ^3.2.0 @@ -2093,21 +2093,21 @@ __metadata: peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - checksum: 8d64676351408e0a378bf9b226cb9cc8f52c8b1f1e03811431de0c7af2aa80445a825267933a4c44ee92d6a975a549c47f4d28798d99cfc0b731f4c4e38f0ba3 + checksum: 7b38e47e9334ba6ad84f6432ec9ae81caad7f6c630b2a332617b0f32f1559b0e56f3d8857c732da62d1d7213ad0f493853bf18b1707a2f8d8bcccef32f1d81a1 languageName: node linkType: hard -"@docusaurus/theme-common@npm:3.1.1": - version: 3.1.1 - resolution: "@docusaurus/theme-common@npm:3.1.1" +"@docusaurus/theme-common@npm:3.2.1": + version: 3.2.1 + resolution: "@docusaurus/theme-common@npm:3.2.1" dependencies: - "@docusaurus/mdx-loader": 3.1.1 - "@docusaurus/module-type-aliases": 3.1.1 - "@docusaurus/plugin-content-blog": 3.1.1 - "@docusaurus/plugin-content-docs": 3.1.1 - "@docusaurus/plugin-content-pages": 3.1.1 - "@docusaurus/utils": 3.1.1 - "@docusaurus/utils-common": 3.1.1 + "@docusaurus/mdx-loader": 3.2.1 + "@docusaurus/module-type-aliases": 3.2.1 + "@docusaurus/plugin-content-blog": 3.2.1 + "@docusaurus/plugin-content-docs": 3.2.1 + "@docusaurus/plugin-content-pages": 3.2.1 + "@docusaurus/utils": 3.2.1 + "@docusaurus/utils-common": 3.2.1 "@types/history": ^4.7.11 "@types/react": "*" "@types/react-router-config": "*" @@ -2119,22 +2119,22 @@ __metadata: peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - checksum: ba7d2c4032c8d7f822e77bd39a77f712f258e9d4aa44aac75a72ad27c0eaa7400746025ba59e445c9c1b083d2ae02802a759361d67e80b9f7295521520ada1bc + checksum: 13de70293476e05f1b52c2d99a1b26c73bf99ac92aba3c8ddc413b5336725d2b54c56c167d12244fdb0b518ee9cdecbbfb3258fb8cc91272e9b795361b131fbb languageName: node linkType: hard -"@docusaurus/theme-search-algolia@npm:3.1.1": - version: 3.1.1 - resolution: "@docusaurus/theme-search-algolia@npm:3.1.1" +"@docusaurus/theme-search-algolia@npm:3.2.1": + version: 3.2.1 + resolution: "@docusaurus/theme-search-algolia@npm:3.2.1" dependencies: "@docsearch/react": ^3.5.2 - "@docusaurus/core": 3.1.1 - "@docusaurus/logger": 3.1.1 - "@docusaurus/plugin-content-docs": 3.1.1 - "@docusaurus/theme-common": 3.1.1 - "@docusaurus/theme-translations": 3.1.1 - "@docusaurus/utils": 3.1.1 - "@docusaurus/utils-validation": 3.1.1 + "@docusaurus/core": 3.2.1 + "@docusaurus/logger": 3.2.1 + "@docusaurus/plugin-content-docs": 3.2.1 + "@docusaurus/theme-common": 3.2.1 + "@docusaurus/theme-translations": 3.2.1 + "@docusaurus/utils": 3.2.1 + "@docusaurus/utils-validation": 3.2.1 algoliasearch: ^4.18.0 algoliasearch-helper: ^3.13.3 clsx: ^2.0.0 @@ -2146,23 +2146,23 @@ __metadata: peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - checksum: 42686e29faf14c482161eb399b1bc9960322f61298b2e6694d1b89374b2f4c352147b2299cf830abb0db8a9eba0bf5d342adfd1ad71101d1aad17f0955856145 + checksum: befbb86bf309f2b770ae21bc1d5c91eb6e840a5a72858cdfd3b21dbabadd1738d6d427ada7745f9d3424bb1a6e01839e20bf35c15a4c13d59b63d259e52de5df languageName: node linkType: hard -"@docusaurus/theme-translations@npm:3.1.1": - version: 3.1.1 - resolution: "@docusaurus/theme-translations@npm:3.1.1" +"@docusaurus/theme-translations@npm:3.2.1": + version: 3.2.1 + resolution: "@docusaurus/theme-translations@npm:3.2.1" dependencies: fs-extra: ^11.1.1 tslib: ^2.6.0 - checksum: 4fbf12aef4b6e49182b5fd6ee0c357b4cd1811490713a7cddeb7714eacebf1972dac10f3bb4ee56f6c5e62c297a9a7a17f4e3724e56ad28fa8125073e0c3258e + checksum: 43bdb90d143576d2e8eb56bfe2c9daa0e4250cdb2dcfd10096b86466e6ee253548ac5ef2f9a4986a5bc9a573d118fe4695ee5004f0ef00b57b720dac7f124337 languageName: node linkType: hard -"@docusaurus/types@npm:3.1.1": - version: 3.1.1 - resolution: "@docusaurus/types@npm:3.1.1" +"@docusaurus/types@npm:3.2.1": + version: 3.2.1 + resolution: "@docusaurus/types@npm:3.2.1" dependencies: "@mdx-js/mdx": ^3.0.0 "@types/history": ^4.7.11 @@ -2176,13 +2176,13 @@ __metadata: peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - checksum: 5041bca00cc887cc3ac8dd8c0895cc778dced2943b2d026fe7d1b8828756257093ad3df05706f344e91710b054f9df0e56d2d369a448472ec173bd81c4a8956f + checksum: 4f19e162bff627675df160ae5c33c6063646050c4de5c9698018fbd9d198300b9ce7a7333e4d1b369b42cfa42296dc9fb36547e4e37664d594deb08639e6b620 languageName: node linkType: hard -"@docusaurus/utils-common@npm:3.1.1": - version: 3.1.1 - resolution: "@docusaurus/utils-common@npm:3.1.1" +"@docusaurus/utils-common@npm:3.2.1": + version: 3.2.1 + resolution: "@docusaurus/utils-common@npm:3.2.1" dependencies: tslib: ^2.6.0 peerDependencies: @@ -2190,28 +2190,30 @@ __metadata: peerDependenciesMeta: "@docusaurus/types": optional: true - checksum: 787d930456e4034f7f57186172ad5d214c2473d135ec8c12cf19af8fc64e87eb35a684137e8b813f61e224243c7e3d122c6c646cb20e12ef216048be6a817f44 + checksum: bc0b7e74bc29134dbdb7fbc2e8f9f39f0f460923a07d0ccd7f0542088e92c47faf06bdbd253b7ba2b9250b0869118a3b7bf3faa3a075a2a35f5f8545eb3345f2 languageName: node linkType: hard -"@docusaurus/utils-validation@npm:3.1.1": - version: 3.1.1 - resolution: "@docusaurus/utils-validation@npm:3.1.1" +"@docusaurus/utils-validation@npm:3.2.1": + version: 3.2.1 + resolution: "@docusaurus/utils-validation@npm:3.2.1" dependencies: - "@docusaurus/logger": 3.1.1 - "@docusaurus/utils": 3.1.1 + "@docusaurus/logger": 3.2.1 + "@docusaurus/utils": 3.2.1 + "@docusaurus/utils-common": 3.2.1 joi: ^17.9.2 js-yaml: ^4.1.0 tslib: ^2.6.0 - checksum: 57d348a4bb2ecac34d84676674c3dc78d6e2821487d5c8a0b9945cab7a4362db5ee2ad084e4bb031b5c4ea674c5136c35090abea2272f57f3b25473c3b1680de + checksum: c7b5142083c8e4798c7f6aa1f7a06bc2e93e8e08a8a7a2c5eaf24aa6939e12e401f180f02164764805c40ec0f7179479e0ee98a935c2cb77037ca73ab33d80fd languageName: node linkType: hard -"@docusaurus/utils@npm:3.1.1": - version: 3.1.1 - resolution: "@docusaurus/utils@npm:3.1.1" +"@docusaurus/utils@npm:3.2.1": + version: 3.2.1 + resolution: "@docusaurus/utils@npm:3.2.1" dependencies: - "@docusaurus/logger": 3.1.1 + "@docusaurus/logger": 3.2.1 + "@docusaurus/utils-common": 3.2.1 "@svgr/webpack": ^6.5.1 escape-string-regexp: ^4.0.0 file-loader: ^6.2.0 @@ -2223,6 +2225,7 @@ __metadata: js-yaml: ^4.1.0 lodash: ^4.17.21 micromatch: ^4.0.5 + prompts: ^2.4.2 resolve-pathname: ^3.0.0 shelljs: ^0.8.5 tslib: ^2.6.0 @@ -2233,7 +2236,7 @@ __metadata: peerDependenciesMeta: "@docusaurus/types": optional: true - checksum: 45c39767d1adcc793515109edcb6cfbecd9cf5f979d5dda95a729809b9c30f6288fa5adba757ce131b91b3d77ff24bb7e06ad1b0011d37b45be0035b76ed7ba3 + checksum: ea862b178e303b49e644e77a663df6e42909632022918b77dc1ee69c4de46dde3f210052b1063e96a820e1443141f70e44aa51372f2bf9cfde65e080ea639889 languageName: node linkType: hard @@ -2521,17 +2524,6 @@ __metadata: languageName: node linkType: hard -"@slorber/static-site-generator-webpack-plugin@npm:^4.0.7": - version: 4.0.7 - resolution: "@slorber/static-site-generator-webpack-plugin@npm:4.0.7" - dependencies: - eval: ^0.1.8 - p-map: ^4.0.0 - webpack-sources: ^3.2.2 - checksum: a1e1d8b22dd51059524993f3fdd6861db10eb950debc389e5dd650702287fa2004eace03e6bc8f25b977bd7bc01d76a50aa271cbb73c58a8ec558945d728f307 - languageName: node - linkType: hard - "@spotify/prettier-config@npm:^15.0.0": version: 15.0.0 resolution: "@spotify/prettier-config@npm:15.0.0" @@ -11731,7 +11723,7 @@ __metadata: languageName: node linkType: hard -"webpack-sources@npm:^3.2.2, webpack-sources@npm:^3.2.3": +"webpack-sources@npm:^3.2.3": version: 3.2.3 resolution: "webpack-sources@npm:3.2.3" checksum: 989e401b9fe3536529e2a99dac8c1bdc50e3a0a2c8669cbafad31271eadd994bc9405f88a3039cd2e29db5e6d9d0926ceb7a1a4e7409ece021fe79c37d9c4607 From b3c2c9f16a91642865a717ec5a40c7ce9e24160f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 6 Apr 2024 16:34:53 +0000 Subject: [PATCH 107/151] chore(deps): update dependency jest-date-mock to v1.0.9 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 836e2e31a3..c332ad1f3e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -31917,9 +31917,9 @@ __metadata: linkType: hard "jest-date-mock@npm:^1.0.8": - version: 1.0.8 - resolution: "jest-date-mock@npm:1.0.8" - checksum: 7b012870440b0df742d0b651435b91625dbbf02d916633a0c70c7deb5d5087f9aadc59847602312368826325909e70e95cd412896a0c9ee1d5ac382000bf5ef9 + version: 1.0.9 + resolution: "jest-date-mock@npm:1.0.9" + checksum: 4f8c4914348c59c4b3951577276dfea6f714fa24d032a774225f41288da1a191cfe14f95e1ba59dcc0db8cf1c9f7d3a1581b18ade6fc7b63118b04166a127c0a languageName: node linkType: hard From 56ce1b0a81182ce46c864a645c74c1be15d0e149 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 13 Apr 2024 16:51:30 +0200 Subject: [PATCH 108/151] scaffolder-backend-module-gitlap: remove use of jest-date-mock Signed-off-by: Patrik Oldsberg --- plugins/scaffolder-backend-module-gitlab/package.json | 3 +-- .../src/actions/createGitlabIssueAction.test.ts | 7 ++++--- yarn.lock | 8 -------- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/plugins/scaffolder-backend-module-gitlab/package.json b/plugins/scaffolder-backend-module-gitlab/package.json index ff23e39a9e..38f94193ea 100644 --- a/plugins/scaffolder-backend-module-gitlab/package.json +++ b/plugins/scaffolder-backend-module-gitlab/package.json @@ -60,7 +60,6 @@ "@backstage/backend-test-utils": "workspace:^", "@backstage/cli": "workspace:^", "@backstage/core-app-api": "workspace:^", - "@backstage/plugin-scaffolder-node-test-utils": "workspace:^", - "jest-date-mock": "^1.0.8" + "@backstage/plugin-scaffolder-node-test-utils": "workspace:^" } } diff --git a/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabIssueAction.test.ts b/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabIssueAction.test.ts index 7298a502b6..feea436a1e 100644 --- a/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabIssueAction.test.ts +++ b/plugins/scaffolder-backend-module-gitlab/src/actions/createGitlabIssueAction.test.ts @@ -18,7 +18,6 @@ import { createMockActionContext } from '@backstage/plugin-scaffolder-node-test- import { createGitlabIssueAction, IssueType } from './createGitlabIssueAction'; import { ConfigReader } from '@backstage/core-app-api'; import { ScmIntegrations } from '@backstage/integration'; -import { advanceTo, clear } from 'jest-date-mock'; const mockGitlabClient = { Issues: { @@ -36,11 +35,13 @@ jest.mock('@gitbeaker/rest', () => ({ describe('gitlab:issues:create', () => { beforeEach(() => { jest.clearAllMocks(); - advanceTo(new Date(1988, 5, 3, 12, 0, 0)); // Set the desired date and time + jest.useFakeTimers({ + now: new Date(1988, 5, 3, 12, 0, 0), + }); }); afterEach(() => { - clear(); // Reset the date mock after each test + jest.useRealTimers(); }); const config = new ConfigReader({ diff --git a/yarn.lock b/yarn.lock index c332ad1f3e..b03d2d78ef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8661,7 +8661,6 @@ __metadata: "@gitbeaker/core": ^35.8.0 "@gitbeaker/node": ^35.8.0 "@gitbeaker/rest": ^39.25.0 - jest-date-mock: ^1.0.8 luxon: ^3.0.0 yaml: ^2.0.0 zod: ^3.22.4 @@ -31916,13 +31915,6 @@ __metadata: languageName: node linkType: hard -"jest-date-mock@npm:^1.0.8": - version: 1.0.9 - resolution: "jest-date-mock@npm:1.0.9" - checksum: 4f8c4914348c59c4b3951577276dfea6f714fa24d032a774225f41288da1a191cfe14f95e1ba59dcc0db8cf1c9f7d3a1581b18ade6fc7b63118b04166a127c0a - languageName: node - linkType: hard - "jest-diff@npm:^29.2.0, jest-diff@npm:^29.7.0": version: 29.7.0 resolution: "jest-diff@npm:29.7.0" From f9fb95adae6cbb8112a3e6df70c4110934e45292 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 13 Apr 2024 15:01:40 +0000 Subject: [PATCH 109/151] chore(deps): update dependency @testing-library/react to v15.0.2 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 836e2e31a3..82c0b95df1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18058,8 +18058,8 @@ __metadata: linkType: hard "@testing-library/react@npm:^15.0.0": - version: 15.0.1 - resolution: "@testing-library/react@npm:15.0.1" + version: 15.0.2 + resolution: "@testing-library/react@npm:15.0.2" dependencies: "@babel/runtime": ^7.12.5 "@testing-library/dom": ^10.0.0 @@ -18067,7 +18067,7 @@ __metadata: peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - checksum: 9992087563279bc975e5be69c0d380ecee84eb9e5c5e474b8b01b95804477ecae0978c61ded15821335d926fec058ab6c23442150584b0f19bee72c561ad19b7 + checksum: 32be030a5540164403f3cd8d6f46ad907119b2bc0a0df43ce6b925cdd520d5003298d06af1ee94d7bd764f294d74e802b6509caf2cf10afc77e67407baa9c1fb languageName: node linkType: hard From 69b844be33b5ab78146f525632d23d5a8cad9b63 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 13 Apr 2024 15:03:59 +0000 Subject: [PATCH 110/151] fix(deps): update dependency graphql-voyager to v1.3.0 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 679 ++++++++++++++++-------------------------------------- 1 file changed, 196 insertions(+), 483 deletions(-) diff --git a/yarn.lock b/yarn.lock index 836e2e31a3..cbffddcb09 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3192,7 +3192,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.1, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.18.6, @babel/runtime@npm:^7.2.0, @babel/runtime@npm:^7.20.1, @babel/runtime@npm:^7.20.13, @babel/runtime@npm:^7.20.6, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.23.9, @babel/runtime@npm:^7.3.1, @babel/runtime@npm:^7.4.4, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.0, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.3, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": +"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.1, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.18.6, @babel/runtime@npm:^7.20.1, @babel/runtime@npm:^7.20.13, @babel/runtime@npm:^7.20.6, @babel/runtime@npm:^7.20.7, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.23.9, @babel/runtime@npm:^7.3.1, @babel/runtime@npm:^7.4.4, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.0, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.3, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": version: 7.24.4 resolution: "@babel/runtime@npm:7.24.4" dependencies: @@ -10729,7 +10729,7 @@ __metadata: languageName: node linkType: hard -"@emotion/babel-plugin@npm:^11.11.0": +"@emotion/babel-plugin@npm:^11.10.5, @emotion/babel-plugin@npm:^11.11.0": version: 11.11.0 resolution: "@emotion/babel-plugin@npm:11.11.0" dependencies: @@ -10748,7 +10748,7 @@ __metadata: languageName: node linkType: hard -"@emotion/cache@npm:^11.11.0": +"@emotion/cache@npm:^11.10.5, @emotion/cache@npm:^11.11.0": version: 11.11.0 resolution: "@emotion/cache@npm:11.11.0" dependencies: @@ -10784,7 +10784,7 @@ __metadata: languageName: node linkType: hard -"@emotion/is-prop-valid@npm:^1.1.0, @emotion/is-prop-valid@npm:^1.2.2": +"@emotion/is-prop-valid@npm:^1.1.0, @emotion/is-prop-valid@npm:^1.2.0, @emotion/is-prop-valid@npm:^1.2.2": version: 1.2.2 resolution: "@emotion/is-prop-valid@npm:1.2.2" dependencies: @@ -10807,6 +10807,30 @@ __metadata: languageName: node linkType: hard +"@emotion/react@npm:11.10.5": + version: 11.10.5 + resolution: "@emotion/react@npm:11.10.5" + dependencies: + "@babel/runtime": ^7.18.3 + "@emotion/babel-plugin": ^11.10.5 + "@emotion/cache": ^11.10.5 + "@emotion/serialize": ^1.1.1 + "@emotion/use-insertion-effect-with-fallbacks": ^1.0.0 + "@emotion/utils": ^1.2.0 + "@emotion/weak-memoize": ^0.3.0 + hoist-non-react-statics: ^3.3.1 + peerDependencies: + "@babel/core": ^7.0.0 + react: ">=16.8.0" + peerDependenciesMeta: + "@babel/core": + optional: true + "@types/react": + optional: true + checksum: 32b67b28e9b6d6c53b970072680697f04c2521441050bdeb19a1a7f0164af549b4dad39ff375eda1b6a3cf1cc86ba2c6fa55460ec040e6ebbca3e9ec58353cf7 + languageName: node + linkType: hard + "@emotion/react@npm:^11.10.5": version: 11.11.4 resolution: "@emotion/react@npm:11.11.4" @@ -10828,7 +10852,7 @@ __metadata: languageName: node linkType: hard -"@emotion/serialize@npm:^1.1.2, @emotion/serialize@npm:^1.1.3, @emotion/serialize@npm:^1.1.4": +"@emotion/serialize@npm:^1.1.1, @emotion/serialize@npm:^1.1.2, @emotion/serialize@npm:^1.1.3, @emotion/serialize@npm:^1.1.4": version: 1.1.4 resolution: "@emotion/serialize@npm:1.1.4" dependencies: @@ -10848,6 +10872,29 @@ __metadata: languageName: node linkType: hard +"@emotion/styled@npm:11.10.5": + version: 11.10.5 + resolution: "@emotion/styled@npm:11.10.5" + dependencies: + "@babel/runtime": ^7.18.3 + "@emotion/babel-plugin": ^11.10.5 + "@emotion/is-prop-valid": ^1.2.0 + "@emotion/serialize": ^1.1.1 + "@emotion/use-insertion-effect-with-fallbacks": ^1.0.0 + "@emotion/utils": ^1.2.0 + peerDependencies: + "@babel/core": ^7.0.0 + "@emotion/react": ^11.0.0-rc.0 + react: ">=16.8.0" + peerDependenciesMeta: + "@babel/core": + optional: true + "@types/react": + optional: true + checksum: 1cec5f6aeb227a7255141031e8594f38ad83902413472aae0a46c27e5f9769c01e23c1ad39adee408d8a2168a697464314d1a0c4f50b31a5d25ea506b2d7bbc8 + languageName: node + linkType: hard + "@emotion/styled@npm:^11.10.5": version: 11.11.5 resolution: "@emotion/styled@npm:11.11.5" @@ -10889,7 +10936,7 @@ __metadata: languageName: node linkType: hard -"@emotion/use-insertion-effect-with-fallbacks@npm:^1.0.1": +"@emotion/use-insertion-effect-with-fallbacks@npm:^1.0.0, @emotion/use-insertion-effect-with-fallbacks@npm:^1.0.1": version: 1.0.1 resolution: "@emotion/use-insertion-effect-with-fallbacks@npm:1.0.1" peerDependencies: @@ -10898,14 +10945,14 @@ __metadata: languageName: node linkType: hard -"@emotion/utils@npm:^1.2.1": +"@emotion/utils@npm:^1.2.0, @emotion/utils@npm:^1.2.1": version: 1.2.1 resolution: "@emotion/utils@npm:1.2.1" checksum: e0b44be0705b56b079c55faff93952150be69e79b660ae70ddd5b6e09fc40eb1319654315a9f34bb479d7f4ec94be6068c061abbb9e18b9778ae180ad5d97c73 languageName: node linkType: hard -"@emotion/weak-memoize@npm:^0.3.1": +"@emotion/weak-memoize@npm:^0.3.0, @emotion/weak-memoize@npm:^0.3.1": version: 0.3.1 resolution: "@emotion/weak-memoize@npm:0.3.1" checksum: b2be47caa24a8122622ea18cd2d650dbb4f8ad37b636dc41ed420c2e082f7f1e564ecdea68122b546df7f305b159bf5ab9ffee872abd0f052e687428459af594 @@ -11296,56 +11343,6 @@ __metadata: languageName: node linkType: hard -"@f/animate@npm:^1.0.1": - version: 1.0.1 - resolution: "@f/animate@npm:1.0.1" - dependencies: - "@f/elapsed-time": ^1.0.0 - "@f/raf": ^1.0.0 - "@f/tween": ^1.0.0 - checksum: 660b44d297b1a6e5e28c48438633e00ded40f8e51adb4bfb26fc809b60c8c056f567f2e61f4f842c8fd2cf8a85dffaa1c2502bd0963eb926135f2d66d9f997db - languageName: node - linkType: hard - -"@f/elapsed-time@npm:^1.0.0": - version: 1.0.0 - resolution: "@f/elapsed-time@npm:1.0.0" - dependencies: - "@f/timestamp": ^1.0.0 - checksum: 5934d24a667bae4e0089408aa362c0ee1503945adf73ca0ff0d09fed33d62d070f0323eb9a54f42c37bd0545330a0f63da13319f66cc89fef59b8917a3278b5f - languageName: node - linkType: hard - -"@f/map-obj@npm:^1.2.2": - version: 1.2.2 - resolution: "@f/map-obj@npm:1.2.2" - checksum: d67db6074e1daa7a3c0f8c2e54094bff48b54d11817fddc886631dd8a17586d0040e7116282a374cc1d3d643d05862d49a1062ea5b2d03b9069507c09ae888a4 - languageName: node - linkType: hard - -"@f/raf@npm:^1.0.0": - version: 1.0.3 - resolution: "@f/raf@npm:1.0.3" - checksum: 800344caf4c649c0bcdefd4febbf3f0eed96bb9b7e54b5bc6eebd7d781c9e6d98ba22fb39da41474080d97ac21916bd1e82051558b43dabcbbf410d2dd0899c1 - languageName: node - linkType: hard - -"@f/timestamp@npm:^1.0.0": - version: 1.0.0 - resolution: "@f/timestamp@npm:1.0.0" - checksum: 8c37acb40cf67952309a214be2ddfd5c4f6634a414efc47406e8d1c1624e74662f584f6b48f3382c742f256aea1537e730e74c6078e52be3a28d0624cc7306a0 - languageName: node - linkType: hard - -"@f/tween@npm:^1.0.0": - version: 1.0.1 - resolution: "@f/tween@npm:1.0.1" - dependencies: - "@f/map-obj": ^1.2.2 - checksum: e37155c43875becc9eca8425b8dc83e64a78fa327738b33fcb3946418369568aa77007ade39591991379187381da829702e5cb84729dd2a0bc3bb4b7c94e4f2b - languageName: node - linkType: hard - "@faker-js/faker@npm:5.5.3": version: 5.5.3 resolution: "@faker-js/faker@npm:5.5.3" @@ -12695,44 +12692,6 @@ __metadata: languageName: node linkType: hard -"@material-ui/core@npm:^3.9.3": - version: 3.9.4 - resolution: "@material-ui/core@npm:3.9.4" - dependencies: - "@babel/runtime": ^7.2.0 - "@material-ui/system": ^3.0.0-alpha.0 - "@material-ui/utils": ^3.0.0-alpha.2 - "@types/jss": ^9.5.6 - "@types/react-transition-group": ^2.0.8 - brcast: ^3.0.1 - classnames: ^2.2.5 - csstype: ^2.5.2 - debounce: ^1.1.0 - deepmerge: ^3.0.0 - dom-helpers: ^3.2.1 - hoist-non-react-statics: ^3.2.1 - is-plain-object: ^2.0.4 - jss: ^9.8.7 - jss-camel-case: ^6.0.0 - jss-default-unit: ^8.0.2 - jss-global: ^3.0.0 - jss-nested: ^6.0.1 - jss-props-sort: ^6.0.0 - jss-vendor-prefixer: ^7.0.0 - normalize-scroll-left: ^0.1.2 - popper.js: ^1.14.1 - prop-types: ^15.6.0 - react-event-listener: ^0.6.2 - react-transition-group: ^2.2.1 - recompose: 0.28.0 - 0.30.0 - warning: ^4.0.1 - peerDependencies: - react: ^16.3.0 - react-dom: ^16.3.0 - checksum: c3923bfba4ef4449fbdcd37712ec0d11393ffa396c575a05b5f9530ca1e714028882d39402eb6918dad49f2eb1c53b261cfd0f2dfed494c2dfd96ee335336b44 - languageName: node - linkType: hard - "@material-ui/core@npm:^4.12.2, @material-ui/core@npm:^4.12.4, @material-ui/core@npm:^4.9.13": version: 4.12.4 resolution: "@material-ui/core@npm:4.12.4" @@ -12911,21 +12870,6 @@ __metadata: languageName: node linkType: hard -"@material-ui/system@npm:^3.0.0-alpha.0": - version: 3.0.0-alpha.2 - resolution: "@material-ui/system@npm:3.0.0-alpha.2" - dependencies: - "@babel/runtime": ^7.2.0 - deepmerge: ^3.0.0 - prop-types: ^15.6.0 - warning: ^4.0.1 - peerDependencies: - react: ^16.3.0 - react-dom: ^16.3.0 - checksum: 3aacb8b4afe2a820844b90905cfcd86ab934108cd719f11713ee46f8a4da30cb8c50e86219e1440b3c6dd333a09d4123cd1990d9c51862c1d56ec2b36e4d7ded - languageName: node - linkType: hard - "@material-ui/system@npm:^4.12.2": version: 4.12.2 resolution: "@material-ui/system@npm:4.12.2" @@ -12969,20 +12913,6 @@ __metadata: languageName: node linkType: hard -"@material-ui/utils@npm:^3.0.0-alpha.2": - version: 3.0.0-alpha.3 - resolution: "@material-ui/utils@npm:3.0.0-alpha.3" - dependencies: - "@babel/runtime": ^7.2.0 - prop-types: ^15.6.0 - react-is: ^16.6.3 - peerDependencies: - react: ^16.3.0 - react-dom: ^16.3.0 - checksum: 589a16245338c374b604a793d9f7a05bd932c9710f78261e46176b74a61d5d308b3e36dab688988ee5177d689c53d9e9da4649eca009ea11d8aac948db27af50 - languageName: node - linkType: hard - "@material-ui/utils@npm:^4.11.2, @material-ui/utils@npm:^4.11.3, @material-ui/utils@npm:^4.7.1": version: 4.11.3 resolution: "@material-ui/utils@npm:4.11.3" @@ -13194,6 +13124,29 @@ __metadata: languageName: node linkType: hard +"@mui/base@npm:5.0.0-alpha.112": + version: 5.0.0-alpha.112 + resolution: "@mui/base@npm:5.0.0-alpha.112" + dependencies: + "@babel/runtime": ^7.20.7 + "@emotion/is-prop-valid": ^1.2.0 + "@mui/types": ^7.2.3 + "@mui/utils": ^5.11.2 + "@popperjs/core": ^2.11.6 + clsx: ^1.2.1 + prop-types: ^15.8.1 + react-is: ^18.2.0 + peerDependencies: + "@types/react": ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + react-dom: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: fd19240ac16859d62f057fd80261fc4e0dbc960a648b601bd7beaeb44b88c059f654b0989f33cea655ad61106832bffa0cd8446730c1be7671b6cde383dbce80 + languageName: node + linkType: hard + "@mui/base@npm:5.0.0-beta.40": version: 5.0.0-beta.40 resolution: "@mui/base@npm:5.0.0-beta.40" @@ -13216,13 +13169,92 @@ __metadata: languageName: node linkType: hard -"@mui/core-downloads-tracker@npm:^5.15.15": +"@mui/core-downloads-tracker@npm:^5.11.2, @mui/core-downloads-tracker@npm:^5.15.15": version: 5.15.15 resolution: "@mui/core-downloads-tracker@npm:5.15.15" checksum: 3e99a04e03f66d5fa5f0c23cdce0f9fa2331ba08c99a75dc2347ccaa1c6ed520153e04aaeb0d613c9dca099a3e6242558a6284c33d93f95cc65e3243b17860bc languageName: node linkType: hard +"@mui/icons-material@npm:5.11.0": + version: 5.11.0 + resolution: "@mui/icons-material@npm:5.11.0" + dependencies: + "@babel/runtime": ^7.20.6 + peerDependencies: + "@mui/material": ^5.0.0 + "@types/react": ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 764c1185b3432f0228f3c5217b0e218b10f106fa96d305dfc62c0ef5afd2a7a087b0d664fd0a8171282e195c18d3ee073d5f037901a2bed1a1519a70fbb0501c + languageName: node + linkType: hard + +"@mui/lab@npm:5.0.0-alpha.114": + version: 5.0.0-alpha.114 + resolution: "@mui/lab@npm:5.0.0-alpha.114" + dependencies: + "@babel/runtime": ^7.20.7 + "@mui/base": 5.0.0-alpha.112 + "@mui/system": ^5.11.2 + "@mui/types": ^7.2.3 + "@mui/utils": ^5.11.2 + clsx: ^1.2.1 + prop-types: ^15.8.1 + react-is: ^18.2.0 + peerDependencies: + "@emotion/react": ^11.5.0 + "@emotion/styled": ^11.3.0 + "@mui/material": ^5.0.0 + "@types/react": ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + react-dom: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + "@emotion/react": + optional: true + "@emotion/styled": + optional: true + "@types/react": + optional: true + checksum: 0b6441e7f7a69e2a6910f044ef2a222462a219f61e3a05c023484508e7f14a5fe6baeddf08b37bceab357c7cb0eed90324ac42ecd8e59a6eb6e1c801ea01504a + languageName: node + linkType: hard + +"@mui/material@npm:5.11.2": + version: 5.11.2 + resolution: "@mui/material@npm:5.11.2" + dependencies: + "@babel/runtime": ^7.20.7 + "@mui/base": 5.0.0-alpha.112 + "@mui/core-downloads-tracker": ^5.11.2 + "@mui/system": ^5.11.2 + "@mui/types": ^7.2.3 + "@mui/utils": ^5.11.2 + "@types/react-transition-group": ^4.4.5 + clsx: ^1.2.1 + csstype: ^3.1.1 + prop-types: ^15.8.1 + react-is: ^18.2.0 + react-transition-group: ^4.4.5 + peerDependencies: + "@emotion/react": ^11.5.0 + "@emotion/styled": ^11.3.0 + "@types/react": ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + react-dom: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + "@emotion/react": + optional: true + "@emotion/styled": + optional: true + "@types/react": + optional: true + checksum: 4f2baa4b4d8f7842b081e9e919172020f7055e33c24af36c5a458eac1a76ff3e896651fdf21daa523a68ac0bfb3670864c1b4dec9fae6d8fadf2b602f14f95ea + languageName: node + linkType: hard + "@mui/material@npm:^5.12.2": version: 5.15.15 resolution: "@mui/material@npm:5.15.15" @@ -13325,7 +13357,7 @@ __metadata: languageName: node linkType: hard -"@mui/system@npm:^5.15.15": +"@mui/system@npm:^5.11.2, @mui/system@npm:^5.15.15": version: 5.15.15 resolution: "@mui/system@npm:5.15.15" dependencies: @@ -13353,7 +13385,7 @@ __metadata: languageName: node linkType: hard -"@mui/types@npm:^7.2.14": +"@mui/types@npm:^7.2.14, @mui/types@npm:^7.2.3": version: 7.2.14 resolution: "@mui/types@npm:7.2.14" peerDependencies: @@ -13365,7 +13397,7 @@ __metadata: languageName: node linkType: hard -"@mui/utils@npm:^5.14.15, @mui/utils@npm:^5.15.14": +"@mui/utils@npm:^5.11.2, @mui/utils@npm:^5.14.15, @mui/utils@npm:^5.15.14": version: 5.15.14 resolution: "@mui/utils@npm:5.15.14" dependencies: @@ -14862,7 +14894,7 @@ __metadata: languageName: node linkType: hard -"@popperjs/core@npm:^2.11.8": +"@popperjs/core@npm:^2.11.6, @popperjs/core@npm:^2.11.8": version: 2.11.8 resolution: "@popperjs/core@npm:2.11.8" checksum: e5c69fdebf52a4012f6a1f14817ca8e9599cb1be73dd1387e1785e2ed5e5f0862ff817f420a87c7fc532add1f88a12e25aeb010ffcbdc98eace3d55ce2139cf0 @@ -19047,16 +19079,6 @@ __metadata: languageName: node linkType: hard -"@types/jss@npm:^9.5.6": - version: 9.5.8 - resolution: "@types/jss@npm:9.5.8" - dependencies: - csstype: ^2.0.0 - indefinite-observable: ^1.0.1 - checksum: 6e51707529a15f2f5ff94555ecb555d29427fd10c4f3d2d29474934292e365c2dfaa4ad30b2ab46946201cbca7f6e8df56513a22fc6ceca10a979db8338935c5 - languageName: node - linkType: hard - "@types/keyv@npm:*, @types/keyv@npm:^3.1.1": version: 3.1.4 resolution: "@types/keyv@npm:3.1.4" @@ -19555,16 +19577,7 @@ __metadata: languageName: node linkType: hard -"@types/react-transition-group@npm:^2.0.8": - version: 2.9.2 - resolution: "@types/react-transition-group@npm:2.9.2" - dependencies: - "@types/react": "*" - checksum: 6f30fffc221339de90bd3e999f32328618cfaedfcaa501603f5ddc5bed1c2dbaa0d51347c3a25e5f8fd3041c671aabd2b7bfbcad611a7636adcd9da4e0666fa5 - languageName: node - linkType: hard - -"@types/react-transition-group@npm:^4.2.0, @types/react-transition-group@npm:^4.4.10": +"@types/react-transition-group@npm:^4.2.0, @types/react-transition-group@npm:^4.4.10, @types/react-transition-group@npm:^4.4.5": version: 4.4.10 resolution: "@types/react-transition-group@npm:4.4.10" dependencies: @@ -22511,13 +22524,6 @@ __metadata: languageName: node linkType: hard -"brcast@npm:^3.0.1": - version: 3.0.2 - resolution: "brcast@npm:3.0.2" - checksum: 7abae42088c6ffad9ff9e0fc756607a1764e299d737b3007fa49a73a38b3fda1e51362713f645db7991878ca388de94942011188450324c3debd08509315fa94 - languageName: node - linkType: hard - "breakword@npm:^1.0.5": version: 1.0.5 resolution: "breakword@npm:1.0.5" @@ -23087,13 +23093,6 @@ __metadata: languageName: node linkType: hard -"change-emitter@npm:^0.1.2": - version: 0.1.6 - resolution: "change-emitter@npm:0.1.6" - checksum: 0ed494ba9901ca56ea6f942668fd294465c334a9a0981dca96da5aea5e387c0023a630d7c658c1b532d203db54c928ddca2564e434b4a8b7f6d39155d09db255 - languageName: node - linkType: hard - "char-regex@npm:^1.0.2": version: 1.0.2 resolution: "char-regex@npm:1.0.2" @@ -23398,17 +23397,6 @@ __metadata: languageName: node linkType: hard -"clipboard@npm:^2.0.4": - version: 2.0.11 - resolution: "clipboard@npm:2.0.11" - dependencies: - good-listener: ^1.2.2 - select: ^1.1.2 - tiny-emitter: ^2.0.0 - checksum: 413055a6038e43898e0e895216b58ed54fbf386f091cb00188875ef35b186cefbd258acdf4cb4b0ac87cbc00de936f41b45dde9fe1fd1a57f7babb28363b8748 - languageName: node - linkType: hard - "cliui@npm:7.0.4, cliui@npm:^7.0.2": version: 7.0.4 resolution: "cliui@npm:7.0.4" @@ -23851,9 +23839,9 @@ __metadata: languageName: node linkType: hard -"commonmark@npm:^0.29.0": - version: 0.29.3 - resolution: "commonmark@npm:0.29.3" +"commonmark@npm:0.30.0": + version: 0.30.0 + resolution: "commonmark@npm:0.30.0" dependencies: entities: ~2.0 mdurl: ~1.0.1 @@ -23861,7 +23849,7 @@ __metadata: string.prototype.repeat: ^0.2.0 bin: commonmark: bin/commonmark - checksum: 892b603aeffea6a04770ce24979fc4024d2d92ca6d5146353398faab15be980af6802f3d7b35357400b870e752a9f80b766fed5c09ca063a2951c8c26013876c + checksum: 39f05d6d0f471aa345487d45199809233f29f857630780fde23661356f1f31970f67328934895d3062e01524674785981837c3b6f4303b63d8c9bff8fa99ec83 languageName: node linkType: hard @@ -24250,13 +24238,6 @@ __metadata: languageName: node linkType: hard -"core-js@npm:^1.0.0": - version: 1.2.7 - resolution: "core-js@npm:1.2.7" - checksum: 0b76371bfa98708351cde580f9287e2360d2209920e738ae950ae74ad08639a2e063541020bf666c28778956fc356ed9fe56d962129c88a87a6a4a0612526c75 - languageName: node - linkType: hard - "core-js@npm:^2.4.0, core-js@npm:^2.5.0": version: 2.6.12 resolution: "core-js@npm:2.6.12" @@ -24709,15 +24690,6 @@ __metadata: languageName: node linkType: hard -"css-vendor@npm:^0.3.8": - version: 0.3.8 - resolution: "css-vendor@npm:0.3.8" - dependencies: - is-in-browser: ^1.0.2 - checksum: 0a2e0cd0d4adbfdb6236950e7f9697b8a9b294eb2ae7c95996a95d273d2a63316ce793cb4654ae048aa3c129327124d2a29aada9935a0c284f9cc341c2768c8a - languageName: node - linkType: hard - "css-vendor@npm:^2.0.8": version: 2.0.8 resolution: "css-vendor@npm:2.0.8" @@ -24852,17 +24824,17 @@ __metadata: languageName: node linkType: hard -"csstype@npm:^2.0.0, csstype@npm:^2.5.2, csstype@npm:^2.6.7": +"csstype@npm:^2.5.2, csstype@npm:^2.6.7": version: 2.6.21 resolution: "csstype@npm:2.6.21" checksum: 2ce8bc832375146eccdf6115a1f8565a27015b74cce197c35103b4494955e9516b246140425ad24103864076aa3e1257ac9bab25a06c8d931dd87a6428c9dccf languageName: node linkType: hard -"csstype@npm:^3.0.2, csstype@npm:^3.1.2, csstype@npm:^3.1.3": - version: 3.0.9 - resolution: "csstype@npm:3.0.9" - checksum: 199f9af7e673f9f188525c3102a329d637ff46c52f6385a4427ff5cb17adcb736189150170a7af7c5701d18d7704bdad130273f4aa7e44c6c4f9967e6115dc93 +"csstype@npm:^3.0.2, csstype@npm:^3.1.1, csstype@npm:^3.1.2, csstype@npm:^3.1.3": + version: 3.1.3 + resolution: "csstype@npm:3.1.3" + checksum: 8db785cc92d259102725b3c694ec0c823f5619a84741b5c7991b8ad135dfaa66093038a1cc63e03361a6cd28d122be48f2106ae72334e067dd619a51f49eddf7 languageName: node linkType: hard @@ -25220,7 +25192,7 @@ __metadata: languageName: node linkType: hard -"debounce@npm:^1.1.0, debounce@npm:^1.2.0": +"debounce@npm:^1.2.0": version: 1.2.1 resolution: "debounce@npm:1.2.1" checksum: 682a89506d9e54fb109526f4da255c5546102fbb8e3ae75eef3b04effaf5d4853756aee97475cd4650641869794e44f410eeb20ace2b18ea592287ab2038519e @@ -25396,13 +25368,6 @@ __metadata: languageName: node linkType: hard -"deepmerge@npm:^3.0.0": - version: 3.3.0 - resolution: "deepmerge@npm:3.3.0" - checksum: 4322195389e0170a0443c07b36add19b90249802c4b47b96265fdc5f5d8beddf491d5e50cbc5bfd65f85ccf76598173083863c202f5463b3b667aca8be75d5ac - languageName: node - linkType: hard - "deepmerge@npm:^4.2.2, deepmerge@npm:^4.3.1, deepmerge@npm:~4.3.0": version: 4.3.1 resolution: "deepmerge@npm:4.3.1" @@ -25536,13 +25501,6 @@ __metadata: languageName: node linkType: hard -"delegate@npm:^3.1.2": - version: 3.2.0 - resolution: "delegate@npm:3.2.0" - checksum: d943058fe05897228b158cbd1bab05164df28c8f54127873231d6b03b0a5acc1b3ee1f98ac70ccc9b79cd84aa47118a7de111fee2923753491583905069da27d - languageName: node - linkType: hard - "delegates@npm:^1.0.0": version: 1.0.0 resolution: "delegates@npm:1.0.0" @@ -25850,15 +25808,6 @@ __metadata: languageName: node linkType: hard -"dom-helpers@npm:^3.2.1, dom-helpers@npm:^3.4.0": - version: 3.4.0 - resolution: "dom-helpers@npm:3.4.0" - dependencies: - "@babel/runtime": ^7.1.2 - checksum: 58d9f1c4a96daf77eddc63ae1236b826e1cddd6db66bbf39b18d7e21896d99365b376593352d52a60969d67fa4a8dbef26adc1439fa2c1b355efa37cacbaf637 - languageName: node - linkType: hard - "dom-helpers@npm:^5.0.1": version: 5.1.4 resolution: "dom-helpers@npm:5.1.4" @@ -26287,7 +26236,7 @@ __metadata: languageName: node linkType: hard -"encoding@npm:^0.1.11, encoding@npm:^0.1.12, encoding@npm:^0.1.13": +"encoding@npm:^0.1.12, encoding@npm:^0.1.13": version: 0.1.13 resolution: "encoding@npm:0.1.13" dependencies: @@ -28219,21 +28168,6 @@ __metadata: languageName: node linkType: hard -"fbjs@npm:^0.8.1": - version: 0.8.18 - resolution: "fbjs@npm:0.8.18" - dependencies: - core-js: ^1.0.0 - isomorphic-fetch: ^2.1.1 - loose-envify: ^1.0.0 - object-assign: ^4.1.0 - promise: ^7.1.1 - setimmediate: ^1.0.5 - ua-parser-js: ^0.7.30 - checksum: 668731b946a765908c9cbe51d5160f973abb78004b3d122587c3e930e3e1ddcc0ce2b17f2a8637dc9d733e149aa580f8d3035a35cc2d3bc78b78f1b19aab90e2 - languageName: node - linkType: hard - "fbjs@npm:^3.0.0, fbjs@npm:^3.0.1": version: 3.0.4 resolution: "fbjs@npm:3.0.4" @@ -29375,15 +29309,6 @@ __metadata: languageName: node linkType: hard -"good-listener@npm:^1.2.2": - version: 1.2.2 - resolution: "good-listener@npm:1.2.2" - dependencies: - delegate: ^3.1.2 - checksum: f39fb82c4e41524f56104cfd2d7aef1a88e72f3f75139115fbdf98cc7d844e0c1b39218b2e83438c6188727bf904ed78c7f0f2feff67b32833bc3af7f0202b33 - languageName: node - linkType: hard - "google-auth-library@npm:^9.0.0, google-auth-library@npm:^9.6.3": version: 9.7.0 resolution: "google-auth-library@npm:9.7.0" @@ -29604,23 +29529,22 @@ __metadata: linkType: hard "graphql-voyager@npm:^1.0.0-rc.31": - version: 1.0.0-rc.31 - resolution: "graphql-voyager@npm:1.0.0-rc.31" + version: 1.3.0 + resolution: "graphql-voyager@npm:1.3.0" dependencies: - "@f/animate": ^1.0.1 - "@material-ui/core": ^3.9.3 - classnames: ^2.2.6 - clipboard: ^2.0.4 - commonmark: ^0.29.0 - lodash: ^4.17.10 - prop-types: ^15.7.2 - svg-pan-zoom: ^3.6.0 - viz.js: 2.1.2 + "@emotion/react": 11.10.5 + "@emotion/styled": 11.10.5 + "@mui/icons-material": 5.11.0 + "@mui/lab": 5.0.0-alpha.114 + "@mui/material": 5.11.2 + commonmark: 0.30.0 + lodash: 4.17.21 + svg-pan-zoom: 3.6.1 peerDependencies: - graphql: ">=14.0.0" - react: ">=15.4.2" - react-dom: ">=15.4.2" - checksum: 80e826eeb42d286540447723ea35a463a3a155287914a45e24b69f31617d8ca74c0c43bdaa64123bf4ed046e68f7e31feca7661c06288551040f3e5b96c48fed + graphql: ">=16.5.0" + react: ">=18.0.0" + react-dom: ">=18.0.0" + checksum: 664d8adb932e3d72189e24dfb09fe364cc0e2852ab615eddeac250d9b4a0e6130a5ea363aec87c516b3c134c070c4c15999ccedec89f57afd554e600c6d4ca34 languageName: node linkType: hard @@ -29961,14 +29885,7 @@ __metadata: languageName: node linkType: hard -"hoist-non-react-statics@npm:^2.3.1": - version: 2.5.5 - resolution: "hoist-non-react-statics@npm:2.5.5" - checksum: ee2d05e5c7e1398ad84a15b0327f66bd78f38a8e0015e852f954b36434e32eb7e942d5357505020a3a1147f247b165bf1e69d72393e3accab67cafdafeb86230 - languageName: node - linkType: hard - -"hoist-non-react-statics@npm:^3.0.0, hoist-non-react-statics@npm:^3.2.1, hoist-non-react-statics@npm:^3.3.0, hoist-non-react-statics@npm:^3.3.1, hoist-non-react-statics@npm:^3.3.2": +"hoist-non-react-statics@npm:^3.0.0, hoist-non-react-statics@npm:^3.3.0, hoist-non-react-statics@npm:^3.3.1, hoist-non-react-statics@npm:^3.3.2": version: 3.3.2 resolution: "hoist-non-react-statics@npm:3.3.2" dependencies: @@ -30358,7 +30275,7 @@ __metadata: languageName: node linkType: hard -"hyphenate-style-name@npm:^1.0.2, hyphenate-style-name@npm:^1.0.3": +"hyphenate-style-name@npm:^1.0.3": version: 1.0.3 resolution: "hyphenate-style-name@npm:1.0.3" checksum: e333f610e7cb32210861ff8c55f99582cdc39e4737903936a7eb61702c98f8db45f33d54f9d230221fabc4d321b2ab8382b8af50d24a1eba21916f2edddd7b85 @@ -30552,15 +30469,6 @@ __metadata: languageName: node linkType: hard -"indefinite-observable@npm:^1.0.1": - version: 1.0.2 - resolution: "indefinite-observable@npm:1.0.2" - dependencies: - symbol-observable: 1.2.0 - checksum: 69a337967f48fca18989f9d68ad98c7220ed9b499bf00330ff72669a9583cb7f8e82f801da10720f720edf1313f427c77ce793350bdc413c952cec8ce112fc12 - languageName: node - linkType: hard - "indent-string@npm:^4.0.0": version: 4.0.0 resolution: "indent-string@npm:4.0.0" @@ -31377,7 +31285,7 @@ __metadata: languageName: node linkType: hard -"is-stream@npm:^1.0.1, is-stream@npm:^1.1.0": +"is-stream@npm:^1.1.0": version: 1.1.0 resolution: "is-stream@npm:1.1.0" checksum: 063c6bec9d5647aa6d42108d4c59723d2bd4ae42135a2d4db6eadbd49b7ea05b750fd69d279e5c7c45cf9da753ad2c00d8978be354d65aa9f6bb434969c6a2ae @@ -31597,16 +31505,6 @@ __metadata: languageName: node linkType: hard -"isomorphic-fetch@npm:^2.1.1": - version: 2.2.1 - resolution: "isomorphic-fetch@npm:2.2.1" - dependencies: - node-fetch: ^1.0.1 - whatwg-fetch: ">=0.10.0" - checksum: bb5daa7c3785d6742f4379a81e55b549a469503f7c9bf9411b48592e86632cf5e8fe8ea878dba185c0f33eb7c510c23abdeb55aebfdf5d3c70f031ced68c5424 - languageName: node - linkType: hard - "isomorphic-form-data@npm:^2.0.0": version: 2.0.0 resolution: "isomorphic-form-data@npm:2.0.0" @@ -32927,46 +32825,6 @@ __metadata: languageName: node linkType: hard -"jss-camel-case@npm:^6.0.0": - version: 6.1.0 - resolution: "jss-camel-case@npm:6.1.0" - dependencies: - hyphenate-style-name: ^1.0.2 - peerDependencies: - jss: ^9.7.0 - checksum: f20ad892cddc30241b5127d648233b513ce57b2a6ed2f710cd995510f8d06e1418cd8f6e8e50dc6bd60b2e8a35159bfdeb40143938e0f2cdc19fd39279953789 - languageName: node - linkType: hard - -"jss-default-unit@npm:^8.0.2": - version: 8.0.2 - resolution: "jss-default-unit@npm:8.0.2" - peerDependencies: - jss: ^9.4.0 - checksum: 5277c5ccc3d56f5c137d6d65f0fc36d15eb22ef08b5949e887ee75e9f4f25197e25f2a99706b70a2828cee010fd8ed7484fb1bb2086fe327f2b24b1bdcc22abb - languageName: node - linkType: hard - -"jss-global@npm:^3.0.0": - version: 3.0.0 - resolution: "jss-global@npm:3.0.0" - peerDependencies: - jss: ^9.0.0 - checksum: e3fa80d8251ba5f183d9b0b4416d64e8f5d285cfdb595cc600daf1a1366b67bca573939bb71d98b6596bf4d6f2c95711cf53a358af3d63cd7945dbb434c6547b - languageName: node - linkType: hard - -"jss-nested@npm:^6.0.1": - version: 6.0.1 - resolution: "jss-nested@npm:6.0.1" - dependencies: - warning: ^3.0.0 - peerDependencies: - jss: ^9.0.0 - checksum: 437bdacc559be0b4b5bc1faa2bc77b5c6cf14733fefbf73a34bb7335786b9f08e4e79b3d73cf83b386959adcd8fa9d725877912e96d9a0921ed38baa1a69b8d9 - languageName: node - linkType: hard - "jss-plugin-camel-case@npm:^10.10.0, jss-plugin-camel-case@npm:^10.5.1": version: 10.10.0 resolution: "jss-plugin-camel-case@npm:10.10.0" @@ -33041,26 +32899,6 @@ __metadata: languageName: node linkType: hard -"jss-props-sort@npm:^6.0.0": - version: 6.0.0 - resolution: "jss-props-sort@npm:6.0.0" - peerDependencies: - jss: ^9.0.0 - checksum: 82a04f625a2f2b3a71b2fcb00b1ed0478137c83dc47c323d24c7ea88d08c9ea295b061f99cf264db133fef3435366d6da594724f7713e0415dc50b4eff2aeb53 - languageName: node - linkType: hard - -"jss-vendor-prefixer@npm:^7.0.0": - version: 7.0.0 - resolution: "jss-vendor-prefixer@npm:7.0.0" - dependencies: - css-vendor: ^0.3.8 - peerDependencies: - jss: ^9.0.0 - checksum: 8ec3608711833e79da7ccfffd8177e752f16093589fa28d3a24ec19e6588fbc6a07cc5cacf59ef4c111ab1d0fb72e07b88cb3444eb8c0c6ed4cc8107da984633 - languageName: node - linkType: hard - "jss@npm:10.10.0, jss@npm:^10.10.0, jss@npm:^10.5.1, jss@npm:~10.10.0": version: 10.10.0 resolution: "jss@npm:10.10.0" @@ -33073,17 +32911,6 @@ __metadata: languageName: node linkType: hard -"jss@npm:^9.8.7": - version: 9.8.7 - resolution: "jss@npm:9.8.7" - dependencies: - is-in-browser: ^1.1.3 - symbol-observable: ^1.1.0 - warning: ^3.0.0 - checksum: ebb264cc893fb8c17a0277875947f8f72e01f5be991bf7f61a39abb861e1276e75ee402fdd2be9ce827af839a1a08bd81ad86a4e108d57fd7d7ebb2361837a53 - languageName: node - linkType: hard - "jsx-ast-utils@npm:^2.4.1 || ^3.0.0, jsx-ast-utils@npm:^3.3.5": version: 3.3.5 resolution: "jsx-ast-utils@npm:3.3.5" @@ -36087,16 +35914,6 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:^1.0.1": - version: 1.7.3 - resolution: "node-fetch@npm:1.7.3" - dependencies: - encoding: ^0.1.11 - is-stream: ^1.0.1 - checksum: 3bb0528c05d541316ebe52770d71ee25a6dce334df4231fd55df41a644143e07f068637488c18a5b0c43f05041dbd3346752f9e19b50df50569a802484544d5b - languageName: node - linkType: hard - "node-fetch@npm:^2.6.0, node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.12, node-fetch@npm:^2.6.5, node-fetch@npm:^2.6.7, node-fetch@npm:^2.6.9, node-fetch@npm:^2.7.0": version: 2.7.0 resolution: "node-fetch@npm:2.7.0" @@ -36377,13 +36194,6 @@ __metadata: languageName: node linkType: hard -"normalize-scroll-left@npm:^0.1.2": - version: 0.1.2 - resolution: "normalize-scroll-left@npm:0.1.2" - checksum: 817d5a659ba6f14f458cd03a5a0f98ec2a9d7e6c63c160f2db164827b87bb77c0237752890a18d11054fe628907493c5f4d8914907585ec9fbba3de26d2a6815 - languageName: node - linkType: hard - "normalize-url@npm:^4.1.0": version: 4.5.1 resolution: "normalize-url@npm:4.5.1" @@ -38189,13 +37999,6 @@ __metadata: languageName: node linkType: hard -"popper.js@npm:^1.14.1": - version: 1.16.1 - resolution: "popper.js@npm:1.16.1" - checksum: c56ae5001ec50a77ee297a8061a0221d99d25c7348d2e6bcd3e45a0d0f32a1fd81bca29d46cb0d4bdf13efb77685bd6a0ce93f9eb3c608311a461f945fffedbe - languageName: node - linkType: hard - "portfinder@npm:1.0.28": version: 1.0.28 resolution: "portfinder@npm:1.0.28" @@ -38962,7 +38765,7 @@ __metadata: languageName: node linkType: hard -"prop-types@npm:15.x, prop-types@npm:^15.0.0, prop-types@npm:^15.5.10, prop-types@npm:^15.5.7, prop-types@npm:^15.5.8, prop-types@npm:^15.6.0, prop-types@npm:^15.6.2, prop-types@npm:^15.7.2, prop-types@npm:^15.8.1": +"prop-types@npm:15.x, prop-types@npm:^15.0.0, prop-types@npm:^15.5.10, prop-types@npm:^15.5.7, prop-types@npm:^15.5.8, prop-types@npm:^15.6.2, prop-types@npm:^15.7.2, prop-types@npm:^15.8.1": version: 15.8.1 resolution: "prop-types@npm:15.8.1" dependencies: @@ -39588,19 +39391,6 @@ __metadata: languageName: node linkType: hard -"react-event-listener@npm:^0.6.2": - version: 0.6.6 - resolution: "react-event-listener@npm:0.6.6" - dependencies: - "@babel/runtime": ^7.2.0 - prop-types: ^15.6.0 - warning: ^4.0.1 - peerDependencies: - react: ^16.3.0 - checksum: 0287e0ae8cbf0a4c03889ffc2b745f5494b3edea0f4667357d709f5646dd78c7289ce305b6f473ec6ac5789f8a937c86b7e543d0249f0bf787bccdb1eab7ecd0 - languageName: node - linkType: hard - "react-fast-compare@npm:^3.1.1": version: 3.2.0 resolution: "react-fast-compare@npm:3.2.0" @@ -39715,7 +39505,7 @@ __metadata: languageName: node linkType: hard -"react-is@npm:^16.10.2, react-is@npm:^16.12.0, react-is@npm:^16.13.1, react-is@npm:^16.6.3, react-is@npm:^16.7.0, react-is@npm:^16.8.0, react-is@npm:^16.8.6": +"react-is@npm:^16.10.2, react-is@npm:^16.12.0, react-is@npm:^16.13.1, react-is@npm:^16.7.0, react-is@npm:^16.8.0, react-is@npm:^16.8.6": version: 16.13.1 resolution: "react-is@npm:16.13.1" checksum: f7a19ac3496de32ca9ae12aa030f00f14a3d45374f1ceca0af707c831b2a6098ef0d6bdae51bd437b0a306d7f01d4677fcc8de7c0d331eb47ad0f46130e53c5f @@ -39751,7 +39541,7 @@ __metadata: languageName: node linkType: hard -"react-lifecycles-compat@npm:^3.0.2, react-lifecycles-compat@npm:^3.0.4": +"react-lifecycles-compat@npm:^3.0.4": version: 3.0.4 resolution: "react-lifecycles-compat@npm:3.0.4" checksum: a904b0fc0a8eeb15a148c9feb7bc17cec7ef96e71188280061fc340043fd6d8ee3ff233381f0e8f95c1cf926210b2c4a31f38182c8f35ac55057e453d6df204f @@ -40070,21 +39860,6 @@ __metadata: languageName: node linkType: hard -"react-transition-group@npm:^2.2.1": - version: 2.9.0 - resolution: "react-transition-group@npm:2.9.0" - dependencies: - dom-helpers: ^3.4.0 - loose-envify: ^1.4.0 - prop-types: ^15.6.2 - react-lifecycles-compat: ^3.0.4 - peerDependencies: - react: ">=15.0.0" - react-dom: ">=15.0.0" - checksum: d8c9e50aabdc2cfc324e5cdb0ad1c6eecb02e1c0cd007b26d5b30ccf49015e900683dd489348c71fba4055858308d9ba7019e0d37d0e8d37bd46ed098788f670 - languageName: node - linkType: hard - "react-transition-group@npm:^4.0.0, react-transition-group@npm:^4.4.0, react-transition-group@npm:^4.4.5": version: 4.4.5 resolution: "react-transition-group@npm:4.4.5" @@ -40387,22 +40162,6 @@ __metadata: languageName: node linkType: hard -"recompose@npm:0.28.0 - 0.30.0": - version: 0.30.0 - resolution: "recompose@npm:0.30.0" - dependencies: - "@babel/runtime": ^7.0.0 - change-emitter: ^0.1.2 - fbjs: ^0.8.1 - hoist-non-react-statics: ^2.3.1 - react-lifecycles-compat: ^3.0.2 - symbol-observable: ^1.0.4 - peerDependencies: - react: ^0.14.0 || ^15.0.0 || ^16.0.0 - checksum: 18e58252336d0628b22db1e38407d32e836648e6d5c9453ba37c9f8030138b3429ee3952b053a13b60311f8b60893b207a761466bb293083542db0cf317b7a41 - languageName: node - linkType: hard - "recursive-readdir@npm:^2.2.2": version: 2.2.3 resolution: "recursive-readdir@npm:2.2.3" @@ -41594,13 +41353,6 @@ __metadata: languageName: node linkType: hard -"select@npm:^1.1.2": - version: 1.1.2 - resolution: "select@npm:1.1.2" - checksum: 4346151e94f226ea6131e44e68e6d837f3fdee64831b756dd657cc0b02f4cb5107f867cb34a1d1216ab7737d0bf0645d44546afb030bbd8d64e891f5e4c4814e - languageName: node - linkType: hard - "selfsigned@npm:^2.0.0, selfsigned@npm:^2.4.1": version: 2.4.1 resolution: "selfsigned@npm:2.4.1" @@ -43299,7 +43051,7 @@ __metadata: languageName: node linkType: hard -"svg-pan-zoom@npm:^3.6.0": +"svg-pan-zoom@npm:3.6.1": version: 3.6.1 resolution: "svg-pan-zoom@npm:3.6.1" checksum: 500b99378d321315e1668067ef6a73af3f61f9adfab75a575b21d2d216cb446def61d60ad12265203463cca9bef56b090f00e48118fa9b7f0ffa1c691e4c1621 @@ -43422,7 +43174,7 @@ __metadata: languageName: node linkType: hard -"symbol-observable@npm:1.2.0, symbol-observable@npm:^1.0.4, symbol-observable@npm:^1.1.0": +"symbol-observable@npm:^1.0.4": version: 1.2.0 resolution: "symbol-observable@npm:1.2.0" checksum: 48ffbc22e3d75f9853b3ff2ae94a44d84f386415110aea5effc24d84c502e03a4a6b7a8f75ebaf7b585780bda34eb5d6da3121f826a6f93398429d30032971b6 @@ -43800,13 +43552,6 @@ __metadata: languageName: node linkType: hard -"tiny-emitter@npm:^2.0.0": - version: 2.1.0 - resolution: "tiny-emitter@npm:2.1.0" - checksum: fbcfb5145751a0e3b109507a828eb6d6d4501352ab7bb33eccef46e22e9d9ad3953158870a6966a59e57ab7c3f9cfac7cab8521db4de6a5e757012f4677df2dd - languageName: node - linkType: hard - "tiny-invariant@npm:^1.0.6, tiny-invariant@npm:^1.3.1": version: 1.3.1 resolution: "tiny-invariant@npm:1.3.1" @@ -45543,13 +45288,6 @@ __metadata: languageName: node linkType: hard -"viz.js@npm:2.1.2": - version: 2.1.2 - resolution: "viz.js@npm:2.1.2" - checksum: 299e5a8519a472e0e98197c5f39c0ca6f3f6c4642b6ae007ed888fea998d82455c7ae0118d09cb888bfd2c46ebe3b03d7ce321a4eef1c822a5f5719d3a6ef3bb - languageName: node - linkType: hard - "vlq@npm:^0.2.1": version: 0.2.3 resolution: "vlq@npm:0.2.3" @@ -45628,24 +45366,6 @@ __metadata: languageName: node linkType: hard -"warning@npm:^3.0.0": - version: 3.0.0 - resolution: "warning@npm:3.0.0" - dependencies: - loose-envify: ^1.0.0 - checksum: c9f99a12803aab81b29858e7dc3415bf98b41baee3a4c3acdeb680d98c47b6e17490f1087dccc54432deed5711a5ce0ebcda2b27e9b5eb054c32ae50acb4419c - languageName: node - linkType: hard - -"warning@npm:^4.0.1": - version: 4.0.3 - resolution: "warning@npm:4.0.3" - dependencies: - loose-envify: ^1.0.0 - checksum: 4f2cb6a9575e4faf71ddad9ad1ae7a00d0a75d24521c193fa464f30e6b04027bd97aa5d9546b0e13d3a150ab402eda216d59c1d0f2d6ca60124d96cd40dfa35c - languageName: node - linkType: hard - "watchpack@npm:^2.4.1": version: 2.4.1 resolution: "watchpack@npm:2.4.1" @@ -45899,13 +45619,6 @@ __metadata: languageName: node linkType: hard -"whatwg-fetch@npm:>=0.10.0": - version: 3.6.19 - resolution: "whatwg-fetch@npm:3.6.19" - checksum: 2896bc9ca867ea514392c73e2a272f65d5c4916248fe0837a9df5b1b92f247047bc76cf7c29c28a01ac6c5fb4314021d2718958c8a08292a96d56f72b2f56806 - languageName: node - linkType: hard - "whatwg-mimetype@npm:^2.3.0": version: 2.3.0 resolution: "whatwg-mimetype@npm:2.3.0" From 064534d84df020615de52ca177d67bd1f40bb512 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 13 Apr 2024 17:10:14 +0200 Subject: [PATCH 111/151] microsite: add name for inline yaml loader plugin Signed-off-by: Patrik Oldsberg --- microsite/docusaurus.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/microsite/docusaurus.config.js b/microsite/docusaurus.config.js index 99be57788c..bea4b50e05 100644 --- a/microsite/docusaurus.config.js +++ b/microsite/docusaurus.config.js @@ -95,6 +95,7 @@ module.exports = { plugins: [ 'docusaurus-plugin-sass', () => ({ + name: 'yaml-loader', configureWebpack() { return { module: { From 2559302b944dfdf344dd9b068d4942e29646a21a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 13 Apr 2024 15:24:30 +0000 Subject: [PATCH 112/151] chore(deps): update dependency eslint-plugin-testing-library to v6.2.1 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index bb2b5cd6fb..268cb5e70a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -27073,13 +27073,13 @@ __metadata: linkType: hard "eslint-plugin-testing-library@npm:^6.0.0": - version: 6.2.0 - resolution: "eslint-plugin-testing-library@npm:6.2.0" + version: 6.2.1 + resolution: "eslint-plugin-testing-library@npm:6.2.1" dependencies: "@typescript-eslint/utils": ^5.58.0 peerDependencies: eslint: ^7.5.0 || ^8.0.0 - checksum: 7af7e0a1eee44c6ba65ce2ae99f8e46ce709a319f4cce778bb0af2dda5828d78f3a81e8989c7b691a8b9b9fef102b56136209aac700038b9e64794600b0d12db + checksum: 27c6aa32bfaba83f3d7c1477ebe75cd9ab414e8ecac8c10da18ed237fe6827df4ab1194addca7a259bfbdca1d929d88e93ed847c388f8882cbb83b84fb831e3f languageName: node linkType: hard From 1328adbcc0c4416fd81b30044339132b2f3bb850 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 13 Apr 2024 17:26:49 +0200 Subject: [PATCH 113/151] Update .changeset/tame-pianos-hunt.md Signed-off-by: Patrik Oldsberg --- .changeset/tame-pianos-hunt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/tame-pianos-hunt.md b/.changeset/tame-pianos-hunt.md index 2799a3a1da..74475291ef 100644 --- a/.changeset/tame-pianos-hunt.md +++ b/.changeset/tame-pianos-hunt.md @@ -1,5 +1,5 @@ --- -'@backstage/backend-common': minor +'@backstage/backend-common': patch --- Added `pullOptions` to `DockerContainerRunner#runContainer` method to pass down options when pulling an image. From 6d54d938ec32f85fc7cd1681e956562a7574cef0 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 13 Apr 2024 17:31:05 +0200 Subject: [PATCH 114/151] yarn.lock: stick to existing version of csstype Signed-off-by: Patrik Oldsberg --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index cbffddcb09..6de143347e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -24832,9 +24832,9 @@ __metadata: linkType: hard "csstype@npm:^3.0.2, csstype@npm:^3.1.1, csstype@npm:^3.1.2, csstype@npm:^3.1.3": - version: 3.1.3 - resolution: "csstype@npm:3.1.3" - checksum: 8db785cc92d259102725b3c694ec0c823f5619a84741b5c7991b8ad135dfaa66093038a1cc63e03361a6cd28d122be48f2106ae72334e067dd619a51f49eddf7 + version: 3.0.9 + resolution: "csstype@npm:3.0.9" + checksum: 199f9af7e673f9f188525c3102a329d637ff46c52f6385a4427ff5cb17adcb736189150170a7af7c5701d18d7704bdad130273f4aa7e44c6c4f9967e6115dc93 languageName: node linkType: hard From 7fb5021aeef20d2988a78f028569430fb96eb0e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Sat, 13 Apr 2024 17:59:55 +0200 Subject: [PATCH 115/151] feedback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- docs/auth/identity-resolver--old.md | 2 +- docs/auth/identity-resolver.md | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/auth/identity-resolver--old.md b/docs/auth/identity-resolver--old.md index c1a207484a..267f3e9d3c 100644 --- a/docs/auth/identity-resolver--old.md +++ b/docs/auth/identity-resolver--old.md @@ -9,7 +9,7 @@ This documentation is written for the old backend which has been replaced by [the new backend system](../backend-system/index.md), being the default since Backstage [version 1.24](../releases/v1.24.0.md). If have migrated to the new backend system, you may want to read [its own article](./identity-resolver.md) -instead. +instead. Also, check out [the migration docs](../backend-system/building-backends/08-migrating.md)! ::: By default, every Backstage auth provider is configured only for the use-case of diff --git a/docs/auth/identity-resolver.md b/docs/auth/identity-resolver.md index b09b47a572..39fc13fcb2 100644 --- a/docs/auth/identity-resolver.md +++ b/docs/auth/identity-resolver.md @@ -194,6 +194,13 @@ backend.add(import('@backstage/plugin-auth-backend-module-github-provider')); backend.add(customAuth); ``` +Check out [the naming patterns +article](../backend-system/architecture/07-naming-patterns.md) for what rules +apply regarding how to form valid IDs. In this example we also put the module +declaration directly in `packages/backend/src/index.ts` but that's just for +simplicity. You can place it anywhere you like, including in other packages, and +import from there if you prefer. + The `createOAuthProviderFactory` / `createProxyAuthProviderFactory` functions have additional options for profile and state transforms - not covered here, but good to know about if you need them. @@ -234,6 +241,13 @@ async signInResolver(info, ctx) { } ``` +If you throw an error in the sign in resolver function, the sign in attempt is +immediately rejected, and the error details are presented in the user interface. + +The `ctx` context [has several useful +functions](https://backstage.io/docs/reference/plugin-auth-node.authresolvercontext/) +for issuing tokens in various ways. + ### Custom Ownership Resolution If you want to have more control over the membership resolution and token generation From 068a68c87e4d0d72c09c4a55034c6baddec22fca Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Sat, 13 Apr 2024 17:15:10 +0100 Subject: [PATCH 116/151] refactor: cache key endpoint Signed-off-by: Timothy Deakin --- .../src/helpers.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/auth-backend-module-aws-alb-provider/src/helpers.ts b/plugins/auth-backend-module-aws-alb-provider/src/helpers.ts index 1af02ce9ec..e4bdf847c4 100644 --- a/plugins/auth-backend-module-aws-alb-provider/src/helpers.ts +++ b/plugins/auth-backend-module-aws-alb-provider/src/helpers.ts @@ -73,12 +73,16 @@ export const makeProfileInfo = ( const getPublicKeyEndpoint = (region: string) => { const commercialEndpoint = `https://public-keys.auth.elb.${encodeURIComponent( region, - )}.amazonaws.com/`; + )}.amazonaws.com`; const govEndpoint = `https://s3-${encodeURIComponent( region, - )}.amazonaws.com/aws-elb-public-keys-prod-${encodeURIComponent(region)}/`; + )}.amazonaws.com/aws-elb-public-keys-prod-${encodeURIComponent(region)}`; - return region.startsWith('us-gov') ? govEndpoint : commercialEndpoint; + if (region.startsWith('us-gov')) { + return govEndpoint; + } + + return commercialEndpoint; }; export const provisionKeyCache = (region: string, keyCache: NodeCache) => { @@ -92,7 +96,7 @@ export const provisionKeyCache = (region: string, keyCache: NodeCache) => { } const keyText: string = await fetch( - getPublicKeyEndpoint(region) + header.kid, + `${getPublicKeyEndpoint(region)}/${encodeURIComponent(header.kid)}`, ).then(response => response.text()); const keyValue = crypto.createPublicKey(keyText); From bb58c9adac7416e9e49c263f36e40d603a56a158 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 13 Apr 2024 16:15:18 +0000 Subject: [PATCH 117/151] fix(deps): update dependency @codemirror/view to v6.26.3 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 637ea72fa7..b38bdc416c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10620,13 +10620,13 @@ __metadata: linkType: hard "@codemirror/view@npm:^6.0.0, @codemirror/view@npm:^6.23.0": - version: 6.26.2 - resolution: "@codemirror/view@npm:6.26.2" + version: 6.26.3 + resolution: "@codemirror/view@npm:6.26.3" dependencies: "@codemirror/state": ^6.4.0 style-mod: ^4.1.0 w3c-keyname: ^2.2.4 - checksum: d996983362cce28e19094b9b9caccc4c136eb6bc42d673636d81c77064995ce93c5241af35e9236ef84fd8b4289c253c01280ce6f570a82ddc2432aebe458033 + checksum: fdee35fb5e0bbba7b6f1a9b43a865880911bbfafd30360da5dda21b35f81ba2d080ff66b6c3d94dbe946b6b7ec98a76208786360b8f030ef10bcb054b816de05 languageName: node linkType: hard From f8cc8ccaa777b9a9c19bb1322563dcec624117d7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 13 Apr 2024 16:16:07 +0000 Subject: [PATCH 118/151] fix(deps): update dependency @swc/helpers to v0.5.9 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 637ea72fa7..1f92a252a2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17864,11 +17864,11 @@ __metadata: linkType: hard "@swc/helpers@npm:^0.5.0": - version: 0.5.8 - resolution: "@swc/helpers@npm:0.5.8" + version: 0.5.9 + resolution: "@swc/helpers@npm:0.5.9" dependencies: tslib: ^2.4.0 - checksum: 001bb4ef9c59083fd4325e295f800b6ef61b8a2109424060a7dcc73b3c01c6ecbbf90a53db05fddf33025c301d1350e425798dc6d4ffc685f9b1051ad3177dae + checksum: ef2f076560711adbc37157e796046c358dc5c91716ce2ddc8d1a6d4a71e0769e145b28d1d1c7689c57d1087509b40646af84e15d623cade7ab653ebf50270bda languageName: node linkType: hard From 4273977a4e2b43d695b55510f019da7f5fa7c61d Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Sat, 13 Apr 2024 17:34:40 +0100 Subject: [PATCH 119/151] feat: add eslint rule for top level imports Signed-off-by: Timothy Deakin --- plugins/auth-react/.eslintrc.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/auth-react/.eslintrc.js b/plugins/auth-react/.eslintrc.js index e2a53a6ad2..e487f765b2 100644 --- a/plugins/auth-react/.eslintrc.js +++ b/plugins/auth-react/.eslintrc.js @@ -1 +1,5 @@ -module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, { + rules: { + '@backstage/no-top-level-material-ui-4-imports': 'error', + }, +}); From cdb5ffa62eaf07c8e8507b043483f8b3d35b18bc Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Sat, 13 Apr 2024 17:38:08 +0100 Subject: [PATCH 120/151] feat: add eslint rule for top level imports Signed-off-by: Timothy Deakin --- .changeset/smooth-spoons-repeat.md | 5 +++++ plugins/azure-sites/.eslintrc.js | 6 +++++- .../AzureSitesOverviewTable.tsx | 20 +++++++++---------- 3 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 .changeset/smooth-spoons-repeat.md diff --git a/.changeset/smooth-spoons-repeat.md b/.changeset/smooth-spoons-repeat.md new file mode 100644 index 0000000000..eec933d9c2 --- /dev/null +++ b/.changeset/smooth-spoons-repeat.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-azure-sites': patch +--- + +Added the `no-top-level-material-ui-4-imports` ESLint rule to aid with the migration to Material UI v5 diff --git a/plugins/azure-sites/.eslintrc.js b/plugins/azure-sites/.eslintrc.js index e2a53a6ad2..e487f765b2 100644 --- a/plugins/azure-sites/.eslintrc.js +++ b/plugins/azure-sites/.eslintrc.js @@ -1 +1,5 @@ -module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, { + rules: { + '@backstage/no-top-level-material-ui-4-imports': 'error', + }, +}); diff --git a/plugins/azure-sites/src/components/AzureSitesOverviewTableComponent/AzureSitesOverviewTable.tsx b/plugins/azure-sites/src/components/AzureSitesOverviewTableComponent/AzureSitesOverviewTable.tsx index c8afb1c6aa..6ba6fb0a3d 100644 --- a/plugins/azure-sites/src/components/AzureSitesOverviewTableComponent/AzureSitesOverviewTable.tsx +++ b/plugins/azure-sites/src/components/AzureSitesOverviewTableComponent/AzureSitesOverviewTable.tsx @@ -15,17 +15,15 @@ */ import React, { Dispatch, useEffect, useState } from 'react'; -import { - Box, - Card, - Chip, - IconButton, - LinearProgress, - Menu, - MenuItem, - Snackbar, - Tooltip, -} from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import Card from '@material-ui/core/Card'; +import Chip from '@material-ui/core/Chip'; +import IconButton from '@material-ui/core/IconButton'; +import LinearProgress from '@material-ui/core/LinearProgress'; +import Menu from '@material-ui/core/Menu'; +import MenuItem from '@material-ui/core/MenuItem'; +import Snackbar from '@material-ui/core/Snackbar'; +import Tooltip from '@material-ui/core/Tooltip'; import { default as MuiAlert } from '@material-ui/lab/Alert'; import { AzureSite, From 47dec6f564e735c779bf32f22928eaaac26391fd Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Sat, 13 Apr 2024 17:40:59 +0100 Subject: [PATCH 121/151] feat: add eslint rule for top level imports Signed-off-by: Timothy Deakin --- .changeset/fifty-jokes-guess.md | 5 +++++ plugins/catalog-react/.eslintrc.js | 1 + .../CatalogFilterLayout.tsx | 17 +++++++--------- .../EntityAutocompletePicker.tsx | 7 +++++-- .../EntityAutocompletePickerInput.tsx | 3 ++- .../EntityAutocompletePickerOption.tsx | 3 ++- .../EntityDisplayName/EntityDisplayName.tsx | 4 +++- .../EntityKindPicker/EntityKindPicker.tsx | 2 +- .../EntityLifecyclePicker.tsx | 2 +- .../EntityNamespacePicker.tsx | 2 +- .../EntityOwnerPicker/EntityOwnerPicker.tsx | 18 ++++++++--------- .../CardActionComponents/EmailCardAction.tsx | 2 +- .../EntityCardActions.tsx | 2 +- .../EntityPeekAheadPopover.test.tsx | 2 +- .../EntityPeekAheadPopover.tsx | 18 ++++++++--------- .../EntityProcessingStatusPicker.tsx | 16 +++++++-------- .../EntitySearchBar/EntitySearchBar.tsx | 14 ++++++------- .../components/EntityTable/EntityTable.tsx | 2 +- .../EntityTagPicker/EntityTagPicker.tsx | 2 +- .../EntityTypePicker/EntityTypePicker.tsx | 2 +- .../FavoriteEntity/FavoriteEntity.tsx | 4 +++- .../InspectEntityDialog.tsx | 20 +++++++++---------- .../components/AncestryPage.tsx | 4 +++- .../components/ColocatedPage.tsx | 12 +++++------ .../components/JsonPage.tsx | 2 +- .../components/OverviewPage.tsx | 18 ++++++++--------- .../InspectEntityDialog/components/common.tsx | 20 +++++++++---------- .../UnregisterEntityDialog.tsx | 20 +++++++++---------- .../UserListPicker/UserListPicker.tsx | 18 ++++++++--------- 29 files changed, 118 insertions(+), 124 deletions(-) create mode 100644 .changeset/fifty-jokes-guess.md diff --git a/.changeset/fifty-jokes-guess.md b/.changeset/fifty-jokes-guess.md new file mode 100644 index 0000000000..b79d9bb6d6 --- /dev/null +++ b/.changeset/fifty-jokes-guess.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-react': patch +--- + +Added the `no-top-level-material-ui-4-imports` ESLint rule to aid with the migration to Material UI v5 diff --git a/plugins/catalog-react/.eslintrc.js b/plugins/catalog-react/.eslintrc.js index 45bb6db521..157ee11e08 100644 --- a/plugins/catalog-react/.eslintrc.js +++ b/plugins/catalog-react/.eslintrc.js @@ -1,5 +1,6 @@ module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, { rules: { 'testing-library/prefer-screen-queries': 'error', + '@backstage/no-top-level-material-ui-4-imports': 'error', }, }); diff --git a/plugins/catalog-react/src/components/CatalogFilterLayout/CatalogFilterLayout.tsx b/plugins/catalog-react/src/components/CatalogFilterLayout/CatalogFilterLayout.tsx index 1a0c446c9e..7583520412 100644 --- a/plugins/catalog-react/src/components/CatalogFilterLayout/CatalogFilterLayout.tsx +++ b/plugins/catalog-react/src/components/CatalogFilterLayout/CatalogFilterLayout.tsx @@ -15,16 +15,13 @@ */ import React, { useState } from 'react'; -import { - Box, - Button, - Drawer, - Grid, - Theme, - Typography, - useMediaQuery, - useTheme, -} from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import Button from '@material-ui/core/Button'; +import Drawer from '@material-ui/core/Drawer'; +import Grid from '@material-ui/core/Grid'; +import Typography from '@material-ui/core/Typography'; +import useMediaQuery from '@material-ui/core/useMediaQuery'; +import { Theme, useTheme } from '@material-ui/core/styles'; import FilterListIcon from '@material-ui/icons/FilterList'; /** @public */ diff --git a/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx b/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx index 5e5bedaceb..d1c867e065 100644 --- a/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx +++ b/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx @@ -14,9 +14,12 @@ * limitations under the License. */ -import { Box, TextFieldProps, Typography, makeStyles } from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import { TextFieldProps } from '@material-ui/core/TextField'; +import Typography from '@material-ui/core/Typography'; +import { makeStyles } from '@material-ui/core/styles'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; -import { Autocomplete } from '@material-ui/lab'; +import Autocomplete from '@material-ui/lab/Autocomplete'; import React, { useEffect, useMemo, useState } from 'react'; import { useApi } from '@backstage/core-plugin-api'; import useAsync from 'react-use/esm/useAsync'; diff --git a/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePickerInput.tsx b/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePickerInput.tsx index 4140feae01..47ef76e8e2 100644 --- a/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePickerInput.tsx +++ b/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePickerInput.tsx @@ -13,7 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { makeStyles, TextField, TextFieldProps } from '@material-ui/core'; +import TextField, { TextFieldProps } from '@material-ui/core/TextField'; +import { makeStyles } from '@material-ui/core/styles'; import React from 'react'; import classnames from 'classnames'; diff --git a/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePickerOption.tsx b/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePickerOption.tsx index 8c218a352c..cffd0e678b 100644 --- a/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePickerOption.tsx +++ b/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePickerOption.tsx @@ -13,7 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Checkbox, FormControlLabel } from '@material-ui/core'; +import Checkbox from '@material-ui/core/Checkbox'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import CheckBoxIcon from '@material-ui/icons/CheckBox'; import CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank'; import React, { memo } from 'react'; diff --git a/plugins/catalog-react/src/components/EntityDisplayName/EntityDisplayName.tsx b/plugins/catalog-react/src/components/EntityDisplayName/EntityDisplayName.tsx index de55f46391..e953f21afb 100644 --- a/plugins/catalog-react/src/components/EntityDisplayName/EntityDisplayName.tsx +++ b/plugins/catalog-react/src/components/EntityDisplayName/EntityDisplayName.tsx @@ -15,7 +15,9 @@ */ import { CompoundEntityRef, Entity } from '@backstage/catalog-model'; -import { Box, Theme, Tooltip, makeStyles } from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import Tooltip from '@material-ui/core/Tooltip'; +import { Theme, makeStyles } from '@material-ui/core/styles'; import React from 'react'; import { useEntityPresentation } from '../../apis'; diff --git a/plugins/catalog-react/src/components/EntityKindPicker/EntityKindPicker.tsx b/plugins/catalog-react/src/components/EntityKindPicker/EntityKindPicker.tsx index 65ec949b4a..d2fd83fca0 100644 --- a/plugins/catalog-react/src/components/EntityKindPicker/EntityKindPicker.tsx +++ b/plugins/catalog-react/src/components/EntityKindPicker/EntityKindPicker.tsx @@ -16,7 +16,7 @@ import { Select } from '@backstage/core-components'; import { alertApiRef, useApi } from '@backstage/core-plugin-api'; -import { Box } from '@material-ui/core'; +import Box from '@material-ui/core/Box'; import React, { useEffect, useMemo, useState } from 'react'; import { EntityKindFilter } from '../../filters'; import { useEntityList } from '../../hooks'; diff --git a/plugins/catalog-react/src/components/EntityLifecyclePicker/EntityLifecyclePicker.tsx b/plugins/catalog-react/src/components/EntityLifecyclePicker/EntityLifecyclePicker.tsx index a1bd6ef86b..4ba6afec9d 100644 --- a/plugins/catalog-react/src/components/EntityLifecyclePicker/EntityLifecyclePicker.tsx +++ b/plugins/catalog-react/src/components/EntityLifecyclePicker/EntityLifecyclePicker.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import { makeStyles } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core/styles'; import React from 'react'; import { EntityLifecycleFilter } from '../../filters'; import { EntityAutocompletePicker } from '../EntityAutocompletePicker'; diff --git a/plugins/catalog-react/src/components/EntityNamespacePicker/EntityNamespacePicker.tsx b/plugins/catalog-react/src/components/EntityNamespacePicker/EntityNamespacePicker.tsx index 80ed42dfa3..7cb75060fa 100644 --- a/plugins/catalog-react/src/components/EntityNamespacePicker/EntityNamespacePicker.tsx +++ b/plugins/catalog-react/src/components/EntityNamespacePicker/EntityNamespacePicker.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import { makeStyles } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core/styles'; import React from 'react'; import { EntityNamespaceFilter } from '../../filters'; diff --git a/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx b/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx index abba751e28..88ff3945d1 100644 --- a/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx +++ b/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx @@ -19,19 +19,17 @@ import { parseEntityRef, stringifyEntityRef, } from '@backstage/catalog-model'; -import { - Box, - Checkbox, - FormControlLabel, - TextField, - Typography, - makeStyles, - Tooltip, -} from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import Checkbox from '@material-ui/core/Checkbox'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; +import TextField from '@material-ui/core/TextField'; +import Typography from '@material-ui/core/Typography'; +import Tooltip from '@material-ui/core/Tooltip'; +import { makeStyles } from '@material-ui/core/styles'; import CheckBoxIcon from '@material-ui/icons/CheckBox'; import CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; -import { Autocomplete } from '@material-ui/lab'; +import Autocomplete from '@material-ui/lab/Autocomplete'; import React, { useEffect, useMemo, useState } from 'react'; import { useEntityList } from '../../hooks/useEntityListProvider'; import { EntityOwnerFilter } from '../../filters'; diff --git a/plugins/catalog-react/src/components/EntityPeekAheadPopover/CardActionComponents/EmailCardAction.tsx b/plugins/catalog-react/src/components/EntityPeekAheadPopover/CardActionComponents/EmailCardAction.tsx index 16804426fb..6dab5e0347 100644 --- a/plugins/catalog-react/src/components/EntityPeekAheadPopover/CardActionComponents/EmailCardAction.tsx +++ b/plugins/catalog-react/src/components/EntityPeekAheadPopover/CardActionComponents/EmailCardAction.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import { IconButton } from '@material-ui/core'; +import IconButton from '@material-ui/core/IconButton'; import EmailIcon from '@material-ui/icons/Email'; import React from 'react'; import { Link } from '@backstage/core-components'; diff --git a/plugins/catalog-react/src/components/EntityPeekAheadPopover/CardActionComponents/EntityCardActions.tsx b/plugins/catalog-react/src/components/EntityPeekAheadPopover/CardActionComponents/EntityCardActions.tsx index 3f8f67c668..2f48ede943 100644 --- a/plugins/catalog-react/src/components/EntityPeekAheadPopover/CardActionComponents/EntityCardActions.tsx +++ b/plugins/catalog-react/src/components/EntityPeekAheadPopover/CardActionComponents/EntityCardActions.tsx @@ -15,7 +15,7 @@ */ import { entityRouteRef } from '../../../routes'; -import { IconButton } from '@material-ui/core'; +import IconButton from '@material-ui/core/IconButton'; import InfoIcon from '@material-ui/icons/Info'; import React from 'react'; import { useRouteRef } from '@backstage/core-plugin-api'; diff --git a/plugins/catalog-react/src/components/EntityPeekAheadPopover/EntityPeekAheadPopover.test.tsx b/plugins/catalog-react/src/components/EntityPeekAheadPopover/EntityPeekAheadPopover.test.tsx index d8bd8f11a6..41df859916 100644 --- a/plugins/catalog-react/src/components/EntityPeekAheadPopover/EntityPeekAheadPopover.test.tsx +++ b/plugins/catalog-react/src/components/EntityPeekAheadPopover/EntityPeekAheadPopover.test.tsx @@ -23,7 +23,7 @@ import { TestApiRegistry, renderInTestApp } from '@backstage/test-utils'; import { catalogApiRef } from '../../api'; import { Entity } from '@backstage/catalog-model'; import { CatalogApi } from '@backstage/catalog-client'; -import { Button } from '@material-ui/core'; +import Button from '@material-ui/core/Button'; import { entityRouteRef } from '../../routes'; const catalogApi: Partial = { diff --git a/plugins/catalog-react/src/components/EntityPeekAheadPopover/EntityPeekAheadPopover.tsx b/plugins/catalog-react/src/components/EntityPeekAheadPopover/EntityPeekAheadPopover.tsx index 41841e941f..64319b7621 100644 --- a/plugins/catalog-react/src/components/EntityPeekAheadPopover/EntityPeekAheadPopover.tsx +++ b/plugins/catalog-react/src/components/EntityPeekAheadPopover/EntityPeekAheadPopover.tsx @@ -23,16 +23,14 @@ import { bindPopover, usePopupState, } from 'material-ui-popup-state/hooks'; -import { - Box, - Card, - CardActions, - CardContent, - Chip, - makeStyles, - Tooltip, - Typography, -} from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import Card from '@material-ui/core/Card'; +import CardActions from '@material-ui/core/CardActions'; +import CardContent from '@material-ui/core/CardContent'; +import Chip from '@material-ui/core/Chip'; +import Tooltip from '@material-ui/core/Tooltip'; +import Typography from '@material-ui/core/Typography'; +import { makeStyles } from '@material-ui/core/styles'; import { useApiHolder } from '@backstage/core-plugin-api'; import { isGroupEntity, isUserEntity } from '@backstage/catalog-model'; import { Progress, ResponseErrorPanel } from '@backstage/core-components'; diff --git a/plugins/catalog-react/src/components/EntityProcessingStatusPicker/EntityProcessingStatusPicker.tsx b/plugins/catalog-react/src/components/EntityProcessingStatusPicker/EntityProcessingStatusPicker.tsx index e62fa7a6c7..f7de5d72b1 100644 --- a/plugins/catalog-react/src/components/EntityProcessingStatusPicker/EntityProcessingStatusPicker.tsx +++ b/plugins/catalog-react/src/components/EntityProcessingStatusPicker/EntityProcessingStatusPicker.tsx @@ -15,20 +15,18 @@ */ import { EntityErrorFilter, EntityOrphanFilter } from '../../filters'; -import { - Box, - Checkbox, - FormControlLabel, - makeStyles, - TextField, - Typography, -} from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import Checkbox from '@material-ui/core/Checkbox'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; +import TextField from '@material-ui/core/TextField'; +import Typography from '@material-ui/core/Typography'; +import { makeStyles } from '@material-ui/core/styles'; import CheckBoxIcon from '@material-ui/icons/CheckBox'; import CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; import React, { useState } from 'react'; import { useEntityList } from '../../hooks'; -import { Autocomplete } from '@material-ui/lab'; +import Autocomplete from '@material-ui/lab/Autocomplete'; /** @public */ export type CatalogReactEntityProcessingStatusPickerClassKey = 'input'; diff --git a/plugins/catalog-react/src/components/EntitySearchBar/EntitySearchBar.tsx b/plugins/catalog-react/src/components/EntitySearchBar/EntitySearchBar.tsx index a56119ac70..3f54441885 100644 --- a/plugins/catalog-react/src/components/EntitySearchBar/EntitySearchBar.tsx +++ b/plugins/catalog-react/src/components/EntitySearchBar/EntitySearchBar.tsx @@ -14,14 +14,12 @@ * limitations under the License. */ -import { - FormControl, - IconButton, - Input, - InputAdornment, - makeStyles, - Toolbar, -} from '@material-ui/core'; +import FormControl from '@material-ui/core/FormControl'; +import IconButton from '@material-ui/core/IconButton'; +import Input from '@material-ui/core/Input'; +import InputAdornment from '@material-ui/core/InputAdornment'; +import Toolbar from '@material-ui/core/Toolbar'; +import { makeStyles } from '@material-ui/core/styles'; import Clear from '@material-ui/icons/Clear'; import Search from '@material-ui/icons/Search'; import React, { useEffect, useMemo, useState } from 'react'; diff --git a/plugins/catalog-react/src/components/EntityTable/EntityTable.tsx b/plugins/catalog-react/src/components/EntityTable/EntityTable.tsx index 360f0ee1ac..d60a48c8db 100644 --- a/plugins/catalog-react/src/components/EntityTable/EntityTable.tsx +++ b/plugins/catalog-react/src/components/EntityTable/EntityTable.tsx @@ -15,7 +15,7 @@ */ import { Entity } from '@backstage/catalog-model'; -import { makeStyles } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core/styles'; import React, { ReactNode } from 'react'; import { columnFactories } from './columns'; import { componentEntityColumns, systemEntityColumns } from './presets'; diff --git a/plugins/catalog-react/src/components/EntityTagPicker/EntityTagPicker.tsx b/plugins/catalog-react/src/components/EntityTagPicker/EntityTagPicker.tsx index 0521bb49f8..242072b41d 100644 --- a/plugins/catalog-react/src/components/EntityTagPicker/EntityTagPicker.tsx +++ b/plugins/catalog-react/src/components/EntityTagPicker/EntityTagPicker.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import { makeStyles } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core/styles'; import React from 'react'; import { EntityTagFilter } from '../../filters'; import { EntityAutocompletePicker } from '../EntityAutocompletePicker/EntityAutocompletePicker'; diff --git a/plugins/catalog-react/src/components/EntityTypePicker/EntityTypePicker.tsx b/plugins/catalog-react/src/components/EntityTypePicker/EntityTypePicker.tsx index 3e641e8e37..c8c0a89f0f 100644 --- a/plugins/catalog-react/src/components/EntityTypePicker/EntityTypePicker.tsx +++ b/plugins/catalog-react/src/components/EntityTypePicker/EntityTypePicker.tsx @@ -15,7 +15,7 @@ */ import React, { useEffect } from 'react'; -import { Box } from '@material-ui/core'; +import Box from '@material-ui/core/Box'; import { useEntityTypeFilter } from '../../hooks/useEntityTypeFilter'; import { alertApiRef, useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/catalog-react/src/components/FavoriteEntity/FavoriteEntity.tsx b/plugins/catalog-react/src/components/FavoriteEntity/FavoriteEntity.tsx index 163d819a35..fd0a656317 100644 --- a/plugins/catalog-react/src/components/FavoriteEntity/FavoriteEntity.tsx +++ b/plugins/catalog-react/src/components/FavoriteEntity/FavoriteEntity.tsx @@ -15,7 +15,9 @@ */ import { Entity } from '@backstage/catalog-model'; -import { IconButton, Tooltip, withStyles } from '@material-ui/core'; +import IconButton from '@material-ui/core/IconButton'; +import Tooltip from '@material-ui/core/Tooltip'; +import { withStyles } from '@material-ui/core/styles'; import Star from '@material-ui/icons/Star'; import StarBorder from '@material-ui/icons/StarBorder'; import React, { ComponentProps } from 'react'; diff --git a/plugins/catalog-react/src/components/InspectEntityDialog/InspectEntityDialog.tsx b/plugins/catalog-react/src/components/InspectEntityDialog/InspectEntityDialog.tsx index bfb5fd4179..f155c3f164 100644 --- a/plugins/catalog-react/src/components/InspectEntityDialog/InspectEntityDialog.tsx +++ b/plugins/catalog-react/src/components/InspectEntityDialog/InspectEntityDialog.tsx @@ -15,17 +15,15 @@ */ import { Entity } from '@backstage/catalog-model'; -import { - Box, - Button, - Dialog, - DialogActions, - DialogContent, - DialogTitle, - makeStyles, - Tab, - Tabs, -} from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import Button from '@material-ui/core/Button'; +import Dialog from '@material-ui/core/Dialog'; +import DialogActions from '@material-ui/core/DialogActions'; +import DialogContent from '@material-ui/core/DialogContent'; +import DialogTitle from '@material-ui/core/DialogTitle'; +import Tab from '@material-ui/core/Tab'; +import Tabs from '@material-ui/core/Tabs'; +import { makeStyles } from '@material-ui/core/styles'; import React, { useEffect } from 'react'; import { AncestryPage } from './components/AncestryPage'; import { ColocatedPage } from './components/ColocatedPage'; diff --git a/plugins/catalog-react/src/components/InspectEntityDialog/components/AncestryPage.tsx b/plugins/catalog-react/src/components/InspectEntityDialog/components/AncestryPage.tsx index c68705a992..e08bac06e8 100644 --- a/plugins/catalog-react/src/components/InspectEntityDialog/components/AncestryPage.tsx +++ b/plugins/catalog-react/src/components/InspectEntityDialog/components/AncestryPage.tsx @@ -27,7 +27,9 @@ import { ResponseErrorPanel, } from '@backstage/core-components'; import { useApi, useApp, useRouteRef } from '@backstage/core-plugin-api'; -import { Box, DialogContentText, makeStyles } from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import DialogContentText from '@material-ui/core/DialogContentText'; +import { makeStyles } from '@material-ui/core/styles'; import classNames from 'classnames'; import React, { useLayoutEffect, useRef, useState } from 'react'; import { useNavigate } from 'react-router-dom'; diff --git a/plugins/catalog-react/src/components/InspectEntityDialog/components/ColocatedPage.tsx b/plugins/catalog-react/src/components/InspectEntityDialog/components/ColocatedPage.tsx index 76c86765e0..97bf0f3cb8 100644 --- a/plugins/catalog-react/src/components/InspectEntityDialog/components/ColocatedPage.tsx +++ b/plugins/catalog-react/src/components/InspectEntityDialog/components/ColocatedPage.tsx @@ -22,13 +22,11 @@ import { } from '@backstage/catalog-model'; import { Progress, ResponseErrorPanel } from '@backstage/core-components'; import { useApi } from '@backstage/core-plugin-api'; -import { - DialogContentText, - List, - ListItem, - makeStyles, -} from '@material-ui/core'; -import { Alert } from '@material-ui/lab'; +import DialogContentText from '@material-ui/core/DialogContentText'; +import List from '@material-ui/core/List'; +import ListItem from '@material-ui/core/ListItem'; +import { makeStyles } from '@material-ui/core/styles'; +import Alert from '@material-ui/lab/Alert'; import React from 'react'; import useAsync from 'react-use/esm/useAsync'; import { catalogApiRef } from '../../../api'; diff --git a/plugins/catalog-react/src/components/InspectEntityDialog/components/JsonPage.tsx b/plugins/catalog-react/src/components/InspectEntityDialog/components/JsonPage.tsx index 44dd626963..b6bda65229 100644 --- a/plugins/catalog-react/src/components/InspectEntityDialog/components/JsonPage.tsx +++ b/plugins/catalog-react/src/components/InspectEntityDialog/components/JsonPage.tsx @@ -16,7 +16,7 @@ import { Entity } from '@backstage/catalog-model'; import { CodeSnippet } from '@backstage/core-components'; -import { DialogContentText } from '@material-ui/core'; +import DialogContentText from '@material-ui/core/DialogContentText'; import React from 'react'; import { sortKeys } from './util'; diff --git a/plugins/catalog-react/src/components/InspectEntityDialog/components/OverviewPage.tsx b/plugins/catalog-react/src/components/InspectEntityDialog/components/OverviewPage.tsx index f4bd8d9f25..ad742459de 100644 --- a/plugins/catalog-react/src/components/InspectEntityDialog/components/OverviewPage.tsx +++ b/plugins/catalog-react/src/components/InspectEntityDialog/components/OverviewPage.tsx @@ -15,16 +15,14 @@ */ import { AlphaEntity } from '@backstage/catalog-model/alpha'; -import { - Box, - DialogContentText, - List, - ListItem, - ListItemIcon, - ListItemSecondaryAction, - makeStyles, - Typography, -} from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import DialogContentText from '@material-ui/core/DialogContentText'; +import List from '@material-ui/core/List'; +import ListItem from '@material-ui/core/ListItem'; +import ListItemIcon from '@material-ui/core/ListItemIcon'; +import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction'; +import Typography from '@material-ui/core/Typography'; +import { makeStyles } from '@material-ui/core/styles'; import groupBy from 'lodash/groupBy'; import sortBy from 'lodash/sortBy'; import React from 'react'; diff --git a/plugins/catalog-react/src/components/InspectEntityDialog/components/common.tsx b/plugins/catalog-react/src/components/InspectEntityDialog/components/common.tsx index d2bc6312dd..fa50c7585e 100644 --- a/plugins/catalog-react/src/components/InspectEntityDialog/components/common.tsx +++ b/plugins/catalog-react/src/components/InspectEntityDialog/components/common.tsx @@ -15,17 +15,15 @@ */ import { Link } from '@backstage/core-components'; -import { - Box, - Card, - CardContent, - ListItem, - ListItemIcon, - ListItemText as MuiListItemText, - ListSubheader as MuiListSubheader, - makeStyles, - Typography, -} from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import Card from '@material-ui/core/Card'; +import CardContent from '@material-ui/core/CardContent'; +import ListItem from '@material-ui/core/ListItem'; +import ListItemIcon from '@material-ui/core/ListItemIcon'; +import MuiListItemText from '@material-ui/core/ListItemText'; +import MuiListSubheader from '@material-ui/core/ListSubheader'; +import Typography from '@material-ui/core/Typography'; +import { makeStyles } from '@material-ui/core/styles'; import HelpOutlineIcon from '@material-ui/icons/HelpOutline'; import React from 'react'; diff --git a/plugins/catalog-react/src/components/UnregisterEntityDialog/UnregisterEntityDialog.tsx b/plugins/catalog-react/src/components/UnregisterEntityDialog/UnregisterEntityDialog.tsx index 56689c71ce..7f41badca5 100644 --- a/plugins/catalog-react/src/components/UnregisterEntityDialog/UnregisterEntityDialog.tsx +++ b/plugins/catalog-react/src/components/UnregisterEntityDialog/UnregisterEntityDialog.tsx @@ -16,17 +16,15 @@ import { Entity } from '@backstage/catalog-model'; import { EntityRefLink } from '../EntityRefLink'; -import { - Box, - Button, - Dialog, - DialogActions, - DialogContent, - DialogContentText, - DialogTitle, - Divider, - makeStyles, -} from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import Button from '@material-ui/core/Button'; +import Dialog from '@material-ui/core/Dialog'; +import DialogActions from '@material-ui/core/DialogActions'; +import DialogContent from '@material-ui/core/DialogContent'; +import DialogContentText from '@material-ui/core/DialogContentText'; +import DialogTitle from '@material-ui/core/DialogTitle'; +import Divider from '@material-ui/core/Divider'; +import { makeStyles } from '@material-ui/core/styles'; import Alert from '@material-ui/lab/Alert'; import React, { useCallback, useState } from 'react'; import { useUnregisterEntityDialogState } from './useUnregisterEntityDialogState'; diff --git a/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx b/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx index 950bf5ea70..1e46258885 100644 --- a/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx +++ b/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx @@ -19,16 +19,14 @@ import { IconComponent, useApi, } from '@backstage/core-plugin-api'; -import { - Card, - List, - ListItemIcon, - ListItemSecondaryAction, - ListItemText, - makeStyles, - MenuItem, - Typography, -} from '@material-ui/core'; +import Card from '@material-ui/core/Card'; +import List from '@material-ui/core/List'; +import ListItemIcon from '@material-ui/core/ListItemIcon'; +import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction'; +import ListItemText from '@material-ui/core/ListItemText'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { makeStyles } from '@material-ui/core/styles'; import SettingsIcon from '@material-ui/icons/Settings'; import StarIcon from '@material-ui/icons/Star'; import React, { Fragment, useEffect, useMemo, useState } from 'react'; From 72f0622ae8f52e026b34524e4ecb61e1b3550600 Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Sat, 13 Apr 2024 17:43:37 +0100 Subject: [PATCH 122/151] feat: add eslint rule for top level imports Signed-off-by: Timothy Deakin --- .changeset/cyan-chefs-promise.md | 5 +++ plugins/cicd-statistics/.eslintrc.js | 6 +++- .../src/charts/stage-chart.tsx | 12 +++---- .../src/charts/status-chart.tsx | 10 +++--- .../src/components/button-switch.tsx | 5 ++- .../src/components/chart-filters.tsx | 32 ++++++++----------- .../src/components/duration-slider.tsx | 2 +- .../cicd-statistics/src/components/label.tsx | 3 +- .../src/components/progress.tsx | 3 +- .../cicd-statistics/src/components/toggle.tsx | 3 +- plugins/cicd-statistics/src/entity-page.tsx | 5 +-- 11 files changed, 47 insertions(+), 39 deletions(-) create mode 100644 .changeset/cyan-chefs-promise.md diff --git a/.changeset/cyan-chefs-promise.md b/.changeset/cyan-chefs-promise.md new file mode 100644 index 0000000000..425bbecd4c --- /dev/null +++ b/.changeset/cyan-chefs-promise.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-cicd-statistics': patch +--- + +Added the `no-top-level-material-ui-4-imports` ESLint rule to aid with the migration to Material UI v5 diff --git a/plugins/cicd-statistics/.eslintrc.js b/plugins/cicd-statistics/.eslintrc.js index e2a53a6ad2..e487f765b2 100644 --- a/plugins/cicd-statistics/.eslintrc.js +++ b/plugins/cicd-statistics/.eslintrc.js @@ -1 +1,5 @@ -module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, { + rules: { + '@backstage/no-top-level-material-ui-4-imports': 'error', + }, +}); diff --git a/plugins/cicd-statistics/src/charts/stage-chart.tsx b/plugins/cicd-statistics/src/charts/stage-chart.tsx index ba3474153c..44cb17f2ab 100644 --- a/plugins/cicd-statistics/src/charts/stage-chart.tsx +++ b/plugins/cicd-statistics/src/charts/stage-chart.tsx @@ -30,13 +30,11 @@ import { ResponsiveContainer, } from 'recharts'; import Alert from '@material-ui/lab/Alert'; -import { - Accordion, - AccordionSummary, - AccordionDetails, - Grid, - Typography, -} from '@material-ui/core'; +import Accordion from '@material-ui/core/Accordion'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; +import AccordionDetails from '@material-ui/core/AccordionDetails'; +import Grid from '@material-ui/core/Grid'; +import Typography from '@material-ui/core/Typography'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; import { capitalize } from 'lodash'; diff --git a/plugins/cicd-statistics/src/charts/status-chart.tsx b/plugins/cicd-statistics/src/charts/status-chart.tsx index ffcdcef7dd..03325f1802 100644 --- a/plugins/cicd-statistics/src/charts/status-chart.tsx +++ b/plugins/cicd-statistics/src/charts/status-chart.tsx @@ -28,12 +28,10 @@ import { ResponsiveContainer, } from 'recharts'; import Alert from '@material-ui/lab/Alert'; -import { - Accordion, - AccordionSummary, - AccordionDetails, - Typography, -} from '@material-ui/core'; +import Accordion from '@material-ui/core/Accordion'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; +import AccordionDetails from '@material-ui/core/AccordionDetails'; +import Typography from '@material-ui/core/Typography'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; import { capitalize } from 'lodash'; diff --git a/plugins/cicd-statistics/src/components/button-switch.tsx b/plugins/cicd-statistics/src/components/button-switch.tsx index 65f55eee41..5c22bfbff2 100644 --- a/plugins/cicd-statistics/src/components/button-switch.tsx +++ b/plugins/cicd-statistics/src/components/button-switch.tsx @@ -15,7 +15,10 @@ */ import React, { useCallback, MouseEvent } from 'react'; -import { ButtonGroup, Button, Tooltip, Zoom } from '@material-ui/core'; +import ButtonGroup from '@material-ui/core/ButtonGroup'; +import Button from '@material-ui/core/Button'; +import Tooltip from '@material-ui/core/Tooltip'; +import Zoom from '@material-ui/core/Zoom'; export interface SwitchValueDetails { value: T; diff --git a/plugins/cicd-statistics/src/components/chart-filters.tsx b/plugins/cicd-statistics/src/components/chart-filters.tsx index 026e81fd74..72fec83592 100644 --- a/plugins/cicd-statistics/src/components/chart-filters.tsx +++ b/plugins/cicd-statistics/src/components/chart-filters.tsx @@ -15,26 +15,22 @@ */ import React, { useCallback, useState, useEffect, useMemo } from 'react'; -import { - Button, - Card, - CardHeader, - CardContent, - FormControl, - FormGroup, - FormControlLabel, - Grid, - Switch, - Tooltip, - Typography, - makeStyles, -} from '@material-ui/core'; +import Button from '@material-ui/core/Button'; +import Card from '@material-ui/core/Card'; +import CardHeader from '@material-ui/core/CardHeader'; +import CardContent from '@material-ui/core/CardContent'; +import FormControl from '@material-ui/core/FormControl'; +import FormGroup from '@material-ui/core/FormGroup'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; +import Grid from '@material-ui/core/Grid'; +import Switch from '@material-ui/core/Switch'; +import Tooltip from '@material-ui/core/Tooltip'; +import Typography from '@material-ui/core/Typography'; +import { makeStyles } from '@material-ui/core/styles'; import ShowChartIcon from '@material-ui/icons/ShowChart'; import BarChartIcon from '@material-ui/icons/BarChart'; -import { - MuiPickersUtilsProvider, - KeyboardDatePicker, -} from '@material-ui/pickers'; +import MuiPickersUtilsProvider from '@material-ui/pickers/MuiPickersUtilsProvider'; +import KeyboardDatePicker from '@material-ui/pickers/KeyboardDatePicker'; import { DateTime } from 'luxon'; import LuxonUtils from '@date-io/luxon'; diff --git a/plugins/cicd-statistics/src/components/duration-slider.tsx b/plugins/cicd-statistics/src/components/duration-slider.tsx index 6ba4fa88ce..22b13ed485 100644 --- a/plugins/cicd-statistics/src/components/duration-slider.tsx +++ b/plugins/cicd-statistics/src/components/duration-slider.tsx @@ -15,7 +15,7 @@ */ import React, { useCallback, useMemo, useState } from 'react'; -import { Slider } from '@material-ui/core'; +import Slider from '@material-ui/core/Slider'; import { debounce } from 'lodash'; import { formatDuration, formatDurationFromSeconds } from './utils'; diff --git a/plugins/cicd-statistics/src/components/label.tsx b/plugins/cicd-statistics/src/components/label.tsx index 1c9a05b303..51aa89ed21 100644 --- a/plugins/cicd-statistics/src/components/label.tsx +++ b/plugins/cicd-statistics/src/components/label.tsx @@ -15,7 +15,8 @@ */ import React, { PropsWithChildren } from 'react'; -import { Typography, makeStyles } from '@material-ui/core'; +import Typography from '@material-ui/core/Typography'; +import { makeStyles } from '@material-ui/core/styles'; export const useStyles = makeStyles( theme => ({ diff --git a/plugins/cicd-statistics/src/components/progress.tsx b/plugins/cicd-statistics/src/components/progress.tsx index 3045bb5eb1..932ce5c653 100644 --- a/plugins/cicd-statistics/src/components/progress.tsx +++ b/plugins/cicd-statistics/src/components/progress.tsx @@ -16,7 +16,8 @@ import React, { CSSProperties, DependencyList } from 'react'; import useAsync from 'react-use/esm/useAsync'; -import { Box, LinearProgress } from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import LinearProgress from '@material-ui/core/LinearProgress'; import Timeline from '@material-ui/lab/Timeline'; import TimelineItem from '@material-ui/lab/TimelineItem'; import TimelineSeparator from '@material-ui/lab/TimelineSeparator'; diff --git a/plugins/cicd-statistics/src/components/toggle.tsx b/plugins/cicd-statistics/src/components/toggle.tsx index 02f1941d85..039d8b1a58 100644 --- a/plugins/cicd-statistics/src/components/toggle.tsx +++ b/plugins/cicd-statistics/src/components/toggle.tsx @@ -15,7 +15,8 @@ */ import React, { useCallback, PropsWithChildren } from 'react'; -import { FormControlLabel, Switch } from '@material-ui/core'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; +import Switch from '@material-ui/core/Switch'; export interface ToggleProps { checked: boolean; diff --git a/plugins/cicd-statistics/src/entity-page.tsx b/plugins/cicd-statistics/src/entity-page.tsx index 25b8477f61..ae5dd2ca51 100644 --- a/plugins/cicd-statistics/src/entity-page.tsx +++ b/plugins/cicd-statistics/src/entity-page.tsx @@ -15,8 +15,9 @@ */ import React, { useCallback, useState, useMemo, useEffect } from 'react'; -import { Grid, makeStyles } from '@material-ui/core'; -import { Alert } from '@material-ui/lab'; +import Grid from '@material-ui/core/Grid'; +import { makeStyles } from '@material-ui/core/styles'; +import Alert from '@material-ui/lab/Alert'; import { useEntity } from '@backstage/plugin-catalog-react'; import { useApi, errorApiRef } from '@backstage/core-plugin-api'; import { DateTime } from 'luxon'; From c43315ae3074bd314c7a94a8e40281444e9bedc9 Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Sat, 13 Apr 2024 17:45:09 +0100 Subject: [PATCH 123/151] feat: add eslint rule for top level imports Signed-off-by: Timothy Deakin --- .changeset/wise-cougars-knock.md | 5 +++++ plugins/config-schema/.eslintrc.js | 6 +++++- .../ConfigSchemaPage/ConfigSchemaPage.tsx | 2 +- .../src/components/SchemaBrowser/SchemaBrowser.tsx | 6 ++++-- .../src/components/SchemaView/ArrayView.tsx | 3 ++- .../src/components/SchemaView/ChildView.tsx | 6 +++++- .../src/components/SchemaView/MatchView.tsx | 2 +- .../src/components/SchemaView/MetadataView.tsx | 14 ++++++-------- .../src/components/SchemaView/ObjectView.tsx | 3 ++- .../src/components/SchemaView/ScalarView.tsx | 3 ++- .../src/components/SchemaViewer/SchemaViewer.tsx | 3 ++- 11 files changed, 35 insertions(+), 18 deletions(-) create mode 100644 .changeset/wise-cougars-knock.md diff --git a/.changeset/wise-cougars-knock.md b/.changeset/wise-cougars-knock.md new file mode 100644 index 0000000000..f991df8f35 --- /dev/null +++ b/.changeset/wise-cougars-knock.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-config-schema': patch +--- + +Added the `no-top-level-material-ui-4-imports` ESLint rule to aid with the migration to Material UI v5 diff --git a/plugins/config-schema/.eslintrc.js b/plugins/config-schema/.eslintrc.js index e2a53a6ad2..e487f765b2 100644 --- a/plugins/config-schema/.eslintrc.js +++ b/plugins/config-schema/.eslintrc.js @@ -1 +1,5 @@ -module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, { + rules: { + '@backstage/no-top-level-material-ui-4-imports': 'error', + }, +}); diff --git a/plugins/config-schema/src/components/ConfigSchemaPage/ConfigSchemaPage.tsx b/plugins/config-schema/src/components/ConfigSchemaPage/ConfigSchemaPage.tsx index a8983a113c..d00de0e155 100644 --- a/plugins/config-schema/src/components/ConfigSchemaPage/ConfigSchemaPage.tsx +++ b/plugins/config-schema/src/components/ConfigSchemaPage/ConfigSchemaPage.tsx @@ -17,7 +17,7 @@ import React, { useMemo } from 'react'; import useObservable from 'react-use/esm/useObservable'; import { configSchemaApiRef } from '../../api'; import { SchemaViewer } from '../SchemaViewer'; -import { Typography } from '@material-ui/core'; +import Typography from '@material-ui/core/Typography'; import { Header, Page, Content, Progress } from '@backstage/core-components'; import { useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/config-schema/src/components/SchemaBrowser/SchemaBrowser.tsx b/plugins/config-schema/src/components/SchemaBrowser/SchemaBrowser.tsx index 73e4f15c0a..e794207c7b 100644 --- a/plugins/config-schema/src/components/SchemaBrowser/SchemaBrowser.tsx +++ b/plugins/config-schema/src/components/SchemaBrowser/SchemaBrowser.tsx @@ -14,10 +14,12 @@ * limitations under the License. */ -import { createStyles, alpha, withStyles } from '@material-ui/core'; +import alpha from '@material-ui/core/alpha'; +import { createStyles, withStyles } from '@material-ui/core/styles'; import ChevronRightIcon from '@material-ui/icons/ChevronRight'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; -import { TreeItem, TreeItemProps, TreeView } from '@material-ui/lab'; +import TreeItem, { TreeItemProps } from '@material-ui/core/TreeItem'; +import TreeView from '@material-ui/lab/TreeView'; import { Schema } from 'jsonschema'; import React, { ReactNode, useMemo, useRef } from 'react'; import { useScrollTargets } from '../ScrollTargetsContext'; diff --git a/plugins/config-schema/src/components/SchemaView/ArrayView.tsx b/plugins/config-schema/src/components/SchemaView/ArrayView.tsx index a75bb498a9..abe2cfc327 100644 --- a/plugins/config-schema/src/components/SchemaView/ArrayView.tsx +++ b/plugins/config-schema/src/components/SchemaView/ArrayView.tsx @@ -14,7 +14,8 @@ * limitations under the License. */ -import { Box, Typography } from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import Typography from '@material-ui/core/Typography'; import { Schema } from 'jsonschema'; import React from 'react'; import { ChildView } from './ChildView'; diff --git a/plugins/config-schema/src/components/SchemaView/ChildView.tsx b/plugins/config-schema/src/components/SchemaView/ChildView.tsx index dcb446db5a..b39e445688 100644 --- a/plugins/config-schema/src/components/SchemaView/ChildView.tsx +++ b/plugins/config-schema/src/components/SchemaView/ChildView.tsx @@ -15,7 +15,11 @@ */ import { JsonValue } from '@backstage/types'; -import { Box, Chip, Divider, makeStyles, Typography } from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import Chip from '@material-ui/core/Chip'; +import Divider from '@material-ui/core/Divider'; +import Typography from '@material-ui/core/Typography'; +import { makeStyles } from '@material-ui/core/styles'; import { Schema } from 'jsonschema'; import React, { useEffect, useRef } from 'react'; import { useScrollTargets } from '../ScrollTargetsContext/ScrollTargetsContext'; diff --git a/plugins/config-schema/src/components/SchemaView/MatchView.tsx b/plugins/config-schema/src/components/SchemaView/MatchView.tsx index 04004a09db..ba97ff9db5 100644 --- a/plugins/config-schema/src/components/SchemaView/MatchView.tsx +++ b/plugins/config-schema/src/components/SchemaView/MatchView.tsx @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Typography } from '@material-ui/core'; +import Typography from '@material-ui/core/Typography'; import { Schema } from 'jsonschema'; import React from 'react'; import { ChildView } from './ChildView'; diff --git a/plugins/config-schema/src/components/SchemaView/MetadataView.tsx b/plugins/config-schema/src/components/SchemaView/MetadataView.tsx index 157890ae6a..f3de041bed 100644 --- a/plugins/config-schema/src/components/SchemaView/MetadataView.tsx +++ b/plugins/config-schema/src/components/SchemaView/MetadataView.tsx @@ -15,14 +15,12 @@ */ import { JsonValue } from '@backstage/types'; -import { - Paper, - Table, - TableBody, - TableCell, - TableRow, - Typography, -} from '@material-ui/core'; +import Paper from '@material-ui/core/Paper'; +import Table from '@material-ui/core/Table'; +import TableBody from '@material-ui/core/TableBody'; +import TableCell from '@material-ui/core/TableCell'; +import TableRow from '@material-ui/core/TableRow'; +import Typography from '@material-ui/core/Typography'; import { Schema } from 'jsonschema'; import React from 'react'; diff --git a/plugins/config-schema/src/components/SchemaView/ObjectView.tsx b/plugins/config-schema/src/components/SchemaView/ObjectView.tsx index b60ba26c34..c7cf000e10 100644 --- a/plugins/config-schema/src/components/SchemaView/ObjectView.tsx +++ b/plugins/config-schema/src/components/SchemaView/ObjectView.tsx @@ -14,7 +14,8 @@ * limitations under the License. */ -import { Box, Typography } from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import Typography from '@material-ui/core/Typography'; import React from 'react'; import { ChildView } from './ChildView'; import { MetadataView } from './MetadataView'; diff --git a/plugins/config-schema/src/components/SchemaView/ScalarView.tsx b/plugins/config-schema/src/components/SchemaView/ScalarView.tsx index 4b10c77c74..aeea1c04d7 100644 --- a/plugins/config-schema/src/components/SchemaView/ScalarView.tsx +++ b/plugins/config-schema/src/components/SchemaView/ScalarView.tsx @@ -14,7 +14,8 @@ * limitations under the License. */ -import { Box, Typography } from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import Typography from '@material-ui/core/Typography'; import React from 'react'; import { MetadataView } from './MetadataView'; import { SchemaViewProps } from './types'; diff --git a/plugins/config-schema/src/components/SchemaViewer/SchemaViewer.tsx b/plugins/config-schema/src/components/SchemaViewer/SchemaViewer.tsx index 5cfd896593..80912d5428 100644 --- a/plugins/config-schema/src/components/SchemaViewer/SchemaViewer.tsx +++ b/plugins/config-schema/src/components/SchemaViewer/SchemaViewer.tsx @@ -14,7 +14,8 @@ * limitations under the License. */ -import { Box, Paper } from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import Paper from '@material-ui/core/Paper'; import { Schema } from 'jsonschema'; import React from 'react'; import { SchemaView } from '../SchemaView'; From 0874d39ca57a501d6544f3159e28b8c258e0139f Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Sat, 13 Apr 2024 17:46:56 +0100 Subject: [PATCH 124/151] feat: add eslint rule for top level imports Signed-off-by: Timothy Deakin --- .changeset/weak-files-admire.md | 5 +++++ plugins/example-todo-list/.eslintrc.js | 6 +++++- .../src/components/TodoList/TodoList.tsx | 2 +- .../components/TodoListPage/TodoListPage.tsx | 20 +++++++++---------- 4 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 .changeset/weak-files-admire.md diff --git a/.changeset/weak-files-admire.md b/.changeset/weak-files-admire.md new file mode 100644 index 0000000000..84f0033810 --- /dev/null +++ b/.changeset/weak-files-admire.md @@ -0,0 +1,5 @@ +--- +'@internal/plugin-todo-list': patch +--- + +Added the `no-top-level-material-ui-4-imports` ESLint rule to aid with the migration to Material UI v5 diff --git a/plugins/example-todo-list/.eslintrc.js b/plugins/example-todo-list/.eslintrc.js index e2a53a6ad2..e487f765b2 100644 --- a/plugins/example-todo-list/.eslintrc.js +++ b/plugins/example-todo-list/.eslintrc.js @@ -1 +1,5 @@ -module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, { + rules: { + '@backstage/no-top-level-material-ui-4-imports': 'error', + }, +}); diff --git a/plugins/example-todo-list/src/components/TodoList/TodoList.tsx b/plugins/example-todo-list/src/components/TodoList/TodoList.tsx index a8eb239e70..887dd68a84 100644 --- a/plugins/example-todo-list/src/components/TodoList/TodoList.tsx +++ b/plugins/example-todo-list/src/components/TodoList/TodoList.tsx @@ -22,7 +22,7 @@ import { fetchApiRef, useApi, } from '@backstage/core-plugin-api'; -import { Button } from '@material-ui/core'; +import Button from '@material-ui/core/Button'; export type Todo = { title: string; diff --git a/plugins/example-todo-list/src/components/TodoListPage/TodoListPage.tsx b/plugins/example-todo-list/src/components/TodoListPage/TodoListPage.tsx index 9185c37419..418ec61201 100644 --- a/plugins/example-todo-list/src/components/TodoListPage/TodoListPage.tsx +++ b/plugins/example-todo-list/src/components/TodoListPage/TodoListPage.tsx @@ -14,17 +14,15 @@ * limitations under the License. */ import React, { useReducer, useRef, useState } from 'react'; -import { - Typography, - Grid, - TextField, - Button, - Dialog, - Box, - DialogTitle, - DialogContent, - DialogActions, -} from '@material-ui/core'; +import Typography from '@material-ui/core/Typography'; +import Grid from '@material-ui/core/Grid'; +import TextField from '@material-ui/core/TextField'; +import Button from '@material-ui/core/Button'; +import Dialog from '@material-ui/core/Dialog'; +import Box from '@material-ui/core/Box'; +import DialogTitle from '@material-ui/core/DialogTitle'; +import DialogContent from '@material-ui/core/DialogContent'; +import DialogActions from '@material-ui/core/DialogActions'; import { Header, Page, From 76320a7eec186b143a4ba9a98eb255b560329444 Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Sat, 13 Apr 2024 17:50:41 +0100 Subject: [PATCH 125/151] feat: add eslint rule for top level imports Signed-off-by: Timothy Deakin --- .changeset/dirty-keys-provide.md | 5 +++ plugins/github-actions/.eslintrc.js | 6 +++- .../src/components/Cards/Cards.tsx | 4 ++- .../Cards/RecentWorkflowRunsCard.tsx | 2 +- .../WorkflowRunDetails/WorkflowRunDetails.tsx | 33 ++++++++--------- .../WorkflowRunLogs/WorkflowRunLogs.tsx | 20 +++++------ .../WorkflowRunsCard/WorkflowRunsCard.tsx | 35 +++++++++---------- .../WorkflowRunsTable/WorkflowRunsTable.tsx | 12 +++---- 8 files changed, 59 insertions(+), 58 deletions(-) create mode 100644 .changeset/dirty-keys-provide.md diff --git a/.changeset/dirty-keys-provide.md b/.changeset/dirty-keys-provide.md new file mode 100644 index 0000000000..54ee643b7b --- /dev/null +++ b/.changeset/dirty-keys-provide.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-github-actions': patch +--- + +Added the `no-top-level-material-ui-4-imports` ESLint rule to aid with the migration to Material UI v5 diff --git a/plugins/github-actions/.eslintrc.js b/plugins/github-actions/.eslintrc.js index e2a53a6ad2..e487f765b2 100644 --- a/plugins/github-actions/.eslintrc.js +++ b/plugins/github-actions/.eslintrc.js @@ -1 +1,5 @@ -module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, { + rules: { + '@backstage/no-top-level-material-ui-4-imports': 'error', + }, +}); diff --git a/plugins/github-actions/src/components/Cards/Cards.tsx b/plugins/github-actions/src/components/Cards/Cards.tsx index 0075e3f775..7ece9de6d6 100644 --- a/plugins/github-actions/src/components/Cards/Cards.tsx +++ b/plugins/github-actions/src/components/Cards/Cards.tsx @@ -15,7 +15,9 @@ */ import { useEntity } from '@backstage/plugin-catalog-react'; -import { LinearProgress, makeStyles, Typography } from '@material-ui/core'; +import LinearProgress from '@material-ui/core/LinearProgress'; +import Typography from '@material-ui/core/Typography'; +import { makeStyles } from '@material-ui/core/styles'; import ExternalLinkIcon from '@material-ui/icons/Launch'; import React, { useEffect } from 'react'; import { GITHUB_ACTIONS_ANNOTATION } from '../getProjectNameFromEntity'; diff --git a/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.tsx b/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.tsx index d48e4a6604..4a6ad92aa5 100644 --- a/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.tsx +++ b/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.tsx @@ -19,7 +19,7 @@ import { Link as RouterLink } from 'react-router-dom'; import { GITHUB_ACTIONS_ANNOTATION } from '../getProjectNameFromEntity'; import { useWorkflowRuns, WorkflowRun } from '../useWorkflowRuns'; import { WorkflowRunStatus } from '../WorkflowRunStatus'; -import { Typography } from '@material-ui/core'; +import Typography from '@material-ui/core/Typography'; import { errorApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api'; import { diff --git a/plugins/github-actions/src/components/WorkflowRunDetails/WorkflowRunDetails.tsx b/plugins/github-actions/src/components/WorkflowRunDetails/WorkflowRunDetails.tsx index 76ce8451e2..bf9ab96b73 100644 --- a/plugins/github-actions/src/components/WorkflowRunDetails/WorkflowRunDetails.tsx +++ b/plugins/github-actions/src/components/WorkflowRunDetails/WorkflowRunDetails.tsx @@ -15,24 +15,21 @@ */ import { Entity } from '@backstage/catalog-model'; -import { - Accordion, - AccordionDetails, - AccordionSummary, - Box, - CircularProgress, - LinearProgress, - ListItemText, - makeStyles, - Paper, - Table, - TableBody, - TableCell, - TableContainer, - TableRow, - Theme, - Typography, -} from '@material-ui/core'; +import Accordion from '@material-ui/core/Accordion'; +import AccordionDetails from '@material-ui/core/AccordionDetails'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; +import Box from '@material-ui/core/Box'; +import CircularProgress from '@material-ui/core/CircularProgress'; +import LinearProgress from '@material-ui/core/LinearProgress'; +import ListItemText from '@material-ui/core/ListItemText'; +import Paper from '@material-ui/core/Paper'; +import Table from '@material-ui/core/Table'; +import TableBody from '@material-ui/core/TableBody'; +import TableCell from '@material-ui/core/TableCell'; +import TableContainer from '@material-ui/core/TableContainer'; +import TableRow from '@material-ui/core/TableRow'; +import Typography from '@material-ui/core/Typography'; +import { makeStyles, Theme } from '@material-ui/core/styles'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; import ExternalLinkIcon from '@material-ui/icons/Launch'; import { DateTime } from 'luxon'; diff --git a/plugins/github-actions/src/components/WorkflowRunLogs/WorkflowRunLogs.tsx b/plugins/github-actions/src/components/WorkflowRunLogs/WorkflowRunLogs.tsx index c83da2efdd..c93956dd42 100644 --- a/plugins/github-actions/src/components/WorkflowRunLogs/WorkflowRunLogs.tsx +++ b/plugins/github-actions/src/components/WorkflowRunLogs/WorkflowRunLogs.tsx @@ -16,17 +16,15 @@ import { Entity } from '@backstage/catalog-model'; import { LogViewer } from '@backstage/core-components'; -import { - Accordion, - AccordionSummary, - CircularProgress, - Fade, - makeStyles, - Modal, - Tooltip, - Typography, - Zoom, -} from '@material-ui/core'; +import Accordion from '@material-ui/core/Accordion'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; +import CircularProgress from '@material-ui/core/CircularProgress'; +import Fade from '@material-ui/core/Fade'; +import Modal from '@material-ui/core/Modal'; +import Tooltip from '@material-ui/core/Tooltip'; +import Typography from '@material-ui/core/Typography'; +import Zoom from '@material-ui/core/Zoom'; +import { makeStyles } from '@material-ui/core/styles'; import DescriptionIcon from '@material-ui/icons/Description'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; import React from 'react'; diff --git a/plugins/github-actions/src/components/WorkflowRunsCard/WorkflowRunsCard.tsx b/plugins/github-actions/src/components/WorkflowRunsCard/WorkflowRunsCard.tsx index dc97720736..78ce154d09 100644 --- a/plugins/github-actions/src/components/WorkflowRunsCard/WorkflowRunsCard.tsx +++ b/plugins/github-actions/src/components/WorkflowRunsCard/WorkflowRunsCard.tsx @@ -14,24 +14,20 @@ * limitations under the License. */ import React, { ChangeEvent, useEffect, useState } from 'react'; -import { - Typography, - Box, - IconButton, - Tooltip, - Button, - Chip, - ButtonGroup, - Grid, - makeStyles, - createStyles, - Theme, - TablePagination, - Select, - MenuItem, - TextField, - CircularProgress, -} from '@material-ui/core'; +import Typography from '@material-ui/core/Typography'; +import Box from '@material-ui/core/Box'; +import IconButton from '@material-ui/core/IconButton'; +import Tooltip from '@material-ui/core/Tooltip'; +import Button from '@material-ui/core/Button'; +import Chip from '@material-ui/core/Chip'; +import ButtonGroup from '@material-ui/core/ButtonGroup'; +import Grid from '@material-ui/core/Grid'; +import TablePagination from '@material-ui/core/TablePagination'; +import Select from '@material-ui/core/Select'; +import MenuItem from '@material-ui/core/MenuItem'; +import TextField from '@material-ui/core/TextField'; +import CircularProgress from '@material-ui/core/CircularProgress'; +import { makeStyles, createStyles, Theme } from '@material-ui/core/styles'; import { EmptyState, Link, @@ -49,7 +45,8 @@ import { buildRouteRef } from '../../routes'; import { getProjectNameFromEntity } from '../getProjectNameFromEntity'; import { getHostnameFromEntity } from '../getHostnameFromEntity'; -import { Alert, Color } from '@material-ui/lab'; +import Alert from '@material-ui/lab/Alert'; +import Color from '@material-ui/lab/Color'; import { Entity } from '@backstage/catalog-model'; const useStyles = makeStyles((theme: Theme) => diff --git a/plugins/github-actions/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx b/plugins/github-actions/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx index bc4196957d..d67d547430 100644 --- a/plugins/github-actions/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx +++ b/plugins/github-actions/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx @@ -14,13 +14,11 @@ * limitations under the License. */ import React from 'react'; -import { - Typography, - Box, - IconButton, - Tooltip, - Button, -} from '@material-ui/core'; +import Typography from '@material-ui/core/Typography'; +import Box from '@material-ui/core/Box'; +import IconButton from '@material-ui/core/IconButton'; +import Tooltip from '@material-ui/core/Tooltip'; +import Button from '@material-ui/core/Button'; import RetryIcon from '@material-ui/icons/Replay'; import GitHubIcon from '@material-ui/icons/GitHub'; import { Link as RouterLink } from 'react-router-dom'; From d137034e6a28748b0aa3335c0757e8b04be44b06 Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Sat, 13 Apr 2024 17:55:22 +0100 Subject: [PATCH 126/151] feat: add eslint rule for top level imports Signed-off-by: Timothy Deakin --- .changeset/itchy-melons-battle.md | 5 +++++ plugins/graphiql/.eslintrc.js | 1 + .../src/components/GraphiQLBrowser/GraphiQLBrowser.tsx | 6 +++++- .../graphiql/src/components/GraphiQLPage/GraphiQLPage.tsx | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 .changeset/itchy-melons-battle.md diff --git a/.changeset/itchy-melons-battle.md b/.changeset/itchy-melons-battle.md new file mode 100644 index 0000000000..c853288250 --- /dev/null +++ b/.changeset/itchy-melons-battle.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-graphiql': patch +--- + +Added the `no-top-level-material-ui-4-imports` ESLint rule to aid with the migration to Material UI v5 diff --git a/plugins/graphiql/.eslintrc.js b/plugins/graphiql/.eslintrc.js index e358722664..33f17f6fca 100644 --- a/plugins/graphiql/.eslintrc.js +++ b/plugins/graphiql/.eslintrc.js @@ -1,5 +1,6 @@ module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, { rules: { 'jest/expect-expect': 0, + '@backstage/no-top-level-material-ui-4-imports': 'error', }, }); diff --git a/plugins/graphiql/src/components/GraphiQLBrowser/GraphiQLBrowser.tsx b/plugins/graphiql/src/components/GraphiQLBrowser/GraphiQLBrowser.tsx index cdd924a6d1..23743288d3 100644 --- a/plugins/graphiql/src/components/GraphiQLBrowser/GraphiQLBrowser.tsx +++ b/plugins/graphiql/src/components/GraphiQLBrowser/GraphiQLBrowser.tsx @@ -15,7 +15,11 @@ */ import React, { useState, Suspense } from 'react'; -import { Tabs, Tab, makeStyles, Typography, Divider } from '@material-ui/core'; +import Tabs from '@material-ui/core/Tabs'; +import Tab from '@material-ui/core/Tab'; +import Typography from '@material-ui/core/Typography'; +import Divider from '@material-ui/core/Divider'; +import { makeStyles } from '@material-ui/core/styles'; import 'graphiql/graphiql.css'; import { StorageBucket } from '../../lib/storage'; import { GraphQLEndpoint } from '../../lib/api'; diff --git a/plugins/graphiql/src/components/GraphiQLPage/GraphiQLPage.tsx b/plugins/graphiql/src/components/GraphiQLPage/GraphiQLPage.tsx index 34e84c32ce..0e5fece2f8 100644 --- a/plugins/graphiql/src/components/GraphiQLPage/GraphiQLPage.tsx +++ b/plugins/graphiql/src/components/GraphiQLPage/GraphiQLPage.tsx @@ -19,7 +19,7 @@ import useAsync from 'react-use/esm/useAsync'; import 'graphiql/graphiql.css'; import { graphQlBrowseApiRef } from '../../lib/api'; import { GraphiQLBrowser } from '../GraphiQLBrowser'; -import { Typography } from '@material-ui/core'; +import Typography from '@material-ui/core/Typography'; import { Content, Header, From 7a3789a41a3e5759ae49d93865b696291f50b8d7 Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Sat, 13 Apr 2024 17:58:25 +0100 Subject: [PATCH 127/151] feat: add eslint rule for top level imports Signed-off-by: Timothy Deakin --- .changeset/silver-pugs-bow.md | 5 +++++ plugins/ilert/.eslintrc.js | 1 + plugins/ilert/src/components/Alert/AlertActionsMenu.tsx | 5 ++++- plugins/ilert/src/components/Alert/AlertAssignModal.tsx | 2 +- plugins/ilert/src/components/Alert/AlertNewModal.tsx | 2 +- plugins/ilert/src/components/AlertsPage/StatusChip.tsx | 3 ++- .../components/Errors/MissingAuthorizationHeaderError.tsx | 2 +- plugins/ilert/src/components/Service/ServiceActionsMenu.tsx | 5 ++++- plugins/ilert/src/components/ServicesPage/StatusChip.tsx | 3 ++- plugins/ilert/src/components/Shift/ShiftOverrideModal.tsx | 5 +++-- .../src/components/StatusPage/StatusPageActionsMenu.tsx | 5 ++++- plugins/ilert/src/components/StatusPagePage/StatusChip.tsx | 3 ++- .../ilert/src/components/StatusPagePage/VisibilityChip.tsx | 3 ++- 13 files changed, 32 insertions(+), 12 deletions(-) create mode 100644 .changeset/silver-pugs-bow.md diff --git a/.changeset/silver-pugs-bow.md b/.changeset/silver-pugs-bow.md new file mode 100644 index 0000000000..6833d9c841 --- /dev/null +++ b/.changeset/silver-pugs-bow.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-ilert': patch +--- + +Added the `no-top-level-material-ui-4-imports` ESLint rule to aid with the migration to Material UI v5 diff --git a/plugins/ilert/.eslintrc.js b/plugins/ilert/.eslintrc.js index b4ec729b09..3fc43012b9 100644 --- a/plugins/ilert/.eslintrc.js +++ b/plugins/ilert/.eslintrc.js @@ -1,5 +1,6 @@ module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, { rules: { quotes: ['error', 'single'], + '@backstage/no-top-level-material-ui-4-imports': 'error', }, }); diff --git a/plugins/ilert/src/components/Alert/AlertActionsMenu.tsx b/plugins/ilert/src/components/Alert/AlertActionsMenu.tsx index ff20e39b24..6903a68b89 100644 --- a/plugins/ilert/src/components/Alert/AlertActionsMenu.tsx +++ b/plugins/ilert/src/components/Alert/AlertActionsMenu.tsx @@ -13,7 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { IconButton, Menu, MenuItem, Typography } from '@material-ui/core'; +import IconButton from '@material-ui/core/IconButton'; +import Menu from '@material-ui/core/Menu'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; import MoreVertIcon from '@material-ui/icons/MoreVert'; import React from 'react'; import { ilertApiRef } from '../../api'; diff --git a/plugins/ilert/src/components/Alert/AlertAssignModal.tsx b/plugins/ilert/src/components/Alert/AlertAssignModal.tsx index d1ecefafa1..1674b787d2 100644 --- a/plugins/ilert/src/components/Alert/AlertAssignModal.tsx +++ b/plugins/ilert/src/components/Alert/AlertAssignModal.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ import { alertApiRef, useApi } from '@backstage/core-plugin-api'; -import { Typography } from '@material-ui/core'; +import Typography from '@material-ui/core/Typography'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; diff --git a/plugins/ilert/src/components/Alert/AlertNewModal.tsx b/plugins/ilert/src/components/Alert/AlertNewModal.tsx index 66928e07e3..6e61750c3a 100644 --- a/plugins/ilert/src/components/Alert/AlertNewModal.tsx +++ b/plugins/ilert/src/components/Alert/AlertNewModal.tsx @@ -19,7 +19,7 @@ import { identityApiRef, useApi, } from '@backstage/core-plugin-api'; -import { Typography } from '@material-ui/core'; +import Typography from '@material-ui/core/Typography'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; diff --git a/plugins/ilert/src/components/AlertsPage/StatusChip.tsx b/plugins/ilert/src/components/AlertsPage/StatusChip.tsx index ac7147b3b2..56748c8712 100644 --- a/plugins/ilert/src/components/AlertsPage/StatusChip.tsx +++ b/plugins/ilert/src/components/AlertsPage/StatusChip.tsx @@ -13,7 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Chip, withStyles } from '@material-ui/core'; +import Chip from '@material-ui/core/Chip'; +import { withStyles } from '@material-ui/core/styles'; import React from 'react'; import { ACCEPTED, Alert, PENDING, RESOLVED } from '../../types'; diff --git a/plugins/ilert/src/components/Errors/MissingAuthorizationHeaderError.tsx b/plugins/ilert/src/components/Errors/MissingAuthorizationHeaderError.tsx index d698b9c2d1..03a017ec1b 100644 --- a/plugins/ilert/src/components/Errors/MissingAuthorizationHeaderError.tsx +++ b/plugins/ilert/src/components/Errors/MissingAuthorizationHeaderError.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ import React from 'react'; -import { Button } from '@material-ui/core'; +import Button from '@material-ui/core/Button'; import { EmptyState } from '@backstage/core-components'; export const MissingAuthorizationHeaderError = () => ( diff --git a/plugins/ilert/src/components/Service/ServiceActionsMenu.tsx b/plugins/ilert/src/components/Service/ServiceActionsMenu.tsx index 096cc391ee..f554bfda80 100644 --- a/plugins/ilert/src/components/Service/ServiceActionsMenu.tsx +++ b/plugins/ilert/src/components/Service/ServiceActionsMenu.tsx @@ -13,7 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { IconButton, Menu, MenuItem, Typography } from '@material-ui/core'; +import IconButton from '@material-ui/core/IconButton'; +import Menu from '@material-ui/core/Menu'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; import MoreVertIcon from '@material-ui/icons/MoreVert'; import React from 'react'; import { ilertApiRef } from '../../api'; diff --git a/plugins/ilert/src/components/ServicesPage/StatusChip.tsx b/plugins/ilert/src/components/ServicesPage/StatusChip.tsx index 1d2c89ec6c..0f56c0b1f8 100644 --- a/plugins/ilert/src/components/ServicesPage/StatusChip.tsx +++ b/plugins/ilert/src/components/ServicesPage/StatusChip.tsx @@ -13,7 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Chip, withStyles } from '@material-ui/core'; +import Chip from '@material-ui/core/Chip'; +import { withStyles } from '@material-ui/core/styles'; import React from 'react'; import { DEGRADED, diff --git a/plugins/ilert/src/components/Shift/ShiftOverrideModal.tsx b/plugins/ilert/src/components/Shift/ShiftOverrideModal.tsx index 63af27c725..3f754aa0db 100644 --- a/plugins/ilert/src/components/Shift/ShiftOverrideModal.tsx +++ b/plugins/ilert/src/components/Shift/ShiftOverrideModal.tsx @@ -23,11 +23,12 @@ import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle from '@material-ui/core/DialogTitle'; import Autocomplete from '@material-ui/lab/Autocomplete'; -import { Typography } from '@material-ui/core'; +import Typography from '@material-ui/core/Typography'; import { ilertApiRef } from '../../api'; import { useShiftOverride } from '../../hooks/useShiftOverride'; import { Shift } from '../../types'; -import { DateTimePicker, MuiPickersUtilsProvider } from '@material-ui/pickers'; +import DateTimePicker from '@material-ui/pickers/DateTimePicker'; +import MuiPickersUtilsProvider from '@material-ui/pickers/MuiPickersUtilsProvider'; import LuxonUtils from '@date-io/luxon'; import { alertApiRef, useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/ilert/src/components/StatusPage/StatusPageActionsMenu.tsx b/plugins/ilert/src/components/StatusPage/StatusPageActionsMenu.tsx index 8fe94eb2e1..aa84c779f3 100644 --- a/plugins/ilert/src/components/StatusPage/StatusPageActionsMenu.tsx +++ b/plugins/ilert/src/components/StatusPage/StatusPageActionsMenu.tsx @@ -13,7 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { IconButton, Menu, MenuItem, Typography } from '@material-ui/core'; +import IconButton from '@material-ui/core/IconButton'; +import Menu from '@material-ui/core/Menu'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; import MoreVertIcon from '@material-ui/icons/MoreVert'; import React from 'react'; import { ilertApiRef } from '../../api'; diff --git a/plugins/ilert/src/components/StatusPagePage/StatusChip.tsx b/plugins/ilert/src/components/StatusPagePage/StatusChip.tsx index 1eaffafd25..090f618f7a 100644 --- a/plugins/ilert/src/components/StatusPagePage/StatusChip.tsx +++ b/plugins/ilert/src/components/StatusPagePage/StatusChip.tsx @@ -13,7 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Chip, withStyles } from '@material-ui/core'; +import Chip from '@material-ui/core/Chip'; +import { withStyles } from '@material-ui/core/styles'; import React from 'react'; import { DEGRADED, diff --git a/plugins/ilert/src/components/StatusPagePage/VisibilityChip.tsx b/plugins/ilert/src/components/StatusPagePage/VisibilityChip.tsx index 90967e5483..2dac7b38c2 100644 --- a/plugins/ilert/src/components/StatusPagePage/VisibilityChip.tsx +++ b/plugins/ilert/src/components/StatusPagePage/VisibilityChip.tsx @@ -13,7 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Chip, withStyles } from '@material-ui/core'; +import Chip from '@material-ui/core/Chip'; +import { withStyles } from '@material-ui/core/styles'; import React from 'react'; import { PRIVATE, PUBLIC, StatusPage } from '../../types'; From 4300d18da8d1281e16c0ff4a0b2331eac225265d Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Sat, 13 Apr 2024 18:08:22 +0100 Subject: [PATCH 128/151] refactor: endpoint return Signed-off-by: Timothy Deakin --- .../src/helpers.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/plugins/auth-backend-module-aws-alb-provider/src/helpers.ts b/plugins/auth-backend-module-aws-alb-provider/src/helpers.ts index e4bdf847c4..24026e2c9c 100644 --- a/plugins/auth-backend-module-aws-alb-provider/src/helpers.ts +++ b/plugins/auth-backend-module-aws-alb-provider/src/helpers.ts @@ -71,18 +71,15 @@ export const makeProfileInfo = ( }; const getPublicKeyEndpoint = (region: string) => { - const commercialEndpoint = `https://public-keys.auth.elb.${encodeURIComponent( - region, - )}.amazonaws.com`; - const govEndpoint = `https://s3-${encodeURIComponent( - region, - )}.amazonaws.com/aws-elb-public-keys-prod-${encodeURIComponent(region)}`; - if (region.startsWith('us-gov')) { - return govEndpoint; + return `https://s3-${encodeURIComponent( + region, + )}.amazonaws.com/aws-elb-public-keys-prod-${encodeURIComponent(region)}`; } - return commercialEndpoint; + return `https://public-keys.auth.elb.${encodeURIComponent( + region, + )}.amazonaws.com`; }; export const provisionKeyCache = (region: string, keyCache: NodeCache) => { From 0935078ae804846fd3023b11e394efa4c637ad65 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 13 Apr 2024 17:16:11 +0000 Subject: [PATCH 129/151] fix(deps): update dependency qs to v6.12.1 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 598dde6c2a..21c25b2ef4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -38990,11 +38990,11 @@ __metadata: linkType: hard "qs@npm:^6.10.1, qs@npm:^6.10.2, qs@npm:^6.11.0, qs@npm:^6.11.2, qs@npm:^6.9.1, qs@npm:^6.9.4, qs@npm:^6.9.6": - version: 6.12.0 - resolution: "qs@npm:6.12.0" + version: 6.12.1 + resolution: "qs@npm:6.12.1" dependencies: side-channel: ^1.0.6 - checksum: ba007fb2488880b9c6c3df356fe6888b9c1f4c5127552edac214486cfe83a332de09a5c40d490d79bb27bef977ba1085a8497512ff52eaac72e26564f77ce908 + checksum: aa761d99e65b6936ba2dd2187f2d9976afbcda38deb3ff1b3fe331d09b0c578ed79ca2abdde1271164b5be619c521ec7db9b34c23f49a074e5921372d16242d5 languageName: node linkType: hard From 905f35cbcf02241e42a495bfcc5023075ab0688a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 13 Apr 2024 17:17:15 +0000 Subject: [PATCH 130/151] fix(deps): update dependency rollup to v4.14.2 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 128 +++++++++++++++++++++++++++--------------------------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/yarn.lock b/yarn.lock index 598dde6c2a..72c0d44b24 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15866,107 +15866,107 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-android-arm-eabi@npm:4.14.1": - version: 4.14.1 - resolution: "@rollup/rollup-android-arm-eabi@npm:4.14.1" +"@rollup/rollup-android-arm-eabi@npm:4.14.2": + version: 4.14.2 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.14.2" conditions: os=android & cpu=arm languageName: node linkType: hard -"@rollup/rollup-android-arm64@npm:4.14.1": - version: 4.14.1 - resolution: "@rollup/rollup-android-arm64@npm:4.14.1" +"@rollup/rollup-android-arm64@npm:4.14.2": + version: 4.14.2 + resolution: "@rollup/rollup-android-arm64@npm:4.14.2" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-arm64@npm:4.14.1": - version: 4.14.1 - resolution: "@rollup/rollup-darwin-arm64@npm:4.14.1" +"@rollup/rollup-darwin-arm64@npm:4.14.2": + version: 4.14.2 + resolution: "@rollup/rollup-darwin-arm64@npm:4.14.2" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-x64@npm:4.14.1": - version: 4.14.1 - resolution: "@rollup/rollup-darwin-x64@npm:4.14.1" +"@rollup/rollup-darwin-x64@npm:4.14.2": + version: 4.14.2 + resolution: "@rollup/rollup-darwin-x64@npm:4.14.2" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@rollup/rollup-linux-arm-gnueabihf@npm:4.14.1": - version: 4.14.1 - resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.14.1" +"@rollup/rollup-linux-arm-gnueabihf@npm:4.14.2": + version: 4.14.2 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.14.2" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@rollup/rollup-linux-arm64-gnu@npm:4.14.1": - version: 4.14.1 - resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.14.1" +"@rollup/rollup-linux-arm64-gnu@npm:4.14.2": + version: 4.14.2 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.14.2" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm64-musl@npm:4.14.1": - version: 4.14.1 - resolution: "@rollup/rollup-linux-arm64-musl@npm:4.14.1" +"@rollup/rollup-linux-arm64-musl@npm:4.14.2": + version: 4.14.2 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.14.2" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-powerpc64le-gnu@npm:4.14.1": - version: 4.14.1 - resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.14.1" - conditions: os=linux & cpu=ppc64le & libc=glibc +"@rollup/rollup-linux-powerpc64le-gnu@npm:4.14.2": + version: 4.14.2 + resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.14.2" + conditions: os=linux & cpu=ppc64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-riscv64-gnu@npm:4.14.1": - version: 4.14.1 - resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.14.1" +"@rollup/rollup-linux-riscv64-gnu@npm:4.14.2": + version: 4.14.2 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.14.2" conditions: os=linux & cpu=riscv64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-s390x-gnu@npm:4.14.1": - version: 4.14.1 - resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.14.1" +"@rollup/rollup-linux-s390x-gnu@npm:4.14.2": + version: 4.14.2 + resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.14.2" conditions: os=linux & cpu=s390x & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-gnu@npm:4.14.1": - version: 4.14.1 - resolution: "@rollup/rollup-linux-x64-gnu@npm:4.14.1" +"@rollup/rollup-linux-x64-gnu@npm:4.14.2": + version: 4.14.2 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.14.2" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-musl@npm:4.14.1": - version: 4.14.1 - resolution: "@rollup/rollup-linux-x64-musl@npm:4.14.1" +"@rollup/rollup-linux-x64-musl@npm:4.14.2": + version: 4.14.2 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.14.2" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-win32-arm64-msvc@npm:4.14.1": - version: 4.14.1 - resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.14.1" +"@rollup/rollup-win32-arm64-msvc@npm:4.14.2": + version: 4.14.2 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.14.2" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-win32-ia32-msvc@npm:4.14.1": - version: 4.14.1 - resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.14.1" +"@rollup/rollup-win32-ia32-msvc@npm:4.14.2": + version: 4.14.2 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.14.2" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@rollup/rollup-win32-x64-msvc@npm:4.14.1": - version: 4.14.1 - resolution: "@rollup/rollup-win32-x64-msvc@npm:4.14.1" +"@rollup/rollup-win32-x64-msvc@npm:4.14.2": + version: 4.14.2 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.14.2" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -40947,24 +40947,24 @@ __metadata: linkType: hard "rollup@npm:^4.0.0": - version: 4.14.1 - resolution: "rollup@npm:4.14.1" + version: 4.14.2 + resolution: "rollup@npm:4.14.2" dependencies: - "@rollup/rollup-android-arm-eabi": 4.14.1 - "@rollup/rollup-android-arm64": 4.14.1 - "@rollup/rollup-darwin-arm64": 4.14.1 - "@rollup/rollup-darwin-x64": 4.14.1 - "@rollup/rollup-linux-arm-gnueabihf": 4.14.1 - "@rollup/rollup-linux-arm64-gnu": 4.14.1 - "@rollup/rollup-linux-arm64-musl": 4.14.1 - "@rollup/rollup-linux-powerpc64le-gnu": 4.14.1 - "@rollup/rollup-linux-riscv64-gnu": 4.14.1 - "@rollup/rollup-linux-s390x-gnu": 4.14.1 - "@rollup/rollup-linux-x64-gnu": 4.14.1 - "@rollup/rollup-linux-x64-musl": 4.14.1 - "@rollup/rollup-win32-arm64-msvc": 4.14.1 - "@rollup/rollup-win32-ia32-msvc": 4.14.1 - "@rollup/rollup-win32-x64-msvc": 4.14.1 + "@rollup/rollup-android-arm-eabi": 4.14.2 + "@rollup/rollup-android-arm64": 4.14.2 + "@rollup/rollup-darwin-arm64": 4.14.2 + "@rollup/rollup-darwin-x64": 4.14.2 + "@rollup/rollup-linux-arm-gnueabihf": 4.14.2 + "@rollup/rollup-linux-arm64-gnu": 4.14.2 + "@rollup/rollup-linux-arm64-musl": 4.14.2 + "@rollup/rollup-linux-powerpc64le-gnu": 4.14.2 + "@rollup/rollup-linux-riscv64-gnu": 4.14.2 + "@rollup/rollup-linux-s390x-gnu": 4.14.2 + "@rollup/rollup-linux-x64-gnu": 4.14.2 + "@rollup/rollup-linux-x64-musl": 4.14.2 + "@rollup/rollup-win32-arm64-msvc": 4.14.2 + "@rollup/rollup-win32-ia32-msvc": 4.14.2 + "@rollup/rollup-win32-x64-msvc": 4.14.2 "@types/estree": 1.0.5 fsevents: ~2.3.2 dependenciesMeta: @@ -41002,7 +41002,7 @@ __metadata: optional: true bin: rollup: dist/bin/rollup - checksum: f065ba6ea0ab4271f61bb458afba7d5d36062511929f9d3ec160438c4946d843bf07b8d35d9a8986620fb2aa56990a70c8e968dda5a9baf81a3480023434bdd0 + checksum: ad2c4486e9d76dc8575f13f89cfb16dd4611b5e3527ba80454304fc96b7b9dcf91da98a3318efa7f97320324fdfa15596db2b55cfc39434ebb6e3200c8a75136 languageName: node linkType: hard From 1029f1e0f805c975cbae6f44ad50943f86e07e45 Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Sat, 13 Apr 2024 18:33:05 +0100 Subject: [PATCH 131/151] refactor: imports Signed-off-by: Timothy Deakin --- .../src/components/SchemaBrowser/SchemaBrowser.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/config-schema/src/components/SchemaBrowser/SchemaBrowser.tsx b/plugins/config-schema/src/components/SchemaBrowser/SchemaBrowser.tsx index e794207c7b..bae9aec23a 100644 --- a/plugins/config-schema/src/components/SchemaBrowser/SchemaBrowser.tsx +++ b/plugins/config-schema/src/components/SchemaBrowser/SchemaBrowser.tsx @@ -14,11 +14,11 @@ * limitations under the License. */ -import alpha from '@material-ui/core/alpha'; +import { alpha } from '@material-ui/core/styles'; import { createStyles, withStyles } from '@material-ui/core/styles'; import ChevronRightIcon from '@material-ui/icons/ChevronRight'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; -import TreeItem, { TreeItemProps } from '@material-ui/core/TreeItem'; +import TreeItem, { TreeItemProps } from '@material-ui/lab/TreeItem'; import TreeView from '@material-ui/lab/TreeView'; import { Schema } from 'jsonschema'; import React, { ReactNode, useMemo, useRef } from 'react'; From 033edaa20d542de554a4fd097ec5114255055710 Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Sat, 13 Apr 2024 18:59:25 +0100 Subject: [PATCH 132/151] fix: imports Signed-off-by: Timothy Deakin --- .../src/components/WorkflowRunsCard/WorkflowRunsCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/github-actions/src/components/WorkflowRunsCard/WorkflowRunsCard.tsx b/plugins/github-actions/src/components/WorkflowRunsCard/WorkflowRunsCard.tsx index 78ce154d09..4cb48a58d9 100644 --- a/plugins/github-actions/src/components/WorkflowRunsCard/WorkflowRunsCard.tsx +++ b/plugins/github-actions/src/components/WorkflowRunsCard/WorkflowRunsCard.tsx @@ -46,7 +46,7 @@ import { getProjectNameFromEntity } from '../getProjectNameFromEntity'; import { getHostnameFromEntity } from '../getHostnameFromEntity'; import Alert from '@material-ui/lab/Alert'; -import Color from '@material-ui/lab/Color'; +import { Color } from '@material-ui/lab/'; import { Entity } from '@backstage/catalog-model'; const useStyles = makeStyles((theme: Theme) => From bc1073786381b1434e72909bfb8925066d779032 Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Sat, 13 Apr 2024 19:01:35 +0100 Subject: [PATCH 133/151] fix: imports Signed-off-by: Timothy Deakin --- plugins/ilert/src/components/Shift/ShiftOverrideModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ilert/src/components/Shift/ShiftOverrideModal.tsx b/plugins/ilert/src/components/Shift/ShiftOverrideModal.tsx index 3f754aa0db..8c50ab1d80 100644 --- a/plugins/ilert/src/components/Shift/ShiftOverrideModal.tsx +++ b/plugins/ilert/src/components/Shift/ShiftOverrideModal.tsx @@ -27,7 +27,7 @@ import Typography from '@material-ui/core/Typography'; import { ilertApiRef } from '../../api'; import { useShiftOverride } from '../../hooks/useShiftOverride'; import { Shift } from '../../types'; -import DateTimePicker from '@material-ui/pickers/DateTimePicker'; +import { DateTimePicker } from '@material-ui/pickers/DateTimePicker'; import MuiPickersUtilsProvider from '@material-ui/pickers/MuiPickersUtilsProvider'; import LuxonUtils from '@date-io/luxon'; import { alertApiRef, useApi } from '@backstage/core-plugin-api'; From cdc3688ce7216ca61bcd7591c4e6d8e8f16a283b Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Sat, 13 Apr 2024 19:03:29 +0100 Subject: [PATCH 134/151] fix: imports Signed-off-by: Timothy Deakin --- plugins/cicd-statistics/src/components/chart-filters.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/cicd-statistics/src/components/chart-filters.tsx b/plugins/cicd-statistics/src/components/chart-filters.tsx index 72fec83592..143d17a4c8 100644 --- a/plugins/cicd-statistics/src/components/chart-filters.tsx +++ b/plugins/cicd-statistics/src/components/chart-filters.tsx @@ -30,7 +30,7 @@ import { makeStyles } from '@material-ui/core/styles'; import ShowChartIcon from '@material-ui/icons/ShowChart'; import BarChartIcon from '@material-ui/icons/BarChart'; import MuiPickersUtilsProvider from '@material-ui/pickers/MuiPickersUtilsProvider'; -import KeyboardDatePicker from '@material-ui/pickers/KeyboardDatePicker'; +import { KeyboardDatePicker } from '@material-ui/pickers/DatePicker'; import { DateTime } from 'luxon'; import LuxonUtils from '@date-io/luxon'; From 3c319684c4f0edc568bda75c95b78133e1da3e43 Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Sat, 13 Apr 2024 19:27:44 +0100 Subject: [PATCH 135/151] chore: update api report Signed-off-by: Timothy Deakin --- plugins/catalog-react/api-report.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/catalog-react/api-report.md b/plugins/catalog-react/api-report.md index efc84c7870..55064ff91f 100644 --- a/plugins/catalog-react/api-report.md +++ b/plugins/catalog-react/api-report.md @@ -12,7 +12,7 @@ import { ComponentEntity } from '@backstage/catalog-model'; import { ComponentProps } from 'react'; import { CompoundEntityRef } from '@backstage/catalog-model'; import { Entity } from '@backstage/catalog-model'; -import { IconButton } from '@material-ui/core'; +import IconButton from '@material-ui/core/IconButton'; import { IconComponent } from '@backstage/core-plugin-api'; import { InfoCardVariants } from '@backstage/core-components'; import { LinkProps } from '@backstage/core-components'; @@ -27,7 +27,7 @@ import { StyleRules } from '@material-ui/core/styles/withStyles'; import { SystemEntity } from '@backstage/catalog-model'; import { TableColumn } from '@backstage/core-components'; import { TableOptions } from '@backstage/core-components'; -import { TextFieldProps } from '@material-ui/core'; +import { TextFieldProps } from '@material-ui/core/TextField'; // @public (undocumented) export type AllowedEntityFilters = { From 6c7d3e4214afd35ab657c5b0648f37602fd06772 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 13 Apr 2024 18:31:43 +0000 Subject: [PATCH 136/151] fix(deps): update dependency @opensearch-project/opensearch to v2.7.0 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 11f48259ab..b9f6c22171 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14600,15 +14600,15 @@ __metadata: linkType: hard "@opensearch-project/opensearch@npm:^2.2.1": - version: 2.6.0 - resolution: "@opensearch-project/opensearch@npm:2.6.0" + version: 2.7.0 + resolution: "@opensearch-project/opensearch@npm:2.7.0" dependencies: aws4: ^1.11.0 debug: ^4.3.1 hpagent: ^1.2.0 ms: ^2.1.3 secure-json-parse: ^2.4.0 - checksum: d958bb83bdf4975f342da9d355aa39f3daaed322fa72fae715501cf760101e3ef50e3e216cab5b008df5f7d7976d5feee7541a6dd9d1f6791ffb01134fafa227 + checksum: 6905373048d3896e158de8a229b1110828cf0cbffee3180fcd98b114a025f11e8938124863106544df09d7aa587b41843e2818fe03f34e33a27abcd1601740fe languageName: node linkType: hard From 20f01d66ea5ea3d87264402f295534961e688751 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 13 Apr 2024 18:32:23 +0000 Subject: [PATCH 137/151] chore(deps): update dependency @types/testing-library__jest-dom to v6 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .changeset/renovate-48cd145.md | 5 +++++ plugins/jenkins/package.json | 2 +- yarn.lock | 14 +++++++------- 3 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 .changeset/renovate-48cd145.md diff --git a/.changeset/renovate-48cd145.md b/.changeset/renovate-48cd145.md new file mode 100644 index 0000000000..1f17e51c40 --- /dev/null +++ b/.changeset/renovate-48cd145.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-jenkins': patch +--- + +Updated dependency `@types/testing-library__jest-dom` to `^6.0.0`. diff --git a/plugins/jenkins/package.json b/plugins/jenkins/package.json index 9c519ceacf..3b4a057174 100644 --- a/plugins/jenkins/package.json +++ b/plugins/jenkins/package.json @@ -56,7 +56,7 @@ "@testing-library/dom": "^9.0.0", "@testing-library/jest-dom": "^6.0.0", "@testing-library/react": "^15.0.0", - "@types/testing-library__jest-dom": "^5.9.1" + "@types/testing-library__jest-dom": "^6.0.0" }, "peerDependencies": { "react": "^16.13.1 || ^17.0.0 || ^18.0.0", diff --git a/yarn.lock b/yarn.lock index 11f48259ab..3af5c30215 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7388,7 +7388,7 @@ __metadata: "@testing-library/jest-dom": ^6.0.0 "@testing-library/react": ^15.0.0 "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 - "@types/testing-library__jest-dom": ^5.9.1 + "@types/testing-library__jest-dom": ^6.0.0 luxon: ^3.0.0 react-use: ^17.2.4 peerDependencies: @@ -18033,7 +18033,7 @@ __metadata: languageName: node linkType: hard -"@testing-library/jest-dom@npm:^6.0.0": +"@testing-library/jest-dom@npm:*, @testing-library/jest-dom@npm:^6.0.0": version: 6.4.2 resolution: "@testing-library/jest-dom@npm:6.4.2" dependencies: @@ -19928,12 +19928,12 @@ __metadata: languageName: node linkType: hard -"@types/testing-library__jest-dom@npm:^5.9.1": - version: 5.14.9 - resolution: "@types/testing-library__jest-dom@npm:5.14.9" +"@types/testing-library__jest-dom@npm:^6.0.0": + version: 6.0.0 + resolution: "@types/testing-library__jest-dom@npm:6.0.0" dependencies: - "@types/jest": "*" - checksum: d364494fc2545316292e88861146146af1e3818792ca63b62a63758b2f737669b687f4aaddfcfbcb7d0e1ed7890a9bd05de23ff97f277d5e68de574497a9ee72 + "@testing-library/jest-dom": "*" + checksum: 1b4db1aa3c4225524203b4d1c3b36c7129e9d1e0547e46d2e5283c3ece226a3c16f5f20387cc71b33ab0eecd99d0cf91111bb327e8adb240388d99fb94af7a4d languageName: node linkType: hard From cfb2b788bc2efc08fea15854fc276fe9149bd12d Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Sat, 13 Apr 2024 20:22:53 +0100 Subject: [PATCH 138/151] feat: add eslint rule for top level imports Signed-off-by: Timothy Deakin --- .changeset/sweet-planets-relate.md | 5 +++++ plugins/org-react/.eslintrc.js | 6 +++++- .../components/GroupListPicker/GroupListPickerButton.tsx | 4 +++- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .changeset/sweet-planets-relate.md diff --git a/.changeset/sweet-planets-relate.md b/.changeset/sweet-planets-relate.md new file mode 100644 index 0000000000..7697874957 --- /dev/null +++ b/.changeset/sweet-planets-relate.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-org-react': patch +--- + +Added the `no-top-level-material-ui-4-imports` ESLint rule to aid with the migration to Material UI v5 diff --git a/plugins/org-react/.eslintrc.js b/plugins/org-react/.eslintrc.js index e2a53a6ad2..e487f765b2 100644 --- a/plugins/org-react/.eslintrc.js +++ b/plugins/org-react/.eslintrc.js @@ -1 +1,5 @@ -module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, { + rules: { + '@backstage/no-top-level-material-ui-4-imports': 'error', + }, +}); diff --git a/plugins/org-react/src/components/GroupListPicker/GroupListPickerButton.tsx b/plugins/org-react/src/components/GroupListPicker/GroupListPickerButton.tsx index f4255a18be..b7a31f89f2 100644 --- a/plugins/org-react/src/components/GroupListPicker/GroupListPickerButton.tsx +++ b/plugins/org-react/src/components/GroupListPicker/GroupListPickerButton.tsx @@ -15,7 +15,9 @@ */ import React from 'react'; -import { makeStyles, Typography, Button } from '@material-ui/core'; +import Typography from '@material-ui/core/Typography'; +import Button from '@material-ui/core/Button'; +import { makeStyles } from '@material-ui/core/styles'; import KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown'; import PeopleIcon from '@material-ui/icons/People'; From 0e692cf4227d4a03a81981979669935e945665ca Mon Sep 17 00:00:00 2001 From: Juan Pablo Garcia Ripa Date: Sat, 13 Apr 2024 21:38:00 +0200 Subject: [PATCH 139/151] add mui imports eslint rule Signed-off-by: Juan Pablo Garcia Ripa --- .changeset/rotten-cameras-leave.md | 5 +++++ plugins/scaffolder-react/.eslintrc.js | 6 +++++- .../Form/DescriptionFieldTemplate.tsx | 3 ++- .../ScaffolderField/ScaffolderField.tsx | 3 ++- .../ErrorListTemplate/errorListTemplate.tsx | 16 ++++++-------- .../src/next/components/Stepper/Stepper.tsx | 14 ++++++------- .../next/components/TaskSteps/StepIcon.tsx | 4 +++- .../next/components/TaskSteps/StepTime.tsx | 2 +- .../next/components/TaskSteps/TaskBorder.tsx | 3 ++- .../next/components/TaskSteps/TaskSteps.tsx | 16 +++++++------- .../TemplateCard/CardHeader.test.tsx | 2 +- .../components/TemplateCard/CardHeader.tsx | 2 +- .../next/components/TemplateCard/CardLink.tsx | 2 +- .../components/TemplateCard/TemplateCard.tsx | 21 ++++++++----------- .../TemplateCategoryPicker.tsx | 16 +++++++------- .../TemplateGroups/TemplateGroups.tsx | 2 +- .../DefaultTemplateOutputs.tsx | 3 ++- .../TemplateOutputs/LinkOutputs.tsx | 3 ++- .../TemplateOutputs/TextOutputs.tsx | 2 +- .../src/next/components/Workflow/Workflow.tsx | 2 +- 20 files changed, 65 insertions(+), 62 deletions(-) create mode 100644 .changeset/rotten-cameras-leave.md diff --git a/.changeset/rotten-cameras-leave.md b/.changeset/rotten-cameras-leave.md new file mode 100644 index 0000000000..bd702eebca --- /dev/null +++ b/.changeset/rotten-cameras-leave.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-react': patch +--- + +Added ESLint rule `no-top-level-material-ui-4-imports` to migrate the Material UI imports. diff --git a/plugins/scaffolder-react/.eslintrc.js b/plugins/scaffolder-react/.eslintrc.js index e2a53a6ad2..e487f765b2 100644 --- a/plugins/scaffolder-react/.eslintrc.js +++ b/plugins/scaffolder-react/.eslintrc.js @@ -1 +1,5 @@ -module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, { + rules: { + '@backstage/no-top-level-material-ui-4-imports': 'error', + }, +}); diff --git a/plugins/scaffolder-react/src/next/components/Form/DescriptionFieldTemplate.tsx b/plugins/scaffolder-react/src/next/components/Form/DescriptionFieldTemplate.tsx index 4c86ef0c62..7731cac3f8 100644 --- a/plugins/scaffolder-react/src/next/components/Form/DescriptionFieldTemplate.tsx +++ b/plugins/scaffolder-react/src/next/components/Form/DescriptionFieldTemplate.tsx @@ -16,7 +16,8 @@ import React from 'react'; import { MarkdownContent } from '@backstage/core-components'; -import { makeStyles, Typography } from '@material-ui/core'; +import Typography from '@material-ui/core/Typography'; +import { makeStyles } from '@material-ui/core/styles'; import { DescriptionFieldProps, FormContextType, diff --git a/plugins/scaffolder-react/src/next/components/ScaffolderField/ScaffolderField.tsx b/plugins/scaffolder-react/src/next/components/ScaffolderField/ScaffolderField.tsx index da233eeba0..1bb1656fd0 100644 --- a/plugins/scaffolder-react/src/next/components/ScaffolderField/ScaffolderField.tsx +++ b/plugins/scaffolder-react/src/next/components/ScaffolderField/ScaffolderField.tsx @@ -16,7 +16,8 @@ import React, { PropsWithChildren, ReactElement } from 'react'; import { MarkdownContent } from '@backstage/core-components'; -import { FormControl, makeStyles } from '@material-ui/core'; +import FormControl from '@material-ui/core/FormControl'; +import { makeStyles } from '@material-ui/core/styles'; const useStyles = makeStyles(theme => ({ markdownDescription: { diff --git a/plugins/scaffolder-react/src/next/components/Stepper/ErrorListTemplate/errorListTemplate.tsx b/plugins/scaffolder-react/src/next/components/Stepper/ErrorListTemplate/errorListTemplate.tsx index 9b6920108b..a5310a5806 100644 --- a/plugins/scaffolder-react/src/next/components/Stepper/ErrorListTemplate/errorListTemplate.tsx +++ b/plugins/scaffolder-react/src/next/components/Stepper/ErrorListTemplate/errorListTemplate.tsx @@ -15,16 +15,12 @@ */ import React from 'react'; import { ErrorListProps } from '@rjsf/utils'; -import { - List, - ListItem, - ListItemIcon, - ListItemText, - Paper, - Theme, - createStyles, - makeStyles, -} from '@material-ui/core'; +import List from '@material-ui/core/List'; +import ListItem from '@material-ui/core/ListItem'; +import ListItemIcon from '@material-ui/core/ListItemIcon'; +import ListItemText from '@material-ui/core/ListItemText'; +import Paper from '@material-ui/core/Paper'; +import { Theme, createStyles, makeStyles } from '@material-ui/core/styles'; import ErrorIcon from '@material-ui/icons/Error'; const useStyles = makeStyles((_theme: Theme) => diff --git a/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx b/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx index d0ce60fd79..62effbd14a 100644 --- a/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx +++ b/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx @@ -15,14 +15,12 @@ */ import { useAnalytics, useApiHolder } from '@backstage/core-plugin-api'; import { JsonValue } from '@backstage/types'; -import { - Stepper as MuiStepper, - Step as MuiStep, - StepLabel as MuiStepLabel, - Button, - makeStyles, - LinearProgress, -} from '@material-ui/core'; +import MuiStepper from '@material-ui/core/Stepper'; +import MuiStep from '@material-ui/core/Step'; +import MuiStepLabel from '@material-ui/core/StepLabel'; +import Button from '@material-ui/core/Button'; +import LinearProgress from '@material-ui/core/LinearProgress'; +import { makeStyles } from '@material-ui/core/styles'; import { type IChangeEvent } from '@rjsf/core'; import { ErrorSchema } from '@rjsf/utils'; import React, { diff --git a/plugins/scaffolder-react/src/next/components/TaskSteps/StepIcon.tsx b/plugins/scaffolder-react/src/next/components/TaskSteps/StepIcon.tsx index 58f2eb9050..c397b09a52 100644 --- a/plugins/scaffolder-react/src/next/components/TaskSteps/StepIcon.tsx +++ b/plugins/scaffolder-react/src/next/components/TaskSteps/StepIcon.tsx @@ -15,7 +15,9 @@ */ import React from 'react'; -import { CircularProgress, makeStyles, StepIconProps } from '@material-ui/core'; +import CircularProgress from '@material-ui/core/CircularProgress'; +import { StepIconProps } from '@material-ui/core/StepIcon'; +import { makeStyles } from '@material-ui/core/styles'; import RemoveCircleOutline from '@material-ui/icons/RemoveCircleOutline'; import PanoramaFishEyeIcon from '@material-ui/icons/PanoramaFishEye'; import classNames from 'classnames'; diff --git a/plugins/scaffolder-react/src/next/components/TaskSteps/StepTime.tsx b/plugins/scaffolder-react/src/next/components/TaskSteps/StepTime.tsx index 14c347fda8..ab236965c2 100644 --- a/plugins/scaffolder-react/src/next/components/TaskSteps/StepTime.tsx +++ b/plugins/scaffolder-react/src/next/components/TaskSteps/StepTime.tsx @@ -17,7 +17,7 @@ import React, { useCallback, useState } from 'react'; import useInterval from 'react-use/esm/useInterval'; import { DateTime, Interval } from 'luxon'; import humanizeDuration from 'humanize-duration'; -import { Typography } from '@material-ui/core'; +import Typography from '@material-ui/core/Typography'; import { useMountEffect } from '@react-hookz/web'; export const StepTime = (props: { diff --git a/plugins/scaffolder-react/src/next/components/TaskSteps/TaskBorder.tsx b/plugins/scaffolder-react/src/next/components/TaskSteps/TaskBorder.tsx index d7a96e3864..a33cdad49e 100644 --- a/plugins/scaffolder-react/src/next/components/TaskSteps/TaskBorder.tsx +++ b/plugins/scaffolder-react/src/next/components/TaskSteps/TaskBorder.tsx @@ -15,7 +15,8 @@ */ import React from 'react'; -import { LinearProgress, makeStyles } from '@material-ui/core'; +import LinearProgress from '@material-ui/core/LinearProgress'; +import { makeStyles } from '@material-ui/core/styles'; const useStyles = makeStyles(theme => ({ failed: { diff --git a/plugins/scaffolder-react/src/next/components/TaskSteps/TaskSteps.tsx b/plugins/scaffolder-react/src/next/components/TaskSteps/TaskSteps.tsx index d74d298778..b391e6fce8 100644 --- a/plugins/scaffolder-react/src/next/components/TaskSteps/TaskSteps.tsx +++ b/plugins/scaffolder-react/src/next/components/TaskSteps/TaskSteps.tsx @@ -14,15 +14,13 @@ * limitations under the License. */ import React from 'react'; -import { - Stepper as MuiStepper, - Step as MuiStep, - StepButton as MuiStepButton, - StepLabel as MuiStepLabel, - StepIconProps, - Box, - Paper, -} from '@material-ui/core'; +import MuiStepper from '@material-ui/core/Stepper'; +import MuiStep from '@material-ui/core/Step'; +import MuiStepButton from '@material-ui/core/StepButton'; +import MuiStepLabel from '@material-ui/core/StepLabel'; +import { StepIconProps } from '@material-ui/core/StepIcon'; +import Box from '@material-ui/core/Box'; +import Paper from '@material-ui/core/Paper'; import { TaskStep } from '@backstage/plugin-scaffolder-common'; import { StepIcon } from './StepIcon'; import { StepTime } from './StepTime'; diff --git a/plugins/scaffolder-react/src/next/components/TemplateCard/CardHeader.test.tsx b/plugins/scaffolder-react/src/next/components/TemplateCard/CardHeader.test.tsx index 287d813ca7..5aa138340e 100644 --- a/plugins/scaffolder-react/src/next/components/TemplateCard/CardHeader.test.tsx +++ b/plugins/scaffolder-react/src/next/components/TemplateCard/CardHeader.test.tsx @@ -16,7 +16,7 @@ import React from 'react'; import { fireEvent, render } from '@testing-library/react'; import { CardHeader } from './CardHeader'; -import { ThemeProvider } from '@material-ui/core'; +import { ThemeProvider } from '@material-ui/core/styles'; import { lightTheme } from '@backstage/theme'; import { MockStorageApi, diff --git a/plugins/scaffolder-react/src/next/components/TemplateCard/CardHeader.tsx b/plugins/scaffolder-react/src/next/components/TemplateCard/CardHeader.tsx index 1180c8f106..467d26ce76 100644 --- a/plugins/scaffolder-react/src/next/components/TemplateCard/CardHeader.tsx +++ b/plugins/scaffolder-react/src/next/components/TemplateCard/CardHeader.tsx @@ -15,7 +15,7 @@ */ import React from 'react'; -import { Theme, makeStyles, useTheme } from '@material-ui/core'; +import { Theme, makeStyles, useTheme } from '@material-ui/core/styles'; import { ItemCardHeader } from '@backstage/core-components'; import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common'; import { FavoriteEntity } from '@backstage/plugin-catalog-react'; diff --git a/plugins/scaffolder-react/src/next/components/TemplateCard/CardLink.tsx b/plugins/scaffolder-react/src/next/components/TemplateCard/CardLink.tsx index 839d6c7ac1..263a1356b7 100644 --- a/plugins/scaffolder-react/src/next/components/TemplateCard/CardLink.tsx +++ b/plugins/scaffolder-react/src/next/components/TemplateCard/CardLink.tsx @@ -16,7 +16,7 @@ import { IconComponent } from '@backstage/core-plugin-api'; import { Link } from '@backstage/core-components'; -import { makeStyles } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core/styles'; import React from 'react'; interface CardLinkProps { diff --git a/plugins/scaffolder-react/src/next/components/TemplateCard/TemplateCard.tsx b/plugins/scaffolder-react/src/next/components/TemplateCard/TemplateCard.tsx index 2d8ff1e458..4fb2ca0e4a 100644 --- a/plugins/scaffolder-react/src/next/components/TemplateCard/TemplateCard.tsx +++ b/plugins/scaffolder-react/src/next/components/TemplateCard/TemplateCard.tsx @@ -22,18 +22,15 @@ import { getEntityRelations, } from '@backstage/plugin-catalog-react'; import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common'; -import { - Box, - Card, - CardActions, - CardContent, - Chip, - Divider, - Button, - Grid, - makeStyles, - Theme, -} from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import Card from '@material-ui/core/Card'; +import CardActions from '@material-ui/core/CardActions'; +import CardContent from '@material-ui/core/CardContent'; +import Chip from '@material-ui/core/Chip'; +import Divider from '@material-ui/core/Divider'; +import Button from '@material-ui/core/Button'; +import Grid from '@material-ui/core/Grid'; +import { makeStyles, Theme } from '@material-ui/core/styles'; import LanguageIcon from '@material-ui/icons/Language'; import React from 'react'; import { CardHeader } from './CardHeader'; diff --git a/plugins/scaffolder-react/src/next/components/TemplateCategoryPicker/TemplateCategoryPicker.tsx b/plugins/scaffolder-react/src/next/components/TemplateCategoryPicker/TemplateCategoryPicker.tsx index 9c85cacfc2..24f8a21109 100644 --- a/plugins/scaffolder-react/src/next/components/TemplateCategoryPicker/TemplateCategoryPicker.tsx +++ b/plugins/scaffolder-react/src/next/components/TemplateCategoryPicker/TemplateCategoryPicker.tsx @@ -17,18 +17,16 @@ import React from 'react'; import capitalize from 'lodash/capitalize'; import { Progress } from '@backstage/core-components'; -import { - Box, - Checkbox, - FormControlLabel, - TextField, - Typography, - makeStyles, -} from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import Checkbox from '@material-ui/core/Checkbox'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; +import TextField from '@material-ui/core/TextField'; +import Typography from '@material-ui/core/Typography'; +import { makeStyles } from '@material-ui/core/styles'; import CheckBoxIcon from '@material-ui/icons/CheckBox'; import CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; -import { Autocomplete } from '@material-ui/lab'; +import Autocomplete from '@material-ui/lab/Autocomplete'; import { useEntityTypeFilter } from '@backstage/plugin-catalog-react'; import { alertApiRef, useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/scaffolder-react/src/next/components/TemplateGroups/TemplateGroups.tsx b/plugins/scaffolder-react/src/next/components/TemplateGroups/TemplateGroups.tsx index 800ec67a16..a180ff0e8c 100644 --- a/plugins/scaffolder-react/src/next/components/TemplateGroups/TemplateGroups.tsx +++ b/plugins/scaffolder-react/src/next/components/TemplateGroups/TemplateGroups.tsx @@ -21,7 +21,7 @@ import { TemplateEntityV1beta3, } from '@backstage/plugin-scaffolder-common'; import { Progress, Link } from '@backstage/core-components'; -import { Typography } from '@material-ui/core'; +import Typography from '@material-ui/core/Typography'; import { errorApiRef, IconComponent, useApi } from '@backstage/core-plugin-api'; import { TemplateGroupFilter } from '@backstage/plugin-scaffolder-react'; import { TemplateGroup } from '../TemplateGroup/TemplateGroup'; diff --git a/plugins/scaffolder-react/src/next/components/TemplateOutputs/DefaultTemplateOutputs.tsx b/plugins/scaffolder-react/src/next/components/TemplateOutputs/DefaultTemplateOutputs.tsx index d3811e5011..7d90623077 100644 --- a/plugins/scaffolder-react/src/next/components/TemplateOutputs/DefaultTemplateOutputs.tsx +++ b/plugins/scaffolder-react/src/next/components/TemplateOutputs/DefaultTemplateOutputs.tsx @@ -18,7 +18,8 @@ import { ScaffolderOutputText, ScaffolderTaskOutput, } from '@backstage/plugin-scaffolder-react'; -import { Box, Paper } from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import Paper from '@material-ui/core/Paper'; import React, { useEffect, useMemo, useState } from 'react'; import { LinkOutputs } from './LinkOutputs'; import { TextOutputs } from './TextOutputs'; diff --git a/plugins/scaffolder-react/src/next/components/TemplateOutputs/LinkOutputs.tsx b/plugins/scaffolder-react/src/next/components/TemplateOutputs/LinkOutputs.tsx index 7877653197..59c6c6a49a 100644 --- a/plugins/scaffolder-react/src/next/components/TemplateOutputs/LinkOutputs.tsx +++ b/plugins/scaffolder-react/src/next/components/TemplateOutputs/LinkOutputs.tsx @@ -15,7 +15,8 @@ */ import { IconComponent, useApp, useRouteRef } from '@backstage/core-plugin-api'; import { entityRouteRef } from '@backstage/plugin-catalog-react'; -import { Button, makeStyles } from '@material-ui/core'; +import Button from '@material-ui/core/Button'; +import { makeStyles } from '@material-ui/core/styles'; import React from 'react'; import LinkIcon from '@material-ui/icons/Link'; import { parseEntityRef } from '@backstage/catalog-model'; diff --git a/plugins/scaffolder-react/src/next/components/TemplateOutputs/TextOutputs.tsx b/plugins/scaffolder-react/src/next/components/TemplateOutputs/TextOutputs.tsx index 74a5eabb8f..5da1dab476 100644 --- a/plugins/scaffolder-react/src/next/components/TemplateOutputs/TextOutputs.tsx +++ b/plugins/scaffolder-react/src/next/components/TemplateOutputs/TextOutputs.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ import { IconComponent, useApp } from '@backstage/core-plugin-api'; -import { Button } from '@material-ui/core'; +import Button from '@material-ui/core/Button'; import DescriptionIcon from '@material-ui/icons/Description'; import React from 'react'; import { ScaffolderTaskOutput } from '../../../api'; diff --git a/plugins/scaffolder-react/src/next/components/Workflow/Workflow.tsx b/plugins/scaffolder-react/src/next/components/Workflow/Workflow.tsx index e16af5abb9..9afc18c438 100644 --- a/plugins/scaffolder-react/src/next/components/Workflow/Workflow.tsx +++ b/plugins/scaffolder-react/src/next/components/Workflow/Workflow.tsx @@ -22,7 +22,7 @@ import { Progress, } from '@backstage/core-components'; import { stringifyEntityRef } from '@backstage/catalog-model'; -import { makeStyles } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core/styles'; import { errorApiRef, useAnalytics, useApi } from '@backstage/core-plugin-api'; import { useTemplateParameterSchema } from '../../hooks/useTemplateParameterSchema'; import { Stepper, type StepperProps } from '../Stepper/Stepper'; From ab94179927e3898f3caf85a522775eebc66efcc8 Mon Sep 17 00:00:00 2001 From: Juan Pablo Garcia Ripa Date: Sat, 13 Apr 2024 21:46:41 +0200 Subject: [PATCH 140/151] add miu import rules to signals-react Signed-off-by: Juan Pablo Garcia Ripa --- plugins/signals-react/.eslintrc.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/signals-react/.eslintrc.js b/plugins/signals-react/.eslintrc.js index e2a53a6ad2..e487f765b2 100644 --- a/plugins/signals-react/.eslintrc.js +++ b/plugins/signals-react/.eslintrc.js @@ -1 +1,5 @@ -module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, { + rules: { + '@backstage/no-top-level-material-ui-4-imports': 'error', + }, +}); From 8d50bd34fe548249357fa5b2667c246657902d9f Mon Sep 17 00:00:00 2001 From: Juan Pablo Garcia Ripa Date: Sat, 13 Apr 2024 22:04:44 +0200 Subject: [PATCH 141/151] add miu import rules to Search-react Signed-off-by: Juan Pablo Garcia Ripa --- .changeset/few-dots-greet.md | 5 ++++ plugins/search-react/.eslintrc.js | 6 ++++- plugins/search-react/api-report-alpha.md | 2 +- plugins/search-react/api-report.md | 10 ++++---- plugins/search-react/src/alpha.tsx | 2 +- .../DefaultResultListItem.stories.tsx | 2 +- .../DefaultResultListItem.tsx | 4 +++- .../HighlightedSearchResultText.tsx | 2 +- .../SearchAutocomplete.stories.tsx | 2 +- .../SearchAutocomplete/SearchAutocomplete.tsx | 12 ++++++---- ...earchAutocompleteDefaultOption.stories.tsx | 3 ++- .../SearchAutocompleteDefaultOption.tsx | 7 +++--- .../SearchBar/SearchBar.stories.tsx | 3 ++- .../src/components/SearchBar/SearchBar.tsx | 4 +++- .../SearchFilter.Autocomplete.tsx | 8 +++---- .../SearchFilter/SearchFilter.stories.tsx | 3 ++- .../components/SearchFilter/SearchFilter.tsx | 20 ++++++++-------- .../SearchPagination.stories.tsx | 2 +- .../SearchPagination/SearchPagination.tsx | 2 +- .../SearchResult/SearchResult.stories.tsx | 3 ++- .../SearchResultGroup.stories.tsx | 12 ++++------ .../SearchResultGroup.test.tsx | 2 +- .../SearchResultGroup/SearchResultGroup.tsx | 23 ++++++++----------- .../SearchResultList.stories.tsx | 5 +++- .../SearchResultList/SearchResultList.tsx | 2 +- .../SearchResultPager/SearchResultPager.tsx | 3 ++- plugins/search-react/src/extensions.test.tsx | 2 +- plugins/search-react/src/extensions.tsx | 3 ++- 28 files changed, 84 insertions(+), 70 deletions(-) create mode 100644 .changeset/few-dots-greet.md diff --git a/.changeset/few-dots-greet.md b/.changeset/few-dots-greet.md new file mode 100644 index 0000000000..3e5965b63a --- /dev/null +++ b/.changeset/few-dots-greet.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-search-react': patch +--- + +add mui imports eslint rule diff --git a/plugins/search-react/.eslintrc.js b/plugins/search-react/.eslintrc.js index e2a53a6ad2..e487f765b2 100644 --- a/plugins/search-react/.eslintrc.js +++ b/plugins/search-react/.eslintrc.js @@ -1 +1,5 @@ -module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, { + rules: { + '@backstage/no-top-level-material-ui-4-imports': 'error', + }, +}); diff --git a/plugins/search-react/api-report-alpha.md b/plugins/search-react/api-report-alpha.md index b0edd42646..36f5f049c5 100644 --- a/plugins/search-react/api-report-alpha.md +++ b/plugins/search-react/api-report-alpha.md @@ -7,7 +7,7 @@ import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api'; import { ExtensionDefinition } from '@backstage/frontend-plugin-api'; -import { ListItemProps } from '@material-ui/core'; +import { ListItemProps } from '@material-ui/core/ListItem'; import { PortableSchema } from '@backstage/frontend-plugin-api'; import { SearchDocument } from '@backstage/plugin-search-common'; import { SearchResult } from '@backstage/plugin-search-common'; diff --git a/plugins/search-react/api-report.md b/plugins/search-react/api-report.md index cf26c60e57..b5b06a2904 100644 --- a/plugins/search-react/api-report.md +++ b/plugins/search-react/api-report.md @@ -7,15 +7,15 @@ import { ApiRef } from '@backstage/core-plugin-api'; import { AsyncState } from 'react-use/esm/useAsync'; -import { AutocompleteProps } from '@material-ui/lab'; +import { AutocompleteProps } from '@material-ui/lab/Autocomplete'; import { Extension } from '@backstage/core-plugin-api'; import { ForwardRefExoticComponent } from 'react'; import { JsonObject } from '@backstage/types'; import { JsonValue } from '@backstage/types'; import { LinkProps } from '@backstage/core-components'; -import { ListItemProps } from '@material-ui/core'; -import { ListItemTextProps } from '@material-ui/core'; -import { ListProps } from '@material-ui/core'; +import { ListItemProps } from '@material-ui/core/ListItem'; +import { ListItemTextProps } from '@material-ui/core/ListItemText'; +import { ListProps } from '@material-ui/core/List'; import { PropsWithChildren } from 'react'; import { default as React_2 } from 'react'; import { ReactElement } from 'react'; @@ -26,7 +26,7 @@ import { SearchQuery } from '@backstage/plugin-search-common'; import { SearchResult as SearchResult_2 } from '@backstage/plugin-search-common'; import { SearchResultSet } from '@backstage/plugin-search-common'; import { TextFieldProps } from '@material-ui/core/TextField'; -import { TypographyProps } from '@material-ui/core'; +import { TypographyProps } from '@material-ui/core/Typography'; // @public (undocumented) export const AutocompleteFilter: ( diff --git a/plugins/search-react/src/alpha.tsx b/plugins/search-react/src/alpha.tsx index e075d9bfb8..db198fa99d 100644 --- a/plugins/search-react/src/alpha.tsx +++ b/plugins/search-react/src/alpha.tsx @@ -16,7 +16,7 @@ import React, { lazy } from 'react'; -import { ListItemProps } from '@material-ui/core'; +import { ListItemProps } from '@material-ui/core/ListItem'; import { ExtensionBoundary, diff --git a/plugins/search-react/src/components/DefaultResultListItem/DefaultResultListItem.stories.tsx b/plugins/search-react/src/components/DefaultResultListItem/DefaultResultListItem.stories.tsx index 7049b7f4ef..89c98f6e72 100644 --- a/plugins/search-react/src/components/DefaultResultListItem/DefaultResultListItem.stories.tsx +++ b/plugins/search-react/src/components/DefaultResultListItem/DefaultResultListItem.stories.tsx @@ -16,7 +16,7 @@ import { LinkButton } from '@backstage/core-components'; import { lightTheme } from '@backstage/theme'; -import { Grid } from '@material-ui/core'; +import Grid from '@material-ui/core/Grid'; import CssBaseline from '@material-ui/core/CssBaseline'; import { ThemeProvider } from '@material-ui/core/styles'; import FindInPageIcon from '@material-ui/icons/FindInPage'; diff --git a/plugins/search-react/src/components/DefaultResultListItem/DefaultResultListItem.tsx b/plugins/search-react/src/components/DefaultResultListItem/DefaultResultListItem.tsx index 0d2c59e173..812e951439 100644 --- a/plugins/search-react/src/components/DefaultResultListItem/DefaultResultListItem.tsx +++ b/plugins/search-react/src/components/DefaultResultListItem/DefaultResultListItem.tsx @@ -21,7 +21,9 @@ import { SearchDocument, } from '@backstage/plugin-search-common'; import { HighlightedSearchResultText } from '../HighlightedSearchResultText'; -import { ListItemIcon, ListItemText, Box } from '@material-ui/core'; +import ListItemIcon from '@material-ui/core/ListItemIcon'; +import ListItemText from '@material-ui/core/ListItemText'; +import Box from '@material-ui/core/Box'; import Typography from '@material-ui/core/Typography'; import { Link } from '@backstage/core-components'; diff --git a/plugins/search-react/src/components/HighlightedSearchResultText/HighlightedSearchResultText.tsx b/plugins/search-react/src/components/HighlightedSearchResultText/HighlightedSearchResultText.tsx index 511635a4d0..d6474f5d56 100644 --- a/plugins/search-react/src/components/HighlightedSearchResultText/HighlightedSearchResultText.tsx +++ b/plugins/search-react/src/components/HighlightedSearchResultText/HighlightedSearchResultText.tsx @@ -15,7 +15,7 @@ */ import React, { useMemo } from 'react'; -import { makeStyles } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core/styles'; const useStyles = makeStyles( () => ({ diff --git a/plugins/search-react/src/components/SearchAutocomplete/SearchAutocomplete.stories.tsx b/plugins/search-react/src/components/SearchAutocomplete/SearchAutocomplete.stories.tsx index 0eaece87bb..eb113cb5fd 100644 --- a/plugins/search-react/src/components/SearchAutocomplete/SearchAutocomplete.stories.tsx +++ b/plugins/search-react/src/components/SearchAutocomplete/SearchAutocomplete.stories.tsx @@ -16,7 +16,7 @@ import React, { ComponentType, PropsWithChildren } from 'react'; -import { Grid } from '@material-ui/core'; +import Grid from '@material-ui/core/Grid'; import LabelIcon from '@material-ui/icons/Label'; import { TestApiProvider } from '@backstage/test-utils'; diff --git a/plugins/search-react/src/components/SearchAutocomplete/SearchAutocomplete.tsx b/plugins/search-react/src/components/SearchAutocomplete/SearchAutocomplete.tsx index 2a3cb6bee4..bc9e3bff13 100644 --- a/plugins/search-react/src/components/SearchAutocomplete/SearchAutocomplete.tsx +++ b/plugins/search-react/src/components/SearchAutocomplete/SearchAutocomplete.tsx @@ -16,14 +16,16 @@ import React, { ChangeEvent, useCallback, useMemo } from 'react'; -import { CircularProgress, makeStyles } from '@material-ui/core'; -import { - Autocomplete, +import CircularProgress from '@material-ui/core/CircularProgress'; +import { makeStyles } from '@material-ui/core/styles'; +import Autocomplete, { AutocompleteProps, + AutocompleteRenderInputParams, +} from '@material-ui/lab/Autocomplete'; +import { AutocompleteChangeDetails, AutocompleteChangeReason, - AutocompleteRenderInputParams, -} from '@material-ui/lab'; +} from '@material-ui/lab/useAutocomplete'; import { SearchContextProvider, useSearch } from '../../context'; import { SearchBar, SearchBarProps } from '../SearchBar'; diff --git a/plugins/search-react/src/components/SearchAutocomplete/SearchAutocompleteDefaultOption.stories.tsx b/plugins/search-react/src/components/SearchAutocomplete/SearchAutocompleteDefaultOption.stories.tsx index f671546efa..3c4cfd8809 100644 --- a/plugins/search-react/src/components/SearchAutocomplete/SearchAutocompleteDefaultOption.stories.tsx +++ b/plugins/search-react/src/components/SearchAutocomplete/SearchAutocompleteDefaultOption.stories.tsx @@ -16,7 +16,8 @@ import React, { ComponentType, PropsWithChildren } from 'react'; -import { Grid, ListItem } from '@material-ui/core'; +import Grid from '@material-ui/core/Grid'; +import ListItem from '@material-ui/core/ListItem'; import LabelIcon from '@material-ui/icons/Label'; import { TestApiProvider } from '@backstage/test-utils'; diff --git a/plugins/search-react/src/components/SearchAutocomplete/SearchAutocompleteDefaultOption.tsx b/plugins/search-react/src/components/SearchAutocomplete/SearchAutocompleteDefaultOption.tsx index db0dc81456..d2227ef0d3 100644 --- a/plugins/search-react/src/components/SearchAutocomplete/SearchAutocompleteDefaultOption.tsx +++ b/plugins/search-react/src/components/SearchAutocomplete/SearchAutocompleteDefaultOption.tsx @@ -15,11 +15,10 @@ */ import React, { ReactNode } from 'react'; -import { - ListItemIcon, - ListItemText, +import ListItemIcon from '@material-ui/core/ListItemIcon'; +import ListItemText, { ListItemTextProps, -} from '@material-ui/core'; +} from '@material-ui/core/ListItemText'; /** * Props for {@link SearchAutocompleteDefaultOption}. diff --git a/plugins/search-react/src/components/SearchBar/SearchBar.stories.tsx b/plugins/search-react/src/components/SearchBar/SearchBar.stories.tsx index f342eed211..852a3a1881 100644 --- a/plugins/search-react/src/components/SearchBar/SearchBar.stories.tsx +++ b/plugins/search-react/src/components/SearchBar/SearchBar.stories.tsx @@ -15,7 +15,8 @@ */ import React, { ComponentType, PropsWithChildren } from 'react'; -import { Grid, makeStyles } from '@material-ui/core'; +import Grid from '@material-ui/core/Grid'; +import { makeStyles } from '@material-ui/core/styles'; import { TestApiProvider } from '@backstage/test-utils'; diff --git a/plugins/search-react/src/components/SearchBar/SearchBar.tsx b/plugins/search-react/src/components/SearchBar/SearchBar.tsx index 7580228c8e..254f39e48e 100644 --- a/plugins/search-react/src/components/SearchBar/SearchBar.tsx +++ b/plugins/search-react/src/components/SearchBar/SearchBar.tsx @@ -19,7 +19,9 @@ import { configApiRef, useApi, } from '@backstage/core-plugin-api'; -import { IconButton, InputAdornment, TextField } from '@material-ui/core'; +import IconButton from '@material-ui/core/IconButton'; +import InputAdornment from '@material-ui/core/InputAdornment'; +import TextField from '@material-ui/core/TextField'; import Button from '@material-ui/core/Button'; import { TextFieldProps } from '@material-ui/core/TextField'; import SearchIcon from '@material-ui/icons/Search'; diff --git a/plugins/search-react/src/components/SearchFilter/SearchFilter.Autocomplete.tsx b/plugins/search-react/src/components/SearchFilter/SearchFilter.Autocomplete.tsx index 35d1f376e5..09f571a4c9 100644 --- a/plugins/search-react/src/components/SearchFilter/SearchFilter.Autocomplete.tsx +++ b/plugins/search-react/src/components/SearchFilter/SearchFilter.Autocomplete.tsx @@ -15,12 +15,12 @@ */ import React, { ChangeEvent, useState } from 'react'; -import { Chip, TextField } from '@material-ui/core'; -import { - Autocomplete, +import Chip from '@material-ui/core/Chip'; +import TextField from '@material-ui/core/TextField'; +import Autocomplete, { AutocompleteGetTagProps, AutocompleteRenderInputParams, -} from '@material-ui/lab'; +} from '@material-ui/lab/Autocomplete'; import { useSearch } from '../../context'; import { useAsyncFilterValues, useDefaultFilterValue } from './hooks'; diff --git a/plugins/search-react/src/components/SearchFilter/SearchFilter.stories.tsx b/plugins/search-react/src/components/SearchFilter/SearchFilter.stories.tsx index 505c1e13c3..028fadc276 100644 --- a/plugins/search-react/src/components/SearchFilter/SearchFilter.stories.tsx +++ b/plugins/search-react/src/components/SearchFilter/SearchFilter.stories.tsx @@ -15,7 +15,8 @@ */ import React, { ComponentType, PropsWithChildren } from 'react'; -import { Grid, Paper } from '@material-ui/core'; +import Grid from '@material-ui/core/Grid'; +import Paper from '@material-ui/core/Paper'; import { TestApiProvider } from '@backstage/test-utils'; diff --git a/plugins/search-react/src/components/SearchFilter/SearchFilter.tsx b/plugins/search-react/src/components/SearchFilter/SearchFilter.tsx index 8579f01caa..acfa6aec3b 100644 --- a/plugins/search-react/src/components/SearchFilter/SearchFilter.tsx +++ b/plugins/search-react/src/components/SearchFilter/SearchFilter.tsx @@ -15,17 +15,15 @@ */ import React, { ReactElement, ChangeEvent } from 'react'; -import { - makeStyles, - FormControl, - FormControlLabel, - InputLabel, - Checkbox, - Select, - MenuItem, - FormLabel, - Typography, -} from '@material-ui/core'; +import FormControl from '@material-ui/core/FormControl'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; +import InputLabel from '@material-ui/core/InputLabel'; +import Checkbox from '@material-ui/core/Checkbox'; +import Select from '@material-ui/core/Select'; +import MenuItem from '@material-ui/core/MenuItem'; +import FormLabel from '@material-ui/core/FormLabel'; +import Typography from '@material-ui/core/Typography'; +import { makeStyles } from '@material-ui/core/styles'; import { useSearch } from '../../context'; import { diff --git a/plugins/search-react/src/components/SearchPagination/SearchPagination.stories.tsx b/plugins/search-react/src/components/SearchPagination/SearchPagination.stories.tsx index dfb4e7ea91..84d47b94cd 100644 --- a/plugins/search-react/src/components/SearchPagination/SearchPagination.stories.tsx +++ b/plugins/search-react/src/components/SearchPagination/SearchPagination.stories.tsx @@ -15,7 +15,7 @@ */ import React, { ComponentType, PropsWithChildren } from 'react'; -import { Grid } from '@material-ui/core'; +import Grid from '@material-ui/core/Grid'; import { TestApiProvider } from '@backstage/test-utils'; diff --git a/plugins/search-react/src/components/SearchPagination/SearchPagination.tsx b/plugins/search-react/src/components/SearchPagination/SearchPagination.tsx index 743d3ccb52..18b4c5f525 100644 --- a/plugins/search-react/src/components/SearchPagination/SearchPagination.tsx +++ b/plugins/search-react/src/components/SearchPagination/SearchPagination.tsx @@ -21,7 +21,7 @@ import React, { useCallback, useMemo, } from 'react'; -import { TablePagination } from '@material-ui/core'; +import TablePagination from '@material-ui/core/TablePagination'; import { useSearch } from '../../context'; const encodePageCursor = (pageCursor: number): string => { diff --git a/plugins/search-react/src/components/SearchResult/SearchResult.stories.tsx b/plugins/search-react/src/components/SearchResult/SearchResult.stories.tsx index a64d053dae..bc08270c28 100644 --- a/plugins/search-react/src/components/SearchResult/SearchResult.stories.tsx +++ b/plugins/search-react/src/components/SearchResult/SearchResult.stories.tsx @@ -16,7 +16,8 @@ import React, { ComponentType, PropsWithChildren } from 'react'; -import { List, ListItem } from '@material-ui/core'; +import List from '@material-ui/core/List'; +import ListItem from '@material-ui/core/ListItem'; import DefaultIcon from '@material-ui/icons/InsertDriveFile'; import CustomIcon from '@material-ui/icons/NoteAdd'; diff --git a/plugins/search-react/src/components/SearchResultGroup/SearchResultGroup.stories.tsx b/plugins/search-react/src/components/SearchResultGroup/SearchResultGroup.stories.tsx index 2f497d4568..a016a7c5ed 100644 --- a/plugins/search-react/src/components/SearchResultGroup/SearchResultGroup.stories.tsx +++ b/plugins/search-react/src/components/SearchResultGroup/SearchResultGroup.stories.tsx @@ -21,13 +21,11 @@ import React, { PropsWithChildren, } from 'react'; -import { - Grid, - ListItem, - ListItemIcon, - ListItemText, - MenuItem, -} from '@material-ui/core'; +import Grid from '@material-ui/core/Grid'; +import ListItem from '@material-ui/core/ListItem'; +import ListItemIcon from '@material-ui/core/ListItemIcon'; +import ListItemText from '@material-ui/core/ListItemText'; +import MenuItem from '@material-ui/core/MenuItem'; import DocsIcon from '@material-ui/icons/InsertDriveFile'; import { JsonValue } from '@backstage/types'; diff --git a/plugins/search-react/src/components/SearchResultGroup/SearchResultGroup.test.tsx b/plugins/search-react/src/components/SearchResultGroup/SearchResultGroup.test.tsx index 1d572b371b..66513783d4 100644 --- a/plugins/search-react/src/components/SearchResultGroup/SearchResultGroup.test.tsx +++ b/plugins/search-react/src/components/SearchResultGroup/SearchResultGroup.test.tsx @@ -18,7 +18,7 @@ import React from 'react'; import { screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { MenuItem } from '@material-ui/core'; +import MenuItem from '@material-ui/core/MenuItem'; import DocsIcon from '@material-ui/icons/InsertDriveFile'; import { diff --git a/plugins/search-react/src/components/SearchResultGroup/SearchResultGroup.tsx b/plugins/search-react/src/components/SearchResultGroup/SearchResultGroup.tsx index ea1817193c..428e34981b 100644 --- a/plugins/search-react/src/components/SearchResultGroup/SearchResultGroup.tsx +++ b/plugins/search-react/src/components/SearchResultGroup/SearchResultGroup.tsx @@ -23,20 +23,15 @@ import React, { } from 'react'; import qs from 'qs'; -import { - makeStyles, - Theme, - List, - ListProps, - ListSubheader, - Menu, - MenuItem, - InputBase, - Select, - Chip, - Typography, - TypographyProps, -} from '@material-ui/core'; +import List, { ListProps } from '@material-ui/core/List'; +import ListSubheader from '@material-ui/core/ListSubheader'; +import Menu from '@material-ui/core/Menu'; +import MenuItem from '@material-ui/core/MenuItem'; +import InputBase from '@material-ui/core/InputBase'; +import Select from '@material-ui/core/Select'; +import Chip from '@material-ui/core/Chip'; +import Typography, { TypographyProps } from '@material-ui/core/Typography'; +import { makeStyles, Theme } from '@material-ui/core/styles'; import AddIcon from '@material-ui/icons/Add'; import ArrowRightIcon from '@material-ui/icons/ArrowForwardIos'; diff --git a/plugins/search-react/src/components/SearchResultList/SearchResultList.stories.tsx b/plugins/search-react/src/components/SearchResultList/SearchResultList.stories.tsx index d822d0f52d..5b3bd48d41 100644 --- a/plugins/search-react/src/components/SearchResultList/SearchResultList.stories.tsx +++ b/plugins/search-react/src/components/SearchResultList/SearchResultList.stories.tsx @@ -16,7 +16,10 @@ import React, { ComponentType, useState, PropsWithChildren } from 'react'; -import { Grid, ListItem, ListItemIcon, ListItemText } from '@material-ui/core'; +import Grid from '@material-ui/core/Grid'; +import ListItem from '@material-ui/core/ListItem'; +import ListItemIcon from '@material-ui/core/ListItemIcon'; +import ListItemText from '@material-ui/core/ListItemText'; import { CatalogIcon, Link } from '@backstage/core-components'; import { TestApiProvider, wrapInTestApp } from '@backstage/test-utils'; diff --git a/plugins/search-react/src/components/SearchResultList/SearchResultList.tsx b/plugins/search-react/src/components/SearchResultList/SearchResultList.tsx index 1a539b74a6..5abea8d961 100644 --- a/plugins/search-react/src/components/SearchResultList/SearchResultList.tsx +++ b/plugins/search-react/src/components/SearchResultList/SearchResultList.tsx @@ -16,7 +16,7 @@ import React, { ReactNode } from 'react'; -import { List, ListProps } from '@material-ui/core'; +import List, { ListProps } from '@material-ui/core/List'; import { Progress, diff --git a/plugins/search-react/src/components/SearchResultPager/SearchResultPager.tsx b/plugins/search-react/src/components/SearchResultPager/SearchResultPager.tsx index b4c834a678..14a0dcf395 100644 --- a/plugins/search-react/src/components/SearchResultPager/SearchResultPager.tsx +++ b/plugins/search-react/src/components/SearchResultPager/SearchResultPager.tsx @@ -16,7 +16,8 @@ import React from 'react'; -import { Button, makeStyles } from '@material-ui/core'; +import Button from '@material-ui/core/Button'; +import { makeStyles } from '@material-ui/core/styles'; import ArrowBackIosIcon from '@material-ui/icons/ArrowBackIos'; import ArrowForwardIosIcon from '@material-ui/icons/ArrowForwardIos'; diff --git a/plugins/search-react/src/extensions.test.tsx b/plugins/search-react/src/extensions.test.tsx index febe82dbe1..170dca2b6d 100644 --- a/plugins/search-react/src/extensions.test.tsx +++ b/plugins/search-react/src/extensions.test.tsx @@ -18,7 +18,7 @@ import React from 'react'; import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { ListItemText } from '@material-ui/core'; +import ListItemText from '@material-ui/core/ListItemText'; import { renderInTestApp, diff --git a/plugins/search-react/src/extensions.tsx b/plugins/search-react/src/extensions.tsx index 132fad25b5..75b6eaaa1f 100644 --- a/plugins/search-react/src/extensions.tsx +++ b/plugins/search-react/src/extensions.tsx @@ -33,7 +33,8 @@ import { } from '@backstage/core-plugin-api'; import { SearchDocument, SearchResult } from '@backstage/plugin-search-common'; -import { ListItem, List, ListProps, ListItemProps } from '@material-ui/core'; +import List, { ListProps } from '@material-ui/core/List'; +import ListItem, { ListItemProps } from '@material-ui/core/ListItem'; import { DefaultResultListItem } from './components/DefaultResultListItem'; From b2389ece4bac2809e1ed5fc6b3f06a68d80ad48a Mon Sep 17 00:00:00 2001 From: Steve Zhang Date: Sat, 13 Apr 2024 22:56:38 -0400 Subject: [PATCH 142/151] updated toLocaleLowerCase with toLowerCase() instead Signed-off-by: Steve Zhang --- plugins/kubernetes-backend/src/service/KubernetesProxy.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/kubernetes-backend/src/service/KubernetesProxy.ts b/plugins/kubernetes-backend/src/service/KubernetesProxy.ts index faf4a90846..b89ed088fe 100644 --- a/plugins/kubernetes-backend/src/service/KubernetesProxy.ts +++ b/plugins/kubernetes-backend/src/service/KubernetesProxy.ts @@ -172,8 +172,7 @@ export class KubernetesProxy { )?.toString(), }; - const authHeader = - req.headers[HEADER_KUBERNETES_AUTH.toLocaleLowerCase()]; + const authHeader = req.headers[HEADER_KUBERNETES_AUTH.toLowerCase()]; if (typeof authHeader === 'string') { req.headers.authorization = authHeader; } else { From 16b2f7a3eb45796705f82538e96389e436955697 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 13 Apr 2024 13:14:30 +0200 Subject: [PATCH 143/151] app-backend: added migration test + fix namespace migration Signed-off-by: Patrik Oldsberg --- .../20240113144027_assets-namespace.js | 8 +- .../src/lib/assets/StaticAssetsStore.ts | 2 +- plugins/app-backend/src/migrations.test.ts | 141 ++++++++++++++++++ 3 files changed, 148 insertions(+), 3 deletions(-) create mode 100644 plugins/app-backend/src/migrations.test.ts diff --git a/plugins/app-backend/migrations/20240113144027_assets-namespace.js b/plugins/app-backend/migrations/20240113144027_assets-namespace.js index b533d35dfa..c39407d08b 100644 --- a/plugins/app-backend/migrations/20240113144027_assets-namespace.js +++ b/plugins/app-backend/migrations/20240113144027_assets-namespace.js @@ -23,7 +23,8 @@ exports.up = async function up(knex) { await knex.schema.alterTable('static_assets_cache', table => { // The namespace is used to allow operations on asset groups, e.g. delete all assets in a namespace table.string('namespace').comment('The namespace of the file'); - table.index('namespace', 'static_asset_cache_namespace_idx'); + table.dropPrimary(); + table.primary(['namespace', 'path']); }); }; @@ -31,8 +32,11 @@ exports.up = async function up(knex) { * @param {import('knex').Knex} knex */ exports.down = async function down(knex) { + await knex.delete().from('static_assets_cache').whereNotNull('namespace'); + await knex.schema.alterTable('static_assets_cache', table => { - table.dropIndex([], 'static_asset_cache_namespace_idx'); + table.dropPrimary(); table.dropColumn('namespace'); + table.primary(['path']); }); }; diff --git a/plugins/app-backend/src/lib/assets/StaticAssetsStore.ts b/plugins/app-backend/src/lib/assets/StaticAssetsStore.ts index 43bd38030f..27573300e7 100644 --- a/plugins/app-backend/src/lib/assets/StaticAssetsStore.ts +++ b/plugins/app-backend/src/lib/assets/StaticAssetsStore.ts @@ -120,7 +120,7 @@ export class StaticAssetsStore implements StaticAssetProvider { content: await asset.content(), namespace: this.#namespace, }) - .onConflict('path') + .onConflict(['namespace', 'path']) .ignore(); } } diff --git a/plugins/app-backend/src/migrations.test.ts b/plugins/app-backend/src/migrations.test.ts new file mode 100644 index 0000000000..8a413559d2 --- /dev/null +++ b/plugins/app-backend/src/migrations.test.ts @@ -0,0 +1,141 @@ +/* + * 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 { Knex } from 'knex'; +import { TestDatabases } from '@backstage/backend-test-utils'; +import fs from 'fs'; + +const migrationsDir = `${__dirname}/../migrations`; +const migrationsFiles = fs.readdirSync(migrationsDir).sort(); + +async function migrateUpOnce(knex: Knex): Promise { + await knex.migrate.up({ directory: migrationsDir }); +} + +async function migrateDownOnce(knex: Knex): Promise { + await knex.migrate.down({ directory: migrationsDir }); +} + +async function migrateUntilBefore(knex: Knex, target: string): Promise { + const index = migrationsFiles.indexOf(target); + if (index === -1) { + throw new Error(`Migration ${target} not found`); + } + for (let i = 0; i < index; i++) { + await migrateUpOnce(knex); + } +} + +jest.setTimeout(60_000); + +describe('migrations', () => { + const databases = TestDatabases.create(); + + it.each(databases.eachSupportedId())( + '20211229105307_init.js, %p', + async databaseId => { + const knex = await databases.init(databaseId); + + await migrateUntilBefore(knex, '20211229105307_init.js'); + await migrateUpOnce(knex); + + await knex('static_assets_cache').insert({ + path: 'main.js', + content: Buffer.from('some-script'), + last_modified_at: knex.fn.now(), + }); + + await expect(knex('static_assets_cache')).resolves.toEqual([ + { + path: 'main.js', + content: Buffer.from('some-script'), + last_modified_at: expect.anything(), + }, + ]); + + await migrateDownOnce(knex); + + // This looks odd - you might expect a .toThrow at the end but that + // actually is flaky for some reason specifically on sqlite when + // performing multiple runs in sequence + await expect(knex('static_assets_cache')).rejects.toEqual( + expect.anything(), + ); + + await knex.destroy(); + }, + ); + + it.each(databases.eachSupportedId())( + '20240113144027_assets-namespace.js, %p', + async databaseId => { + const knex = await databases.init(databaseId); + + await migrateUntilBefore(knex, '20240113144027_assets-namespace.js'); + + await knex('static_assets_cache').insert({ + path: 'main.js', + content: Buffer.from('some-script'), + last_modified_at: knex.fn.now(), + }); + + await migrateUpOnce(knex); + + await expect(knex('static_assets_cache')).resolves.toEqual([ + { + path: 'main.js', + content: Buffer.from('some-script'), + namespace: 'default', + last_modified_at: expect.anything(), + }, + ]); + + await knex('static_assets_cache').insert({ + path: 'main.js', + content: Buffer.from('other-script'), + namespace: 'other', + last_modified_at: knex.fn.now(), + }); + + await expect(knex('static_assets_cache')).resolves.toEqual([ + { + path: 'main.js', + content: Buffer.from('some-script'), + namespace: 'default', + last_modified_at: expect.anything(), + }, + { + path: 'main.js', + content: Buffer.from('other-script'), + namespace: 'other', + last_modified_at: expect.anything(), + }, + ]); + + await migrateDownOnce(knex); + + await expect(knex('static_assets_cache')).resolves.toEqual([ + { + path: 'main.js', + content: Buffer.from('some-script'), + last_modified_at: expect.anything(), + }, + ]); + + await knex.destroy(); + }, + ); +}); From ef4655546dec86e69c75c5743b58cc4f2f454c1f Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 13 Apr 2024 14:03:24 +0200 Subject: [PATCH 144/151] app-backend: always test towards MySQL Signed-off-by: Patrik Oldsberg --- .../app-backend/src/lib/assets/StaticAssetsStore.test.ts | 4 +--- plugins/app-backend/src/setupTests.ts | 6 +++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/app-backend/src/lib/assets/StaticAssetsStore.test.ts b/plugins/app-backend/src/lib/assets/StaticAssetsStore.test.ts index d975751676..41408396fe 100644 --- a/plugins/app-backend/src/lib/assets/StaticAssetsStore.test.ts +++ b/plugins/app-backend/src/lib/assets/StaticAssetsStore.test.ts @@ -36,9 +36,7 @@ function createDatabaseManager( jest.setTimeout(60_000); describe('StaticAssetsStore', () => { - const databases = TestDatabases.create({ - ids: ['MYSQL_8', 'POSTGRES_16', 'POSTGRES_12', 'SQLITE_3'], - }); + const databases = TestDatabases.create(); it.each(databases.eachSupportedId())( 'should store and retrieve assets, %p', diff --git a/plugins/app-backend/src/setupTests.ts b/plugins/app-backend/src/setupTests.ts index d3232290a7..4ed508a382 100644 --- a/plugins/app-backend/src/setupTests.ts +++ b/plugins/app-backend/src/setupTests.ts @@ -14,4 +14,8 @@ * limitations under the License. */ -export {}; +import { TestDatabases } from '@backstage/backend-test-utils'; + +TestDatabases.setDefaults({ + ids: ['MYSQL_8', 'POSTGRES_16', 'POSTGRES_12', 'SQLITE_3'], +}); From cae72e6cdbf276c99604c9d4e2a53d576517bb43 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 14 Apr 2024 12:02:41 +0200 Subject: [PATCH 145/151] app-backend: non-nullable assets store namespace, default to default instead Signed-off-by: Patrik Oldsberg --- .../migrations/20240113144027_assets-namespace.js | 10 ++++++++-- .../app-backend/src/lib/assets/StaticAssetsStore.ts | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/plugins/app-backend/migrations/20240113144027_assets-namespace.js b/plugins/app-backend/migrations/20240113144027_assets-namespace.js index c39407d08b..de6ca2e333 100644 --- a/plugins/app-backend/migrations/20240113144027_assets-namespace.js +++ b/plugins/app-backend/migrations/20240113144027_assets-namespace.js @@ -22,7 +22,10 @@ exports.up = async function up(knex) { await knex.schema.alterTable('static_assets_cache', table => { // The namespace is used to allow operations on asset groups, e.g. delete all assets in a namespace - table.string('namespace').comment('The namespace of the file'); + table + .string('namespace') + .defaultTo('default') + .comment('The namespace of the file'); table.dropPrimary(); table.primary(['namespace', 'path']); }); @@ -32,7 +35,10 @@ exports.up = async function up(knex) { * @param {import('knex').Knex} knex */ exports.down = async function down(knex) { - await knex.delete().from('static_assets_cache').whereNotNull('namespace'); + await knex + .delete() + .from('static_assets_cache') + .whereNot('namespace', 'default'); await knex.schema.alterTable('static_assets_cache', table => { table.dropPrimary(); diff --git a/plugins/app-backend/src/lib/assets/StaticAssetsStore.ts b/plugins/app-backend/src/lib/assets/StaticAssetsStore.ts index 27573300e7..038d5bd9bf 100644 --- a/plugins/app-backend/src/lib/assets/StaticAssetsStore.ts +++ b/plugins/app-backend/src/lib/assets/StaticAssetsStore.ts @@ -50,7 +50,7 @@ export interface StaticAssetsStoreOptions { export class StaticAssetsStore implements StaticAssetProvider { #db: Knex; #logger: Logger; - #namespace: string | null; + #namespace: string; static async create(options: StaticAssetsStoreOptions) { const { database } = options; @@ -68,7 +68,7 @@ export class StaticAssetsStore implements StaticAssetProvider { private constructor(client: Knex, logger: Logger, namespace?: string) { this.#db = client; this.#logger = logger; - this.#namespace = namespace ?? null; + this.#namespace = namespace ?? 'default'; } /** From e6810313d92248e9e4adb6249005e3e654880670 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 14 Apr 2024 12:36:23 +0200 Subject: [PATCH 146/151] app-backend: fix asset store indexing for MySQL Signed-off-by: Patrik Oldsberg --- .../20240113144027_assets-namespace.js | 42 +++++++++++++++++-- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/plugins/app-backend/migrations/20240113144027_assets-namespace.js b/plugins/app-backend/migrations/20240113144027_assets-namespace.js index de6ca2e333..6e94ac1531 100644 --- a/plugins/app-backend/migrations/20240113144027_assets-namespace.js +++ b/plugins/app-backend/migrations/20240113144027_assets-namespace.js @@ -20,29 +20,63 @@ * @param {import('knex').Knex} knex */ exports.up = async function up(knex) { + const isMySQL = knex.client.config.client.includes('mysql'); + await knex.schema.alterTable('static_assets_cache', table => { // The namespace is used to allow operations on asset groups, e.g. delete all assets in a namespace table .string('namespace') .defaultTo('default') .comment('The namespace of the file'); - table.dropPrimary(); - table.primary(['namespace', 'path']); + + if (!isMySQL) { + table.dropPrimary(); + table.primary(['namespace', 'path']); + } }); + + if (isMySQL) { + await knex.schema.raw( + 'drop index static_assets_cache_path_idx on static_assets_cache;', + ); + await knex.schema.raw( + 'create unique index static_assets_cache_path_idx on static_assets_cache(namespace, path(254));', + ); + } }; /** * @param {import('knex').Knex} knex */ exports.down = async function down(knex) { + const isMySQL = knex.client.config.client.includes('mysql'); + await knex .delete() .from('static_assets_cache') .whereNot('namespace', 'default'); + if (isMySQL) { + await knex.schema.raw( + 'drop index static_assets_cache_path_idx on static_assets_cache;', + ); + } + await knex.schema.alterTable('static_assets_cache', table => { - table.dropPrimary(); + if (!isMySQL) { + table.dropPrimary(); + } + table.dropColumn('namespace'); - table.primary(['path']); + + if (!isMySQL) { + table.primary(['path']); + } }); + + if (isMySQL) { + await knex.schema.raw( + 'create unique index static_assets_cache_path_idx on static_assets_cache(path(254));', + ); + } }; From 46d09b8b0fb973242ba244cb4c603254c5d40406 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 14 Apr 2024 12:56:30 +0200 Subject: [PATCH 147/151] Update .changeset/mighty-humans-tan.md Signed-off-by: Patrik Oldsberg --- .changeset/mighty-humans-tan.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/mighty-humans-tan.md b/.changeset/mighty-humans-tan.md index cc3a35ccba..0f079e70e1 100644 --- a/.changeset/mighty-humans-tan.md +++ b/.changeset/mighty-humans-tan.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-scaffolder-backend-module-gerrit': minor +'@backstage/plugin-scaffolder-backend-module-gerrit': patch --- Add examples for `publish:gerrit:review` scaffolder action & improve related tests From 6cfb8268628cfcde08c5c4f9382b080daf513c8e Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Sun, 14 Apr 2024 20:08:59 +0100 Subject: [PATCH 148/151] refactor: remove unneded changeset Signed-off-by: Timothy Deakin --- .changeset/weak-files-admire.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .changeset/weak-files-admire.md diff --git a/.changeset/weak-files-admire.md b/.changeset/weak-files-admire.md deleted file mode 100644 index 84f0033810..0000000000 --- a/.changeset/weak-files-admire.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@internal/plugin-todo-list': patch ---- - -Added the `no-top-level-material-ui-4-imports` ESLint rule to aid with the migration to Material UI v5 From 1343e888e6da50fcf4371e77c13b4edc421a4d3b Mon Sep 17 00:00:00 2001 From: Timothy Deakin Date: Sun, 14 Apr 2024 20:31:26 +0100 Subject: [PATCH 149/151] refactor: color import Signed-off-by: Timothy Deakin --- .../src/components/WorkflowRunsCard/WorkflowRunsCard.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/github-actions/src/components/WorkflowRunsCard/WorkflowRunsCard.tsx b/plugins/github-actions/src/components/WorkflowRunsCard/WorkflowRunsCard.tsx index 4cb48a58d9..d3fe845c14 100644 --- a/plugins/github-actions/src/components/WorkflowRunsCard/WorkflowRunsCard.tsx +++ b/plugins/github-actions/src/components/WorkflowRunsCard/WorkflowRunsCard.tsx @@ -45,8 +45,7 @@ import { buildRouteRef } from '../../routes'; import { getProjectNameFromEntity } from '../getProjectNameFromEntity'; import { getHostnameFromEntity } from '../getHostnameFromEntity'; -import Alert from '@material-ui/lab/Alert'; -import { Color } from '@material-ui/lab/'; +import Alert, { Color } from '@material-ui/lab/Alert'; import { Entity } from '@backstage/catalog-model'; const useStyles = makeStyles((theme: Theme) => From cab73cf83cfb8f33173b008f44f2a53b184e72f0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 14 Apr 2024 20:18:44 +0000 Subject: [PATCH 150/151] fix(deps): update dependency elastic-builder to v2.28.1 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index bc5bddceaf..f7eac3cb97 100644 --- a/yarn.lock +++ b/yarn.lock @@ -26152,8 +26152,8 @@ __metadata: linkType: hard "elastic-builder@npm:^2.16.0": - version: 2.25.0 - resolution: "elastic-builder@npm:2.25.0" + version: 2.28.1 + resolution: "elastic-builder@npm:2.28.1" dependencies: lodash.has: ^4.5.2 lodash.hasin: ^4.5.2 @@ -26163,7 +26163,7 @@ __metadata: lodash.isobject: ^3.0.2 lodash.isstring: ^4.0.1 lodash.omit: ^4.5.0 - checksum: 576b1060174cd5b62f5f802f9b947a3481ed0477c9c1ccbfe572f6ef4c3287c7ba0f5101cf6d32a69e1097e36fb95bded4066ef1ba195176f3b6b8c546d66e6d + checksum: 5a3fb79441942825005e2bfa798c113809c3198b3cc711d3500894677eb212bb2bf100c5110bedafe354e154e035de1bbeebb7c593fb1aaacc58f98f0d8cd2bc languageName: node linkType: hard From 78309cacc36cdcda2db8b424d2cc612c26073fe1 Mon Sep 17 00:00:00 2001 From: Steve Zhang Date: Sun, 14 Apr 2024 23:34:34 -0400 Subject: [PATCH 151/151] changed toLocaleLowerCase('en-US') Signed-off-by: Steve Zhang --- plugins/kubernetes-backend/src/service/KubernetesProxy.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/kubernetes-backend/src/service/KubernetesProxy.ts b/plugins/kubernetes-backend/src/service/KubernetesProxy.ts index b89ed088fe..09da414d0e 100644 --- a/plugins/kubernetes-backend/src/service/KubernetesProxy.ts +++ b/plugins/kubernetes-backend/src/service/KubernetesProxy.ts @@ -172,7 +172,8 @@ export class KubernetesProxy { )?.toString(), }; - const authHeader = req.headers[HEADER_KUBERNETES_AUTH.toLowerCase()]; + const authHeader = + req.headers[HEADER_KUBERNETES_AUTH.toLocaleLowerCase('en-US')]; if (typeof authHeader === 'string') { req.headers.authorization = authHeader; } else {