enzymejs / enzyme

JavaScript Testing utilities for React
https://enzymejs.github.io/enzyme/
MIT License
19.96k stars 2.01k forks source link

enzyme crash since Cheerio 1.0.0-rc.11 release #2559

Closed lyz810 closed 2 years ago

lyz810 commented 2 years ago

https://registry.npmjs.org/enzyme/3.11.0

version of cheerio: ^1.0.0-rc.3 will auto install the lastest version 1.0.0-rc.11, it will cause enzyme crash

In the source code(https://github.com/enzymejs/enzyme/blob/master/packages/enzyme/package.json#L42), the package.json declare version of cheerio is =1.0.0-rc3, but I think this version is not release yet.

So, please update the npm package to make the version declaration valid

ljharb commented 2 years ago

Duplicate of #2558.

enzyme breaks with every version of cheerio after v1.0.0-rc.3, and the next release of enzyme will pin it. In the meantime, you can solve it by adding a dev dependency of cheerio set to =1.0.0-rc.3.

lyz810 commented 2 years ago

Duplicate of #2558.

enzyme breaks with every version of cheerio after v1.0.0-rc.3, and the next release of enzyme will pin it. In the meantime, you can solve it by adding a dev dependency of cheerio set to =1.0.0-rc.3.

Could you let us know the plan of next release timeline

ljharb commented 2 years ago

There's no planned release date.

This is a trivially solvable problem in the meantime, so it's not particularly pressing.

lyz810 commented 2 years ago

Any one who is first install enzyme will meet this issue. I suggest you to add an announcement or pin this issue, to let them know the temporary solution.

1765659645 commented 2 years ago

I encountered a memory overflow problem when running unit tests. After two days of investigation, it was found that it was caused by the upgrade of cheerio to 1.0.0-rc.11