v1.0.0-rc.4
Welcome to [email protected]
! This is the last pre-release before a full 1.0.0
release — please make sure to test this release and report any issues you might find.
This release was made possible by our supporters on Open Collective. If you want to support this project going forward, have a look at sponsorship options!
Breaking:
- After upgrading
parse5
, cheerio temporarily has a minimum Node version of Node 6. See #1585 for details. - Use the parser's DOM without modifications (#1559 by @fb55)
- Nodes no longer have a
root
reference. The root node is now referenced by theparent
property.
- Nodes no longer have a
- Use parse5 to serialize the DOM (04091a4 by @fb55)
- We will no longer encode non-ASCII characters by default. Please make sure that you pass on the appropriate content encoding.
New Features:
- Support for jQuery's positional selectors (:eq, :last, :odd, etc.) (#1565 by @fb55)
- Add Typescript typings (#1491 by @paulmelnikow)
- Introduces a new documentation website (#1571 by @fb55, based on work by @jugglinmike)
- Implement
for...of
iterator viaSymbol.iterator
(#1197 by @papandreou) - Add
wrapInner
(9ffc557 by @fb55, based on work by @tomjw64 and @warrengm) - Have
removeAttr
accept a list of attributes to remove (#1561 by @fb55) - Add
prop(‘outerHTML’)
implementation (#945 by @bill-bishop)
Bug Fixes:
- Prevent stale data on
.prev()
afterreplaceWith()
(#1254 by @Gei0r) - Fix
.xml
calls on HTML documents (#1572 by @fb55) - Correct rendering of root node (#1307 by @jugglinmike)
- Throw a useful error on invalid input to
cheerio.load()
(#1087 by @zeke) - Fix data attribute shadowing issue (#1139 by @tai2)
- Pass
locationInfo
option to parse5 (#1155 by @trevorhreed)
Other notable changes:
- Dropped Lodash as a dependency
- Formally test deprecated APIs (#1184 by @jugglinmike)