@convesoft/nx-rust 0.0.0-stage → 1.0.0-rc.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 (391) hide show
  1. package/LICENSE-APACHE +201 -0
  2. package/LICENSE-MIT +21 -0
  3. package/README.md +48 -2
  4. package/executors.json +35 -0
  5. package/generators.json +19 -0
  6. package/package.json +26 -4
  7. package/src/cargo/build-settings.d.ts +54 -0
  8. package/src/cargo/build-settings.js +93 -0
  9. package/src/cargo/build-settings.js.map +1 -0
  10. package/src/cargo/configured-runner.d.ts +36 -0
  11. package/src/cargo/configured-runner.js +99 -0
  12. package/src/cargo/configured-runner.js.map +1 -0
  13. package/src/cargo/configured-tools.d.ts +35 -0
  14. package/src/cargo/configured-tools.js +46 -0
  15. package/src/cargo/configured-tools.js.map +1 -0
  16. package/src/cargo/dep-info-basedir.d.ts +18 -0
  17. package/src/cargo/dep-info-basedir.js +38 -0
  18. package/src/cargo/dep-info-basedir.js.map +1 -0
  19. package/src/cargo/directories.d.ts +40 -0
  20. package/src/cargo/directories.js +89 -0
  21. package/src/cargo/directories.js.map +1 -0
  22. package/src/cargo/host-triple.d.ts +7 -0
  23. package/src/cargo/host-triple.js +21 -0
  24. package/src/cargo/host-triple.js.map +1 -0
  25. package/src/cargo/lockfile.d.ts +63 -0
  26. package/src/cargo/lockfile.js +157 -0
  27. package/src/cargo/lockfile.js.map +1 -0
  28. package/src/cargo/metadata.d.ts +112 -0
  29. package/src/cargo/metadata.js +37 -0
  30. package/src/cargo/metadata.js.map +1 -0
  31. package/src/cargo/package-specs.d.ts +54 -0
  32. package/src/cargo/package-specs.js +109 -0
  33. package/src/cargo/package-specs.js.map +1 -0
  34. package/src/cargo/paths-crates.d.ts +27 -0
  35. package/src/cargo/paths-crates.js +69 -0
  36. package/src/cargo/paths-crates.js.map +1 -0
  37. package/src/cargo/print-artifact-folders.d.ts +1 -0
  38. package/src/cargo/print-artifact-folders.js +58 -0
  39. package/src/cargo/print-artifact-folders.js.map +1 -0
  40. package/src/cargo/redirections.d.ts +87 -0
  41. package/src/cargo/redirections.js +195 -0
  42. package/src/cargo/redirections.js.map +1 -0
  43. package/src/cargo/run-cargo.d.ts +31 -0
  44. package/src/cargo/run-cargo.js +75 -0
  45. package/src/cargo/run-cargo.js.map +1 -0
  46. package/src/cargo/target-triples.d.ts +98 -0
  47. package/src/cargo/target-triples.js +265 -0
  48. package/src/cargo/target-triples.js.map +1 -0
  49. package/src/cargo/version-req.d.ts +12 -0
  50. package/src/cargo/version-req.js +122 -0
  51. package/src/cargo/version-req.js.map +1 -0
  52. package/src/compatibility/cargo-version.d.ts +43 -0
  53. package/src/compatibility/cargo-version.js +83 -0
  54. package/src/compatibility/cargo-version.js.map +1 -0
  55. package/src/compatibility/nx-bridge.d.ts +312 -0
  56. package/src/compatibility/nx-bridge.js +407 -0
  57. package/src/compatibility/nx-bridge.js.map +1 -0
  58. package/src/compatibility/nx-version.d.ts +104 -0
  59. package/src/compatibility/nx-version.js +272 -0
  60. package/src/compatibility/nx-version.js.map +1 -0
  61. package/src/executors/affected-inputs.d.ts +29 -0
  62. package/src/executors/affected-inputs.js +259 -0
  63. package/src/executors/affected-inputs.js.map +1 -0
  64. package/src/executors/affected-run.d.ts +54 -0
  65. package/src/executors/affected-run.js +394 -0
  66. package/src/executors/affected-run.js.map +1 -0
  67. package/src/executors/affected.d.ts +239 -0
  68. package/src/executors/affected.js +589 -0
  69. package/src/executors/affected.js.map +1 -0
  70. package/src/executors/baseline-context.d.ts +85 -0
  71. package/src/executors/baseline-context.js +227 -0
  72. package/src/executors/baseline-context.js.map +1 -0
  73. package/src/executors/baseline.d.ts +123 -0
  74. package/src/executors/baseline.js +356 -0
  75. package/src/executors/baseline.js.map +1 -0
  76. package/src/executors/batch.d.ts +75 -0
  77. package/src/executors/batch.js +434 -0
  78. package/src/executors/batch.js.map +1 -0
  79. package/src/executors/build-records.d.ts +110 -0
  80. package/src/executors/build-records.js +267 -0
  81. package/src/executors/build-records.js.map +1 -0
  82. package/src/executors/cargo/executor.d.ts +28 -0
  83. package/src/executors/cargo/executor.js +58 -0
  84. package/src/executors/cargo/executor.js.map +1 -0
  85. package/src/executors/cargo/schema.json +54 -0
  86. package/src/executors/cargo-invocation.d.ts +81 -0
  87. package/src/executors/cargo-invocation.js +109 -0
  88. package/src/executors/cargo-invocation.js.map +1 -0
  89. package/src/executors/cargo-output.d.ts +212 -0
  90. package/src/executors/cargo-output.js +646 -0
  91. package/src/executors/cargo-output.js.map +1 -0
  92. package/src/executors/command.d.ts +318 -0
  93. package/src/executors/command.js +517 -0
  94. package/src/executors/command.js.map +1 -0
  95. package/src/executors/coverage-baseline.d.ts +23 -0
  96. package/src/executors/coverage-baseline.js +284 -0
  97. package/src/executors/coverage-baseline.js.map +1 -0
  98. package/src/executors/declared-options.d.ts +21 -0
  99. package/src/executors/declared-options.js +58 -0
  100. package/src/executors/declared-options.js.map +1 -0
  101. package/src/executors/digests.d.ts +94 -0
  102. package/src/executors/digests.js +190 -0
  103. package/src/executors/digests.js.map +1 -0
  104. package/src/executors/dotenv-check.d.ts +79 -0
  105. package/src/executors/dotenv-check.js +553 -0
  106. package/src/executors/dotenv-check.js.map +1 -0
  107. package/src/executors/group-invocations.d.ts +80 -0
  108. package/src/executors/group-invocations.js +253 -0
  109. package/src/executors/group-invocations.js.map +1 -0
  110. package/src/executors/group-run.d.ts +114 -0
  111. package/src/executors/group-run.js +591 -0
  112. package/src/executors/group-run.js.map +1 -0
  113. package/src/executors/groups.d.ts +113 -0
  114. package/src/executors/groups.js +285 -0
  115. package/src/executors/groups.js.map +1 -0
  116. package/src/executors/input-check.d.ts +52 -0
  117. package/src/executors/input-check.js +271 -0
  118. package/src/executors/input-check.js.map +1 -0
  119. package/src/executors/kept-files.d.ts +98 -0
  120. package/src/executors/kept-files.js +341 -0
  121. package/src/executors/kept-files.js.map +1 -0
  122. package/src/executors/lockfile/executor.d.ts +16 -0
  123. package/src/executors/lockfile/executor.js +37 -0
  124. package/src/executors/lockfile/executor.js.map +1 -0
  125. package/src/executors/lockfile/schema.json +50 -0
  126. package/src/executors/napi-build.d.ts +73 -0
  127. package/src/executors/napi-build.js +420 -0
  128. package/src/executors/napi-build.js.map +1 -0
  129. package/src/executors/nextest.d.ts +185 -0
  130. package/src/executors/nextest.js +498 -0
  131. package/src/executors/nextest.js.map +1 -0
  132. package/src/executors/nx-command.d.ts +95 -0
  133. package/src/executors/nx-command.js +205 -0
  134. package/src/executors/nx-command.js.map +1 -0
  135. package/src/executors/nx-task-files.d.ts +82 -0
  136. package/src/executors/nx-task-files.js +156 -0
  137. package/src/executors/nx-task-files.js.map +1 -0
  138. package/src/executors/print-test-mode.d.ts +1 -0
  139. package/src/executors/print-test-mode.js +25 -0
  140. package/src/executors/print-test-mode.js.map +1 -0
  141. package/src/executors/release-publish/executor.d.ts +24 -0
  142. package/src/executors/release-publish/executor.js +165 -0
  143. package/src/executors/release-publish/executor.js.map +1 -0
  144. package/src/executors/release-publish/schema.json +30 -0
  145. package/src/executors/run/executor.d.ts +12 -0
  146. package/src/executors/run/executor.js +27 -0
  147. package/src/executors/run/executor.js.map +1 -0
  148. package/src/executors/run/schema.json +45 -0
  149. package/src/executors/runner-script.d.ts +12 -0
  150. package/src/executors/runner-script.js +22 -0
  151. package/src/executors/runner-script.js.map +1 -0
  152. package/src/executors/runtime-input-check.d.ts +24 -0
  153. package/src/executors/runtime-input-check.js +87 -0
  154. package/src/executors/runtime-input-check.js.map +1 -0
  155. package/src/executors/shared-artifacts.d.ts +44 -0
  156. package/src/executors/shared-artifacts.js +132 -0
  157. package/src/executors/shared-artifacts.js.map +1 -0
  158. package/src/executors/split-words.d.ts +24 -0
  159. package/src/executors/split-words.js +111 -0
  160. package/src/executors/split-words.js.map +1 -0
  161. package/src/executors/stage.d.ts +163 -0
  162. package/src/executors/stage.js +526 -0
  163. package/src/executors/stage.js.map +1 -0
  164. package/src/executors/staged-run.d.ts +24 -0
  165. package/src/executors/staged-run.js +110 -0
  166. package/src/executors/staged-run.js.map +1 -0
  167. package/src/executors/task-env.d.ts +271 -0
  168. package/src/executors/task-env.js +494 -0
  169. package/src/executors/task-env.js.map +1 -0
  170. package/src/executors/task-execution.d.ts +61 -0
  171. package/src/executors/task-execution.js +122 -0
  172. package/src/executors/task-execution.js.map +1 -0
  173. package/src/executors/task-guards.d.ts +112 -0
  174. package/src/executors/task-guards.js +430 -0
  175. package/src/executors/task-guards.js.map +1 -0
  176. package/src/executors/task-options.d.ts +114 -0
  177. package/src/executors/task-options.js +258 -0
  178. package/src/executors/task-options.js.map +1 -0
  179. package/src/executors/task.d.ts +166 -0
  180. package/src/executors/task.js +520 -0
  181. package/src/executors/task.js.map +1 -0
  182. package/src/executors/test-mode.d.ts +182 -0
  183. package/src/executors/test-mode.js +391 -0
  184. package/src/executors/test-mode.js.map +1 -0
  185. package/src/executors/test-runner.d.ts +44 -0
  186. package/src/executors/test-runner.js +159 -0
  187. package/src/executors/test-runner.js.map +1 -0
  188. package/src/executors/test-steps.d.ts +109 -0
  189. package/src/executors/test-steps.js +535 -0
  190. package/src/executors/test-steps.js.map +1 -0
  191. package/src/executors/wasm-build.d.ts +56 -0
  192. package/src/executors/wasm-build.js +216 -0
  193. package/src/executors/wasm-build.js.map +1 -0
  194. package/src/generators/crate/binary.schema.json +28 -0
  195. package/src/generators/crate/crate.d.ts +24 -0
  196. package/src/generators/crate/crate.js +108 -0
  197. package/src/generators/crate/crate.js.map +1 -0
  198. package/src/generators/crate/enclosing-workspace.d.ts +25 -0
  199. package/src/generators/crate/enclosing-workspace.js +58 -0
  200. package/src/generators/crate/enclosing-workspace.js.map +1 -0
  201. package/src/generators/crate/library.schema.json +28 -0
  202. package/src/generators/init/graph-check.d.ts +81 -0
  203. package/src/generators/init/graph-check.js +299 -0
  204. package/src/generators/init/graph-check.js.map +1 -0
  205. package/src/generators/init/init.d.ts +23 -0
  206. package/src/generators/init/init.js +113 -0
  207. package/src/generators/init/init.js.map +1 -0
  208. package/src/generators/init/report.d.ts +19 -0
  209. package/src/generators/init/report.js +93 -0
  210. package/src/generators/init/report.js.map +1 -0
  211. package/src/generators/init/schema.json +9 -0
  212. package/src/graph/artifact-kinds.d.ts +29 -0
  213. package/src/graph/artifact-kinds.js +50 -0
  214. package/src/graph/artifact-kinds.js.map +1 -0
  215. package/src/graph/artifact-names.d.ts +97 -0
  216. package/src/graph/artifact-names.js +276 -0
  217. package/src/graph/artifact-names.js.map +1 -0
  218. package/src/graph/build-records.d.ts +74 -0
  219. package/src/graph/build-records.js +104 -0
  220. package/src/graph/build-records.js.map +1 -0
  221. package/src/graph/caching.d.ts +148 -0
  222. package/src/graph/caching.js +676 -0
  223. package/src/graph/caching.js.map +1 -0
  224. package/src/graph/collisions.d.ts +106 -0
  225. package/src/graph/collisions.js +156 -0
  226. package/src/graph/collisions.js.map +1 -0
  227. package/src/graph/computation-reports.d.ts +89 -0
  228. package/src/graph/computation-reports.js +216 -0
  229. package/src/graph/computation-reports.js.map +1 -0
  230. package/src/graph/declared-files.d.ts +190 -0
  231. package/src/graph/declared-files.js +600 -0
  232. package/src/graph/declared-files.js.map +1 -0
  233. package/src/graph/discovery.d.ts +175 -0
  234. package/src/graph/discovery.js +656 -0
  235. package/src/graph/discovery.js.map +1 -0
  236. package/src/graph/edges.d.ts +25 -0
  237. package/src/graph/edges.js +94 -0
  238. package/src/graph/edges.js.map +1 -0
  239. package/src/graph/entries.d.ts +83 -0
  240. package/src/graph/entries.js +259 -0
  241. package/src/graph/entries.js.map +1 -0
  242. package/src/graph/inputs.d.ts +420 -0
  243. package/src/graph/inputs.js +746 -0
  244. package/src/graph/inputs.js.map +1 -0
  245. package/src/graph/lockfile-task.d.ts +74 -0
  246. package/src/graph/lockfile-task.js +105 -0
  247. package/src/graph/lockfile-task.js.map +1 -0
  248. package/src/graph/names.d.ts +41 -0
  249. package/src/graph/names.js +34 -0
  250. package/src/graph/names.js.map +1 -0
  251. package/src/graph/napi.d.ts +107 -0
  252. package/src/graph/napi.js +206 -0
  253. package/src/graph/napi.js.map +1 -0
  254. package/src/graph/nx-glob.d.ts +36 -0
  255. package/src/graph/nx-glob.js +152 -0
  256. package/src/graph/nx-glob.js.map +1 -0
  257. package/src/graph/nx-internals.d.ts +57 -0
  258. package/src/graph/nx-internals.js +128 -0
  259. package/src/graph/nx-internals.js.map +1 -0
  260. package/src/graph/options.d.ts +32 -0
  261. package/src/graph/options.js +80 -0
  262. package/src/graph/options.js.map +1 -0
  263. package/src/graph/outputs.d.ts +75 -0
  264. package/src/graph/outputs.js +140 -0
  265. package/src/graph/outputs.js.map +1 -0
  266. package/src/graph/path-dependencies.d.ts +122 -0
  267. package/src/graph/path-dependencies.js +459 -0
  268. package/src/graph/path-dependencies.js.map +1 -0
  269. package/src/graph/plugin-package.d.ts +36 -0
  270. package/src/graph/plugin-package.js +132 -0
  271. package/src/graph/plugin-package.js.map +1 -0
  272. package/src/graph/plugin-version.d.ts +20 -0
  273. package/src/graph/plugin-version.js +153 -0
  274. package/src/graph/plugin-version.js.map +1 -0
  275. package/src/graph/projects.d.ts +141 -0
  276. package/src/graph/projects.js +182 -0
  277. package/src/graph/projects.js.map +1 -0
  278. package/src/graph/reached-projects.d.ts +46 -0
  279. package/src/graph/reached-projects.js +102 -0
  280. package/src/graph/reached-projects.js.map +1 -0
  281. package/src/graph/real-path.d.ts +47 -0
  282. package/src/graph/real-path.js +113 -0
  283. package/src/graph/real-path.js.map +1 -0
  284. package/src/graph/redirected-uses.d.ts +98 -0
  285. package/src/graph/redirected-uses.js +434 -0
  286. package/src/graph/redirected-uses.js.map +1 -0
  287. package/src/graph/registration.d.ts +121 -0
  288. package/src/graph/registration.js +233 -0
  289. package/src/graph/registration.js.map +1 -0
  290. package/src/graph/script-input.d.ts +46 -0
  291. package/src/graph/script-input.js +65 -0
  292. package/src/graph/script-input.js.map +1 -0
  293. package/src/graph/settings.d.ts +178 -0
  294. package/src/graph/settings.js +479 -0
  295. package/src/graph/settings.js.map +1 -0
  296. package/src/graph/target-defaults-causes.d.ts +33 -0
  297. package/src/graph/target-defaults-causes.js +202 -0
  298. package/src/graph/target-defaults-causes.js.map +1 -0
  299. package/src/graph/target-defaults-layers.d.ts +186 -0
  300. package/src/graph/target-defaults-layers.js +420 -0
  301. package/src/graph/target-defaults-layers.js.map +1 -0
  302. package/src/graph/target-defaults-meaning.d.ts +95 -0
  303. package/src/graph/target-defaults-meaning.js +292 -0
  304. package/src/graph/target-defaults-meaning.js.map +1 -0
  305. package/src/graph/target-defaults-report.d.ts +77 -0
  306. package/src/graph/target-defaults-report.js +242 -0
  307. package/src/graph/target-defaults-report.js.map +1 -0
  308. package/src/graph/target-defaults.d.ts +79 -0
  309. package/src/graph/target-defaults.js +425 -0
  310. package/src/graph/target-defaults.js.map +1 -0
  311. package/src/graph/target-fields.d.ts +16 -0
  312. package/src/graph/target-fields.js +134 -0
  313. package/src/graph/target-fields.js.map +1 -0
  314. package/src/graph/target-tables.d.ts +45 -0
  315. package/src/graph/target-tables.js +299 -0
  316. package/src/graph/target-tables.js.map +1 -0
  317. package/src/graph/targets.d.ts +367 -0
  318. package/src/graph/targets.js +404 -0
  319. package/src/graph/targets.js.map +1 -0
  320. package/src/graph/unification.d.ts +141 -0
  321. package/src/graph/unification.js +459 -0
  322. package/src/graph/unification.js.map +1 -0
  323. package/src/graph/unignored-directories.d.ts +25 -0
  324. package/src/graph/unignored-directories.js +89 -0
  325. package/src/graph/unignored-directories.js.map +1 -0
  326. package/src/graph/visibility.d.ts +17 -0
  327. package/src/graph/visibility.js +67 -0
  328. package/src/graph/visibility.js.map +1 -0
  329. package/src/graph/warnings.d.ts +38 -0
  330. package/src/graph/warnings.js +77 -0
  331. package/src/graph/warnings.js.map +1 -0
  332. package/src/graph/wasm.d.ts +56 -0
  333. package/src/graph/wasm.js +77 -0
  334. package/src/graph/wasm.js.map +1 -0
  335. package/src/index.d.ts +68 -0
  336. package/src/index.js +109 -0
  337. package/src/index.js.map +1 -0
  338. package/src/release/manifests.d.ts +95 -0
  339. package/src/release/manifests.js +164 -0
  340. package/src/release/manifests.js.map +1 -0
  341. package/src/release/places.d.ts +127 -0
  342. package/src/release/places.js +368 -0
  343. package/src/release/places.js.map +1 -0
  344. package/src/release/publish-cargo.d.ts +177 -0
  345. package/src/release/publish-cargo.js +351 -0
  346. package/src/release/publish-cargo.js.map +1 -0
  347. package/src/release/publish-crates.d.ts +124 -0
  348. package/src/release/publish-crates.js +242 -0
  349. package/src/release/publish-crates.js.map +1 -0
  350. package/src/release/publish-environments.d.ts +50 -0
  351. package/src/release/publish-environments.js +284 -0
  352. package/src/release/publish-environments.js.map +1 -0
  353. package/src/release/publish-messages.d.ts +66 -0
  354. package/src/release/publish-messages.js +273 -0
  355. package/src/release/publish-messages.js.map +1 -0
  356. package/src/release/publish-registry.d.ts +27 -0
  357. package/src/release/publish-registry.js +135 -0
  358. package/src/release/publish-registry.js.map +1 -0
  359. package/src/release/publish-settings.d.ts +26 -0
  360. package/src/release/publish-settings.js +56 -0
  361. package/src/release/publish-settings.js.map +1 -0
  362. package/src/release/publish.d.ts +59 -0
  363. package/src/release/publish.js +620 -0
  364. package/src/release/publish.js.map +1 -0
  365. package/src/release/repository.d.ts +73 -0
  366. package/src/release/repository.js +219 -0
  367. package/src/release/repository.js.map +1 -0
  368. package/src/release/requirements.d.ts +34 -0
  369. package/src/release/requirements.js +30 -0
  370. package/src/release/requirements.js.map +1 -0
  371. package/src/release/toml-edit.d.ts +67 -0
  372. package/src/release/toml-edit.js +453 -0
  373. package/src/release/toml-edit.js.map +1 -0
  374. package/src/release/version-actions.d.ts +133 -0
  375. package/src/release/version-actions.js +474 -0
  376. package/src/release/version-actions.js.map +1 -0
  377. package/src/release/version-checks.d.ts +21 -0
  378. package/src/release/version-checks.js +151 -0
  379. package/src/release/version-checks.js.map +1 -0
  380. package/src/release/version-lockfiles.d.ts +61 -0
  381. package/src/release/version-lockfiles.js +222 -0
  382. package/src/release/version-lockfiles.js.map +1 -0
  383. package/src/tools/napi-cli.d.ts +70 -0
  384. package/src/tools/napi-cli.js +63 -0
  385. package/src/tools/napi-cli.js.map +1 -0
  386. package/src/tools/optional-tools.d.ts +121 -0
  387. package/src/tools/optional-tools.js +303 -0
  388. package/src/tools/optional-tools.js.map +1 -0
  389. package/src/tools/print-napi-cli.d.ts +1 -0
  390. package/src/tools/print-napi-cli.js +24 -0
  391. package/src/tools/print-napi-cli.js.map +1 -0
