Skip to content

Upgrade parse5 to 3.0.2#1849

Merged
domenic merged 1 commit intojsdom:masterfrom
Zirro:upgrade-parse5
May 14, 2017
Merged

Upgrade parse5 to 3.0.2#1849
domenic merged 1 commit intojsdom:masterfrom
Zirro:upgrade-parse5

Conversation

@Zirro
Copy link
Copy Markdown
Member

@Zirro Zirro commented May 13, 2017

This PR upgrades parse5 to version 3.0.2, and includes changes to affected tests and documentation. Since the ambitious changes in #1316 have not seen progress for a while, I figured that it'd be better to do this with minimal changes than to remain on such an old version.

I removed three old tests in the misc.js file which were testing the serialization of obsolete DOCTYPEs. From what I've gathered, parse5 removed support for these as they are no longer recognised in the spec.

In addition to the parser changes that have been made, there are also breaking changes to the API's output of .nodeLocation. I've updated the tests and documentation to reflect this.

This should resolve #1778 and any other issues which have been due to the old version 🎉

@domenic
Copy link
Copy Markdown
Member

domenic commented May 13, 2017

Great stuff!! I guess this will have to be a major version bump because of the change to nodeLocation... Maybe we should also take the opportunity to remove the parser option, as we've been meaning to for a while.

@papandreou
Copy link
Copy Markdown
Contributor

We could patch nodeLocation to alias startOffset and endOffset as start and end so it can be released in 10.x?

@domenic
Copy link
Copy Markdown
Member

domenic commented May 14, 2017

Nah, let's just release 11.0.0; version numbers are cheap.

@domenic domenic merged commit 29c4a7b into jsdom:master May 14, 2017
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.

Parse5 'endTagInBody' causes stack overflow when loading certain documents

3 participants