IssueRaiser

ESM only breaks everything

Following the conversation in: https://github.com/sindresorhus/meta/discussions/15#discussioncomment-1256621 PLEASE PLEASE PLEASE, don't do this yet. ESM is not ready to have a library as major as node-fetch go ESM only. The workarounds you list in the README will not work in all cases. node-fetch is one of the most mocked libraries in existence. This move will cause MANY projects that's sole purpose is to mock node-fetch to cease to work with no real way to work around the problem. PLEASE reconsider. ___ <div align=center> <b>Please be civilized, don't post harsh comment or hatred to node-fetch or that ESM-only is bad.</b><br>...or we will lock this once again. We are here do discus solutions<br>Throw out your frustrations elsewhere. If it has no valuable meaning, then don't post anything at all. <br><br> We spend lots of work trying to be spec compliant and fetch isn't a small piece, it involves many web-components.<br>ESM is one of many spec'ed things such as whatwg:stream, AbortSignal, Blob, File, FormData, EventTarget, FetchEvent, that builds up the hole fetch API for what it's<br> Don't say stuff like "This requires lots of work to be converted into ESM" that is simply not true. There are solutions that don't involve converting your entire codebase to ESM while still being able to import ESM-only packages from CJS. <br>Think how many hours you have saved because you could simply import something that is free & open source that others have put theirs heart and so

Posted by yinzara on Sep 1, 2021, 4:41 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,000 issues0 comments

github (Software)

ESM only breaks everything

yinzaraSep 1, 2021, 4:41 PM

Following the conversation in: https://github.com/sindresorhus/meta/discussions/15#discussioncomment-1256621 PLEASE PLEASE PLEASE, don't do this yet. ESM is not ready to have a library as major as node-fetch go ESM only. The workarounds you list in the README will not work in all cases. node-fetch is one of the most mocked libraries in existence. This move will cause MANY projects that's sole purpose is to mock node-fetch to cease to work with no real way to work around the problem. PLEASE reconsider. ___ <div align=center> <b>Please be civilized, don't post harsh comment or hatred to node-fetch or that ESM-only is bad.</b><br>...or we will lock this once again. We are here do discus solutions<br>Throw out your frustrations elsewhere. If it has no valuable meaning, then don't post anything at all. <br><br> We spend lots of work trying to be spec compliant and fetch isn't a small piece, it involves many web-components.<br>ESM is one of many spec'ed things such as whatwg:stream, AbortSignal, Blob, File, FormData, EventTarget, FetchEvent, that builds up the hole fetch API for what it's<br> Don't say stuff like "This requires lots of work to be converted into ESM" that is simply not true. There are solutions that don't involve converting your entire codebase to ESM while still being able to import ESM-only packages from CJS. <br>Think how many hours you have saved because you could simply import something that is free & open source that others have put theirs heart and so

Comments (0)

No comments yet. Start the discussion.

Comment on this issue