carbon-now-cli icon indicating copy to clipboard operation
carbon-now-cli copied to clipboard

ts-jest doesn’t work with pure ESM dependencies

Open mixn opened this issue 1 year ago • 0 comments

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!

mixn avatar May 26 '23 11:05 mixn