cheeriojs/cheerio
### [`v1.0.0-rc.12`](https://togithub.com/cheeriojs/cheerio/releases/tag/v1.0.0-rc.12)
[Compare Source](https://togithub.com/cheeriojs/cheerio/compare/v1.0.0-rc.11...v1.0.0-rc.12)
Bugfix release. Fixed issues:
- Align `prop` undefined handling with jQuery by [@fb55](https://togithub.com/fb55) in [https://github.com/cheeriojs/cheerio/pull/2557](https://togithub.com/cheeriojs/cheerio/pull/2557)
- Allow deep imports of `cheerio/lib/utils` by [@blixt](https://togithub.com/blixt) in [https://github.com/cheeriojs/cheerio/pull/2601](https://togithub.com/cheeriojs/cheerio/pull/2601)
#### New Contributors
- [@blixt](https://togithub.com/blixt) made their first contribution in [https://github.com/cheeriojs/cheerio/pull/2601](https://togithub.com/cheeriojs/cheerio/pull/2601)
**Full Changelog**: https://github.com/cheeriojs/cheerio/compare/v1.0.0-rc.11...v1.0.0-rc.12
### [`v1.0.0-rc.11`](https://togithub.com/cheeriojs/cheerio/releases/tag/v1.0.0-rc.11)
[Compare Source](https://togithub.com/cheeriojs/cheerio/compare/v1.0.0-rc.10...v1.0.0-rc.11)
`cheerio@1.0.0-rc.11` is hopefully the last RC before the 1.0.0 release of Cheerio. There are two APIs that will be added for the next major release: An `exract` method ([https://github.com/cheeriojs/cheerio/issues/2523](https://togithub.com/cheeriojs/cheerio/issues/2523)) and NodeJS specific loader methods ([https://github.com/cheeriojs/cheerio/issues/2051](https://togithub.com/cheeriojs/cheerio/issues/2051)). These are still in flux and I'd appreciate feedback on the proposals.
A big thank you to everyone that contributed to this release! This includes code contributors, as well as the amazing financial support on [GitHub Sponsors](https://togithub.com/sponsors/cheeriojs)!
Under the hood, a lot of work for this release went into updating parse5, cheerio's default HTML parser. Have a look at [parse5's release notes](https://togithub.com/inikulin/parse5/releases/tag/v7.0.0) to see what has changed there.
#### Breaking
- Cheerio is now a dual CommonJS and ESM module. That means that deep imports will now fail in newer versions of Node. [https://github.com/cheeriojs/cheerio/pull/2508](https://togithub.com/cheeriojs/cheerio/pull/2508)
- `script` and `style` contents are added again in `.text()` [https://github.com/cheeriojs/cheerio/pull/2509](https://togithub.com/cheeriojs/cheerio/pull/2509)
- To keep the old behavior, switch `.text()` to `.prop('innerText')`
- The TypeScript types inherited from upstream dependencies have changed. [https://github.com/cheeriojs/cheerio/pull/2503](https://togithub.com/cheeriojs/cheerio/pull/2503)
- Node types are now using tagged unions, which will make consumption a bit easier.
#### Features
- Relevant options are now forwarded to `cheerio-select` [https://github.com/cheeriojs/cheerio/pull/2511](https://togithub.com/cheeriojs/cheerio/pull/2511)
- Custom pseudo classes can now be specified [using the `pseudos` option](https://cheerio.js.org/interfaces/CheerioOptions.html#pseudos).
- For the `.prop()` method:
- Add `textContent` and `innerText` props [https://github.com/cheeriojs/cheerio/pull/2214](https://togithub.com/cheeriojs/cheerio/pull/2214)
- Users can now specify a `baseURI` option, which will lead to `href` and `src` props to be resolved as URLs. [https://github.com/cheeriojs/cheerio/pull/2510](https://togithub.com/cheeriojs/cheerio/pull/2510)
- Added a `slim` export, which will always use htmlparser2 [https://github.com/cheeriojs/cheerio/pull/1960](https://togithub.com/cheeriojs/cheerio/pull/1960)
#### Fixes
- Have `text` turn passed values to strings [https://github.com/cheeriojs/cheerio/pull/2047](https://togithub.com/cheeriojs/cheerio/pull/2047)
- Include `undefined` in the return type of `get` by [@glen-84](https://togithub.com/glen-84) in [https://github.com/cheeriojs/cheerio/pull/2392](https://togithub.com/cheeriojs/cheerio/pull/2392)
- Recognise comments as HTML [https://github.com/cheeriojs/cheerio/pull/2504](https://togithub.com/cheeriojs/cheerio/pull/2504)
- Add missing `undefined` return value [https://github.com/cheeriojs/cheerio/pull/2505](https://togithub.com/cheeriojs/cheerio/pull/2505)
- Export missing static methods [https://github.com/cheeriojs/cheerio/pull/2506](https://togithub.com/cheeriojs/cheerio/pull/2506)
- Have style parsing add malformed fields to previous field [https://github.com/cheeriojs/cheerio/pull/2521](https://togithub.com/cheeriojs/cheerio/pull/2521)
#### Refactor
- Use `domutils` module directly [https://github.com/cheeriojs/cheerio/pull/1928](https://togithub.com/cheeriojs/cheerio/pull/1928)
- Hand-roll `isHTML` [https://github.com/cheeriojs/cheerio/pull/1935](https://togithub.com/cheeriojs/cheerio/pull/1935)
- Move initialization logic to `load` [https://github.com/cheeriojs/cheerio/pull/1951](https://togithub.com/cheeriojs/cheerio/pull/1951)
- Only return elements in `closest` [https://github.com/cheeriojs/cheerio/pull/2057](https://togithub.com/cheeriojs/cheerio/pull/2057)
- Remove unnecessary code, be more explicit [https://github.com/cheeriojs/cheerio/pull/2279](https://togithub.com/cheeriojs/cheerio/pull/2279)
- Use stricter TS, ESLint configs [https://github.com/cheeriojs/cheerio/pull/2507](https://togithub.com/cheeriojs/cheerio/pull/2507)
- Update exported values [https://github.com/cheeriojs/cheerio/pull/2512](https://togithub.com/cheeriojs/cheerio/pull/2512)
#### Development Experience
- Migrate husky to v6 by [@DavideViolante](https://togithub.com/DavideViolante) in [https://github.com/cheeriojs/cheerio/pull/1934](https://togithub.com/cheeriojs/cheerio/pull/1934)
- Update CI by [@XhmikosR](https://togithub.com/XhmikosR) in [https://github.com/cheeriojs/cheerio/pull/2149](https://togithub.com/cheeriojs/cheerio/pull/2149)
- Set permissions for GitHub actions by [@neilnaveen](https://togithub.com/neilnaveen) in [https://github.com/cheeriojs/cheerio/pull/2453](https://togithub.com/cheeriojs/cheerio/pull/2453)
#### Docs
- Update README "is not a web browser" section by [@mxschmitt](https://togithub.com/mxschmitt) in [https://github.com/cheeriojs/cheerio/pull/2127](https://togithub.com/cheeriojs/cheerio/pull/2127)
#### New Contributors
- [@DavideViolante](https://togithub.com/DavideViolante) made their first contribution in [https://github.com/cheeriojs/cheerio/pull/1934](https://togithub.com/cheeriojs/cheerio/pull/1934)
- [@mxschmitt](https://togithub.com/mxschmitt) made their first contribution in [https://github.com/cheeriojs/cheerio/pull/2127](https://togithub.com/cheeriojs/cheerio/pull/2127)
- [@glen-84](https://togithub.com/glen-84) made their first contribution in [https://github.com/cheeriojs/cheerio/pull/2392](https://togithub.com/cheeriojs/cheerio/pull/2392)
- [@neilnaveen](https://togithub.com/neilnaveen) made their first contribution in [https://github.com/cheeriojs/cheerio/pull/2453](https://togithub.com/cheeriojs/cheerio/pull/2453)
**Full Changelog**: https://github.com/cheeriojs/cheerio/compare/v1.0.0-rc.10...v1.0.0-rc.11
### [`v1.0.0-rc.10`](https://togithub.com/cheeriojs/cheerio/releases/tag/v1.0.0-rc.10)
[Compare Source](https://togithub.com/cheeriojs/cheerio/compare/v1.0.0-rc.9...v1.0.0-rc.10)
**Fixes:**
- `.html(node)` now moves passed nodes ([#1923](https://togithub.com/cheeriojs/cheerio/issues/1923), fixes [#940](https://togithub.com/cheeriojs/cheerio/issues/940)) [`258b26b`](https://togithub.com/cheeriojs/cheerio/commit/258b26b)
- Boolean attributes are no longer special in xmlMode ([#1903](https://togithub.com/cheeriojs/cheerio/issues/1903), fixes [#1805](https://togithub.com/cheeriojs/cheerio/issues/1805)) [`b393e4a`](https://togithub.com/cheeriojs/cheerio/commit/b393e4a)
- Rename parser adapter files ([#1873](https://togithub.com/cheeriojs/cheerio/issues/1873), fixes [#1847](https://togithub.com/cheeriojs/cheerio/issues/1847)) [`8f55dd8`](https://togithub.com/cheeriojs/cheerio/commit/8f55dd8)
- Make `filter` work on all collections ([#1870](https://togithub.com/cheeriojs/cheerio/issues/1870), fixes [#1867](https://togithub.com/cheeriojs/cheerio/issues/1867)) [`fb8d31e`](https://togithub.com/cheeriojs/cheerio/commit/fb8d31e)
- Bump cheerio-select ([#1922](https://togithub.com/cheeriojs/cheerio/issues/1922), fixes https://www.npmjs.com/advisories/1754) [`5cd2b9c`](https://togithub.com/cheeriojs/cheerio/commit/5cd2b9c)
**Documentation:**
- Document how to define TS types for Plug-Ins ([#1915](https://togithub.com/cheeriojs/cheerio/issues/1915), fixes [#1778](https://togithub.com/cheeriojs/cheerio/issues/1778)) [`880fd2c`](https://togithub.com/cheeriojs/cheerio/commit/880fd2c)
- Remove obsolete Testing section [`e0c7cbb`](https://togithub.com/cheeriojs/cheerio/commit/e0c7cbb)
- Remove now-invalid `require` [`5dfbd35`](https://togithub.com/cheeriojs/cheerio/commit/5dfbd35)
**Refactors:**
- Wrap shared behavior in `traversing` ([#1909](https://togithub.com/cheeriojs/cheerio/issues/1909)) [`58e090a`](https://togithub.com/cheeriojs/cheerio/commit/58e090a)
- Move `is` to `traversing`, optimize ([#1908](https://togithub.com/cheeriojs/cheerio/issues/1908)) [`1c6fa3e`](https://togithub.com/cheeriojs/cheerio/commit/1c6fa3e)
- Change order of arguments of internal `domEach` ([#1892](https://togithub.com/cheeriojs/cheerio/issues/1892)) [`feda230`](https://togithub.com/cheeriojs/cheerio/commit/feda230)
- Have `load` export a function ([#1869](https://togithub.com/cheeriojs/cheerio/issues/1869)) [`c370f4e`](https://togithub.com/cheeriojs/cheerio/commit/c370f4e)
### [`v1.0.0-rc.9`](https://togithub.com/cheeriojs/cheerio/releases/tag/v1.0.0-rc.9)
[Compare Source](https://togithub.com/cheeriojs/cheerio/compare/v1.0.0-rc.8...v1.0.0-rc.9)
**Port to TypeScript**
Cheerio has been ported entirely to TypeScript (in [#1816](https://togithub.com/cheeriojs/cheerio/issues/1816))! This eliminates a lot of edge-cases within Cheerio and will allow you to use Cheerio with confidence. This release also features a new documentation website based on TypeDoc, allowing you to quickly navigate all available methods: https://cheerio.js.org
***
**Breaking change:** If you were using the function exported by Cheerio directly instead of first `load()`ing a document, you will now have to update the `require` to use the `default` export.
```diff
- const cheerio = require("cheerio");
+ const cheerio = require("cheerio").default;
cheerio('div', dom)
```
Please note that this way of using Cheerio is deprecated and might be removed in a future version. Please consider updating your code to:
```js
const cheerio = require("cheerio");
const $ = cheerio.load(dom)
$('div')
```
***
**Note:** Cheerio uses template literal types to determine return types. These are available starting with TypeScript 4.1, so you might have to bump your TypeScript version.
For TypeScript types, Cheerio now implements the `ArrayLike` interface. That means that Cheerio instances can contain objects of arbitrary types, but not all methods can be called on them.
The TypeScript compiler will figure out what structures you are operating on:
- When calling a loaded Cheerio instance with an HTML string like `$('
')`, it will product a `Cheerio` type.
- `Node` is the base class for DOM elements and includes eg. comment and text nodes.
- When calling Cheerio with a selector like `$('.foo')`, it will produce a `Cheerio`, as only `Element`s can be part of the result set.
- `Element` is the class representing tags.
- You can still use `$('...').map()` to map to arbitrary values, and will get a compiler error when trying to call method that are not supported.
- Eg. `$('.foo').map((i, el) => $(el).text()).attr('test')` will no longer be possible, as `.attr` is not allowed to be called on a `Cheerio`.
***
This release does not contain other changes to functionality. Feedback is greatly appreciated; if you encounter a problem, please [file an issue](https://togithub.com/cheeriojs/cheerio/issues)!
### [`v1.0.0-rc.8`](https://togithub.com/cheeriojs/cheerio/releases/tag/v1.0.0-rc.8)
[Compare Source](https://togithub.com/cheeriojs/cheerio/compare/v1.0.0-rc.7...v1.0.0-rc.8)
*Second botched release. Please use `v1.0.0-rc.9` instead.*
### [`v1.0.0-rc.7`](https://togithub.com/cheeriojs/cheerio/releases/tag/v1.0.0-rc.7)
[Compare Source](https://togithub.com/cheeriojs/cheerio/compare/v1.0.0-rc.6...v1.0.0-rc.7)
*Published without a `lib` directory — please ignore.*
### [`v1.0.0-rc.6`](https://togithub.com/cheeriojs/cheerio/releases/tag/v1.0.0-rc.6)
[Compare Source](https://togithub.com/cheeriojs/cheerio/compare/v1.0.0-rc.5...v1.0.0-rc.6)
**Breaking:**
- Fixed the ordering of the output of several methods, including `prevAll`, `prevUntil` and `parentsUntil`. The new order matches jQuery.
*This release contains three breaking changes inherited from dependencies.*
- Selectors (see [css-select@4.0.0](https://togithub.com/fb55/css-select/releases/tag/v4.0.0)):
- Several pseudo selectors are now stricter, in line with the HTML spec.
- Some attributes are now case-insensitive based on the HTML spec.
- DOM:
- In XML mode, all elements will have `type: 'tag'`.
**New features:**
- Add `.unwrap` ([#1651](https://togithub.com/cheeriojs/cheerio/issues/1651) by [@5saviahv](https://togithub.com/5saviahv)) [`2037d83`](https://togithub.com/cheeriojs/cheerio/commit/2037d83)
- Add `.wrapAll` ([#1590](https://togithub.com/cheeriojs/cheerio/issues/1590) by [@5saviahv](https://togithub.com/5saviahv)) [`cd4a4d9`](https://togithub.com/cheeriojs/cheerio/commit/cd4a4d9)
- Support `prop('innerHTML')` ([#1578](https://togithub.com/cheeriojs/cheerio/issues/1578) by [@fb55](https://togithub.com/fb55)) [`c58258f`](https://togithub.com/cheeriojs/cheerio/commit/c58258f)
- Expose the `scriptingEnabled` parse5 option ([#1707](https://togithub.com/cheeriojs/cheerio/issues/1707) by [@5saviahv](https://togithub.com/5saviahv)) [`7eb4cc4`](https://togithub.com/cheeriojs/cheerio/commit/7eb4cc4)
- By setting `scriptingEnabled` to `false`, it is now possible to parse the contents of `
Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use.
Take a deeper look at the dependency
Take a moment to review the security alert above. Review the linked
package source code to understand the potential risk. Ensure the package
is not malicious before proceeding. If you're unsure how to proceed, reach
out to your security team or ask the Socket team for help at support [AT]
socket [DOT] dev.
Remove the package
If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.
Mark a package as acceptable risk
To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all
This PR contains the following updates:
2.9.28
->2.9.37
0.0.98
->0.0.109
26.0.15
->26.0.24
3.5.34
->3.6.20
1.0.0-rc.3
->1.0.0-rc.12
1.14.6
->1.14.7
8.2.0
->8.6.0
7.14.0
->7.32.0
27.0.7
->27.1.2
3.1.4
->3.4.1
0.10.2
->0.10.4
2.13.0
->2.14.2
4.3.0
->4.4.1
10.0.0
->10.1.1
2.0.6
->2.0.22
5.1.0
->5.4.1
2.2.0
->2.8.8
0.27.1
->0.29.0
1.10.0
->1.10.2
Release Notes
cheeriojs/cheerio
### [`v1.0.0-rc.12`](https://togithub.com/cheeriojs/cheerio/releases/tag/v1.0.0-rc.12) [Compare Source](https://togithub.com/cheeriojs/cheerio/compare/v1.0.0-rc.11...v1.0.0-rc.12) Bugfix release. Fixed issues: - Align `prop` undefined handling with jQuery by [@fb55](https://togithub.com/fb55) in [https://github.com/cheeriojs/cheerio/pull/2557](https://togithub.com/cheeriojs/cheerio/pull/2557) - Allow deep imports of `cheerio/lib/utils` by [@blixt](https://togithub.com/blixt) in [https://github.com/cheeriojs/cheerio/pull/2601](https://togithub.com/cheeriojs/cheerio/pull/2601) #### New Contributors - [@blixt](https://togithub.com/blixt) made their first contribution in [https://github.com/cheeriojs/cheerio/pull/2601](https://togithub.com/cheeriojs/cheerio/pull/2601) **Full Changelog**: https://github.com/cheeriojs/cheerio/compare/v1.0.0-rc.11...v1.0.0-rc.12 ### [`v1.0.0-rc.11`](https://togithub.com/cheeriojs/cheerio/releases/tag/v1.0.0-rc.11) [Compare Source](https://togithub.com/cheeriojs/cheerio/compare/v1.0.0-rc.10...v1.0.0-rc.11) `cheerio@1.0.0-rc.11` is hopefully the last RC before the 1.0.0 release of Cheerio. There are two APIs that will be added for the next major release: An `exract` method ([https://github.com/cheeriojs/cheerio/issues/2523](https://togithub.com/cheeriojs/cheerio/issues/2523)) and NodeJS specific loader methods ([https://github.com/cheeriojs/cheerio/issues/2051](https://togithub.com/cheeriojs/cheerio/issues/2051)). These are still in flux and I'd appreciate feedback on the proposals. A big thank you to everyone that contributed to this release! This includes code contributors, as well as the amazing financial support on [GitHub Sponsors](https://togithub.com/sponsors/cheeriojs)! Under the hood, a lot of work for this release went into updating parse5, cheerio's default HTML parser. Have a look at [parse5's release notes](https://togithub.com/inikulin/parse5/releases/tag/v7.0.0) to see what has changed there. #### Breaking - Cheerio is now a dual CommonJS and ESM module. That means that deep imports will now fail in newer versions of Node. [https://github.com/cheeriojs/cheerio/pull/2508](https://togithub.com/cheeriojs/cheerio/pull/2508) - `script` and `style` contents are added again in `.text()` [https://github.com/cheeriojs/cheerio/pull/2509](https://togithub.com/cheeriojs/cheerio/pull/2509) - To keep the old behavior, switch `.text()` to `.prop('innerText')` - The TypeScript types inherited from upstream dependencies have changed. [https://github.com/cheeriojs/cheerio/pull/2503](https://togithub.com/cheeriojs/cheerio/pull/2503) - Node types are now using tagged unions, which will make consumption a bit easier. #### Features - Relevant options are now forwarded to `cheerio-select` [https://github.com/cheeriojs/cheerio/pull/2511](https://togithub.com/cheeriojs/cheerio/pull/2511) - Custom pseudo classes can now be specified [using the `pseudos` option](https://cheerio.js.org/interfaces/CheerioOptions.html#pseudos). - For the `.prop()` method: - Add `textContent` and `innerText` props [https://github.com/cheeriojs/cheerio/pull/2214](https://togithub.com/cheeriojs/cheerio/pull/2214) - Users can now specify a `baseURI` option, which will lead to `href` and `src` props to be resolved as URLs. [https://github.com/cheeriojs/cheerio/pull/2510](https://togithub.com/cheeriojs/cheerio/pull/2510) - Added a `slim` export, which will always use htmlparser2 [https://github.com/cheeriojs/cheerio/pull/1960](https://togithub.com/cheeriojs/cheerio/pull/1960) #### Fixes - Have `text` turn passed values to strings [https://github.com/cheeriojs/cheerio/pull/2047](https://togithub.com/cheeriojs/cheerio/pull/2047) - Include `undefined` in the return type of `get` by [@glen-84](https://togithub.com/glen-84) in [https://github.com/cheeriojs/cheerio/pull/2392](https://togithub.com/cheeriojs/cheerio/pull/2392) - Recognise comments as HTML [https://github.com/cheeriojs/cheerio/pull/2504](https://togithub.com/cheeriojs/cheerio/pull/2504) - Add missing `undefined` return value [https://github.com/cheeriojs/cheerio/pull/2505](https://togithub.com/cheeriojs/cheerio/pull/2505) - Export missing static methods [https://github.com/cheeriojs/cheerio/pull/2506](https://togithub.com/cheeriojs/cheerio/pull/2506) - Have style parsing add malformed fields to previous field [https://github.com/cheeriojs/cheerio/pull/2521](https://togithub.com/cheeriojs/cheerio/pull/2521) #### Refactor - Use `domutils` module directly [https://github.com/cheeriojs/cheerio/pull/1928](https://togithub.com/cheeriojs/cheerio/pull/1928) - Hand-roll `isHTML` [https://github.com/cheeriojs/cheerio/pull/1935](https://togithub.com/cheeriojs/cheerio/pull/1935) - Move initialization logic to `load` [https://github.com/cheeriojs/cheerio/pull/1951](https://togithub.com/cheeriojs/cheerio/pull/1951) - Only return elements in `closest` [https://github.com/cheeriojs/cheerio/pull/2057](https://togithub.com/cheeriojs/cheerio/pull/2057) - Remove unnecessary code, be more explicit [https://github.com/cheeriojs/cheerio/pull/2279](https://togithub.com/cheeriojs/cheerio/pull/2279) - Use stricter TS, ESLint configs [https://github.com/cheeriojs/cheerio/pull/2507](https://togithub.com/cheeriojs/cheerio/pull/2507) - Update exported values [https://github.com/cheeriojs/cheerio/pull/2512](https://togithub.com/cheeriojs/cheerio/pull/2512) #### Development Experience - Migrate husky to v6 by [@DavideViolante](https://togithub.com/DavideViolante) in [https://github.com/cheeriojs/cheerio/pull/1934](https://togithub.com/cheeriojs/cheerio/pull/1934) - Update CI by [@XhmikosR](https://togithub.com/XhmikosR) in [https://github.com/cheeriojs/cheerio/pull/2149](https://togithub.com/cheeriojs/cheerio/pull/2149) - Set permissions for GitHub actions by [@neilnaveen](https://togithub.com/neilnaveen) in [https://github.com/cheeriojs/cheerio/pull/2453](https://togithub.com/cheeriojs/cheerio/pull/2453) #### Docs - Update README "is not a web browser" section by [@mxschmitt](https://togithub.com/mxschmitt) in [https://github.com/cheeriojs/cheerio/pull/2127](https://togithub.com/cheeriojs/cheerio/pull/2127) #### New Contributors - [@DavideViolante](https://togithub.com/DavideViolante) made their first contribution in [https://github.com/cheeriojs/cheerio/pull/1934](https://togithub.com/cheeriojs/cheerio/pull/1934) - [@mxschmitt](https://togithub.com/mxschmitt) made their first contribution in [https://github.com/cheeriojs/cheerio/pull/2127](https://togithub.com/cheeriojs/cheerio/pull/2127) - [@glen-84](https://togithub.com/glen-84) made their first contribution in [https://github.com/cheeriojs/cheerio/pull/2392](https://togithub.com/cheeriojs/cheerio/pull/2392) - [@neilnaveen](https://togithub.com/neilnaveen) made their first contribution in [https://github.com/cheeriojs/cheerio/pull/2453](https://togithub.com/cheeriojs/cheerio/pull/2453) **Full Changelog**: https://github.com/cheeriojs/cheerio/compare/v1.0.0-rc.10...v1.0.0-rc.11 ### [`v1.0.0-rc.10`](https://togithub.com/cheeriojs/cheerio/releases/tag/v1.0.0-rc.10) [Compare Source](https://togithub.com/cheeriojs/cheerio/compare/v1.0.0-rc.9...v1.0.0-rc.10) **Fixes:** - `.html(node)` now moves passed nodes ([#1923](https://togithub.com/cheeriojs/cheerio/issues/1923), fixes [#940](https://togithub.com/cheeriojs/cheerio/issues/940)) [`258b26b`](https://togithub.com/cheeriojs/cheerio/commit/258b26b) - Boolean attributes are no longer special in xmlMode ([#1903](https://togithub.com/cheeriojs/cheerio/issues/1903), fixes [#1805](https://togithub.com/cheeriojs/cheerio/issues/1805)) [`b393e4a`](https://togithub.com/cheeriojs/cheerio/commit/b393e4a) - Rename parser adapter files ([#1873](https://togithub.com/cheeriojs/cheerio/issues/1873), fixes [#1847](https://togithub.com/cheeriojs/cheerio/issues/1847)) [`8f55dd8`](https://togithub.com/cheeriojs/cheerio/commit/8f55dd8) - Make `filter` work on all collections ([#1870](https://togithub.com/cheeriojs/cheerio/issues/1870), fixes [#1867](https://togithub.com/cheeriojs/cheerio/issues/1867)) [`fb8d31e`](https://togithub.com/cheeriojs/cheerio/commit/fb8d31e) - Bump cheerio-select ([#1922](https://togithub.com/cheeriojs/cheerio/issues/1922), fixes https://www.npmjs.com/advisories/1754) [`5cd2b9c`](https://togithub.com/cheeriojs/cheerio/commit/5cd2b9c) **Documentation:** - Document how to define TS types for Plug-Ins ([#1915](https://togithub.com/cheeriojs/cheerio/issues/1915), fixes [#1778](https://togithub.com/cheeriojs/cheerio/issues/1778)) [`880fd2c`](https://togithub.com/cheeriojs/cheerio/commit/880fd2c) - Remove obsolete Testing section [`e0c7cbb`](https://togithub.com/cheeriojs/cheerio/commit/e0c7cbb) - Remove now-invalid `require` [`5dfbd35`](https://togithub.com/cheeriojs/cheerio/commit/5dfbd35) **Refactors:** - Wrap shared behavior in `traversing` ([#1909](https://togithub.com/cheeriojs/cheerio/issues/1909)) [`58e090a`](https://togithub.com/cheeriojs/cheerio/commit/58e090a) - Move `is` to `traversing`, optimize ([#1908](https://togithub.com/cheeriojs/cheerio/issues/1908)) [`1c6fa3e`](https://togithub.com/cheeriojs/cheerio/commit/1c6fa3e) - Change order of arguments of internal `domEach` ([#1892](https://togithub.com/cheeriojs/cheerio/issues/1892)) [`feda230`](https://togithub.com/cheeriojs/cheerio/commit/feda230) - Have `load` export a function ([#1869](https://togithub.com/cheeriojs/cheerio/issues/1869)) [`c370f4e`](https://togithub.com/cheeriojs/cheerio/commit/c370f4e) ### [`v1.0.0-rc.9`](https://togithub.com/cheeriojs/cheerio/releases/tag/v1.0.0-rc.9) [Compare Source](https://togithub.com/cheeriojs/cheerio/compare/v1.0.0-rc.8...v1.0.0-rc.9) **Port to TypeScript** Cheerio has been ported entirely to TypeScript (in [#1816](https://togithub.com/cheeriojs/cheerio/issues/1816))! This eliminates a lot of edge-cases within Cheerio and will allow you to use Cheerio with confidence. This release also features a new documentation website based on TypeDoc, allowing you to quickly navigate all available methods: https://cheerio.js.org *** **Breaking change:** If you were using the function exported by Cheerio directly instead of first `load()`ing a document, you will now have to update the `require` to use the `default` export. ```diff - const cheerio = require("cheerio"); + const cheerio = require("cheerio").default; cheerio('div', dom) ``` Please note that this way of using Cheerio is deprecated and might be removed in a future version. Please consider updating your code to: ```js const cheerio = require("cheerio"); const $ = cheerio.load(dom) $('div') ``` *** **Note:** Cheerio uses template literal types to determine return types. These are available starting with TypeScript 4.1, so you might have to bump your TypeScript version. For TypeScript types, Cheerio now implements the `ArrayLike🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎
To accept the risk, merge this PR and you will not be notified again.
package.json
via cheerio@1.0.0-rc.12package.json
via nodemon@2.0.22Next steps
What is network access?
This module accesses the network.
Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use.
Take a deeper look at the dependency
Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.
Remove the package
If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.
Mark a package as acceptable risk
To ignore an alert, reply with a comment starting with
@SocketSecurity ignore
followed by a space separated list ofpackage-name@version
specifiers. e.g.@SocketSecurity ignore foo@1.0.0 bar@*
or ignore all packages with@SocketSecurity ignore-all
@SocketSecurity ignore domutils@3.1.0
@SocketSecurity ignore simple-update-notifier@1.1.0
New and updated dependency changes detected. Learn more about Socket for GitHub ↗︎
+28
+130/-128
+0/-0
+0/-0
+0/-0
+0/-0
+0/-0
+1/-1
+1/-0
+9/-47
+49/-33
+12/-1
+2/-3
+9/-4
+0/-0
+0/-0
+0/-0
+27/-17
+0/-0