From f26ff99a2fa6b9ed5b6c48b3f16a4ae2e2ab2a20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Fri, 23 Aug 2024 14:31:10 +0200 Subject: [PATCH] fixup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .changeset/cool-poems-hammer.md | 5 + .../ErrorBoundary/ErrorBoundary.test.tsx | 3 +- plugins/search-react/api-report.md | 18 +- .../src/components/SearchBar/SearchBar.tsx | 248 +++++++++--------- 4 files changed, 145 insertions(+), 129 deletions(-) create mode 100644 .changeset/cool-poems-hammer.md diff --git a/.changeset/cool-poems-hammer.md b/.changeset/cool-poems-hammer.md new file mode 100644 index 0000000000..fd5897343e --- /dev/null +++ b/.changeset/cool-poems-hammer.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-search-react': patch +--- + +Slight type tweak to match newer React versions better diff --git a/packages/core-components/src/layout/ErrorBoundary/ErrorBoundary.test.tsx b/packages/core-components/src/layout/ErrorBoundary/ErrorBoundary.test.tsx index 8bfb228f53..c96ab67782 100644 --- a/packages/core-components/src/layout/ErrorBoundary/ErrorBoundary.test.tsx +++ b/packages/core-components/src/layout/ErrorBoundary/ErrorBoundary.test.tsx @@ -77,7 +77,8 @@ describe('', () => { /^The above error occurred in the component:/, ), expect.stringMatching(/^ErrorBoundary/), + expect.stringMatching(/Warning: findDOMNode/), // React warning, unfortunate but currently true ]); - expect(error.length).toEqual(4); + expect(error.length).toEqual(5); }); }); diff --git a/plugins/search-react/api-report.md b/plugins/search-react/api-report.md index b5b06a2904..d151ef1187 100644 --- a/plugins/search-react/api-report.md +++ b/plugins/search-react/api-report.md @@ -9,7 +9,6 @@ import { ApiRef } from '@backstage/core-plugin-api'; import { AsyncState } from 'react-use/esm/useAsync'; 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'; @@ -132,10 +131,23 @@ export type SearchAutocompleteProps