Open felixfbecker opened 6 months ago
@felixfbecker thanks for filing this issue, we'll report back on what we can do here. For context we depend on node-fetch
because we publish a CJS package and node-fetch
only publishes an esm version.
@dsinghvi afaik undici
(the fetch client shipped by NodeJS) is published as CJS: https://www.npmjs.com/package/undici?activeTab=code
But fetch
has also been available unflagged natively in NodeJS since Node 18 (behind a flag since 16.5), so all maintained Node versions are supporting it without any dependency. What is the lowest Node version Merge supports?
@mergeapi/merge-node-client
depends on an outdated version ofnode-fetch
(2.7.0
, latest is3.3.2
), which depends on an outdated version ofwhatwg-url
(5.0.0
, latest is14
), which depends onpunycode
, which is deprecated in Node 21 and will be removed in a future version.This triggers the following deprecation warning at every start:
FYI
fetch()
is also natively available as a global (and stable) since Node 18, which uses theundici
implementation under the hood, which is also available on NPM: https://www.npmjs.com/package/undici It has zero dependencies.