From afc413d5c0a44523f8f4239aaf35d48c5294b5ff Mon Sep 17 00:00:00 2001 From: aramissennyeydd Date: Wed, 19 Jun 2024 09:53:35 -0400 Subject: [PATCH] fix test case failing with react error and update api reports Signed-off-by: aramissennyeydd --- .../src/layout/ErrorBoundary/ErrorBoundary.test.tsx | 5 ++++- packages/repo-tools/cli-report.md | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/core-components/src/layout/ErrorBoundary/ErrorBoundary.test.tsx b/packages/core-components/src/layout/ErrorBoundary/ErrorBoundary.test.tsx index c96ab67782..72b8e4dc95 100644 --- a/packages/core-components/src/layout/ErrorBoundary/ErrorBoundary.test.tsx +++ b/packages/core-components/src/layout/ErrorBoundary/ErrorBoundary.test.tsx @@ -77,7 +77,10 @@ describe('', () => { /^The above error occurred in the component:/, ), expect.stringMatching(/^ErrorBoundary/), - expect.stringMatching(/Warning: findDOMNode/), // React warning, unfortunate but currently true + // React 18.3.0 added error messages for findDOMNode deprecation, https://github.com/facebook/react/commit/c3b283964108b0e8dbcf1f9eb2e7e67815e39dfb. + expect.stringContaining( + 'Warning: findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node%s', + ), ]); expect(error.length).toEqual(5); }); diff --git a/packages/repo-tools/cli-report.md b/packages/repo-tools/cli-report.md index 6e0e4c9b85..9266957886 100644 --- a/packages/repo-tools/cli-report.md +++ b/packages/repo-tools/cli-report.md @@ -14,6 +14,7 @@ Options: Commands: api-reports [options] [paths...] type-deps + peer-deps [options] generate-catalog-info [options] knip-reports [options] [paths...] package [command] @@ -156,6 +157,16 @@ Options: -h, --help ``` +### `backstage-repo-tools peer-deps` + +``` +Usage: backstage-repo-tools peer-deps [options] + +Options: + --fix + -h, --help +``` + ### `backstage-repo-tools repo` ```