Nx SDK #18864
Belco90
started this conversation in
Feature Requests
Nx SDK
#18864
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there!
My name is Mario and I am a senior software engineer at Hotjar. Nx is an amazing monorepo tool that provides all we wanted for our monorepos, so we are incrementally adopting it. However, one of the things we miss from Nx is having some sort of SDK, let me elaborate on that.
We have a custom script that groups all the affected projects based on the changed files. For this, we basically run
nx print-affected
wrapped in a Node.jsexec
method, so we obtain the affected project names, and then we do our thing. The problem is that we are assuming a certain stdout structure from the CLI command, which is a really brittle implementation. Every time there is a new warning polluting the stdout of the CLI command, our custom script is broken. As an example, theprint-affected
started showing a warning in the last minors indicating that the command is deprecated andnx show projects --affected
must be used instead. Theprint-affected
command is still working, but that warning breaks our functionality.We were wondering if Nx was planning to introduce some sort of SDK, so we can import and invoke Nx CLI functionality directly from our code and scripts. That way, our implementation would be much more robust without having to rely on a really specific CLI output.
We are not sure how much effort this would require on your end, but it seems a reasonable feature that would be quite straightforward to provide based on the current CLI (same feature, just in a different format).
We would like to know your thoughts about this, thanks!
Beta Was this translation helpful? Give feedback.
All reactions