Skip to content

Commit

Permalink
build(deps): bump typescript from 5.4.2 to 5.7.2 (#2266)
Browse files Browse the repository at this point in the history
* build(deps): bump typescript from 5.4.2 to 5.7.2

Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.4.2 to 5.7.2.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](microsoft/TypeScript@v5.4.2...v5.7.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix(error-bounbdary): adapting to typescript 5.7

* chore: changeset

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Øyvind Eikeland <[email protected]>
  • Loading branch information
dependabot[bot] and eikeland authored Dec 3, 2024
1 parent fecf3f1 commit 9bb2fde
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 57 deletions.
5 changes: 5 additions & 0 deletions .changeset/beige-teachers-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@equinor/fusion-react-errorboundary': patch
---

Updating error boundary to be compatible with typescript 5.7
10 changes: 5 additions & 5 deletions packages/errorboundary/src/legacy/Fallback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Styled = {
};

export type FallbackProps = {
readonly error: unknown;
readonly error: Error;
readonly errorType?: ErrorType;
readonly message?: React.ReactNode;
readonly resourceName?: string;
Expand Down Expand Up @@ -64,11 +64,11 @@ export const Fallback = (props: FallbackProps): JSX.Element => {
}, [resetBoundary, onTakeAction]);
return (
<Styled.root>
<>
<div>
{props.icon ?? <FallbackIcon errorType={errorType} />}
<Typography variant="h3">{title ?? generateTitle(errorType, resourceName)}</Typography>
<Typography variant="ingress" token={{ color: tokens.colors.text.static_icons__tertiary.hex }}>
{message ?? (error as Error).message}
{message ?? error.message}
</Typography>

{action && (
Expand All @@ -81,12 +81,12 @@ export const Fallback = (props: FallbackProps): JSX.Element => {
<Accordion.Item>
<Accordion.Header style={{ height: 'auto' }}>Error details</Accordion.Header>
<Accordion.Panel>
<Styled.stacktrace>{(error as Error).stack}</Styled.stacktrace>
<Styled.stacktrace>{error.stack}</Styled.stacktrace>
</Accordion.Panel>
</Accordion.Item>
</Accordion>
)}
</>
</div>
</Styled.root>
);
};
104 changes: 52 additions & 52 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9bb2fde

Please sign in to comment.