Repository navigation
Split command-parser by responsibility; merge tiny ui and react-native helper files - #75
Merged
Merged
Conversation
…merge tiny ui and react-native helper files Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ashirman
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Last step of the CLI restructuring (REV-143). Code is moved without behaviour changes.
Each file now has one responsibility. Files aren't split just to make them smaller, and tiny files that had no other reason to exist are folded back.
Parser
command-parser.ts(1,470 lines) becomes two files, one per job:commands.tsstill parses argv when it loads, beforecommand-executoris loaded.create-command.tsimportsisHelpShownfrom it, so the commands are always defined beforecreateCommandparses.release-reactandrelease-expostay with the command definitions.Small files merged
Two earlier steps of this series left files too small to justify on their own:
ui/log.ts(3 lines),ui/prompt.tsandui/progress.ts→ oneui/terminal.ts(83 lines): printing, y/N and access-key prompts, and the upload progress bar.ui/printers.tsstays separate, since it formats tables.platforms/react-native/project.ts(13 lines) →bundler.ts. It only finds the installed react-native package;hermes.tsnow imports it from there.ui/logandui/promptnow stubui/terminal.The other small files (
validation-utils,types/index,source-maps,sign,auth/connection) each have their own job and several callers, so they stay.Verification against
main--helpfor each, invalid input,-v, no argumentscli.jsentry: no arguments,--help,-v, unknown and incomplete commandsrelease-react/release-exporuns through a fake SDK and bundlertsc,npm run lintandnpm run format:checkare clean.The review noted that argv is parsed twice: once when
commands.tsloads and again increateCommand. That's existing behaviour, so I didn't change it here. It's tracked as optional in REV-144.🤖 Generated with Claude Code