dropbox / dropbox-sdk-js

The Official Dropbox API V2 SDK for Javascript
https://www.dropbox.com/developers
MIT License
942 stars 354 forks source link

Old node-fetch dependency chain causing deprecation error #1143

Open Downchuck opened 2 months ago

Downchuck commented 2 months ago

The latest SDK is a bit long in the tooth - the node-fetch requirement is dated and in the dependency chain causes a deprecation warning from the yarn package manager.

While that node-fetch package could be bumped to something more current, or ade optional per #1130 the use of built-in fetch may have some challenges.

So, as a workaround for yarn users, this one can help:

  "resolutions": {
    "whatwg-url": "14.0.0 "
  },
greg-db commented 2 months ago

Thanks for sharing this! I'll ask the team to update the SDK to address this.

unilynx commented 1 month ago

For NPM the equivalent workaround is adding an overrides key to package.json:

  "overrides": {
    "whatwg-url": "14.0.0"
  }

I don't know how far back the SDK wants to go with node support, but modern nodes ship with built-in fetch so the SDK might consider completely eliminating the dependency

greg-db commented 1 month ago

Thanks for the information!