Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump cheerio from 1.0.0-rc.6 to 1.0.0-rc.9 #692

Merged
merged 1 commit into from
Jun 3, 2021

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 1, 2021

Bumps cheerio from 1.0.0-rc.6 to 1.0.0-rc.9.

Release notes

Sourced from cheerio's releases.

v1.0.0-rc.9

Port to TypeScript

Cheerio has been ported entirely to TypeScript (in #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.

- 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:

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<T> 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 $('<div>'), it will product a Cheerio<Node> 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<Element>, as only Elements 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<string>.

This release does not contain other changes to functionality. Feedback is greatly appreciated; if you encounter a problem, please file an issue!

cheeriojs/cheerio@v1.0.0-rc.6...v1.0.0-rc.9

v1.0.0-rc.8

Second botched release. Please use v1.0.0-rc.9 instead.

v1.0.0-rc.7

Published without a lib directory — please ignore.

Commits
  • 95759d6 1.0.0-rc.9
  • 52678df fix(build): No longer export package version
  • 649b6cf 1.0.0-rc.8
  • 6e629cd fix(package): Build the module before publishing
  • 819f9b2 1.0.0-rc.7
  • 26ba3ac chore(docs): Fix formatting of README
  • 59454a2 build(deps-dev): bump many dev deps (#1841)
  • 463d404 docs(readme): Add note about perf benefits
  • cbb5fc9 chore(docs): Automatically update sponsors in README (#1840)
  • ed496cd chore(ci): Set default Node version to 16 (#1839)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

Dependabot will merge this PR once it's up-to-date and CI passes on it, as requested by @zbynek.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot requested a review from a team as a code owner June 1, 2021 17:46
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jun 1, 2021
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/cheerio-1.0.0-rc.9 branch 10 times, most recently from d16d4c9 to 2e94666 Compare June 2, 2021 10:27
@zbynek
Copy link
Contributor

zbynek commented Jun 2, 2021

@dependabot merge

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/cheerio-1.0.0-rc.9 branch from 2e94666 to eff17fd Compare June 2, 2021 18:55
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Jun 3, 2021

One of your CI runs failed on this pull request, so Dependabot won't merge it.

Dependabot will still automatically merge this pull request if you amend it and your tests pass.

Bumps [cheerio](https://github.com/cheeriojs/cheerio) from 1.0.0-rc.6 to 1.0.0-rc.9.
- [Release notes](https://github.com/cheeriojs/cheerio/releases)
- [Changelog](https://github.com/cheeriojs/cheerio/blob/main/History.md)
- [Commits](cheeriojs/cheerio@v1.0.0-rc.6...v1.0.0-rc.9)

---
updated-dependencies:
- dependency-name: cheerio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/cheerio-1.0.0-rc.9 branch from eff17fd to 2809091 Compare June 3, 2021 07:44
@dependabot dependabot bot merged commit 85f8425 into master Jun 3, 2021
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/cheerio-1.0.0-rc.9 branch June 3, 2021 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant