Vonage / vonage-node-sdk

Vonage API client for Node.js. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.
Apache License 2.0
375 stars 178 forks source link

[Bug]: Update to use `fetch` over `node-fetch`? #938

Open abdulajet opened 2 weeks ago

abdulajet commented 2 weeks ago

Node Version

22.x

Platform

Mac (Apple Silcon)

SDK Version

3.14.x

Code Sample

npm install @vonage/server-sdk
// use sdk in a index.js for example
node index.js

Expected Behavior

Runs without deprecation warning for punycode

Actual Behavior

Has deprecation warning for punycode See https://github.com/node-fetch/node-fetch/pull/1793#issuecomment-1839050150

I think we should be good to remove the node-fetch dependancy since fetch is available in node v18 and upwards (as experimental) and stable in v21. Not sure how experimental it is until v21, so I will leave it to you to decide if its worth making the change yet