@smoothbricks/nx-plugin 0.4.26 → 0.4.27

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 (343) hide show
  1. package/README.md +994 -117
  2. package/dist/bin/smoo-nx-bound-failures.d.ts +3 -0
  3. package/dist/bin/smoo-nx-bound-failures.d.ts.map +1 -0
  4. package/dist/bin/smoo-nx-bound-failures.js +31 -0
  5. package/dist/bin/smoo-nx-cargo-hash.js +28 -3
  6. package/dist/bin/smoo-nx-exec.js +15 -73
  7. package/dist/bin/smoo-nx-failures.d.ts +3 -0
  8. package/dist/bin/smoo-nx-failures.d.ts.map +1 -0
  9. package/dist/bin/smoo-nx-failures.js +3 -0
  10. package/dist/bin/smoo-nx-nextest-extract.js +3 -2
  11. package/dist/bin/smoo-nx-test-walks.d.ts +3 -0
  12. package/dist/bin/smoo-nx-test-walks.d.ts.map +1 -0
  13. package/dist/bin/smoo-nx-test-walks.js +34 -0
  14. package/dist/bounded-test-policy.d.ts +7 -1
  15. package/dist/bounded-test-policy.d.ts.map +1 -1
  16. package/dist/bounded-test-policy.js +101 -40
  17. package/dist/build-state-output-policy.d.ts +25 -0
  18. package/dist/build-state-output-policy.d.ts.map +1 -0
  19. package/dist/build-state-output-policy.js +64 -0
  20. package/dist/cargo-closure-input.d.ts +3 -2
  21. package/dist/cargo-closure-input.d.ts.map +1 -1
  22. package/dist/cargo-closure-input.js +16 -15
  23. package/dist/cargo-dev-profile.d.ts +37 -0
  24. package/dist/cargo-dev-profile.d.ts.map +1 -0
  25. package/dist/cargo-dev-profile.js +108 -0
  26. package/dist/cargo-source-hash.d.ts +43 -6
  27. package/dist/cargo-source-hash.d.ts.map +1 -1
  28. package/dist/cargo-source-hash.js +309 -73
  29. package/dist/cargo-toolchain-policy.d.ts +4 -0
  30. package/dist/cargo-toolchain-policy.d.ts.map +1 -1
  31. package/dist/cargo-toolchain-policy.js +5 -0
  32. package/dist/cargo-workspace.d.ts +101 -5
  33. package/dist/cargo-workspace.d.ts.map +1 -1
  34. package/dist/cargo-workspace.js +291 -10
  35. package/dist/cross-check-policy.d.ts +21 -3
  36. package/dist/cross-check-policy.d.ts.map +1 -1
  37. package/dist/cross-check-policy.js +24 -6
  38. package/dist/disk-command-policy.d.ts +7 -0
  39. package/dist/disk-command-policy.d.ts.map +1 -0
  40. package/dist/disk-command-policy.js +98 -0
  41. package/dist/ensure-built-receipt.d.ts +25 -0
  42. package/dist/ensure-built-receipt.d.ts.map +1 -0
  43. package/dist/ensure-built-receipt.js +261 -0
  44. package/dist/ensure-built-witness.d.ts +57 -0
  45. package/dist/ensure-built-witness.d.ts.map +1 -0
  46. package/dist/ensure-built-witness.js +412 -0
  47. package/dist/ensure-built.d.ts +207 -12
  48. package/dist/ensure-built.d.ts.map +1 -1
  49. package/dist/ensure-built.js +576 -202
  50. package/dist/eslint-file-set.d.ts +7 -0
  51. package/dist/eslint-file-set.d.ts.map +1 -0
  52. package/dist/eslint-file-set.js +12 -0
  53. package/dist/executors/bounded-exec/cpu-pool.d.ts +63 -0
  54. package/dist/executors/bounded-exec/cpu-pool.d.ts.map +1 -0
  55. package/dist/executors/bounded-exec/cpu-pool.js +379 -0
  56. package/dist/executors/bounded-exec/cpu-tokens.d.ts +82 -0
  57. package/dist/executors/bounded-exec/cpu-tokens.d.ts.map +1 -0
  58. package/dist/executors/bounded-exec/cpu-tokens.js +114 -0
  59. package/dist/executors/bounded-exec/disk-lease.d.ts +61 -0
  60. package/dist/executors/bounded-exec/disk-lease.d.ts.map +1 -0
  61. package/dist/executors/bounded-exec/disk-lease.js +91 -0
  62. package/dist/executors/bounded-exec/executor.d.ts +45 -2
  63. package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
  64. package/dist/executors/bounded-exec/executor.js +447 -52
  65. package/dist/executors/bounded-exec/gateway-lease.d.ts +52 -0
  66. package/dist/executors/bounded-exec/gateway-lease.d.ts.map +1 -0
  67. package/dist/executors/bounded-exec/gateway-lease.js +143 -0
  68. package/dist/executors/bounded-exec/hang-diagnostics.d.ts +35 -0
  69. package/dist/executors/bounded-exec/hang-diagnostics.d.ts.map +1 -0
  70. package/dist/executors/bounded-exec/hang-diagnostics.js +231 -0
  71. package/dist/executors/bounded-exec/progress.d.ts +35 -0
  72. package/dist/executors/bounded-exec/progress.d.ts.map +1 -0
  73. package/dist/executors/bounded-exec/progress.js +79 -0
  74. package/dist/executors/bounded-exec/ram-temp-fixtures.d.ts +3 -0
  75. package/dist/executors/bounded-exec/ram-temp-fixtures.d.ts.map +1 -0
  76. package/dist/executors/bounded-exec/ram-temp-fixtures.js +12 -0
  77. package/dist/executors/bounded-exec/ram-temp-held.d.ts +91 -0
  78. package/dist/executors/bounded-exec/ram-temp-held.d.ts.map +1 -0
  79. package/dist/executors/bounded-exec/ram-temp-held.js +152 -0
  80. package/dist/executors/bounded-exec/ram-temp.d.ts +223 -0
  81. package/dist/executors/bounded-exec/ram-temp.d.ts.map +1 -0
  82. package/dist/executors/bounded-exec/ram-temp.js +1528 -0
  83. package/dist/executors/bounded-exec/schema.d.ts +29 -11
  84. package/dist/executors/bounded-exec/schema.d.ts.map +1 -1
  85. package/dist/executors/bounded-exec/verdict.d.ts +162 -0
  86. package/dist/executors/bounded-exec/verdict.d.ts.map +1 -0
  87. package/dist/executors/bounded-exec/verdict.js +318 -0
  88. package/dist/executors/shard-timings/executor.d.ts +14 -0
  89. package/dist/executors/shard-timings/executor.d.ts.map +1 -0
  90. package/dist/executors/shard-timings/executor.js +25 -0
  91. package/dist/executors/shard-timings/schema.d.ts +4 -0
  92. package/dist/executors/shard-timings/schema.d.ts.map +1 -0
  93. package/dist/executors/shard-timings/schema.js +1 -0
  94. package/dist/failure-summary.d.ts +5 -0
  95. package/dist/failure-summary.d.ts.map +1 -0
  96. package/dist/failure-summary.js +118 -0
  97. package/dist/generators/create-package/generator.d.ts.map +1 -1
  98. package/dist/generators/create-package/generator.js +6 -2
  99. package/dist/index.d.ts +14 -2
  100. package/dist/index.d.ts.map +1 -1
  101. package/dist/index.js +370 -138
  102. package/dist/managed-files/ci-workflow.d.ts +13 -0
  103. package/dist/managed-files/ci-workflow.d.ts.map +1 -1
  104. package/dist/managed-files/ci-workflow.js +44 -13
  105. package/dist/managed-files/files.d.ts +7 -1
  106. package/dist/managed-files/files.d.ts.map +1 -1
  107. package/dist/managed-files/files.js +62 -8
  108. package/dist/managed-files/json-edit.d.ts +21 -0
  109. package/dist/managed-files/json-edit.d.ts.map +1 -0
  110. package/dist/managed-files/json-edit.js +295 -0
  111. package/dist/managed-files/managed-format.d.ts +33 -1
  112. package/dist/managed-files/managed-format.d.ts.map +1 -1
  113. package/dist/managed-files/managed-format.js +82 -2
  114. package/dist/managed-files/pr-preview-cleanup-workflow.d.ts +7 -0
  115. package/dist/managed-files/pr-preview-cleanup-workflow.d.ts.map +1 -1
  116. package/dist/managed-files/pr-preview-cleanup-workflow.js +68 -4
  117. package/dist/managed-files/publish-workflow.d.ts.map +1 -1
  118. package/dist/managed-files/publish-workflow.js +231 -48
  119. package/dist/managed-files/tree.d.ts +5 -0
  120. package/dist/managed-files/tree.d.ts.map +1 -1
  121. package/dist/managed-files/tree.js +5 -3
  122. package/dist/manifest-hash.d.ts.map +1 -1
  123. package/dist/manifest-hash.js +2 -5
  124. package/dist/nextest-code-bound.d.ts +62 -0
  125. package/dist/nextest-code-bound.d.ts.map +1 -0
  126. package/dist/nextest-code-bound.js +154 -0
  127. package/dist/nextest-extraction.d.ts +24 -8
  128. package/dist/nextest-extraction.d.ts.map +1 -1
  129. package/dist/nextest-extraction.js +42 -7
  130. package/dist/package-target-policy.d.ts.map +1 -1
  131. package/dist/package-target-policy.js +3 -5
  132. package/dist/release-config-policy.d.ts.map +1 -1
  133. package/dist/release-config-policy.js +3 -5
  134. package/dist/runtime-input.d.ts +14 -0
  135. package/dist/runtime-input.d.ts.map +1 -0
  136. package/dist/runtime-input.js +15 -0
  137. package/dist/rust-tokens.d.ts +11 -0
  138. package/dist/rust-tokens.d.ts.map +1 -0
  139. package/dist/rust-tokens.js +81 -0
  140. package/dist/task-results.d.ts +6 -0
  141. package/dist/task-results.d.ts.map +1 -0
  142. package/dist/task-results.js +61 -0
  143. package/dist/test-program.d.ts +54 -0
  144. package/dist/test-program.d.ts.map +1 -0
  145. package/dist/test-program.js +292 -0
  146. package/dist/test-timings.d.ts +71 -0
  147. package/dist/test-timings.d.ts.map +1 -0
  148. package/dist/test-timings.js +393 -0
  149. package/dist/test-walk-policy.d.ts +103 -0
  150. package/dist/test-walk-policy.d.ts.map +1 -0
  151. package/dist/test-walk-policy.js +657 -0
  152. package/dist/testing.d.ts +177 -0
  153. package/dist/testing.d.ts.map +1 -0
  154. package/dist/testing.js +824 -0
  155. package/dist/type-guards.d.ts +3 -0
  156. package/dist/type-guards.d.ts.map +1 -0
  157. package/dist/type-guards.js +4 -0
  158. package/dist/typecheck-test-policy.d.ts +8 -5
  159. package/dist/typecheck-test-policy.d.ts.map +1 -1
  160. package/dist/typecheck-test-policy.js +113 -100
  161. package/dist/workspace-config-policy.d.ts +8 -0
  162. package/dist/workspace-config-policy.d.ts.map +1 -1
  163. package/dist/workspace-config-policy.js +175 -63
  164. package/dist/workspace-index.d.ts +12 -0
  165. package/dist/workspace-index.d.ts.map +1 -0
  166. package/dist/workspace-index.js +17 -0
  167. package/dist/workspace-manifest.d.ts +37 -0
  168. package/dist/workspace-manifest.d.ts.map +1 -1
  169. package/executors.json +5 -0
  170. package/loader.js +13 -11
  171. package/managed/raw/envrc +33 -67
  172. package/managed/raw/git-format-staged.yml +30 -35
  173. package/managed/raw/patches/nx@23.2.1.patch +3484 -0
  174. package/managed/raw/tooling/direnv/apple-developer.sh +83 -0
  175. package/managed/raw/tooling/direnv/developer-links.ts +569 -11
  176. package/managed/raw/tooling/direnv/devenv.smoo.nix +314 -93
  177. package/managed/raw/tooling/direnv/github-actions-bootstrap.sh +20 -11
  178. package/managed/raw/tooling/direnv/linked-snapshots.ts +845 -0
  179. package/managed/raw/tooling/direnv/nx-socket-dir.sh +82 -0
  180. package/managed/raw/tooling/direnv/repo-path +14 -2
  181. package/managed/raw/tooling/direnv/setup-environment.ts +962 -148
  182. package/managed/raw/tooling/direnv/toolchain-stamp.ts +45 -3
  183. package/managed/raw/tooling/direnv/ttsc-env.sh +39 -0
  184. package/managed/raw/tooling/git-hooks/commit-msg.sh +5 -6
  185. package/managed/raw/tooling/git-hooks/pre-commit.sh +7 -6
  186. package/managed/raw/tooling/git-hooks/pre-push.sh +20 -15
  187. package/managed/templates/github/actions/cache-nix-devenv/action.yml +6 -6
  188. package/managed/templates/github/actions/cache-node-modules/action.yml +6 -4
  189. package/managed/templates/github/actions/cache-nx/action.yml +1 -1
  190. package/managed/templates/github/actions/cache-ttsc-plugins/action.yml +1 -1
  191. package/managed/templates/github/actions/forgejo-artifact.cjs +99 -0
  192. package/managed/templates/github/actions/forgejo-download-artifact/action.yml +49 -0
  193. package/managed/templates/github/actions/forgejo-download-artifact/index.cjs +7 -0
  194. package/managed/templates/github/actions/forgejo-upload-artifact/action.yml +65 -0
  195. package/managed/templates/github/actions/forgejo-upload-artifact/index.cjs +7 -0
  196. package/managed/templates/github/actions/setup-devenv/action.yml +21 -3
  197. package/managed/templates/github/workflows/managed-files.yml +1 -2
  198. package/nextest.toml +8 -41
  199. package/package.json +74 -12
  200. package/runtime-input.sh +81 -0
  201. package/src/__tests__/counted-cargo.ts +33 -14
  202. package/src/__tests__/fixture-nx-env.ts +111 -46
  203. package/src/__tests__/progress-clock.ts +43 -0
  204. package/src/__tests__/runtime-input.ts +23 -0
  205. package/src/bin/smoo-nx-bound-failures.test.ts +127 -0
  206. package/src/bin/smoo-nx-bound-failures.ts +33 -0
  207. package/src/bin/smoo-nx-cargo-hash.ts +28 -3
  208. package/src/bin/smoo-nx-exec.ts +16 -74
  209. package/src/bin/smoo-nx-failures.ts +4 -0
  210. package/src/bin/smoo-nx-nextest-extract.ts +3 -2
  211. package/src/bin/smoo-nx-test-walks.ts +42 -0
  212. package/src/bounded-test-policy.test.ts +268 -21
  213. package/src/bounded-test-policy.ts +114 -42
  214. package/src/build-state-output-policy.test.ts +115 -0
  215. package/src/build-state-output-policy.ts +90 -0
  216. package/src/bun-bootstrap.test.ts +57 -3
  217. package/src/bun-file-packages.test.ts +47 -0
  218. package/src/cargo-closure-input.test.ts +138 -66
  219. package/src/cargo-closure-input.ts +17 -15
  220. package/src/cargo-dev-profile.ts +137 -0
  221. package/src/cargo-resolve-cache.test.ts +70 -1
  222. package/src/cargo-source-hash.test.ts +193 -97
  223. package/src/cargo-source-hash.ts +345 -68
  224. package/src/cargo-toolchain-policy.ts +6 -0
  225. package/src/cargo-workspace.test.ts +320 -0
  226. package/src/cargo-workspace.ts +336 -10
  227. package/src/cross-check-policy.test.ts +59 -1
  228. package/src/cross-check-policy.ts +25 -6
  229. package/src/disk-command-policy.test.ts +61 -0
  230. package/src/disk-command-policy.ts +107 -0
  231. package/src/ensure-built-receipt.test.ts +184 -0
  232. package/src/ensure-built-receipt.ts +263 -0
  233. package/src/ensure-built-witness.test.ts +344 -0
  234. package/src/ensure-built-witness.ts +252 -0
  235. package/src/ensure-built.test.ts +1036 -578
  236. package/src/ensure-built.ts +820 -224
  237. package/src/eslint-file-set.ts +9 -0
  238. package/src/executors/bounded-exec/cpu-pool.test.ts +454 -0
  239. package/src/executors/bounded-exec/cpu-pool.ts +417 -0
  240. package/src/executors/bounded-exec/cpu-tokens.test.ts +269 -0
  241. package/src/executors/bounded-exec/cpu-tokens.ts +177 -0
  242. package/src/executors/bounded-exec/disk-lease.test.ts +185 -0
  243. package/src/executors/bounded-exec/disk-lease.ts +139 -0
  244. package/src/executors/bounded-exec/executor-host.test.ts +778 -0
  245. package/src/executors/bounded-exec/executor.test.ts +1116 -63
  246. package/src/executors/bounded-exec/executor.ts +565 -67
  247. package/src/executors/bounded-exec/gateway-lease.ts +176 -0
  248. package/src/executors/bounded-exec/hang-diagnostics.test.ts +285 -0
  249. package/src/executors/bounded-exec/hang-diagnostics.ts +283 -0
  250. package/src/executors/bounded-exec/progress.test.ts +79 -0
  251. package/src/executors/bounded-exec/progress.ts +118 -0
  252. package/src/executors/bounded-exec/ram-temp-fixtures.ts +12 -0
  253. package/src/executors/bounded-exec/ram-temp-held.test.ts +264 -0
  254. package/src/executors/bounded-exec/ram-temp-held.ts +242 -0
  255. package/src/executors/bounded-exec/ram-temp-host.test.ts +605 -0
  256. package/src/executors/bounded-exec/ram-temp.test.ts +674 -0
  257. package/src/executors/bounded-exec/ram-temp.ts +1918 -0
  258. package/src/executors/bounded-exec/schema.json +11 -5
  259. package/src/executors/bounded-exec/schema.ts +27 -11
  260. package/src/executors/bounded-exec/verdict.test.ts +440 -0
  261. package/src/executors/bounded-exec/verdict.ts +433 -0
  262. package/src/executors/shard-timings/executor.ts +36 -0
  263. package/src/executors/shard-timings/schema.json +21 -0
  264. package/src/executors/shard-timings/schema.ts +4 -0
  265. package/src/failure-summary.ts +119 -0
  266. package/src/generators/bounded-test-targets/generator.test.ts +4 -4
  267. package/src/generators/bun-test-tracing/generator.test.ts +2 -2
  268. package/src/generators/create-package/generator.test.ts +6 -0
  269. package/src/generators/create-package/generator.ts +6 -2
  270. package/src/host-controller-wiring.test.ts +31 -0
  271. package/src/index.test.ts +909 -295
  272. package/src/index.ts +441 -143
  273. package/src/linked-snapshots.nx.test.ts +172 -0
  274. package/src/managed-files/ci-workflow.ts +54 -13
  275. package/src/managed-files/files.ts +65 -9
  276. package/src/managed-files/forgejo-artifact.test.ts +395 -0
  277. package/src/managed-files/generator.test.ts +60 -1
  278. package/src/managed-files/json-edit.test.ts +216 -0
  279. package/src/managed-files/json-edit.ts +290 -0
  280. package/src/managed-files/managed-format-json.test.ts +308 -0
  281. package/src/managed-files/managed-format.ts +90 -2
  282. package/src/managed-files/pr-preview-cleanup-workflow.ts +69 -3
  283. package/src/managed-files/publish-workflow.ts +285 -67
  284. package/src/managed-files/repo-path.test.ts +129 -0
  285. package/src/managed-files/trace-db-artifact.test.ts +7 -0
  286. package/src/managed-files/tree.ts +11 -3
  287. package/src/manifest-hash.ts +2 -6
  288. package/src/nextest-code-bound.test.ts +155 -0
  289. package/src/nextest-code-bound.ts +195 -0
  290. package/src/nextest-extraction.test.ts +37 -5
  291. package/src/nextest-extraction.ts +51 -9
  292. package/src/nextest-partitions.test.ts +427 -82
  293. package/src/nx-cache-bound.test.ts +5 -10
  294. package/src/nx-cache-restore-mtime.test.ts +170 -0
  295. package/src/nx-daemon-claim.test.ts +277 -0
  296. package/src/nx-daemon-idle-cpu.test.ts +81 -0
  297. package/src/nx-daemon-idle-policy.test.ts +51 -0
  298. package/src/nx-daemon-ignore-files.test.ts +210 -0
  299. package/src/nx-daemon-root-normalization.test.ts +105 -0
  300. package/src/nx-daemon-validity.test.ts +925 -0
  301. package/src/nx-dot-input-policy.test.ts +353 -0
  302. package/src/nx-failure-life-cycles.test.ts +207 -0
  303. package/src/nx-files-archive-racy.test.ts +97 -0
  304. package/src/nx-foreign-workspace-env.test.ts +329 -0
  305. package/src/nx-incomplete-run-summary.test.ts +70 -0
  306. package/src/nx-plugin-load-errors.test.ts +120 -0
  307. package/src/nx-project-resolution-cache.test.ts +176 -0
  308. package/src/nx-raw-inputs.test.ts +166 -0
  309. package/src/nx-resident-graph-workers.test.ts +7 -16
  310. package/src/nx-run-information.test.ts +118 -0
  311. package/src/nx-skipped-task-exit.test.ts +180 -0
  312. package/src/nx-state-location.test.ts +63 -0
  313. package/src/nx-store-resolution.test.ts +26 -25
  314. package/src/nx-task-graph-cycles.test.ts +148 -0
  315. package/src/nx-task-output-lease.test.ts +414 -0
  316. package/src/nx-use-local.test.ts +103 -0
  317. package/src/package-target-policy.ts +3 -6
  318. package/src/release-config-policy.ts +3 -6
  319. package/src/runtime-input.test.ts +215 -0
  320. package/src/runtime-input.ts +17 -0
  321. package/src/rust-tokens.ts +78 -0
  322. package/src/serial-group-wiring.test.ts +326 -0
  323. package/src/task-history-namespace.test.ts +87 -89
  324. package/src/task-results.test.ts +226 -0
  325. package/src/task-results.ts +75 -0
  326. package/src/test-program.test.ts +303 -0
  327. package/src/test-program.ts +341 -0
  328. package/src/test-timings.test.ts +240 -0
  329. package/src/test-timings.ts +311 -0
  330. package/src/test-walk-policy.test.ts +585 -0
  331. package/src/test-walk-policy.ts +731 -0
  332. package/src/testing.test.ts +509 -0
  333. package/src/testing.ts +922 -0
  334. package/src/type-guards.ts +4 -0
  335. package/src/typecheck-test-policy.test.ts +496 -11
  336. package/src/typecheck-test-policy.ts +137 -103
  337. package/src/workspace-config-policy.test.ts +212 -13
  338. package/src/workspace-config-policy.ts +101 -73
  339. package/src/workspace-index.ts +18 -0
  340. package/src/workspace-manifest.ts +41 -0
  341. package/test-timings.json +85 -30
  342. package/managed/raw/tooling/direnv/inherited-devenv.ts +0 -665
  343. package/managed/raw/tooling/direnv/shared-caches.sh +0 -53
@@ -0,0 +1,3 @@
1
+ /** A plain object: its keys are known to exist, its values are not known to be anything. */
2
+ export declare function isRecord(value: unknown): value is Record<string, unknown>;
3
+ //# sourceMappingURL=type-guards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-guards.d.ts","sourceRoot":"","sources":["../src/type-guards.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzE"}
@@ -0,0 +1,4 @@
1
+ /** A plain object: its keys are known to exist, its values are not known to be anything. */
2
+ export function isRecord(value) {
3
+ return value !== null && typeof value === 'object' && !Array.isArray(value);
4
+ }
@@ -1,5 +1,6 @@
1
1
  import type { Tree } from 'nx/src/devkit-exports.js';
2
2
  import type { ManagedFile } from './managed-files/tree.js';
3
+ import { type TestProgram } from './test-program.js';
3
4
  import type { NxPolicyIssue } from './workspace-config-policy.js';
4
5
  export type TestRunner = 'bun' | 'vitest';
5
6
  /**
@@ -22,17 +23,19 @@ export declare function checkTsconfigTestReference(projectTsconfig: Record<strin
22
23
  */
23
24
  export declare function applyTypecheckTestDefaults(tsconfigTest: Record<string, unknown>, options: {
24
25
  testRunners: ReadonlySet<TestRunner>;
25
- tsconfigLibExtends?: string | string[];
26
+ /** What the file extends when it names nothing. */
27
+ testExtends: string | string[];
26
28
  libCompilerOptions?: Record<string, unknown>;
27
29
  referencePaths: string[];
28
- /** The file did not exist: a fresh program gets the src-test globs. */
30
+ /** Where the project's sources and tests are: the include is derived from it. */
31
+ program: TestProgram;
32
+ /** The file did not exist: a fresh program gets the globs of where the tests live. */
29
33
  isNew?: boolean;
30
34
  }): boolean;
