Skip to content

refactor(api): use ky and undici instead of got #756#844

Draft
JonasSchubert wants to merge 1 commit intomasterfrom
refactor/use-ky-and-undici-#756
Draft

refactor(api): use ky and undici instead of got #756#844
JonasSchubert wants to merge 1 commit intomasterfrom
refactor/use-ky-and-undici-#756

Conversation

@JonasSchubert
Copy link
Copy Markdown
Contributor

Initial draft to move from got to ky (using undici).

@JonasSchubert
Copy link
Copy Markdown
Contributor Author

  • Tests are failing caused by undicis minimum node version being set to 20.18.1 in this PR.
  • either we also introduce a breaking change by updating our engine to same 20.x.x or higher or we abandon that for now
  • also @ievgennaida made a good point, but instead of mixing undici and ky we could simply use only undici (if we continue this direction)
@travi
Copy link
Copy Markdown
Member

travi commented Apr 11, 2025

  • we also introduce a breaking change by updating our engine to same 20.x.x or higher

with node v18 going EOL at the end of the month, it is a good time to consider tightening our supported ranges. however, we normally change our support to be limited to only the latest LTS line when we do release a breaking chain, so that goes beyond even the change to undici.

we could simply use only undici

i assume we would then use it through the native fetch inerface built into node rather than using undici as a dependency at that point, right? in that case, the node version requirement seems to go away

i guess the question comes down to whether we see ky as providing some value beyond native fetch or not. i dont have strong feelings either way as long as the path we choose favors maintainability.

@ievgennaida
Copy link
Copy Markdown

fetch is introduced in v18 as experimental and became stable in Node.js v21.

@JonasSchubert
Copy link
Copy Markdown
Contributor Author

i assume we would then use it through the native fetch inerface built into node rather than using undici as a dependency at that point, right? in that case, the node version requirement seems to go away

i guess the question comes down to whether we see ky as providing some value beyond native fetch or not. i dont have strong feelings either way as long as the path we choose favors maintainability.

I will continue working on it this week and would try to use node's built-in functionality.

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

Labels

None yet

3 participants