Skip to content

Commit c8c007f

Browse files
build(deps): update dependency cheerio to v1.0.0 (#10063)
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [cheerio](https://cheerio.js.org/) ([source](https://togithub.com/cheeriojs/cheerio)) | [`1.0.0-rc.12` -> `1.0.0`](https://renovatebot.com/diffs/npm/cheerio/1.0.0-rc.12/1.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/cheerio/1.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/cheerio/1.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/cheerio/1.0.0-rc.12/1.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/cheerio/1.0.0-rc.12/1.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>cheeriojs/cheerio (cheerio)</summary> ### [`v1.0.0`](https://togithub.com/cheeriojs/cheerio/releases/tag/v1.0.0) [Compare Source](https://togithub.com/cheeriojs/cheerio/compare/v1.0.0-rc.12...v1.0.0) Cheerio 1.0 is here! 🎉 ### [Announcement Blog Post](https://cheerio.js.org/blog/cheerio-1.0) #### Breaking Changes - The minimum NodeJS version is now 18.17 or higher [https://github.com/cheeriojs/cheerio/pull/3959](https://togithub.com/cheeriojs/cheerio/pull/3959) - Import paths were simplified. For example, use `cheerio/slim` instead of `cheerio/lib/slim`. [https://github.com/cheeriojs/cheerio/pull/3970](https://togithub.com/cheeriojs/cheerio/pull/3970) - The deprecated default Cheerio instance and static methods were removed. [https://github.com/cheeriojs/cheerio/pull/3974](https://togithub.com/cheeriojs/cheerio/pull/3974) Before, it was possible to write code like this: ```ts import cheerio, { html } from 'cheerio'; html(cheerio('<test></test>')); // ~ '<test></test>' -- NO LONGER WORKS ``` Make sure to always load documents first: ```ts import * as cheerio from 'cheerio'; cheerio.load('<test></test>').html(); ``` - Node types previously re-exported by Cheerio must now be imported directly from (`domhandler`)(https://github.com/fb55/domhandler). [https://github.com/cheeriojs/cheerio/pull/3969](https://togithub.com/cheeriojs/cheerio/pull/3969) - htmlparser2 options now reside exclusively under the `xml` key ([https://github.com/cheeriojs/cheerio/pull/2916](https://togithub.com/cheeriojs/cheerio/pull/2916)): ```ts const $ = cheerio.load('<html>', { xml: { withStartIndices: true, }, }); ``` #### New Features - Add functions to load buffers, streams & URLs in NodeJS by [@&#8203;fb55](https://togithub.com/fb55) in [https://github.com/cheeriojs/cheerio/pull/2857](https://togithub.com/cheeriojs/cheerio/pull/2857) - Add extract method by [@&#8203;fb55](https://togithub.com/fb55) in [https://github.com/cheeriojs/cheerio/pull/2750](https://togithub.com/cheeriojs/cheerio/pull/2750) #### Fixes - Allow imports of `cheerio/utils` by [@&#8203;blixt](https://togithub.com/blixt) in [https://github.com/cheeriojs/cheerio/pull/2601](https://togithub.com/cheeriojs/cheerio/pull/2601) - Allow empty string in `data`, and simplify by [@&#8203;fb55](https://togithub.com/fb55) in [https://github.com/cheeriojs/cheerio/pull/2818](https://togithub.com/cheeriojs/cheerio/pull/2818) - Make `closest` be able to start from text nodes by [@&#8203;Qualtagh](https://togithub.com/Qualtagh) in [https://github.com/cheeriojs/cheerio/pull/2811](https://togithub.com/cheeriojs/cheerio/pull/2811) - Fix potential github action smells by [@&#8203;ceddy4395](https://togithub.com/ceddy4395) in [https://github.com/cheeriojs/cheerio/pull/3826](https://togithub.com/cheeriojs/cheerio/pull/3826) #### Other - Cheerio has [a new website](https://cheerio.js.org), featuring updated API docs and guides! [https://github.com/cheeriojs/cheerio/pull/2950](https://togithub.com/cheeriojs/cheerio/pull/2950) **Full Changelog**: cheeriojs/cheerio@v1.0.0-rc.12...v1.0.0 </details> --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6ImRldiIsImxhYmVscyI6WyJjaG9yZSIsImRlcGVuZGVuY2llcyJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Ben Elan <[email protected]>
1 parent 04d2655 commit c8c007f

File tree

3 files changed

+81
-11
lines changed

3 files changed

+81
-11
lines changed

package-lock.json

+78-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"axe-core": "4.10.0",
7777
"babel-loader": "9.1.3",
7878
"change-case": "4.1.2",
79-
"cheerio": "1.0.0-rc.12",
79+
"cheerio": "1.0.0",
8080
"chokidar": "3.6.0",
8181
"chromatic": "11.7.0",
8282
"concurrently": "8.2.2",

packages/calcite-components/.storybook/manager.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { addons } from "@storybook/manager-api";
2-
import cheerio from "cheerio";
2+
import { load } from "cheerio";
33
import theme from "./theme";
44

55
const globalInternalAttributes = ["calcite-hydrated", "calcite-hydrated-hidden"];
66

77
addons.register("@whitespace/storybook-addon-html", (api) => {
88
// intercept HTML-preview event and remove global internal-attrs
99
api.on("html/htmlReceived", (eventData) => {
10-
const $ = cheerio.load(eventData.html, null, false);
10+
const $ = load(eventData.html, null, false);
1111
globalInternalAttributes.forEach((attribute) => $(`[${attribute}]`).removeAttr(attribute));
1212
eventData.html = $.html();
1313
});

0 commit comments

Comments
 (0)