Repository navigation
Replace Q with native promises - #64
Merged
Merged
Conversation
- Q deferreds and Q.Promise(...) calls become new Promise(...) - Q(x), Q.all and .spread become Promise.resolve, Promise.all and array destructuring - Drop .done() in cli.ts; Node exits on unhandled rejections the same way - Remove the unused ReleaseHook type - Report errors that Q used to drop: an unreadable release folder no longer exits 0 silently, and yazl input errors no longer crash the process - Reject with an Error when signing an empty folder Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
releaseReact and releaseExpo started version detection, awaited the source map folder, then returned the detection promise. A detection failure in between was an unhandled rejection and crashed Node instead of printing the CLI error. 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.
Step 3 of 4 of the dependency cleanup (REV-134). Removes
qand@types/q. Q is internal only: the package exposes the CLI, not the SDK.Changes
Q.Promise(...):new Promise(...)inhash-utils,binary-utils,commands/debug,management-sdkandcommand-executor.Q(x)andQ.all:Promise.resolveandPromise.all..spreadindeployment history: array destructuring..done()incli.ts: removed. Node exits on an unhandled rejection the same way Q's.done()crashed.globalThis.Promiseannotations become plainPromise, and the redundant Q wrapper aroundpackageFileFromPathis gone.release(),packageFileFromPathandgeneratePackageManifestFromDirectoryare nowasync, with no change to what they send or return.release-reactandrelease-exponow wait for the app version before preparing the source map folder. Q handled a detection failure during that step, but with native promises it could crash Node with a stack trace instead of printing[Error] ….ReleaseHooktype is removed.Error output
Q silently drops rejected promises nobody handles, while native promises crash Node. I ran the
no-floating-promiseslint rule to find spots where switching would change behaviour. Errors on these paths now reach the CLI's normal[Error] …output:[Error] EACCES: permission denied, scandir …, exit 1[Error] not a file: …, exit 1[Error] undefined[Error] Can't sign the release because no files were found.Everything else behaves as before.
Verification
tscandnpm run lintare clean.mainand from this branch, run against a local fake server.whoami,app ls,deployment ls,deployment history(including a 404), andreleaseof a folder, an unreadable folder and a missing path.packageInfo.release-reactwith an invalid AndroidversionNameprints the same[Error] …asmain.sign()gives the same content hash asmainfor a folder with nested files, a non-ASCII file name and an ignored.DS_Store. Signing a single file also works.#65, stacked on this PR, moves the remaining
.thenchains toasync/awaitwithout behaviour changes.🤖 Generated with Claude Code