Repository navigation
Use async/await instead of promise chains - #66
Merged
Merged
Conversation
No behaviour change: the same output, exit codes and server requests. - Command handlers, execute() and the release flows await instead of chaining .then(); release error handling uses try/catch - SDK request methods are async and still resolve null where they did - sign() uses jwt.sign synchronously and throws instead of returning rejected promises - new Promise(...) stays only around callback and event APIs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Type the release size result as nullable again - Drop a no-op buildNumber assignment and a redundant source map check - Remove a try/catch that only rethrew and comments that restate the code 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.
Brings REV-136 to
main. It was reviewed as #65, but that PR was merged intofeature/rev-134after #64 had already landed, so its two commits never reachedmain. The commits are unchanged.This only modernises the syntax. Behaviour, output, exit codes, the SDK API and server requests are unchanged. Most of the diff is re-indentation, so Hide whitespace makes it much smaller.
Changes
command-executor: every command handler,execute()and the four release flows useasync/awaitinstead of.thenchains.if (await confirm()) { … }replaces the nested confirm chains.try/catcharoundreleaseErrorHandlerreplaces.catch(...).Promise.allis kept where requests ran in parallel (deployment metrics, deployment history)..catch(async (err) => { throw err; })blocks are removed.management-sdk: the request methods areasyncand still resolvenullwhere they did before, which the tests assert.sign:jwt.signis used in its synchronous form, andPromise.reject/Promise.resolveinside theasyncfunction becomethrow/return.hash-utils,gradle-utils,binary-utils: the last small chains are converted.new Promise: only wrappers around callback and event APIs (superagent,prompt,child_process, yazl/yauzl, streams), plusgetSdk's generic error wrapper.buildNumberassignment that did nothing and a redundant source-map check are gone.Validation errors that used to be thrown synchronously now reject. Every caller already awaits these calls, and
execute()already ran commands inside a promise, so the CLI prints the same[Error] …with the same exit code.Verification
tscandnpm run lintare clean.mainand from this branch, run against a local fake server with 45 commands.--noDuplicateReleaseError.main, and a bad key path gives the same error.Found during review, not changed here
sign()removes an existing.codepushreleasewithrmdir, which only works on folders. Fixed separately in REV-137.releaseReactandreleaseExpoare near-duplicates and could share one implementation.🤖 Generated with Claude Code