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

docs(run): fix passthrough arg behavior #10167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 14, 2025

Conversation

chris-olszewski
Copy link
Member

Description

Updating documentation around pass through args to address #8089.

This has been our behavior since 1.0 and I believe changing it would require a major semver bump.

We pass any pass through args to tasks that match the name of one of the tasks provided to the turbo run command. I believe this makes sense as your test tool probably accepts different arguments than your build tool so if turbo test -- --coverage=true passed --coverage=true to not just jest, but also esbuild which might error when given that argument. If you did want it to be passed to build you can achieve this by running turbo build test -- --global-flag.

Testing Instructions

Added a unit test for this behavior.

Also spot checked that this has been the behavior since 1.2.0 (earliest version I can get working without too much work). Tested by running pnpm turbo run test --filter=@repo/ui -- passthru

1.2.0

• Packages in scope: @repo/ui
• Running test in 1 packages
@repo/ui:build: cache hit, replaying output 9509f6022cfb8b76
@repo/ui:build: 
@repo/ui:build: > @repo/ui@0.0.0 build /private/tmp/pass-thru/packages/ui
@repo/ui:build: > echo building: 
@repo/ui:build: 
@repo/ui:build: building:
@repo/ui:test: cache hit, replaying output 9b006b1111a435ab
@repo/ui:test: 
@repo/ui:test: > @repo/ui@0.0.0 test /private/tmp/pass-thru/packages/ui
@repo/ui:test: > echo testing:  "passthru"
@repo/ui:test: 
@repo/ui:test: testing: passthru

 Tasks:    2 successful, 2 total
Cached:    2 cached, 2 total
  Time:    40ms >>> FULL TURBO

1.6.0

• Packages in scope: @repo/ui
• Running test in 1 packages
• Remote caching disabled
@repo/ui:build: cache hit, replaying output 462fe8a87d3ab7c0
@repo/ui:build: 
@repo/ui:build: > @repo/ui@0.0.0 build /private/tmp/pass-thru/packages/ui
@repo/ui:build: > echo building: 
@repo/ui:build: 
@repo/ui:build: building:
@repo/ui:test: cache hit, replaying output 6fb610019c2f32a2
@repo/ui:test: 
@repo/ui:test: > @repo/ui@0.0.0 test /private/tmp/pass-thru/packages/ui
@repo/ui:test: > echo testing:  "passthru"
@repo/ui:test: 
@repo/ui:test: testing: passthru

 Tasks:    2 successful, 2 total
Cached:    2 cached, 2 total
  Time:    40ms >>> FULL TURBO

2.4.4

• Packages in scope: @repo/ui
• Running test in 1 packages
• Remote caching disabled
@repo/ui:build: cache hit, replaying logs 074103acac2242fe
@repo/ui:build: 
@repo/ui:build: �
@repo/ui:build: > @repo/ui@0.0.0 build /private/tmp/pass-thru/packages/ui
@repo/ui:build: > echo building: 
@repo/ui:build: 
@repo/ui:build: building:
@repo/ui:test: cache hit, replaying logs 0299610cfc01eeff
@repo/ui:test: 
@repo/ui:test: �
@repo/ui:test: > @repo/ui@0.0.0 test /private/tmp/pass-thru/packages/ui
@repo/ui:test: > echo testing:  "passthru"
@repo/ui:test: 
@repo/ui:test: testing: passthru

 Tasks:    2 successful, 2 total
Cached:    2 cached, 2 total
  Time:    42ms >>> FULL TURBO


@chris-olszewski chris-olszewski requested review from anthonyshew and a team as code owners March 14, 2025 17:11
@turbo-orchestrator turbo-orchestrator bot added the area: docs Improvements or additions to documentation label Mar 14, 2025
Copy link

vercel bot commented Mar 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-basic-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 14, 2025 5:11pm
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 14, 2025 5:11pm
examples-gatsby-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 14, 2025 5:11pm
examples-kitchensink-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 14, 2025 5:11pm
examples-native-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 14, 2025 5:11pm
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 14, 2025 5:11pm
examples-svelte-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 14, 2025 5:11pm
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 14, 2025 5:11pm
examples-vite-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 14, 2025 5:11pm
turbo-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 14, 2025 5:11pm

@chris-olszewski chris-olszewski merged commit 8725fee into main Mar 14, 2025
39 checks passed
@chris-olszewski chris-olszewski deleted the olszewski/docs_pass_through_args branch March 14, 2025 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants