turbo
8cd0209e - feat(turbo-json): Add optional description field to task definitions (#11447)

Commit
32 days ago
feat(turbo-json): Add optional description field to task definitions (#11447) ## Summary Adds an optional `description` key to tasks in `turbo.json`, allowing users to document what each task does directly alongside its definition. ## Changes - Add `description` field to `RawTaskDefinition` and `ProcessedTaskDefinition` structs - Update `has_config_beyond_extends()` to include description - Add description handling in task merge logic (description from child takes priority) - Update TypeScript types (`Pipeline` interface in `config-v2.ts`) - Update JSON schemas (`schema.v2.json` and regenerated `schema.json`) ## Behavior - The `description` field is **documentation only** - it has no impact on caching, hashing, or task execution - The field is **optional** - existing `turbo.json` files work without modification - When tasks are merged (via extends), the description from the child task takes priority ## Example Usage ```json { "$schema": "https://turborepo.com/schema.v2.json", "tasks": { "build": { "description": "Compiles TypeScript source files and generates production bundles", "dependsOn": ["^build"], "outputs": ["dist/**"] }, "test": { "description": "Runs the unit test suite using Jest", "dependsOn": ["build"], "cache": false }, "lint": { "description": "Checks code style and catches common errors with ESLint" } } } ``` ## Test Plan - [x] All 123 tests in `turborepo-turbo-json` pass - [x] Entire workspace compiles successfully - [x] Manually tested with locally built turbo binary <sub>CLOSES TURBO-5075</sub>
Author
Parents
Loading