mixn / carbon-now-cli

🎨 Beautiful images of your code — from right inside your terminal.
MIT License
5.79k stars 121 forks source link

ts-jest doesn’t work with pure ESM dependencies #90

Open mixn opened 1 year ago

mixn commented 1 year ago

I’d really appreciate some help on this, thank you if you are reading this. 👏 🙏

I unfortunately can’t get ts-jest to play nicely with dependencies that are Pure ESM Packages like del, clipboardy, meow, etc., hence I’m currently stuck using older versions of them.

As soon as a test case touches code from these pure ESM packages, some tests will fail. Examples: https://github.com/mixn/carbon-now-cli/actions/runs/5089894999/jobs/9148055332?pr=89#step:6:75 https://github.com/mixn/carbon-now-cli/actions/runs/5090004820/jobs/9148296314?pr=86#step:6:43

Consuming the packages outside of the context of Jest works flawlessly though, terminal-image for example is up-to-date.

I’ve spent way too much time on this in the early days of the v2 rewrite, but eventually decided to simply downgrade the package versions cause I got quite annoyed by not being able to continue getting actual work done on v2.

Now that v2 is out and dependabot is opening PR’s, I’d really appreciate being able to solve this once and for all.

Thanks for reading and I’d appreciate any help!