convert plugin node uncaught eexception from js to ts#2758
Merged
Conversation
|
| Minified | Minfied + Gzipped | |
|---|---|---|
| Before | 48.45 kB |
14.68 kB |
| After | 48.45 kB |
14.68 kB |
| ± | No change | No change |
code coverage diff
| Ok | File | Lines | Branches | Functions | Statements |
|---|---|---|---|---|---|
| ✅ | /home/runner/work/bugsnag-js/bugsnag-js/packages/plugin-node-uncaught-exception/src/uncaught-exception.ts | 100% (+100%) |
76.92% (+76.92%) |
100% (+100%) |
95.65% (+95.65%) |
Total:
| Lines | Branches | Functions | Statements |
|---|---|---|---|
| 77.49%(+0.14%) | 69.4%(+0.07%) | 75.16%(+0.2%) | 76.49%(+0.14%) |
SB-jigneshR
previously approved these changes
Jun 8, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Converts @bugsnag/plugin-node-uncaught-exception from a single JS entrypoint to a TypeScript source module, adding standard Rollup-based ESM/CJS builds and updating tests to target the TS implementation.
Changes:
- Replaced the JS implementation with
src/uncaught-exception.ts(TypeScript) while keeping the same runtime behavior. - Added package-level build tooling (
rollup.config.mjs,tsconfig.json) and updatedpackage.jsonto publishdist/esm+dist/cjswith modernexports. - Updated unit tests to import the TS source module.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/plugin-node-uncaught-exception/uncaught-exception.js | Removed legacy JS implementation (replaced by TS build output). |
| packages/plugin-node-uncaught-exception/src/uncaught-exception.ts | New TypeScript implementation of the uncaught exception process handler plugin. |
| packages/plugin-node-uncaught-exception/test/uncaught-exception.test.ts | Updated tests to import the TS source and avoid calling optional destroy unsafely. |
| packages/plugin-node-uncaught-exception/package.json | Switched to dist outputs with exports map and added build/typecheck scripts. |
| packages/plugin-node-uncaught-exception/rollup.config.mjs | Added Rollup build config using the repo shared Rollup factory. |
| packages/plugin-node-uncaught-exception/tsconfig.json | Added TS project config for the package. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
SB-jigneshR
approved these changes
Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal
convert plugin node uncaught eexception from js to ts
Changeset
convert plugin node uncaught eexception from js to ts
Testing
Unit test case and few e2e test cases