Skip to content
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

Load surrounding code from paths relative the project root #1405

Merged

Conversation

imjoehaines
Copy link
Contributor

Goal

This allows the plugin to work if the project root has already been stripped before it runs. If there is no project root, or the file path is absolute, there should be no change in behaviour

This allows the plugin to work if the project root has already been
stripped before it runs
@imjoehaines imjoehaines requested a review from bengourley May 13, 2021 14:47
@github-actions
Copy link

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 40.87 kB 12.62 kB
After 40.87 kB 12.62 kB
± No change No change

code coverage diff

Ok File Lines Branches Functions Statements
/home/runner/work/bugsnag-js/bugsnag-js/packages/plugin-node-surrounding-code/surrounding-code.js 96.67%
(+0.12%)
81.82%
(+0%)
95.65%
(+0%)
94.37%
(+0.17%)

Total:

Lines Branches Functions Statements
82.48%(+0.01%) 72.08%(+0%) 83.48%(+0%) 81.5%(+0%)

Generated by 🚫 dangerJS against 1170ae7

Copy link
Contributor

@bengourley bengourley 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. Are you planning to add it to Electron in a separate PR?

@imjoehaines
Copy link
Contributor Author

Looks good. Are you planning to add it to Electron in a separate PR?

Yes; I'll add some tests for it too

@imjoehaines imjoehaines merged commit 705c5bd into kattrali/add-electron-support May 17, 2021
@imjoehaines imjoehaines deleted the load-code-relative-to-project-root branch May 17, 2021 09:33
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