Question about your code for Node.js built-in modules loading #26835
nicolo-ribaudo
started this conversation in
General
Replies: 1 comment
-
Good catch, I bet this warning is emitted during V8 snapshot creation (ie. during the build process) and that's why it's never surfaced. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
I was reading how Deno implements
require()
of built-in Node.js modules, and I noticed this file: https://github.com/denoland/deno/blob/main/ext/node/polyfills/01_require.jsThe
punycode
module is deprecated, so it's defined as a getter with the deprecation warning:deno/ext/node/polyfills/01_require.js
Lines 243 to 251 in 7d326c2
However, that getter is triggered immediately by
deno/ext/node/polyfills/01_require.js
Line 277 in 7d326c2
I'm asking this question because I don't actually see the warning unexpectedly, even if by reading the code it seems like the warning would be printed even if
punycode
is not required. What am I missing?Beta Was this translation helpful? Give feedback.
All reactions