Skip to content
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

Replace punycode dep with URL hack #4

Merged
merged 3 commits into from
Sep 3, 2019

Conversation

kanongil
Copy link
Contributor

@kanongil kanongil commented Sep 2, 2019

This patch replaces the punycode dependency with a clever hack that uses the WHATWG URL parsing logic to apply punycode decoding to the domain.

I only changed it for the implementation itself, and not the test logic.

I also didn't remove it as a dependency, as it was missing, and only incidentally available in the node_modules from the eslint dependency.

@hueniverse
Copy link
Contributor

How come the test changed for one of the values?

@Marsup
Copy link
Collaborator

Marsup commented Sep 2, 2019

@kanongil Have you tested how that impacts joi's browser build ? Also punycode is (so far) part of node, I'm not surprised not to see it in dependencies.

@hueniverse hueniverse merged commit a920a92 into hapijs:master Sep 3, 2019
@hueniverse hueniverse self-assigned this Sep 3, 2019
@hueniverse hueniverse added the dependency Update module dependency label Sep 3, 2019
@hueniverse hueniverse added this to the 2.0.1 milestone Sep 3, 2019
@kanongil
Copy link
Contributor Author

kanongil commented Sep 3, 2019

The test can be converted to punycode according to https://tools.ietf.org/html/rfc3492, but disallowed for IDNA according to https://tools.ietf.org/html/rfc5891#section-4.2.2. I don't think it matters much.

@hueniverse
Copy link
Contributor

Agreed.

@hueniverse hueniverse mentioned this pull request Sep 5, 2019
hueniverse added a commit that referenced this pull request Sep 5, 2019
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependency Update module dependency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants