Skip to content

Change cheerio version to stable#126

Closed
lisunovdv wants to merge 2 commits intofoundation:developfrom
lisunovdv:develop
Closed

Change cheerio version to stable#126
lisunovdv wants to merge 2 commits intofoundation:developfrom
lisunovdv:develop

Conversation

@lisunovdv
Copy link
Copy Markdown

cheerio v0.20.0 or v1.0.0-rc.5 parses incorectly custom self-closing XML tags, e.g:

<isinclude template="checkout/confirmation/confirmationEmail"/>

will become

<isinclude template="checkout/confirmation/confirmationEmail"/></isinclude>

And cheerio option recognizeSelfClosing: false can't help.

It's fixed only in the stable release of "cheerio" - v0.22.0 (that is used in inline-css

But v1.0.0-rc.5 has alatest tag so we need to write "cheerio": "0.22.0"' instead of "cheerio": "^0.22.0"`

@DanielRuf
Copy link
Copy Markdown
Contributor

DanielRuf commented Jan 24, 2021

Hi @lisunovdv,

thanks for your PR.

But v1.0.0-rc.5 has alatest tag so we need to write "cheerio": "0.22.0"' instead of "cheerio": "^0.22.0"`

This is not correct. The SemVer range "^0.22.0" uses only 0.22.x, see:

Bildschirmfoto 2021-01-24 um 14 50 48

Bildschirmfoto 2021-01-24 um 14 53 35

We should not pin the version to get security updates.

Comment thread package.json Outdated
Co-authored-by: Daniel Ruf <827205+DanielRuf@users.noreply.github.com>
@joeworkman
Copy link
Copy Markdown
Member

Closing — the Cheerio dependency is being removed entirely in v2 (Rust rewrite with its own HTML parser). Thanks for the contribution!

@joeworkman joeworkman closed this Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants