Skip to content

Commit 7b0c497

Browse files
committed
punycode: deprecate punycode module
Currently, the punycode module is used in exactly one spot within core (the url parser). With the recent switch to using the much faster ICU based punycode implementation by default, the punycode module is now only used when node happens to be built without icu. This change moves the punycode module into internal and hard deprecates `require('punycode')`. The hard deprecation notice is only printed in ICU builds. When the new WHATWG URL implementation lands, users will have access to the URL.domainToUnicode() and URL.domainToASCII statics that are defined as part of the standard interface. The next step (in the next major) is to make it so that internal/punycode.js is only included if the Node.js binary is built without ICU.
1 parent e4abfe4 commit 7b0c497

File tree

7 files changed

+454
-441
lines changed

7 files changed

+454
-441
lines changed

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
lib/internal/v8_prof_polyfill.js
2-
lib/punycode.js
2+
lib/internal/punycode.js
33
test/addons/??_*/
44
test/fixtures
55
test/disabled

doc/api/punycode.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# punycode
22

3-
Stability: 2 - Stable
3+
Stability: 0 - Deprecated
44

55
The `punycode` module is a bundled version of the [Punycode.js][] module. It
66
can be accessed using:

0 commit comments

Comments
 (0)