-
-
Notifications
You must be signed in to change notification settings - Fork 82
Update dependency cheerio to v1 #501
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
base: main
Are you sure you want to change the base?
Conversation
0b30775 to
5790c99
Compare
5790c99 to
a7cc54f
Compare
a7cc54f to
bb15780
Compare
8874e57 to
f1dfe7d
Compare
f1dfe7d to
b39ba19
Compare
b39ba19 to
5af39ba
Compare
5af39ba to
7f4c43a
Compare
6984e6e to
df48ae8
Compare
c98cc42 to
7cb9b8b
Compare
7cb9b8b to
d23cc48
Compare
f8c5c71 to
8a423de
Compare
8a423de to
e57c251
Compare
e57c251 to
4d5924a
Compare
4d5924a to
6cb2dca
Compare
6cb2dca to
4892cbc
Compare
0182c9b to
df8ed43
Compare
df8ed43 to
aaf0794
Compare
aaf0794 to
ec5b051
Compare
ec5b051 to
e1a6638
Compare
e1a6638 to
abfbd9d
Compare
abfbd9d to
744d3ac
Compare
WalkthroughThe pull request updates the cheerio dependency in packages/url-utils/package.json from version ^0.22.0 to ^1.0.0. This is a single-line version specification change with no modifications to package scripts, other dependencies, or any functional code. Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
74827ef to
3638ea3
Compare
3638ea3 to
3b38098
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@packages/url-utils/package.json`:
- Line 41: The package.json currently includes a dependency conflict: Cheerio v1
provides built-in TypeScript types so the legacy `@types/cheerio` (package name
"@types/cheerio") in devDependencies is redundant and may be incompatible;
remove "@types/cheerio" from devDependencies (or replace it with a v1-compatible
types package if you have a specific need) and then run a TypeScript build to
confirm usages like cheerio.load(...) (and any import/typing references in the
codebase) compile cleanly without the `@types` package.
| }, | ||
| "dependencies": { | ||
| "cheerio": "^0.22.0", | ||
| "cheerio": "^1.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check Node engine constraints at both root and package levels
echo "=== Root package.json engines ==="
jq '.engines' package.json 2>/dev/null || grep -A2 '"engines"' package.json || echo "No engines field found"
echo -e "\n=== packages/url-utils/package.json engines ==="
jq '.engines' packages/url-utils/package.json 2>/dev/null || grep -A2 '"engines"' packages/url-utils/package.json || echo "No engines field found"
# Check current package.json structure
echo -e "\n=== packages/url-utils/package.json (full) ==="
cat packages/url-utils/package.jsonRepository: TryGhost/SDK
Length of output: 1495
🏁 Script executed:
#!/bin/bash
# Find all JavaScript/TypeScript files in url-utils
echo "=== Files in packages/url-utils ==="
find packages/url-utils -type f \( -name "*.js" -o -name "*.ts" -o -name "*.tsx" -o -name "*.jsx" \) | head -20
# Check if cheerio is imported anywhere
echo -e "\n=== Cheerio imports/usages ==="
rg -n 'cheerio' packages/url-utils --type=js --type=ts -C2 || echo "No cheerio imports found"
# Check for `@types/cheerio` references
echo -e "\n=== `@types/cheerio` references ==="
rg -n '@types/cheerio' packages/url-utils || echo "No `@types/cheerio` references found"
# Check dependencies for `@types/cheerio` in package.json
echo -e "\n=== `@types/cheerio` in dependencies ==="
grep -i '@types/cheerio' packages/url-utils/package.json || echo "@types/cheerio not in dependencies"Repository: TryGhost/SDK
Length of output: 27141
Update @types/cheerio since Cheerio v1 ships with built-in types.
The @types/cheerio package (v0.22.31) is for Cheerio v0.x and is redundant for Cheerio v1, which includes its own TypeScript definitions. Either remove @types/cheerio from devDependencies or update it to a v1-compatible version. The current codebase usage pattern (cheerio.load() API) is already compatible with Cheerio v1.
🤖 Prompt for AI Agents
In `@packages/url-utils/package.json` at line 41, The package.json currently
includes a dependency conflict: Cheerio v1 provides built-in TypeScript types so
the legacy `@types/cheerio` (package name "@types/cheerio") in devDependencies is
redundant and may be incompatible; remove "@types/cheerio" from devDependencies
(or replace it with a v1-compatible types package if you have a specific need)
and then run a TypeScript build to confirm usages like cheerio.load(...) (and
any import/typing references in the codebase) compile cleanly without the `@types`
package.
This PR contains the following updates:
^0.22.0→^1.0.0Release Notes
cheeriojs/cheerio (cheerio)
v1.2.0Compare Source
What's Changed
.val()now supports button values by @kaioduarte in #4175.find()now properly scopes:scopeselectors by @T0nd0Tara in #4967isHtmlutility now runtime-validates input types by @Mallikarjun-0 in #4523New Contributors
Full Changelog: cheeriojs/cheerio@v1.1.2...v1.2.0
v1.1.2Compare Source
What's Changed
Full Changelog: cheeriojs/cheerio@v1.1.1...v1.1.2
v1.1.1Compare Source
91a2b3dv1.1.0Compare Source
What's Changed
.propon document nodes by @fb55 in #4320browsertopackage.jsonroot by @UNIDY2002 in #4033Doc Improvements
.htmlwith.propfor outerHTML by @fb55 in #4321New Contributors
Full Changelog: cheeriojs/cheerio@v1.0.0...v1.1.0
v1.0.0Compare Source
Cheerio 1.0 is here! 🎉
Announcement Blog Post
Breaking Changes
The minimum NodeJS version is now 18.17 or higher #3959
Import paths were simplified. For example, use
cheerio/sliminstead ofcheerio/lib/slim. #3970The deprecated default Cheerio instance and static methods were removed. #3974
Before, it was possible to write code like this:
Make sure to always load documents first:
Node types previously re-exported by Cheerio must now be imported directly
from (
domhandler)(https://github.com/fb55/domhandler). #3969htmlparser2 options now reside exclusively under the
xmlkey (#2916):New Features
Fixes
cheerio/utilsby @blixt in #2601data, and simplify by @fb55 in #2818closestbe able to start from text nodes by @Qualtagh in #2811Other
Full Changelog: cheeriojs/cheerio@v1.0.0-rc.12...v1.0.0
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Never, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.