Skip to content

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

Merged
AnastasiiaSvietlova merged 11 commits intointegration/typescriptfrom
PLAT-13700-iserror
May 12, 2025
Merged

Convert @bugsnag/core/lib/iserror to TypeScript#2422
AnastasiiaSvietlova merged 11 commits intointegration/typescriptfrom
PLAT-13700-iserror

Conversation

@AnastasiiaSvietlova
Copy link
Copy Markdown
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
@github-actions
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

@@ -0,0 +1,36 @@
// MIT License

// Copyright (c) 2017 Anton Yefremov
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@tomlongridge please check if this copyright note is good to go. Thank you!

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.

LGTM 👍

@AnastasiiaSvietlova AnastasiiaSvietlova merged commit 7d5787a into integration/typescript May 12, 2025
49 checks passed
@AnastasiiaSvietlova AnastasiiaSvietlova deleted the PLAT-13700-iserror branch May 12, 2025 08:59
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.

3 participants