Skip to content

Convert @bugsnag/plugin-node-in-project to TypeScript #2506

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 5 commits into
base: integration/typescript-node
Choose a base branch
from

Conversation

AnastasiiaSvietlova
Copy link
Contributor

Goal

Convert @bugsnag/plugin-node-in-project to TypeScript

Design

Publish ES modules and convert Node packages to TypeScript

Changeset

Refactor @bugsnag/plugin-node-in-project package

Testing

Covered by existing end to end and unit tests

@AnastasiiaSvietlova AnastasiiaSvietlova changed the base branch from next to integration/typescript-node July 28, 2025 12:22
Copy link

github-actions bot commented Jul 28, 2025

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 78.05 kB 17.31 kB
After 78.05 kB 17.31 kB
± No change No change

code coverage diff

<temporarily disabled>

Generated by 🚫 dangerJS against 984a9a9

@AnastasiiaSvietlova
Copy link
Contributor Author

In test file we have // @ts-expect-error. Do I need to resolve that error?

   const client = new Client({ apiKey: 'api_key', projectRoot: '/app', plugins: [plugin] }, {
     ...schema,
     // @ts-expect-error
     projectRoot: {
       validate: () => true,
       defaultValue: () => '',
       message: ''
     }
   })

},
"devDependencies": {
"@bugsnag/core": "^8.4.0",
"@types/node": "^18.19.74"
Copy link
Member

Choose a reason for hiding this comment

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

did we add this dev dependency in another package? if so, we should be able to just specify it once in the root package

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, actually I'm adding it in all packages. 🤔

Copy link
Contributor Author

@AnastasiiaSvietlova AnastasiiaSvietlova Jul 30, 2025

Choose a reason for hiding this comment

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

I checked, and we do have it in root package.json:

"overrides": {
    "@types/node": "^18",
}

So I delete it and re-run the build. Will do the same with the rest PRs.

gingerbenw
gingerbenw previously approved these changes Jul 30, 2025
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.

No problem with expecting errors in unit tests - looks good to me, just a note on a dev dependency

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