turbo 2.11.8 → 2.11.9-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/bin/turbo +59 -1
  2. package/package.json +7 -7
  3. package/schema.json +332 -0
package/bin/turbo CHANGED
@@ -386,7 +386,9 @@ function shouldOwnWindowsCtrlC() {
386
386
  return false;
387
387
  }
388
388
 
389
- if (usesTui(process.argv.slice(2))) {
389
+ const args = process.argv.slice(2);
390
+ // Exec's command reads the console directly, like the TUI does.
391
+ if (usesTui(args) || selectsExec(args)) {
390
392
  return false;
391
393
  }
392
394
 
@@ -410,6 +412,62 @@ function usesTui(args) {
410
412
  return false;
411
413
  }
412
414
 
415
+ // Global flags that take the next word as their value. Keep in step with the
416
+ // global options in crates/turborepo-cli/src/cli/args.rs.
417
+ const GLOBAL_VALUE_FLAGS = new Set([
418
+ "--api",
419
+ "--cwd",
420
+ "--heap",
421
+ "--login",
422
+ "--remote-cache-timeout",
423
+ "--root-turbo-json",
424
+ "--team",
425
+ "--token",
426
+ "--trace",
427
+ "--ui",
428
+ "--verbosity",
429
+ "--experimental-otel-endpoint",
430
+ "--experimental-otel-header",
431
+ "--experimental-otel-interval-ms",
432
+ "--experimental-otel-protocol",
433
+ "--experimental-otel-resource",
434
+ "--experimental-otel-timeout-ms",
435
+ ]);
436
+
437
+ // Global flags whose value is optional. Like turbo, take the next word as
438
+ // the value unless it is a flag.
439
+ const GLOBAL_OPTIONAL_VALUE_FLAGS = new Set([
440
+ "--experimental-otel-enabled",
441
+ "--experimental-otel-metrics-run-summary",
442
+ "--experimental-otel-metrics-task-details",
443
+ "--experimental-otel-use-remote-cache-token",
444
+ ]);
445
+
446
+ // The command is the first word that is not a flag or a flag's value, so a
447
+ // task or argument named `exec` does not select it.
448
+ function selectsExec(args) {
449
+ for (let i = 0; i < args.length; i++) {
450
+ const arg = args[i];
451
+ if (arg === "--") {
452
+ return false;
453
+ }
454
+ if (arg.startsWith("-")) {
455
+ const next = args[i + 1];
456
+ if (
457
+ GLOBAL_VALUE_FLAGS.has(arg) ||
458
+ (GLOBAL_OPTIONAL_VALUE_FLAGS.has(arg) &&
459
+ next !== undefined &&
460
+ !next.startsWith("-"))
461
+ ) {
462
+ i++;
463
+ }
464
+ continue;
465
+ }
466
+ return arg === "exec";
467
+ }
468
+ return false;
469
+ }
470
+
413
471
  function runTurbo() {
414
472
  if (shouldOwnWindowsCtrlC()) {
415
473
  return runTurboChild(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turbo",
3
- "version": "2.11.8",
3
+ "version": "2.11.9-canary.1",
4
4
  "description": "Turborepo is the build system for coding agents.",
5
5
  "homepage": "https://turborepo.dev",
6
6
  "bugs": "https://github.com/vercel/turborepo/issues",
@@ -19,12 +19,12 @@
19
19
  ],
20
20
  "main": "./bin/turbo",
21
21
  "optionalDependencies": {
22
- "@turbo/darwin-64": "2.11.8",
23
- "@turbo/darwin-arm64": "2.11.8",
24
- "@turbo/linux-64": "2.11.8",
25
- "@turbo/linux-arm64": "2.11.8",
26
- "@turbo/windows-64": "2.11.8",
27
- "@turbo/windows-arm64": "2.11.8"
22
+ "@turbo/darwin-64": "2.11.9-canary.1",
23
+ "@turbo/darwin-arm64": "2.11.9-canary.1",
24
+ "@turbo/linux-64": "2.11.9-canary.1",
25
+ "@turbo/linux-arm64": "2.11.9-canary.1",
26
+ "@turbo/windows-64": "2.11.9-canary.1",
27
+ "@turbo/windows-arm64": "2.11.9-canary.1"
28
28
  },
29
29
  "scripts": {
30
30
  "postversion": "node bump-version.js"
package/schema.json CHANGED
@@ -190,6 +190,17 @@
190
190
  }
191
191
  ]
192
192
  },
193
+ "setup": {
194
+ "description": "Repository policy for `turbo setup`. Only allowed in the root turbo.json and requires `futureFlags.experimentalSetup`.",
195
+ "anyOf": [
196
+ {
197
+ "$ref": "#/definitions/SetupPolicy"
198
+ },
199
+ {
200
+ "type": "null"
201
+ }
202
+ ]
203
+ },
193
204
  "tags": {
194
205
  "description": "Arbitrary string labels for this package. In the root configuration, these labels apply to the root package.",
195
206
  "anyOf": [
@@ -223,12 +234,89 @@
223
234
  "allowComments": true,
224
235
  "allowTrailingCommas": true,
225
236
  "definitions": {
237
+ "AdditionalTool": {
238
+ "description": "A tool that `turbo setup` downloads, verifies, and installs from explicit artifacts. The full installation tree is kept; no tool-provided scripts run.",
239
+ "type": "object",
240
+ "required": ["artifacts", "version"],
241
+ "properties": {
242
+ "artifacts": {
243
+ "description": "Artifacts keyed by platform, such as `linux-x64-gnu` or `macos-arm64`. Platforms without an artifact are unsupported for this tool.",
244
+ "allOf": [
245
+ {
246
+ "$ref": "#/definitions/Map_of_AdditionalToolArtifact"
247
+ }
248
+ ]
249
+ },
250
+ "version": {
251
+ "description": "The exact version of the tool. Ranges and channels are not allowed.",
252
+ "allOf": [
253
+ {
254
+ "$ref": "#/definitions/String"
255
+ }
256
+ ]
257
+ }
258
+ }
259
+ },
260
+ "AdditionalToolArtifact": {
261
+ "description": "One platform's artifact for an additional tool.",
262
+ "type": "object",
263
+ "required": ["executables", "format", "sha256", "url"],
264
+ "properties": {
265
+ "executables": {
266
+ "description": "Executable names mapped to paths relative to `rootPrefix`, or to the archive's top level without one. A binary has exactly one entry, which names where the file is installed.",
267
+ "type": "object",
268
+ "additionalProperties": {
269
+ "$ref": "#/definitions/String"
270
+ }
271
+ },
272
+ "format": {
273
+ "description": "`binary` for a single executable file, or the archive format.",
274
+ "allOf": [
275
+ {
276
+ "$ref": "#/definitions/ArtifactFormat"
277
+ }
278
+ ]
279
+ },
280
+ "rootPrefix": {
281
+ "description": "The single top-level directory that contains every archive entry. Omit it for an archive whose entries sit at its top level. Not allowed for binaries.",
282
+ "anyOf": [
283
+ {
284
+ "$ref": "#/definitions/String"
285
+ },
286
+ {
287
+ "type": "null"
288
+ }
289
+ ]
290
+ },
291
+ "sha256": {
292
+ "description": "Lowercase hex SHA-256 digest of the downloaded bytes. A digest pins the expected bytes; it does not establish that the publisher is trustworthy.",
293
+ "allOf": [
294
+ {
295
+ "$ref": "#/definitions/String"
296
+ }
297
+ ]
298
+ },
299
+ "url": {
300
+ "description": "HTTPS download URL without credentials, a query, or a fragment.",
301
+ "allOf": [
302
+ {
303
+ "$ref": "#/definitions/String"
304
+ }
305
+ ]
306
+ }
307
+ }
308
+ },
226
309
  "Array_of_String": {
227
310
  "type": "array",
228
311
  "items": {
229
312
  "$ref": "#/definitions/String"
230
313
  }
231
314
  },
315
+ "ArtifactFormat": {
316
+ "description": "How an artifact is packaged. `binary` is a single executable file.",
317
+ "type": "string",
318
+ "enum": ["binary", "tar", "tar-gz", "zip"]
319
+ },
232
320
  "Boolean": {
233
321
  "type": "boolean"
234
322
  },
@@ -282,6 +370,11 @@
282
370
  }
283
371
  }
284
372
  },
373
+ "DependencyPolicy": {
374
+ "description": "How `turbo setup` prepares a toolchain's dependencies. `locked` installs them from the committed ecosystem lockfile without changing it. `skip` does not install them.",
375
+ "type": "string",
376
+ "enum": ["locked", "skip"]
377
+ },
285
378
  "EnvMode": {
286
379
  "description": "Turborepo's Environment Modes allow you to control which environment variables are available to a task at runtime.\n\n- `strict`: Filter environment variables to only those that are specified in the `env` and `globalEnv` keys in `turbo.json`. - `loose`: Allow all environment variables for the process to be available.\n\nDocumentation: https://turborepo.dev/docs/reference/configuration#envmode",
287
380
  "oneOf": [
@@ -510,6 +603,17 @@
510
603
  }
511
604
  }
512
605
  },
