Lusito / mockzilla

A mocking toolkit leveraging the power of TypeScript to enhance your jest experience.
https://lusito.github.io/mockzilla/
zlib License
14 stars 2 forks source link

Please downgrade `chalk` to V4, new V5 is causing compatibility issues #17

Closed Juraj-Masiar closed 2 years ago

Juraj-Masiar commented 2 years ago

The new chalk V5 is has compatibility issues, mentioned in their NPM page:

IMPORTANT: Chalk 5 is ESM. If you want to use Chalk with TypeScript or a build tool, you will probably want to use Chalk 4 for now. Read more.

I've reported it with example project here: https://github.com/Lusito/mockzilla-webextension/issues/14

But this package is the source of the issues: https://github.com/Lusito/mockzilla/blob/bafad35fb7dc7ddd7053ac3359b97de5354c3bc3/package.json#L38

The release notes for V5 says:

It's totally fine to stay on Chalk v4. It's been stable for years.

So, could you downgrade it to v4? :)

Lusito commented 2 years ago

Hi @Juraj-Masiar, It seems jest still uses v4 as well, so I'll go back for now. You should consider updating your project to be ESM compatible though, as sooner or later all libraries will change to this.

Lusito commented 2 years ago

New versions of mockzilla and mockzilla-webextension have been released.

Juraj-Masiar commented 2 years ago

Thank you @Lusito for the fix! It works now!

I've tried to migrate to ESM some (long) time ago but something didn't worked and I had to rollback. Did you converted your addons / projects to ESM? How did it go? Any tips? :)

I have a lot of code shared between addons / frontend Angular projects / backend NestJS so big changes like this are pretty challenging for me :(. Especially when I have so many other feature requests to implement... But I'm sure you are super busy as well, so thank you again for taking time fixing my issue :), have a great week!