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

fix: add default export #1740

Merged
merged 3 commits into from Nov 14, 2023
Merged

fix: add default export #1740

merged 3 commits into from Nov 14, 2023

Conversation

robertsLando
Copy link
Member

@robertsLando robertsLando commented Nov 14, 2023

This adds default export to make it work on nodejs too so this module can be imported in the same way in all environments (browser and nodejs):

import mqtt from 'mqtt'

Fixes #1738

This allows to also import mqtt on NodeJS like on browsers: `import mqtt from 'mqtt'`
Copy link

codecov bot commented Nov 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (365e7a0) 81.03% compared to head (a8ffa7c) 81.08%.

❗ Current head a8ffa7c differs from pull request most recent head fe2a995. Consider uploading reports for the commit fe2a995 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1740      +/-   ##
==========================================
+ Coverage   81.03%   81.08%   +0.04%     
==========================================
  Files          21       22       +1     
  Lines        1366     1369       +3     
  Branches      323      323              
==========================================
+ Hits         1107     1110       +3     
  Misses        182      182              
  Partials       77       77              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@robertsLando robertsLando merged commit fdb498f into main Nov 14, 2023
6 checks passed
@robertsLando robertsLando deleted the default-export branch November 14, 2023 09:25
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.

I can no longer use the same import code on node and browser since upgrading to 5.2.1.
1 participant