-
Notifications
You must be signed in to change notification settings - Fork 5
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: fixed issues with ESM conversion not working #223
Conversation
|
Difficult problem to solve since both TypeScript and Jest had specific issues that needed to be addressed. Node firstly required that relative files resolve exactly, so now using the "exports" key to achieve this. Then TypeScript was properly reading this key, but wasn't able to figure out where the .d.ts files were, so now using the "typesVersions" key to achieve this. Then Jest didn't know how to read the "exports" key and generally couldn't test the project anymore, so now using the "enhanced-resolve" resolver to try and resolve files with first (has proper support for ESM, it would appear). Lastly, changed coverage to look at .js files instead of .ts files, so the codecov report is going to look strange here. fix #222
51c8291
to
20230d9
Compare
May need to investigate this: https://github.com/SitePen/remap-istanbul |
20230d9
to
93da8f9
Compare
Codecov Report
@@ Coverage Diff @@
## main #223 +/- ##
===========================================
- Coverage 100.00% 98.43% -1.57%
===========================================
Files 33 34 +1
Lines 309 446 +137
Branches 56 71 +15
===========================================
+ Hits 309 439 +130
- Misses 0 1 +1
- Partials 0 6 +6
Continue to review full report at Codecov.
|
a6fc29d
to
686daa5
Compare
686daa5
to
5305b9a
Compare
Will reduce code coverage, but only because of more accurate information. |
🎉 This PR is included in version 7.0.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
What issues is this pull request related to?
#222
What changes were made in this pull request?
Difficult problem to solve since both TypeScript and Jest had specific issues that needed to be
addressed.
Node firstly required that relative files resolve exactly, so now using the "exports" key to achieve this.
Then TypeScript was properly reading this key, but wasn't able to figure out where the .d.ts files were, so now using the "typesVersions" key to achieve this.
Then Jest didn't knowhow to read the "exports" key and generally couldn't test the project anymore, so now using the "enhanced-resolve" resolver to try and resolve files with first (has proper support for ESM, it would appear).
Lastly, changed coverage to look at .js files instead of .ts files, so the codecov report is going to look strange here.