cloudflare / node-cloudflare

Node.js API for Client API
https://cloudflare.github.io/node-cloudflare/
Other
335 stars 92 forks source link

DeprecationWarning: OutgoingMessage.prototype._headers is deprecated #110

Closed ShivamJoker closed 7 months ago

ShivamJoker commented 2 years ago

Would be great to have it fixed

(node:145390) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated (Use node --trace-deprecation ... to show where the warning was created)

cmdshepard commented 2 years ago

This is due to the version of got being used.

Issue #104 mentions a pending migration away from got.

@terinjokes is migrating away from got still on your radar?

terinjokes commented 2 years ago

Yep. That work is in progress (and you may see WIP branches soon).

ShivamJoker commented 2 years ago

@terinjokes shouldn't it be as simple as updating the package or are there any breaking changes?

terinjokes commented 2 years ago

I didn't know this at the time I picked it, but pretty much every version of got is a breaking change, and I made the mistake of exposing too much of the API to external users.

ShivamJoker commented 2 years ago

@terinjokes it's been 3 months and still no updates on the library?

holgersindbaek commented 1 year ago

This issue seems to have broken the library. Since the new year, I've received a 400 response.

rawpixel-vincent commented 1 year ago

the deprecated warnings come from timed-out module https://github.com/sindresorhus/timed-out/commit/5c7469321775e7d7cf07ddd85abc597cdf56d5ad

it's been fixed in 5.0.0.

~would the maintainer accept a PR that pin timed-out to resolve from this commit ^ using resolutions field from package.json~

Edit: nevermind this probably need to be handled properly by upgrading or removing got https://github.com/cloudflare/node-cloudflare/issues/109