@storm-software/pnpm-tools 0.7.51 → 0.7.52
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/README.md +1 -1
- package/bin/pnpm.cjs +10 -0
- package/bin/pnpm.js +10 -0
- package/dist/{chunk-NB6FQHHB.cjs → chunk-DTAWOJDZ.cjs} +1 -1
- package/dist/{chunk-UI74C5PN.js → chunk-JHUBA5WZ.js} +1 -1
- package/dist/chunk-RO47X6AQ.js +2 -0
- package/dist/chunk-ZQVDV5US.cjs +2 -0
- package/dist/helpers/catalog.cjs +1 -1
- package/dist/helpers/catalog.js +1 -1
- package/dist/helpers/index.cjs +1 -1
- package/dist/helpers/index.js +1 -1
- package/dist/helpers/replace-deps-aliases.cjs +1 -1
- package/dist/helpers/replace-deps-aliases.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +8 -8
- package/dist/chunk-I7B2BT4Q.js +0 -2
- package/dist/chunk-L2TL6LEW.cjs +0 -2
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
27
27
|
|
|
28
28
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
29
29
|
|
|
30
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
31
31
|
|
|
32
32
|
<!-- prettier-ignore-start -->
|
|
33
33
|
<!-- markdownlint-disable -->
|
package/bin/pnpm.cjs
CHANGED
|
@@ -2435,6 +2435,16 @@ async function upgradeCatalog(catalog, packageName, options = {}) {
|
|
|
2435
2435
|
const origVersion = await getVersion(packageName, tag, {
|
|
2436
2436
|
executable: "pnpm"
|
|
2437
2437
|
});
|
|
2438
|
+
if (!origVersion) {
|
|
2439
|
+
throw new Error(
|
|
2440
|
+
`Failed to fetch version for package "${packageName}" with tag "${tag}"`
|
|
2441
|
+
);
|
|
2442
|
+
}
|
|
2443
|
+
if (!(0, import_semver.valid)((0, import_semver.coerce)(origVersion))) {
|
|
2444
|
+
throw new Error(
|
|
2445
|
+
`Invalid version "${origVersion}" fetched for package "${packageName}" with tag "${tag}"`
|
|
2446
|
+
);
|
|
2447
|
+
}
|
|
2438
2448
|
const version = `${prefix || ""}${origVersion.replace(/^[\^~><=*]+/g, "")}`;
|
|
2439
2449
|
let updated = false;
|
|
2440
2450
|
if (!(0, import_semver.valid)((0, import_semver.coerce)(catalog[packageName])) || (0, import_semver.coerce)(catalog[packageName]) && (0, import_semver.coerce)(version) && // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
package/bin/pnpm.js
CHANGED
|
@@ -2413,6 +2413,16 @@ async function upgradeCatalog(catalog, packageName, options = {}) {
|
|
|
2413
2413
|
const origVersion = await getVersion(packageName, tag, {
|
|
2414
2414
|
executable: "pnpm"
|
|
2415
2415
|
});
|
|
2416
|
+
if (!origVersion) {
|
|
2417
|
+
throw new Error(
|
|
2418
|
+
`Failed to fetch version for package "${packageName}" with tag "${tag}"`
|
|
2419
|
+
);
|
|
2420
|
+
}
|
|
2421
|
+
if (!valid(coerce(origVersion))) {
|
|
2422
|
+
throw new Error(
|
|
2423
|
+
`Invalid version "${origVersion}" fetched for package "${packageName}" with tag "${tag}"`
|
|
2424
|
+
);
|
|
2425
|
+
}
|
|
2416
2426
|
const version = `${prefix || ""}${origVersion.replace(/^[\^~><=*]+/g, "")}`;
|
|
2417
2427
|
let updated = false;
|
|
2418
2428
|
if (!valid(coerce(catalog[packageName])) || coerce(catalog[packageName]) && coerce(version) && // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkZQVDV5US_cjs=require('./chunk-ZQVDV5US.cjs'),chunkS3A75EM5_cjs=require('./chunk-S3A75EM5.cjs'),devkit=require('@nx/devkit'),fs=require('fs'),promises=require('fs/promises'),prettier=require('prettier');async function C(c=process.cwd(),i=chunkS3A75EM5_cjs.e(c)){let l=chunkS3A75EM5_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 chunkZQVDV5US_cjs.b(i),a=JSON.parse(m),g=chunkS3A75EM5_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.`),a;if(!p){console.warn("No pnpm catalog found. Skipping dependencies replacement for now.");return}for(let r of ["dependencies","devDependencies","peerDependencies"]){let o=a[r];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 r=>{let o=n.nodes[r];if(o?.data.root){let e=chunkS3A75EM5_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 r of ["dependencies","devDependencies","peerDependencies"]){let o=a[r];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(a),{parser:"json",proseWrap:"preserve",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-packagejson"]}))}exports.a=C;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-RO47X6AQ.js';import {d,e}from'./chunk-X6Z2J5WF.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),a=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.`),a;if(!p){console.warn("No pnpm catalog found. Skipping dependencies replacement for now.");return}for(let r of ["dependencies","devDependencies","peerDependencies"]){let o=a[r];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 r=>{let o=n.nodes[r];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 r of ["dependencies","devDependencies","peerDependencies"]){let o=a[r];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(a),{parser:"json",proseWrap:"preserve",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-packagejson"]}))}export{$ as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {h as h$1,e,i,f,c,b,a}from'./chunk-X6Z2J5WF.js';import {exec}from'node:child_process';import {valid,coerce,gt}from'semver';var _="latest";var l=_;async function E(t="npm"){return new Promise((r,n)=>{exec(`${t} config get registry`,(o,p,s)=>o&&!o.message.toLowerCase().trim().startsWith("npm warn")?n(o):s&&!s.toLowerCase().trim().startsWith("npm warn")?n(s):r(p.trim()));})}async function h(t,r=l,n={}){let o=n.executable||"npm",p=n.registry||await E(o);return new Promise((s,a)=>{exec(`${o} view ${t} version --registry=${p}`,(e,c,i)=>e&&!e.message.toLowerCase().trim().startsWith("npm warn")?a(e):i&&!i.toLowerCase().trim().startsWith("npm warn")?a(i):s(c.trim()));})}async function C(t=e(process.cwd())){let r=await h$1(t);if(!r)throw new Error("No pnpm-workspace.yaml file found");if(r?.catalog)return Object.fromEntries(Object.entries(r.catalog).map(([n,o])=>[n,o.replaceAll('"',"").replaceAll("'","")]));console.warn(`No catalog found in pnpm-workspace.yaml file located in workspace root: ${t}
|
|
2
|
+
File content: ${JSON.stringify(r,null,2)}`);}async function M(t=e(process.cwd())){let r=await C(t);if(!r)throw new Error("No catalog entries found in pnpm-workspace.yaml file");return r}async function v(t,r=e(process.cwd())){let n=await h$1(r);if(!n)throw new Error("No pnpm-workspace.yaml file found");n.catalog=Object.fromEntries(Object.entries(t).map(([o,p])=>[o,p.replaceAll('"',"").replaceAll("'","")])),await i(n,r);}async function Z(t,r,n={}){let{tag:o=l,prefix:p="^",workspaceRoot:s=e()}=n,a=await f(true,{workspaceRoot:s});c(`Upgrading catalog entry for package "${r}" with tag "${o}"`,a);let e$1=await h(r,o,{executable:"pnpm"});if(!e$1)throw new Error(`Failed to fetch version for package "${r}" with tag "${o}"`);if(!valid(coerce(e$1)))throw new Error(`Invalid version "${e$1}" fetched for package "${r}" with tag "${o}"`);let c$1=`${p||""}${e$1.replace(/^[\^~><=*]+/g,"")}`,i=false;return !valid(coerce(t[r]))||coerce(t[r])&&coerce(c$1)&>(coerce(c$1),coerce(t[r]))?(t[r]=`${p||""}${c$1.replace(/^[\^~><=*]+/g,"")}`,b(`Writing version ${t[r]} to catalog for "${r}" package`,a),i=true):b(`The current version ${t[r]} for package "${r}" is greater than or equal to the version ${c$1} fetched from the npm registry with tag "${o}". No update performed.`,a),{catalog:t,updated:i}}async function tt(t,r={}){let{tag:n=l,prefix:o="^",throwIfMissingInCatalog:p=false,workspaceRoot:s=e()}=r,a$1=await f(true,{workspaceRoot:s}),e$1=await M(s);if(!e$1)throw new Error("No catalog found");if(p===true&&!e$1[t])throw new Error(`Package "${t}" not found in catalog: ${JSON.stringify(e$1,null,2)}`);c(`Upgrading catalog entry for package "${t}" with tag "${n}"`,a$1);let c$1=await h(t,n,{executable:"pnpm"}),i=`${o||""}${c$1.replace(/^[\^~><=*]+/g,"")}`;i===e$1[t]?c(`The version for package "${t}" is already up to date in the catalog: ${i}`,a$1):!valid(coerce(e$1[t]))||coerce(e$1[t])&&coerce(i)&>(coerce(i),coerce(e$1[t]))?(e$1[t]=`${o||""}${i.replace(/^[\^~><=*]+/g,"")}`,b(`Writing version ${e$1[t]} to catalog for "${t}" package`,a$1),await v(e$1,s)):a(`The current version "${e$1[t]}" for package "${t}" is greater than or equal to the version "${i}" fetched from the npm registry with tag "${n}". No update performed.`,a$1);}export{C as a,M as b,v as c,Z as d,tt as e};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkS3A75EM5_cjs=require('./chunk-S3A75EM5.cjs'),child_process=require('child_process'),semver=require('semver');var x="latest";var l=x;async function _(t="npm"){return new Promise((r,n)=>{child_process.exec(`${t} config get registry`,(o,p,s)=>o&&!o.message.toLowerCase().trim().startsWith("npm warn")?n(o):s&&!s.toLowerCase().trim().startsWith("npm warn")?n(s):r(p.trim()));})}async function $(t,r=l,n={}){let o=n.executable||"npm",p=n.registry||await _(o);return new Promise((s,a)=>{child_process.exec(`${o} view ${t} version --registry=${p}`,(e,c,i)=>e&&!e.message.toLowerCase().trim().startsWith("npm warn")?a(e):i&&!i.toLowerCase().trim().startsWith("npm warn")?a(i):s(c.trim()));})}async function G(t=chunkS3A75EM5_cjs.e(process.cwd())){let r=await chunkS3A75EM5_cjs.h(t);if(!r)throw new Error("No pnpm-workspace.yaml file found");if(r?.catalog)return Object.fromEntries(Object.entries(r.catalog).map(([n,o])=>[n,o.replaceAll('"',"").replaceAll("'","")]));console.warn(`No catalog found in pnpm-workspace.yaml file located in workspace root: ${t}
|
|
2
|
+
File content: ${JSON.stringify(r,null,2)}`);}async function C(t=chunkS3A75EM5_cjs.e(process.cwd())){let r=await G(t);if(!r)throw new Error("No catalog entries found in pnpm-workspace.yaml file");return r}async function M(t,r=chunkS3A75EM5_cjs.e(process.cwd())){let n=await chunkS3A75EM5_cjs.h(r);if(!n)throw new Error("No pnpm-workspace.yaml file found");n.catalog=Object.fromEntries(Object.entries(t).map(([o,p])=>[o,p.replaceAll('"',"").replaceAll("'","")])),await chunkS3A75EM5_cjs.i(n,r);}async function Q(t,r,n={}){let{tag:o=l,prefix:p="^",workspaceRoot:s=chunkS3A75EM5_cjs.e()}=n,a=await chunkS3A75EM5_cjs.f(true,{workspaceRoot:s});chunkS3A75EM5_cjs.c(`Upgrading catalog entry for package "${r}" with tag "${o}"`,a);let e=await $(r,o,{executable:"pnpm"});if(!e)throw new Error(`Failed to fetch version for package "${r}" with tag "${o}"`);if(!semver.valid(semver.coerce(e)))throw new Error(`Invalid version "${e}" fetched for package "${r}" with tag "${o}"`);let c=`${p||""}${e.replace(/^[\^~><=*]+/g,"")}`,i=false;return !semver.valid(semver.coerce(t[r]))||semver.coerce(t[r])&&semver.coerce(c)&&semver.gt(semver.coerce(c),semver.coerce(t[r]))?(t[r]=`${p||""}${c.replace(/^[\^~><=*]+/g,"")}`,chunkS3A75EM5_cjs.b(`Writing version ${t[r]} to catalog for "${r}" package`,a),i=true):chunkS3A75EM5_cjs.b(`The current version ${t[r]} for package "${r}" is greater than or equal to the version ${c} fetched from the npm registry with tag "${o}". No update performed.`,a),{catalog:t,updated:i}}async function Z(t,r={}){let{tag:n=l,prefix:o="^",throwIfMissingInCatalog:p=false,workspaceRoot:s=chunkS3A75EM5_cjs.e()}=r,a=await chunkS3A75EM5_cjs.f(true,{workspaceRoot:s}),e=await C(s);if(!e)throw new Error("No catalog found");if(p===true&&!e[t])throw new Error(`Package "${t}" not found in catalog: ${JSON.stringify(e,null,2)}`);chunkS3A75EM5_cjs.c(`Upgrading catalog entry for package "${t}" with tag "${n}"`,a);let c=await $(t,n,{executable:"pnpm"}),i=`${o||""}${c.replace(/^[\^~><=*]+/g,"")}`;i===e[t]?chunkS3A75EM5_cjs.c(`The version for package "${t}" is already up to date in the catalog: ${i}`,a):!semver.valid(semver.coerce(e[t]))||semver.coerce(e[t])&&semver.coerce(i)&&semver.gt(semver.coerce(i),semver.coerce(e[t]))?(e[t]=`${o||""}${i.replace(/^[\^~><=*]+/g,"")}`,chunkS3A75EM5_cjs.b(`Writing version ${e[t]} to catalog for "${t}" package`,a),await M(e,s)):chunkS3A75EM5_cjs.a(`The current version "${e[t]}" for package "${t}" is greater than or equal to the version "${i}" fetched from the npm registry with tag "${n}". No update performed.`,a);}exports.a=G;exports.b=C;exports.c=M;exports.d=Q;exports.e=Z;
|
package/dist/helpers/catalog.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkZQVDV5US_cjs=require('../chunk-ZQVDV5US.cjs');require('../chunk-S3A75EM5.cjs');Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkZQVDV5US_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkZQVDV5US_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkZQVDV5US_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkZQVDV5US_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkZQVDV5US_cjs.d}});
|
package/dist/helpers/catalog.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'../chunk-
|
|
1
|
+
export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'../chunk-RO47X6AQ.js';import'../chunk-X6Z2J5WF.js';
|
package/dist/helpers/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';require('../chunk-QNTSKZUU.cjs');var
|
|
1
|
+
'use strict';require('../chunk-QNTSKZUU.cjs');var chunkDTAWOJDZ_cjs=require('../chunk-DTAWOJDZ.cjs'),chunkZQVDV5US_cjs=require('../chunk-ZQVDV5US.cjs'),chunkS3A75EM5_cjs=require('../chunk-S3A75EM5.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunkDTAWOJDZ_cjs.a}});Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkZQVDV5US_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkZQVDV5US_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkZQVDV5US_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkZQVDV5US_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkZQVDV5US_cjs.d}});Object.defineProperty(exports,"getPnpmWorkspaceFilePath",{enumerable:true,get:function(){return chunkS3A75EM5_cjs.g}});Object.defineProperty(exports,"readPnpmWorkspaceFile",{enumerable:true,get:function(){return chunkS3A75EM5_cjs.h}});Object.defineProperty(exports,"writePnpmWorkspaceFile",{enumerable:true,get:function(){return chunkS3A75EM5_cjs.i}});
|
package/dist/helpers/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import'../chunk-GV6YH6UO.js';export{a as replaceDepsAliases}from'../chunk-
|
|
1
|
+
import'../chunk-GV6YH6UO.js';export{a as replaceDepsAliases}from'../chunk-JHUBA5WZ.js';export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'../chunk-RO47X6AQ.js';export{g as getPnpmWorkspaceFilePath,h as readPnpmWorkspaceFile,i as writePnpmWorkspaceFile}from'../chunk-X6Z2J5WF.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkDTAWOJDZ_cjs=require('../chunk-DTAWOJDZ.cjs');require('../chunk-ZQVDV5US.cjs'),require('../chunk-S3A75EM5.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunkDTAWOJDZ_cjs.a}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as replaceDepsAliases}from'../chunk-
|
|
1
|
+
export{a as replaceDepsAliases}from'../chunk-JHUBA5WZ.js';import'../chunk-RO47X6AQ.js';import'../chunk-X6Z2J5WF.js';
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';require('./chunk-SFZRYJZ2.cjs'),require('./chunk-QNTSKZUU.cjs');var
|
|
1
|
+
'use strict';require('./chunk-SFZRYJZ2.cjs'),require('./chunk-QNTSKZUU.cjs');var chunkDTAWOJDZ_cjs=require('./chunk-DTAWOJDZ.cjs'),chunkZQVDV5US_cjs=require('./chunk-ZQVDV5US.cjs'),chunkS3A75EM5_cjs=require('./chunk-S3A75EM5.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunkDTAWOJDZ_cjs.a}});Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkZQVDV5US_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkZQVDV5US_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkZQVDV5US_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkZQVDV5US_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkZQVDV5US_cjs.d}});Object.defineProperty(exports,"getPnpmWorkspaceFilePath",{enumerable:true,get:function(){return chunkS3A75EM5_cjs.g}});Object.defineProperty(exports,"readPnpmWorkspaceFile",{enumerable:true,get:function(){return chunkS3A75EM5_cjs.h}});Object.defineProperty(exports,"writePnpmWorkspaceFile",{enumerable:true,get:function(){return chunkS3A75EM5_cjs.i}});
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import'./chunk-GGNOJ77I.js';import'./chunk-GV6YH6UO.js';export{a as replaceDepsAliases}from'./chunk-
|
|
1
|
+
import'./chunk-GGNOJ77I.js';import'./chunk-GV6YH6UO.js';export{a as replaceDepsAliases}from'./chunk-JHUBA5WZ.js';export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'./chunk-RO47X6AQ.js';export{g as getPnpmWorkspaceFilePath,h as readPnpmWorkspaceFile,i as writePnpmWorkspaceFile}from'./chunk-X6Z2J5WF.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/pnpm-tools",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.52",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A set of [pnpm](https://pnpm.io/) plugins and utilities for managing workspace packages/dependencies.",
|
|
6
6
|
"repository": {
|
|
@@ -73,23 +73,23 @@
|
|
|
73
73
|
"storm-pnpm-esm": "./bin/pnpm.js"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@storm-software/config": "
|
|
77
|
-
"@storm-software/config-tools": "
|
|
78
|
-
"@storm-software/npm-tools": "
|
|
79
|
-
"@storm-software/package-constants": "
|
|
76
|
+
"@storm-software/config": "1.137.73",
|
|
77
|
+
"@storm-software/config-tools": "1.190.41",
|
|
78
|
+
"@storm-software/npm-tools": "0.6.159",
|
|
79
|
+
"@storm-software/package-constants": "0.1.54",
|
|
80
80
|
"chalk": "^4.1.2",
|
|
81
81
|
"commander": "^12.1.0",
|
|
82
82
|
"defu": "^6.1.7",
|
|
83
83
|
"prettier": "^3.8.3",
|
|
84
84
|
"prettier-plugin-packagejson": "^3.0.2",
|
|
85
|
-
"semver": "^7.8.
|
|
85
|
+
"semver": "^7.8.2",
|
|
86
86
|
"yaml": "^2.9.0"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
89
|
"@pnpm/types": "^1001.3.0",
|
|
90
|
-
"@types/node": "^25.9.
|
|
90
|
+
"@types/node": "^25.9.2",
|
|
91
91
|
"tsup": "8.4.0"
|
|
92
92
|
},
|
|
93
93
|
"publishConfig": { "access": "public" },
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "8b04bd1c84001d6ac81a2ca2348660b2c8a2f52f"
|
|
95
95
|
}
|
package/dist/chunk-I7B2BT4Q.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {h as h$1,e,i,f,c,b,a}from'./chunk-X6Z2J5WF.js';import {exec}from'node:child_process';import {valid,coerce,gt}from'semver';var $="latest";var l=$;async function h(t="npm"){return new Promise((r,e)=>{exec(`${t} config get registry`,(o,g,s)=>o&&!o.message.toLowerCase().trim().startsWith("npm warn")?e(o):s&&!s.toLowerCase().trim().startsWith("npm warn")?e(s):r(g.trim()));})}async function R(t,r=l,e={}){let o=e.executable||"npm",g=e.registry||await h(o);return new Promise((s,a)=>{exec(`${o} view ${t} version --registry=${g}`,(n,c,i)=>n&&!n.message.toLowerCase().trim().startsWith("npm warn")?a(n):i&&!i.toLowerCase().trim().startsWith("npm warn")?a(i):s(c.trim()));})}async function C(t=e(process.cwd())){let r=await h$1(t);if(!r)throw new Error("No pnpm-workspace.yaml file found");if(r?.catalog)return Object.fromEntries(Object.entries(r.catalog).map(([e,o])=>[e,o.replaceAll('"',"").replaceAll("'","")]));console.warn(`No catalog found in pnpm-workspace.yaml file located in workspace root: ${t}
|
|
2
|
-
File content: ${JSON.stringify(r,null,2)}`);}async function M(t=e(process.cwd())){let r=await C(t);if(!r)throw new Error("No catalog entries found in pnpm-workspace.yaml file");return r}async function I(t,r=e(process.cwd())){let e=await h$1(r);if(!e)throw new Error("No pnpm-workspace.yaml file found");e.catalog=Object.fromEntries(Object.entries(t).map(([o,g])=>[o,g.replaceAll('"',"").replaceAll("'","")])),await i(e,r);}async function Z(t,r,e$1={}){let{tag:o=l,prefix:g="^",workspaceRoot:s=e()}=e$1,a=await f(true,{workspaceRoot:s});c(`Upgrading catalog entry for package "${r}" with tag "${o}"`,a);let n=await R(r,o,{executable:"pnpm"}),c$1=`${g||""}${n.replace(/^[\^~><=*]+/g,"")}`,i=false;return !valid(coerce(t[r]))||coerce(t[r])&&coerce(c$1)&>(coerce(c$1),coerce(t[r]))?(t[r]=`${g||""}${c$1.replace(/^[\^~><=*]+/g,"")}`,b(`Writing version ${t[r]} to catalog for "${r}" package`,a),i=true):b(`The current version ${t[r]} for package "${r}" is greater than or equal to the version ${c$1} fetched from the npm registry with tag "${o}". No update performed.`,a),{catalog:t,updated:i}}async function tt(t,r={}){let{tag:e$1=l,prefix:o="^",throwIfMissingInCatalog:g=false,workspaceRoot:s=e()}=r,a$1=await f(true,{workspaceRoot:s}),n=await M(s);if(!n)throw new Error("No catalog found");if(g===true&&!n[t])throw new Error(`Package "${t}" not found in catalog: ${JSON.stringify(n,null,2)}`);c(`Upgrading catalog entry for package "${t}" with tag "${e$1}"`,a$1);let c$1=await R(t,e$1,{executable:"pnpm"}),i=`${o||""}${c$1.replace(/^[\^~><=*]+/g,"")}`;i===n[t]?c(`The version for package "${t}" is already up to date in the catalog: ${i}`,a$1):!valid(coerce(n[t]))||coerce(n[t])&&coerce(i)&>(coerce(i),coerce(n[t]))?(n[t]=`${o||""}${i.replace(/^[\^~><=*]+/g,"")}`,b(`Writing version ${n[t]} to catalog for "${t}" package`,a$1),await I(n,s)):a(`The current version "${n[t]}" for package "${t}" is greater than or equal to the version "${i}" fetched from the npm registry with tag "${e$1}". No update performed.`,a$1);}export{C as a,M as b,I as c,Z as d,tt as e};
|
package/dist/chunk-L2TL6LEW.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkS3A75EM5_cjs=require('./chunk-S3A75EM5.cjs'),child_process=require('child_process'),semver=require('semver');var _="latest";var l=_;async function $(t="npm"){return new Promise((r,e)=>{child_process.exec(`${t} config get registry`,(o,g,s)=>o&&!o.message.toLowerCase().trim().startsWith("npm warn")?e(o):s&&!s.toLowerCase().trim().startsWith("npm warn")?e(s):r(g.trim()));})}async function y(t,r=l,e={}){let o=e.executable||"npm",g=e.registry||await $(o);return new Promise((s,a)=>{child_process.exec(`${o} view ${t} version --registry=${g}`,(n,c,i)=>n&&!n.message.toLowerCase().trim().startsWith("npm warn")?a(n):i&&!i.toLowerCase().trim().startsWith("npm warn")?a(i):s(c.trim()));})}async function G(t=chunkS3A75EM5_cjs.e(process.cwd())){let r=await chunkS3A75EM5_cjs.h(t);if(!r)throw new Error("No pnpm-workspace.yaml file found");if(r?.catalog)return Object.fromEntries(Object.entries(r.catalog).map(([e,o])=>[e,o.replaceAll('"',"").replaceAll("'","")]));console.warn(`No catalog found in pnpm-workspace.yaml file located in workspace root: ${t}
|
|
2
|
-
File content: ${JSON.stringify(r,null,2)}`);}async function C(t=chunkS3A75EM5_cjs.e(process.cwd())){let r=await G(t);if(!r)throw new Error("No catalog entries found in pnpm-workspace.yaml file");return r}async function M(t,r=chunkS3A75EM5_cjs.e(process.cwd())){let e=await chunkS3A75EM5_cjs.h(r);if(!e)throw new Error("No pnpm-workspace.yaml file found");e.catalog=Object.fromEntries(Object.entries(t).map(([o,g])=>[o,g.replaceAll('"',"").replaceAll("'","")])),await chunkS3A75EM5_cjs.i(e,r);}async function Q(t,r,e={}){let{tag:o=l,prefix:g="^",workspaceRoot:s=chunkS3A75EM5_cjs.e()}=e,a=await chunkS3A75EM5_cjs.f(true,{workspaceRoot:s});chunkS3A75EM5_cjs.c(`Upgrading catalog entry for package "${r}" with tag "${o}"`,a);let n=await y(r,o,{executable:"pnpm"}),c=`${g||""}${n.replace(/^[\^~><=*]+/g,"")}`,i=false;return !semver.valid(semver.coerce(t[r]))||semver.coerce(t[r])&&semver.coerce(c)&&semver.gt(semver.coerce(c),semver.coerce(t[r]))?(t[r]=`${g||""}${c.replace(/^[\^~><=*]+/g,"")}`,chunkS3A75EM5_cjs.b(`Writing version ${t[r]} to catalog for "${r}" package`,a),i=true):chunkS3A75EM5_cjs.b(`The current version ${t[r]} for package "${r}" is greater than or equal to the version ${c} fetched from the npm registry with tag "${o}". No update performed.`,a),{catalog:t,updated:i}}async function Z(t,r={}){let{tag:e=l,prefix:o="^",throwIfMissingInCatalog:g=false,workspaceRoot:s=chunkS3A75EM5_cjs.e()}=r,a=await chunkS3A75EM5_cjs.f(true,{workspaceRoot:s}),n=await C(s);if(!n)throw new Error("No catalog found");if(g===true&&!n[t])throw new Error(`Package "${t}" not found in catalog: ${JSON.stringify(n,null,2)}`);chunkS3A75EM5_cjs.c(`Upgrading catalog entry for package "${t}" with tag "${e}"`,a);let c=await y(t,e,{executable:"pnpm"}),i=`${o||""}${c.replace(/^[\^~><=*]+/g,"")}`;i===n[t]?chunkS3A75EM5_cjs.c(`The version for package "${t}" is already up to date in the catalog: ${i}`,a):!semver.valid(semver.coerce(n[t]))||semver.coerce(n[t])&&semver.coerce(i)&&semver.gt(semver.coerce(i),semver.coerce(n[t]))?(n[t]=`${o||""}${i.replace(/^[\^~><=*]+/g,"")}`,chunkS3A75EM5_cjs.b(`Writing version ${n[t]} to catalog for "${t}" package`,a),await M(n,s)):chunkS3A75EM5_cjs.a(`The current version "${n[t]}" for package "${t}" is greater than or equal to the version "${i}" fetched from the npm registry with tag "${e}". No update performed.`,a);}exports.a=G;exports.b=C;exports.c=M;exports.d=Q;exports.e=Z;
|