From 32d9dff663368456c2545d04f1758f1eba13fd2a Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 7 Sep 2020 22:50:56 +0200 Subject: [PATCH] idna: use url module instead of punycode --- lib/internal/idna.js | 4 ++-- test/parallel/test-bootstrap-modules.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/internal/idna.js b/lib/internal/idna.js index f57f042888f311..8591226d104d3a 100644 --- a/lib/internal/idna.js +++ b/lib/internal/idna.js @@ -4,6 +4,6 @@ if (internalBinding('config').hasIntl) { const { toASCII, toUnicode } = internalBinding('icu'); module.exports = { toASCII, toUnicode }; } else { - const { toASCII, toUnicode } = require('punycode'); - module.exports = { toASCII, toUnicode }; + const { domainToASCII, domainToUnicode } = require('internal/url'); + module.exports = { toASCII: domainToASCII, toUnicode: domainToUnicode }; } diff --git a/test/parallel/test-bootstrap-modules.js b/test/parallel/test-bootstrap-modules.js index 735f2e6394bd20..0c575a5f77126d 100644 --- a/test/parallel/test-bootstrap-modules.js +++ b/test/parallel/test-bootstrap-modules.js @@ -119,7 +119,7 @@ if (!common.isMainThread) { if (common.hasIntl) { expectedModules.add('Internal Binding icu'); } else { - expectedModules.add('NativeModule punycode'); + expectedModules.add('NativeModule url'); } if (process.features.inspector) {