@storm-software/pnpm-tools 0.4.1 → 0.4.3

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,41 @@
2
2
 
3
3
  # Changelog for Storm Ops - Pnpm Tools
4
4
 
5
+ ## [0.4.2](https://github.com/storm-software/storm-ops/releases/tag/pnpm-tools%400.4.2) (2025-09-19)
6
+
7
+ ### Bug Fixes
8
+
9
+ - **pnpm-tools:** Resolve issue with `action` methods parameters
10
+ ([615ee65c5](https://github.com/storm-software/storm-ops/commit/615ee65c5))
11
+
12
+ ### Miscellaneous
13
+
14
+ - **monorepo:** Update workspace package links
15
+ ([8a98818fa](https://github.com/storm-software/storm-ops/commit/8a98818fa))
16
+
17
+ ### Updated Dependencies
18
+
19
+ - Updated config-tools to 1.186.2
20
+ - Updated npm-tools to 0.4.2
21
+
22
+ ## [0.4.1](https://github.com/storm-software/storm-ops/releases/tag/pnpm-tools%400.4.1) (2025-09-19)
23
+
24
+ ### Bug Fixes
25
+
26
+ - **pnpm-tools:** Resolve issue parsing the `name` command-line argument
27
+ ([532d37c75](https://github.com/storm-software/storm-ops/commit/532d37c75))
28
+
29
+ ### Miscellaneous
30
+
31
+ - **monorepo:** Update workspace package links
32
+ ([8cd386592](https://github.com/storm-software/storm-ops/commit/8cd386592))
33
+
34
+ ### Updated Dependencies
35
+
36
+ - Updated config-tools to 1.186.1
37
+ - Updated npm-tools to 0.4.1
38
+ - Updated config to 1.132.1
39
+
5
40
  ## [0.4.0](https://github.com/storm-software/storm-ops/releases/tag/pnpm-tools%400.4.0) (2025-09-18)
6
41
 
7
42
  ### 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-0.3.4-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-0.4.1-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 -->
package/bin/pnpm.cjs CHANGED
@@ -122,7 +122,7 @@ async function upgradeCatalogPackage(packageName, options = {}) {
122
122
  var _config = {};
123
123
  function createProgram(config) {
124
124
  _config = config;
125
- (0, import_config_tools.writeInfo)("\u26A1 Running Storm pnpm command-line application", config);
125
+ (0, import_config_tools.writeInfo)("\u26A1 Running the `storm-pnpm` command-line application", config);
126
126
  const root = (0, import_config_tools.findWorkspaceRootSafe)(process.cwd());
127
127
  process.env.STORM_WORKSPACE_ROOT ??= root;
128
128
  process.env.NX_WORKSPACE_ROOT_PATH ??= root;
@@ -133,7 +133,7 @@ function createProgram(config) {
133
133
  program.version("1.0.0", "-v --version", "display CLI version");
134
134
  program.command("update").description("Update pnpm catalog dependency package version.").addArgument(
135
135
  new import_commander.Argument(
136
- "<name>",
136
+ "<package-name>",
137
137
  "The package name/pattern to update the version for (e.g., @storm-software/config or @storm-software/ for all Storm packages)."
138
138
  )
139
139
  ).option(
@@ -143,13 +143,12 @@ function createProgram(config) {
143
143
  ).action(updateAction);
144
144
  return program;
145
145
  }
146
- async function updateAction({
147
- name,
146
+ async function updateAction(packageName, {
148
147
  tag
149
148
  }) {
150
149
  try {
151
150
  (0, import_config_tools.writeInfo)(
152
- `\u26A1 Preparing to update the package version for ${name}. Please provide the requested details below...`,
151
+ `\u26A1 Preparing to update the package version for ${packageName}.`,
153
152
  _config
154
153
  );
155
154
  const catalog = await getCatalog();
@@ -158,19 +157,37 @@ async function updateAction({
158
157
  "No catalog found in the pnpm-workspace.yaml file of the current workspace."
159
158
  );
160
159
  }
160
+ (0, import_config_tools.writeTrace)(
161
+ `Found catalog file with the following details:
162
+
163
+ ${JSON.stringify(
164
+ catalog
165
+ )}`,
166
+ _config
167
+ );
161
168
  const matchedPackages = Object.keys(catalog).filter(
162
- (pkg) => name.endsWith("/") ? pkg.startsWith(name) : pkg === name
169
+ (pkg) => packageName.endsWith("/") ? pkg.startsWith(packageName) : pkg === packageName
163
170
  );
164
171
  if (matchedPackages.length === 0) {
165
172
  throw new Error(
166
- `No packages found in the catalog matching the name/pattern "${name}".`
173
+ `No packages found in the catalog matching the name/pattern "${packageName}".`
167
174
  );
168
175
  }
176
+ (0, import_config_tools.writeTrace)(
177
+ `Found ${matchedPackages.length} matching packages in the catalog file:
178
+
179
+ - ${matchedPackages.join("\n- ")}`,
180
+ _config
181
+ );
169
182
  await Promise.all(
170
183
  matchedPackages.map(
171
184
  (pkg) => upgradeCatalogPackage(pkg, { tag, throwIfMissingInCatalog: true })
172
185
  )
173
186
  );
187
+ (0, import_config_tools.writeTrace)(
188
+ "Running `pnpm dedupe` to update local dependency versions",
189
+ _config
190
+ );
174
191
  await new Promise((resolve, reject) => {
175
192
  (0, import_node_child_process.exec)("pnpm dedupe", (error, stdout, stderr) => {
176
193
  if (error) {
@@ -190,7 +207,11 @@ async function updateAction({
190
207
  (0, import_config_tools.writeFatal)(
191
208
  `A fatal error occurred while running Storm pnpm update:
192
209
 
193
- ${error.message}`,
210
+ ${JSON.stringify(
211
+ error,
212
+ null,
213
+ 2
214
+ )}`,
194
215
  _config
195
216
  );
196
217
  throw new Error(error.message, { cause: error });
package/bin/pnpm.js CHANGED
@@ -14,7 +14,8 @@ import {
14
14
  findWorkspaceRootSafe,
15
15
  writeFatal,
16
16
  writeInfo,
17
- writeSuccess
17
+ writeSuccess,
18
+ writeTrace
18
19
  } from "@storm-software/config-tools";
19
20
  import { Argument, Command } from "commander";
20
21
  import { exec } from "node:child_process";
@@ -131,7 +132,7 @@ async function upgradeCatalogPackage(packageName, options = {}) {
131
132
  var _config = {};
132
133
  function createProgram(config) {
133
134
  _config = config;
134
- writeInfo("\u26A1 Running Storm pnpm command-line application", config);
135
+ writeInfo("\u26A1 Running the `storm-pnpm` command-line application", config);
135
136
  const root = findWorkspaceRootSafe(process.cwd());
136
137
  process.env.STORM_WORKSPACE_ROOT ??= root;
137
138
  process.env.NX_WORKSPACE_ROOT_PATH ??= root;
@@ -142,7 +143,7 @@ function createProgram(config) {
142
143
  program.version("1.0.0", "-v --version", "display CLI version");
143
144
  program.command("update").description("Update pnpm catalog dependency package version.").addArgument(
144
145
  new Argument(
145
- "<name>",
146
+ "<package-name>",
146
147
  "The package name/pattern to update the version for (e.g., @storm-software/config or @storm-software/ for all Storm packages)."
147
148
  )
148
149
  ).option(
@@ -152,13 +153,12 @@ function createProgram(config) {
152
153
  ).action(updateAction);
153
154
  return program;
154
155
  }
155
- async function updateAction({
156
- name,
156
+ async function updateAction(packageName, {
157
157
  tag
158
158
  }) {
159
159
  try {
160
160
  writeInfo(
161
- `\u26A1 Preparing to update the package version for ${name}. Please provide the requested details below...`,
161
+ `\u26A1 Preparing to update the package version for ${packageName}.`,
162
162
  _config
163
163
  );
164
164
  const catalog = await getCatalog();
@@ -167,19 +167,37 @@ async function updateAction({
167
167
  "No catalog found in the pnpm-workspace.yaml file of the current workspace."
168
168
  );
169
169
  }
170
+ writeTrace(
171
+ `Found catalog file with the following details:
172
+
173
+ ${JSON.stringify(
174
+ catalog
175
+ )}`,
176
+ _config
177
+ );
170
178
  const matchedPackages = Object.keys(catalog).filter(
171
- (pkg) => name.endsWith("/") ? pkg.startsWith(name) : pkg === name
179
+ (pkg) => packageName.endsWith("/") ? pkg.startsWith(packageName) : pkg === packageName
172
180
  );
173
181
  if (matchedPackages.length === 0) {
174
182
  throw new Error(
175
- `No packages found in the catalog matching the name/pattern "${name}".`
183
+ `No packages found in the catalog matching the name/pattern "${packageName}".`
176
184
  );
177
185
  }
186
+ writeTrace(
187
+ `Found ${matchedPackages.length} matching packages in the catalog file:
188
+
189
+ - ${matchedPackages.join("\n- ")}`,
190
+ _config
191
+ );
178
192
  await Promise.all(
179
193
  matchedPackages.map(
180
194
  (pkg) => upgradeCatalogPackage(pkg, { tag, throwIfMissingInCatalog: true })
181
195
  )
182
196
  );
197
+ writeTrace(
198
+ "Running `pnpm dedupe` to update local dependency versions",
199
+ _config
200
+ );
183
201
  await new Promise((resolve, reject) => {
184
202
  exec("pnpm dedupe", (error, stdout, stderr) => {
185
203
  if (error) {
@@ -199,7 +217,11 @@ async function updateAction({
199
217
  writeFatal(
200
218
  `A fatal error occurred while running Storm pnpm update:
201
219
 
202
- ${error.message}`,
220
+ ${JSON.stringify(
221
+ error,
222
+ null,
223
+ 2
224
+ )}`,
203
225
  _config
204
226
  );
205
227
  throw new Error(error.message, { cause: error });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/pnpm-tools",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "type": "module",
5
5
  "description": "A set of [pnpm](https://pnpm.io/) plugins and utilities for managing workspace packages/dependencies.",
6
6
  "repository": {
@@ -89,9 +89,9 @@
89
89
  "dependencies": {
90
90
  "@pnpm/plugin-better-defaults": "^0.2.1",
91
91
  "@pnpm/plugin-esm-node-path": "^0.1.2",
92
- "@storm-software/config": "^1.132.1",
93
- "@storm-software/config-tools": "^1.186.1",
94
- "@storm-software/npm-tools": "^0.4.1",
92
+ "@storm-software/config": "^1.132.2",
93
+ "@storm-software/config-tools": "^1.186.3",
94
+ "@storm-software/npm-tools": "^0.4.3",
95
95
  "commander": "^12.1.0",
96
96
  "defu": "6.1.4",
97
97
  "prettier": "^3.5.1",
@@ -105,5 +105,5 @@
105
105
  "tsup": "8.4.0"
106
106
  },
107
107
  "publishConfig": { "access": "public" },
108
- "gitHead": "cb00892486b8fc96935426f52b620361ae5bb9bb"
108
+ "gitHead": "4685d950fde94a24f6739526637a100d134c3623"
109
109
  }