这是indexloc提供的服务,不要输入任何密码
Skip to content

(feature req) --filter=pkg^ to run dependsOn scripts in all dependencies except the current package #965

@elado

Description

@elado

Describe the feature you'd like to request

Use case: I want to have a clean way to prepare the environment to run a certain script.

Project structure:

config
  scripts:
    build
    lint

app
  dependencies:
    config
  scripts:
    lint
// turbo.json
{
  "pipeline": {
    ..
    "lint": {
      "dependsOn": ["^build"],
      "outputs": []
    },

Describe the solution you'd like

I would like to run yarn lint <file> inside app but this also requires config to be built. Running this lint with arguments should run through turbo and cache.

To do that, I'd expect to be able to run a command that will satisfy the environment before I'm able to run the command, run all the dependsOn of that script for the filter, without running it on the current package:

yarn turbo run lint --filter=app^ # should only build config
yarn workspace app lint <file>

Describe alternatives you've considered

The --filter=app^... is not what I'm looking for.

yarn turbo run lint --filter=app^...

will run lint also in config (and other dependencies of app) as well as running the dependsOn (config#build) but I only want config#build to run.

While it runs "too much" it's still getting the env ready, but it's not idea.

Metadata

Metadata

Assignees

Labels

area: ergonomicsIssues and features impacting the developer experience of using turbo

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions