You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the example project in Node 22 reveals a DeprecationWarning about the "punycode" module:
example/ $ npm run build
example/ $ node --trace-deprecation dist/index.js
(node:73571) [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:399:7)
at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:338:10)
at loadBuiltinModule (node:internal/modules/helpers:112:7)
at Function._load (node:internal/modules/cjs/loader:1100:17)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:219:24)
at Module.require (node:internal/modules/cjs/loader:1340:12)
at require (node:internal/modules/helpers:138:16)
at Object.<anonymous> (/Users/mattmil3/Developer/SimpleWebAuthn/example/node_modules/whatwg-url/lib/url-state-machine.js:2:18)
🚀 Server ready at http://localhost:8000 (127.0.0.1:8000)
Digging into the dependency graph, whatwg-url is a dependency of cross-fetch:
Cross-fetch shouldn't be needed anymore, though, as the minimum supported Node is 20 where the fetch API is available globally. Deno features fetch globally too. Looking at when I added cross-fetch (which replaced node-fetch) two years ago now, it was necessary when this project still targeted Node 16 (Node 18 introduced fetch support.)
Interestingly only MetadataService uses cross-fetch by importing helpers/fetch.ts:
Enough time has passed I think it's safe to cross cross-fetch from the server package to prevent this issue, and to update MetadataService to use globally-available fetch() instead.
The text was updated successfully, but these errors were encountered:
Describe the issue
Running the example project in Node 22 reveals a
DeprecationWarning
about the "punycode" module:Digging into the dependency graph,
whatwg-url
is a dependency ofcross-fetch
:Cross-fetch shouldn't be needed anymore, though, as the minimum supported Node is 20 where the
fetch
API is available globally. Deno featuresfetch
globally too. Looking at when I addedcross-fetch
(which replacednode-fetch
) two years ago now, it was necessary when this project still targeted Node 16 (Node 18 introduced fetch support.)Interestingly only
MetadataService
uses cross-fetch by importing helpers/fetch.ts:Enough time has passed I think it's safe to cross
cross-fetch
from the server package to prevent this issue, and to updateMetadataService
to use globally-availablefetch()
instead.The text was updated successfully, but these errors were encountered: