diff --git a/.changeset/spicy-pianos-train.md b/.changeset/spicy-pianos-train.md new file mode 100644 index 0000000000..9a93edb3ce --- /dev/null +++ b/.changeset/spicy-pianos-train.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-airbrake': patch +--- + +Remove the `object-hash` dependency diff --git a/plugins/airbrake/package.json b/plugins/airbrake/package.json index 4959695000..1d25565e1c 100644 --- a/plugins/airbrake/package.json +++ b/plugins/airbrake/package.json @@ -32,7 +32,6 @@ "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", - "object-hash": "^3.0.0", "react-use": "^17.2.4" }, "peerDependencies": { @@ -48,7 +47,6 @@ "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/node": "^16.11.26", - "@types/object-hash": "^2.2.1", "cross-fetch": "^3.1.5", "msw": "^0.49.0" }, diff --git a/plugins/airbrake/src/components/EntityAirbrakeWidget/EntityAirbrakeWidget.tsx b/plugins/airbrake/src/components/EntityAirbrakeWidget/EntityAirbrakeWidget.tsx index 6c2e4b8686..6780b80dbc 100644 --- a/plugins/airbrake/src/components/EntityAirbrakeWidget/EntityAirbrakeWidget.tsx +++ b/plugins/airbrake/src/components/EntityAirbrakeWidget/EntityAirbrakeWidget.tsx @@ -13,9 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { Entity } from '@backstage/catalog-model'; -import React from 'react'; -import { Grid, Typography } from '@material-ui/core'; import { EmptyState, ErrorPanel, @@ -23,12 +22,13 @@ import { MissingAnnotationEmptyState, Progress, } from '@backstage/core-components'; -import hash from 'object-hash'; -import { makeStyles } from '@material-ui/core/styles'; -import { BackstageTheme } from '@backstage/theme'; import { useApi } from '@backstage/core-plugin-api'; -import { airbrakeApiRef } from '../../api'; +import { BackstageTheme } from '@backstage/theme'; +import { Grid, Typography } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core/styles'; +import React from 'react'; import useAsync from 'react-use/lib/useAsync'; +import { airbrakeApiRef } from '../../api'; import { AIRBRAKE_PROJECT_ID_ANNOTATION, useProjectId } from '../useProjectId'; const useStyles = makeStyles(() => ({ @@ -64,8 +64,8 @@ export const EntityAirbrakeWidget = ({ entity }: { entity: Entity }) => { {value.groups?.map(group => ( - {group.errors?.map(groupError => ( - + {group.errors?.map((groupError, i) => ( + {groupError.message} diff --git a/yarn.lock b/yarn.lock index b6252cd8a0..acaed46b03 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4328,10 +4328,8 @@ __metadata: "@testing-library/react": ^12.1.3 "@testing-library/user-event": ^14.0.0 "@types/node": ^16.11.26 - "@types/object-hash": ^2.2.1 cross-fetch: ^3.1.5 msw: ^0.49.0 - object-hash: ^3.0.0 react-use: ^17.2.4 peerDependencies: react: ^16.13.1 || ^17.0.0 @@ -14642,13 +14640,6 @@ __metadata: languageName: node linkType: hard -"@types/object-hash@npm:^2.2.1": - version: 2.2.1 - resolution: "@types/object-hash@npm:2.2.1" - checksum: bbcbf076903e11fa6d61dd5cc365bce2b080b18502ef52672a427443262e465d7b46b8f2821e8cea0307de66aee2eb92ad6e2bed2346acd7c8de118d4123fe3a - languageName: node - linkType: hard - "@types/parse-json@npm:^4.0.0": version: 4.0.0 resolution: "@types/parse-json@npm:4.0.0"