Closed jessicatarra closed 6 months ago
As it stands, when using the multiple script definition, we are not allowed to use execution options like concurrency or packageFilter option, because that would increase the level of complexity and could cause several problems, so my suggestion for now is to be able to configure these things in the individual scripts.
Completely agree!
Hey @spydon, thanks for your feedback! and regarding the test scenario you just mentioned in the first comment, I think it's worth including a validation to avoid an infinite loop, because that's actually what ends up happening, so I'm working on it.
Isn't this already possible like:
pre_commit:
description: pre-commit git hook script
run: |
melos run format
melos run analyze
melos run test
exec:
concurrency: 3
failFast: true
Isn't this already possible like:
pre_commit: description: pre-commit git hook script run: | melos run format melos run analyze melos run test exec: concurrency: 3 failFast: true
Sure you can do that, but this is a much cleaner API!
Especially since multi-line scripts can have some quirks, which even your example suffers from (missing &&
). :smile:
Cool feature, can we also have this for hooks? I guess this would be a breaking change so I'd understand if you wouldn't want to add it, but I think it would be very useful.
Cool feature, can we also have this for hooks? I guess this would be a breaking change so I'd understand if you wouldn't want to add it, but I think it would be very useful.
You can open an enhancement issue regarding that if you want, so that we don't have the discussion about it on this PR.
For now, you could just create a melos script with steps
and call it from the hook instead.
Description
This PR adds the capability to combine multiple scripts into a single script definition. In the provided example, the
pre-commit
script is configured to invoke a simple command asecho 'hello world'
, and also individual scripts such asformat
andanalyze
.YAML file
Output
As it stands, when using the multiple script definition, we are not allowed to use execution options like concurrency or
packageFilter
option, because that would increase the level of complexity and could cause several problems, so my suggestion for now is to be able to configure these things in the individual scripts.Closes #653
Type of Change
feat
-- New feature (non-breaking change which adds functionality)fix
-- Bug fix (non-breaking change which fixes an issue)!
-- Breaking change (fix or feature that would cause existing functionality to change)refactor
-- Code refactorci
-- Build configuration changedocs
-- Documentationchore
-- Chore