Skip to content

Remove duplicated release, upload and zip code; fix iOS release without --podFile - #73

Merged
ashirman merged 3 commits into
mainfrom
feature/rev-141
Oct 15, 2026
Merged

ashirman merged 3 commits into
mainfrom
feature/rev-141

Conversation

@revopushbot

Copy link
Copy Markdown
Contributor

Step 4 of the CLI restructuring (REV-141), plus the urgent fix REV-145.

Fix: iOS release-react / release-expo crashed without --podFile (REV-145)

Every iOS release-react/release-expo run without --podFile failed on main:

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null
    at getIosHermesEnabled
  • Cause: commit 5bde00d replaced podFile || "ios/Podfile" with a default parameter value. Defaults only apply to undefined, and the parser passes null when the option isn't given.
  • Release status: it's on main only. The published 0.0.15 predates it.
  • Fix: getIosHermesEnabled handles null again, and a new test passes podFile: null.
  • Why the tests missed it: the release-react tests built commands without the parser's null defaults. The test helper now uses exactly what the parser produces, so five existing iOS tests fail without the fix.
  • Audit: I checked every other default parameter and every undefined-only check. None can receive a parser null. The two options whose undefined matters (patch --buildNumber, and --xcodeTargetName/--buildConfigurationName) are declared with default: undefined on purpose.

Duplication removed (no behaviour change)

  • release-react and release-expo: one releaseReactBundle(command, bundler) flow; releaseReact/releaseExpo are one-line wrappers. Only the bundler call and entry-file resolution differ, as before.
  • Release metadata: one getReactNativePackageInfo, used by react/expo and native releases.
  • SDK upload: release and releaseNative share a private uploadPackage. releaseNative still always deletes its zip afterwards, and the two identical error branches are merged.
  • Zip creation: one createZip in utils/file-utils.ts, used by management-sdk and binary-utils. binary-utils still skips missing files.
  • Parser: the 189 identical option lines become addReactReleaseOptions, and both commands share one createCommand case. Each command keeps its own usage text, examples and isValidCommand handling.

Verification against main

Check Result
Parser: 66 argument lists for release-react/release-expo (every option, invalid combinations, --help) Identical parsed commands and help text
Release flows: 24 end-to-end runs (iOS and Android, all options, custom folders, signing, initial release, five error cases) through a fake SDK and bundler All 476 transcript lines identical: bundler arguments, logs, upload metadata, files, errors, clean-up
45 CLI commands against a fake server, including release with zip upload Identical output, exit codes and server requests
Native release: Android metadata zip and the /nativerelease upload Same zip entries and hashes, same request, zip deleted afterwards
iOS through the real parser without --podFile main crashes; this branch releases version 1.4.2 read from the Xcode project
  • Build, lint and format check: tsc, npm run lint (0 problems) and npm run format:check are clean.
  • Tests: all 159 pass on macOS and on Linux (Docker, Node 20.19.0).

Older issues found during review are tracked in REV-144:

  • release-expo ignores --entryFile.
  • Upload error handling can leave a promise that never settles.
  • A failed zip leaves a stray .zip in the current folder.

🤖 Generated with Claude Code

revopushbot and others added 3 commits October 15, 2026 17:41
…ut --podFile

Duplication (no behaviour change):
- release-react and release-expo share releaseReactBundle(); the parser
  shares their options and createCommand case
- One release metadata builder for react/expo and native releases
- management-sdk release and releaseNative share uploadPackage()
- One createZip() in utils/file-utils for the SDK and binary-utils

Fix: getIosHermesEnabled crashed when the parser passed podFile: null,
which every iOS release-react/release-expo without --podFile does. The
release-react test helper now uses the parser's null defaults, so the
existing iOS tests cover it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d of if/else

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ashirman
ashirman merged commit cb4f496 into main Oct 15, 2026
2 checks passed
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.

2 participants