@storm-software/pnpm-tools 0.6.69 → 0.6.71

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,21 @@
2
2
 
3
3
  # Changelog for Storm Ops - Pnpm Tools
4
4
 
5
+ ## [0.6.70](https://github.com/storm-software/storm-ops/releases/tag/pnpm-tools%400.6.70) (12/17/2025)
6
+
7
+ ### Updated Dependencies
8
+
9
+ - Updated **npm-tools** to **v0.6.26**
10
+
11
+ ## [0.6.69](https://github.com/storm-software/storm-ops/releases/tag/pnpm-tools%400.6.69) (12/17/2025)
12
+
13
+ ### Updated Dependencies
14
+
15
+ - Updated **testing-tools** to **v1.119.68**
16
+ - Updated **config-tools** to **v1.188.69**
17
+ - Updated **npm-tools** to **v0.6.25**
18
+ - Updated **config** to **v1.134.69**
19
+
5
20
  ## [0.6.68](https://github.com/storm-software/storm-ops/releases/tag/pnpm-tools%400.6.68) (12/16/2025)
6
21
 
7
22
  ### Updated Dependencies
package/bin/pnpm.cjs CHANGED
@@ -184,29 +184,40 @@ async function updateAction(packageNames, {
184
184
  "No catalog found in the pnpm-workspace.yaml file of the current workspace."
185
185
  );
186
186
  }
