chialab / rna

🚀 Build tools for modern web modules and applications.
https://chialab.github.io/rna/
MIT License
171 stars 21 forks source link

Replace `punycode` module due to deprecation #165

Open cowwoc opened 6 months ago

cowwoc commented 6 months ago

Node v21.5.0

(node:23616) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
    at node:punycode:3:9
    at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:397:7)
    at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:333:10)
    at loadBuiltinModule (node:internal/modules/helpers:101:7)
    at Module._load (node:internal/modules/cjs/loader:1000:17)
    at Module.require (node:internal/modules/cjs/loader:1234:19)
    at require (node:internal/modules/helpers:176:18)
    at ../../node_modules/node-fetch/node_modules/whatwg-url/lib/url-state-machine.js (C:\Users\Gili\Documents\licensed-app\client\browser\node_modules\.pnpm\@chialab+esbuild-plugin-html@0.18.0\node_modules\node_modules\node-fetch\node_modules\whatwg-url\lib\url-state-machine.js:2:18)
    at __require2 (file:///C:/Users/Gili/Documents/licensed-app/client/browser/node_modules/.pnpm/@chialab+esbuild-plugin-html@0.18.0/node_modules/@chialab/esbuild-plugin-html/dist/index.js:26:50)
    at ../../node_modules/node-fetch/node_modules/whatwg-url/lib/URL-impl.js (C:\Users\Gili\Documents\licensed-app\client\browser\node_modules\.pnpm\@chialab+esbuild-plugin-html@0.18.0\node_modules\node_modules\node-fetch\node_modules\whatwg-url\lib\URL-impl.js:2:13)
cowwoc commented 6 months ago

Per https://github.com/mathiasbynens/punycode.js?tab=readme-ov-file#installation it sounds like you just need to replace your import from punycode to punycode/.

edoardocavazza commented 6 months ago

it seems that punycode is a sub-sub-dependency of jsdom. I'ill try to update the library.

edoardocavazza commented 6 months ago

Updating JSDOM does not solve the issue.
https://github.com/jsdom/jsdom/issues/3613

cowwoc commented 6 months ago

Do you plan to use their pre-release (due out at the end of this week)? Or will you wait for v5 which may take a while?