Skip to content

Convert @bugsnag/core/lib/iserror to TypeScript #2422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: integration/typescript
Choose a base branch
from

Conversation

AnastasiiaSvietlova
Copy link
Contributor

Goal

Convert @bugsnag/core/lib/iserror to TypeScript

Testing

Covered by existing end to end and unit tests

@AnastasiiaSvietlova AnastasiiaSvietlova changed the title Plat 13700 iserror Convert @bugsnag/core/lib/iserror to TypeScript Apr 17, 2025
Copy link

github-actions bot commented Apr 22, 2025

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 81.47 kB 18.86 kB
After 81.49 kB 18.78 kB
± ⚠️ +20 bytes -78 bytes

code coverage diff

<temporarily disabled>

Generated by 🚫 dangerJS against ddfee82

@AnastasiiaSvietlova AnastasiiaSvietlova marked this pull request as ready for review April 23, 2025 06:45
@@ -1 +0,0 @@
module.exports = require('iserror')
Copy link
Member

Choose a reason for hiding this comment

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

now that we've replicated this code in TS, we can remove the dependency on this library from packages/core/package.json

@@ -1,5 +1,4 @@
import { Config, Plugin } from '@bugsnag/core'
import isError from '@bugsnag/core/lib/iserror'
import { isError, Config, Plugin } from '@bugsnag/core'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
import { isError, Config, Plugin } from '@bugsnag/core'
import { isError } from '@bugsnag/core'
import type { Config, Plugin } from '@bugsnag/core'

Copy link
Member

@gingerbenw gingerbenw left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Comment on lines +1 to +2
import { isError } from '@bugsnag/core'
import type { Config, Plugin } from '@bugsnag/core'
Copy link
Member

Choose a reason for hiding this comment

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

👌🏻 good separation of types and functionality here

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