187
+ let packagesFound = false;
187
188
  for (const pkg of packages) {
188
189
  const matchedPackages = Object.keys(catalog).filter(
189
190
  (p) => pkg.endsWith("/") ? p.startsWith(pkg) : p === pkg
190
191
  );
191
192
  if (matchedPackages.length === 0) {
192
- throw new Error(
193
- `No packages found in the catalog matching the name/pattern "${pkg}".`
193
+ (0, import_config_tools2.writeInfo)(
194
+ `No packages found in the catalog matching the name/pattern "${pkg}".`,
195
+ _config
194
196
  );
195
- }
196
- (0, import_config_tools2.writeTrace)(
197
- `Found ${matchedPackages.length} matching packages in the catalog file:
197
+ } else {
198
+ (0, import_config_tools2.writeTrace)(
199
+ `Found ${matchedPackages.length} matching packages in the catalog file:
198
200
 
199
201
  - ${matchedPackages.map((p) => `${p} (${catalog[p] || "unknown"})`).join("\n- ")}`,
202
+ _config
203
+ );
204
+ packagesFound = true;
205
+ for (const matchedPackage of matchedPackages) {
206
+ (0, import_config_tools2.writeTrace)(`- Upgrading ${matchedPackage}...`, _config);
207
+ catalog = await upgradeCatalog(catalog, matchedPackage, {
208
+ tag,
209
+ prefix,
210
+ workspaceRoot: _config.workspaceRoot
211
+ });
212
+ }
213
+ }
214
+ }
215
+ if (!packagesFound) {
216
+ (0, import_config_tools2.writeWarning)(
217
+ `No packages were updated since no matching packages were found in the catalog.`,
200
218
  _config
201
219
  );
202
- for (const matchedPackage of matchedPackages) {
203
- (0, import_config_tools2.writeTrace)(`- Upgrading ${matchedPackage}...`, _config);
204
- catalog = await upgradeCatalog(catalog, matchedPackage, {
205
- tag,
206
- prefix,
207
- workspaceRoot: _config.workspaceRoot
208
- });
209
- }
220
+ return;
210
221
  }
211
222
  (0, import_config_tools2.writeDebug)(
212
223
  "Finalizing changes to the pnpm workspace's catalog dependencies",
package/bin/pnpm.js CHANGED
@@ -16,7 +16,8 @@ import {
16
16
  writeDebug as writeDebug2,
17
17
  writeFatal,
18
18
  writeInfo,
19
- writeTrace as writeTrace3
19
+ writeTrace as writeTrace3,
20
+ writeWarning as writeWarning2
20
21
  } from "@storm-software/config-tools";
21
22
  import { Command } from "commander";
22
23
 
@@ -199,29 +200,40 @@ async function updateAction(packageNames, {
199
200
  "No catalog found in the pnpm-workspace.yaml file of the current workspace."
200
201
  );
201
202
  }
203
+ let packagesFound = false;
202
204
  for (const pkg of packages) {
203
205
  const matchedPackages = Object.keys(catalog).filter(
204
206
  (p) => pkg.endsWith("/") ? p.startsWith(pkg) : p === pkg
205
207
  );
206
208
  if (matchedPackages.length === 0) {
207
- throw new Error(
208
- `No packages found in the catalog matching the name/pattern "${pkg}".`
209
+ writeInfo(
210
+ `No packages found in the catalog matching the name/pattern "${pkg}".`,
211
+ _config
209
212
  );
210
- }
211
- writeTrace3(
212
- `Found ${matchedPackages.length} matching packages in the catalog file:
213
+ } else {
214
+ writeTrace3(
215
+ `Found ${matchedPackages.length} matching packages in the catalog file:
213
216
 
214
217
  - ${matchedPackages.map((p) => `${p} (${catalog[p] || "unknown"})`).join("\n- ")}`,
218
+ _config
219
+ );
220
+ packagesFound = true;
221
+ for (const matchedPackage of matchedPackages) {
222
+ writeTrace3(`- Upgrading ${matchedPackage}...`, _config);
223
+ catalog = await upgradeCatalog(catalog, matchedPackage, {
224
+ tag,
225
+ prefix,
226
+ workspaceRoot: _config.workspaceRoot
227
+ });
228
+ }
229
+ }
230
+ }
231
+ if (!packagesFound) {
232
+ writeWarning2(
233
+ `No packages were updated since no matching packages were found in the catalog.`,
215
234
  _config
216
235
  );
217
- for (const matchedPackage of matchedPackages) {
218
- writeTrace3(`- Upgrading ${matchedPackage}...`, _config);
219
- catalog = await upgradeCatalog(catalog, matchedPackage, {
220
- tag,
221
- prefix,
222
- workspaceRoot: _config.workspaceRoot
223
- });
224
- }
236
+ return;
225
237
  }
226
238
  writeDebug2(
227
239
  "Finalizing changes to the pnpm workspace's catalog dependencies",
@@ -1 +1 @@
1
- 'use strict';var chunkZT6IQ32X_cjs=require('./chunk-ZT6IQ32X.cjs'),chunkWLY5W32R_cjs=require('./chunk-WLY5W32R.cjs'),devkit=require('@nx/devkit'),fs=require('fs'),promises=require('fs/promises'),prettier=require('prettier');async function C(c=process.cwd(),i=chunkWLY5W32R_cjs.e(c)){let l=chunkWLY5W32R_cjs.d(c,"package.json"),m=await promises.readFile(l,"utf8");if(!m)throw new Error("No package.json file found in package root: "+c);let p=await chunkZT6IQ32X_cjs.b(i),r=JSON.parse(m),g=chunkWLY5W32R_cjs.d(i,"pnpm-workspace.yaml");if(!fs.existsSync(g))return console.warn(`No \`pnpm-workspace.yaml\` file found in workspace root (searching in: ${g}). Skipping pnpm catalog read for now.`),r;if(!p){console.warn("No pnpm catalog found. Skipping dependencies replacement for now.");return}for(let a of ["dependencies","devDependencies","peerDependencies"]){let o=r[a];if(o){for(let e of Object.keys(o))if(o[e]==="catalog:"){if(!p)throw new Error(`Dependency ${e} is marked as \`catalog:\`, but no catalog exists in the workspace root's \`pnpm-workspace.yaml\` file.`);let t=p[e];if(!t)throw new Error("Missing pnpm catalog version for "+e);o[e]=t;}else if(o[e].startsWith("catalog:"))throw new Error("multiple named catalogs not supported")}}let n;try{n=devkit.readCachedProjectGraph();}catch{await devkit.createProjectGraphAsync(),n=devkit.readCachedProjectGraph();}let d={};n&&await Promise.all(Object.keys(n.nodes).map(async a=>{let o=n.nodes[a];if(o?.data.root){let e=chunkWLY5W32R_cjs.d(i,o.data.root,"package.json");if(fs.existsSync(e)){let t=await promises.readFile(e,"utf8"),f=JSON.parse(t);f.private!==true&&(d[f.name]=f.version);}}}));for(let a of ["dependencies","devDependencies","peerDependencies"]){let o=r[a];if(o){for(let e of Object.keys(o))if(o[e].startsWith("workspace:"))if(d[e])o[e]=`^${d[e]}`;else throw new Error(`Workspace dependency ${e} not found in workspace packages.`)}}return promises.writeFile(l,await prettier.format(JSON.stringify(r),{parser:"json",proseWrap:"always",trailingComma:"none",tabWidth:2,semi:true,singleQuote:false,quoteProps:"as-needed",insertPragma:false,bracketSameLine:true,printWidth:80,bracketSpacing:true,arrowParens:"avoid",endOfLine:"lf",plugins:["prettier-plugin-pkg"]}))}exports.a=C;
1
+ 'use strict';var chunkT42A3C2W_cjs=require('./chunk-T42A3C2W.cjs'),chunkWLY5W32R_cjs=require('./chunk-WLY5W32R.cjs'),devkit=require('@nx/devkit'),fs=require('fs'),promises=require('fs/promises'),prettier=require('prettier');async function C(c=process.cwd(),i=chunkWLY5W32R_cjs.e(c)){let l=chunkWLY5W32R_cjs.d(c,"package.json"),m=await promises.readFile(l,"utf8");if(!m)throw new Error("No package.json file found in package root: "+c);let p=await chunkT42A3C2W_cjs.b(i),r=JSON.parse(m),g=chunkWLY5W32R_cjs.d(i,"pnpm-workspace.yaml");if(!fs.existsSync(g))return console.warn(`No \`pnpm-workspace.yaml\` file found in workspace root (searching in: ${g}). Skipping pnpm catalog read for now.`),r;if(!p){console.warn("No pnpm catalog found. Skipping dependencies replacement for now.");return}for(let a of ["dependencies","devDependencies","peerDependencies"]){let o=r[a];if(o){for(let e of Object.keys(o))if(o[e]==="catalog:"){if(!p)throw new Error(`Dependency ${e} is marked as \`catalog:\`, but no catalog exists in the workspace root's \`pnpm-workspace.yaml\` file.`);let t=p[e];if(!t)throw new Error("Missing pnpm catalog version for "+e);o[e]=t;}else if(o[e].startsWith("catalog:"))throw new Error("multiple named catalogs not supported")}}let n;try{n=devkit.readCachedProjectGraph();}catch{await devkit.createProjectGraphAsync(),n=devkit.readCachedProjectGraph();}let d={};n&&await Promise.all(Object.keys(n.nodes).map(async a=>{let o=n.nodes[a];if(o?.data.root){let e=chunkWLY5W32R_cjs.d(i,o.data.root,"package.json");if(fs.existsSync(e)){let t=await promises.readFile(e,"utf8"),f=JSON.parse(t);f.private!==true&&(d[f.name]=f.version);}}}));for(let a of ["dependencies","devDependencies","peerDependencies"]){let o=r[a];if(o){for(let e of Object.keys(o))if(o[e].startsWith("workspace:"))if(d[e])o[e]=`^${d[e]}`;else throw new Error(`Workspace dependency ${e} not found in workspace packages.`)}}return promises.writeFile(l,await prettier.format(JSON.stringify(r),{parser:"json",proseWrap:"always",trailingComma:"none",tabWidth:2,semi:true,singleQuote:false,quoteProps:"as-needed",insertPragma:false,bracketSameLine:true,printWidth:80,bracketSpacing:true,arrowParens:"avoid",endOfLine:"lf",plugins:["prettier-plugin-pkg"]}))}exports.a=C;
@@ -1 +1 @@
1
- import {b}from'./chunk-4P4KPGRI.js';import {e,d}from'./chunk-4Q42GZKA.js';import {readCachedProjectGraph,createProjectGraphAsync}from'@nx/devkit';import {existsSync}from'node:fs';import {readFile,writeFile}from'node:fs/promises';import {format}from'prettier';async function $(c=process.cwd(),i=e(c)){let l=d(c,"package.json"),m=await readFile(l,"utf8");if(!m)throw new Error("No package.json file found in package root: "+c);let p=await b(i),r=JSON.parse(m),g=d(i,"pnpm-workspace.yaml");if(!existsSync(g))return console.warn(`No \`pnpm-workspace.yaml\` file found in workspace root (searching in: ${g}). Skipping pnpm catalog read for now.`),r;if(!p){console.warn("No pnpm catalog found. Skipping dependencies replacement for now.");return}for(let a of ["dependencies","devDependencies","peerDependencies"]){let o=r[a];if(o){for(let e of Object.keys(o))if(o[e]==="catalog:"){if(!p)throw new Error(`Dependency ${e} is marked as \`catalog:\`, but no catalog exists in the workspace root's \`pnpm-workspace.yaml\` file.`);let t=p[e];if(!t)throw new Error("Missing pnpm catalog version for "+e);o[e]=t;}else if(o[e].startsWith("catalog:"))throw new Error("multiple named catalogs not supported")}}let n;try{n=readCachedProjectGraph();}catch{await createProjectGraphAsync(),n=readCachedProjectGraph();}let d$1={};n&&await Promise.all(Object.keys(n.nodes).map(async a=>{let o=n.nodes[a];if(o?.data.root){let e=d(i,o.data.root,"package.json");if(existsSync(e)){let t=await readFile(e,"utf8"),f=JSON.parse(t);f.private!==true&&(d$1[f.name]=f.version);}}}));for(let a of ["dependencies","devDependencies","peerDependencies"]){let o=r[a];if(o){for(let e of Object.keys(o))if(o[e].startsWith("workspace:"))if(d$1[e])o[e]=`^${d$1[e]}`;else throw new Error(`Workspace dependency ${e} not found in workspace packages.`)}}return writeFile(l,await format(JSON.stringify(r),{parser:"json",proseWrap:"always",trailingComma:"none",tabWidth:2,semi:true,singleQuote:false,quoteProps:"as-needed",insertPragma:false,bracketSameLine:true,printWidth:80,bracketSpacing:true,arrowParens:"avoid",endOfLine:"lf",plugins:["prettier-plugin-pkg"]}))}export{$ as a};
1
+ import {b}from'./chunk-TKIYMZ7Y.js';import {e,d}from'./chunk-4Q42GZKA.js';import {readCachedProjectGraph,createProjectGraphAsync}from'@nx/devkit';import {existsSync}from'node:fs';import {readFile,writeFile}from'node:fs/promises';import {format}from'prettier';async function $(c=process.cwd(),i=e(c)){let l=d(c,"package.json"),m=await readFile(l,"utf8");if(!m)throw new Error("No package.json file found in package root: "+c);let p=await b(i),r=JSON.parse(m),g=d(i,"pnpm-workspace.yaml");if(!existsSync(g))return console.warn(`No \`pnpm-workspace.yaml\` file found in workspace root (searching in: ${g}). Skipping pnpm catalog read for now.`),r;if(!p){console.warn("No pnpm catalog found. Skipping dependencies replacement for now.");return}for(let a of ["dependencies","devDependencies","peerDependencies"]){let o=r[a];if(o){for(let e of Object.keys(o))if(o[e]==="catalog:"){if(!p)throw new Error(`Dependency ${e} is marked as \`catalog:\`, but no catalog exists in the workspace root's \`pnpm-workspace.yaml\` file.`);let t=p[e];if(!t)throw new Error("Missing pnpm catalog version for "+e);o[e]=t;}else if(o[e].startsWith("catalog:"))throw new Error("multiple named catalogs not supported")}}let n;try{n=readCachedProjectGraph();}catch{await createProjectGraphAsync(),n=readCachedProjectGraph();}let d$1={};n&&await Promise.all(Object.keys(n.nodes).map(async a=>{let o=n.nodes[a];if(o?.data.root){let e=d(i,o.data.root,"package.json");if(existsSync(e)){let t=await readFile(e,"utf8"),f=JSON.parse(t);f.private!==true&&(d$1[f.name]=f.version);}}}));for(let a of ["dependencies","devDependencies","peerDependencies"]){let o=r[a];if(o){for(let e of Object.keys(o))if(o[e].startsWith("workspace:"))if(d$1[e])o[e]=`^${d$1[e]}`;else throw new Error(`Workspace dependency ${e} not found in workspace packages.`)}}return writeFile(l,await format(JSON.stringify(r),{parser:"json",proseWrap:"always",trailingComma:"none",tabWidth:2,semi:true,singleQuote:false,quoteProps:"as-needed",insertPragma:false,bracketSameLine:true,printWidth:80,bracketSpacing:true,arrowParens:"avoid",endOfLine:"lf",plugins:["prettier-plugin-pkg"]}))}export{$ as a};
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkWLY5W32R_cjs=require('./chunk-WLY5W32R.cjs'),child_process=require('child_process'),semver=require('semver');var h="latest";var u=h;async function _(r="npm"){return new Promise((t,e)=>{child_process.exec(`${r} config get registry`,(o,a,s)=>o&&!o.message.toLowerCase().trim().startsWith("npm warn")?e(o):s&&!s.toLowerCase().trim().startsWith("npm warn")?e(s):t(a.trim()));})}async function d(r,t=u,e={}){let o=e.executable||"npm",a=e.registry||await _(o);return new Promise((s,i)=>{child_process.exec(`${o} view ${r} version --registry=${a} --tag=${t}`,(n,g,p)=>n&&!n.message.toLowerCase().trim().startsWith("npm warn")?i(n):p&&!p.toLowerCase().trim().startsWith("npm warn")?i(p):s(g.trim()));})}async function G(r=chunkWLY5W32R_cjs.e(process.cwd())){let t=await chunkWLY5W32R_cjs.h(r);if(!t)throw new Error("No pnpm-workspace.yaml file found");if(t?.catalog)return Object.fromEntries(Object.entries(t.catalog).map(([e,o])=>[e,o.replaceAll('"',"").replaceAll("'","")]));console.warn(`No catalog found in pnpm-workspace.yaml file located in workspace root: ${r}
2
+ File content: ${JSON.stringify(t,null,2)}`);}async function C(r=chunkWLY5W32R_cjs.e(process.cwd())){let t=await G(r);if(!t)throw new Error("No catalog entries found in pnpm-workspace.yaml file");return t}async function M(r,t=chunkWLY5W32R_cjs.e(process.cwd())){let e=await chunkWLY5W32R_cjs.h(t);if(!e)throw new Error("No pnpm-workspace.yaml file found");e.catalog=Object.fromEntries(Object.entries(r).map(([o,a])=>[o,a.replaceAll('"',"").replaceAll("'","")])),await chunkWLY5W32R_cjs.i(e,t);}async function Q(r,t,e={}){let{tag:o=u,prefix:a="^",workspaceRoot:s=chunkWLY5W32R_cjs.e()}=e,i=await chunkWLY5W32R_cjs.f(true,{workspaceRoot:s});chunkWLY5W32R_cjs.c(`Upgrading catalog entry for package "${t}" with tag "${o}"`,i);let n=await d(t,o,{executable:"pnpm"}),g=`${a||""}${n.replace(/^[\^~><=*]+/g,"")}`;return g===r[t]?chunkWLY5W32R_cjs.c(`The version for package "${t}" is already up to date in the catalog: ${g}`,i):!semver.valid(semver.coerce(r[t]))||semver.coerce(r[t])&&semver.coerce(g)&&semver.gt(semver.coerce(g),semver.coerce(r[t]))?(r[t]=`${a||""}${g.replace(/^[\^~><=*]+/g,"")}`,chunkWLY5W32R_cjs.b(`Writing version ${r[t]} to catalog for "${t}" package`,i)):chunkWLY5W32R_cjs.a(`The current version "${r[t]}" for package "${t}" is greater than or equal to the version "${g}" fetched from the npm registry with tag "${o}". No update performed.`,i),r}async function Z(r,t={}){let{tag:e=u,prefix:o="^",throwIfMissingInCatalog:a=false,workspaceRoot:s=chunkWLY5W32R_cjs.e()}=t,i=await chunkWLY5W32R_cjs.f(true,{workspaceRoot:s}),n=await C(s);if(!n)throw new Error("No catalog found");if(a===true&&!n[r])throw new Error(`Package "${r}" not found in catalog: ${JSON.stringify(n,null,2)}`);chunkWLY5W32R_cjs.c(`Upgrading catalog entry for package "${r}" with tag "${e}"`,i);let g=await d(r,e,{executable:"pnpm"}),p=`${o||""}${g.replace(/^[\^~><=*]+/g,"")}`;p===n[r]?chunkWLY5W32R_cjs.c(`The version for package "${r}" is already up to date in the catalog: ${p}`,i):!semver.valid(semver.coerce(n[r]))||semver.coerce(n[r])&&semver.coerce(p)&&semver.gt(semver.coerce(p),semver.coerce(n[r]))?(n[r]=`${o||""}${p.replace(/^[\^~><=*]+/g,"")}`,chunkWLY5W32R_cjs.b(`Writing version ${n[r]} to catalog for "${r}" package`,i),await M(n,s)):chunkWLY5W32R_cjs.a(`The current version "${n[r]}" for package "${r}" is greater than or equal to the version "${p}" fetched from the npm registry with tag "${e}". No update performed.`,i);}exports.a=G;exports.b=C;exports.c=M;exports.d=Q;exports.e=Z;
@@ -0,0 +1,2 @@
1
+ import {e,h,i,f,c,b,a}from'./chunk-4Q42GZKA.js';import {exec}from'node:child_process';import {valid,coerce,gt}from'semver';var _="latest";var u=_;async function x(r="npm"){return new Promise((t,e)=>{exec(`${r} config get registry`,(o,a,s)=>o&&!o.message.toLowerCase().trim().startsWith("npm warn")?e(o):s&&!s.toLowerCase().trim().startsWith("npm warn")?e(s):t(a.trim()));})}async function R(r,t=u,e={}){let o=e.executable||"npm",a=e.registry||await x(o);return new Promise((s,i)=>{exec(`${o} view ${r} version --registry=${a} --tag=${t}`,(n,g,p)=>n&&!n.message.toLowerCase().trim().startsWith("npm warn")?i(n):p&&!p.toLowerCase().trim().startsWith("npm warn")?i(p):s(g.trim()));})}async function C(r=e(process.cwd())){let t=await h(r);if(!t)throw new Error("No pnpm-workspace.yaml file found");if(t?.catalog)return Object.fromEntries(Object.entries(t.catalog).map(([e,o])=>[e,o.replaceAll('"',"").replaceAll("'","")]));console.warn(`No catalog found in pnpm-workspace.yaml file located in workspace root: ${r}
2
+ File content: ${JSON.stringify(t,null,2)}`);}async function M(r=e(process.cwd())){let t=await C(r);if(!t)throw new Error("No catalog entries found in pnpm-workspace.yaml file");return t}async function v(r,t=e(process.cwd())){let e=await h(t);if(!e)throw new Error("No pnpm-workspace.yaml file found");e.catalog=Object.fromEntries(Object.entries(r).map(([o,a])=>[o,a.replaceAll('"',"").replaceAll("'","")])),await i(e,t);}async function Z(r,t,e$1={}){let{tag:o=u,prefix:a$1="^",workspaceRoot:s=e()}=e$1,i=await f(true,{workspaceRoot:s});c(`Upgrading catalog entry for package "${t}" with tag "${o}"`,i);let n=await R(t,o,{executable:"pnpm"}),g=`${a$1||""}${n.replace(/^[\^~><=*]+/g,"")}`;return g===r[t]?c(`The version for package "${t}" is already up to date in the catalog: ${g}`,i):!valid(coerce(r[t]))||coerce(r[t])&&coerce(g)&&gt(coerce(g),coerce(r[t]))?(r[t]=`${a$1||""}${g.replace(/^[\^~><=*]+/g,"")}`,b(`Writing version ${r[t]} to catalog for "${t}" package`,i)):a(`The current version "${r[t]}" for package "${t}" is greater than or equal to the version "${g}" fetched from the npm registry with tag "${o}". No update performed.`,i),r}async function rr(r,t={}){let{tag:e$1=u,prefix:o="^",throwIfMissingInCatalog:a$1=false,workspaceRoot:s=e()}=t,i=await f(true,{workspaceRoot:s}),n=await M(s);if(!n)throw new Error("No catalog found");if(a$1===true&&!n[r])throw new Error(`Package "${r}" not found in catalog: ${JSON.stringify(n,null,2)}`);c(`Upgrading catalog entry for package "${r}" with tag "${e$1}"`,i);let g=await R(r,e$1,{executable:"pnpm"}),p=`${o||""}${g.replace(/^[\^~><=*]+/g,"")}`;p===n[r]?c(`The version for package "${r}" is already up to date in the catalog: ${p}`,i):!valid(coerce(n[r]))||coerce(n[r])&&coerce(p)&&gt(coerce(p),coerce(n[r]))?(n[r]=`${o||""}${p.replace(/^[\^~><=*]+/g,"")}`,b(`Writing version ${n[r]} to catalog for "${r}" package`,i),await v(n,s)):a(`The current version "${n[r]}" for package "${r}" is greater than or equal to the version "${p}" fetched from the npm registry with tag "${e$1}". No update performed.`,i);}export{C as a,M as b,v as c,Z as d,rr as e};
@@ -1 +1 @@
1
- 'use strict';var chunkZT6IQ32X_cjs=require('../chunk-ZT6IQ32X.cjs');require('../chunk-WLY5W32R.cjs');Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkZT6IQ32X_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkZT6IQ32X_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkZT6IQ32X_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkZT6IQ32X_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkZT6IQ32X_cjs.d}});
1
+ 'use strict';var chunkT42A3C2W_cjs=require('../chunk-T42A3C2W.cjs');require('../chunk-WLY5W32R.cjs');Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkT42A3C2W_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkT42A3C2W_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkT42A3C2W_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkT42A3C2W_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkT42A3C2W_cjs.d}});
@@ -1 +1 @@
1
- export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'../chunk-4P4KPGRI.js';import'../chunk-4Q42GZKA.js';
1
+ export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'../chunk-TKIYMZ7Y.js';import'../chunk-4Q42GZKA.js';
@@ -1 +1 @@
1
- 'use strict';require('../chunk-QNTSKZUU.cjs');var chunkXL5SC25E_cjs=require('../chunk-XL5SC25E.cjs'),chunkZT6IQ32X_cjs=require('../chunk-ZT6IQ32X.cjs'),chunkWLY5W32R_cjs=require('../chunk-WLY5W32R.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunkXL5SC25E_cjs.a}});Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkZT6IQ32X_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkZT6IQ32X_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkZT6IQ32X_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkZT6IQ32X_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkZT6IQ32X_cjs.d}});Object.defineProperty(exports,"getPnpmWorkspaceFilePath",{enumerable:true,get:function(){return chunkWLY5W32R_cjs.g}});Object.defineProperty(exports,"readPnpmWorkspaceFile",{enumerable:true,get:function(){return chunkWLY5W32R_cjs.h}});Object.defineProperty(exports,"writePnpmWorkspaceFile",{enumerable:true,get:function(){return chunkWLY5W32R_cjs.i}});
1
+ 'use strict';require('../chunk-QNTSKZUU.cjs');var chunk5BGT4AMG_cjs=require('../chunk-5BGT4AMG.cjs'),chunkT42A3C2W_cjs=require('../chunk-T42A3C2W.cjs'),chunkWLY5W32R_cjs=require('../chunk-WLY5W32R.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunk5BGT4AMG_cjs.a}});Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkT42A3C2W_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkT42A3C2W_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkT42A3C2W_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkT42A3C2W_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkT42A3C2W_cjs.d}});Object.defineProperty(exports,"getPnpmWorkspaceFilePath",{enumerable:true,get:function(){return chunkWLY5W32R_cjs.g}});Object.defineProperty(exports,"readPnpmWorkspaceFile",{enumerable:true,get:function(){return chunkWLY5W32R_cjs.h}});Object.defineProperty(exports,"writePnpmWorkspaceFile",{enumerable:true,get:function(){return chunkWLY5W32R_cjs.i}});
@@ -1 +1 @@
1
- import'../chunk-GV6YH6UO.js';export{a as replaceDepsAliases}from'../chunk-6OPVLF6K.js';export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'../chunk-4P4KPGRI.js';export{g as getPnpmWorkspaceFilePath,h as readPnpmWorkspaceFile,i as writePnpmWorkspaceFile}from'../chunk-4Q42GZKA.js';
1
+ import'../chunk-GV6YH6UO.js';export{a as replaceDepsAliases}from'../chunk-NWLLISV6.js';export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'../chunk-TKIYMZ7Y.js';export{g as getPnpmWorkspaceFilePath,h as readPnpmWorkspaceFile,i as writePnpmWorkspaceFile}from'../chunk-4Q42GZKA.js';
@@ -1 +1 @@
1
- 'use strict';var chunkXL5SC25E_cjs=require('../chunk-XL5SC25E.cjs');require('../chunk-ZT6IQ32X.cjs'),require('../chunk-WLY5W32R.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunkXL5SC25E_cjs.a}});
1
+ 'use strict';var chunk5BGT4AMG_cjs=require('../chunk-5BGT4AMG.cjs');require('../chunk-T42A3C2W.cjs'),require('../chunk-WLY5W32R.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunk5BGT4AMG_cjs.a}});
@@ -1 +1 @@
1
- export{a as replaceDepsAliases}from'../chunk-6OPVLF6K.js';import'../chunk-4P4KPGRI.js';import'../chunk-4Q42GZKA.js';
1
+ export{a as replaceDepsAliases}from'../chunk-NWLLISV6.js';import'../chunk-TKIYMZ7Y.js';import'../chunk-4Q42GZKA.js';
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';require('./chunk-SFZRYJZ2.cjs'),require('./chunk-QNTSKZUU.cjs');var chunkXL5SC25E_cjs=require('./chunk-XL5SC25E.cjs'),chunkZT6IQ32X_cjs=require('./chunk-ZT6IQ32X.cjs'),chunkWLY5W32R_cjs=require('./chunk-WLY5W32R.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunkXL5SC25E_cjs.a}});Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkZT6IQ32X_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkZT6IQ32X_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkZT6IQ32X_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkZT6IQ32X_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkZT6IQ32X_cjs.d}});Object.defineProperty(exports,"getPnpmWorkspaceFilePath",{enumerable:true,get:function(){return chunkWLY5W32R_cjs.g}});Object.defineProperty(exports,"readPnpmWorkspaceFile",{enumerable:true,get:function(){return chunkWLY5W32R_cjs.h}});Object.defineProperty(exports,"writePnpmWorkspaceFile",{enumerable:true,get:function(){return chunkWLY5W32R_cjs.i}});
1
+ 'use strict';require('./chunk-SFZRYJZ2.cjs'),require('./chunk-QNTSKZUU.cjs');var chunk5BGT4AMG_cjs=require('./chunk-5BGT4AMG.cjs'),chunkT42A3C2W_cjs=require('./chunk-T42A3C2W.cjs'),chunkWLY5W32R_cjs=require('./chunk-WLY5W32R.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunk5BGT4AMG_cjs.a}});Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkT42A3C2W_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkT42A3C2W_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkT42A3C2W_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkT42A3C2W_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkT42A3C2W_cjs.d}});Object.defineProperty(exports,"getPnpmWorkspaceFilePath",{enumerable:true,get:function(){return chunkWLY5W32R_cjs.g}});Object.defineProperty(exports,"readPnpmWorkspaceFile",{enumerable:true,get:function(){return chunkWLY5W32R_cjs.h}});Object.defineProperty(exports,"writePnpmWorkspaceFile",{enumerable:true,get:function(){return chunkWLY5W32R_cjs.i}});
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import'./chunk-GGNOJ77I.js';import'./chunk-GV6YH6UO.js';export{a as replaceDepsAliases}from'./chunk-6OPVLF6K.js';export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'./chunk-4P4KPGRI.js';export{g as getPnpmWorkspaceFilePath,h as readPnpmWorkspaceFile,i as writePnpmWorkspaceFile}from'./chunk-4Q42GZKA.js';
1
+ import'./chunk-GGNOJ77I.js';import'./chunk-GV6YH6UO.js';export{a as replaceDepsAliases}from'./chunk-NWLLISV6.js';export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'./chunk-TKIYMZ7Y.js';export{g as getPnpmWorkspaceFilePath,h as readPnpmWorkspaceFile,i as writePnpmWorkspaceFile}from'./chunk-4Q42GZKA.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/pnpm-tools",
3
- "version": "0.6.69",
3
+ "version": "0.6.71",
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": {
@@ -75,7 +75,7 @@
75
75
  "dependencies": {
76
76
  "@storm-software/config": "^1.134.69",
77
77
  "@storm-software/config-tools": "^1.188.69",
78
- "@storm-software/npm-tools": "^0.6.25",
78
+ "@storm-software/npm-tools": "^0.6.26",
79
79
  "commander": "^12.1.0",
80
80
  "defu": "6.1.4",
81
81
  "prettier": "^3.7.4",
@@ -89,5 +89,5 @@
89
89
  "tsup": "8.4.0"
90
90
  },
91
91
  "publishConfig": { "access": "public" },
92
- "gitHead": "d8aee7840461402f9b37d069474ccd3ea5fda31d"
92
+ "gitHead": "60e42272b8da0b1b1cdf5c6660389215a54a07bd"
93
93
  }
@@ -1,2 +0,0 @@
1
- import {e,h,i,f,c,b,a}from'./chunk-4Q42GZKA.js';import {exec}from'node:child_process';import {valid,coerce,gt}from'semver';var x="latest";var u=x;async function E(r="npm"){return new Promise((t,e)=>{exec(`${r} config get registry`,(o,s,g)=>o?e(o):g?e(g):t(s.trim()));})}async function R(r,t=u,e={}){let o=e.executable||"npm",s=e.registry||await E(o);return new Promise((g,i)=>{exec(`${o} view ${r} version --registry=${s} --tag=${t}`,(n,a,p)=>n?i(n):p?i(p):g(a.trim()));})}async function M(r=e(process.cwd())){let t=await h(r);if(!t)throw new Error("No pnpm-workspace.yaml file found");if(t?.catalog)return Object.fromEntries(Object.entries(t.catalog).map(([e,o])=>[e,o.replaceAll('"',"").replaceAll("'","")]));console.warn(`No catalog found in pnpm-workspace.yaml file located in workspace root: ${r}
2
- File content: ${JSON.stringify(t,null,2)}`);}async function C(r=e(process.cwd())){let t=await M(r);if(!t)throw new Error("No catalog entries found in pnpm-workspace.yaml file");return t}async function v(r,t=e(process.cwd())){let e=await h(t);if(!e)throw new Error("No pnpm-workspace.yaml file found");e.catalog=Object.fromEntries(Object.entries(r).map(([o,s])=>[o,s.replaceAll('"',"").replaceAll("'","")])),await i(e,t);}async function Z(r,t,e$1={}){let{tag:o=u,prefix:s="^",workspaceRoot:g=e()}=e$1,i=await f(true,{workspaceRoot:g});c(`Upgrading catalog entry for package "${t}" with tag "${o}"`,i);let n=await R(t,o,{executable:"pnpm"}),a$1=`${s||""}${n.replace(/^[\^~><=*]+/g,"")}`;return a$1===r[t]?c(`The version for package "${t}" is already up to date in the catalog: ${a$1}`,i):!valid(coerce(r[t]))||coerce(r[t])&&coerce(a$1)&&gt(coerce(a$1),coerce(r[t]))?(r[t]=`${s||""}${a$1.replace(/^[\^~><=*]+/g,"")}`,b(`Writing version ${r[t]} to catalog for "${t}" package`,i)):a(`The current version "${r[t]}" for package "${t}" is greater than or equal to the version "${a$1}" fetched from the npm registry with tag "${o}". No update performed.`,i),r}async function rr(r,t={}){let{tag:e$1=u,prefix:o="^",throwIfMissingInCatalog:s=false,workspaceRoot:g=e()}=t,i=await f(true,{workspaceRoot:g}),n=await C(g);if(!n)throw new Error("No catalog found");if(s===true&&!n[r])throw new Error(`Package "${r}" not found in catalog: ${JSON.stringify(n,null,2)}`);c(`Upgrading catalog entry for package "${r}" with tag "${e$1}"`,i);let a$1=await R(r,e$1,{executable:"pnpm"}),p=`${o||""}${a$1.replace(/^[\^~><=*]+/g,"")}`;p===n[r]?c(`The version for package "${r}" is already up to date in the catalog: ${p}`,i):!valid(coerce(n[r]))||coerce(n[r])&&coerce(p)&&gt(coerce(p),coerce(n[r]))?(n[r]=`${o||""}${p.replace(/^[\^~><=*]+/g,"")}`,b(`Writing version ${n[r]} to catalog for "${r}" package`,i),await v(n,g)):a(`The current version "${n[r]}" for package "${r}" is greater than or equal to the version "${p}" fetched from the npm registry with tag "${e$1}". No update performed.`,i);}export{M as a,C as b,v as c,Z as d,rr as e};
@@ -1,2 +0,0 @@
1
- 'use strict';var chunkWLY5W32R_cjs=require('./chunk-WLY5W32R.cjs'),child_process=require('child_process'),semver=require('semver');var _="latest";var u=_;async function x(r="npm"){return new Promise((t,e)=>{child_process.exec(`${r} config get registry`,(o,s,g)=>o?e(o):g?e(g):t(s.trim()));})}async function $(r,t=u,e={}){let o=e.executable||"npm",s=e.registry||await x(o);return new Promise((g,i)=>{child_process.exec(`${o} view ${r} version --registry=${s} --tag=${t}`,(n,a,p)=>n?i(n):p?i(p):g(a.trim()));})}async function G(r=chunkWLY5W32R_cjs.e(process.cwd())){let t=await chunkWLY5W32R_cjs.h(r);if(!t)throw new Error("No pnpm-workspace.yaml file found");if(t?.catalog)return Object.fromEntries(Object.entries(t.catalog).map(([e,o])=>[e,o.replaceAll('"',"").replaceAll("'","")]));console.warn(`No catalog found in pnpm-workspace.yaml file located in workspace root: ${r}
2
- File content: ${JSON.stringify(t,null,2)}`);}async function M(r=chunkWLY5W32R_cjs.e(process.cwd())){let t=await G(r);if(!t)throw new Error("No catalog entries found in pnpm-workspace.yaml file");return t}async function C(r,t=chunkWLY5W32R_cjs.e(process.cwd())){let e=await chunkWLY5W32R_cjs.h(t);if(!e)throw new Error("No pnpm-workspace.yaml file found");e.catalog=Object.fromEntries(Object.entries(r).map(([o,s])=>[o,s.replaceAll('"',"").replaceAll("'","")])),await chunkWLY5W32R_cjs.i(e,t);}async function Q(r,t,e={}){let{tag:o=u,prefix:s="^",workspaceRoot:g=chunkWLY5W32R_cjs.e()}=e,i=await chunkWLY5W32R_cjs.f(true,{workspaceRoot:g});chunkWLY5W32R_cjs.c(`Upgrading catalog entry for package "${t}" with tag "${o}"`,i);let n=await $(t,o,{executable:"pnpm"}),a=`${s||""}${n.replace(/^[\^~><=*]+/g,"")}`;return a===r[t]?chunkWLY5W32R_cjs.c(`The version for package "${t}" is already up to date in the catalog: ${a}`,i):!semver.valid(semver.coerce(r[t]))||semver.coerce(r[t])&&semver.coerce(a)&&semver.gt(semver.coerce(a),semver.coerce(r[t]))?(r[t]=`${s||""}${a.replace(/^[\^~><=*]+/g,"")}`,chunkWLY5W32R_cjs.b(`Writing version ${r[t]} to catalog for "${t}" package`,i)):chunkWLY5W32R_cjs.a(`The current version "${r[t]}" for package "${t}" is greater than or equal to the version "${a}" fetched from the npm registry with tag "${o}". No update performed.`,i),r}async function Z(r,t={}){let{tag:e=u,prefix:o="^",throwIfMissingInCatalog:s=false,workspaceRoot:g=chunkWLY5W32R_cjs.e()}=t,i=await chunkWLY5W32R_cjs.f(true,{workspaceRoot:g}),n=await M(g);if(!n)throw new Error("No catalog found");if(s===true&&!n[r])throw new Error(`Package "${r}" not found in catalog: ${JSON.stringify(n,null,2)}`);chunkWLY5W32R_cjs.c(`Upgrading catalog entry for package "${r}" with tag "${e}"`,i);let a=await $(r,e,{executable:"pnpm"}),p=`${o||""}${a.replace(/^[\^~><=*]+/g,"")}`;p===n[r]?chunkWLY5W32R_cjs.c(`The version for package "${r}" is already up to date in the catalog: ${p}`,i):!semver.valid(semver.coerce(n[r]))||semver.coerce(n[r])&&semver.coerce(p)&&semver.gt(semver.coerce(p),semver.coerce(n[r]))?(n[r]=`${o||""}${p.replace(/^[\^~><=*]+/g,"")}`,chunkWLY5W32R_cjs.b(`Writing version ${n[r]} to catalog for "${r}" package`,i),await C(n,g)):chunkWLY5W32R_cjs.a(`The current version "${n[r]}" for package "${r}" is greater than or equal to the version "${p}" fetched from the npm registry with tag "${e}". No update performed.`,i);}exports.a=G;exports.b=M;exports.c=C;exports.d=Q;exports.e=Z;