Skip to content

Update dependency cheerio to v1.2.0#2625

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/cheerio-1.x
Open

Update dependency cheerio to v1.2.0#2625
renovate[bot] wants to merge 1 commit intomainfrom
renovate/cheerio-1.x

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented May 3, 2025

This PR contains the following updates:

Package Change Age Confidence
cheerio (source) 1.0.0-rc.121.2.0 age confidence

Release Notes

cheeriojs/cheerio (cheerio)

v1.2.0

Compare Source

What's Changed

New Contributors

Full Changelog: cheeriojs/cheerio@v1.1.2...v1.2.0

v1.1.2

Compare Source

What's Changed

Full Changelog: cheeriojs/cheerio@v1.1.1...v1.1.2

v1.1.1

Compare Source


v1.1.0

Compare Source

What's Changed

Doc Improvements

New Contributors

Full Changelog: cheeriojs/cheerio@v1.0.0...v1.1.0

v1.0.0

Compare 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/slim instead of
    cheerio/lib/slim. #​3970

  • The deprecated default Cheerio instance and static methods were removed. #​3974

    Before, it was possible to write code like this:

    import cheerio, { html } from 'cheerio';
    
    html(cheerio('<test></test>')); // ~ '<test></test>' -- NO LONGER WORKS

    Make sure to always load documents first:

    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). #​3969

  • htmlparser2 options now reside exclusively under the xml key (#​2916):

    const $ = cheerio.load('<html>', {
      xml: {
        withStartIndices: true,
      },
    });

New Features

Fixes

Other

Full Changelog: cheeriojs/cheerio@v1.0.0-rc.12...v1.0.0


Configuration

📅 Schedule: Branch creation - "every weekend" in timezone US/Eastern, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/cheerio-1.x branch 22 times, most recently from 02f4363 to 45c62d4 Compare May 9, 2025 22:05
@renovate renovate bot force-pushed the renovate/cheerio-1.x branch 7 times, most recently from e8f6d91 to 66319c0 Compare May 13, 2025 05:12
@renovate renovate bot force-pushed the renovate/cheerio-1.x branch 3 times, most recently from 5e830d8 to 0914181 Compare May 27, 2025 17:01
@renovate renovate bot changed the title chore(deps): update dependency cheerio to v1.0.0 Update dependency cheerio to v1.0.0 May 27, 2025
@renovate renovate bot force-pushed the renovate/cheerio-1.x branch 12 times, most recently from 76a3575 to db44755 Compare June 2, 2025 16:03
@renovate renovate bot changed the title Update dependency cheerio to v1.0.0 chore(deps): update dependency cheerio to v1.0.0 Jun 2, 2025
@renovate renovate bot force-pushed the renovate/cheerio-1.x branch 5 times, most recently from 838e41b to 9ca83e1 Compare June 3, 2025 18:59
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

OpenAPI Changes

Show/hide ## Changes for v0.yaml:
## Changes for v0.yaml:


## Changes for v1.yaml:


## Changes for v2.yaml:


Unexpected changes? Ensure your branch is up-to-date with main (consider rebasing).

@jkachel
Copy link
Contributor

jkachel commented Feb 4, 2026

cheerio v1.0.0 requires Node v18. MITx Online targets v17.9 so this is stuck until that upgrade happens (if it does).

},
"resolutions": {
"cheerio": "1.0.0-rc.12",
"cheerio": "1.2.0",
Copy link

Choose a reason for hiding this comment

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

Bug: The resolutions field forces cheerio to 1.2.0, which is incompatible with the project's enzyme version (3.11.0), causing all frontend tests to fail.
Severity: CRITICAL

Suggested Fix

The cheerio resolution should be reverted or pinned to a version compatible with enzyme@3.11.0, such as 1.0.0-rc.3 or lower. Alternatively, upgrade enzyme and its adapter to versions that are compatible with cheerio@1.2.0, if available. Downgrading the cheerio resolution is likely the safer and quicker fix.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: package.json#L19

Potential issue: The `resolutions` in the root `package.json` forces all packages to use
`cheerio@1.2.0`. However, the frontend tests rely on `enzyme@3.11.0`, which is only
compatible with `cheerio` up to version `1.0.0-rc.3`. The newer `cheerio` version has
breaking structural changes, such as removing the `lib` folder that `enzyme` expects. As
a result, the test initialization in `tests_init.js` will fail, preventing over 50 test
files that depend on `enzyme` from running. This will block the CI/CD pipeline.

},
"resolutions": {
"cheerio": "1.0.0-rc.12",
"cheerio": "1.2.0",
Copy link

Choose a reason for hiding this comment

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

Bug: Updating cheerio to 1.2.0 breaks compatibility with enzyme 3.11.0, which is used in frontend tests. Enzyme will fail to import a required internal module, causing tests to crash.
Severity: CRITICAL

Suggested Fix

Downgrade the cheerio resolution in package.json back to a version compatible with enzyme 3.11.0, such as 1.0.0-rc.12. Alternatively, upgrade enzyme to a newer version that supports cheerio 1.2.0, which may require significant test refactoring.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: package.json#L19

Potential issue: The project's frontend tests rely on `enzyme` version 3.11.0. This
version of `enzyme` has a dependency on `cheerio` and requires internal modules like
`cheerio/lib/utils` that are only available in `cheerio` versions up to `1.0.0-rc.3`.
The pull request updates `cheerio` to `1.2.0` via the `resolutions` field in
`package.json`. This newer version of `cheerio` no longer exposes the required internal
modules. As a result, when the CI pipeline executes the test suite, `enzyme` will fail
to load, causing a module resolution error and a complete failure of all frontend tests.
This will block any further code merges.

},
"resolutions": {
"cheerio": "1.0.0-rc.12",
"cheerio": "1.2.0",
Copy link

Choose a reason for hiding this comment

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

Bug: The cheerio upgrade introduces a dependency on undici v7, which requires Node.js 20+. This conflicts with the project's Docker and package.json configurations that specify Node.js 17.
Severity: CRITICAL

Suggested Fix

Align the Node.js versions across all environments. Either upgrade the Dockerfile, docker-compose.yml, and package.json engines field to use a compatible Node.js 20+ version, or find a version of the dependency that does not require undici v7.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: package.json#L19

Potential issue: The update to `cheerio` to version `1.2.0` introduces a transitive
dependency on `undici` version 7, which requires Node.js 20.18.1 or higher. The
project's production `Dockerfile` and local development environment
(`docker-compose.yml`) are configured to use `node:17.9`, and the
`frontend/public/package.json` specifies a Node version of `<18`. This version mismatch
will cause the production Docker image build to fail during `yarn install` or lead to a
runtime crash if the application is deployed, as the Node.js environment does not meet
the dependency's requirements. This issue was not detected by CI because the CI pipeline
runs on Node.js 20.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants