Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/url-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"typescript": "5.9.3"
},
"dependencies": {
"cheerio": "^0.22.0",
"cheerio": "^1.0.0",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 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.json

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

"lodash": "^4.17.21",
"moment": "^2.27.0",
"moment-timezone": "^0.5.31",
Expand Down
Loading
Loading