@storm-software/pnpm-tools 0.5.6 → 0.5.8
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 +37 -0
- package/README.md +1 -1
- package/bin/pnpm.cjs +17 -27
- package/bin/pnpm.js +17 -27
- package/dist/chunk-EWC64ZZT.js +2 -0
- package/dist/{chunk-DKJSL5MN.js → chunk-FCOQR6F7.js} +1 -1
- package/dist/{chunk-464YYKNC.cjs → chunk-NR4Q3RAB.cjs} +1 -1
- package/dist/chunk-QHK5XUKM.cjs +2 -0
- package/dist/helpers/catalog.cjs +1 -1
- package/dist/helpers/catalog.d.cts +11 -2
- package/dist/helpers/catalog.d.ts +11 -2
- package/dist/helpers/catalog.js +1 -1
- package/dist/helpers/index.cjs +1 -1
- package/dist/helpers/index.d.cts +1 -1
- package/dist/helpers/index.d.ts +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.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-IGTMDPZL.js +0 -2
- package/dist/chunk-TNPBYVPP.cjs +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - Pnpm Tools
|
|
4
4
|
|
|
5
|
+
## [0.5.7](https://github.com/storm-software/storm-ops/releases/tag/pnpm-tools%400.5.7) (2025-09-22)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- **pnpm-tools:** Update `storm-pnpm` CLI to save catalog changes once
|
|
10
|
+
([ebc9936df](https://github.com/storm-software/storm-ops/commit/ebc9936df))
|
|
11
|
+
|
|
12
|
+
### Miscellaneous
|
|
13
|
+
|
|
14
|
+
- **monorepo:** Update package builds to use `silent` option
|
|
15
|
+
([8a992e348](https://github.com/storm-software/storm-ops/commit/8a992e348))
|
|
16
|
+
- **monorepo:** Update workspace package links
|
|
17
|
+
([76c1b30a2](https://github.com/storm-software/storm-ops/commit/76c1b30a2))
|
|
18
|
+
|
|
19
|
+
### Updated Dependencies
|
|
20
|
+
|
|
21
|
+
- Updated config-tools to 1.187.9
|
|
22
|
+
- Updated npm-tools to 0.4.14
|
|
23
|
+
|
|
24
|
+
## [0.5.6](https://github.com/storm-software/storm-ops/releases/tag/pnpm-tools%400.5.6) (2025-09-22)
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
- **pnpm-tools:** Resolve issue with multiple applied prefixes
|
|
29
|
+
([2c081b8bc](https://github.com/storm-software/storm-ops/commit/2c081b8bc))
|
|
30
|
+
|
|
31
|
+
### Miscellaneous
|
|
32
|
+
|
|
33
|
+
- **monorepo:** Update workspace package links
|
|
34
|
+
([43374a8da](https://github.com/storm-software/storm-ops/commit/43374a8da))
|
|
35
|
+
|
|
36
|
+
### Updated Dependencies
|
|
37
|
+
|
|
38
|
+
- Updated config-tools to 1.187.8
|
|
39
|
+
- Updated npm-tools to 0.4.13
|
|
40
|
+
- Updated config to 1.133.4
|
|
41
|
+
|
|
5
42
|
## [0.5.5](https://github.com/storm-software/storm-ops/releases/tag/pnpm-tools%400.5.5) (2025-09-22)
|
|
6
43
|
|
|
7
44
|
### Miscellaneous
|
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
package/bin/pnpm.cjs
CHANGED
|
@@ -96,27 +96,13 @@ async function setCatalog(catalog, workspaceRoot = (0, import_find_workspace_roo
|
|
|
96
96
|
);
|
|
97
97
|
await writePnpmWorkspaceFile(pnpmWorkspaceFile, workspaceRoot);
|
|
98
98
|
}
|
|
99
|
-
async function
|
|
99
|
+
async function upgradeCatalog(catalog, packageName, options = {}) {
|
|
100
100
|
const {
|
|
101
101
|
tag = import_constants.DEFAULT_NPM_TAG,
|
|
102
102
|
prefix = "^",
|
|
103
|
-
throwIfMissingInCatalog = false,
|
|
104
103
|
workspaceRoot = (0, import_find_workspace_root2.findWorkspaceRoot)()
|
|
105
104
|
} = options;
|
|
106
105
|
const workspaceConfig = await (0, import_get_config.getWorkspaceConfig)(true, { workspaceRoot });
|
|
107
|
-
const catalog = await getCatalog(workspaceRoot);
|
|
108
|
-
if (!catalog) {
|
|
109
|
-
throw new Error("No catalog found");
|
|
110
|
-
}
|
|
111
|
-
if (throwIfMissingInCatalog === true && !catalog[packageName]) {
|
|
112
|
-
throw new Error(
|
|
113
|
-
`Package "${packageName}" not found in catalog: ${JSON.stringify(
|
|
114
|
-
catalog,
|
|
115
|
-
null,
|
|
116
|
-
2
|
|
117
|
-
)}`
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
106
|
(0, import_console.writeTrace)(
|
|
121
107
|
`Upgrading catalog entry for package "${packageName}" with tag "${tag}"`,
|
|
122
108
|
workspaceConfig
|
|
@@ -135,13 +121,13 @@ async function upgradeCatalogPackage(packageName, options = {}) {
|
|
|
135
121
|
`Writing version ${catalog[packageName]} to catalog for "${packageName}" package`,
|
|
136
122
|
workspaceConfig
|
|
137
123
|
);
|
|
138
|
-
await setCatalog(catalog, workspaceRoot);
|
|
139
124
|
} else {
|
|
140
125
|
(0, import_console.writeWarning)(
|
|
141
126
|
`The current version "${catalog[packageName]}" for package "${packageName}" is greater than or equal to the version "${version}" fetched from the npm registry with tag "${tag}". No update performed.`,
|
|
142
127
|
workspaceConfig
|
|
143
128
|
);
|
|
144
129
|
}
|
|
130
|
+
return catalog;
|
|
145
131
|
}
|
|
146
132
|
|
|
147
133
|
// src/cli/index.ts
|
|
@@ -192,7 +178,7 @@ async function updateAction(packageNames, {
|
|
|
192
178
|
`\u26A1 Preparing to update the package version for ${packages.join(", ")}.`,
|
|
193
179
|
_config
|
|
194
180
|
);
|
|
195
|
-
|
|
181
|
+
let catalog = await getCatalog();
|
|
196
182
|
if (!catalog) {
|
|
197
183
|
throw new Error(
|
|
198
184
|
"No catalog found in the pnpm-workspace.yaml file of the current workspace."
|
|
@@ -207,22 +193,26 @@ async function updateAction(packageNames, {
|
|
|
207
193
|
`No packages found in the catalog matching the name/pattern "${pkg}".`
|
|
208
194
|
);
|
|
209
195
|
}
|
|
210
|
-
(0, import_config_tools2.
|
|
196
|
+
(0, import_config_tools2.writeTrace)(
|
|
211
197
|
`Found ${matchedPackages.length} matching packages in the catalog file:
|
|
212
198
|
|
|
213
199
|
- ${matchedPackages.map((p) => `${p} (${catalog[p] || "unknown"})`).join("\n- ")}`,
|
|
214
200
|
_config
|
|
215
201
|
);
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
);
|
|
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
|
+
}
|
|
225
210
|
}
|
|
211
|
+
(0, import_config_tools2.writeDebug)(
|
|
212
|
+
"Finalizing changes to the pnpm workspace's catalog dependencies",
|
|
213
|
+
_config
|
|
214
|
+
);
|
|
215
|
+
await setCatalog(catalog, _config.workspaceRoot);
|
|
226
216
|
if (install) {
|
|
227
217
|
(0, import_config_tools2.writeTrace)(
|
|
228
218
|
"Running `pnpm install --no-frozen-lockfile` to update local dependency versions",
|
package/bin/pnpm.js
CHANGED
|
@@ -111,27 +111,13 @@ async function setCatalog(catalog, workspaceRoot = findWorkspaceRoot2(process.cw
|
|
|
111
111
|
);
|
|
112
112
|
await writePnpmWorkspaceFile(pnpmWorkspaceFile, workspaceRoot);
|
|
113
113
|
}
|
|
114
|
-
async function
|
|
114
|
+
async function upgradeCatalog(catalog, packageName, options = {}) {
|
|
115
115
|
const {
|
|
116
116
|
tag = DEFAULT_NPM_TAG,
|
|
117
117
|
prefix = "^",
|
|
118
|
-
throwIfMissingInCatalog = false,
|
|
119
118
|
workspaceRoot = findWorkspaceRoot2()
|
|
120
119
|
} = options;
|
|
121
120
|
const workspaceConfig = await getWorkspaceConfig2(true, { workspaceRoot });
|
|
122
|
-
const catalog = await getCatalog(workspaceRoot);
|
|
123
|
-
if (!catalog) {
|
|
124
|
-
throw new Error("No catalog found");
|
|
125
|
-
}
|
|
126
|
-
if (throwIfMissingInCatalog === true && !catalog[packageName]) {
|
|
127
|
-
throw new Error(
|
|
128
|
-
`Package "${packageName}" not found in catalog: ${JSON.stringify(
|
|
129
|
-
catalog,
|
|
130
|
-
null,
|
|
131
|
-
2
|
|
132
|
-
)}`
|
|
133
|
-
);
|
|
134
|
-
}
|
|
135
121
|
writeTrace2(
|
|
136
122
|
`Upgrading catalog entry for package "${packageName}" with tag "${tag}"`,
|
|
137
123
|
workspaceConfig
|
|
@@ -150,13 +136,13 @@ async function upgradeCatalogPackage(packageName, options = {}) {
|
|
|
150
136
|
`Writing version ${catalog[packageName]} to catalog for "${packageName}" package`,
|
|
151
137
|
workspaceConfig
|
|
152
138
|
);
|
|
153
|
-
await setCatalog(catalog, workspaceRoot);
|
|
154
139
|
} else {
|
|
155
140
|
writeWarning(
|
|
156
141
|
`The current version "${catalog[packageName]}" for package "${packageName}" is greater than or equal to the version "${version}" fetched from the npm registry with tag "${tag}". No update performed.`,
|
|
157
142
|
workspaceConfig
|
|
158
143
|
);
|
|
159
144
|
}
|
|
145
|
+
return catalog;
|
|
160
146
|
}
|
|
161
147
|
|
|
162
148
|
// src/cli/index.ts
|
|
@@ -207,7 +193,7 @@ async function updateAction(packageNames, {
|
|
|
207
193
|
`\u26A1 Preparing to update the package version for ${packages.join(", ")}.`,
|
|
208
194
|
_config
|
|
209
195
|
);
|
|
210
|
-
|
|
196
|
+
let catalog = await getCatalog();
|
|
211
197
|
if (!catalog) {
|
|
212
198
|
throw new Error(
|
|
213
199
|
"No catalog found in the pnpm-workspace.yaml file of the current workspace."
|
|
@@ -222,22 +208,26 @@ async function updateAction(packageNames, {
|
|
|
222
208
|
`No packages found in the catalog matching the name/pattern "${pkg}".`
|
|
223
209
|
);
|
|
224
210
|
}
|
|
225
|
-
|
|
211
|
+
writeTrace3(
|
|
226
212
|
`Found ${matchedPackages.length} matching packages in the catalog file:
|
|
227
213
|
|
|
228
214
|
- ${matchedPackages.map((p) => `${p} (${catalog[p] || "unknown"})`).join("\n- ")}`,
|
|
229
215
|
_config
|
|
230
216
|
);
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
);
|
|
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
|
+
}
|
|
240
225
|
}
|
|
226
|
+
writeDebug2(
|
|
227
|
+
"Finalizing changes to the pnpm workspace's catalog dependencies",
|
|
228
|
+
_config
|
|
229
|
+
);
|
|
230
|
+
await setCatalog(catalog, _config.workspaceRoot);
|
|
241
231
|
if (install) {
|
|
242
232
|
writeTrace3(
|
|
243
233
|
"Running `pnpm install --no-frozen-lockfile` to update local dependency versions",
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {e,h as h$1,i,f,c,b,a}from'./chunk-JGJEVC4U.js';import {exec}from'node:child_process';import {valid,coerce,gt}from'semver';var E="latest";var u=E;async function h(){return new Promise((r,t)=>{exec("npm config get registry",(e,n,s)=>e?t(e):s?t(s):r(n.trim()));})}async function $(r,t=u,e={}){let{registry:n=await h()}=e;return new Promise((s,p)=>{exec(`npm view ${r} version --registry=${n} --tag=${t}`,(i,o,g)=>i?p(i):g?p(g):s(o.trim()));})}async function M(r=e(process.cwd())){let t=await h$1(r);if(!t)throw new Error("No pnpm-workspace.yaml file found");if(t?.catalog)return Object.fromEntries(Object.entries(t.catalog).map(([e,n])=>[e,n.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$1(t);if(!e)throw new Error("No pnpm-workspace.yaml file found");e.catalog=Object.fromEntries(Object.entries(r).map(([n,s])=>[n,s.replaceAll('"',"").replaceAll("'","")])),await i(e,t);}async function Z(r,t,e$1={}){let{tag:n=u,prefix:s="^",workspaceRoot:p=e()}=e$1,i=await f(true,{workspaceRoot:p});c(`Upgrading catalog entry for package "${t}" with tag "${n}"`,i);let o=await $(t,n),g=`${s||""}${o.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)&>(coerce(g),coerce(r[t]))?(r[t]=`${s||""}${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 "${n}". No update performed.`,i),r}async function rr(r,t={}){let{tag:e$1=u,prefix:n="^",throwIfMissingInCatalog:s=false,workspaceRoot:p=e()}=t,i=await f(true,{workspaceRoot:p}),o=await C(p);if(!o)throw new Error("No catalog found");if(s===true&&!o[r])throw new Error(`Package "${r}" not found in catalog: ${JSON.stringify(o,null,2)}`);c(`Upgrading catalog entry for package "${r}" with tag "${e$1}"`,i);let g=await $(r,e$1),c$1=`${n||""}${g.replace(/^[\^~><=*]+/g,"")}`;c$1===o[r]?c(`The version for package "${r}" is already up to date in the catalog: ${c$1}`,i):!valid(coerce(o[r]))||coerce(o[r])&&coerce(c$1)&>(coerce(c$1),coerce(o[r]))?(o[r]=`${n||""}${c$1.replace(/^[\^~><=*]+/g,"")}`,b(`Writing version ${o[r]} to catalog for "${r}" package`,i),await v(o,p)):a(`The current version "${o[r]}" for package "${r}" is greater than or equal to the version "${c$1}" 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 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-EWC64ZZT.js';import {e,d}from'./chunk-JGJEVC4U.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 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkQHK5XUKM_cjs=require('./chunk-QHK5XUKM.cjs'),chunkXDFF7DBD_cjs=require('./chunk-XDFF7DBD.cjs'),devkit=require('@nx/devkit'),fs=require('fs'),promises=require('fs/promises'),prettier=require('prettier');async function C(c=process.cwd(),i=chunkXDFF7DBD_cjs.e(c)){let l=chunkXDFF7DBD_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 chunkQHK5XUKM_cjs.b(i),r=JSON.parse(m),g=chunkXDFF7DBD_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=chunkXDFF7DBD_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;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkXDFF7DBD_cjs=require('./chunk-XDFF7DBD.cjs'),child_process=require('child_process'),semver=require('semver');var _="latest";var u=_;async function E(){return new Promise((r,t)=>{child_process.exec("npm config get registry",(e,n,s)=>e?t(e):s?t(s):r(n.trim()));})}async function R(r,t=u,e={}){let{registry:n=await E()}=e;return new Promise((s,p)=>{child_process.exec(`npm view ${r} version --registry=${n} --tag=${t}`,(i,o,g)=>i?p(i):g?p(g):s(o.trim()));})}async function G(r=chunkXDFF7DBD_cjs.e(process.cwd())){let t=await chunkXDFF7DBD_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,n])=>[e,n.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=chunkXDFF7DBD_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=chunkXDFF7DBD_cjs.e(process.cwd())){let e=await chunkXDFF7DBD_cjs.h(t);if(!e)throw new Error("No pnpm-workspace.yaml file found");e.catalog=Object.fromEntries(Object.entries(r).map(([n,s])=>[n,s.replaceAll('"',"").replaceAll("'","")])),await chunkXDFF7DBD_cjs.i(e,t);}async function Q(r,t,e={}){let{tag:n=u,prefix:s="^",workspaceRoot:p=chunkXDFF7DBD_cjs.e()}=e,i=await chunkXDFF7DBD_cjs.f(true,{workspaceRoot:p});chunkXDFF7DBD_cjs.c(`Upgrading catalog entry for package "${t}" with tag "${n}"`,i);let o=await R(t,n),g=`${s||""}${o.replace(/^[\^~><=*]+/g,"")}`;return g===r[t]?chunkXDFF7DBD_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]=`${s||""}${g.replace(/^[\^~><=*]+/g,"")}`,chunkXDFF7DBD_cjs.b(`Writing version ${r[t]} to catalog for "${t}" package`,i)):chunkXDFF7DBD_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 "${n}". No update performed.`,i),r}async function Z(r,t={}){let{tag:e=u,prefix:n="^",throwIfMissingInCatalog:s=false,workspaceRoot:p=chunkXDFF7DBD_cjs.e()}=t,i=await chunkXDFF7DBD_cjs.f(true,{workspaceRoot:p}),o=await M(p);if(!o)throw new Error("No catalog found");if(s===true&&!o[r])throw new Error(`Package "${r}" not found in catalog: ${JSON.stringify(o,null,2)}`);chunkXDFF7DBD_cjs.c(`Upgrading catalog entry for package "${r}" with tag "${e}"`,i);let g=await R(r,e),c=`${n||""}${g.replace(/^[\^~><=*]+/g,"")}`;c===o[r]?chunkXDFF7DBD_cjs.c(`The version for package "${r}" is already up to date in the catalog: ${c}`,i):!semver.valid(semver.coerce(o[r]))||semver.coerce(o[r])&&semver.coerce(c)&&semver.gt(semver.coerce(c),semver.coerce(o[r]))?(o[r]=`${n||""}${c.replace(/^[\^~><=*]+/g,"")}`,chunkXDFF7DBD_cjs.b(`Writing version ${o[r]} to catalog for "${r}" package`,i),await C(o,p)):chunkXDFF7DBD_cjs.a(`The current version "${o[r]}" for package "${r}" is greater than or equal to the version "${c}" 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;
|
package/dist/helpers/catalog.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkQHK5XUKM_cjs=require('../chunk-QHK5XUKM.cjs');require('../chunk-XDFF7DBD.cjs');Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkQHK5XUKM_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkQHK5XUKM_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkQHK5XUKM_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkQHK5XUKM_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkQHK5XUKM_cjs.d}});
|
|
@@ -52,6 +52,15 @@ interface UpgradeCatalogPackageOptions {
|
|
|
52
52
|
*/
|
|
53
53
|
prefix?: "^" | "~" | ">" | "<" | ">=" | "<=" | "*";
|
|
54
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Upgrade a package in the pnpm catalog.
|
|
57
|
+
*
|
|
58
|
+
* @param catalog - The pnpm catalog to update.
|
|
59
|
+
* @param packageName - The name of the package to upgrade.
|
|
60
|
+
* @param options - Options for upgrading the package.
|
|
61
|
+
* @returns The updated catalog.
|
|
62
|
+
*/
|
|
63
|
+
declare function upgradeCatalog(catalog: Record<string, string>, packageName: string, options?: UpgradeCatalogPackageOptions): Promise<Record<string, string>>;
|
|
55
64
|
/**
|
|
56
65
|
* Update package.json dependencies currently using `catalog:` or `workspace:*` to use the pnpm catalog dependencies actual versions and the local workspace versions respectively.
|
|
57
66
|
*
|
|
@@ -60,6 +69,6 @@ interface UpgradeCatalogPackageOptions {
|
|
|
60
69
|
* @returns A promise that resolves when the package.json file has been updated.
|
|
61
70
|
* @throws Will throw an error if no package.json file is found in the package root, or if a dependency is marked as `catalog:` but no catalog exists.
|
|
62
71
|
*/
|
|
63
|
-
declare function
|
|
72
|
+
declare function saveCatalog(packageName: string, options?: UpgradeCatalogPackageOptions): Promise<void>;
|
|
64
73
|
|
|
65
|
-
export { type UpgradeCatalogPackageOptions, getCatalog, getCatalogSafe, setCatalog,
|
|
74
|
+
export { type UpgradeCatalogPackageOptions, getCatalog, getCatalogSafe, saveCatalog, setCatalog, upgradeCatalog };
|
|
@@ -52,6 +52,15 @@ interface UpgradeCatalogPackageOptions {
|
|
|
52
52
|
*/
|
|
53
53
|
prefix?: "^" | "~" | ">" | "<" | ">=" | "<=" | "*";
|
|
54
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Upgrade a package in the pnpm catalog.
|
|
57
|
+
*
|
|
58
|
+
* @param catalog - The pnpm catalog to update.
|
|
59
|
+
* @param packageName - The name of the package to upgrade.
|
|
60
|
+
* @param options - Options for upgrading the package.
|
|
61
|
+
* @returns The updated catalog.
|
|
62
|
+
*/
|
|
63
|
+
declare function upgradeCatalog(catalog: Record<string, string>, packageName: string, options?: UpgradeCatalogPackageOptions): Promise<Record<string, string>>;
|
|
55
64
|
/**
|
|
56
65
|
* Update package.json dependencies currently using `catalog:` or `workspace:*` to use the pnpm catalog dependencies actual versions and the local workspace versions respectively.
|
|
57
66
|
*
|
|
@@ -60,6 +69,6 @@ interface UpgradeCatalogPackageOptions {
|
|
|
60
69
|
* @returns A promise that resolves when the package.json file has been updated.
|
|
61
70
|
* @throws Will throw an error if no package.json file is found in the package root, or if a dependency is marked as `catalog:` but no catalog exists.
|
|
62
71
|
*/
|
|
63
|
-
declare function
|
|
72
|
+
declare function saveCatalog(packageName: string, options?: UpgradeCatalogPackageOptions): Promise<void>;
|
|
64
73
|
|
|
65
|
-
export { type UpgradeCatalogPackageOptions, getCatalog, getCatalogSafe, setCatalog,
|
|
74
|
+
export { type UpgradeCatalogPackageOptions, getCatalog, getCatalogSafe, saveCatalog, setCatalog, upgradeCatalog };
|
package/dist/helpers/catalog.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as getCatalog,a as getCatalogSafe,c as setCatalog,d as
|
|
1
|
+
export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'../chunk-EWC64ZZT.js';import'../chunk-JGJEVC4U.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 chunkNR4Q3RAB_cjs=require('../chunk-NR4Q3RAB.cjs'),chunkQHK5XUKM_cjs=require('../chunk-QHK5XUKM.cjs'),chunkXDFF7DBD_cjs=require('../chunk-XDFF7DBD.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunkNR4Q3RAB_cjs.a}});Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkQHK5XUKM_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkQHK5XUKM_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkQHK5XUKM_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkQHK5XUKM_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkQHK5XUKM_cjs.d}});Object.defineProperty(exports,"getPnpmWorkspaceFilePath",{enumerable:true,get:function(){return chunkXDFF7DBD_cjs.g}});Object.defineProperty(exports,"readPnpmWorkspaceFile",{enumerable:true,get:function(){return chunkXDFF7DBD_cjs.h}});Object.defineProperty(exports,"writePnpmWorkspaceFile",{enumerable:true,get:function(){return chunkXDFF7DBD_cjs.i}});
|
package/dist/helpers/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { UpgradeCatalogPackageOptions, getCatalog, getCatalogSafe, setCatalog,
|
|
1
|
+
export { UpgradeCatalogPackageOptions, getCatalog, getCatalogSafe, saveCatalog, setCatalog, upgradeCatalog } from './catalog.cjs';
|
|
2
2
|
export { getPnpmWorkspaceFilePath, readPnpmWorkspaceFile, writePnpmWorkspaceFile } from './pnpm-workspace.cjs';
|
|
3
3
|
export { replaceDepsAliases } from './replace-deps-aliases.cjs';
|
|
4
4
|
import '../types.cjs';
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { UpgradeCatalogPackageOptions, getCatalog, getCatalogSafe, setCatalog,
|
|
1
|
+
export { UpgradeCatalogPackageOptions, getCatalog, getCatalogSafe, saveCatalog, setCatalog, upgradeCatalog } from './catalog.js';
|
|
2
2
|
export { getPnpmWorkspaceFilePath, readPnpmWorkspaceFile, writePnpmWorkspaceFile } from './pnpm-workspace.js';
|
|
3
3
|
export { replaceDepsAliases } from './replace-deps-aliases.js';
|
|
4
4
|
import '../types.js';
|
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-FCOQR6F7.js';export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'../chunk-EWC64ZZT.js';export{g as getPnpmWorkspaceFilePath,h as readPnpmWorkspaceFile,i as writePnpmWorkspaceFile}from'../chunk-JGJEVC4U.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkNR4Q3RAB_cjs=require('../chunk-NR4Q3RAB.cjs');require('../chunk-QHK5XUKM.cjs'),require('../chunk-XDFF7DBD.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunkNR4Q3RAB_cjs.a}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as replaceDepsAliases}from'../chunk-
|
|
1
|
+
export{a as replaceDepsAliases}from'../chunk-FCOQR6F7.js';import'../chunk-EWC64ZZT.js';import'../chunk-JGJEVC4U.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 chunkNR4Q3RAB_cjs=require('./chunk-NR4Q3RAB.cjs'),chunkQHK5XUKM_cjs=require('./chunk-QHK5XUKM.cjs'),chunkXDFF7DBD_cjs=require('./chunk-XDFF7DBD.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunkNR4Q3RAB_cjs.a}});Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkQHK5XUKM_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkQHK5XUKM_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkQHK5XUKM_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkQHK5XUKM_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkQHK5XUKM_cjs.d}});Object.defineProperty(exports,"getPnpmWorkspaceFilePath",{enumerable:true,get:function(){return chunkXDFF7DBD_cjs.g}});Object.defineProperty(exports,"readPnpmWorkspaceFile",{enumerable:true,get:function(){return chunkXDFF7DBD_cjs.h}});Object.defineProperty(exports,"writePnpmWorkspaceFile",{enumerable:true,get:function(){return chunkXDFF7DBD_cjs.i}});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { UpgradeCatalogPackageOptions, getCatalog, getCatalogSafe, setCatalog,
|
|
1
|
+
export { UpgradeCatalogPackageOptions, getCatalog, getCatalogSafe, saveCatalog, setCatalog, upgradeCatalog } from './helpers/catalog.cjs';
|
|
2
2
|
export { getPnpmWorkspaceFilePath, readPnpmWorkspaceFile, writePnpmWorkspaceFile } from './helpers/pnpm-workspace.cjs';
|
|
3
3
|
export { replaceDepsAliases } from './helpers/replace-deps-aliases.cjs';
|
|
4
4
|
export { PnpmWorkspaceFile } from './types.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { UpgradeCatalogPackageOptions, getCatalog, getCatalogSafe, setCatalog,
|
|
1
|
+
export { UpgradeCatalogPackageOptions, getCatalog, getCatalogSafe, saveCatalog, setCatalog, upgradeCatalog } from './helpers/catalog.js';
|
|
2
2
|
export { getPnpmWorkspaceFilePath, readPnpmWorkspaceFile, writePnpmWorkspaceFile } from './helpers/pnpm-workspace.js';
|
|
3
3
|
export { replaceDepsAliases } from './helpers/replace-deps-aliases.js';
|
|
4
4
|
export { PnpmWorkspaceFile } from './types.js';
|
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-FCOQR6F7.js';export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'./chunk-EWC64ZZT.js';export{g as getPnpmWorkspaceFilePath,h as readPnpmWorkspaceFile,i as writePnpmWorkspaceFile}from'./chunk-JGJEVC4U.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/pnpm-tools",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
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.133.
|
|
93
|
-
"@storm-software/config-tools": "^1.187.
|
|
94
|
-
"@storm-software/npm-tools": "^0.4.
|
|
92
|
+
"@storm-software/config": "^1.133.5",
|
|
93
|
+
"@storm-software/config-tools": "^1.187.10",
|
|
94
|
+
"@storm-software/npm-tools": "^0.4.15",
|
|
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": "
|
|
108
|
+
"gitHead": "ff77233e5189516cebce6ade530d67f202d151f3"
|
|
109
109
|
}
|
package/dist/chunk-IGTMDPZL.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {e,h,i,f,c,b,a}from'./chunk-JGJEVC4U.js';import {exec}from'node:child_process';import {valid,coerce,gt}from'semver';var d="latest";var l=d;async function P(){return new Promise((r,t)=>{exec("npm config get registry",(e,n,i)=>e?t(e):i?t(i):r(n.trim()));})}async function A(r,t=l,e={}){let{registry:n=await P()}=e;return new Promise((i,a)=>{exec(`npm view ${r} version --registry=${n} --tag=${t}`,(s,o,f)=>s?a(s):f?a(f):i(o.trim()));})}async function $(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,n])=>[e,n.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 I(r=e(process.cwd())){let t=await $(r);if(!t)throw new Error("No catalog entries found in pnpm-workspace.yaml file");return t}async function O(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(([n,i])=>[n,i.replaceAll('"',"").replaceAll("'","")])),await i(e,t);}async function Z(r,t={}){let{tag:e$1=l,prefix:n="^",throwIfMissingInCatalog:i=false,workspaceRoot:a$1=e()}=t,s=await f(true,{workspaceRoot:a$1}),o=await I(a$1);if(!o)throw new Error("No catalog found");if(i===true&&!o[r])throw new Error(`Package "${r}" not found in catalog: ${JSON.stringify(o,null,2)}`);c(`Upgrading catalog entry for package "${r}" with tag "${e$1}"`,s);let f$1=await A(r,e$1),g=`${n||""}${f$1.replace(/^[\^~><=*]+/g,"")}`;g===o[r]?c(`The version for package "${r}" is already up to date in the catalog: ${g}`,s):!valid(coerce(o[r]))||coerce(o[r])&&coerce(g)&>(coerce(g),coerce(o[r]))?(o[r]=`${n||""}${g.replace(/^[\^~><=*]+/g,"")}`,b(`Writing version ${o[r]} to catalog for "${r}" package`,s),await O(o,a$1)):a(`The current version "${o[r]}" for package "${r}" is greater than or equal to the version "${g}" fetched from the npm registry with tag "${e$1}". No update performed.`,s);}export{$ as a,I as b,O as c,Z as d};
|
package/dist/chunk-TNPBYVPP.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkXDFF7DBD_cjs=require('./chunk-XDFF7DBD.cjs'),child_process=require('child_process'),semver=require('semver');var E="latest";var l=E;async function d(){return new Promise((r,t)=>{child_process.exec("npm config get registry",(e,n,i)=>e?t(e):i?t(i):r(n.trim()));})}async function P(r,t=l,e={}){let{registry:n=await d()}=e;return new Promise((i,a)=>{child_process.exec(`npm view ${r} version --registry=${n} --tag=${t}`,(s,o,f)=>s?a(s):f?a(f):i(o.trim()));})}async function M(r=chunkXDFF7DBD_cjs.e(process.cwd())){let t=await chunkXDFF7DBD_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,n])=>[e,n.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 $(r=chunkXDFF7DBD_cjs.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 I(r,t=chunkXDFF7DBD_cjs.e(process.cwd())){let e=await chunkXDFF7DBD_cjs.h(t);if(!e)throw new Error("No pnpm-workspace.yaml file found");e.catalog=Object.fromEntries(Object.entries(r).map(([n,i])=>[n,i.replaceAll('"',"").replaceAll("'","")])),await chunkXDFF7DBD_cjs.i(e,t);}async function Q(r,t={}){let{tag:e=l,prefix:n="^",throwIfMissingInCatalog:i=false,workspaceRoot:a=chunkXDFF7DBD_cjs.e()}=t,s=await chunkXDFF7DBD_cjs.f(true,{workspaceRoot:a}),o=await $(a);if(!o)throw new Error("No catalog found");if(i===true&&!o[r])throw new Error(`Package "${r}" not found in catalog: ${JSON.stringify(o,null,2)}`);chunkXDFF7DBD_cjs.c(`Upgrading catalog entry for package "${r}" with tag "${e}"`,s);let f=await P(r,e),g=`${n||""}${f.replace(/^[\^~><=*]+/g,"")}`;g===o[r]?chunkXDFF7DBD_cjs.c(`The version for package "${r}" is already up to date in the catalog: ${g}`,s):!semver.valid(semver.coerce(o[r]))||semver.coerce(o[r])&&semver.coerce(g)&&semver.gt(semver.coerce(g),semver.coerce(o[r]))?(o[r]=`${n||""}${g.replace(/^[\^~><=*]+/g,"")}`,chunkXDFF7DBD_cjs.b(`Writing version ${o[r]} to catalog for "${r}" package`,s),await I(o,a)):chunkXDFF7DBD_cjs.a(`The current version "${o[r]}" for package "${r}" is greater than or equal to the version "${g}" fetched from the npm registry with tag "${e}". No update performed.`,s);}exports.a=M;exports.b=$;exports.c=I;exports.d=Q;
|