-
-
Notifications
You must be signed in to change notification settings - Fork 596
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
refactor: Replace require with import statement #2143
Conversation
Thanks for opening this pull request!
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## alpha #2143 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 61 64 +3
Lines 6186 6360 +174
Branches 1499 1509 +10
==========================================
+ Hits 6186 6360 +174 ☔ View full report in Codecov by Sentry. |
🎉 This change has been released in version 5.2.0-alpha.2 |
🎉 This change has been released in version 5.2.0-beta.1 |
🎉 This change has been released in version 5.2.0 |
Pull Request
Issue
The compilers cannot optimize the imports and remove unused code.
See discussion #1399
Approach
The only files using
require
are as follows:CryptoController - Babel doesn't strip out unused imports
EventEmitter - Babel doesn't strip out unused imports
ParseFile - Can't use ES6 modules like https and http
RESTController - xmlhttprequest node package can't be imported
CoreManager - Can't get package version from package.json using import
Convert the following files to TS