apps/docs/content/blog/turbo-2-3.mdx
import { Authors } from "@/components/blog/authors"; import { Date } from "@/components/blog/date"; import { Tabs, Tab } from "fumadocs-ui/components/tabs"; import { Callout } from "@/components/geistdocs/callout";
<Date>Tuesday, November 14th, 2024</Date>
<Authors authors={["chrisolszewski", "nicholasyang", "anthonyshew"]} />
Turborepo 2.3 introduces several ergonomics improvements:
turbo run package#taskUpdate today by running npx @turbo/codemod migrate or get started with npx create-turbo@latest.
Monorepos unlock greater iteration speed and incredible flexibility, but also introduce new challenges:
These are only a few examples of a key question when building in monorepos: How do we communicate and enforce the structural integrity of the Workspace?
<Callout type="info"> At the time of publishing this post, the Boundaries RFC is only an initial draft. The implementation described below is subject to change. Please see the RFC itself for the most up to date information. </Callout>The Boundaries RFC is our initial proposal for this problem. In our current approach, we want you to be able to incrementally adopt Boundaries in one line of code:
{
"boundaries": true
}
Additionally, we want to create a tagging system so you can mark domains, concerns, contexts, and other useful metadata with custom Boundaries.
{
"extends": ["//"],
"boundaries": {
"tags": ["library", "ui", "frontend", "beta"],
"allowDependencyOn": ["library", "frontend"],
"denyDependencyFrom": ["backend", "stable"]
}
}
We also plan for you to be able to allowlist existing diagnostics with a flag:
turbo boundaries --exclude-errors
This way, you can enforce Boundaries for new code and gradually fix existing issues.
We're looking forward to hearing your ideas and feedback on the Boundaries RFC.
You can now run tasks using the fully qualified task identifier:
turbo run web#build
This is more convenient than the equivalent command using --filter (turbo run build --filter=web) and allows for more precision if you have multiple tasks that you'd like to target:
turbo run web#build docs#lint
Learn more in the documentation.
Previously, the --remote-only and --no-cache flags were used to manage the sources and caching for your output artifacts. However, we've seen how they can cause confusion, and there are gaps in control as far as reading and writing to local and Remote Caches.
To refine this, we've introduced a new --cache flag that brings these flags together - and provides more power.
turbo run build --cache=local:rw,remote:r
Using local and remote, you can control the reading and writing behavior of the turbo invocation. Learn more in the documentation.
turbo queryIn 2.2, we introduced turbo query, a feature built for examining your repository using Turborepo's knowledge of your package and task graphs. We've iterated further on this feature to provide you with even more powerful queries:
Since releasing Turborepo 2.2, we've seen great adoption and community growth:
Turborepo is the result of the combined work of all of its contributors, including our core team: Anthony, Chris, Nicholas, and Tom.
Thank you for your continued support, feedback, and collaboration to make Turborepo your build tool of choice.