Both seems stale, so I hope that we can fix quicktype-core in the meantime. I've used the solution recommended into the cross-fetch issue toward conditional import and using native node fetch if available.
Motivation and Context
We're using quicktype-core in some of our tools, one of them being a cli tool, every-time a command is ran the deprecation coming from quicktype-codecross-fetch dependency shows up on node >=v21.
Previous Behaviour / Output
(node:6629) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
New Behaviour / Output
No warning output.
How Has This Been Tested?
Build and pack the quicktype-core package locally with the change
Change my project quicktype-core dependency to point to the local builded package tgz and install
Used FetchingJSONSchemaStore in node scripts to trigger the fetch behaviour with node versions 16.20.1, 18.20.2 and 21.7.3
Build my project cli tool, and run it over with node versions v16.20.2, v18.20.2, v21.7.3 expected behaviour occurs and the warning is gone.
Description
Related Issue
I've been following those issues on node-fetch https://github.com/node-fetch/node-fetch/pull/1793 And on cross-fetch https://github.com/lquixada/cross-fetch/issues/177
Both seems stale, so I hope that we can fix
quicktype-core
in the meantime. I've used the solution recommended into thecross-fetch
issue toward conditional import and using native node fetch if available.Motivation and Context
We're using
quicktype-core
in some of our tools, one of them being a cli tool, every-time a command is ran the deprecation coming fromquicktype-code
cross-fetch
dependency shows up on node >=v21.Previous Behaviour / Output
New Behaviour / Output
No warning output.
How Has This Been Tested?
quicktype-core
package locally with the changequicktype-core
dependency to point to the local builded packagetgz
and installFetchingJSONSchemaStore
in node scripts to trigger the fetch behaviour with node versions16.20.1
,18.20.2
and21.7.3
v16.20.2
,v18.20.2
,v21.7.3
expected behaviour occurs and the warning is gone.Screenshots (if appropriate):