-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat(core): add --stdin
to affected options
#28770
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
View your CI Pipeline Execution ↗ for commit 5963420.
☁️ Nx Cloud last updated this comment at |
cc'ing other contributors to these shared options @AgentEnder @FrozenPandaz |
Thank you for your PR. I think passing files in via Can we pause to consider if CSV is the best format or if for example, splitting by newlines is better. The canonical example of why one would use It seems like you're using a custom command to list the files. Are there any underlying tools under the hood or was it originally written to be inserted in as |
I'm impartial and happy to defer to your judgment here. While I omitted the details of our custom command for brevity, we currently transform the results of |
Current Behavior
Executing
nx affected
with a large list of files using the--files
option frequently results inE2BIG
errors during CI runs. This is compounded by our project's deeply nested structure, which returns lengthy file paths even in smaller pull requests.Expected Behavior
This PR adds a
--stdin
flag to all affected commands, enabling the list of changed files to be provided via standard input. This approach helps mitigateE2BIG
errors by avoiding long command-line arguments. Usage example:The use of a
--stdin
flag for inputing files was inspired byjscodeshift
andpolaris-migrator
. This implementation extends the existing--files
option to minimize changes and maintain backward compatibility. Open to alternative suggestions and improvements.