Open stephen-willoughby opened 8 months ago
@domenic I think the first pull request (#161) from @robinbisping solves this issue, could it be accepted? Thanks in advance!
push
Hi,
So while adding support for chai@5 you dropped support for chai@4?
David
chai 5 is ESM-only, while chai 4 is commonjs
if you haven't had chance to move to ESM yet, you should stick to chai 4 (and the older sinon-chai version)
mixing them up leads to various problems since you can't (currently) require
ESM modules in node. so it is one or the other
Yeah. I'm too tired to once again explain that breaking the ecosystem is not cool. Thanks for maintaining open source projects, keep up the good work.
Cheers, David
Yeah. I'm too tired to once again explain that breaking the ecosystem is not cool. Thanks for maintaining open source projects, keep up the good work.
Cheers, David
That's why it was a major version bump, since it is a breaking change.
Realistically, supporting both ESM and commonjs is challenging. At best it's extra work. Since ESM is "the future" of JavaScript, it makes sense to move to that and ask commonjs folks to stick with chai 4 etc. until they are ready to migrate.
Indeed, nobody has "broken" the ecosystem here
If you don't have time to move to esm, use chai 4 until you do.
As per semver, chai 5 is a breaking change to switch to esm. The feature set is pretty much the same as 4.
If you still think the ecosystem is broken, it is important you explain yourself so we can investigate it.
For clarity I think it would be useful to document the fact that sinon-chai@4.0.0
drops support for Chai 4 in the change log for v4.0.0.
im not sure its so simple
sinon-chai 4.x should work fine with chai 4, assuming your project is written as ES modules
Now chai v5 is out, it would be helpful if sinon-chai could also support it