31
35
  /**
32
- * Remove the ./tsconfig.test.json reference from a tsconfig.json object.
33
- * Returns whether anything changed.
36
+ * Remove the ./tsconfig.test.json reference from a tsconfig.json object (in-memory mutation).
34
37
  */
35
- export declare function removeTsconfigTestReference(projectTsconfig: Record<string, unknown>): boolean;
38
+ export declare function removeTsconfigTestReference(projectTsconfig: Record<string, unknown>): void;
36
39
  /**
37
40
  * Check all workspace packages for typecheck test policy compliance using an Nx Tree.
38
41
  */
@@ -1 +1 @@
1
- {"version":3,"file":"typecheck-test-policy.d.ts","sourceRoot":"","sources":["../src/typecheck-test-policy.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAIrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,QAAQ,CAAC;AAI1C;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvC,WAAW,CAAC,UAAU,CAAC,CAqDzB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,YAAY,EAAE,MAAM,CAAC,MAAM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I,GAAG,aAAa,EAAE,CA4CxE;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,IAAI,GAAG,WAAW,EAAE,CAiElE;AAiED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,EAAE,CAuEtE"}
@@ -1,9 +1,12 @@
1
1
  import * as _assertGuard_1 from "typia/lib/internal/_assertGuard";
2
- import { existsSync, readdirSync, readFileSync } from 'node:fs';
3
- import { dirname, join, relative } from 'node:path';
4
- import { getProjects, readJson, readProjectConfiguration } from 'nx/src/devkit-exports.js';
2
+ import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
3
+ import { dirname, join, posix, relative } from 'node:path';
4
+ import { getProjects, parseJson, readJson, readProjectConfiguration } from 'nx/src/devkit-exports.js';
5
5
  import typia from 'typia';
6
- import { ManagedContentConflict } from './managed-files/managed-content.js';
6
+ import { editJsonText } from './managed-files/json-edit.js';
7
+ import { formatJsonWithBiome, jsonFileText } from './managed-files/managed-format.js';
8
+ import { includeGlobsFor, listTypeScriptSources, testProgramFault, } from './test-program.js';
9
+ import { isRecord } from './type-guards.js';
7
10
  const workspaceDependencyFields = ['dependencies', 'devDependencies', 'peerDependencies', 'optionalDependencies'];
8
11
  /**
9
12
  * Detect test runners from a package.json object and optional project targets
@@ -131,7 +134,7 @@ export function checkTsconfigTestReference(projectTsconfig, packagePath) {
131
134
  export function applyTypecheckTestDefaults(tsconfigTest, options) {
132
135
  let changed = !Object.hasOwn(tsconfigTest, 'extends');
133
136
  if (changed)
134
- tsconfigTest.extends = options.tsconfigLibExtends ?? '../../tsconfig.base.json';
137
+ tsconfigTest.extends = options.testExtends;
135
138
  const compilerOptions = getOrCreateRecord(tsconfigTest, 'compilerOptions');
136
139
  // Fill from the lib tsconfig only what the test program has NOT declared. A
137
140
  // test program that names its own `lib` is stating a fact the lib program
@@ -170,18 +173,13 @@ export function applyTypecheckTestDefaults(tsconfigTest, options) {
170
173
  // A test program that declares no `include` inherits one from `extends`
171
174
  // (a package keeping its suites in `test/` alongside src, tooling and
172
175
  // scripts as one program). Minting `include` there REPLACES the inherited
173
- // set with globs that match nothing, and a program of zero files passes the
174
- // gate by compiling nothing. Only a program that already declares `include`,
175
- // or a new file, gets the src-test globs merged in.
176
+ // set with globs that may match nothing, and a program of zero files passes
177
+ // the gate by compiling nothing. Only a program that already declares
178
+ // `include`, or a new file, gets globs merged in, and they come from where
179
+ // the project's tests live (`includeGlobsFor`), not from a fixed `src/`.
176
180
  if (options.isNew || Object.hasOwn(tsconfigTest, 'include')) {
177
181
  changed =
178
- mergeStringListProperty(tsconfigTest, 'include', [
179
- 'src/**/*.test.ts',
180
- 'src/**/*.spec.ts',
181
- 'src/**/__tests__/**/*.ts',
182
- 'src/**/__tests__/**/*.tsx',
183
- 'src/test-suite-tracer.ts',
184
- ]) || changed;
182
+ mergeStringListProperty(tsconfigTest, 'include', includeGlobsFor(options.program, tsconfigTest, options.isNew === true)) || changed;
185
183
  }
