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

Move Event API conversion to feature flag delegate #1568

Conversation

imjoehaines
Copy link
Contributor

Goal

This is a small refactor to move the function that converts feature flags into the Event API format to the feature flag delegate. Originally it seemed like we'd only need this in the Event class, however it's also necessary in Electron when sending flags to the native client so needs to be somewhere reusable

Testing

A few new tests have been added, but this is also covered by existing unit tests for Event#toJSON

Originally it seemed like we'd only need this in the Event class,
however it's also necessary in Electron when sending flags to the
native client

Therefore this needs to be somewhere reusable, i.e. the feature flag
delegate
@imjoehaines imjoehaines requested a review from djskinner November 5, 2021 11:26
@github-actions
Copy link

github-actions bot commented Nov 5, 2021

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 42.49 kB 12.97 kB
After 42.51 kB 12.98 kB
± ⚠️ +21 bytes ⚠️ +11 bytes

code coverage diff

Ok File Lines Branches Functions Statements
🔴 /home/runner/work/bugsnag-js/bugsnag-js/packages/core/event.js 95.5%
(-0.26%)
88.52%
(-0.37%)
100%
(+0%)
95.8%
(-0.23%)

Total:

Lines Branches Functions Statements
0%(+0%) 0%(+0%) 0%(+0%) 0%(+0%)

Generated by 🚫 dangerJS against 9faaae9

@imjoehaines imjoehaines merged commit 41e585e into integration/feature-flags Nov 9, 2021
@imjoehaines imjoehaines deleted the feature-flags/move-formatting-to-delegate branch November 9, 2021 10:29
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