Conversation
02f4363 to
45c62d4
Compare
e8f6d91 to
66319c0
Compare
5e830d8 to
0914181
Compare
76a3575 to
db44755
Compare
838e41b to
9ca83e1
Compare
OpenAPI ChangesShow/hide ## Changes for v0.yaml:Unexpected changes? Ensure your branch is up-to-date with |
|
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", |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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.
This PR contains the following updates:
1.0.0-rc.12→1.2.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 - "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.
This PR was generated by Mend Renovate. View the repository job log.