606
+ "LifecycleScripts": {
607
+ "description": "Whether dependency setup lets package managers run lifecycle scripts. `native` keeps each package manager's defaults and committed allowlists or trust settings. `skip` passes the package manager's own flag for skipping them, and fails where the package manager has none.",
608
+ "type": "string",
609
+ "enum": ["native", "skip"]
610
+ },
611
+ "Map_of_AdditionalToolArtifact": {
612
+ "type": "object",
613
+ "additionalProperties": {
614
+ "$ref": "#/definitions/AdditionalToolArtifact"
615
+ }
616
+ },
513
617
  "Map_of_TagRules": {
514
618
  "type": "object",
515
619
  "additionalProperties": {
@@ -804,6 +908,190 @@
804
908
  }
805
909
  }
806
910
  },
911
+ "SetupMirrors": {
912
+ "description": "Credential-free HTTPS mirrors for `turbo setup` downloads. Each value is a base URL that serves the same paths as the official source.",
913
+ "type": "object",
914
+ "properties": {
915
+ "bun": {
916
+ "description": "Replaces the `https://github.com` origin for Bun release checksums and archives, keeping their official paths.",
917
+ "anyOf": [
918
+ {
919
+ "$ref": "#/definitions/String"
920
+ },
921
+ {
922
+ "type": "null"
923
+ }
924
+ ]
925
+ },
926
+ "go": {
927
+ "description": "Replaces both the `https://go.dev` and `https://dl.google.com` origins for Go's release index and archives. The mirror serves both official paths, `/dl/?mode=json&include=all` and `/go/<archive>`, beneath its base.",
928
+ "anyOf": [
929
+ {
930
+ "$ref": "#/definitions/String"
931
+ },
932
+ {
933
+ "type": "null"
934
+ }
935
+ ]
936
+ },
937
+ "node": {
938
+ "description": "Replaces `https://nodejs.org/dist` for Node.js release metadata and archives.",
939
+ "anyOf": [
940
+ {
941
+ "$ref": "#/definitions/String"
942
+ },
943
+ {
944
+ "type": "null"
945
+ }
946
+ ]
947
+ },
948
+ "npmRegistry": {
949
+ "description": "Replaces `https://registry.npmjs.org` for npm, pnpm, and Yarn package metadata and tarballs.",
950
+ "anyOf": [
951
+ {
952
+ "$ref": "#/definitions/String"
953
+ },
954
+ {
955
+ "type": "null"
956
+ }
957
+ ]
958
+ },
959
+ "python": {
960
+ "description": "Replaces the `https://releases.astral.sh` origin for CPython build checksums and archives, keeping their official paths.",
961
+ "anyOf": [
962
+ {
963
+ "$ref": "#/definitions/String"
964
+ },
965
+ {
966
+ "type": "null"
967
+ }
968
+ ]
969
+ },
970
+ "rust": {
971
+ "description": "Replaces the `https://static.rust-lang.org` origin for rustup and Rust toolchain downloads, keeping their official paths, like `RUSTUP_DIST_SERVER`.",
972
+ "anyOf": [
973
+ {
974
+ "$ref": "#/definitions/String"
975
+ },
976
+ {
977
+ "type": "null"
978
+ }
979
+ ]
980
+ },
981
+ "uv": {
982
+ "description": "Replaces the `https://releases.astral.sh` origin for uv's version index and release archives, keeping their official paths.",
983
+ "anyOf": [
984
+ {
985
+ "$ref": "#/definitions/String"
986
+ },
987
+ {
988
+ "type": "null"
989
+ }
990
+ ]
991
+ }
992
+ }
993
+ },
994
+ "SetupPolicy": {
995
+ "description": "Repository policy for `turbo setup`. Only allowed in the root turbo.json and requires `futureFlags.experimentalSetup`.\n\nOptional: without it, `turbo setup` infers what to prepare from native declaration files, and detected tools are managed. Root `tools` and `dependencies` apply to every toolchain. A toolchain key overrides them for that toolchain.",
996
+ "type": "object",
997
+ "properties": {
998
+ "additionalTools": {
999
+ "description": "Tools that no built-in adapter manages, keyed by tool ID. Each declares an exact version and explicit per-platform artifacts. `turbo setup` locks, verifies, and installs them without running tool-provided scripts.",
1000
+ "type": ["object", "null"],
1001
+ "additionalProperties": {
1002
+ "$ref": "#/definitions/AdditionalTool"
1003
+ }
1004
+ },
1005
+ "dependencies": {
1006
+ "description": "How `turbo setup` prepares dependencies for every toolchain.",
1007
+ "anyOf": [
1008
+ {
1009
+ "$ref": "#/definitions/DependencyPolicy"
1010
+ },
1011
+ {
1012
+ "type": "null"
1013
+ }
1014
+ ]
1015
+ },
1016
+ "go": {
1017
+ "description": "Setup policy for the Go toolchain. Requires `futureFlags.experimentalGoWorkspaces`.",
1018
+ "anyOf": [
1019
+ {
1020
+ "$ref": "#/definitions/ToolchainSetupPolicy"
1021
+ },
1022
+ {
1023
+ "type": "null"
1024
+ }
1025
+ ]
1026
+ },
1027
+ "javascript": {
1028
+ "description": "Setup policy for the JavaScript toolchain.",
1029
+ "anyOf": [
1030
+ {
1031
+ "$ref": "#/definitions/ToolchainSetupPolicy"
1032
+ },
1033
+ {
1034
+ "type": "null"
1035
+ }
1036
+ ]
1037
+ },
1038
+ "lifecycleScripts": {
1039
+ "description": "Whether dependency setup runs lifecycle scripts for every toolchain.",
1040
+ "anyOf": [
1041
+ {
1042
+ "$ref": "#/definitions/LifecycleScripts"
1043
+ },
1044
+ {
1045
+ "type": "null"
1046
+ }
1047
+ ]
1048
+ },
1049
+ "mirrors": {
1050
+ "description": "Credential-free HTTPS mirrors for setup downloads. `turbo.lock` keeps the official URLs, and environment variables override these values.",
1051
+ "anyOf": [
1052
+ {
1053
+ "$ref": "#/definitions/SetupMirrors"
1054
+ },
1055
+ {
1056
+ "type": "null"
1057
+ }
1058
+ ]
1059
+ },
1060
+ "python": {
1061
+ "description": "Setup policy for the Python toolchain. Requires `futureFlags.experimentalPythonWorkspaces`.",
1062
+ "anyOf": [
1063
+ {
1064
+ "$ref": "#/definitions/ToolchainSetupPolicy"
1065
+ },
1066
+ {
1067
+ "type": "null"
1068
+ }
1069
+ ]
1070
+ },
1071
+ "rust": {
1072
+ "description": "Setup policy for the Rust toolchain. Requires `futureFlags.experimentalCargoWorkspaces`.",
1073
+ "anyOf": [
1074
+ {
1075
+ "$ref": "#/definitions/ToolchainSetupPolicy"
1076
+ },
1077
+ {
1078
+ "type": "null"
1079
+ }
1080
+ ]
1081
+ },
1082
+ "tools": {
1083
+ "description": "How `turbo setup` prepares tools for every toolchain.",
1084
+ "anyOf": [
1085
+ {
1086
+ "$ref": "#/definitions/ToolPolicy"
1087
+ },
1088
+ {
1089
+ "type": "null"
1090
+ }
1091
+ ]
1092
+ }
1093
+ }
1094
+ },
807
1095
  "String": {
808
1096
  "type": "string"
809
1097
  },