@@ -0,0 +1,474 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.afterAllProjectsVersioned = afterAllProjectsVersioned;
4
+ const tslib_1 = require("tslib");
5
+ const devkit_1 = require("@nx/devkit");
6
+ const node_path_1 = require("node:path");
7
+ const release_1 = require("nx/release");
8
+ const manifests_1 = require("./manifests");
9
+ const places_1 = require("./places");
10
+ const repository_1 = require("./repository");
11
+ const requirements_1 = require("./requirements");
12
+ const version_checks_1 = require("./version-checks");
13
+ const version_lockfiles_1 = require("./version-lockfiles");
14
+ /**
15
+ * The version actions of every project configured for release, by project
16
+ * name: Nx constructs them for each such project before it versions any.
17
+ */
18
+ const configured = new Map();
19
+ /** The runs, by the tree that Nx hands to each method that writes. */
20
+ const runs = new WeakMap();
21
+ /**
22
+ * The latest run, for `calculateNewVersion`, which gets no tree. Nx calls
23
+ * `validate` with the run's tree before it works out any version.
24
+ */
25
+ let latestRun;
26
+ /**
27
+ * The project graph of the run, which Nx hands to `readDependencies` before
28
+ * it versions anything; the methods that get none use it.
29
+ */
30
+ let runGraph;
31
+ /** The repository of the run, once a method has read it. */
32
+ let runRepository;
33
+ /**
34
+ * The version actions that `nx release version` runs for each crate's
35
+ * project (`DES-RELEASE`): Nx works out the bumps, walks the dependents,
36
+ * writes the changelogs and makes the commit and tag, and these actions
37
+ * read and write the crates' `Cargo.toml`.
38
+ *
39
+ * - The current version comes from the crate's manifest, following
40
+ * `[workspace.package].version` where the crate inherits it; `registry`
41
+ * is not supported, and a crate without a version fails when Nx loads
42
+ * the actions, because Nx would replace a later error with its own.
43
+ * - The dependencies, which decide the dependents and the order of the
44
+ * release groups, come from the workspaces' `cargo metadata --no-deps`
45
+ * reports: normal and build dependencies that name a crate with a project
46
+ * by path and carry a version requirement (`ADR-RELEASE-DEPENDENTS`).
47
+ * - A new version is written once per crate, an inherited one once to
48
+ * `[workspace.package]`, and every requirement on the crate that names it
49
+ * by path is updated at the same time, as {@link requirementChange} says,
50
+ * wherever cargo reads one ({@link requirementsOn}). Only the version
51
+ * strings change (`replaceStrings`).
52
+ * - Every check runs before Nx writes any file: Nx keeps the changes in its
53
+ * tree until every release group is processed, and writes nothing when an
54
+ * action throws (`EVD-NX-24-VERSION-ACTIONS`).
55
+ * - Where Nx bumps a fixed group through an edge of the project graph, the
56
+ * output names the edge; where a crate of the release would get a new
57
+ * requirement on a bumped crate without a bump of its own, the run stops
58
+ * (nxr-5a9w1y).
59
+ */
60
+ // @mara implements DES-RELEASE
61
+ class CargoVersionActions extends release_1.VersionActions {
62
+ constructor(...args) {
63
+ super(...args);
64
+ this.validManifestFilenames = ["Cargo.toml"];
65
+ /**
66
+ * Nx's formatter leaves alone the manifests in {@link manifestsToUpdate},
67
+ * which lists every file that the actions change.
68
+ */
69
+ this.excludeManifestsFromFormatting = true;
70
+ /** Lines that `calculateNewVersion` found for the next `updateProjectVersion` to print. */
71
+ this.pendingLines = [];
72
+ configured.set(this.projectGraphNode.name, this);
73
+ }
74
+ /**
75
+ * Checks what Nx would otherwise report in its own words or not at all,
76
+ * for every project configured for release: that the project is a crate,
77
+ * that its manifest gives it a version, and that its current version is
78
+ * not to come from a registry.
79
+ */
80
+ init(tree) {
81
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
82
+ const crate = this.crate();
83
+ if (this.finalConfigForProject.currentVersionResolver === "registry") {
84
+ throw new manifests_1.ReleaseError(`The project "${this.projectGraphNode.name}" reads its current version from a registry ("currentVersionResolver": "registry"), which nx-rust does not support. Set "currentVersionResolver" to "disk", the default, which reads the version from ${crate.manifest}, or to "git-tag" in the release configuration of nx.json.`);
85
+ }
86
+ this.currentVersion(tree);
87
+ this.manifestsToUpdate = [
88
+ {
89
+ manifestPath: crate.manifest,
90
+ preserveLocalDependencyProtocols: this.finalConfigForProject.preserveLocalDependencyProtocols,
91
+ },
92
+ ];
93
+ });
94
+ }
95
+ /**
96
+ * Records the project as one of the run's and checks that the crates that
97
+ * share its inherited version are in its release group, which is fixed.
98
+ */
99
+ validate(tree) {
100
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
101
+ var _a;
102
+ runOf(tree).projects.add(this.projectGraphNode.name);
103
+ const repository = this.repository(tree);
104
+ const crate = this.releaseCrate(repository);
105
+ if ((0, manifests_1.crateVersion)((0, places_1.readDocument)(tree, repository, crate.manifest)).kind !== "inherited") {
106
+ return;
107
+ }
108
+ const sharing = (0, version_checks_1.inheritingCrates)(tree, repository, crate);
109
+ const group = this.releaseGroup;
110
+ const reasons = [];
111
+ if (group.projectsRelationship !== "fixed") {
112
+ reasons.push(`the release group "${group.name}" is ${group.projectsRelationship}`);
113
+ }
114
+ const byGroup = new Map();
115
+ for (const other of sharing) {
116
+ const otherGroup = groupOf(other.project);
117
+ if (other.project === undefined) {
118
+ reasons.push(`${other.name} has no Nx project`);
119
+ }
120
+ else if (otherGroup === undefined) {
121
+ reasons.push(`${other.name} is in no release group`);
122
+ }
123
+ else {
124
+ byGroup.set(otherGroup, [...((_a = byGroup.get(otherGroup)) !== null && _a !== void 0 ? _a : []), other.name]);
125
+ }
126
+ }
127
+ if (byGroup.size > 1) {
128
+ reasons.push((0, version_checks_1.sentenceList)([...byGroup].map(([name, crates]) => `${(0, version_checks_1.sentenceList)(crates)} ${crates.length === 1 ? "is" : "are"} in the release group "${name}"`)));
129
+ }
130
+ if (reasons.length > 0) {
131
+ throw new manifests_1.ReleaseError(`The crates ${(0, version_checks_1.sentenceList)(sharing.map((other) => other.name))} of the Cargo workspace ${crate.workspace.rootManifest} inherit version.workspace = true, so they share the one version in [workspace.package], and nx release version has to version them together, but ${(0, version_checks_1.sentenceList)(reasons)}. Put all of them into one release group with "projectsRelationship": "fixed" in nx.json.`);
132
+ }
133
+ });
134
+ }
135
+ readCurrentVersionFromSourceManifest(tree) {
136
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
137
+ return this.currentVersion(tree);
138
+ });
139
+ }
140
+ /** nx-rust reads no version from a registry; `init` has failed already where one is asked for. */
141
+ readCurrentVersionFromRegistry() {
142
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
143
+ return null;
144
+ });
145
+ }
146
+ /**
147
+ * The crates with a project that the crate depends on through a normal or
148
+ * build dependency with a version requirement, matched by the real path
149
+ * of their folders, in any of the repository's workspaces. A requirement
150
+ * of `*` in the report is looked up in the manifest, because cargo gives
151
+ * it also where the entry has no version (`EVD-CARGO-PUBLISH`).
152
+ */
153
+ readDependencies(tree, projectGraph) {
154
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
155
+ runGraph = projectGraph;
156
+ const repository = this.repository(tree);
157
+ const crate = this.releaseCrate(repository);
158
+ const targets = new Set();
159
+ for (const dependency of crate.dependencies) {
160
+ if (dependency.kind === "dev" || dependency.path === undefined) {
161
+ continue;
162
+ }
163
+ const target = repository.crateAt(dependency.path);
164
+ if ((target === null || target === void 0 ? void 0 : target.project) === undefined || target === crate || targets.has(target.project)) {
165
+ continue;
166
+ }
167
+ if (dependency.req !== "*" || (0, version_checks_1.writesRequirement)(tree, repository, crate, dependency)) {
168
+ targets.add(target.project);
169
+ }
170
+ }
171
+ return [...targets].map((target) => ({
172
+ source: this.projectGraphNode.name,
173
+ target,
174
+ type: "static",
175
+ }));
176
+ });
177
+ }
178
+ /**
179
+ * The crate's requirement on the crate of `dependencyProjectName`, as its
180
+ * manifest or the `[workspace.dependencies]` entry it inherits writes it,
181
+ * for Nx's record of the run; `null` where it has none of kind normal or
182
+ * build.
183
+ */
184
+ readCurrentVersionOfDependency(tree, projectGraph, dependencyProjectName) {
185
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
186
+ runGraph !== null && runGraph !== void 0 ? runGraph : (runGraph = projectGraph);
187
+ const repository = this.repository(tree);
188
+ const crate = this.releaseCrate(repository);
189
+ const target = repository.crateOfProject(dependencyProjectName);
190
+ if (target !== undefined) {
191
+ for (const entry of (0, places_1.memberEntries)(tree, repository, crate)) {
192
+ if ((entry.kind === "normal" || entry.kind === "build") &&
193
+ entry.folder === target.folder &&
194
+ entry.requirement !== undefined) {
195
+ return { currentVersion: entry.requirement, dependencyCollection: (0, manifests_1.tableName)(entry) };
196
+ }
197
+ }
198
+ }
199
+ return { currentVersion: null, dependencyCollection: null };
200
+ });
201
+ }
202
+ /**
203
+ * Names the edges through which Nx bumps a fixed group that has no bump of
204
+ * its own (nxr-5a9w1y, part 1), which Nx reports with the reason
205
+ * `DEPENDENCY_ACROSS_GROUPS_WAS_BUMPED` for each project of the group with
206
+ * such an edge; the lines come out with the project's version.
207
+ */
208
+ calculateNewVersion(currentVersion, newVersionInput, newVersionInputReason, newVersionInputReasonData, preid) {
209
+ const _super = Object.create(null, {
210
+ calculateNewVersion: { get: () => super.calculateNewVersion }
211
+ });
212
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
213
+ const result = yield _super.calculateNewVersion.call(this, currentVersion, newVersionInput, newVersionInputReason, newVersionInputReasonData, preid);
214
+ const run = latestRun;
215
+ if (newVersionInputReason === "DEPENDENCY_ACROSS_GROUPS_WAS_BUMPED" &&
216
+ run !== undefined &&
217
+ runGraph !== undefined &&
218
+ !run.named.has(this.projectGraphNode.name)) {
219
+ run.named.add(this.projectGraphNode.name);
220
+ this.pendingLines = (0, version_checks_1.graphBumpLines)(this.projectGraphNode.name, this.releaseGroup.name, run.versioned, runGraph, runRepository, groupOf);
221
+ }
222
+ return result;
223
+ });
224
+ }
225
+ /**
226
+ * Writes the new version, and updates every requirement on the crate
227
+ * wherever cargo reads one. Nothing is written when a check fails.
228
+ *
229
+ * @returns The lines that Nx prints for the crate.
230
+ */
231
+ updateProjectVersion(tree, newVersion) {
232
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
233
+ const run = runOf(tree);
234
+ const repository = this.repository(tree);
235
+ const crate = this.releaseCrate(repository);
236
+ const edits = new Map();
237
+ const addEdit = (file, edit) => { var _a; return edits.set(file, [...((_a = edits.get(file)) !== null && _a !== void 0 ? _a : []), edit]); };
238
+ const lines = this.pendingLines;
239
+ this.pendingLines = [];
240
+ if ((0, manifests_1.crateVersion)((0, places_1.readDocument)(tree, repository, crate.manifest)).kind === "inherited") {
241
+ const rootManifest = crate.workspace.rootManifest;
242
+ const sharing = (0, version_checks_1.inheritingCrates)(tree, repository, crate);
243
+ (0, version_checks_1.checkVersionedTogether)(run.projects, crate, sharing);
244
+ // Nx may bump a crate twice in a run (EVD-NX-24-VERSION-ACTIONS); the
245
+ // last version stays, as for a version of the crate's own.
246
+ if ((0, manifests_1.workspaceVersion)((0, places_1.readDocument)(tree, repository, rootManifest)) === newVersion) {
247
+ lines.push(`✍️ New version ${newVersion} is in [workspace.package] in ${rootManifest}`);
248
+ }
249
+ else {
250
+ addEdit(rootManifest, { path: manifests_1.workspaceVersionPath, value: newVersion });
251
+ lines.push(`✍️ New version ${newVersion} written to [workspace.package] in ${rootManifest}`);
252
+ }
253
+ }
254
+ else {
255
+ addEdit(crate.manifest, { path: manifests_1.packageVersionPath, value: newVersion });
256
+ lines.push(`✍️ New version ${newVersion} written to manifest: ${crate.manifest}`);
257
+ }
258
+ const failures = [];
259
+ const rewrites = [];
260
+ for (const requirement of (0, places_1.requirementsOn)(tree, repository, crate)) {
261
+ const place = `${requirement.file} [${requirement.table}]`;
262
+ const change = (0, requirements_1.requirementChange)(requirement.requirement, newVersion, this.preservesMatchingRequirements(requirement));
263
+ if (change.kind === "rewrite" && !requirement.inRepository) {
264
+ failures.push(`- "${requirement.requirement}" in ${place}, which lies outside the repository, where nx release version writes nothing; it has to become "${change.requirement}"`);
265
+ }
266
+ else if (change.kind === "rewrite") {
267
+ addEdit(requirement.file, { path: requirement.versionPath, value: change.requirement });
268
+ rewrites.push({ requirement, crate, to: change.requirement });
269
+ lines.push(`✍️ Updated the requirement on ${crate.name} in ${place} from "${requirement.requirement}" to "${change.requirement}"`);
270
+ }
271
+ else if (change.kind === "keep-other") {
272
+ lines.push(`Kept the requirement "${requirement.requirement}" on ${crate.name} in ${place}: ${newVersion} matches it, and nx-rust rewrites bare, ^, ~ and = requirements only`);
273
+ }
274
+ else if (change.kind === "fail") {
275
+ failures.push(`- "${requirement.requirement}" in ${place}${change.leaves ? "" : `, of which nx-rust cannot tell whether it accepts ${newVersion}`}`);
276
+ }
277
+ }
278
+ const blocking = (0, places_1.blockers)(tree, repository, crate, newVersion);
279
+ // The lockfiles that cargo will rewrite after Nx has written the files
280
+ // (`afterAllProjectsVersioned`), checked now with them.
281
+ const { lockfiles, unreadable } = (0, version_lockfiles_1.staleLockfiles)(tree, repository, run, crate, [
282
+ ...edits.keys(),
283
+ ]);
284
+ const files = [...new Set([...edits.keys(), ...lockfiles.keys()])];
285
+ // A file inside the repository by its path can lead outside it through
286
+ // a symbolic link, of its own or of a folder on the way.
287
+ const outside = files.flatMap((file) => {
288
+ const destination = (0, places_1.outsideDestination)(tree.root, file);
289
+ return destination === undefined ? [] : [`- ${file} leads to ${destination}`];
290
+ });
291
+ const unwritable = files.filter((file) => (0, places_1.outsideDestination)(tree.root, file) === undefined && !(0, version_checks_1.writable)((0, node_path_1.join)(tree.root, file)));
292
+ const sections = [];
293
+ if (failures.length > 0) {
294
+ sections.push([
295
+ `The new version ${newVersion} of ${crate.name} leaves ${failures.length === 1 ? "a requirement" : "requirements"} on it that nx release version cannot rewrite, because only a bare, ^, ~ or = requirement inside the repository can be rewritten without inventing bounds:`,
296
+ ...failures,
297
+ `Change ${failures.length === 1 ? "it" : "each of them"} so that it accepts ${newVersion}, or into a bare, ^, ~ or = requirement, and run nx release version again.`,
298
+ ].join("\n"));
299
+ }
300
+ if (blocking.length > 0) {
301
+ sections.push([
302
+ `nx release version cannot give ${crate.name} the new version ${newVersion} while:`,
303
+ ...blocking,
304
+ ].join("\n"));
305
+ }
306
+ if (outside.length > 0) {
307
+ sections.push([
308
+ `The new version ${newVersion} of ${crate.name} changes files that symbolic links lead outside the repository, where nx release version writes nothing:`,
309
+ ...outside,
310
+ "Change the versions there by hand, or put the files themselves into the repository, and run nx release version again.",
311
+ ].join("\n"));
312
+ }
313
+ if (unreadable.length > 0) {
314
+ const one = unreadable.length === 1;
315
+ sections.push([
316
+ `nx release version cannot read the Cargo.lock of ${one ? "a Cargo workspace" : "Cargo workspaces"}, which it needs to tell whether the new version ${newVersion} of ${crate.name} makes ${one ? "it" : "them"} stale and to bring ${one ? "it" : "them"} up to date:`,
317
+ ...unreadable,
318
+ `Make ${one ? "it" : "them"} readable and valid, and run the command again.`,
319
+ ].join("\n"));
320
+ }
321
+ if (unwritable.length > 0) {
322
+ sections.push(`nx release version cannot write ${(0, version_checks_1.sentenceList)(unwritable)}, which the new version ${newVersion} of ${crate.name} changes: make ${unwritable.length === 1 ? "it" : "them"} writable and run the command again.`);
323
+ }
324
+ if (sections.length > 0) {
325
+ throw new manifests_1.ReleaseError([...sections, "No file has been changed."].join("\n\n"));
326
+ }
327
+ // Written at the path of what a symbolic link leads to, which Nx then
328
+ // stages and its formatter leaves alone.
329
+ for (const [file, fileEdits] of edits) {
330
+ const path = (0, places_1.treePath)(tree.root, file);
331
+ tree.write(path, (0, version_checks_1.editedFile)(tree, file, fileEdits));
332
+ if (!this.manifestsToUpdate.some((update) => update.manifestPath === path)) {
333
+ this.manifestsToUpdate.push({
334
+ manifestPath: path,
335
+ preserveLocalDependencyProtocols: this.finalConfigForProject.preserveLocalDependencyProtocols,
336
+ });
337
+ }
338
+ run.written.add(path);
339
+ }
340
+ run.versioned.add(this.projectGraphNode.name);
341
+ run.rewrites.push(...rewrites);
342
+ for (const [lockfile, workspace] of lockfiles) {
343
+ run.lockfiles.set(lockfile, workspace);
344
+ }
345
+ return lines;
346
+ });
347
+ }
348
+ /**
349
+ * Nx calls it, for each crate whose version a run writes, only once it has
350
+ * decided every version of the run, before it writes any file. The first
351
+ * call checks that no crate of the release gets a rewritten requirement on
352
+ * a bumped crate without a new version of its own (nxr-5a9w1y, part 2).
353
+ * The requirements themselves were updated with the versions.
354
+ */
355
+ updateProjectDependencies(tree) {
356
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
357
+ const run = runOf(tree);
358
+ if (!run.dependentsChecked) {
359
+ run.dependentsChecked = true;
360
+ (0, version_checks_1.checkDependentsVersioned)(tree, this.repository(tree), run.rewrites, run.versioned, groupOf);
361
+ }
362
+ return [];
363
+ });
364
+ }
365
+ // What the plugin recorded in the project's metadata about its crate.
366
+ crate() {
367
+ const cargo = (0, repository_1.cargoMetadataOf)(this.projectGraphNode.data.metadata);
368
+ if ((cargo === null || cargo === void 0 ? void 0 : cargo.packageName) === undefined) {
369
+ throw new manifests_1.ReleaseError(`The project "${this.projectGraphNode.name}" uses nx-rust's version actions, but it is no crate: ${cargo === undefined
370
+ ? `nx-rust created no crate project in ${this.projectGraphNode.data.root}`
371
+ : `it is the workspace project of ${cargo.manifest}, which has no [package] table and so no version`}. Leave it out of the release groups in nx.json.`);
372
+ }
373
+ return {
374
+ manifest: cargo.manifest,
375
+ workspaceManifest: cargo.workspaceManifest,
376
+ packageName: cargo.packageName,
377
+ };
378
+ }
379
+ // The current version and the manifest that holds it.
380
+ currentVersion(tree) {
381
+ const crate = this.crate();
382
+ const read = (path) => (0, places_1.readTreeText)(tree, path);
383
+ const version = (0, manifests_1.crateVersion)((0, manifests_1.parseManifest)(read(crate.manifest), crate.manifest));
384
+ if (version.kind === "own") {
385
+ return { currentVersion: version.version, manifestPath: crate.manifest };
386
+ }
387
+ if (version.kind === "missing") {
388
+ throw new manifests_1.ReleaseError(`The crate ${crate.packageName} has no version in ${crate.manifest}, so nx release version cannot version it; cargo takes it as 0.0.0. Give its [package] table a version, such as version = "0.1.0", or leave the project "${this.projectGraphNode.name}" out of the release groups in nx.json.`);
389
+ }
390
+ const inherited = (0, manifests_1.workspaceVersion)((0, manifests_1.parseManifest)(read(crate.workspaceManifest), crate.workspaceManifest));
391
+ if (inherited === undefined) {
392
+ throw new manifests_1.ReleaseError(`The crate ${crate.packageName} inherits its version from [workspace.package] in ${crate.workspaceManifest}, which sets none, so nx release version cannot version it. Set version in [workspace.package] of ${crate.workspaceManifest}, or leave the project "${this.projectGraphNode.name}" out of the release groups in nx.json.`);
393
+ }
394
+ return { currentVersion: inherited, manifestPath: crate.workspaceManifest };
395
+ }
396
+ repository(tree) {
397
+ runGraph !== null && runGraph !== void 0 ? runGraph : (runGraph = (0, devkit_1.readCachedProjectGraph)());
398
+ runRepository = (0, repository_1.releaseRepository)(tree.root, runGraph);
399
+ return runRepository;
400
+ }
401
+ releaseCrate(repository) {
402
+ const crate = repository.crateOfProject(this.projectGraphNode.name);
403
+ if (crate === undefined) {
404
+ throw new manifests_1.ReleaseError(`cargo metadata reports no crate for the project "${this.projectGraphNode.name}" (${this.crate().manifest}), so the project graph is out of date: run nx reset and the command again.`);
405
+ }
406
+ return crate;
407
+ }
408
+ // Whether Nx's `preserveMatchingDependencyRanges` is on for a
409
+ // requirement: that of the crate whose manifest holds it where that crate
410
+ // is configured for release, and otherwise, as in
411
+ // `[workspace.dependencies]` and `[patch]`, that of the crate whose
412
+ // version changes.
413
+ preservesMatchingRequirements(requirement) {
414
+ var _a, _b, _c;
415
+ const holder = (_a = requirement.holder) === null || _a === void 0 ? void 0 : _a.project;
416
+ const setting = holder === undefined
417
+ ? undefined
418
+ : (_b = configured.get(holder)) === null || _b === void 0 ? void 0 : _b.finalConfigForProject.preserveMatchingDependencyRanges;
419
+ return (0, version_checks_1.isOn)((_c = setting !== null && setting !== void 0 ? setting : this.finalConfigForProject.preserveMatchingDependencyRanges) !== null && _c !== void 0 ? _c : true);
420
+ }
421
+ }
422
+ exports.default = CargoVersionActions;
423
+ /** The run of `tree`, which becomes the latest. */
424
+ function runOf(tree) {
425
+ let run = runs.get(tree);
426
+ if (run === undefined) {
427
+ run = {
428
+ projects: new Set(),
429
+ versioned: new Set(),
430
+ rewrites: [],
431
+ named: new Set(),
432
+ dependentsChecked: false,
433
+ lockfiles: new Map(),
434
+ written: new Set(),
435
+ lockfileStates: new Map(),
436
+ };
437
+ runs.set(tree, run);
438
+ }
439
+ latestRun = run;
440
+ return run;
441
+ }
442
+ /** The release group of a project configured for release. */
443
+ function groupOf(project) {
444
+ var _a;
445
+ return project === undefined ? undefined : (_a = configured.get(project)) === null || _a === void 0 ? void 0 : _a.releaseGroup.name;
446
+ }
447
+ /**
448
+ * Brings the `Cargo.lock` of each Cargo workspace that the run changed up to
449
+ * date (`DES-RELEASE`, "Lockfile"). Nx calls it once, after it has written
450
+ * the files of the run and before it stages and commits them
451
+ * (`EVD-NX-24-VERSION-ACTIONS`); in a dry run it does nothing, because Nx has
452
+ * written nothing.
453
+ *
454
+ * For each lockfile that `updateProjectVersion` recorded, in the order of
455
+ * their paths, it runs `cargo update --workspace` in the workspace's root
456
+ * folder, with the environment of the run and never with `--locked` or
457
+ * `--offline`, whatever the plugin's `locked` option says, because the
458
+ * lockfile has to change. It goes on after a workspace whose cargo fails,
459
+ * so that the message names every failure, and then throws.
460
+ *
461
+ * @returns The lockfiles that cargo changed and that git does not ignore,
462
+ * for Nx to stage and commit, each by its {@link treePath}: where it lies
463
+ * once symbolic links are followed, relative to the repository root.
464
+ * @throws {ReleaseError} When cargo fails in a workspace, or a lockfile
465
+ * cannot be read, naming the workspace, with cargo's message and the
466
+ * commands that go back or on.
467
+ */
468
+ // @mara implements DES-RELEASE
469
+ function afterAllProjectsVersioned(cwd, options) {
470
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
471
+ return (0, version_lockfiles_1.updateVersionedLockfiles)(latestRun, cwd, options);
472
+ });
473
+ }
474
+ //# sourceMappingURL=version-actions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version-actions.js","sourceRoot":"","sources":["../../../../nx-rust/src/release/version-actions.ts"],"names":[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iB,EAAE,KAAK;YACxB,SAAS,EAAE,IAAI,GAAG,EAAE;YACpB,OAAO,EAAE,IAAI,GAAG,EAAE;YAClB,cAAc,EAAE,IAAI,GAAG,EAAE;SAC1B,CAAC;QACF,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACtB,CAAC;IACD,SAAS,GAAG,GAAG,CAAC;IAChB,OAAO,GAAG,CAAC;AACb,CAAC;AAED,6DAA6D;AAC7D,SAAS,OAAO,CAAC,OAA2B;;IAC1C,OAAO,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAA,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,0CAAE,YAAY,CAAC,IAAI,CAAC;AACxF,CAAC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,+BAA+B;AAC/B,SAAsB,yBAAyB,CAC7C,GAAW,EACX,OAA6B;;QAE7B,OAAO,IAAA,4CAAwB,EAAC,SAAS,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;CAAA"}
@@ -0,0 +1,21 @@
1
+ import type { ProjectGraph, Tree } from "@nx/devkit";
2
+ import type { CargoDependency } from "../cargo/metadata";
3
+ import { type Requirement } from "./places";
4
+ import type { ReleaseCrate, ReleaseRepository } from "./repository";
5
+ import { type StringEdit } from "./toml-edit";
6
+ /** A requirement on a dependent's entry that a run rewrites. */
7
+ export interface Rewrite {
8
+ requirement: Requirement;
9
+ /** The crate whose version changes. */
10
+ crate: ReleaseCrate;
11
+ to: string;
12
+ }
13
+ export declare function checkVersionedTogether(projects: ReadonlySet<string>, crate: ReleaseCrate, sharing: readonly ReleaseCrate[]): void;
14
+ export declare function graphBumpLines(project: string, group: string, versioned: ReadonlySet<string>, graph: ProjectGraph, repository: ReleaseRepository | undefined, groupOf: (project: string | undefined) => string | undefined): string[];
15
+ export declare function checkDependentsVersioned(tree: Tree, repository: ReleaseRepository, rewrites: readonly Rewrite[], versioned: ReadonlySet<string>, groupOf: (project: string | undefined) => string | undefined): void;
16
+ export declare function isOn(setting: boolean | readonly string[]): boolean;
17
+ export declare function writesRequirement(tree: Tree, repository: ReleaseRepository, crate: ReleaseCrate, dependency: CargoDependency): boolean;
18
+ export declare function inheritingCrates(tree: Tree, repository: ReleaseRepository, crate: ReleaseCrate): ReleaseCrate[];
19
+ export declare function writable(path: string): boolean;
20
+ export declare function editedFile(tree: Tree, file: string, edits: readonly StringEdit[]): string;
21
+ export declare function sentenceList(items: readonly string[]): string;