@storm-software/workspace-tools 1.286.0 → 1.287.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 (33) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-GF6O2RXB.js → chunk-7JZOFDL2.js} +189 -15
  4. package/dist/{chunk-NTQG45CW.js → chunk-DA53ZKBY.js} +22 -1
  5. package/dist/{chunk-5BP7WBYT.mjs → chunk-M7ZPKNJT.mjs} +22 -1
  6. package/dist/{chunk-QEPFDTFD.js → chunk-Q27SXGNA.js} +11 -30
  7. package/dist/{chunk-OZFFOIQJ.mjs → chunk-ROQYWBA4.mjs} +185 -11
  8. package/dist/{chunk-BNDXPQJL.mjs → chunk-YTQNRG2E.mjs} +3 -22
  9. package/dist/executors.js +3 -4
  10. package/dist/executors.mjs +2 -3
  11. package/dist/generators.js +3 -3
  12. package/dist/generators.mjs +2 -2
  13. package/dist/index.d.mts +0 -1
  14. package/dist/index.d.ts +0 -1
  15. package/dist/index.js +5 -9
  16. package/dist/index.mjs +4 -8
  17. package/dist/src/executors/npm-publish/executor.js +3 -4
  18. package/dist/src/executors/npm-publish/executor.mjs +2 -3
  19. package/dist/src/generators/release-version/generator.js +3 -3
  20. package/dist/src/generators/release-version/generator.mjs +2 -2
  21. package/dist/src/utils/index.d.mts +0 -1
  22. package/dist/src/utils/index.d.ts +0 -1
  23. package/dist/src/utils/index.js +2 -6
  24. package/dist/src/utils/index.mjs +1 -5
  25. package/package.json +22 -24
  26. package/dist/chunk-F6X43VUX.js +0 -163
  27. package/dist/chunk-KHT5W6AJ.mjs +0 -163
  28. package/dist/src/utils/pnpm-deps-update.d.mts +0 -9
  29. package/dist/src/utils/pnpm-deps-update.d.ts +0 -9
  30. package/dist/src/utils/pnpm-deps-update.js +0 -7
  31. package/dist/src/utils/pnpm-deps-update.mjs +0 -8
  32. /package/dist/{chunk-XCVH63OO.mjs → chunk-6YZ3OUJB.mjs} +0 -0
  33. /package/dist/{chunk-DO2X7OZO.js → chunk-JGP4YWZY.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,37 @@
2
2
 
3
3
  # Changelog for Storm Ops - Workspace Tools
4
4
 
5
+ ## [1.287.0](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.287.0) (2025-09-13)
6
+
7
+ ### Features
8
+
9
+ - **pnpm-tools:** Initial check-in of `pnpm-tools` utility package
10
+ ([3bb1916af](https://github.com/storm-software/storm-ops/commit/3bb1916af))
11
+
12
+ ### Miscellaneous
13
+
14
+ - **monorepo:** Regenerate README markdown files
15
+ ([f6d595334](https://github.com/storm-software/storm-ops/commit/f6d595334))
16
+
17
+ ### Updated Dependencies
18
+
19
+ - Updated pnpm-tools to 0.1.0
20
+ - Updated npm-tools to 0.1.1
21
+ - Updated prettier to 0.54.1
22
+ - Updated esbuild to 0.49.1
23
+ - Updated unbuild to 0.53.1
24
+
25
+ ## [1.286.0](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.286.0) (2025-09-13)
26
+
27
+ ### Features
28
+
29
+ - **npm-tools:** Initial check-in of the npm utility tools package
30
+ ([caf8e3fd4](https://github.com/storm-software/storm-ops/commit/caf8e3fd4))
31
+
32
+ ### Updated Dependencies
33
+
34
+ - Updated npm-tools to 0.1.0
35
+
5
36
  ## [1.285.0](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.285.0) (2025-09-13)
6
37
 
7
38
  ### Features
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.284.0-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.286.0-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 -->
@@ -3,26 +3,200 @@
3
3
  var _chunk73IC2JQVjs = require('./chunk-73IC2JQV.js');
4
4
 
5
5
 
6
- var _chunkF6X43VUXjs = require('./chunk-F6X43VUX.js');
7
6
 
7
+ var _chunkDA53ZKBYjs = require('./chunk-DA53ZKBY.js');
8
8
 
9
9
 
10
- var _chunkNTQG45CWjs = require('./chunk-NTQG45CW.js');
10
+ var _chunkHNFKVXBVjs = require('./chunk-HNFKVXBV.js');
11
11
 
12
12
 
13
13
  var _chunk53DNHF7Bjs = require('./chunk-53DNHF7B.js');
14
14
 
15
- // src/executors/npm-publish/executor.ts
16
- var _child_process = require('child_process');
15
+ // ../pnpm-tools/src/helpers/replace-deps-aliases.ts
16
+
17
+
18
+
19
+ var _devkit = require('@nx/devkit');
20
+ var _fs = require('fs');
17
21
  var _promises = require('fs/promises');
18
22
  var _prettier = require('prettier');
23
+
24
+ // ../pnpm-tools/src/helpers/catalog.ts
25
+ var _semver = require('semver');
26
+
27
+ // ../pnpm-tools/src/helpers/pnpm-workspace.ts
28
+ var _jsyaml = require('js-yaml');
29
+
30
+
31
+ function getPnpmWorkspaceFilePath(workspaceRoot = _chunkHNFKVXBVjs.findWorkspaceRoot.call(void 0, process.cwd())) {
32
+ const pnpmWorkspacePath = _chunk53DNHF7Bjs.joinPaths.call(void 0, workspaceRoot, "pnpm-workspace.yaml");
33
+ if (!_fs.existsSync.call(void 0, pnpmWorkspacePath)) {
34
+ throw new Error(
35
+ `No \`pnpm-workspace.yaml\` file found in workspace root (searched in: ${pnpmWorkspacePath}).`
36
+ );
37
+ }
38
+ return pnpmWorkspacePath;
39
+ }
40
+ async function readPnpmWorkspaceFile(workspaceRoot = _chunkHNFKVXBVjs.findWorkspaceRoot.call(void 0, process.cwd())) {
41
+ return _jsyaml.load.call(void 0, getPnpmWorkspaceFilePath(workspaceRoot));
42
+ }
43
+
44
+ // ../pnpm-tools/src/helpers/catalog.ts
45
+ async function getCatalog(workspaceRoot = _chunkHNFKVXBVjs.findWorkspaceRoot.call(void 0, process.cwd())) {
46
+ const pnpmWorkspaceFile = await readPnpmWorkspaceFile(workspaceRoot);
47
+ if (_optionalChain([pnpmWorkspaceFile, 'optionalAccess', _ => _.catalog])) {
48
+ return Object.fromEntries(
49
+ Object.entries(pnpmWorkspaceFile.catalog).map(([key, value]) => {
50
+ return [key, value.replaceAll(/^"/g, "").replaceAll(/"$/g, "")];
51
+ })
52
+ );
53
+ }
54
+ if (!pnpmWorkspaceFile) {
55
+ throw new Error("No pnpm-workspace.yaml file found");
56
+ }
57
+ if (!pnpmWorkspaceFile.catalog) {
58
+ console.warn(
59
+ `No catalog found in pnpm-workspace.yaml file located in workspace root: ${workspaceRoot}`
60
+ );
61
+ }
62
+ return pnpmWorkspaceFile.catalog;
63
+ }
64
+
65
+ // ../pnpm-tools/src/helpers/replace-deps-aliases.ts
66
+ async function replaceDepsAliases(packageRoot = process.cwd(), workspaceRoot = _chunkHNFKVXBVjs.findWorkspaceRoot.call(void 0, packageRoot)) {
67
+ const packageJsonPath = _chunk53DNHF7Bjs.joinPaths.call(void 0, packageRoot, "package.json");
68
+ const packageJsonFile = await _promises.readFile.call(void 0, packageJsonPath, "utf8");
69
+ if (!packageJsonFile) {
70
+ throw new Error(
71
+ "No package.json file found in package root: " + packageRoot
72
+ );
73
+ }
74
+ const catalog = await getCatalog(workspaceRoot);
75
+ const packageJson = JSON.parse(packageJsonFile);
76
+ const pnpmWorkspacePath = _chunk53DNHF7Bjs.joinPaths.call(void 0, workspaceRoot, "pnpm-workspace.yaml");
77
+ if (!_fs.existsSync.call(void 0, pnpmWorkspacePath)) {
78
+ console.warn(
79
+ `No \`pnpm-workspace.yaml\` file found in workspace root (searching in: ${pnpmWorkspacePath}). Skipping pnpm catalog read for now.`
80
+ );
81
+ return packageJson;
82
+ }
83
+ if (!catalog) {
84
+ console.warn(
85
+ `No pnpm catalog found. Skipping dependencies replacement for now.`
86
+ );
87
+ return;
88
+ }
89
+ for (const dependencyType of [
90
+ "dependencies",
91
+ "devDependencies",
92
+ "peerDependencies"
93
+ ]) {
94
+ const dependencies = packageJson[dependencyType];
95
+ if (!dependencies) {
96
+ continue;
97
+ }
98
+ for (const dependencyName of Object.keys(dependencies)) {
99
+ if (dependencies[dependencyName] === "catalog:") {
100
+ if (!catalog) {
101
+ throw new Error(
102
+ `Dependency ${dependencyName} is marked as \`catalog:\`, but no catalog exists in the workspace root's \`pnpm-workspace.yaml\` file.`
103
+ );
104
+ }
105
+ const catalogVersion = catalog[dependencyName];
106
+ if (!catalogVersion) {
107
+ throw new Error("Missing pnpm catalog version for " + dependencyName);
108
+ }
109
+ dependencies[dependencyName] = catalogVersion;
110
+ } else if (dependencies[dependencyName].startsWith("catalog:")) {
111
+ throw new Error("multiple named catalogs not supported");
112
+ }
113
+ }
114
+ }
115
+ let projectGraph;
116
+ try {
117
+ projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
118
+ } catch (e) {
119
+ await _devkit.createProjectGraphAsync.call(void 0, );
120
+ projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
121
+ }
122
+ const workspacePackages = {};
123
+ if (projectGraph) {
124
+ await Promise.all(
125
+ Object.keys(projectGraph.nodes).map(async (node) => {
126
+ const projectNode = projectGraph.nodes[node];
127
+ if (_optionalChain([projectNode, 'optionalAccess', _2 => _2.data, 'access', _3 => _3.root])) {
128
+ const projectPackageJsonPath = _chunk53DNHF7Bjs.joinPaths.call(void 0,
129
+ workspaceRoot,
130
+ projectNode.data.root,
131
+ "package.json"
132
+ );
133
+ if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
134
+ const projectPackageJsonContent = await _promises.readFile.call(void 0,
135
+ projectPackageJsonPath,
136
+ "utf8"
137
+ );
138
+ const projectPackageJson = JSON.parse(projectPackageJsonContent);
139
+ if (projectPackageJson.private !== true) {
140
+ workspacePackages[projectPackageJson.name] = projectPackageJson.version;
141
+ }
142
+ }
143
+ }
144
+ })
145
+ );
146
+ }
147
+ for (const dependencyType of [
148
+ "dependencies",
149
+ "devDependencies",
150
+ "peerDependencies"
151
+ ]) {
152
+ const dependencies = packageJson[dependencyType];
153
+ if (!dependencies) {
154
+ continue;
155
+ }
156
+ for (const dependencyName of Object.keys(dependencies)) {
157
+ if (dependencies[dependencyName].startsWith("workspace:")) {
158
+ if (workspacePackages[dependencyName]) {
159
+ dependencies[dependencyName] = `^${workspacePackages[dependencyName]}`;
160
+ } else {
161
+ throw new Error(
162
+ `Workspace dependency ${dependencyName} not found in workspace packages.`
163
+ );
164
+ }
165
+ }
166
+ }
167
+ }
168
+ return _promises.writeFile.call(void 0,
169
+ packageJsonPath,
170
+ await _prettier.format.call(void 0, JSON.stringify(packageJson), {
171
+ parser: "json",
172
+ proseWrap: "always",
173
+ trailingComma: "none",
174
+ tabWidth: 2,
175
+ semi: true,
176
+ singleQuote: false,
177
+ quoteProps: "as-needed",
178
+ insertPragma: false,
179
+ bracketSameLine: true,
180
+ printWidth: 80,
181
+ bracketSpacing: true,
182
+ arrowParens: "avoid",
183
+ endOfLine: "lf",
184
+ plugins: ["prettier-plugin-pkg"]
185
+ })
186
+ );
187
+ }
188
+
189
+ // src/executors/npm-publish/executor.ts
190
+ var _child_process = require('child_process');
191
+
192
+
19
193
  var LARGE_BUFFER = 1024 * 1e6;
20
194
  async function npmPublishExecutorFn(options, context) {
21
195
  const isDryRun = process.env.NX_DRY_RUN === "true" || options.dryRun || false;
22
196
  if (!context.projectName) {
23
197
  throw new Error("The `npm-publish` executor requires a `projectName`.");
24
198
  }
25
- const projectConfig = _optionalChain([context, 'access', _ => _.projectsConfigurations, 'optionalAccess', _2 => _2.projects, 'optionalAccess', _3 => _3[context.projectName]]);
199
+ const projectConfig = _optionalChain([context, 'access', _4 => _4.projectsConfigurations, 'optionalAccess', _5 => _5.projects, 'optionalAccess', _6 => _6[context.projectName]]);
26
200
  if (!projectConfig) {
27
201
  throw new Error(
28
202
  `Could not find project configuration for \`${context.projectName}\``
@@ -32,7 +206,7 @@ async function npmPublishExecutorFn(options, context) {
32
206
  context.root,
33
207
  options.packageRoot || _chunk53DNHF7Bjs.joinPaths.call(void 0, "dist", projectConfig.root)
34
208
  );
35
- const projectRoot = _optionalChain([context, 'access', _4 => _4.projectsConfigurations, 'access', _5 => _5.projects, 'access', _6 => _6[context.projectName], 'optionalAccess', _7 => _7.root]) ? _chunk53DNHF7Bjs.joinPaths.call(void 0,
209
+ const projectRoot = _optionalChain([context, 'access', _7 => _7.projectsConfigurations, 'access', _8 => _8.projects, 'access', _9 => _9[context.projectName], 'optionalAccess', _10 => _10.root]) ? _chunk53DNHF7Bjs.joinPaths.call(void 0,
36
210
  context.root,
37
211
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
38
212
  context.projectsConfigurations.projects[context.projectName].root
@@ -89,13 +263,13 @@ async function npmPublishExecutorFn(options, context) {
89
263
  );
90
264
  return { success: true };
91
265
  }
92
- await _chunkF6X43VUXjs.pnpmUpdate.call(void 0, packageRoot, context.root);
266
+ await replaceDepsAliases(packageRoot, context.root);
93
267
  await _chunk73IC2JQVjs.addPackageJsonGitHead.call(void 0, packageRoot);
94
268
  const npmPublishCommandSegments = [`npm publish --json`];
95
269
  const npmViewCommandSegments = [
96
270
  `npm view ${packageName} versions dist-tags --json`
97
271
  ];
98
- const registry = await _asyncNullishCoalesce(options.registry, async () => ( (await _chunkNTQG45CWjs.getRegistry.call(void 0, ) || _chunkNTQG45CWjs.getNpmRegistry.call(void 0, ))));
272
+ const registry = await _asyncNullishCoalesce(options.registry, async () => ( (await _chunkDA53ZKBYjs.getRegistry.call(void 0, ) || _chunkDA53ZKBYjs.getNpmRegistry.call(void 0, ))));
99
273
  if (registry) {
100
274
  npmPublishCommandSegments.push(`--registry="${registry}" `);
101
275
  npmViewCommandSegments.push(`--registry="${registry}" `);
@@ -198,16 +372,16 @@ Note: If this is the first time this package has been published to NPM, this can
198
372
  `
199
373
  );
200
374
  console.info("");
201
- const stdoutData = JSON.parse(_optionalChain([err, 'access', _8 => _8.stdout, 'optionalAccess', _9 => _9.toString, 'call', _10 => _10()]) || "{}");
202
- if (_optionalChain([stdoutData, 'optionalAccess', _11 => _11.error]) && !(_optionalChain([stdoutData, 'access', _12 => _12.error, 'optionalAccess', _13 => _13.code, 'optionalAccess', _14 => _14.includes, 'call', _15 => _15("E404")]) && _optionalChain([stdoutData, 'access', _16 => _16.error, 'optionalAccess', _17 => _17.summary, 'optionalAccess', _18 => _18.includes, 'call', _19 => _19("no such package available")])) && !(_optionalChain([err, 'access', _20 => _20.stderr, 'optionalAccess', _21 => _21.toString, 'call', _22 => _22(), 'access', _23 => _23.includes, 'call', _24 => _24("E404")]) && _optionalChain([err, 'access', _25 => _25.stderr, 'optionalAccess', _26 => _26.toString, 'call', _27 => _27(), 'access', _28 => _28.includes, 'call', _29 => _29("no such package available")]))) {
375
+ const stdoutData = JSON.parse(_optionalChain([err, 'access', _11 => _11.stdout, 'optionalAccess', _12 => _12.toString, 'call', _13 => _13()]) || "{}");
376
+ 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")]))) {
203
377
  console.error(
204
378
  "npm dist-tag add error please see below for more information:"
205
379
  );
206
380
  if (stdoutData.error.summary) {
207
- console.error(_optionalChain([stdoutData, 'access', _30 => _30.error, 'optionalAccess', _31 => _31.summary]));
381
+ console.error(_optionalChain([stdoutData, 'access', _33 => _33.error, 'optionalAccess', _34 => _34.summary]));
208
382
  }
209
383
  if (stdoutData.error.detail) {
210
- console.error(_optionalChain([stdoutData, 'access', _32 => _32.error, 'optionalAccess', _33 => _33.detail]));
384
+ console.error(_optionalChain([stdoutData, 'access', _35 => _35.error, 'optionalAccess', _36 => _36.detail]));
211
385
  }
212
386
  if (context.isVerbose) {
213
387
  console.error(
@@ -236,8 +410,8 @@ ${JSON.stringify(err2)}`
236
410
  );
237
411
  console.error(error);
238
412
  console.info("");
239
- const stdoutData = JSON.parse(_optionalChain([err, 'access', _34 => _34.stdout, 'optionalAccess', _35 => _35.toString, 'call', _36 => _36()]) || "{}");
240
- if (!(_optionalChain([stdoutData, 'access', _37 => _37.error, 'optionalAccess', _38 => _38.code, 'optionalAccess', _39 => _39.includes, 'call', _40 => _40("E404")]) && _optionalChain([stdoutData, 'access', _41 => _41.error, 'optionalAccess', _42 => _42.summary, 'optionalAccess', _43 => _43.toLowerCase, 'call', _44 => _44(), 'access', _45 => _45.includes, 'call', _46 => _46("not found")])) && !(_optionalChain([err, 'access', _47 => _47.stderr, 'optionalAccess', _48 => _48.toString, 'call', _49 => _49(), 'access', _50 => _50.includes, 'call', _51 => _51("E404")]) && _optionalChain([err, 'access', _52 => _52.stderr, 'optionalAccess', _53 => _53.toString, 'call', _54 => _54(), 'access', _55 => _55.toLowerCase, 'call', _56 => _56(), 'access', _57 => _57.includes, 'call', _58 => _58("not found")]))) {
413
+ const stdoutData = JSON.parse(_optionalChain([err, 'access', _37 => _37.stdout, 'optionalAccess', _38 => _38.toString, 'call', _39 => _39()]) || "{}");
414
+ 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")]))) {
241
415
  console.error(
242
416
  `Something unexpected went wrong when checking for existing dist-tags.
243
417
 
@@ -284,7 +458,7 @@ Execution response: ${result.toString()}` : ""}
284
458
  console.error("An error occured running npm publish.");
285
459
  console.error("Please see below for more information:");
286
460
  console.info("");
287
- const stdoutData = JSON.parse(_optionalChain([err, 'access', _59 => _59.stdout, 'optionalAccess', _60 => _60.toString, 'call', _61 => _61()]) || "{}");
461
+ const stdoutData = JSON.parse(_optionalChain([err, 'access', _62 => _62.stdout, 'optionalAccess', _63 => _63.toString, 'call', _64 => _64()]) || "{}");
288
462
  if (stdoutData.error.summary) {
289
463
  console.error(stdoutData.error.summary);
290
464
  console.error(stdoutData.error.summary);
@@ -44,9 +44,30 @@ async function getGitHubRegistry() {
44
44
  return DEFAULT_GITHUB_REGISTRY;
45
45
  }
46
46
 
47
+ // ../npm-tools/src/helpers/get-version.ts
48
+
49
+ async function getVersion(packageName, tag = DEFAULT_NPM_TAG, options = {}) {
50
+ const { registry = getRegistry() } = options;
51
+ return new Promise((resolve, reject) => {
52
+ _child_process.exec.call(void 0,
53
+ `npm view ${packageName} version --registry=${registry} --tag=${tag}`,
54
+ (error, stdout, stderr) => {
55
+ if (error) {
56
+ return reject(error);
57
+ }
58
+ if (stderr) {
59
+ return reject(stderr);
60
+ }
61
+ return resolve(stdout.trim());
62
+ }
63
+ );
64
+ });
65
+ }
66
+
67
+
47
68
 
48
69
 
49
70
 
50
71
 
51
72
 
52
- exports.DEFAULT_NPM_TAG = DEFAULT_NPM_TAG; exports.getRegistry = getRegistry; exports.getNpmRegistry = getNpmRegistry; exports.getGitHubRegistry = getGitHubRegistry;
73
+ exports.DEFAULT_NPM_TAG = DEFAULT_NPM_TAG; exports.getRegistry = getRegistry; exports.getNpmRegistry = getNpmRegistry; exports.getGitHubRegistry = getGitHubRegistry; exports.getVersion = getVersion;
@@ -44,9 +44,30 @@ async function getGitHubRegistry() {
44
44
  return DEFAULT_GITHUB_REGISTRY;
45
45
  }
46
46
 
47
+ // ../npm-tools/src/helpers/get-version.ts
48
+ import { exec as exec2 } from "node:child_process";
49
+ async function getVersion(packageName, tag = DEFAULT_NPM_TAG, options = {}) {
50
+ const { registry = getRegistry() } = options;
51
+ return new Promise((resolve, reject) => {
52
+ exec2(
53
+ `npm view ${packageName} version --registry=${registry} --tag=${tag}`,
54
+ (error, stdout, stderr) => {
55
+ if (error) {
56
+ return reject(error);
57
+ }
58
+ if (stderr) {
59
+ return reject(stderr);
60
+ }
61
+ return resolve(stdout.trim());
62
+ }
63
+ );
64
+ });
65
+ }
66
+
47
67
  export {
48
68
  DEFAULT_NPM_TAG,
49
69
  getRegistry,
50
70
  getNpmRegistry,
51
- getGitHubRegistry
71
+ getGitHubRegistry,
72
+ getVersion
52
73
  };
@@ -3,7 +3,8 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkNTQG45CWjs = require('./chunk-NTQG45CW.js');
6
+
7
+ var _chunkDA53ZKBYjs = require('./chunk-DA53ZKBY.js');
7
8
 
8
9
 
9
10
 
@@ -299,28 +300,8 @@ var DEFAULT_CONVENTIONAL_COMMITS_CONFIG = {
299
300
  types: COMMIT_TYPES
300
301
  };
301
302
 
302
- // ../npm-tools/src/helpers/get-version.ts
303
- var _child_process = require('child_process');
304
- async function getVersion(packageName, tag = _chunkNTQG45CWjs.DEFAULT_NPM_TAG, options = {}) {
305
- const { registry = _chunkNTQG45CWjs.getRegistry.call(void 0, ) } = options;
306
- return new Promise((resolve, reject) => {
307
- _child_process.exec.call(void 0,
308
- `npm view ${packageName} version --registry=${registry} --tag=${tag}`,
309
- (error, stdout, stderr) => {
310
- if (error) {
311
- return reject(error);
312
- }
313
- if (stderr) {
314
- return reject(stderr);
315
- }
316
- return resolve(stdout.trim());
317
- }
318
- );
319
- });
320
- }
321
-
322
303
  // src/generators/release-version/generator.ts
323
-
304
+ var _child_process = require('child_process');
324
305
  var _path = require('path');
325
306
  var _config = require('nx/src/command-line/release/config/config');
326
307
 
@@ -466,19 +447,19 @@ To fix this you will either need to add a package.json or Cargo.toml file at tha
466
447
  switch (options.currentVersionResolver) {
467
448
  case "registry": {
468
449
  const metadata = _nullishCoalesce(options.currentVersionResolverMetadata, () => ( {}));
469
- const tag = _nullishCoalesce(metadata.tag, () => ( _chunkNTQG45CWjs.DEFAULT_NPM_TAG));
470
- const registry = await _asyncNullishCoalesce(metadata.registry, async () => ( await _chunkNTQG45CWjs.getRegistry.call(void 0, )));
471
- const npmRegistry = await _chunkNTQG45CWjs.getNpmRegistry.call(void 0, );
472
- const githubRegistry = await _chunkNTQG45CWjs.getGitHubRegistry.call(void 0, );
450
+ const tag = _nullishCoalesce(metadata.tag, () => ( _chunkDA53ZKBYjs.DEFAULT_NPM_TAG));
451
+ const registry = await _asyncNullishCoalesce(metadata.registry, async () => ( await _chunkDA53ZKBYjs.getRegistry.call(void 0, )));
452
+ const npmRegistry = await _chunkDA53ZKBYjs.getNpmRegistry.call(void 0, );
453
+ const githubRegistry = await _chunkDA53ZKBYjs.getGitHubRegistry.call(void 0, );
473
454
  if (options.releaseGroup.projectsRelationship === "independent") {
474
455
  try {
475
- currentVersion = await getVersion(packageName, tag, { registry });
456
+ currentVersion = await _chunkDA53ZKBYjs.getVersion.call(void 0, packageName, tag, { registry });
476
457
  if (!currentVersion) {
477
- currentVersion = await getVersion(packageName, tag, {
458
+ currentVersion = await _chunkDA53ZKBYjs.getVersion.call(void 0, packageName, tag, {
478
459
  registry: npmRegistry
479
460
  });
480
461
  if (!currentVersion) {
481
- currentVersion = await getVersion(packageName, tag, {
462
+ currentVersion = await _chunkDA53ZKBYjs.getVersion.call(void 0, packageName, tag, {
482
463
  registry: githubRegistry
483
464
  });
484
465
  }
@@ -488,7 +469,7 @@ To fix this you will either need to add a package.json or Cargo.toml file at tha
488
469
  );
489
470
  } catch (e) {
490
471
  try {
491
- currentVersion = await getVersion(packageName, tag, {
472
+ currentVersion = await _chunkDA53ZKBYjs.getVersion.call(void 0, packageName, tag, {
492
473
  registry: githubRegistry
493
474
  });
494
475
  log(