Skip to content

request: 'melos run' should support filters when the script it calls is an 'exec script' #570

Description

@wujek-srujek

Is there an existing feature request for this?

  • I have searched the existing issues.

Command

No response

Description

Currently, melos run doesn't support filters, so it is unnecessarily hard to call 'exec scripts' defined in malos.yaml with filters (impossible using the standard command line.) As melos run sometimes actually calls 'exec' (depending on how the script is defined), it should support package filters in such case.

The current workaround is to use melos exec ... in the script definition itself, e.g. run: melos exec --scope *abc* -- echo hello, but this is clumsy and requires a dedicated script for each filter. Also, this makes it impossible to set 'exec' configuration in melos.yaml as it fails valdiation with:

melos.yaml: Do not use "melos exec" in "run" when also providing options in "exec". In this case the script in "run" is already being executed by "melos exec".

The only option is to pass the options to the script itself, making it even more clumsy.

Reasoning

As melos run sometimes executes 'exec' scripts (depending on how they are configured in melos.yaml, it should support package filter flags. Otherwise clumsy workaround are necessary.

Additional context and comments

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions