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

Turbomodule changed to never be null, default object used instead #558

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

DariaKunoichi
Copy link

Goal

Remove check for null in turbomodules loading.

Changeset

Added a default proxy for situations where neither new nor old turbomodule can be loaded.

Testing

Changed unit tests for id generation - by default tests always fallback to JS implementation because proxy's return value is empty. But no null check needed.

@DariaKunoichi DariaKunoichi self-assigned this Jan 8, 2025
Copy link

github-actions bot commented Jan 8, 2025

Browser bundle size

NPM build

Package
Before 210.63 kB
After 210.63 kB
± No change

CDN build

Unminified Minfied Minified + gzipped
Before 107.59 kB 40.60 kB 11.89 kB
After 107.59 kB 40.60 kB 11.89 kB
± No change No change No change

Code coverage

Ok File (✨=New File) Lines Branches Functions Statements
🔴 /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/platforms/react-native/lib/NativeBugsnagPerformance.ts 0%
(-100%)
100%
(+0%)
100%
(+0%)
0%
(-100%)
/home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/platforms/react-native/lib/id-generator.ts 100%
(+0%)
100%
(+0%)
100%
(+11.12%)
100%
(+2.5%)
🔴 /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/platforms/react-native/lib/native.ts 100%
(+0%)
75%
(+25%)
85.71%
(-14.29%)
100%
(+0%)
🔴 /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/platforms/react-native/lib/persistence/file-native.ts 25%
(+3.27%)
0%
(-16.66%)
0%
(+0%)
25%
(+10.72%)

Total:

Lines Branches Functions Statements
87.64%(+0.35%) 78.36%(+0.38%) 85.82%(+3.8%) 86.03%(+0.91%)

Generated against 6abad91 on 8 January 2025 at 21:33:31 UTC

@DariaKunoichi DariaKunoichi changed the title Turbomodule changed to never be null, proxy used instead Turbomodule changed to never be null, default object used instead Jan 9, 2025
@DariaKunoichi DariaKunoichi merged commit 3a7424e into feature_remove_fileiolib Jan 9, 2025
35 checks passed
@DariaKunoichi DariaKunoichi deleted the PLAT-13292-nullcheck branch January 9, 2025 12:34
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