Uh oh!
There was an error while loading. Please reload this page.
punycode: deprecate punycode module - #7552
Conversation
jasnell
commented
Jul 6, 2016
@ChALkeR ... would you be able to do a search to see how much of any impact this would have on the ecosystem? |
jasnell
commented
Jul 6, 2016
@nodejs/ctc |
There was a problem hiding this comment.
Should we suggest the npm package?
silverwind
commented
Jul 6, 2016
LGTM with suggestion. |
Fishrock123
commented
Jul 6, 2016
Can we expose this functionality to ICU in a way that isn't hugely breaking? That would seem to be the best route as this functionality is useful, and having it from ICU without a native add-on could be a plus. |
bnoordhuis
commented
Jul 6, 2016
LGTM. I think @silverwind's suggestion is a good one. |
trevnorris
commented
Jul 6, 2016
I assume that |
rvagg
commented
Jul 7, 2016
lgtm, one less thing to expose |
ChALkeR
commented
Jul 7, 2016
@jasnell Will check a bit later today. |
jasnell
commented
Jul 7, 2016
That's the intent, yes. I already have both implemented in my whatwg URL PR.
|
Fishrock123
commented
Jul 7, 2016
I'd still like to know why we don't just continue exposing it but with an ICU-backed implementation? ... May I remind people that we can't even get rid of |
jasnell
commented
Jul 7, 2016
@Fishrock123 ... we could replace parts of it, yes. There are a couple of extraneous functions exposed that we'd have to reimplement if we were to go that route. Just don't see the point tho, for those people who happen to use the If it makes things easier, we can do a soft-deprecation in v7 and only do the hard-deprecation in v8. |
You don't even need to use npm to use the Sorry, I don't buy that we can just get rid of the module unless we have clear data that says literally no-one uses it. cc @ChALkeR I suppose. |
jasnell
commented
Jul 7, 2016
See: #7552 (comment) and #7552 (comment) Note that this PR does not remove the |
jasnell
commented
Jul 25, 2016
ping @nodejs/ctc |
jasnell
commented
Jul 25, 2016
Putting on the ctc agenda to see if we can get resolution. |
ChALkeR
commented
Jul 25, 2016
Argh, totally forgot about this, sorry. Will post some stats today =). |
bnoordhuis
commented
Jul 25, 2016
For the record, while the PR technically LGTM last time I looked at it, the punycode module itself never bothered me. It does the one thing it does well and we hardly ever get bug reports for it. Replacing it with a ICU-backed implementation is kind of meh, IMO. That would break something that isn't broken in non-ICU builds. |
jasnell
commented
Jul 25, 2016
In non-ICU builds, the punycode module is still used so nothing breaks there. I could make it so that the hard deprecation notice is not printed in non-ICU builds if that would be better. |
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.jasnell
commented
Jul 25, 2016
Updated the PR so that the deprecation notice is only printed if the build includes ICU, this way non-ICU builds are not affected. |
ChALkeR
commented
Jul 25, 2016
@jasnell — https://gist.github.com/ChALkeR/6dc79b79918f7728659fbc28c5723961. That's a bit old, though, I could make the new dataset today or tomorrow if needed. |
jasnell
commented
Jul 25, 2016
Quite a few hits... thank you @ChALkeR ... |
jasnell
commented
Jul 27, 2016
The punycode module on npm is an updated version of what we ship in core. It's API is compatible as far as I can tell. |
srl295
commented
Jul 27, 2016
the punycode module on npm is by (and CC:) @mathiasbynens |
@jasnell Btw, the Btw, |
jasnell
commented
Jul 27, 2016
Discussion by the CTC would be to soft deprecate in v7 and revisit hard deprecation prior to v8. |
yorkie
commented
Jul 28, 2016
jasnell
commented
Aug 1, 2016
Closing this PR in favor of #7941 |
As discussed and agreed upon by the CTC, the punycode module bundled in core is soft-deprecated (docs only) for v7 with an eye towards hard-deprecation in v8 or later. Also see discussion in #7552 PR-URL: #7941 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Checklist
make -j4 test(UNIX), orvcbuild test nosign(Windows) passesAffected core subsystem(s)
punycode
Description of change
Currently, the
punycodemodule 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, thepunycodemodule is now only used when node happens to be built without ICU. This change moves thepunycodemodule tointernal/punycodeand hard deprecatesrequire('punycode').When the new WHATWG URL implementation lands, users will have access to the
URL.domainToUnicode()andURL.domainToASCIIstatics that are defined as part of the standard interface.The next step (in the next major) is to remove
require('punycode')entirely and make it so thatinternal/punycode.jsis only included if the Node.js binary is built without ICU.Why? - (a) we do not maintain or support the punycode module, (b) it's 10x slower than the ICU based implementation, (c) we use it exactly once currently, (d) there are userland options, (e) deprecating and eventually removing reduces overall core API surface area.