refactor(api): use ky and undici instead of got #756
Initial draft to move from got to ky (using undici).
- Tests are failing caused by
undicis minimum node version being set to20.18.1in this PR. - either we also introduce a breaking change by updating our engine to same
20.x.xor higher or we abandon that for now - also @ievgennaida made a good point, but instead of mixing
undiciandkywe could simply use onlyundici(if we continue this direction)
- we also introduce a breaking change by updating our engine to same
20.x.xor 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.
fetch is introduced in v18 as experimental and became stable in Node.js v21.
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.