unjs / ipx

🖼️ High performance, secure and easy-to-use image optimizer.
MIT License
1.54k stars 61 forks source link

DeprecationWarning: response.buffer() require update #69

Closed Triloworld closed 2 years ago

Triloworld commented 2 years ago

Error: (node:43925) [node-fetch#buffer] DeprecationWarning: Please use 'response.arrayBuffer()' instead of 'response.buffer()' 09:03:53 (Use node --trace-deprecation ... to show where the warning was created)

Node: v17.8.0

This dependency generate warning: https://github.com/unjs/ipx/blob/9296aa2e0fb376f8f18824f1306a9998b8a39a98/package.json#L37 In it: https://github.com/unjs/ohmyfetch/blob/26641a4405826de6281e357bdd665df692d0f340/package.json#L47

Where fix require apply and test: https://github.com/unjs/ipx/blob/59a20a63d55d6d6ccfce3fc2e70fb8acf82a21a6/src/sources/http.ts#L59

Show after Node upgrade

pi0 commented 2 years ago

Thanks for the issue! Should be fixed in next release.