Skip to content

chore: replace cheerio with htmlparser2 - #1176

Open
trivikr wants to merge 2 commits into
nodejs:mainfrom
trivikr:remove-cheerio
Open

chore: replace cheerio with htmlparser2#1176
trivikr wants to merge 2 commits into
nodejs:mainfrom
trivikr:remove-cheerio

Conversation

@trivikr

@trivikr trivikr commented Aug 31, 2026

Copy link
Copy Markdown
Member

Replace cheerio with the lighter, purpose-built htmlparser2, avoiding the additional DOM and query abstractions we do not use.

The project only needs document text and <a> text/href values, so Cheerio’s selector and manipulation APIs are unnecessary. Using htmlparser2 callbacks preserves the existing behavior without constructing a DOM, while reducing the total dependency count.

Comparison between the two packages: https://npmx.dev/compare?packages=cheerio,htmlparser2


Assisted-by: codex:gpt-5.6-sol

Assisted-by: codex:gpt-5.6-sol
@trivikr trivikr changed the title deps: replace cheerio with htmlparser2 chore: replace cheerio with htmlparser2 Aug 31, 2026
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.10%. Comparing base (c903a16) to head (eac8cb9).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1176      +/-   ##
==========================================
+ Coverage   57.81%   58.10%   +0.28%     
==========================================
  Files          53       53              
  Lines       10398    10410      +12     
==========================================
+ Hits         6012     6049      +37     
+ Misses       4386     4361      -25     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant