-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
fix: allow importing ESM interface and reporters #5563
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
base: main
Are you sure you want to change the base?
fix: allow importing ESM interface and reporters #5563
Conversation
|
Thanks @Lightning00Blade , can you add a unit test that would've failed before but passes with your code changes? |
ad50da1 to
b9d9150
Compare
| @@ -1 +1 @@ | |||
| {".":"12.0.0-beta-2"} | |||
| { ".": "12.0.0-beta-2" } | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm run format changes this also does it on main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, #5569 - that's not intentional.
|
@mark-wiemer I added the requested tests verified they don't pass on I also strongly want to emphasize that PR #5344 should be merged as well, |
Codecov Reportā Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5563 +/- ##
==========================================
- Coverage 93.52% 93.51% -0.02%
==========================================
Files 57 57
Lines 4465 4469 +4
Branches 918 920 +2
==========================================
+ Hits 4176 4179 +3
- Misses 289 290 +1 ā View full report in Codecov by Sentry. š New features to boost your workflow:
|
JoshuaKGoldberg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super. I verified locally that this passes with the repro case in #5562 (comment). Just one more test and I think we'll be good to go! š
| } | ||
| } | ||
| if (bindInterface.default) { | ||
| bindInterface = bindInterface.default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Testing] Codecov's ā is because this line isn't covered in tests. Which is a good point - the test only verifies that the --require form works:
["--require", simpleUiESMPath, "--ui", "simple-ui"]This PR should also test that the --ui form works:
["--ui", simpleUiESMPath]
PR Checklist
status: accepting prsOverview
A very simple (and rough) PR to show case where the issue is. It only unwraps modules
defaultif present.