Commit 3fc40cc
fix(resolve): unbreak the build — narrow parseRegistryName's destructured parts
CI has been red on main since #48: noUncheckedIndexedAccess types the
destructured `label`/`tld` as `string | undefined`, because TS can't narrow an
array to a 2-tuple from a `parts.length !== 2` check. Four TS2345/TS2322
errors failed `apps/desktop` and took the whole `pnpm -r build` with it.
Guard explicitly. Behavior is unchanged: length 2 already guarantees both
values, and an empty label would fail LABEL.test() on the next line anyway.
Unrelated to this branch's auth work, but it blocks the PR from going green.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 5eabb6d commit 3fc40cc
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
115 | 120 | | |
116 | 121 | | |
117 | 122 | | |
| |||
0 commit comments