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

--filter=[origin/main] not working as expected #1032

@weyert

Description

@weyert

What version of Turborepo are you using?

1.2.1

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Mac
Gitlab CI (shared gitlab.com runner) using Alpine docker image

Describe the Bug

I am trying to execute the lint and test commands against all changed packages since origin/main but it doesn't appear to work. If I try to use the same filter in pnpm it works as expected and executes them but when I try to use the same filter with turbo it doesn't detect any changes.

❯ pnpm run lint --filter=...\[origin/main\]  
Scope: 33 of 35 workspace projects

vs

❯ turbo run test --filter=\[origin/main\] --dry-run
Packages in Scope
Name Path 

Tasks to Run

The command lint is defined in turbo.json as:

"lint": {
      "dependsOn": ["^build"],
      "outputs": ["coverage/code-climate.json"],
      "cache": false
},

Expected Behavior

I would expect the turbo to match the behaviour of pnpm and execute the command against all the changed packages compared to passed origin/main-branch

To Reproduce

  1. Create a new branch of your repo
  2. Run pnpm run lint --filter=[origin/main]
  3. Next, run turbo run lint --filter=[origin/main]
  4. Notice that in last command for turbo no packages were executed

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions