4 ms·
It's quite difficult to write require() to `await import()` due to the introducing of `await`... Now everything needs to become async
by wdb 3y ago
It's quite difficult to write require() to `await import()` due to the introducing of `await`... Now everything needs to become async
- WorldMaker 3y agoIf your upstream has switched to ESM and expects to do async things, then yes, everywhere you depend on that upstream you need to consider those imports async. Yes, it's contagious, but your upstream already caught that contagion. Trying to keep smashing it into a synchronous box seems like a recipe for unexpected bugs. Especially in the case of this experiment where the difference between "works" and "gives the same error it already gives today" is a one keyword change anywhere in the upstream file. That sounds brittle to me and less useful than "everything needs to become async".
- wdb 3y agoJust not upgrading and use patch-package to apply security fixes work so far.