Skip to content

Commit

Permalink
punycode: deprecate punycode module
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jasnell committed Jul 25, 2016
1 parent e4abfe4 commit 7b0c497
Show file tree
Hide file tree
Showing 7 changed files with 454 additions and 441 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
lib/internal/v8_prof_polyfill.js
lib/punycode.js
lib/internal/punycode.js
test/addons/??_*/
test/fixtures
test/disabled
Expand Down
2 changes: 1 addition & 1 deletion doc/api/punycode.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# punycode

Stability: 2 - Stable
Stability: 0 - Deprecated

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

0 comments on commit 7b0c497

Please sign in to comment.