bugsnag / bugsnag-js-performance

Monitor the performance of your JavaScript (web and React Native) and see the results in your BugSnag dashboard.
https://docs.bugsnag.com/performance/integration-guides
MIT License
5 stars 3 forks source link

fix cuid imports #445

Closed djskinner closed 5 months ago

djskinner commented 5 months ago

Goal

Fixes the following error when using esm in node: Named export 'isCuid' not found. The requested module '@bugsnag/cuid' is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export

Testing

github-actions[bot] commented 5 months ago

Browser bundle size

NPM build

Package
Before 184.67 kB
After 184.72 kB
± +54 bytes ⚠️

CDN build

Unminified Minfied Minified + gzipped
Before 92.90 kB 34.91 kB 10.52 kB
After 92.92 kB 34.90 kB 10.52 kB
± +24 bytes ⚠️ -2 bytes 🎉 +2 bytes ⚠️

Code coverage

Ok File (✨=New File) Lines Branches Functions Statements
🔴 /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/core/lib/persistence.ts 92.3%
(+0.64%)
83.33%
(+0%)
100%
(+0%)
92.3%
(+0.64%)
/home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/platforms/react-native/lib/persistence/file-based.ts 94.87%
(+0.14%)
90.9%
(+0%)
100%
(+0%)
95.45%
(+0.11%)

Total:

Lines Branches Functions Statements
87.47%(+0.02%) 78.63%(+0%) 88.27%(+0%) 84.21%(+0.02%)

Generated against 3f25fa60c3097d4667a3a08e7574c761258c15da on 26 April 2024 at 07:10:44 UTC