186
184
  for (const referencePath of options.referencePaths) {
187
185
  changed = addTsconfigReference(tsconfigTest, referencePath) || changed;
@@ -189,16 +187,14 @@ export function applyTypecheckTestDefaults(tsconfigTest, options) {
189
187
  return changed;
190
188
  }
191
189
  /**
192
- * Remove the ./tsconfig.test.json reference from a tsconfig.json object.
193
- * Returns whether anything changed.
190
+ * Remove the ./tsconfig.test.json reference from a tsconfig.json object (in-memory mutation).
194
191
  */
195
192
  export function removeTsconfigTestReference(projectTsconfig) {
196
193
  if (!projectTsconfigHasTestReference(projectTsconfig)) {
197
- return false;
194
+ return;
198
195
  }
199
196
  const references = Array.isArray(projectTsconfig.references) ? projectTsconfig.references : [];
200
197
  projectTsconfig.references = references.filter((entry) => !isRecord(entry) || entry.path !== './tsconfig.test.json');
201
- return true;
202
198
  }
203
199
  /**
204
200
  * Check all workspace packages for typecheck test policy compliance using an Nx Tree.
@@ -230,6 +226,10 @@ export function checkTypecheckTestPolicyTree(tree) {
230
226
  // Check tsconfig.test.json contents
231
227
  const tsconfigTest = readJson(tree, tsconfigTestPath);
232
228
  issues.push(...checkTypecheckTestConfig(tsconfigTest, config.root));
229
+ const fault = testProgramFault(treeProgram(tree, config.root), tsconfigTest);
230
+ if (fault !== null) {
231
+ issues.push({ path: tsconfigTestPath, message: testProgramFaultMessage(config.root, testRunners, fault) });
232
+ }
233
233
  // Check tsconfig.json reference
234
234
  const tsconfigPath = `${config.root}/tsconfig.json`;
235
235
  if (tree.exists(tsconfigPath)) {
@@ -265,37 +265,96 @@ export function renderTypecheckTestFiles(tree) {
265
265
  // Read lib tsconfig for extends and compiler options
266
266
  const libTsconfigPath = `${config.root}/tsconfig.lib.json`;
267
267
  const libTsconfig = tree.exists(libTsconfigPath) ? readJson(tree, libTsconfigPath) : null;
268
- const tsconfigLibExtends = tsconfigExtends(libTsconfig) ?? '../../tsconfig.base.json';
268
+ // The lib program's base, else the workspace tsconfig.base.json as reached
269
+ // from this project's root: one level up from `tooling`, two from `packages/app`.
270
+ const testExtends = tsconfigExtends(libTsconfig) ?? posix.relative(config.root, 'tsconfig.base.json');
269
271
  const libCompilerOptions = libTsconfig ? recordProperty(libTsconfig, 'compilerOptions') : null;
270
272
  // Collect reference paths
271
273
  const referencePaths = collectReferencePathsTree(tree, config.root, pkg, workspacePackages);
272
- const changed = applyTypecheckTestDefaults(tsconfigTest, {
274
+ const program = treeProgram(tree, config.root);
275
+ applyTypecheckTestDefaults(tsconfigTest, {
273
276
  testRunners,
274
- tsconfigLibExtends,
277
+ testExtends,
275
278
  libCompilerOptions: libCompilerOptions ?? undefined,
276
279
  referencePaths,
280
+ program,
277
281
  isNew,
278
282
  });
279
- files.push(renderTsconfig(tree, tsconfigTestPath, tsconfigTest, changed || isNew));
283
+ // A program that would select none of the project's tests is not written: it would typecheck
284
+ // nothing and pass. It does not block the rest of the update either; `smoo monorepo check`
285
+ // reports the project, and the next update writes the file once a test exists to select.
286
+ const fault = testProgramFault(program, tsconfigTest);
287
+ files.push(fault === null
288
+ ? renderTsconfig(tree, tsconfigTestPath, tsconfigTest)
289
+ : {
290
+ target: tsconfigTestPath,
291
+ content: null,
292
+ skipReason: testProgramFaultMessage(config.root, testRunners, fault),
293
+ });
280
294
  // Remove test reference from tsconfig.json
281
295
  const tsconfigPath = `${config.root}/tsconfig.json`;
282
296
  if (tree.exists(tsconfigPath)) {
283
297
  const tsconfig = readJson(tree, tsconfigPath);
284
- files.push(renderTsconfig(tree, tsconfigPath, tsconfig, removeTsconfigTestReference(tsconfig)));
298
+ removeTsconfigTestReference(tsconfig);
299
+ files.push(renderTsconfig(tree, tsconfigPath, tsconfig));
285
300
  }
286
301
  }
287
302
  return files;
288
303
  }
289
- function renderTsconfig(tree, target, config, changed) {
304
+ /**
305
+ * The bytes a tsconfig the policy touches should have. A file that does not exist is rendered whole. One that does
306
+ * is edited where the policy changed it, so what its authors wrote beside those fields (the comments explaining why
307
+ * a program extends what it extends) survives, and is then laid out as the commit hook would leave it. A policy that
308
+ * changes nothing leaves the file's bytes alone.
309
+ */
310
+ function renderTsconfig(tree, target, after) {
311
+ const path = join(tree.root, target);
290
312
  const current = tree.read(target, 'utf8');
291
- if (!changed)
292
- return { target, content: current };
293
- // A documented config cannot survive JSON.stringify. Preserve its reasoning
294
- // and refuse before the shared generator stages or flushes any managed file.
295
- if (current !== null && hasJsonComments(current)) {
296
- throw new ManagedContentConflict(`${target} carries comments a rewrite would delete; apply the no-emit test typecheck policy by hand`);
297
- }
298
- return { target, content: `${JSON.stringify(config, null, 2)}\n` };
313
+ if (current === null)
314
+ return { target, content: jsonFileText(path, after) };
315
+ let edited;
316
+ try {
317
+ edited = editJsonText(current, after);
318
+ }
319
+ catch (error) {
320
+ throw new Error(`${target}: the policy's change could not be applied to the existing file's text`, {
321
+ cause: error,
322
+ });
323
+ }
324
+ return { target, content: edited === current ? current : formatJsonWithBiome(path, edited) };
325
+ }
326
+ function treeProgram(tree, projectRoot) {
327
+ return {
328
+ projectRoot,
329
+ files: listTypeScriptSources(tree, projectRoot),
330
+ readConfig: (path) => (tree.exists(path) ? readJson(tree, path) : null),
331
+ };
332
+ }
333
+ function diskProgram(root, projectRoot) {
334
+ const disk = {
335
+ children: (directory) => readdirSync(join(root, directory)),
336
+ isFile: (path) => {
337
+ try {
338
+ return statSync(join(root, path)).isFile();
339
+ }
340
+ catch {
341
+ return false;
342
+ }
343
+ },
344
+ };
345
+ return {
346
+ projectRoot,
347
+ files: listTypeScriptSources(disk, projectRoot),
348
+ readConfig: (path) => readJsonObject(join(root, path)),
349
+ };
350
+ }
351
+ function testProgramFaultMessage(projectRoot, testRunners, fault) {
352
+ const selection = fault.kind === 'no-tests'
353
+ ? 'matches no file (the project has no test file)'
354
+ : `matches no file of its tests (for example ${fault.tests[0]})`;
355
+ return (`${projectRoot}: tsconfig.test.json ${selection}, but the project has a ${formatTestRunnerList(testRunners)} target. ` +
356
+ 'A test program that selects none of its tests typechecks nothing and still passes. ' +
357
+ 'Tests are *.test.ts and *.spec.ts files (or files under __tests__/) under src/, or in a directory its include names.');
299
358
  }
300
359
  /**
301
360
  * Check all workspace packages for typecheck test policy compliance.
@@ -338,17 +397,23 @@ export function checkTypecheckTestPolicy(root) {
338
397
  if (tsconfig) {
339
398
  const absoluteIssues = checkTypecheckTestConfig(tsconfig, join(root, packagePath));
340
399
  issues.push(...absoluteIssues);
400
+ const program = diskProgram(root, packagePath);
401
+ const fault = testProgramFault(program, tsconfig);
402
+ if (fault !== null) {
403
+ issues.push({ path: tsconfigTestPath, message: testProgramFaultMessage(packagePath, testRunners, fault) });
404
+ }
341
405
  if (absoluteIssues.length === 0) {
342
406
  const libTsconfig = readJsonObject(join(root, packagePath, 'tsconfig.lib.json'));
343
- const tsconfigLibExtends = tsconfigExtends(libTsconfig) ?? '../../tsconfig.base.json';
407
+ const testExtends = tsconfigExtends(libTsconfig) ?? posix.relative(packagePath, 'tsconfig.base.json');
344
408
  const libCompilerOptions = libTsconfig ? recordProperty(libTsconfig, 'compilerOptions') : null;
345
409
  const referencePaths = collectTsconfigTestReferencePaths(root, packagePath, pkg, workspaceNames);
346
410
  const normalized = structuredClone(tsconfig);
347
411
  if (applyTypecheckTestDefaults(normalized, {
348
412
  testRunners,
349
- tsconfigLibExtends,
413
+ testExtends,
350
414
  libCompilerOptions: libCompilerOptions ?? undefined,
351
415
  referencePaths,
416
+ program,
352
417
  })) {
353
418
  issues.push({
354
419
  path: tsconfigTestPath,
@@ -481,6 +546,13 @@ function listWorkspacePackageJsonPaths(root) {
481
546
  : [];
482
547
  const paths = [];
483
548
  for (const pattern of workspacePatterns) {
549
+ if (!pattern.includes('*')) {
550
+ // A workspace named by path (`tooling`) is a package like any `packages/*` member.
551
+ const packageJsonPath = join(root, pattern, 'package.json');
552
+ if (existsSync(packageJsonPath))
553
+ paths.push(packageJsonPath);
554
+ continue;
555
+ }
484
556
  if (!pattern.endsWith('/*')) {
485
557
  continue;
486
558
  }
@@ -558,21 +630,18 @@ function collectTsconfigTestReferencePaths(root, packagePath, pkg, workspaceName
558
630
  return paths;
559
631
  }
560
632
  /**
561
- * Read a tsconfig or package.json. tsconfig files are JSONC — TypeScript
562
- * permits comments and trailing commas — so a plain `JSON.parse` fails on a
563
- * documented one. Returning null there meant "file absent", and the caller
564
- * regenerated it from scratch: a `lib` the test program declared, an
565
- * `exclude`, an extra `include` glob and every comment explaining them
566
- * disappeared on the next update. Comments are stripped for parsing only;
567
- * renderTsconfig refuses a policy repair that would discard them.
633
+ * Read a tsconfig or package.json. tsconfig files are JSONC — TypeScript permits comments and trailing commas — so a
634
+ * plain `JSON.parse` fails on a documented one. Returning null there meant "file absent", and the caller regenerated
635
+ * it from scratch: a `lib` the test program declared, an `exclude`, an extra `include` glob and every comment
636
+ * explaining them disappeared on the next update. The text is parsed as JSONC; `renderTsconfig` edits the text, so
637
+ * what was parsed past is not lost.
568
638
  */
569
639
  function readJsonObject(path) {
570
640
  if (!existsSync(path)) {
571
641
  return null;
572
642
  }
573
- const text = readFileSync(path, 'utf8');
574
643
  try {
575
- const parsed = JSON.parse(stripJsonComments(text));
644
+ const parsed = parseJson(readFileSync(path, 'utf8'));
576
645
  return isRecord(parsed) ? parsed : null;
577
646
  }
578
647
  catch (error) {
@@ -581,62 +650,6 @@ function readJsonObject(path) {
581
650
  throw new Error(`${path} is not valid JSON/JSONC: ${error instanceof Error ? error.message : String(error)}`);
582
651
  }
583
652
  }
584
- /** Whether the file carries comments a rewrite would destroy. */
585
- function hasJsonComments(text) {
586
- return stripJsonComments(text) !== text;
587
- }
588
- /**
589
- * Remove `//` and block comments outside string literals, and trailing commas.
590
- * Small on purpose: the alternative is a JSONC dependency in a plugin whose
591
- * only JSONC inputs are tsconfig files.
592
- */
593
- function stripJsonComments(text) {
594
- let output = '';
595
- let inString = false;
596
- let escaped = false;
597
- let index = 0;
598
- while (index < text.length) {
599
- const char = text[index];
600
- if (inString) {
601
- output += char;
602
- if (escaped) {
603
- escaped = false;
604
- }
605
- else if (char === '\\') {
606
- escaped = true;
607
- }
608
- else if (char === '"') {
609
- inString = false;
610
- }
611
- index += 1;
612
- continue;
613
- }
614
- if (char === '"') {
615
- inString = true;
616
- output += char;
617
- index += 1;
618
- continue;
619
- }
620
- if (char === '/' && text[index + 1] === '/') {
621
- while (index < text.length && text[index] !== '\n')
622
- index += 1;
623
- continue;
624
- }
625
- if (char === '/' && text[index + 1] === '*') {
626
- index += 2;
627
- while (index < text.length && !(text[index] === '*' && text[index + 1] === '/'))
628
- index += 1;
629
- index += 2;
630
- continue;
631
- }
632
- output += char;
633
- index += 1;
634
- }
635
- return output.replace(/,(\s*[}\]])/g, '$1');
636
- }
637
- function isRecord(value) {
638
- return value !== null && typeof value === 'object' && !Array.isArray(value);
639
- }
640
653
  /** TypeScript 5 accepts ordered base-config arrays as well as a single base. */
641
654
  function tsconfigExtends(config) {
642
655
  return (() => {
@@ -27,6 +27,14 @@ export declare function isBuildOutputTargetName(name: string): boolean;
27
27
  * test suite into `build`, so the rule is the CLASS, not one namespace.
28
28
  */
29
29
  export declare function isTestRunnerTargetName(name: string): boolean;
30
+ /**
31
+ * Every checkout keeps its Nx state in its own `.nx` (specs/cowshed/16_build_volumes.md, "Every checkout has exactly
32
+ * one Nx state"). With no `NX_*_DIRECTORY` set, as in a host shell, the pinned Nx 23.2.1 otherwise moves the task cache
33
+ * and its database to a per-user `~/.nx/<id>` keyed by the repository's remote (`utils/cache-directory.js`,
34
+ * `computeSharedDataLocation`), shared by every checkout of the repository. A configured `cacheDirectory` keeps both
35
+ * local: the cache here, the task database in Nx's default `.nx/workspace-data`. nx.json has no key for the latter.
36
+ */
37
+ export declare const CHECKOUT_NX_CACHE_DIRECTORY = ".nx/cache";
30
38
  /**
31
39
  * Check workspace config policy on an in-memory nx.json object.
32
40
  */
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-config-policy.d.ts","sourceRoot":"","sources":["../src/workspace-config-policy.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAKrD,eAAO,MAAM,4BAA4B,0CAA0C,CAAC;AAEpF,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,yBAAyB,YACpC,MAAM,EACN,OAAO,EACP,QAAQ,EACR,OAAO,EACP,WAAW,EACX,UAAU,EACV,QAAQ,EACR,OAAO,EACP,QAAQ,CACA,CAAC;AAEX,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAI/B;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAI5D;AAgBD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAA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