Skip to content

feat(task): add --members flag to run tasks in workspace members only - #35748

Merged
bartlomieju merged 1 commit into
mainfrom
feat/task-members
Aug 4, 2026
Merged

bartlomieju merged 1 commit into
mainfrom
feat/task-members

Conversation

@bartlomieju

Copy link
Copy Markdown
Member

There is currently no way to run a task in all workspace members without
also running it in the workspace root. --recursive always includes the
root, so a root task that fans out with deno task -r build would recurse
into itself. --filter '*' happens to skip the root, but only as long as
the root config has no name field; a named root matches the filter and
gets included again. Other runners support this directly: npm via
npm run --workspaces (root excluded unless --include-workspace-root)
and pnpm via pnpm -r (root excluded by default).

This adds a --members flag to deno task that runs the task in every
workspace member and never in the root, regardless of whether the root
config has a name. It conflicts with --recursive and --filter. The
flag is also added to the deno_cli_parser definitions to keep the two
parsers in sync.

Closes #29375

bartlomieju added a commit that referenced this pull request Aug 4, 2026
…d tests

- Relocate parse_memory_size_mb / parse_positive_seconds into
  deno_cli_parser::convert as the single source of truth, used by both the
  clap value parsers and the zero-cost parser.
- Define --max-memory/--max-cpu-time/--max-time on run & compile in the
  cli_parser defs (RESOURCE_LIMIT_ARGS) and parse them in convert, keeping
  the two parsers in sync (matching #35748/#35751).
- Add flag-parsing unit tests (suffixes, invalid rejection, subcommand
  gating) in flags.rs and clap-parity tests in tests_full.rs.
@bartlomieju
bartlomieju merged commit 49377a4 into main Aug 4, 2026
136 checks passed
@bartlomieju
bartlomieju deleted the feat/task-members branch August 4, 2026 11:18
bartlomieju added a commit that referenced this pull request Aug 4, 2026
`--members` (#35748) landed on main after this branch forked and updated
flags.rs/defs.rs/convert.rs but not tests_full.rs, leaving
`cargo test -p deno_cli_parser` failing to compile on main.
bartlomieju added a commit that referenced this pull request Aug 4, 2026
Five spec tests failed on every platform:

- `fmt --ext=xml`/`=svg` (#36149): the value list wasn't updated.
- `task --members` with `-r` (#35748): the conflict with --recursive and
  --filter wasn't declared, so it silently proceeded.
- `add`/`remove`/`info --min-dep-age` (#36099): the flag parsed but the
  conversion never read it, so it had no effect.
- `vendor --help`: continuation lines were indented to a hardcoded
  column 28 rather than to the description column, so help strings that
  carry their own leading indent (as clap's do) came out 2 columns deep.

Also restores clap's conflict message format ('--output <output>' rather
than 'output'); the branch had weakened main's transpile fixture to
match the shorter form, so that fixture is restored too.
nathanwhitbot pushed a commit to nathanwhitbot/deno that referenced this pull request Aug 4, 2026
…lizers

`--members` (denoland#35748) added `TaskFlags::members` to the canonical flag types
in libs/cli_parser/src/flags.rs and updated the clap tests in
cli/args/flags.rs, but not the parity tests in
libs/cli_parser/src/tests_full.rs. That leaves `deno_cli_parser`'s test
target failing to compile with 20x E0063 "missing field `members`", which
breaks `cargo clippy --all-targets` (the lint CI job) on main and on every
open PR.

Test-only fix: add `members: false` to the 20 `TaskFlags` initializers,
matching the corresponding expectations in cli/args/flags.rs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to run tasks in workspace members, but not workspace root

1 participant