@smoothbricks/nx-plugin 0.7.18 → 0.7.19

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 (143) hide show
  1. package/README.md +160 -99
  2. package/dist/.build-inputs.json +35 -29
  3. package/dist/built-output-packages.js +1 -1
  4. package/dist/cargo-closure-input.js +1 -1
  5. package/dist/cargo-source-hash.d.ts +3 -21
  6. package/dist/cargo-source-hash.d.ts.map +1 -1
  7. package/dist/cargo-source-hash.js +4 -91
  8. package/dist/cargo-toolchain-paths.d.ts +2 -2
  9. package/dist/cargo-toolchain-paths.js +2 -2
  10. package/dist/cargo-workspace.d.ts.map +1 -1
  11. package/dist/cargo-workspace.js +2 -1
  12. package/dist/executors/bounded-exec/admission-queue.d.ts +3 -1
  13. package/dist/executors/bounded-exec/admission-queue.d.ts.map +1 -1
  14. package/dist/executors/bounded-exec/admission-queue.js +9 -10
  15. package/dist/executors/bounded-exec/awake-clock.d.ts +5 -0
  16. package/dist/executors/bounded-exec/awake-clock.d.ts.map +1 -0
  17. package/dist/executors/bounded-exec/awake-clock.js +22 -0
  18. package/dist/executors/bounded-exec/bounds.d.ts +7 -5
  19. package/dist/executors/bounded-exec/bounds.d.ts.map +1 -1
  20. package/dist/executors/bounded-exec/bounds.js +14 -11
  21. package/dist/executors/bounded-exec/case-gate.d.ts +114 -0
  22. package/dist/executors/bounded-exec/case-gate.d.ts.map +1 -0
  23. package/dist/executors/bounded-exec/case-gate.js +342 -0
  24. package/dist/executors/bounded-exec/cpu-pool-thread.d.ts +1 -0
  25. package/dist/executors/bounded-exec/cpu-pool-thread.d.ts.map +1 -1
  26. package/dist/executors/bounded-exec/cpu-pool-thread.js +2 -2
  27. package/dist/executors/bounded-exec/cpu-pool.d.ts +28 -1
  28. package/dist/executors/bounded-exec/cpu-pool.d.ts.map +1 -1
  29. package/dist/executors/bounded-exec/cpu-pool.js +102 -16
  30. package/dist/executors/bounded-exec/endpoint-life.d.ts +146 -0
  31. package/dist/executors/bounded-exec/endpoint-life.d.ts.map +1 -0
  32. package/dist/executors/bounded-exec/endpoint-life.js +228 -0
  33. package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
  34. package/dist/executors/bounded-exec/executor.js +207 -69
  35. package/dist/executors/bounded-exec/gateway-lease.d.ts +1 -1
  36. package/dist/executors/bounded-exec/gateway-lease.d.ts.map +1 -1
  37. package/dist/executors/bounded-exec/gateway-lease.js +8 -1
  38. package/dist/executors/bounded-exec/go-run-summary.d.ts +51 -0
  39. package/dist/executors/bounded-exec/go-run-summary.d.ts.map +1 -0
  40. package/dist/executors/bounded-exec/go-run-summary.js +98 -0
  41. package/dist/executors/bounded-exec/hang-diagnostics.d.ts +3 -3
  42. package/dist/executors/bounded-exec/hang-diagnostics.d.ts.map +1 -1
  43. package/dist/executors/bounded-exec/hang-diagnostics.js +66 -48
  44. package/dist/executors/bounded-exec/lease-wait.d.ts +1 -0
  45. package/dist/executors/bounded-exec/lease-wait.d.ts.map +1 -1
  46. package/dist/executors/bounded-exec/lease-wait.js +1 -0
  47. package/dist/executors/bounded-exec/mbx-pool.d.ts +28 -7
  48. package/dist/executors/bounded-exec/mbx-pool.d.ts.map +1 -1
  49. package/dist/executors/bounded-exec/mbx-pool.js +30 -9
  50. package/dist/executors/bounded-exec/mbx-reservations.d.ts +8 -5
  51. package/dist/executors/bounded-exec/mbx-reservations.d.ts.map +1 -1
  52. package/dist/executors/bounded-exec/mbx-reservations.js +187 -283
  53. package/dist/executors/bounded-exec/parent-grant.d.ts +2 -0
  54. package/dist/executors/bounded-exec/parent-grant.d.ts.map +1 -1
  55. package/dist/executors/bounded-exec/parent-grant.js +1 -0
  56. package/dist/executors/bounded-exec/pool-admission.d.ts +29 -3
  57. package/dist/executors/bounded-exec/pool-admission.d.ts.map +1 -1
  58. package/dist/executors/bounded-exec/pool-admission.js +47 -1
  59. package/dist/executors/bounded-exec/progress.d.ts +3 -0
  60. package/dist/executors/bounded-exec/progress.d.ts.map +1 -1
  61. package/dist/executors/bounded-exec/progress.js +31 -1
  62. package/dist/executors/bounded-exec/reservation-connection.d.ts +90 -0
  63. package/dist/executors/bounded-exec/reservation-connection.d.ts.map +1 -0
  64. package/dist/executors/bounded-exec/reservation-connection.js +248 -0
  65. package/dist/executors/bounded-exec/run-cpu-pool.d.ts.map +1 -1
  66. package/dist/executors/bounded-exec/run-cpu-pool.js +3 -0
  67. package/dist/executors/bounded-exec/runner-sizing.d.ts +9 -5
  68. package/dist/executors/bounded-exec/runner-sizing.d.ts.map +1 -1
  69. package/dist/executors/bounded-exec/runner-sizing.js +13 -9
  70. package/dist/executors/bounded-exec/schema.d.ts +2 -2
  71. package/dist/executors/bounded-exec/suite-minimum.d.ts +21 -0
  72. package/dist/executors/bounded-exec/suite-minimum.d.ts.map +1 -0
  73. package/dist/executors/bounded-exec/suite-minimum.js +85 -0
  74. package/dist/executors/bounded-exec/test-result-writer.d.ts +2 -0
  75. package/dist/executors/bounded-exec/test-result-writer.d.ts.map +1 -1
  76. package/dist/executors/bounded-exec/test-result-writer.js +1 -0
  77. package/dist/executors/bounded-exec/test-results.d.ts +5 -0
  78. package/dist/executors/bounded-exec/test-results.d.ts.map +1 -1
  79. package/dist/executors/bounded-exec/test-results.js +2 -2
  80. package/dist/executors/bounded-exec/verdict.d.ts +26 -4
  81. package/dist/executors/bounded-exec/verdict.d.ts.map +1 -1
  82. package/dist/executors/bounded-exec/verdict.js +26 -5
  83. package/dist/executors/cargo-zigbuild/executor.d.ts +10 -8
  84. package/dist/executors/cargo-zigbuild/executor.d.ts.map +1 -1
  85. package/dist/executors/cargo-zigbuild/executor.js +32 -19
  86. package/dist/index.d.ts.map +1 -1
  87. package/dist/index.js +105 -73
  88. package/dist/managed-files/ci-workflow.d.ts +4 -1
  89. package/dist/managed-files/ci-workflow.d.ts.map +1 -1
  90. package/dist/managed-files/ci-workflow.js +9 -14
  91. package/dist/managed-files/files.d.ts +3 -3
  92. package/dist/managed-files/files.js +3 -3
  93. package/dist/task-results.js +2 -1
  94. package/dist/workspace-config-policy.d.ts.map +1 -1
  95. package/dist/workspace-config-policy.js +135 -42
  96. package/executors.json +2 -0
  97. package/managed/raw/envrc +24 -0
  98. package/managed/raw/patches/nx@24.0.3.patch +1179 -133
  99. package/managed/raw/patches/ttsc@0.37.1.patch +1055 -0
  100. package/managed/raw/tooling/direnv/developer-links.ts +105 -11
  101. package/managed/raw/tooling/direnv/devenv.smoo.nix +20 -19
  102. package/package.json +67 -11
  103. package/runtime/nx-publish/.build-inputs.json +2 -2
  104. package/runtime/nx-publish/cache_adapter.js +293 -3
  105. package/runtime/nx-publish/nx_publish.js +36 -14
  106. package/src/built-output-packages.ts +1 -1
  107. package/src/cargo-closure-input.ts +1 -1
  108. package/src/cargo-source-hash.ts +16 -132
  109. package/src/cargo-toolchain-paths.ts +2 -2
  110. package/src/cargo-workspace.ts +1 -2
  111. package/src/executors/bounded-exec/admission-queue.ts +11 -10
  112. package/src/executors/bounded-exec/awake-clock.ts +20 -0
  113. package/src/executors/bounded-exec/bounds.ts +28 -15
  114. package/src/executors/bounded-exec/case-gate.ts +365 -0
  115. package/src/executors/bounded-exec/cpu-pool-thread.ts +3 -3
  116. package/src/executors/bounded-exec/cpu-pool.ts +139 -12
  117. package/src/executors/bounded-exec/endpoint-life.ts +279 -0
  118. package/src/executors/bounded-exec/executor.ts +280 -106
  119. package/src/executors/bounded-exec/gateway-lease.ts +6 -0
  120. package/src/executors/bounded-exec/go-run-summary.ts +137 -0
  121. package/src/executors/bounded-exec/hang-diagnostics.ts +70 -52
  122. package/src/executors/bounded-exec/lease-wait.ts +1 -0
  123. package/src/executors/bounded-exec/mbx-pool.ts +36 -9
  124. package/src/executors/bounded-exec/mbx-reservations.ts +213 -182
  125. package/src/executors/bounded-exec/parent-grant.ts +3 -0
  126. package/src/executors/bounded-exec/pool-admission.ts +59 -2
  127. package/src/executors/bounded-exec/progress.ts +37 -2
  128. package/src/executors/bounded-exec/reservation-connection.ts +221 -0
  129. package/src/executors/bounded-exec/run-cpu-pool.ts +2 -0
  130. package/src/executors/bounded-exec/runner-sizing.ts +13 -8
  131. package/src/executors/bounded-exec/schema.json +1 -1
  132. package/src/executors/bounded-exec/schema.ts +2 -2
  133. package/src/executors/bounded-exec/suite-minimum.ts +81 -0
  134. package/src/executors/bounded-exec/test-result-writer.ts +3 -0
  135. package/src/executors/bounded-exec/test-results.ts +5 -0
  136. package/src/executors/bounded-exec/verdict.ts +39 -6
  137. package/src/executors/cargo-zigbuild/executor.ts +30 -19
  138. package/src/index.ts +112 -78
  139. package/src/managed-files/ci-workflow.ts +13 -17
  140. package/src/managed-files/files.ts +3 -3
  141. package/src/workspace-config-policy.ts +161 -43
  142. package/test-timings.json +157 -147
  143. package/managed/raw/patches/ttsc@0.36.3.patch +0 -1660
