HTML import: Replace cheerio with jsdom to simplify contentcollector

Cheerio provides jQuery-like objects but they wrap DOM Node-like
objects that are not 100% API compatible with the DOM spec. Because of
this, contentcollector, which is used in browsers and in Node.js
during HTML import, has until now needed to support two different
APIs. This commit modifies HTML import to use jsdom instead of cheerio
and simplifies contentcollector.
This commit is contained in:
Richard Hansen 2021-01-24 01:08:08 -05:00
parent 84d6d277d7
commit c816c20bc7
6 changed files with 330 additions and 215 deletions

View file

@ -33,7 +33,6 @@
"async": "^3.2.0",
"async-stacktrace": "0.0.2",
"channels": "0.0.4",
"cheerio": "0.22.0",
"clean-css": "4.2.3",
"cookie-parser": "1.4.5",
"cross-spawn": "^7.0.3",
@ -47,6 +46,7 @@
"formidable": "1.2.2",
"http-errors": "1.8.0",
"js-cookie": "^2.2.1",
"jsdom": "^16.7.0",
"jsonminify": "0.4.1",
"languages4translatewiki": "0.1.3",
"lodash.clonedeep": "4.5.0",