jrit / web-resource-inliner

Inlines img, script and link tags into the same file
MIT License
66 stars 29 forks source link

Remove deprecated punycode throwing deprecation warning to stderr #84

Open alfonsrv opened 1 month ago

alfonsrv commented 1 month ago

I am using mjml which depends on juice, which in turn depends on web-resource-inliner, throwing the following warning to stderr: (node:60710) [DEP0040] DeprecationWarning: The "punycode" module is deprecated. Please use a userland alternative instead.

punycodenode-fetchweb-resource-inlinerjuice

Any alternative to work around this or way to fix this?

iRyusa commented 4 weeks ago

Sorry to ping you directly @jrit

Seems like node-fetch could be easily replaced by native nodejs fetch ? I don't know if you could confirm this so I can try to make a PR for this

jrit commented 4 weeks ago

seems totally reasonable to me

iRyusa commented 3 weeks ago

Ok so I tried, it need a few changes to make it work. I'm down to a single test that doesn't work anymore. faux-jax library doesn't work with fetch so I've replaced to fetch-mock that does almost the same thing. I'm still having 1 test that doesn't work fine with fetch-mock and i'm unsure if it's because of the mock or the code yet. I'll open the PR in WIP