Skip to content

Commit 308c943

Browse files
fix: update turbo-types with concurrency option (#10379)
### Description This is a follow-up fix to: #10236 Unfortunately I didn't notice `turbo-types` is where the schema actually lives and is generated from, so the configuration schema never got updated to support this option. ### Testing Instructions 1. Install turborepo 2.5.1 2. Add a "concurrency" option to your `turbo.json` 3. Observe that using the public schema URL in `$schema` flags the concurrency option as an unknown property. 4. Clone this branch 5. Change the path in `$schema` to point to the schema in this branch 6. Observe the previous warning goes away.
1 parent ab419ff commit 308c943

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

packages/turbo-types/schemas/schema.json

+5
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@
6969
"description": "Enable use of the UI for `turbo`.\n\nDocumentation: https://turborepo.com/docs/reference/configuration#ui",
7070
"default": "stream"
7171
},
72+
"concurrency": {
73+
"type": "string",
74+
"description": "Set/limit the maximum concurrency for task execution. Must be an integer greater than or equal to `1` or a percentage value like `50%`.\n\n - Use `1` to force serial execution (one task at a time). - Use `100%` to use all available logical processors.\n\nDocumentation: https://turborepo.com/docs/reference/configuration#concurrency",
75+
"default": "10"
76+
},
7277
"dangerouslyDisablePackageManagerCheck": {
7378
"type": "boolean",
7479
"description": "Disable check for `packageManager` in root `package.json`\n\nThis is highly discouraged as it leaves `turbo` dependent on system configuration to infer the correct package manager.\n\nSome turbo features are disabled if this is set to true.",

packages/turbo-types/schemas/schema.v2.json

+5
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@
6969
"description": "Enable use of the UI for `turbo`.\n\nDocumentation: https://turborepo.com/docs/reference/configuration#ui",
7070
"default": "stream"
7171
},
72+
"concurrency": {
73+
"type": "string",
74+
"description": "Set/limit the maximum concurrency for task execution. Must be an integer greater than or equal to `1` or a percentage value like `50%`.\n\n - Use `1` to force serial execution (one task at a time). - Use `100%` to use all available logical processors.\n\nDocumentation: https://turborepo.com/docs/reference/configuration#concurrency",
75+
"default": "10"
76+
},
7277
"dangerouslyDisablePackageManagerCheck": {
7378
"type": "boolean",
7479
"description": "Disable check for `packageManager` in root `package.json`\n\nThis is highly discouraged as it leaves `turbo` dependent on system configuration to infer the correct package manager.\n\nSome turbo features are disabled if this is set to true.",

packages/turbo-types/src/types/config-v2.ts

+12
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,18 @@ export interface RootSchema extends BaseSchema {
123123
*/
124124
ui?: UI;
125125

126+
/**
127+
* Set/limit the maximum concurrency for task execution. Must be an integer greater than or equal to `1` or a percentage value like `50%`.
128+
*
129+
* - Use `1` to force serial execution (one task at a time).
130+
* - Use `100%` to use all available logical processors.
131+
*
132+
* Documentation: https://turborepo.com/docs/reference/configuration#concurrency
133+
*
134+
* @defaultValue `"10"`
135+
*/
136+
concurrency?: string;
137+
126138
/**
127139
* Disable check for `packageManager` in root `package.json`
128140
*

0 commit comments

Comments
 (0)