This is an automated email from the ASF dual-hosted git repository. hainenber pushed a commit to branch fix/pin-react-error-boundary-v6-0-0-for-react-17-peer-dep in repository https://gitbox.apache.org/repos/asf/superset.git
commit 1a57b8d76c5ac36c3c685c696682ac326d0d414f Author: hainenber <[email protected]> AuthorDate: Thu Feb 5 22:39:52 2026 +0700 fix(deps): pin `react-error-boundary` to 6.0.0 for React 17 peer dep constraint Signed-off-by: hainenber <[email protected]> --- .github/dependabot.yml | 1 + superset-frontend/package-lock.json | 23 ++++++++++++---------- .../packages/superset-ui-core/package.json | 2 +- .../src/chart/components/FallbackComponent.tsx | 3 +-- .../chart/components/FallbackComponent.test.tsx | 2 +- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c01258ea8b9..9fbb6d5d96d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -345,6 +345,7 @@ updates: # not until React >= 18.0.0 - dependency-name: "react-markdown" - dependency-name: "remark-gfm" + - dependency-name: "react-error-boundary" schedule: interval: "daily" labels: diff --git a/superset-frontend/package-lock.json b/superset-frontend/package-lock.json index bf4b0220dc4..2665ab3f76f 100644 --- a/superset-frontend/package-lock.json +++ b/superset-frontend/package-lock.json @@ -50001,15 +50001,6 @@ "dev": true, "license": "MIT" }, - "node_modules/react-error-boundary": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-6.1.0.tgz", - "integrity": "sha512-02k9WQ/mUhdbXir0tC1NiMesGzRPaCsJEWU/4bcFrbY1YMZOtHShtZP6zw0SJrBWA/31H0KT9/FgdL8+sPKgHA==", - "license": "MIT", - "peerDependencies": { - "react": "^18.0.0 || ^19.0.0" - } - }, "node_modules/react-google-recaptcha": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/react-google-recaptcha/-/react-google-recaptcha-3.1.0.tgz", @@ -63770,7 +63761,7 @@ "re-resizable": "^6.11.2", "react-ace": "^14.0.1", "react-draggable": "^4.5.0", - "react-error-boundary": "^6.1.0", + "react-error-boundary": "6.0.0", "react-js-cron": "^5.2.0", "react-markdown": "^8.0.7", "react-resize-detector": "^7.1.2", @@ -64843,6 +64834,18 @@ "react-dom": "^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, + "packages/superset-ui-core/node_modules/react-error-boundary": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-6.0.0.tgz", + "integrity": "sha512-gdlJjD7NWr0IfkPlaREN2d9uUZUlksrfOx7SX62VRerwXbMY6ftGCIZua1VG1aXFNOimhISsTq+Owp725b9SiA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.12.5" + }, + "peerDependencies": { + "react": ">=16.13.1" + } + }, "packages/superset-ui-core/node_modules/react-js-cron": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/react-js-cron/-/react-js-cron-5.2.0.tgz", diff --git a/superset-frontend/packages/superset-ui-core/package.json b/superset-frontend/packages/superset-ui-core/package.json index 1275e8cf1c1..5a7cec82f71 100644 --- a/superset-frontend/packages/superset-ui-core/package.json +++ b/superset-frontend/packages/superset-ui-core/package.json @@ -55,7 +55,7 @@ "react-resize-detector": "^7.1.2", "react-syntax-highlighter": "^16.1.0", "react-ultimate-pagination": "^1.3.2", - "react-error-boundary": "^6.1.0", + "react-error-boundary": "6.0.0", "react-markdown": "^8.0.7", "regenerator-runtime": "^0.14.1", "rehype-raw": "^7.0.0", diff --git a/superset-frontend/packages/superset-ui-core/src/chart/components/FallbackComponent.tsx b/superset-frontend/packages/superset-ui-core/src/chart/components/FallbackComponent.tsx index df88ff4b540..e18ce7f313d 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/components/FallbackComponent.tsx +++ b/superset-frontend/packages/superset-ui-core/src/chart/components/FallbackComponent.tsx @@ -20,7 +20,6 @@ import { t } from '@apache-superset/core'; import { SupersetTheme } from '@apache-superset/core/ui'; import { FallbackPropsWithDimension } from './SuperChart'; -import { getErrorMessage } from 'react-error-boundary'; export type Props = Partial<FallbackPropsWithDimension>; @@ -39,7 +38,7 @@ export default function FallbackComponent({ error, height, width }: Props) { <div> <b>{t('Oops! An error occurred!')}</b> </div> - <code>{error ? getErrorMessage(error) : 'Unknown Error'}</code> + <code>{error ? error.toString() : 'Unknown Error'}</code> </div> </div> ); diff --git a/superset-frontend/packages/superset-ui-core/test/chart/components/FallbackComponent.test.tsx b/superset-frontend/packages/superset-ui-core/test/chart/components/FallbackComponent.test.tsx index 20b6600592f..22c5ceec0be 100644 --- a/superset-frontend/packages/superset-ui-core/test/chart/components/FallbackComponent.test.tsx +++ b/superset-frontend/packages/superset-ui-core/test/chart/components/FallbackComponent.test.tsx @@ -31,7 +31,7 @@ const ERROR = new Error('CaffeineOverLoadException'); test('renders error only', () => { const { getByText } = setup({ error: ERROR }); - expect(getByText('CaffeineOverLoadException')).toBeInTheDocument(); + expect(getByText('Error: CaffeineOverLoadException')).toBeInTheDocument(); }); test('renders when nothing is given', () => {
