deps: RN-1761: bump node-fetch 1.7.3 → 2.7.0#6477
Conversation
Summary of ChangesHello @jaskfla, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on a crucial dependency upgrade, specifically bumping the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request upgrades node-fetch from version 1.7.3 to 2.7.0 across multiple packages, presumably to address a security vulnerability. This is a major version bump which introduces breaking changes. I've added comments to each updated package.json file highlighting the most critical changes in node-fetch v2: the requirement for absolute URLs and the removal of the timeout option. It is crucial that all call sites of node-fetch are updated to be compatible with these changes to avoid runtime errors.
| "lodash.isequal": "^4.5.0", | ||
| "lodash.pick": "^4.4.0", | ||
| "node-fetch": "^1.7.3", | ||
| "node-fetch": "^2.7.0", |
There was a problem hiding this comment.
Upgrading node-fetch from v1 to v2 introduces breaking changes. Notably, node-fetch v2 requires absolute URLs for all requests and will throw an error if a relative URL is provided. Additionally, the timeout option on requests has been removed. The code using node-fetch in this package needs to be compatible with these changes to avoid runtime failures.
| "lodash": "^4.17.4", | ||
| "moment": "^2.24.0", | ||
| "node-fetch": "^1.7.3", | ||
| "node-fetch": "^2.7.0", |
There was a problem hiding this comment.
Upgrading node-fetch from v1 to v2 introduces breaking changes. Notably, node-fetch v2 requires absolute URLs for all requests and will throw an error if a relative URL is provided. Additionally, the timeout option on requests has been removed. The code using node-fetch in this package needs to be compatible with these changes to avoid runtime failures.
| "dependencies": { | ||
| "https-proxy-agent": "^5.0.1", | ||
| "node-fetch": "^1.7.3", | ||
| "node-fetch": "^2.7.0", |
There was a problem hiding this comment.
Upgrading node-fetch from v1 to v2 introduces breaking changes. Notably, node-fetch v2 requires absolute URLs for all requests and will throw an error if a relative URL is provided. Additionally, the timeout option on requests has been removed. The code using node-fetch in this package needs to be compatible with these changes to avoid runtime failures.
There was a problem hiding this comment.
@jaskfla you mentioned you've given these a quick sanity test so it's fine to ignore these warnings?
There was a problem hiding this comment.
I’ve deployed and done a smoke test, but for this one I’m gonna hold off merging until this Linear card is officially brought onto the sprint board and do more thorough dev-testing
| "moment": "^2.24.0", | ||
| "moment-timezone": "^0.5.45", | ||
| "node-fetch": "^1.7.3", | ||
| "node-fetch": "^2.7.0", |
There was a problem hiding this comment.
Upgrading node-fetch from v1 to v2 introduces breaking changes. Notably, node-fetch v2 requires absolute URLs for all requests and will throw an error if a relative URL is provided. Additionally, the timeout option on requests has been removed. The code using node-fetch in this package needs to be compatible with these changes to avoid runtime failures.
# Conflicts: # yarn.lock
# Conflicts: # packages/api-client/package.json # yarn.lock
RN-1761
Fixes https://github.com/beyondessential/tupaia/security/dependabot/189
Note
Upgrade node-fetch to ^2.7.0 across multiple packages and update @types/node-fetch, with corresponding yarn.lock changes.
node-fetch^1.7.3→^2.7.0inpackages/api-client/package.json,packages/e2e/package.json,packages/superset-api/package.json,packages/utils/package.json.@types/node-fetch^2.6.11→^2.6.13inpackages/api-client/package.json.node-fetchand@types/node-fetch, adding newerform-dataand adjusting related entries.Written by Cursor Bugbot for commit ea71981. This will update automatically on new commits. Configure here.