Skip to content

Conversation

@bjohansebas
Copy link
Member

Summary

An important change, IPv6 hostnames now return with square brackets ([]) (for new URL()), so they need to be formatted for ipaddr to correctly validate whether it’s an IPv6 URL. Additionally, the hostname also needs to be formatted in the IPv6 case, because right now, when an IPv6 hostname is passed in host, users are not including the square brackets. We could change this behavior, what do you think?

Also, it seems this will make retrieving the hostname faster.

imagen **What kind of change does this PR introduce?**

Did you add tests for your changes?

Does this PR introduce a breaking change?

If relevant, what needs to be documented once your changes are merged or what have you already documented?

@bjohansebas bjohansebas marked this pull request as draft January 26, 2026 16:33
Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

I am fine with this change, feel free to merge when CI will be green, also we have url.parse in our webpack-dev-middleware, make sense to improve this there too for the next major release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants