push-based / nx-verdaccio

Enterprise E2E setup for Nx and Verdaccio
8 stars 0 forks source link

refactor: make link between setup-env and install-env clear #5

Open getlarge opened 3 weeks ago

getlarge commented 3 weeks ago

One thing could make the whole flow you worked on more transparent: create an explicit link (dependency) between the setup-env and install-env targets.

When I look at the task pipeline, I can see clearly, e2e target will trigger setup-env:

Screenshot 2024-09-14 at 17 19 06

But what will setup-env trigger? Now I know (since I navigated through the codebase) that it will call the install-env executor declared by the Nx plugin createNodes API. This is all very implicit... As soon as you search for install-e2e, TADA, things become clearer because targets have self-describing names:

Screenshot 2024-09-14 at 17 21 04

Could we imagine a refactoring of the runSetupEnvironmentExecutor that depends on install-env running first? Do you think this flow should remain opaque?

BioPhoton commented 3 weeks ago

I really like the feedback!! I was already tempted to refactor it as I see it as a big downside that is is all implicit. I did not go on with the refactor as we had no tests so far.

Now that at least unit tests are in we can more confidently change the codebase.