-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Introduce --fail-fast flag for npm run in workspaces #8323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bralax
wants to merge
2
commits into
npm:latest
Choose a base branch
from
bralax:latest
base: latest
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+72
−1
Conversation
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
|
Any news on when this PR can be merged? |
anthonyting
added a commit
to aws/aws-durable-execution-sdk-js
that referenced
this pull request
Oct 6, 2025
*Issue #, if available:* *Description of changes:* Builds continue when previous builds fail. NPM has an active discussion and PR to fix it npm/cli#8323, but it's not merged yet. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
ParidelPooya
pushed a commit
to aws/aws-durable-execution-sdk-js
that referenced
this pull request
Oct 10, 2025
*Issue #, if available:* *Description of changes:* Builds continue when previous builds fail. NPM has an active discussion and PR to fix it npm/cli#8323, but it's not merged yet. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
ParidelPooya
pushed a commit
to aws/aws-durable-execution-sdk-js
that referenced
this pull request
Oct 12, 2025
*Issue #, if available:* *Description of changes:* Builds continue when previous builds fail. NPM has an active discussion and PR to fix it npm/cli#8323, but it's not merged yet. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
ParidelPooya
pushed a commit
to aws/aws-durable-execution-sdk-js
that referenced
this pull request
Oct 24, 2025
*Issue #, if available:* *Description of changes:* Builds continue when previous builds fail. NPM has an active discussion and PR to fix it npm/cli#8323, but it's not merged yet. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
ParidelPooya
pushed a commit
to aws/aws-durable-execution-sdk-js
that referenced
this pull request
Oct 26, 2025
*Issue #, if available:* *Description of changes:* Builds continue when previous builds fail. NPM has an active discussion and PR to fix it npm/cli#8323, but it's not merged yet. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
ParidelPooya
pushed a commit
to aws/aws-durable-execution-sdk-js
that referenced
this pull request
Nov 2, 2025
*Issue #, if available:* *Description of changes:* Builds continue when previous builds fail. NPM has an active discussion and PR to fix it npm/cli#8323, but it's not merged yet. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
ParidelPooya
pushed a commit
to aws/aws-durable-execution-sdk-js
that referenced
this pull request
Nov 6, 2025
*Issue #, if available:* *Description of changes:* Builds continue when previous builds fail. NPM has an active discussion and PR to fix it npm/cli#8323, but it's not merged yet. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
ParidelPooya
pushed a commit
to aws/aws-durable-execution-sdk-js
that referenced
this pull request
Nov 6, 2025
*Issue #, if available:* *Description of changes:* Builds continue when previous builds fail. NPM has an active discussion and PR to fix it npm/cli#8323, but it's not merged yet. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
ParidelPooya
pushed a commit
to aws/aws-durable-execution-sdk-js
that referenced
this pull request
Nov 6, 2025
*Issue #, if available:* *Description of changes:* Builds continue when previous builds fail. NPM has an active discussion and PR to fix it npm/cli#8323, but it's not merged yet. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
ParidelPooya
pushed a commit
to aws/aws-durable-execution-sdk-js
that referenced
this pull request
Nov 7, 2025
*Issue #, if available:* *Description of changes:* Builds continue when previous builds fail. NPM has an active discussion and PR to fix it npm/cli#8323, but it's not merged yet. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
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.
Right now, when using
npm run --workspaces {cmd}ornpm run -w {package1} -w {package2} {cmd}, npm will always run the command in every single package even if some packages fail.This means that if packages depend on each other and the first package fails, the second package will still try to be built and also crash. This both wastes resources as we are running commands that we know will fail and also has the potential to corrupt or generate corrupt output as the conditions to execute the command are not met.
To handle this, this pull request introduces a new command line flag for use with
npm runwhen working with workspaces named--fail-fastthat when provided, rather than running the specified command in every package no matter success, once the first package fails, the command will stop running.This flag was originally proposed in this RFC. The conversation in the RFC got blocked due to discussion about how this would benefit from also implementing topological sort for workspace packages which requires a lot more thought and careful handling. This flag is useful even without topological sort and can be implemented in a backwards compatible way with immediate impact to users so I decided to submit it as a community contribution.
References
Related to: npm/rfcs#575