Skip to content
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

refactor: remove dependence node-fetch #102

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CHC383
Copy link

@CHC383 CHC383 commented Jan 24, 2025

close #83

Description

One Line Summary

Remove node-fetch as fetch is available in the modern environments (browser and Node >= 18)

Details

Motivation

This package depends on node-fetch v2.x, which is old and depends on an old version of whatwg-url and causes warning "The punycode module is deprecated. Please use a userland alternative instead." in Node >= 22. node-fetch is not needed in the modern environments, see lquixada/cross-fetch#177 (comment)

Scope

The package will use the Node built-in fetch

Testing

Manual testing

  • yarn prepare
  • I am not sure how to do further testing but I am happy to do so if I could get some guidance.

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
    • Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
  • I have reviewed this PR myself, ensuring it meets each checklist item
    • WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

@sherwinski
Copy link
Contributor

Hi @CHC383 and thanks for opening this PR. Unfortunately, the code in this repo is auto-generated by an upstream project, so I'm not able to accept outside contributions without it being overwritten in future releases. I can investigate removing node-fetch from the generator project which should achieve this same effect.

@CHC383
Copy link
Author

CHC383 commented Jan 24, 2025

@sherwinski Got it, thanks, please remove it from the upstream project. BTW, any timeline for the new release which will also fix #61?

@CHC383 CHC383 closed this Jan 24, 2025
@sherwinski
Copy link
Contributor

Sorry, I don't have an updated timeline at this point. I am still in the process of amending other issues in the SDK but will look into it afterwards.

@CHC383
Copy link
Author

CHC383 commented Feb 11, 2025

Reopen the PR as a reminder until the fix is applied in the upstream project

@CHC383 CHC383 reopened this Feb 11, 2025
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.

[Bug]: update node-fetch to 3.x
2 participants