Repository navigation
Conversation
|
No actionable comments were generated in the recent review. WalkthroughURL 校验规则现在支持方括号 IPv6 主机、编码区域标识符和国际化域名。端口范围调整为 1 至 65535。新增测试覆盖有效与无效 URL。 ChangesURL 校验
Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #35 +/- ##
==========================================
- Coverage 82.38% 82.29% -0.10%
==========================================
Files 25 25
Lines 653 655 +2
Branches 236 234 -2
==========================================
+ Hits 538 539 +1
- Misses 114 115 +1
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Thanks for fixing the cases in #33. I found two inputs that now pass
|
Fixes #33
The URL rule rejected bracketed IPv6 hosts, single-digit ports and ASCII-encoded internationalized top-level domains. It also accepted bare IPv6 hosts and five-digit ports above 65535.
Require brackets around IPv6 URL hosts, accept Punycode top-level labels, and bound one- to five-digit ports to 65535. The original IPv6 address pattern still accepts its existing zone syntax. For URL hosts, a zone uses the bracketed
%25delimiter and the zone characters defined in RFC 6874 section 2. The tests cover encoded and percent-encoded identifiers, raw delimiters, missing identifiers, and malformed escapes. RFC 6874 section 2Verification
ut test -- --runInBandpasses 130 tests and 8 snapshots across 16 suites.ut lint,utx tsc --noEmit,ut compile, and Prettier on both changed files pass.Codex provided AI assistance with implementation and verification.
Summary by CodeRabbit