-
Notifications
You must be signed in to change notification settings - Fork 64
fix: drop deprecated node-fetch package #4503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request removes the deprecated node-fetch (v3.3.2) and abort-controller (v3.0.0) packages from the @hpcc-js/comms package, updating the codebase to rely on native Node.js >= v18 implementations of fetch and AbortController. The change simplifies the dependency tree and modernizes the package for current Node.js versions.
Key changes:
- Removed polyfill-based implementations in favor of native Node.js APIs
- Added comprehensive test coverage for AbortController functionality
- Cleaned up package-lock.json to remove deprecated dependencies and their transitive dependencies
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
packages/comms/tests/abortController.spec.ts |
New test file adding comprehensive coverage for AbortController functionality with various scenarios (immediate abort, delayed abort, multiple requests, GET/POST methods) |
packages/comms/src/index.node.ts |
Removed conditional polyfill imports for node-fetch and abort-controller, now assumes native Node.js >= v18 APIs are available |
packages/comms/package.json |
Removed node-fetch and abort-controller from dependencies |
package-lock.json |
Cleaned up dependency tree removing node-fetch, abort-controller, and their transitive dependencies (fetch-blob, formdata-polyfill, node-domexception, web-streams-polyfill, and various whatwg-url/webidl-conversions versions) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
f1ea6e0 to
5846ce9
Compare
Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
5846ce9 to
63511b8
Compare
Checklist:
Testing: