


Add length instance property to all Cheerio instances ( #1681 by b3010d7.
NPM CHEERIO UPDATE

These are available starting with TypeScript 4.1, so you might have to bump your TypeScript version.įor TypeScript types, Cheerio now implements the ArrayLike interface. Note: Cheerio uses template literal types to determine return types. made their first contribution in #2453įull Changelog: v1.0.0-rc.10.v1.0.0-rc.11Ĭonst cheerio = require ( "cheerio" ) const $ = cheerio.made their first contribution in #2392.made their first contribution in #2127.made their first contribution in #1934.Update README "is not a web browser" section by in #2127.Set permissions for GitHub actions by in #2453.Remove unnecessary code, be more explicit #2279.Move initialization logic to load #1951.Have style parsing add malformed fields to previous field #2521.Add missing undefined return value #2505.Include undefined in the return type of get by in #2392.Have text turn passed values to strings #2047.Added a slim export, which will always use htmlparser2 #1960.Users can now specify a baseURI option, which will lead to href and src props to be resolved as URLs.Add textContent and innerText props #2214.Custom pseudo classes can now be specified using the pseudos option.Relevant options are now forwarded to cheerio-select #2511.Node types are now using tagged unions, which will make consumption a bit easier.The TypeScript types inherited from upstream dependencies have changed.script and style contents are added again in.That means that deep imports will now fail in newer versions of Node. Cheerio is now a dual CommonJS and ESM module.Have a look at parse5's release notes to see what has changed there. Under the hood, a lot of work for this release went into updating parse5, cheerio's default HTML parser.
NPM CHEERIO CODE
These are still in flux and I'd appreciate feedback on the proposals.Ī big thank you to everyone that contributed to this release! This includes code contributors, as well as the amazing financial support on GitHub Sponsors! There are two APIs that will be added for the next major release: An exract method ( #2523) and NodeJS specific loader methods ( #2051). Is hopefully the last RC before the 1.0.0 release of Cheerio.
