@storm-software/workspace-tools 1.292.16 → 1.292.18

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 (153) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +4 -35
  3. package/config/base.json +13 -14
  4. package/dist/{chunk-UCXAD2SG.mjs → chunk-6PVCCKX4.mjs} +1 -1
  5. package/dist/chunk-ANHKV7HZ.js +22 -0
  6. package/dist/{chunk-PUFTJ2BG.mjs → chunk-D2ENLOCH.mjs} +14 -12
  7. package/dist/{chunk-MGF3DTWM.js → chunk-EECJXHDA.js} +50 -17
  8. package/dist/chunk-EGI64HQ2.mjs +22 -0
  9. package/dist/chunk-EYRX4NM6.mjs +213 -0
  10. package/dist/{chunk-LOFMB5G3.mjs → chunk-IPWUJVZZ.mjs} +1 -1
  11. package/dist/{chunk-YNLDYAEE.mjs → chunk-JHJLQ2O7.mjs} +1 -1
  12. package/dist/{chunk-452FQZ3B.js → chunk-JWFGGMYQ.js} +1 -6
  13. package/dist/{chunk-Q57UD72U.mjs → chunk-KCVIHYZQ.mjs} +1 -1
  14. package/dist/{chunk-7DLHAWLG.mjs → chunk-MU6OJDOC.mjs} +1 -1
  15. package/dist/{chunk-IBTPJDV6.js → chunk-N3YCERS6.js} +5 -2
  16. package/dist/{chunk-WV5SNA37.js → chunk-O2FPRXPD.js} +17 -15
  17. package/dist/{chunk-FQSIFEMR.mjs → chunk-OOR7HG4P.mjs} +37 -4
  18. package/dist/{chunk-2LY7DGBH.mjs → chunk-OV33RACH.mjs} +5 -2
  19. package/dist/{chunk-WRXLSZ6I.js → chunk-POXELQII.js} +2 -2
  20. package/dist/{chunk-B4RJUBHW.mjs → chunk-QUHBEE5D.mjs} +1 -1
  21. package/dist/chunk-SAIDGUHG.mjs +0 -0
  22. package/dist/chunk-TCGF4GS7.js +213 -0
  23. package/dist/chunk-TJRQRM4Z.mjs +49 -0
  24. package/dist/chunk-W4IH547O.js +49 -0
  25. package/dist/{chunk-2ONEZU6V.mjs → chunk-WH72XZPS.mjs} +1 -1
  26. package/dist/{chunk-SVIG7SR3.mjs → chunk-X2SLQ73Q.mjs} +1 -6
  27. package/dist/chunk-YYLV7UA6.js +1 -0
  28. package/dist/{chunk-7QY4X73C.js → chunk-ZP4B44CQ.js} +2 -2
  29. package/dist/executors.js +16 -17
  30. package/dist/executors.mjs +19 -20
  31. package/dist/generators.d.mts +0 -2
  32. package/dist/generators.d.ts +0 -2
  33. package/dist/generators.js +8 -14
  34. package/dist/generators.mjs +13 -19
  35. package/dist/index.d.mts +7 -2
  36. package/dist/index.d.ts +7 -2
  37. package/dist/index.js +39 -34
  38. package/dist/index.mjs +53 -48
  39. package/dist/src/base/base-executor.mjs +1 -1
  40. package/dist/src/base/base-executor.untyped.mjs +1 -1
  41. package/dist/src/base/base-generator.mjs +1 -1
  42. package/dist/src/base/base-generator.untyped.mjs +1 -1
  43. package/dist/src/base/cargo-base-executor.untyped.mjs +1 -1
  44. package/dist/src/base/index.mjs +1 -1
  45. package/dist/src/base/typescript-build-executor.untyped.mjs +1 -1
  46. package/dist/src/base/typescript-library-generator.untyped.mjs +1 -1
  47. package/dist/src/executors/cargo-build/executor.mjs +1 -1
  48. package/dist/src/executors/cargo-build/untyped.mjs +1 -1
  49. package/dist/src/executors/cargo-check/executor.mjs +1 -1
  50. package/dist/src/executors/cargo-check/untyped.mjs +1 -1
  51. package/dist/src/executors/cargo-clippy/executor.mjs +1 -1
  52. package/dist/src/executors/cargo-clippy/untyped.mjs +1 -1
  53. package/dist/src/executors/cargo-doc/executor.mjs +1 -1
  54. package/dist/src/executors/cargo-doc/untyped.mjs +1 -1
  55. package/dist/src/executors/cargo-format/executor.mjs +1 -1
  56. package/dist/src/executors/cargo-format/untyped.mjs +1 -1
  57. package/dist/src/executors/cargo-publish/executor.js +3 -3
  58. package/dist/src/executors/cargo-publish/executor.mjs +3 -3
  59. package/dist/src/executors/cargo-publish/untyped.mjs +1 -1
  60. package/dist/src/executors/clean-package/executor.mjs +1 -1
  61. package/dist/src/executors/clean-package/untyped.mjs +1 -1
  62. package/dist/src/executors/esbuild/executor.mjs +1 -1
  63. package/dist/src/executors/esbuild/untyped.mjs +1 -1
  64. package/dist/src/executors/npm-publish/executor.js +4 -5
  65. package/dist/src/executors/npm-publish/executor.mjs +4 -5
  66. package/dist/src/executors/npm-publish/untyped.mjs +1 -1
  67. package/dist/src/executors/size-limit/executor.mjs +1 -1
  68. package/dist/src/executors/size-limit/untyped.mjs +1 -1
  69. package/dist/src/executors/tsdown/executor.mjs +1 -1
  70. package/dist/src/executors/tsdown/untyped.mjs +1 -1
  71. package/dist/src/executors/typia/executor.mjs +1 -1
  72. package/dist/src/executors/typia/untyped.mjs +1 -1
  73. package/dist/src/executors/unbuild/executor.mjs +1 -1
  74. package/dist/src/executors/unbuild/untyped.mjs +1 -1
  75. package/dist/src/generators/browser-library/generator.mjs +2 -2
  76. package/dist/src/generators/browser-library/untyped.mjs +1 -1
  77. package/dist/src/generators/config-schema/generator.mjs +1 -1
  78. package/dist/src/generators/config-schema/untyped.mjs +1 -1
  79. package/dist/src/generators/init/init.mjs +1 -1
  80. package/dist/src/generators/init/untyped.mjs +1 -1
  81. package/dist/src/generators/neutral-library/generator.mjs +2 -2
  82. package/dist/src/generators/neutral-library/untyped.mjs +1 -1
  83. package/dist/src/generators/node-library/generator.mjs +2 -2
  84. package/dist/src/generators/node-library/untyped.mjs +1 -1
  85. package/dist/src/generators/preset/generator.mjs +2 -2
  86. package/dist/src/generators/preset/untyped.mjs +1 -1
  87. package/dist/src/plugins/rust/cargo-toml.js +2 -2
  88. package/dist/src/plugins/rust/cargo-toml.mjs +2 -2
  89. package/dist/src/plugins/rust/index.js +2 -2
  90. package/dist/src/plugins/rust/index.mjs +2 -2
  91. package/dist/src/plugins/typescript/index.js +22 -22
  92. package/dist/src/plugins/typescript/index.mjs +23 -23
  93. package/dist/src/plugins/typescript/tsdown.mjs +1 -1
  94. package/dist/src/plugins/typescript/tsup.mjs +1 -1
  95. package/dist/src/plugins/typescript/untyped-schema.mjs +1 -1
  96. package/dist/src/release/index.d.mts +11 -0
  97. package/dist/src/release/index.d.ts +11 -0
  98. package/dist/src/release/index.js +17 -0
  99. package/dist/src/release/index.mjs +18 -0
  100. package/dist/src/release/js-version-actions.d.mts +44 -0
  101. package/dist/src/release/js-version-actions.d.ts +44 -0
  102. package/dist/src/release/js-version-actions.js +10 -0
  103. package/dist/src/release/js-version-actions.mjs +11 -0
  104. package/dist/src/release/rust-version-actions.d.mts +56 -0
  105. package/dist/src/release/rust-version-actions.d.ts +56 -0
  106. package/dist/src/release/rust-version-actions.js +12 -0
  107. package/dist/src/release/rust-version-actions.mjs +13 -0
  108. package/dist/src/types.mjs +1 -1
  109. package/dist/src/utils/apply-workspace-tokens.mjs +1 -1
  110. package/dist/src/utils/cargo.mjs +1 -1
  111. package/dist/src/utils/create-cli-options.mjs +1 -1
  112. package/dist/src/utils/get-project-configurations.mjs +1 -1
  113. package/dist/src/utils/index.js +11 -11
  114. package/dist/src/utils/index.mjs +18 -18
  115. package/dist/src/utils/lock-file.d.mts +2 -2
  116. package/dist/src/utils/lock-file.d.ts +2 -2
  117. package/dist/src/utils/lock-file.mjs +1 -1
  118. package/dist/src/utils/nx-json.d.mts +3 -27
  119. package/dist/src/utils/nx-json.d.ts +3 -27
  120. package/dist/src/utils/nx-json.js +2 -2
  121. package/dist/src/utils/nx-json.mjs +2 -2
  122. package/dist/src/utils/package-helpers.js +3 -3
  123. package/dist/src/utils/package-helpers.mjs +3 -3
  124. package/dist/src/utils/plugin-helpers.d.mts +2 -2
  125. package/dist/src/utils/plugin-helpers.d.ts +2 -2
  126. package/dist/src/utils/plugin-helpers.mjs +1 -1
  127. package/dist/src/utils/project-tags.mjs +1 -1
  128. package/dist/src/utils/registry-helpers.d.mts +11 -0
  129. package/dist/src/utils/registry-helpers.d.ts +11 -0
  130. package/dist/src/utils/registry-helpers.js +6 -0
  131. package/dist/src/utils/registry-helpers.mjs +7 -0
  132. package/dist/src/utils/typia-transform.mjs +1 -1
  133. package/dist/src/utils/versions.mjs +1 -1
  134. package/package.json +47 -18
  135. package/dist/chunk-J4I6MJT2.js +0 -73
  136. package/dist/chunk-JLXBL5BC.mjs +0 -73
  137. package/dist/chunk-WEL4BVFX.js +0 -1049
  138. package/dist/chunk-ZZWU35JU.mjs +0 -1049
  139. package/dist/generator-DLXza9BZ.d.ts +0 -186
  140. package/dist/generator-DVYJZa5j.d.mts +0 -186
  141. package/dist/src/generators/release-version/generator.d.mts +0 -6
  142. package/dist/src/generators/release-version/generator.d.ts +0 -6
  143. package/dist/src/generators/release-version/generator.js +0 -14
  144. package/dist/src/generators/release-version/generator.mjs +0 -15
  145. package/dist/src/generators/release-version/schema.d.ts +0 -180
  146. package/dist/src/generators/release-version/schema.json +0 -158
  147. package/dist/src/generators/release-version/untyped.d.mts +0 -5
  148. package/dist/src/generators/release-version/untyped.d.ts +0 -5
  149. package/dist/src/generators/release-version/untyped.js +0 -159
  150. package/dist/src/generators/release-version/untyped.mjs +0 -161
  151. package/docs/api/generators/release-version/schema.md +0 -160
  152. /package/dist/{chunk-RLIZVCIN.mjs → chunk-5GZC2PF6.mjs} +0 -0
  153. /package/dist/{chunk-INERRJ6Q.js → chunk-C3TC7AUW.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,7 +1,55 @@
1
+ ## [1.292.17](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.292.17) (2025-11-04)
2
+
3
+ ### Features
4
+
5
+ - **monorepo:** Update packages to use Nx v22.0.2 ([8895b7333](https://github.com/storm-software/storm-ops/commit/8895b7333))
6
+
7
+ ### Bug Fixes
8
+
9
+ - **workspace-tools:** Resolve issue updating crate dependencies ([3cafed54b](https://github.com/storm-software/storm-ops/commit/3cafed54b))
10
+ - **workspace-tools:** Added logic to parse cargo registry from config and handle all dependency types ([ae6943916](https://github.com/storm-software/storm-ops/commit/ae6943916))
11
+ - **workspace-tools:** Resolved issue reading the crate dependency versions ([ff52fd3dd](https://github.com/storm-software/storm-ops/commit/ff52fd3dd))
12
+ - **workspace-tools:** Resolved issue with invalid version actions path ([f92989790](https://github.com/storm-software/storm-ops/commit/f92989790))
13
+
14
+ ### Miscellaneous
15
+
16
+ - **workspace-tools:** Remove unused configurations from shared `nx.json` file ([3a6bea34e](https://github.com/storm-software/storm-ops/commit/3a6bea34e))
17
+ - **workspace-tools:** Remove default `versionActions` from base `nx.json` config ([35f143e14](https://github.com/storm-software/storm-ops/commit/35f143e14))
18
+ - **monorepo:** Update `changelog` configuration to use local paths ([ff3053a8a](https://github.com/storm-software/storm-ops/commit/ff3053a8a))
19
+ - **monorepo:** Resolve sherif linting issues and reformat README markdown files ([2ed668c6a](https://github.com/storm-software/storm-ops/commit/2ed668c6a))
20
+
21
+ ### Updated Dependencies
22
+
23
+ - Updated testing-tools to 1.119.17
24
+ - Updated config-tools to 1.188.17
25
+ - Updated pnpm-tools to 0.6.17
26
+ - Updated npm-tools to 0.5.17
27
+ - Updated prettier to 0.57.17
28
+ - Updated esbuild to 0.53.17
29
+ - Updated unbuild to 0.57.17
30
+ - Updated config to 1.134.17
31
+ - Updated tsdown to 0.45.17
32
+
1
33
  ![Storm Software's logo banner](https://public.storm-cdn.com/brand-banner.png)
2
34
 
3
35
  # Changelog for Storm Ops - Workspace Tools
4
36
 
37
+ ## [1.292.16](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.292.16) (2025-10-31)
38
+
39
+ ### Miscellaneous
40
+
41
+ - **monorepo:** Update workspace package links
42
+ ([49f67dda6](https://github.com/storm-software/storm-ops/commit/49f67dda6))
43
+
44
+ ### Updated Dependencies
45
+
46
+ - Updated pnpm-tools to 0.6.16
47
+ - Updated npm-tools to 0.5.16
48
+ - Updated prettier to 0.57.16
49
+ - Updated esbuild to 0.53.16
50
+ - Updated unbuild to 0.57.16
51
+ - Updated tsdown to 0.45.16
52
+
5
53
  ## [1.292.15](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.292.15) (2025-10-31)
6
54
 
7
55
  ### Miscellaneous
package/README.md CHANGED
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
21
21
 
22
22
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
23
23
 
24
- [![Version](https://img.shields.io/badge/version-1.292.14-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
24
+ [![Version](https://img.shields.io/badge/version-1.292.17-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
@@ -94,8 +94,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
94
94
  - [Options](#options-16)
95
95
  - [Browser Library Generator](#browser-library-generator)
96
96
  - [Options](#options-17)
97
- - [Release Version Generator](#release-version-generator)
98
- - [Options](#options-18)
97
+ - [release-version](#release-version)
99
98
  - [Building](#building)
100
99
  - [Running unit tests](#running-unit-tests)
101
100
  - [Storm Workspaces](#storm-workspaces)
@@ -731,39 +730,9 @@ The following executor options are available:
731
730
 
732
731
 
733
732
 
734
- ## Release Version Generator
733
+ ## release-version
735
734
 
736
- A type definition for a release version generator schema
737
-
738
- ### Options
739
-
740
- The following executor options are available:
741
-
742
- | Option | Type | Description | Default |
743
- | --------- | ------ | ------------- | --------- |
744
- | **projects \*** | `object[]` | The projects to release | |
745
- | **releaseGroup \*** | `object` | The release group | `[object Object]` |
746
- | **projectGraph \*** | `object` | The project graph | `[object Object]` |
747
- | **specifier \*** | `string` | The specifier | |
748
- | specifierSource | `string` | The specifier source | |
749
- | preid | `string` | The preid | |
750
- | packageRoot | `string` | The package root | |
751
- | currentVersionResolver | `string` | The current version resolver | "git-tag" |
752
- | currentVersionResolverMetadata | `object` | The current version resolver metadata | `[object Object]` |
753
- | fallbackCurrentVersionResolver | `string` | The fallback current version resolver | "disk" |
754
- | firstRelease | `boolean` | Release the first version | |
755
- | versionPrefix | "" \| "auto" \| "~" \| "^" \| "=" | The version prefix | |
756
- | skipLockFileUpdate | `boolean` | Skip lock file update | |
757
- | installArgs | `string` | The install arguments | |
758
- | installIgnoreScripts | `boolean` | Ignore scripts | |
759
- | conventionalCommitsConfig | `object` | The conventional commits config | `[object Object]` |
760
- | deleteVersionPlans | `boolean` | Delete version plans | |
761
- | updateDependents | `string` | Update dependents | |
762
- | logUnchangedProjects | `boolean` | Log unchanged projects | |
763
- | preserveLocalDependencyProtocols | `boolean` | Preserve local dependency protocols | |
764
-
765
-
766
- **Please note:** _Option names followed by \* above are required, and must be provided to run the executor._
735
+ The release version generator used in Storm Workspaces
767
736
 
768
737
 
769
738
 
package/config/base.json CHANGED
@@ -294,27 +294,26 @@
294
294
  "release": {
295
295
  "groups": {
296
296
  "packages": {
297
- "projects": ["packages/*", "crates/*"],
297
+ "projects": ["packages/*"],
298
298
  "projectsRelationship": "independent",
299
- "releaseTagPattern": "{projectName}@{version}",
300
299
  "changelog": {
301
- "entryWhenNoChanges": false,
302
- "renderOptions": {
303
- "authors": false,
304
- "commitReferences": true,
305
- "versionTitleDate": true
306
- }
300
+ "createRelease": "github",
301
+ "entryWhenNoChanges": false
307
302
  },
308
303
  "version": {
309
304
  "groupPreVersionCommand": "pnpm build",
310
- "generator": "@storm-software/workspace-tools:release-version",
311
305
  "currentVersionResolver": "git-tag",
312
306
  "specifierSource": "conventional-commits",
313
-
314
- "generatorOptions": {
315
- "currentVersionResolver": "git-tag",
316
- "specifierSource": "conventional-commits"
317
- }
307
+ "manifestRootsToUpdate": [
308
+ "{projectRoot}",
309
+ {
310
+ "path": "dist/{projectRoot}",
311
+ "preserveLocalDependencyProtocols": false
312
+ }
313
+ ]
314
+ },
315
+ "releaseTag": {
316
+ "pattern": "{projectName}@{version}"
318
317
  }
319
318
  }
320
319
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseCargoToml
3
- } from "./chunk-SVIG7SR3.mjs";
3
+ } from "./chunk-X2SLQ73Q.mjs";
4
4
  import {
5
5
  ProjectTagConstants,
6
6
  isEqualProjectTag
@@ -0,0 +1,22 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }// src/utils/registry-helpers.ts
2
+ var _https = require('https'); var _https2 = _interopRequireDefault(_https);
3
+ var getCrateRegistryVersion = (name, tag = "latest", registry = "https://crates.io") => {
4
+ return new Promise(
5
+ (resolve) => _https2.default.get(
6
+ `${registry}/api/v1/crates/${encodeURIComponent(name)}/${encodeURIComponent(
7
+ tag
8
+ )}`,
9
+ (res) => {
10
+ res.on("data", (d) => {
11
+ resolve(d);
12
+ });
13
+ }
14
+ ).on("error", (e) => {
15
+ throw e;
16
+ })
17
+ );
18
+ };
19
+
20
+
21
+
22
+ exports.getCrateRegistryVersion = getCrateRegistryVersion;
@@ -18,6 +18,7 @@ import {
18
18
  readJsonFile,
19
19
  workspaceRoot
20
20
  } from "@nx/devkit";
21
+ import defu from "defu";
21
22
  import { existsSync } from "node:fs";
22
23
  import { dirname } from "node:path";
23
24
  import {
@@ -85,7 +86,7 @@ var createNodesV2 = [
85
86
  if (includeApps === false && project.projectType === "application") {
86
87
  continue;
87
88
  }
88
- project.targets = {
89
+ const targets = {
89
90
  "lint-markdown": {
90
91
  cache: true,
91
92
  outputs: ["{projectRoot}/**/*.md", "{projectRoot}/**/*.mdx"],
@@ -234,7 +235,7 @@ var createNodesV2 = [
234
235
  }
235
236
  };
236
237
  if (skipDocs != true) {
237
- project.targets.docs = {
238
+ targets.docs = {
238
239
  cache: true,
239
240
  inputs: ["linting", "documentation", "^production"],
240
241
  dependsOn: ["format-readme", "lint-docs", "^docs"],
@@ -254,7 +255,7 @@ var createNodesV2 = [
254
255
  ProjectTagConstants.Registry.CARGO,
255
256
  { overwrite: true }
256
257
  );
257
- project.targets["nx-release-publish"] = {
258
+ targets["nx-release-publish"] = {
258
259
  cache: true,
259
260
  inputs: [
260
261
  "linting",
@@ -279,16 +280,17 @@ var createNodesV2 = [
279
280
  { overwrite: true }
280
281
  );
281
282
  setDefaultProjectTags(project, name);
282
- projects[root] = {
283
- ...project,
284
- release: {
285
- ...project.release,
286
- version: {
287
- ...project.release?.version,
288
- generator: "@storm-software/workspace-tools:release-version"
283
+ projects[root] = defu(
284
+ {
285
+ targets,
286
+ release: {
287
+ version: {
288
+ versionActions: "@storm-software/workspace-tools/release/rust-version-actions"
289
+ }
289
290
  }
290
- }
291
- };
291
+ },
292
+ project
293
+ );
292
294
  }
293
295
  for (const dep of cargoPackage.dependencies) {
294
296
  if (isExternal(dep, context2.workspaceRoot)) {
@@ -1,10 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunk7QY4X73Cjs = require('./chunk-7QY4X73C.js');
3
+ var _chunkZP4B44CQjs = require('./chunk-ZP4B44CQ.js');
4
4
 
5
5
 
6
-
7
- var _chunkJ4I6MJT2js = require('./chunk-J4I6MJT2.js');
6
+ var _chunkDSDE2UL5js = require('./chunk-DSDE2UL5.js');
8
7
 
9
8
 
10
9
  var _chunkIVAHNQZPjs = require('./chunk-IVAHNQZP.js');
@@ -12,6 +11,37 @@ var _chunkIVAHNQZPjs = require('./chunk-IVAHNQZP.js');
12
11
 
13
12
  var _chunkG2L3EEEOjs = require('./chunk-G2L3EEEO.js');
14
13
 
14
+ // ../npm-tools/src/helpers/get-registry.ts
15
+ var _child_process = require('child_process');
16
+
17
+ // ../npm-tools/src/constants.ts
18
+ var DEFAULT_NPM_REGISTRY = "https://registry.npmjs.org";
19
+
20
+ // ../npm-tools/src/helpers/get-registry.ts
21
+ async function getRegistry() {
22
+ return new Promise((resolve, reject) => {
23
+ _child_process.exec.call(void 0, "npm config get registry", (error, stdout, stderr) => {
24
+ if (error) {
25
+ return reject(error);
26
+ }
27
+ if (stderr) {
28
+ return reject(stderr);
29
+ }
30
+ return resolve(stdout.trim());
31
+ });
32
+ });
33
+ }
34
+ async function getNpmRegistry() {
35
+ if (process.env.STORM_REGISTRY_NPM) {
36
+ return process.env.STORM_REGISTRY_NPM;
37
+ }
38
+ const workspaceConfig = await _chunkDSDE2UL5js.getConfig.call(void 0, );
39
+ if (_optionalChain([workspaceConfig, 'optionalAccess', _ => _.registry, 'optionalAccess', _2 => _2.npm])) {
40
+ return _optionalChain([workspaceConfig, 'optionalAccess', _3 => _3.registry, 'optionalAccess', _4 => _4.npm]);
41
+ }
42
+ return DEFAULT_NPM_REGISTRY;
43
+ }
44
+
15
45
  // ../pnpm-tools/src/helpers/replace-deps-aliases.ts
16
46
 
17
47
 
@@ -21,6 +51,9 @@ var _fs = require('fs');
21
51
  var _promises = require('fs/promises');
22
52
  var _prettier = require('prettier');
23
53
 
54
+ // ../npm-tools/src/helpers/get-version.ts
55
+
56
+
24
57
  // ../pnpm-tools/src/helpers/catalog.ts
25
58
  var _semver = require('semver');
26
59
 
@@ -54,7 +87,7 @@ async function getCatalogSafe(workspaceRoot = _chunkIVAHNQZPjs.findWorkspaceRoot
54
87
  if (!pnpmWorkspaceFile) {
55
88
  throw new Error("No pnpm-workspace.yaml file found");
56
89
  }
57
- if (_optionalChain([pnpmWorkspaceFile, 'optionalAccess', _ => _.catalog])) {
90
+ if (_optionalChain([pnpmWorkspaceFile, 'optionalAccess', _5 => _5.catalog])) {
58
91
  return Object.fromEntries(
59
92
  Object.entries(pnpmWorkspaceFile.catalog).map(([key, value]) => {
60
93
  return [key, value.replaceAll('"', "").replaceAll("'", "")];
@@ -142,7 +175,7 @@ async function replaceDepsAliases(packageRoot = process.cwd(), workspaceRoot = _
142
175
  await Promise.all(
143
176
  Object.keys(projectGraph.nodes).map(async (node) => {
144
177
  const projectNode = projectGraph.nodes[node];
145
- if (_optionalChain([projectNode, 'optionalAccess', _2 => _2.data, 'access', _3 => _3.root])) {
178
+ if (_optionalChain([projectNode, 'optionalAccess', _6 => _6.data, 'access', _7 => _7.root])) {
146
179
  const projectPackageJsonPath = _chunkG2L3EEEOjs.joinPaths.call(void 0,
147
180
  workspaceRoot,
148
181
  projectNode.data.root,
@@ -205,7 +238,7 @@ async function replaceDepsAliases(packageRoot = process.cwd(), workspaceRoot = _
205
238
  }
206
239
 
207
240
  // src/executors/npm-publish/executor.ts
208
- var _child_process = require('child_process');
241
+
209
242
 
210
243
 
211
244
  var LARGE_BUFFER = 1024 * 1e6;
@@ -214,7 +247,7 @@ async function npmPublishExecutorFn(options, context) {
214
247
  if (!context.projectName) {
215
248
  throw new Error("The `npm-publish` executor requires a `projectName`.");
216
249
  }
217
- const projectConfig = _optionalChain([context, 'access', _4 => _4.projectsConfigurations, 'optionalAccess', _5 => _5.projects, 'optionalAccess', _6 => _6[context.projectName]]);
250
+ const projectConfig = _optionalChain([context, 'access', _8 => _8.projectsConfigurations, 'optionalAccess', _9 => _9.projects, 'optionalAccess', _10 => _10[context.projectName]]);
218
251
  if (!projectConfig) {
219
252
  throw new Error(
220
253
  `Could not find project configuration for \`${context.projectName}\``
@@ -224,7 +257,7 @@ async function npmPublishExecutorFn(options, context) {
224
257
  context.root,
225
258
  options.packageRoot || _chunkG2L3EEEOjs.joinPaths.call(void 0, "dist", projectConfig.root)
226
259
  );
227
- const projectRoot = _optionalChain([context, 'access', _7 => _7.projectsConfigurations, 'access', _8 => _8.projects, 'access', _9 => _9[context.projectName], 'optionalAccess', _10 => _10.root]) ? _chunkG2L3EEEOjs.joinPaths.call(void 0,
260
+ const projectRoot = _optionalChain([context, 'access', _11 => _11.projectsConfigurations, 'access', _12 => _12.projects, 'access', _13 => _13[context.projectName], 'optionalAccess', _14 => _14.root]) ? _chunkG2L3EEEOjs.joinPaths.call(void 0,
228
261
  context.root,
229
262
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
230
263
  context.projectsConfigurations.projects[context.projectName].root
@@ -282,12 +315,12 @@ async function npmPublishExecutorFn(options, context) {
282
315
  return { success: true };
283
316
  }
284
317
  await replaceDepsAliases(packageRoot, context.root);
285
- await _chunk7QY4X73Cjs.addPackageJsonGitHead.call(void 0, packageRoot);
318
+ await _chunkZP4B44CQjs.addPackageJsonGitHead.call(void 0, packageRoot);
286
319
  const npmPublishCommandSegments = [`npm publish --json`];
287
320
  const npmViewCommandSegments = [
288
321
  `npm view ${packageName} versions dist-tags --json`
289
322
  ];
290
- const registry = await _asyncNullishCoalesce(options.registry, async () => ( (await _chunkJ4I6MJT2js.getRegistry.call(void 0, ) || _chunkJ4I6MJT2js.getNpmRegistry.call(void 0, ))));
323
+ const registry = await _asyncNullishCoalesce(options.registry, async () => ( (await getRegistry() || getNpmRegistry())));
291
324
  if (registry) {
292
325
  npmPublishCommandSegments.push(`--registry="${registry}" `);
293
326
  npmViewCommandSegments.push(`--registry="${registry}" `);
@@ -390,16 +423,16 @@ Note: If this is the first time this package has been published to NPM, this can
390
423
  `
391
424
  );
392
425
  console.info("");
393
- const stdoutData = JSON.parse(_optionalChain([err, 'access', _11 => _11.stdout, 'optionalAccess', _12 => _12.toString, 'call', _13 => _13()]) || "{}");
394
- if (_optionalChain([stdoutData, 'optionalAccess', _14 => _14.error]) && !(_optionalChain([stdoutData, 'access', _15 => _15.error, 'optionalAccess', _16 => _16.code, 'optionalAccess', _17 => _17.includes, 'call', _18 => _18("E404")]) && _optionalChain([stdoutData, 'access', _19 => _19.error, 'optionalAccess', _20 => _20.summary, 'optionalAccess', _21 => _21.includes, 'call', _22 => _22("no such package available")])) && !(_optionalChain([err, 'access', _23 => _23.stderr, 'optionalAccess', _24 => _24.toString, 'call', _25 => _25(), 'access', _26 => _26.includes, 'call', _27 => _27("E404")]) && _optionalChain([err, 'access', _28 => _28.stderr, 'optionalAccess', _29 => _29.toString, 'call', _30 => _30(), 'access', _31 => _31.includes, 'call', _32 => _32("no such package available")]))) {
426
+ const stdoutData = JSON.parse(_optionalChain([err, 'access', _15 => _15.stdout, 'optionalAccess', _16 => _16.toString, 'call', _17 => _17()]) || "{}");
427
+ if (_optionalChain([stdoutData, 'optionalAccess', _18 => _18.error]) && !(_optionalChain([stdoutData, 'access', _19 => _19.error, 'optionalAccess', _20 => _20.code, 'optionalAccess', _21 => _21.includes, 'call', _22 => _22("E404")]) && _optionalChain([stdoutData, 'access', _23 => _23.error, 'optionalAccess', _24 => _24.summary, 'optionalAccess', _25 => _25.includes, 'call', _26 => _26("no such package available")])) && !(_optionalChain([err, 'access', _27 => _27.stderr, 'optionalAccess', _28 => _28.toString, 'call', _29 => _29(), 'access', _30 => _30.includes, 'call', _31 => _31("E404")]) && _optionalChain([err, 'access', _32 => _32.stderr, 'optionalAccess', _33 => _33.toString, 'call', _34 => _34(), 'access', _35 => _35.includes, 'call', _36 => _36("no such package available")]))) {
395
428
  console.error(
396
429
  "npm dist-tag add error please see below for more information:"
397
430
  );
398
431
  if (stdoutData.error.summary) {
399
- console.error(_optionalChain([stdoutData, 'access', _33 => _33.error, 'optionalAccess', _34 => _34.summary]));
432
+ console.error(_optionalChain([stdoutData, 'access', _37 => _37.error, 'optionalAccess', _38 => _38.summary]));
400
433
  }
401
434
  if (stdoutData.error.detail) {
402
- console.error(_optionalChain([stdoutData, 'access', _35 => _35.error, 'optionalAccess', _36 => _36.detail]));
435
+ console.error(_optionalChain([stdoutData, 'access', _39 => _39.error, 'optionalAccess', _40 => _40.detail]));
403
436
  }
404
437
  if (context.isVerbose) {
405
438
  console.error(
@@ -428,8 +461,8 @@ ${JSON.stringify(err2)}`
428
461
  );
429
462
  console.error(error);
430
463
  console.info("");
431
- const stdoutData = JSON.parse(_optionalChain([err, 'access', _37 => _37.stdout, 'optionalAccess', _38 => _38.toString, 'call', _39 => _39()]) || "{}");
432
- if (!(_optionalChain([stdoutData, 'access', _40 => _40.error, 'optionalAccess', _41 => _41.code, 'optionalAccess', _42 => _42.includes, 'call', _43 => _43("E404")]) && _optionalChain([stdoutData, 'access', _44 => _44.error, 'optionalAccess', _45 => _45.summary, 'optionalAccess', _46 => _46.toLowerCase, 'call', _47 => _47(), 'access', _48 => _48.includes, 'call', _49 => _49("not found")])) && !(_optionalChain([err, 'access', _50 => _50.stderr, 'optionalAccess', _51 => _51.toString, 'call', _52 => _52(), 'access', _53 => _53.includes, 'call', _54 => _54("E404")]) && _optionalChain([err, 'access', _55 => _55.stderr, 'optionalAccess', _56 => _56.toString, 'call', _57 => _57(), 'access', _58 => _58.toLowerCase, 'call', _59 => _59(), 'access', _60 => _60.includes, 'call', _61 => _61("not found")]))) {
464
+ const stdoutData = JSON.parse(_optionalChain([err, 'access', _41 => _41.stdout, 'optionalAccess', _42 => _42.toString, 'call', _43 => _43()]) || "{}");
465
+ if (!(_optionalChain([stdoutData, 'access', _44 => _44.error, 'optionalAccess', _45 => _45.code, 'optionalAccess', _46 => _46.includes, 'call', _47 => _47("E404")]) && _optionalChain([stdoutData, 'access', _48 => _48.error, 'optionalAccess', _49 => _49.summary, 'optionalAccess', _50 => _50.toLowerCase, 'call', _51 => _51(), 'access', _52 => _52.includes, 'call', _53 => _53("not found")])) && !(_optionalChain([err, 'access', _54 => _54.stderr, 'optionalAccess', _55 => _55.toString, 'call', _56 => _56(), 'access', _57 => _57.includes, 'call', _58 => _58("E404")]) && _optionalChain([err, 'access', _59 => _59.stderr, 'optionalAccess', _60 => _60.toString, 'call', _61 => _61(), 'access', _62 => _62.toLowerCase, 'call', _63 => _63(), 'access', _64 => _64.includes, 'call', _65 => _65("not found")]))) {
433
466
  console.error(
434
467
  `Something unexpected went wrong when checking for existing dist-tags.
435
468
 
@@ -476,7 +509,7 @@ Execution response: ${result.toString()}` : ""}
476
509
  console.error("An error occured running npm publish.");
477
510
  console.error("Please see below for more information:");
478
511
  console.info("");
479
- const stdoutData = JSON.parse(_optionalChain([err, 'access', _62 => _62.stdout, 'optionalAccess', _63 => _63.toString, 'call', _64 => _64()]) || "{}");
512
+ const stdoutData = JSON.parse(_optionalChain([err, 'access', _66 => _66.stdout, 'optionalAccess', _67 => _67.toString, 'call', _68 => _68()]) || "{}");
480
513
  if (stdoutData.error.summary) {
481
514
  console.error(stdoutData.error.summary);
482
515
  console.error(stdoutData.error.summary);
@@ -0,0 +1,22 @@
1
+ // src/utils/registry-helpers.ts
2
+ import https from "node:https";
3
+ var getCrateRegistryVersion = (name, tag = "latest", registry = "https://crates.io") => {
4
+ return new Promise(
5
+ (resolve) => https.get(
6
+ `${registry}/api/v1/crates/${encodeURIComponent(name)}/${encodeURIComponent(
7
+ tag
8
+ )}`,
9
+ (res) => {
10
+ res.on("data", (d) => {
11
+ resolve(d);
12
+ });
13
+ }
14
+ ).on("error", (e) => {
15
+ throw e;
16
+ })
17
+ );
18
+ };
19
+
20
+ export {
21
+ getCrateRegistryVersion
22
+ };
@@ -0,0 +1,213 @@
1
+ import {
2
+ getCrateRegistryVersion
3
+ } from "./chunk-EGI64HQ2.mjs";
4
+ import {
5
+ parseCargoToml,
6
+ parseCargoTomlWithTree,
7
+ stringifyCargoToml
8
+ } from "./chunk-X2SLQ73Q.mjs";
9
+ import {
10
+ getWorkspaceConfig
11
+ } from "./chunk-NOTQLVZP.mjs";
12
+
13
+ // src/release/rust-version-actions.ts
14
+ import {
15
+ joinPathFragments
16
+ } from "@nx/devkit";
17
+ import { VersionActions } from "nx/release";
18
+ var StormRustVersionActions = class extends VersionActions {
19
+ validManifestFilenames = ["Cargo.toml"];
20
+ /**
21
+ * The Storm workspace configuration object, which is loaded from the `storm-workspace.json` file.
22
+ *
23
+ * @remarks
24
+ * This member variable is populated during the {@link init} method.
25
+ */
26
+ workspaceConfig = null;
27
+ constructor(releaseGroup, projectGraphNode, finalConfigForProject) {
28
+ super(releaseGroup, projectGraphNode, finalConfigForProject);
29
+ }
30
+ /**
31
+ * Asynchronous initialization of the version actions and resolution of manifest paths.
32
+ *
33
+ * @remarks
34
+ * This does NOT validate that manifest files exist - that happens later in validate().
35
+ *
36
+ * @params tree - The file system tree to read from.
37
+ */
38
+ async init(tree) {
39
+ this.workspaceConfig = await getWorkspaceConfig();
40
+ return super.init(tree);
41
+ }
42
+ async readCurrentVersionFromSourceManifest(tree) {
43
+ const sourceCargoTomlPath = joinPathFragments(
44
+ this.projectGraphNode.data.root,
45
+ "Cargo.toml"
46
+ );
47
+ try {
48
+ const cargoToml = parseCargoTomlWithTree(
49
+ tree,
50
+ this.projectGraphNode.data.root,
51
+ this.projectGraphNode.name
52
+ );
53
+ return {
54
+ manifestPath: sourceCargoTomlPath,
55
+ currentVersion: cargoToml.package.version
56
+ };
57
+ } catch {
58
+ throw new Error(
59
+ `Unable to determine the current version for project "${this.projectGraphNode.name}" from ${sourceCargoTomlPath}, please ensure that the "version" field is set within the Cargo.toml file`
60
+ );
61
+ }
62
+ }
63
+ async readCurrentVersionFromRegistry(tree, currentVersionResolverMetadata) {
64
+ const cargoToml = parseCargoTomlWithTree(
65
+ tree,
66
+ this.projectGraphNode.data.root,
67
+ this.projectGraphNode.name
68
+ );
69
+ const crateName = cargoToml.package.name;
70
+ const metadata = currentVersionResolverMetadata;
71
+ const registryArg = typeof metadata?.registry === "string" ? metadata.registry : this.workspaceConfig?.registry?.cargo || "https://crates.io";
72
+ const tagArg = typeof metadata?.tag === "string" ? metadata.tag : "latest";
73
+ let currentVersion = null;
74
+ try {
75
+ currentVersion = await getCrateRegistryVersion(
76
+ crateName,
77
+ tagArg,
78
+ registryArg
79
+ );
80
+ } catch {
81
+ }
82
+ return {
83
+ currentVersion: currentVersion || "0.0.0",
84
+ // Make troubleshooting easier by including the registry and tag data in the log text
85
+ logText: `"cargoRegistry=${registryArg}" tag=${tagArg}`
86
+ };
87
+ }
88
+ async readCurrentVersionOfDependency(tree, projectGraph, dependencyProjectName) {
89
+ const cargoToml = parseCargoTomlWithTree(
90
+ tree,
91
+ this.projectGraphNode.data.root,
92
+ this.projectGraphNode.name
93
+ );
94
+ if (!projectGraph.nodes[dependencyProjectName]?.data?.root) {
95
+ return {
96
+ currentVersion: null,
97
+ dependencyCollection: null
98
+ };
99
+ }
100
+ const dependencyCargoToml = parseCargoTomlWithTree(
101
+ tree,
102
+ projectGraph.nodes[dependencyProjectName]?.data.root,
103
+ dependencyProjectName
104
+ );
105
+ if (!dependencyCargoToml?.package?.name) {
106
+ return {
107
+ currentVersion: null,
108
+ dependencyCollection: null
109
+ };
110
+ }
111
+ let currentVersion = null;
112
+ let dependencyCollection = null;
113
+ for (const depType of ["dependencies", "dev-dependencies"]) {
114
+ if (cargoToml[depType] && cargoToml[depType][dependencyCargoToml.package.name]) {
115
+ currentVersion = typeof cargoToml[depType][dependencyCargoToml.package.name] === "string" ? cargoToml[depType][dependencyCargoToml.package.name] : cargoToml[depType][dependencyCargoToml.package.name].version;
116
+ dependencyCollection = depType;
117
+ break;
118
+ }
119
+ }
120
+ return {
121
+ currentVersion,
122
+ dependencyCollection
123
+ };
124
+ }
125
+ async updateProjectVersion(tree, newVersion) {
126
+ const logMessages = [];
127
+ for (const manifestToUpdate of this.manifestsToUpdate) {
128
+ const cargoTomlString = tree.read(manifestToUpdate.manifestPath)?.toString();
129
+ if (!cargoTomlString) {
130
+ throw new Error(
131
+ `Unable to read Cargo.toml at path: ${manifestToUpdate.manifestPath}`
132
+ );
133
+ }
134
+ const cargoToml = parseCargoToml(cargoTomlString);
135
+ cargoToml.package.version = newVersion;
136
+ tree.write(manifestToUpdate.manifestPath, stringifyCargoToml(cargoToml));
137
+ logMessages.push(
138
+ `\u270D\uFE0F New version ${newVersion} written to manifest: ${manifestToUpdate.manifestPath}`
139
+ );
140
+ }
141
+ return logMessages;
142
+ }
143
+ /**
144
+ * Updates the dependencies of the project in the specified Cargo.toml files.
145
+ *
146
+ * @param tree - The file system tree to read from and write to.
147
+ * @param projectGraph - The project graph to use for resolving dependencies.
148
+ * @param dependenciesToUpdate - A mapping of dependency names to their new versions.
149
+ * @returns An array of log messages indicating the results of the updates.
150
+ */
151
+ async updateProjectDependencies(tree, projectGraph, dependenciesToUpdate = {}) {
152
+ const numDependenciesToUpdate = Object.keys(dependenciesToUpdate).length;
153
+ if (numDependenciesToUpdate === 0) {
154
+ return [];
155
+ }
156
+ const logMessages = [];
157
+ for (const manifestToUpdate of this.manifestsToUpdate) {
158
+ const cargoTomlString = tree.read(manifestToUpdate.manifestPath)?.toString();
159
+ if (!cargoTomlString) {
160
+ throw new Error(
161
+ `Unable to read Cargo.toml at path: ${manifestToUpdate.manifestPath}`
162
+ );
163
+ }
164
+ const cargoToml = parseCargoToml(cargoTomlString);
165
+ for (const depType of ["dependencies", "dev-dependencies"]) {
166
+ if (cargoToml[depType]) {
167
+ for (const [dep, version] of Object.entries(dependenciesToUpdate)) {
168
+ try {
169
+ const projectRoot = projectGraph.nodes[dep]?.data.root;
170
+ if (!projectRoot) {
171
+ throw new Error(
172
+ `Unable to determine the project root for "${dep}" from the project graph metadata, please ensure that the "@storm-software/workspace-tools" plugin is installed and the project graph has been built. If the issue persists, please report this issue on https://github.com/storm-software/storm-ops/issues`
173
+ );
174
+ }
175
+ const dependencyCargoTomlString = tree.read(manifestToUpdate.manifestPath)?.toString();
176
+ if (!dependencyCargoTomlString) {
177
+ throw new Error(
178
+ `Unable to read Cargo.toml at path: ${manifestToUpdate.manifestPath}`
179
+ );
180
+ }
181
+ const dependencyCargoToml = parseCargoToml(
182
+ dependencyCargoTomlString
183
+ );
184
+ const dependencyCrateName = cargoToml[depType][dependencyCargoToml.package.name] ? dependencyCargoToml.package.name : dep;
185
+ if (typeof cargoToml[depType][dependencyCrateName] === "string") {
186
+ cargoToml[depType][dependencyCrateName] = version;
187
+ } else {
188
+ cargoToml[depType][dependencyCrateName].version = version;
189
+ }
190
+ tree.write(
191
+ manifestToUpdate.manifestPath,
192
+ stringifyCargoToml(cargoToml)
193
+ );
194
+ } catch (error) {
195
+ throw new Error(
196
+ `Unable to update ${depType === "dev-dependencies" ? "dev-dependency" : "dependency"} "${dep}" in manifest at path: ${manifestToUpdate.manifestPath}.`,
197
+ { cause: error }
198
+ );
199
+ }
200
+ }
201
+ }
202
+ }
203
+ logMessages.push(
204
+ `\u270D\uFE0F Updated ${numDependenciesToUpdate} ${numDependenciesToUpdate === 1 ? "dependency" : "dependencies"} in manifest: ${manifestToUpdate.manifestPath}`
205
+ );
206
+ }
207
+ return logMessages;
208
+ }
209
+ };
210
+
211
+ export {
212
+ StormRustVersionActions
213
+ };