fix(cli): scaffold projects without partial mutations - #1176
Open
dvd233 wants to merge 1 commit into
Open
Conversation
dvd233
requested review from
YuanHeDx,
dragooncjw,
louisyoungx,
luics,
sanmaopep and
xiamidaxia
as code owners
August 31, 2026 21:55
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.
Summary
@flowgram.ai/create-appand@flowgram.ai/climkdir, then clean the tarball, staging tree, and any destination owned by the failed attemptBehavior choice
An existing destination already made the old flow fail during
renameSync. This keeps that no-overwrite outcome, but moves it before npm/network work and prevents the failed command from rewriting the existing project'spackage.jsonor leaving extraction artifacts behind.The final destination claim uses
mkdirrather than a check-then-rename sequence, so a concurrently created empty directory is not replaced on POSIX filesystems.The npm query syntax is intentionally unchanged; the separate command cleanup in #1136 remains independent of this fix.
Validation
rush buildrush lint --verboserush ts-checkrush test:cov@flowgram.ai/create-appregression tests1.0.14@flowgram.ai/create-app/scaffoldsubpath importsnpm pack --dry-run --jsonconfirms the scaffold ESM/CJS/type outputs are published and tests are excludedFixes #1172
AI assistance
I used an AI coding assistant during implementation and testing. I reviewed the complete diff and validation results and take responsibility for the change.