hrana-client-ts icon indicating copy to clipboard operation
hrana-client-ts copied to clipboard

Use node's fetch instead of cross-fetch

Open li-yechao opened this issue 6 months ago • 1 comments

As following warning message, node-domexception is deprecated, it is a nested dependency of node-fetch (node-fetch also is a dependency of cross-fetch). Since node original support fetch since v18, can we remove cross-fetch/node-fetch polyfill, use node's original fetch instead?

npm warn deprecated [email protected]: Use your platform's native DOMException instead
      @libsql/client 0.15.9
      └─┬ @libsql/hrana-client 0.7.0
        └─┬ node-fetch 3.3.2
          ├─┬ fetch-blob 3.2.0
          │ └── node-domexception 1.0.0
          └─┬ formdata-polyfill 4.0.10
            └─┬ fetch-blob 3.2.0
              └── node-domexception 1.0.0

li-yechao avatar Jul 03 '25 01:07 li-yechao

node-fetch also requires web-streams-polyfill, which is a very large package (8.62 MB).

@libsql/client 0.15.10
└─┬ @libsql/hrana-client 0.7.0
  └─┬ node-fetch 3.3.2
    ├─┬ fetch-blob 3.2.0
    │ └── web-streams-polyfill 3.3.3
    └─┬ formdata-polyfill 4.0.10
      └─┬ fetch-blob 3.2.0
        └── web-streams-polyfill 3.3.3

jrmajor avatar Aug 10 '25 10:08 jrmajor

+1 to this. Will a pull request help, or is this part of the client no longer being maintained?

jpc-ae avatar Dec 05 '25 01:12 jpc-ae