@@ -177,6 +177,9 @@ export function checkWorkspaceConfig(nxJson) {
177
177
  const issues = [];
178
178
  // Colon target defaults
179
179
  const targetDefaults = recordProperty(nxJson, 'targetDefaults');
180
+ if (nxJson.targetDefaults !== undefined && targetDefaults === null) {
181
+ issues.push({ path: 'nx.json', message: 'targetDefaults must be an object; smoo does not rewrite it' });
182
+ }
180
183
  if (targetDefaults) {
181
184
  for (const targetName of Object.keys(targetDefaults)) {
182
185
  if (targetName.includes(':')) {
@@ -193,12 +196,15 @@ export function checkWorkspaceConfig(nxJson) {
193
196
  'Per-project inference selects current library or build outputs before test typechecking.',
194
197
  });
195
198
  }
196
- if (isRetiredCleanTargetDefault(targetDefaults, targetName)) {
199
+ if (retiredCleanEntries(targetDefaults, targetName).length !== 0) {
197
200
  issues.push({
198
201
  path: 'nx.json',
199
202
  message: `targetDefaults.clean names the retired ${retiredCleanOutputsExecutor}; run smoo monorepo update to remove it`,
200
203
  });
201
204
  }
205
+ if (targetDefault(nxJson, targetName).form === 'malformed') {
206
+ issues.push({ path: 'nx.json', message: malformedTargetDefaultMessage(targetName) });
207
+ }
202
208
  }
203
209
  }
204
210
  // Build target default
@@ -326,10 +332,21 @@ export function applyWorkspaceConfigPolicy(root) {
326
332
  return changed;
327
333
  }
328
334
  function validateBuildTargetDefault(nxJson, nxJsonPath, issues) {
329
- const targetDefaults = recordProperty(nxJson, 'targetDefaults');
330
- const build = targetDefaults ? recordProperty(targetDefaults, 'build') : null;
331
- if (build?.cache !== true) {
332
- issues.push({ path: nxJsonPath, message: 'targetDefaults.build.cache must be true' });
335
+ const build = targetDefault(nxJson, 'build');
336
+ if (build.form === 'malformed') {
337
+ return;
338
+ }
339
+ const entries = build.form === 'absent' ? [] : build.entries;
340
+ if (catchAllValue(entries, 'cache') !== true) {
341
+ issues.push({
342
+ path: nxJsonPath,
343
+ message: build.form === 'list'
344
+ ? 'targetDefaults.build.cache must be true in an entry without a filter'
345
+ : 'targetDefaults.build.cache must be true',
346
+ });
347
+ }
348
+ if (entries.some((entry) => 'filter' in entry && 'cache' in entry && entry.cache !== true)) {
349
+ issues.push({ path: nxJsonPath, message: 'targetDefaults.build.cache must be true in every entry that sets it' });
333
350
  }
334
351
  // dependsOn and outputs are both owned by the inference plugin, and Nx gives
335
352
  // targetDefaults precedence over inferred values, so anything set here lands
@@ -352,7 +369,7 @@ function validateBuildTargetDefault(nxJson, nxJsonPath, issues) {
352
369
  // `build` genuinely emits files declares its own outputs in package.json,
353
370
  // where the claim is scoped to the project that can honour it.
354
371
  for (const property of ['dependsOn', 'outputs']) {
355
- if (build !== null && property in build) {
372
+ if (entries.some((entry) => property in entry)) {
356
373
  issues.push({
357
374
  path: nxJsonPath,
358
375
  message: `targetDefaults.build.${property} must not be set; @smoothbricks/nx-plugin infers the build aggregate`,
@@ -417,24 +434,46 @@ function markdownExclusionMessage(name) {
417
434
  return `namedInputs.${name} must exclude ${MARKDOWN_EXCLUSION.slice(1)}: Markdown is no task's input unless a target names it.`;
418
435
  }
419
436
  function applyBuildTargetDefault(nxJson) {
420
- const targetDefaults = getOrCreateRecord(nxJson, 'targetDefaults');
421
- const build = getOrCreateRecord(targetDefaults, 'build');
422
- let changed = setBooleanProperty(build, 'cache', true);
423
- for (const property of ['dependsOn', 'outputs']) {
424
- if (property in build) {
425
- delete build[property];
437
+ const build = targetDefault(nxJson, 'build');
438
+ if (build.form === 'malformed') {
439
+ return false;
440
+ }
441
+ if (build.form === 'absent') {
442
+ const targetDefaults = recordProperty(nxJson, 'targetDefaults');
443
+ if (nxJson.targetDefaults !== undefined && targetDefaults === null) {
444
+ return false;
445
+ }
446
+ getOrCreateRecord(nxJson, 'targetDefaults').build = { cache: true };
447
+ return true;
448
+ }
449
+ let changed = false;
450
+ if (catchAllValue(build.entries, 'cache') !== true) {
451
+ const catchAll = build.entries.filter((entry) => !('filter' in entry)).at(-1);
452
+ if (catchAll !== undefined) {
453
+ changed = setBooleanProperty(catchAll, 'cache', true);
454
+ }
455
+ else if (build.form === 'list') {
456
+ // A list with no entry for every build gets one that caches; the entries it holds stay as written.
457
+ build.list.push({ cache: true });
426
458
  changed = true;
427
459
  }
460
+ else {
461
+ changed = setBooleanProperty(build.record, 'cache', true);
462
+ }
428
463
  }
429
- return changed;
464
+ for (const entry of build.entries) {
465
+ if ('filter' in entry && 'cache' in entry && entry.cache !== true) {
466
+ delete entry.cache;
467
+ changed = true;
468
+ }
469
+ }
470
+ return deleteMembers(build.entries, ['dependsOn', 'outputs']) || changed;
430
471
  }
431
472
  function validateTestTargetDefault(nxJson, nxJsonPath, issues) {
432
- const targetDefaults = recordProperty(nxJson, 'targetDefaults');
433
- const test = targetDefaults ? recordProperty(targetDefaults, 'test') : null;
434
473
  // Same clobber as targetDefaults.build.dependsOn: Nx replaces an inferred
435
474
  // list rather than merging, so a workspace-wide [^build, build] unwires
436
475
  // cargo-test from every Rust test aggregate. Cache stays allowed.
437
- if (test !== null && 'dependsOn' in test) {
476
+ if (targetDefaultEntries(nxJson, 'test').some((entry) => 'dependsOn' in entry)) {
438
477
  issues.push({
439
478
  path: nxJsonPath,
440
479
  message: 'targetDefaults.test.dependsOn must not be set; @smoothbricks/nx-plugin infers the test aggregate',
@@ -442,23 +481,24 @@ function validateTestTargetDefault(nxJson, nxJsonPath, issues) {
442
481
  }
443
482
  }
444
483
  function applyTestTargetDefault(nxJson) {
445
- const targetDefaults = recordProperty(nxJson, 'targetDefaults');
446
- const test = targetDefaults ? recordProperty(targetDefaults, 'test') : null;
447
- if (test === null || !('dependsOn' in test)) {
448
- return false;
449
- }
450
- delete test.dependsOn;
451
- return true;
484
+ return deleteMembers(targetDefaultEntries(nxJson, 'test'), ['dependsOn']);
452
485
  }
453
486
  const inferredLintProperties = ['executor', 'options', 'dependsOn', 'outputs', 'inputs'];
454
- function preservesInferredLintInputs(inputs) {
455
- return Array.isArray(inputs) && inputs.includes('...') && inputs.includes('^production');
487
+ /**
488
+ * Whether an entry's inputs keep what lint infers. Every entry spreads what came before it (`...`); an entry for every
489
+ * lint target also keeps the dependency declarations (`^production`), which a filtered entry inherits by spreading it.
490
+ */
491
+ function preservesInferredLintInputs(entry) {
492
+ const inputs = entry.inputs;
493
+ return Array.isArray(inputs) && inputs.includes('...') && ('filter' in entry || inputs.includes('^production'));
494
+ }
495
+ function offendingLintProperties(entry) {
496
+ return inferredLintProperties.filter((property) => property in entry && !(property === 'inputs' && preservesInferredLintInputs(entry)));
456
497
  }
457
498
  function validateLintTargetDefault(nxJson, nxJsonPath, issues) {
458
- const defaults = recordProperty(nxJson, 'targetDefaults');
459
- const lint = defaults ? recordProperty(defaults, 'lint') : null;
499
+ const offending = new Set(targetDefaultEntries(nxJson, 'lint').flatMap(offendingLintProperties));
460
500
  for (const property of inferredLintProperties) {
461
- if (lint !== null && property in lint && !(property === 'inputs' && preservesInferredLintInputs(lint.inputs))) {
501
+ if (offending.has(property)) {
462
502
  issues.push({
463
503
  path: nxJsonPath,
464
504
  message: `targetDefaults.lint.${property} must not be set; @smoothbricks/nx-plugin infers lint from project sources`,
@@ -467,16 +507,9 @@ function validateLintTargetDefault(nxJson, nxJsonPath, issues) {
467
507
  }
468
508
  }
469
509
  function applyLintTargetDefault(nxJson) {
470
- const defaults = recordProperty(nxJson, 'targetDefaults');
471
- const lint = defaults ? recordProperty(defaults, 'lint') : null;
472
- if (lint === null)
473
- return false;
474
510
  let changed = false;
475
- for (const property of inferredLintProperties) {
476
- if (property in lint && !(property === 'inputs' && preservesInferredLintInputs(lint.inputs))) {
477
- delete lint[property];
478
- changed = true;
479
- }
511
+ for (const entry of targetDefaultEntries(nxJson, 'lint')) {
512
+ changed = deleteMembers([entry], offendingLintProperties(entry)) || changed;
480
513
  }
481
514
  return changed;
482
515
  }
@@ -518,17 +551,33 @@ function removeDisallowedTargetDefaults(nxJson) {
518
551
  }
519
552
  let changed = false;
520
553
  for (const targetName of Object.keys(targetDefaults)) {
521
- if (targetName.includes(':') ||
522
- targetName === inferredTestTypecheckTarget ||
523
- isRetiredCleanTargetDefault(targetDefaults, targetName)) {
554
+ if (targetName.includes(':') || targetName === inferredTestTypecheckTarget) {
524
555
  delete targetDefaults[targetName];
525
556
  changed = true;
557
+ continue;
558
+ }
559
+ const retired = retiredCleanEntries(targetDefaults, targetName);
560
+ if (retired.length === 0) {
561
+ continue;
526
562
  }
563
+ const value = targetDefaults[targetName];
564
+ const kept = Array.isArray(value) ? value.filter((entry) => !retired.includes(entry)) : [];
565
+ if (kept.length === 0) {
566
+ delete targetDefaults[targetName];
567
+ }
568
+ else {
569
+ targetDefaults[targetName] = kept;
570
+ }
571
+ changed = true;
527
572
  }
528
573
  return changed;
529
574
  }
530
- function isRetiredCleanTargetDefault(targetDefaults, targetName) {
531
- return targetName === 'clean' && recordProperty(targetDefaults, 'clean')?.executor === retiredCleanOutputsExecutor;
575
+ /** The entries of `targetName`'s default that name the retired clean executor, which the policy removes. */
576
+ function retiredCleanEntries(targetDefaults, targetName) {
577
+ if (targetName !== 'clean') {
578
+ return [];
579
+ }
580
+ return targetDefaultEntries({ targetDefaults }, 'clean').filter((entry) => entry.executor === retiredCleanOutputsExecutor);
532
581
  }
533
582
  function isPreciseProductionNamedInput(production) {
534
583
  let hasPositiveProjectInput = false;
@@ -584,6 +633,50 @@ function recordProperty(record, key) {
584
633
  const value = record[key];
585
634
  return isRecord(value) ? value : null;
586
635
  }
636
+ function targetDefault(nxJson, targetName) {
637
+ const value = recordProperty(nxJson, 'targetDefaults')?.[targetName];
638
+ if (value === undefined) {
639
+ return { form: 'absent' };
640
+ }
641
+ if (isRecord(value)) {
642
+ return { form: 'record', entries: [value], record: value };
643
+ }
644
+ if (Array.isArray(value) && value.every(isRecord)) {
645
+ return { form: 'list', entries: [...value], list: value };
646
+ }
647
+ return { form: 'malformed' };
648
+ }
649
+ /** The entries of a readable target default; none for an absent or malformed one, which validation reports. */
650
+ function targetDefaultEntries(nxJson, targetName) {
651
+ const value = targetDefault(nxJson, targetName);
652
+ return value.form === 'record' || value.form === 'list' ? value.entries : [];
653
+ }
654
+ /** What every target of the name receives for `key` from the entries without a filter: Nx merges them, last one wins. */
655
+ function catchAllValue(entries, key) {
656
+ let value;
657
+ for (const entry of entries) {
658
+ if (!('filter' in entry) && key in entry) {
659
+ value = entry[key];
660
+ }
661
+ }
662
+ return value;
663
+ }
664
+ /** Remove `members` from every entry that holds them; the entries themselves and their other members stay. */
665
+ function deleteMembers(entries, members) {
666
+ let changed = false;
667
+ for (const entry of entries) {
668
+ for (const member of members) {
669
+ if (member in entry) {
670
+ delete entry[member];
671
+ changed = true;
672
+ }
673
+ }
674
+ }
675
+ return changed;
676
+ }
677
+ function malformedTargetDefaultMessage(targetName) {
678
+ return `targetDefaults.${targetName} must be an object or a list of objects; smoo does not rewrite it`;
679
+ }
587
680
  function getOrCreateRecord(record, key) {
588
681
  const value = record[key];
589
682
  if (isRecord(value)) {
package/executors.json CHANGED
@@ -9,6 +9,7 @@
9
9
  "./dist/executors/bounded-exec/cpu-grant.js",
10
10
  "./dist/executors/bounded-exec/cpu-pool.js",
11
11
  "./dist/executors/bounded-exec/disk-lease.js",
12
+ "./dist/executors/bounded-exec/case-gate.js",
12
13
  "./dist/executors/bounded-exec/gateway-lease.js",
13
14
  "./dist/executors/bounded-exec/hang-diagnostics.js",
14
15
  "./dist/executors/bounded-exec/host-memory.js",
@@ -22,6 +23,7 @@
22
23
  "./dist/executors/bounded-exec/ram-detach.js",
23
24
  "./dist/executors/bounded-exec/ram-temp-held.js",
24
25
  "./dist/executors/bounded-exec/ram-temp.js",
26
+ "./dist/executors/bounded-exec/suite-minimum.js",
25
27
  "./dist/testing.js"
26
28
  ]
27
29
  },
package/managed/raw/envrc CHANGED
@@ -58,6 +58,30 @@ watch_file \
58
58
  tooling/direnv/secret-references.ts \
59
59
  tooling/direnv/toolchain-stamp.ts
60
60
 
61
+ # bun.lock records where each patch lives and never what it says, and `bun install`
62
+ # applies the bytes of the patches the root package.json's patchedDependencies
63
+ # names. Editing a patch therefore moves no file watched above: a pull that
64
+ # changed only a patch left the shell on the package it had installed, and
65
+ # devenv's smoo:install was never asked to apply the new bytes. So each patch is
66
+ # watched too. A manifest that cannot be read is said and the shell still loads;
67
+ # package.json is watched, so mending it re-enters.
68
+ smoo_patches=()
69
+ if smoo_patch_list=$(bun --eval '
70
+ const patches = JSON.parse(await Bun.file("package.json").text()).patchedDependencies ?? {};
71
+ if (typeof patches !== "object" || Array.isArray(patches) || Object.values(patches).some((patch) => typeof patch !== "string")) {
72
+ throw new Error("patchedDependencies must map each package to a patch path");
73
+ }
74
+ for (const patch of Object.values(patches)) console.log(patch);
75
+ '); then
76
+ while IFS= read -r smoo_patch; do
77
+ [ -z "$smoo_patch" ] || smoo_patches+=("$smoo_patch")
78
+ done <<<"$smoo_patch_list"
79
+ [ "${#smoo_patches[@]}" -eq 0 ] || watch_file "${smoo_patches[@]}"
80
+ else
81
+ log_error "package.json's patchedDependencies could not be read (see above): its patches are not watched"
82
+ fi
83
+ unset smoo_patches smoo_patch_list smoo_patch
84
+
61
85
  # A cowshed workspace's environment, for interactive shells inside one; an
62
86
  # absent file is skipped.
63
87
  source_env_if_exists .cowshed/env