Skip to content

Convert @bugsnag/core/lib/metadata-delegate to TypeScript#2437

Merged
gingerbenw merged 5 commits intointegration/typescriptfrom
PLAT-13698-metadata-delegate
Jun 24, 2025
Merged

Convert @bugsnag/core/lib/metadata-delegate to TypeScript#2437
gingerbenw merged 5 commits intointegration/typescriptfrom
PLAT-13698-metadata-delegate

Conversation

@AnastasiiaSvietlova
Copy link
Copy Markdown
Contributor

@AnastasiiaSvietlova AnastasiiaSvietlova commented May 12, 2025

Goal

Convert @bugsnag/core/lib/metadata-delegate to TypeScript

Testing

Covered by existing end to end and unit tests

@AnastasiiaSvietlova AnastasiiaSvietlova changed the base branch from next to integration/typescript May 12, 2025 12:22
@AnastasiiaSvietlova AnastasiiaSvietlova changed the title Convert @bugsnag/core/lib/iserrormetadata delegate Convert @bugsnag/core/lib/metadata-delegate to TypeScript May 12, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2025

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 82.15 kB 18.91 kB
After 81.99 kB 18.80 kB
± -156 bytes -102 bytes

code coverage diff

<temporarily disabled>

Generated by 🚫 dangerJS against 45ef2af

@AnastasiiaSvietlova AnastasiiaSvietlova marked this pull request as ready for review May 12, 2025 13:39
Comment on lines 4 to 6
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just double check what these instances of any should be? for example key looks like it should only be string or undefined according to the get function, and section should probably be unknown

Copy link
Copy Markdown
Contributor Author

@AnastasiiaSvietlova AnastasiiaSvietlova May 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked it's usage in other parts of the code. So we use metadataDelegate in client.ts and event.ts. Since these files are already converted to TS, I took them as a source of possible types.
Based on what you're wrote I will change the type of key to string | undefined and in client.ts too.
But the section is always string 🤔

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the question mark in key?: string also allows for undefined so that's probably fine as it was.

gingerbenw
gingerbenw previously approved these changes May 21, 2025
gingerbenw
gingerbenw previously approved these changes Jun 23, 2025
@gingerbenw gingerbenw force-pushed the PLAT-13698-metadata-delegate branch from 05fad9c to f52da9b Compare June 24, 2025 09:35
@gingerbenw gingerbenw enabled auto-merge June 24, 2025 09:36
@gingerbenw gingerbenw merged commit 1009db3 into integration/typescript Jun 24, 2025
48 checks passed
@gingerbenw gingerbenw deleted the PLAT-13698-metadata-delegate branch June 24, 2025 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants