-
Notifications
You must be signed in to change notification settings - Fork 62
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
feat(modules): build (true) esm, (interop) cjs modules; tests/readme #144
Conversation
This is just a quick rundown of what files need to be changed to use ESM.
|
Thanks, @PythonCreator27, you're so fast 😅 Will be a few days until I have time to work on this again but that's a great help. |
Codecov Report
@@ Coverage Diff @@
## devel #144 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 16 20 +4
Lines 273 334 +61
Branches 77 95 +18
=========================================
+ Hits 273 334 +61
Continue to review full report at Codecov.
|
Merged to devel. Hopefully we'll still have some time before next release and can see if any issues crop up. Can revert if necessary. We have sanity tests to load in both ways, clear README instructions, and I'm using this in an "interop" (babel) project that uses "es-style" CJS modules and all works as expected. |
@gadicc Tests no longer work on windows or WSL. I am trying some hacks and reverting some things to make it work. I think that some parts of this PR will have to be reverted, like the tests. After reverting the .js addition and the changes to the jest config, I still failed to get tests running. Jest ESM support is currently poor, I think that this PR should be held off until ESM support works properly in jest, or at least until tests work on all platforms. |
# [1.11.0](v1.10.4...v1.11.0) (2021-06-01) ### Bug Fixes * **deps:** update dependency ajv to ^8.1.0 ([1769641](1769641)) * **quoteCombine:** resolve `undefined` for missing symbols ([#150](#150)) ([f8c25e3](f8c25e3)) * **testing:** specify jest.js path, not bin ([#170](#170)) ([6772c8e](6772c8e)) ### Features * **options:** accept `date` option ([#186](#186)) ([11b8a72](11b8a72)) * add (friendly) warning when used in the browser ([3c4c5a0](3c4c5a0)), closes [#153](#153) * add insights module ([#169](#169)) ([4603232](4603232)) * **concurrency:** ability to limit max simultaneous requests ([#76](#76)) ([3424d44](3424d44)) * **modules:** build (true) esm, (interop) cjs modules; tests/readme ([#144](#144)) ([2182f6c](2182f6c)) * **setGlobalConfig:** add setGlobalConfig function ([#133](#133)) ([43ebaa4](43ebaa4))
🎉 This PR is included in version 1.11.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Closes #126.
Great resource: https://webreflection.medium.com/a-nodejs-dual-module-deep-dive-8f94ff56210e
Changes
Compile to both ESM and CommonJS modules, supporting both via correct fields in package.json
Type: Other New Feature
Comments/notes