@@ -882,6 +1170,50 @@
882
1170
  }
883
1171
  ]
884
1172
  },
1173
+ "ToolPolicy": {
1174
+ "description": "How `turbo setup` prepares a toolchain's tools. `managed` provisions the locked version for this repository. `verify-system` uses an installed tool after verifying that it matches the locked version. `skip` neither provisions nor verifies the tool, which also skips the toolchain's dependencies.",
1175
+ "type": "string",
1176
+ "enum": ["managed", "verify-system", "skip"]
1177
+ },
1178
+ "ToolchainSetupPolicy": {
1179
+ "description": "Setup policy for one toolchain. Omitted values use the root `setup` values, then the inferred default.",
1180
+ "type": "object",
1181
+ "properties": {
1182
+ "dependencies": {
1183
+ "description": "How `turbo setup` prepares this toolchain's dependencies.",
1184
+ "anyOf": [
1185
+ {
1186
+ "$ref": "#/definitions/DependencyPolicy"
1187
+ },
1188
+ {
1189
+ "type": "null"
1190
+ }
1191
+ ]
1192
+ },
1193
+ "lifecycleScripts": {
1194
+ "description": "Whether this toolchain's dependency setup runs lifecycle scripts.",
1195
+ "anyOf": [
1196
+ {
1197
+ "$ref": "#/definitions/LifecycleScripts"
1198
+ },
1199
+ {
1200
+ "type": "null"
1201
+ }
1202
+ ]
1203
+ },
1204
+ "tools": {
1205
+ "description": "How `turbo setup` prepares this toolchain's tools.",
1206
+ "anyOf": [
1207
+ {
1208
+ "$ref": "#/definitions/ToolPolicy"
1209
+ },
1210
+ {
1211
+ "type": "null"
1212
+ }
1213
+ ]
1214
+ }
1215
+ }
1216
+ },
885
1217
  "UI": {
886
1218
  "description": "Enable use of the UI for `turbo`.\n\nDocumentation: https://turborepo.dev/docs/reference/configuration#ui",
887
1219
  "oneOf": [