techhub.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A hub primarily for passionate technologists, but everyone is welcome

Administered by:

Server stats:

5.2K
active users

1/ #JavaScript / #TypeScript: Is your own code ESM-only in new-ish projects? If not, reply and explain what is preventing you from making the switch.

Examples:
– Important feature for me—mocking node:fs (package mock-fs stopped working with ESM): github.com/rauschma/nodejs-too
– That is based on Node’s new loader hooks which can be used from code (without a CLI option). That is also important to me.
– IIRC, Jest didn’t support ESM for a long time. Does it now? Some people have switched to vitest.

GitHubnodejs-tools/src/testing/dir-json_test.ts at main · rauschma/nodejs-toolsHelpers for Node.js that I’m using in my projects. Contribute to rauschma/nodejs-tools development by creating an account on GitHub.
Sergey Shandar

@rauschma currently, the FunctionalScript repo uses CommonJS because it's straightforward to make a simple module loader for CommonJS w/o writing a JavaScript parser. I couldn't find a way to do this for ES modules.

I plan to switch to ES modules only after FunctionalScript NaNVM is ready.