-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
punycode: update to v2.0.0 #7267
Conversation
* function. | ||
*/ | ||
function mapDomain(string, fn) { | ||
const parts = string.split('@'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, what does this function do to strings like 'foo@bar@baz'
? Drop the @baz
part?
Looks like a bunch of failures |
@mathiasbynens Please steal this patch. I hope the tabs get through alright. diff --git a/test/message/core_line_numbers.out b/test/message/core_line_numbers.out
index 4cd0c0b..28b4575 100644
--- a/test/message/core_line_numbers.out
+++ b/test/message/core_line_numbers.out
@@ -1,9 +1,9 @@
-punycode.js:67
- throw new RangeError(errors[type]);
- ^
+punycode.js:42
+ throw new RangeError(errors[type]);
+ ^
RangeError: Invalid input
- at error (punycode.js:67:*)
+ at error (punycode.js:42:*)
at Object.decode (punycode.js:*:*)
at Object.<anonymous> (*test*message*core_line_numbers.js:*:*)
at Module._compile (module.js:*:*) EDIT: They don't. The spaces before the throw and the caret should be a single tab. |
Patch stolen. Thanks, @bnoordhuis! |
Punycode v2.0.0 drops support for old and non-Node environments.
I still managed to mess up the tabs somehow, sorry about that. The amended patch passes all tests. Can you kick off CI once more please? |
CI: https://ci.nodejs.org/job/node-test-pull-request/2989/ (one of the ppcbe buildbots appears to be stuck so it's possible the run doesn't show up as complete within a reasonable amount of time.) EDIT: Also, LGTM. |
CI is basically green, LGTM. |
Thanks! Landed in b77eb8c. |
@mathiasbynens @nodejs/lts backport to v4.x? |
@thealphanerd Note that Punycode.js supports Node.js v6+ only. It may work on Node.js v4 as well but no such guarantee is made. It might be better to leave v4.x as-is, especially since Punycode.js v2 doesn’t add any new functionality. |
Marking as don't land |
This patch updates Punycode.js to v2.0.0. It drops support for old and non-Node environments. This fixes #7224.