Repository navigation
feat(domain): accept and show internationalized domain names - #331
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
Static review identified no blocking issues; workspace checks were not independently rerun.
0 open findings
What changed in this PR
Adds internationalized domain-name support across domain, DNS, and hosting commands.
Changes:
- Normalizes supported Unicode inputs to ASCII for API requests.
- Displays Unicode by default, with
--punycodefor encoded output. - Adds shared conversion helpers, unit tests, and DNS guidance.
| File | Description |
|---|---|
| rust/src/main.rs | Registers the IDN module. |
| rust/src/idn.rs | Adds conversion helpers, display options, and tests. |
| rust/src/hosting/domain/list.rs | Formats listed hostnames. |
| rust/src/hosting/domain/get.rs | Formats hostname details. |
| rust/src/hosting/domain/attach.rs | Normalizes input and formats output. |
| rust/src/domain/suggest.rs | Formats suggested domains. |
| rust/src/domain/quote.rs | Formats quotes and alternative-search actions. |
| rust/src/domain/purchase.rs | Formats purchase results. |
| rust/src/domain/operation.rs | Formats operation domain names. |
| rust/src/domain/nameservers.rs | Formats results and follow-up domain parameters. |
| rust/src/domain/list.rs | Formats domain listings. |
| rust/src/domain/get.rs | Formats domain details. |
| rust/src/domain/common.rs | Returns validated ASCII names and updates tests. |
| rust/src/domain/available.rs | Formats availability results and follow-up parameters. |
| rust/src/dns/set/mod.rs | Formats previews and successful updates. |
| rust/src/dns/records.rs | Adds shared name parsing, result formatting, and tests. |
| rust/src/dns/list.rs | Normalizes filters and formats record names. |
| rust/src/dns/guides/dns.md | Documents international-name behavior. |
| rust/src/dns/delete.rs | Normalizes names and formats deletion output. |
| rust/src/dns/add.rs | Uses shared result formatting. |
| rust/Cargo.toml | Adds the direct idna dependency. |
| rust/Cargo.lock | Records the direct dependency relationship. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Domain names, DNS record names and hosting hostnames can be typed as Unicode (münchen.de) or in encoded form (xn--mnchen-3ya.de); both reach the same domain. - Names are shown as Unicode by default. Add --punycode to show the encoded form instead. Available on domain list, get, available, suggest, quote, purchase, nameserver set and operation status; dns list, add, set and delete; and hosting domain attach, get and list. - Domain names are lowercased before they are sent. - DNS record values (CNAME, MX, TXT and so on) are never converted. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1f946d8 to
e8dc69d
Compare
kperkins-godaddy
left a comment
There was a problem hiding this comment.
Nice work on this. Converting input to ASCII when arguments are parsed, showing Unicode on output and never touching record values is a clean way to split it, and the tests cover the edge cases (@, *, _dmarc, undecodable labels) well.
I left a few inline notes. None of them block merging. Two are small tidy-ups: doc comments that got separated from their functions, and a duplicated parser. The rest are questions about lowercasing and the unicodeDomain/idnDomain fields, where I'd like your read. Take whatever's useful.
- DNS record names, zones and hosting hostnames are lowercased before they are sent, matching the domain commands. - --punycode only changes the fields each command is known to hold domain names in. The API's own idnDomain and unicodeDomain fields are left as returned. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Zone, record name and hostname arguments use one parser, so an invalid international name reports what to change as well as what is wrong.
DEVEX-1285
Summary
Domain names can be typed as Unicode (
münchen.de) or in encoded form (xn--mnchen-3ya.de); both reach the same domain. Names are shown as Unicode by default, and--punycodeshows the encoded form instead.domain get,available,quoteandnameserver set(including--nameserverhosts) send the ASCII form to the API.dns list/add/set/deletenormalize the zone and--nameat argument-parse time, andhosting domain attach --hostnamedoes the same. ASCII names,@,*and_dmarc-style labels pass through unchanged. Names are lowercased.domain list/get/available/suggest/quote/purchase,domain nameserver set,domain operation status,dns list/add/set/deleteandhosting domain attach/get/listshow Unicode by default and ASCII with--punycode. The value stays in the same JSON field, and suggested follow-up commands use the same form.domain suggestquery and--tlds, and domain names inside error messages.rust/src/idn.rs(to_ascii,to_unicode,DomainForm, and a flattenedDomainFormArgscarrying--punycode).validate_domain_namenow returns the ASCII form; its Unicode-passthrough test is replaced accordingly.idnabecomes a direct dependency (already in the lockfile). The DNS guide gains a short section on international names.Follow-up
Persisting the preference (
gddy config set punycode true) is tracked in DEVEX-1295 and is not part of this change.Test plan
validate_domain_name, the DNS name parser and the DNS output conversion.cargo check --workspace,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace,cargo fmt --checkand./rust/scripts/check-module-size.shall pass.🤖 Generated with Claude Code