-
Notifications
You must be signed in to change notification settings - Fork 833
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: esm suport #5298
base: main
Are you sure you want to change the base?
fix: esm suport #5298
Conversation
The committers listed above are authorized under a signed CLA. |
The requires were inline for lazy loading |
@Netail This is not too much code so it it not needed for use lazy loading. Also, use require in esm is illegal. |
It's there to avoid loading things that may not exist on all platforms (
ACK - please change the code to use dynamic imports instead to keep in line with the original intentions of the code. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5298 +/- ##
==========================================
- Coverage 94.62% 94.59% -0.04%
==========================================
Files 323 324 +1
Lines 8068 8078 +10
Branches 1637 1637
==========================================
+ Hits 7634 7641 +7
- Misses 434 437 +3
|
I took a look during the holidays: in this particular case as the code is currently written, they don't import any platform-specific feature, they only try to run a command and parse the result, so won't blow up until the function is called, that's why. Functionally it probably wouldn't have been a big deal to refactor/consolidate the modules, but agreed that it is bad form to drop this for no other reason if dynamic imports work on the supported platform. |
👌 I'll create a fix to using dynamic import |
Which problem is this PR solving?
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Short description of the changes
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
check compiled dist has no
require('...')
expressionChecklist: