Use the latest punycode(1.3.2) by oldmtn · Pull Request #1865 · browserify/browserify · GitHub
Skip to content

Use the latest punycode(1.3.2) - #1865

Open
oldmtn wants to merge 1 commit into
browserify:masterfrom
oldmtn:master
Open

oldmtn wants to merge 1 commit into
browserify:masterfrom
oldmtn:master

Conversation

@oldmtn

@oldmtn oldmtn commented Aug 31, 2018 •

Copy link
Copy Markdown

Use the latest punycode, since punycode(1.3.2) export with:
define('punycode', function() { return punycode; });
which isn't portable when using requireJS.

define('punycode', function() {
    return punycode;
});
which is portable when using requireJS.

@goto-bus-stop goto-bus-stop left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node.js uses punycode 2.0.0 and it'd be best if we're in sync with them.

However punycode 2+ use ES6 features which are only supported in recent browsers, ideally browserify's node core shims work way back in old browsers too…

punycode 2.0.0 is actually identical to 1.3.2 except for the ES6 syntax. The best thing to do here might be to have a new punycode-browserify package that is punycode 2.0.0 compiled to ES5.

@oldmtn

oldmtn commented Aug 31, 2018 •

Copy link
Copy Markdown
Author

@oldmtn

oldmtn commented Aug 31, 2018

Copy link
Copy Markdown
Author

Besides,
The best thing to do here might be to have a new punycode-browserify package that is punycode 2.0.0 compiled to ES5.

Could you help to do it?

@goto-bus-stop

Copy link
Copy Markdown
Member

Yes I think I worked on one a few months ago. I'll see if I can dig it up on the weekend.

@ljharb

ljharb commented Aug 31, 2018

Copy link
Copy Markdown
Member

@oldmtn oldmtn closed this Aug 31, 2018
@oldmtn oldmtn reopened this Aug 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants