rkotze / git-mob

Co-author commits tool. A cross-platform command-line tool for social coding. Includes co-authors in commits when pair/mob programming.
https://www.npmjs.com/package/git-mob
MIT License
183 stars 21 forks source link

Migrate to ESM format #117

Closed rkotze closed 1 year ago

rkotze commented 1 year ago

Modernising Git Mob by moving over to the natively supported ESM modules in NodeJS.

Support newer versions of Git Mob dependencies as they move over to ESM modules.

This does mean you need to run on Node 16+

Helpful information

Mocking modules require to use of an unstable API and need to enable an experimental flag on the node for jest to use esm.

https://jestjs.io/docs/ecmascript-modules

Also need to run node argument NODE_OPTIONS=--experimental-vm-modules

All imports need to have their file extension .js else it won't find the module and you will get an import errror.

Pull request checklist

Please check the type of change your PR introduces:

Does this introduce a breaking change?

Other information