@storm-software/pnpm-tools 0.7.120 → 0.7.122

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,35 @@
2
2
 
3
3
  # Changelog for Storm Ops - Pnpm Tools
4
4
 
5
+ ## [0.7.122](https://github.com/storm-software/storm-ops/releases/tag/pnpm-tools%400.7.122) (08/05/2026)
6
+
7
+ ### Bug Fixes
8
+
9
+ - **workspace-tools:** Resolve issue with missing package dependencies ([8183837f8](https://github.com/storm-software/storm-ops/commit/8183837f8))
10
+
11
+ ### Updated Dependencies
12
+
13
+ - Updated **config** to **v1.138.48**
14
+ - Updated **config-tools** to **v1.190.111**
15
+ - Updated **npm-tools** to **v0.6.229**
16
+ - Updated **package-constants** to **v0.1.124**
17
+ - Updated **testing-tools** to **v1.119.264**
18
+
19
+ ## [0.7.121](https://github.com/storm-software/storm-ops/releases/tag/pnpm-tools%400.7.121) (08/01/2026)
20
+
21
+ ### Bug Fixes
22
+
23
+ - **pnpm-tools:** Update update tool to better handle `npm:` prefixes ([e36d870e8](https://github.com/storm-software/storm-ops/commit/e36d870e8))
24
+ - **prettier:** Resolve issue causing exclude files from being part of release ([137627bfa](https://github.com/storm-software/storm-ops/commit/137627bfa))
25
+
26
+ ### Updated Dependencies
27
+
28
+ - Updated **config** to **v1.138.47**
29
+ - Updated **config-tools** to **v1.190.110**
30
+ - Updated **npm-tools** to **v0.6.228**
31
+ - Updated **package-constants** to **v0.1.123**
32
+ - Updated **testing-tools** to **v1.119.263**
33
+
5
34
  ## [0.7.120](https://github.com/storm-software/storm-ops/releases/tag/pnpm-tools%400.7.120) (07/23/2026)
6
35
 
7
36
  ### Bug Fixes
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
- [![Version](https://img.shields.io/badge/version-0.7.118-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
30
+ [![Version](https://img.shields.io/badge/version-0.7.120-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
31
31
 
32
32
  <!-- prettier-ignore-start -->
33
33
  <!-- markdownlint-disable -->
package/bin/pnpm.cjs CHANGED
@@ -2204,7 +2204,7 @@ var import_chalk3 = __toESM(require("chalk"), 1);
2204
2204
  var import_commander = require("commander");
2205
2205
 
2206
2206
  // package.json
2207
- var package_default = { name: "@storm-software/pnpm-tools", version: "0.7.120", private: false, description: "A set of [pnpm](https://pnpm.io/) plugins and utilities for managing workspace packages/dependencies.", repository: { type: "github", url: "https://github.com/storm-software/storm-ops.git", directory: "packages/pnpm-tools" }, type: "module", exports: { "./package.json": "./package.json", "./index": { import: { types: "./dist/index.d.ts", default: "./dist/index.js" }, require: { types: "./dist/index.d.cts", default: "./dist/index.cjs" }, default: { types: "./dist/index.d.ts", default: "./dist/index.js" } }, ".": { import: { types: "./dist/index.d.ts", default: "./dist/index.js" }, require: { types: "./dist/index.d.cts", default: "./dist/index.cjs" }, default: { types: "./dist/index.d.ts", default: "./dist/index.js" } }, "./types": { import: { types: "./dist/types.d.ts", default: "./dist/types.js" }, require: { types: "./dist/types.d.cts", default: "./dist/types.cjs" }, default: { types: "./dist/types.d.ts", default: "./dist/types.js" } }, "./helpers": { import: { types: "./dist/helpers/index.d.ts", default: "./dist/helpers/index.js" }, require: { types: "./dist/helpers/index.d.cts", default: "./dist/helpers/index.cjs" }, default: { types: "./dist/helpers/index.d.ts", default: "./dist/helpers/index.js" } }, "./helpers/*": { import: { types: "./dist/helpers/*.d.ts", default: "./dist/helpers/*.js" }, require: { types: "./dist/helpers/*.d.cts", default: "./dist/helpers/*.cjs" }, default: { types: "./dist/helpers/*.d.ts", default: "./dist/helpers/*.js" } } }, main: "./dist/index.cjs", module: "./dist/index.js", types: "./dist/index.d.ts", bin: { "storm-pnpm": "./bin/pnpm.js", "storm-pnpm-cjs": "./bin/pnpm.cjs", "storm-pnpm-esm": "./bin/pnpm.js" }, dependencies: { "@storm-software/config": "workspace:*", "@storm-software/config-tools": "workspace:*", "@storm-software/npm-tools": "workspace:*", "@storm-software/package-constants": "workspace:*", chalk: "catalog:", commander: "catalog:", defu: "catalog:", prettier: "catalog:", "prettier-plugin-packagejson": "catalog:", semver: "catalog:", yaml: "catalog:" }, devDependencies: { "@pnpm/types": "catalog:", "@types/node": "catalog:", tsup: "catalog:" }, publishConfig: { access: "public" } };
2207
+ var package_default = { name: "@storm-software/pnpm-tools", version: "0.7.122", private: false, description: "A set of [pnpm](https://pnpm.io/) plugins and utilities for managing workspace packages/dependencies.", repository: { type: "github", url: "https://github.com/storm-software/storm-ops.git", directory: "packages/pnpm-tools" }, type: "module", exports: { "./package.json": "./package.json", "./index": { import: { types: "./dist/index.d.ts", default: "./dist/index.js" }, require: { types: "./dist/index.d.cts", default: "./dist/index.cjs" }, default: { types: "./dist/index.d.ts", default: "./dist/index.js" } }, ".": { import: { types: "./dist/index.d.ts", default: "./dist/index.js" }, require: { types: "./dist/index.d.cts", default: "./dist/index.cjs" }, default: { types: "./dist/index.d.ts", default: "./dist/index.js" } }, "./types": { import: { types: "./dist/types.d.ts", default: "./dist/types.js" }, require: { types: "./dist/types.d.cts", default: "./dist/types.cjs" }, default: { types: "./dist/types.d.ts", default: "./dist/types.js" } }, "./helpers": { import: { types: "./dist/helpers/index.d.ts", default: "./dist/helpers/index.js" }, require: { types: "./dist/helpers/index.d.cts", default: "./dist/helpers/index.cjs" }, default: { types: "./dist/helpers/index.d.ts", default: "./dist/helpers/index.js" } }, "./helpers/*": { import: { types: "./dist/helpers/*.d.ts", default: "./dist/helpers/*.js" }, require: { types: "./dist/helpers/*.d.cts", default: "./dist/helpers/*.cjs" }, default: { types: "./dist/helpers/*.d.ts", default: "./dist/helpers/*.js" } } }, main: "./dist/index.cjs", module: "./dist/index.js", types: "./dist/index.d.ts", bin: { "storm-pnpm": "./bin/pnpm.js", "storm-pnpm-cjs": "./bin/pnpm.cjs", "storm-pnpm-esm": "./bin/pnpm.js" }, dependencies: { "@storm-software/config": "workspace:*", "@storm-software/config-tools": "workspace:*", "@storm-software/npm-tools": "workspace:*", "@storm-software/package-constants": "workspace:*", chalk: "catalog:", commander: "catalog:", defu: "catalog:", prettier: "catalog:", "prettier-plugin-packagejson": "catalog:", semver: "catalog:", yaml: "catalog:" }, devDependencies: { "@pnpm/types": "catalog:", "@types/node": "catalog:", tsup: "catalog:" }, publishConfig: { access: "public" } };
2208
2208
 
2209
2209
  // ../npm-tools/src/constants.ts
2210
2210
  var LATEST_NPM_TAG = "latest";
@@ -2362,7 +2362,9 @@ async function setCatalog(catalog, workspaceRoot = findWorkspaceRoot(process.cwd
2362
2362
  throw new Error("No pnpm-workspace.yaml file found");
2363
2363
  }
2364
2364
  pnpmWorkspaceFile.catalog = Object.fromEntries(
2365
- Object.entries(catalog).filter(([, value]) => value && (0, import_semver2.valid)(replacePrefix(value), true)).map(([key, value]) => {
2365
+ Object.entries(catalog).filter(
2366
+ ([, value]) => value && (value.startsWith("npm:") || (0, import_semver2.valid)(replacePrefix(value), true))
2367
+ ).map(([key, value]) => {
2366
2368
  return [key, value.replaceAll('"', "").replaceAll("'", "")];
2367
2369
  })
2368
2370
  );
@@ -2397,7 +2399,13 @@ async function upgradeCatalog(catalog, packageName, options = {}) {
2397
2399
  }
2398
2400
  const version = `${prefix || ""}${replacePrefix(origVersion)}`;
2399
2401
  let updated = false;
2400
- if (!(0, import_semver2.valid)((0, import_semver2.coerce)(catalog[packageName])) || (0, import_semver2.coerce)(catalog[packageName]) && (0, import_semver2.coerce)(version) && // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
2402
+ if (catalog[packageName]?.startsWith("npm:")) {
2403
+ catalog[packageName] = version;
2404
+ writeDebug(
2405
+ `Writing version ${catalog[packageName]} to catalog for "${packageName}" package`,
2406
+ workspaceConfig
2407
+ );
2408
+ } else if (!(0, import_semver2.valid)((0, import_semver2.coerce)(catalog[packageName])) || (0, import_semver2.coerce)(catalog[packageName]) && (0, import_semver2.coerce)(version) && // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
2401
2409
  (0, import_semver2.gt)((0, import_semver2.coerce)(version), (0, import_semver2.coerce)(catalog[packageName]))) {
2402
2410
  catalog[packageName] = `${prefix || ""}${replacePrefix(version)}`;
2403
2411
  writeDebug(
package/bin/pnpm.js CHANGED
@@ -2182,7 +2182,7 @@ import chalk2 from "chalk";
2182
2182
  import { Command } from "commander";
2183
2183
 
2184
2184
  // package.json
2185
- var package_default = { name: "@storm-software/pnpm-tools", version: "0.7.120", private: false, description: "A set of [pnpm](https://pnpm.io/) plugins and utilities for managing workspace packages/dependencies.", repository: { type: "github", url: "https://github.com/storm-software/storm-ops.git", directory: "packages/pnpm-tools" }, type: "module", exports: { "./package.json": "./package.json", "./index": { import: { types: "./dist/index.d.ts", default: "./dist/index.js" }, require: { types: "./dist/index.d.cts", default: "./dist/index.cjs" }, default: { types: "./dist/index.d.ts", default: "./dist/index.js" } }, ".": { import: { types: "./dist/index.d.ts", default: "./dist/index.js" }, require: { types: "./dist/index.d.cts", default: "./dist/index.cjs" }, default: { types: "./dist/index.d.ts", default: "./dist/index.js" } }, "./types": { import: { types: "./dist/types.d.ts", default: "./dist/types.js" }, require: { types: "./dist/types.d.cts", default: "./dist/types.cjs" }, default: { types: "./dist/types.d.ts", default: "./dist/types.js" } }, "./helpers": { import: { types: "./dist/helpers/index.d.ts", default: "./dist/helpers/index.js" }, require: { types: "./dist/helpers/index.d.cts", default: "./dist/helpers/index.cjs" }, default: { types: "./dist/helpers/index.d.ts", default: "./dist/helpers/index.js" } }, "./helpers/*": { import: { types: "./dist/helpers/*.d.ts", default: "./dist/helpers/*.js" }, require: { types: "./dist/helpers/*.d.cts", default: "./dist/helpers/*.cjs" }, default: { types: "./dist/helpers/*.d.ts", default: "./dist/helpers/*.js" } } }, main: "./dist/index.cjs", module: "./dist/index.js", types: "./dist/index.d.ts", bin: { "storm-pnpm": "./bin/pnpm.js", "storm-pnpm-cjs": "./bin/pnpm.cjs", "storm-pnpm-esm": "./bin/pnpm.js" }, dependencies: { "@storm-software/config": "workspace:*", "@storm-software/config-tools": "workspace:*", "@storm-software/npm-tools": "workspace:*", "@storm-software/package-constants": "workspace:*", chalk: "catalog:", commander: "catalog:", defu: "catalog:", prettier: "catalog:", "prettier-plugin-packagejson": "catalog:", semver: "catalog:", yaml: "catalog:" }, devDependencies: { "@pnpm/types": "catalog:", "@types/node": "catalog:", tsup: "catalog:" }, publishConfig: { access: "public" } };
2185
+ var package_default = { name: "@storm-software/pnpm-tools", version: "0.7.122", private: false, description: "A set of [pnpm](https://pnpm.io/) plugins and utilities for managing workspace packages/dependencies.", repository: { type: "github", url: "https://github.com/storm-software/storm-ops.git", directory: "packages/pnpm-tools" }, type: "module", exports: { "./package.json": "./package.json", "./index": { import: { types: "./dist/index.d.ts", default: "./dist/index.js" }, require: { types: "./dist/index.d.cts", default: "./dist/index.cjs" }, default: { types: "./dist/index.d.ts", default: "./dist/index.js" } }, ".": { import: { types: "./dist/index.d.ts", default: "./dist/index.js" }, require: { types: "./dist/index.d.cts", default: "./dist/index.cjs" }, default: { types: "./dist/index.d.ts", default: "./dist/index.js" } }, "./types": { import: { types: "./dist/types.d.ts", default: "./dist/types.js" }, require: { types: "./dist/types.d.cts", default: "./dist/types.cjs" }, default: { types: "./dist/types.d.ts", default: "./dist/types.js" } }, "./helpers": { import: { types: "./dist/helpers/index.d.ts", default: "./dist/helpers/index.js" }, require: { types: "./dist/helpers/index.d.cts", default: "./dist/helpers/index.cjs" }, default: { types: "./dist/helpers/index.d.ts", default: "./dist/helpers/index.js" } }, "./helpers/*": { import: { types: "./dist/helpers/*.d.ts", default: "./dist/helpers/*.js" }, require: { types: "./dist/helpers/*.d.cts", default: "./dist/helpers/*.cjs" }, default: { types: "./dist/helpers/*.d.ts", default: "./dist/helpers/*.js" } } }, main: "./dist/index.cjs", module: "./dist/index.js", types: "./dist/index.d.ts", bin: { "storm-pnpm": "./bin/pnpm.js", "storm-pnpm-cjs": "./bin/pnpm.cjs", "storm-pnpm-esm": "./bin/pnpm.js" }, dependencies: { "@storm-software/config": "workspace:*", "@storm-software/config-tools": "workspace:*", "@storm-software/npm-tools": "workspace:*", "@storm-software/package-constants": "workspace:*", chalk: "catalog:", commander: "catalog:", defu: "catalog:", prettier: "catalog:", "prettier-plugin-packagejson": "catalog:", semver: "catalog:", yaml: "catalog:" }, devDependencies: { "@pnpm/types": "catalog:", "@types/node": "catalog:", tsup: "catalog:" }, publishConfig: { access: "public" } };
2186
2186
 
2187
2187
  // ../npm-tools/src/constants.ts
2188
2188
  var LATEST_NPM_TAG = "latest";
@@ -2340,7 +2340,9 @@ async function setCatalog(catalog, workspaceRoot = findWorkspaceRoot(process.cwd
2340
2340
  throw new Error("No pnpm-workspace.yaml file found");
2341
2341
  }
2342
2342
  pnpmWorkspaceFile.catalog = Object.fromEntries(
2343
- Object.entries(catalog).filter(([, value]) => value && valid2(replacePrefix(value), true)).map(([key, value]) => {
2343
+ Object.entries(catalog).filter(
2344
+ ([, value]) => value && (value.startsWith("npm:") || valid2(replacePrefix(value), true))
2345
+ ).map(([key, value]) => {
2344
2346
  return [key, value.replaceAll('"', "").replaceAll("'", "")];
2345
2347
  })
2346
2348
  );
@@ -2375,7 +2377,13 @@ async function upgradeCatalog(catalog, packageName, options = {}) {
2375
2377
  }
2376
2378
  const version = `${prefix || ""}${replacePrefix(origVersion)}`;
2377
2379
  let updated = false;
2378
- if (!valid2(coerce(catalog[packageName])) || coerce(catalog[packageName]) && coerce(version) && // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
2380
+ if (catalog[packageName]?.startsWith("npm:")) {
2381
+ catalog[packageName] = version;
2382
+ writeDebug(
2383
+ `Writing version ${catalog[packageName]} to catalog for "${packageName}" package`,
2384
+ workspaceConfig
2385
+ );
2386
+ } else if (!valid2(coerce(catalog[packageName])) || coerce(catalog[packageName]) && coerce(version) && // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
2379
2387
  gt(coerce(version), coerce(catalog[packageName]))) {
2380
2388
  catalog[packageName] = `${prefix || ""}${replacePrefix(version)}`;
2381
2389
  writeDebug(
@@ -0,0 +1,2 @@
1
+ import {a}from'./chunk-7QKHH2VM.js';import {h as h$1,e,i,f,c,b as b$1,a as a$1}from'./chunk-2KCXZSNX.js';import {exec}from'node:child_process';import {valid,coerce,gt}from'semver';import L from'strip-ansi';var G="latest";var h=G;async function b(t="npm"){return new Promise((r,o)=>{exec(`${t} config get registry`,(e,f,c)=>e&&!e.message.toLowerCase().trim().startsWith("npm warn")?o(e):c&&!c.toLowerCase().trim().startsWith("npm warn")?o(c):r(f.trim()));})}async function _(t,r=h,o={}){let e=o.executable||"npm",f=o.retries??3,c=o.timeout??1e4,l=o.registry||await b(e),a;for(let i=0;i<=f;i++)try{let n=new AbortController,s=setTimeout(()=>{n.abort();},c),u=await Promise.resolve(new Promise((I,A)=>{exec(`${e} view ${t} version --registry=${l}`,{signal:n.signal,maxBuffer:1024*1024*10},(T,O,y)=>T&&!T.message.toLowerCase().trim().startsWith("npm warn")?A(T):y&&!y.toLowerCase().trim().startsWith("npm warn")?A(y):I(O.trim()));}));if(!valid(u,!0))throw clearTimeout(s),new Error(L(u).startsWith("[WARN] Request took")?`A timeout occurred while fetching the version for package "${t}" with tag "${r}".`:`Invalid version "${u}" fetched for package "${t}" with tag "${r}"`);return clearTimeout(s),u}catch(n){if(a=n,i<f){let s=Math.pow(2,i)*100;await new Promise(u=>setTimeout(u,s));}}throw a}async function F(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(([o,e])=>[o,e.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 V(t=e(process.cwd())){let r=await F(t);if(!r)throw new Error("No catalog entries found in pnpm-workspace.yaml file");return r}async function Y(t,r=e(process.cwd())){let o=await h$1(r);if(!o)throw new Error("No pnpm-workspace.yaml file found");o.catalog=Object.fromEntries(Object.entries(t).filter(([,e])=>e&&(e.startsWith("npm:")||valid(a(e),true))).map(([e,f])=>[e,f.replaceAll('"',"").replaceAll("'","")])),await i(o,r);}async function lt(t,r,o={}){let{tag:e$1=h,prefix:f$1="^",workspaceRoot:c$1=e(),verbose:l=false}=o,a$1=await f(true,{workspaceRoot:c$1});l&&c(`Upgrading catalog entry for package "${r}" with tag "${e$1}"`,a$1);let i=await _(r,e$1,{executable:"pnpm"});if(!i)throw new Error(`Failed to fetch version for package "${r}" with tag "${e$1}"`);if(!valid(a(i),true))throw new Error(`Invalid version "${i}" fetched for package "${r}" with tag "${e$1}"`);let n=`${f$1||""}${a(i)}`,s=false;return t[r]?.startsWith("npm:")?(t[r]=n,b$1(`Writing version ${t[r]} to catalog for "${r}" package`,a$1)):!valid(coerce(t[r]))||coerce(t[r])&&coerce(n)&&gt(coerce(n),coerce(t[r]))?(t[r]=`${f$1||""}${a(n)}`,b$1(`Writing version ${t[r]} to catalog for "${r}" package`,a$1),s=true):l&&b$1(`The current version ${t[r]} for package "${r}" is greater than or equal to the version ${a(n)} fetched from the npm registry with tag "${e$1}". No update performed.`,a$1),{catalog:t,updated:s}}async function ut(t,r={}){let{tag:o=h,prefix:e$1="^",throwIfMissingInCatalog:f$1=false,workspaceRoot:c$1=e(),verbose:l=false}=r,a$2=await f(true,{workspaceRoot:c$1}),i=await V(c$1);if(!i)throw new Error("No catalog found");if(f$1===true&&!i[t])throw new Error(`Package "${t}" not found in catalog: ${JSON.stringify(i,null,2)}`);l&&c(`Upgrading catalog entry for package "${t}" with tag "${o}"`,a$2);let n=await _(t,o,{executable:"pnpm"});if(!n)throw new Error(`Failed to fetch version for package "${t}" with tag "${o}"`);if(!valid(a(n),true))throw new Error(`Invalid version "${n}" fetched for package "${t}" with tag "${o}"`);let s=`${e$1||""}${a(n)}`;s===i[t]?l&&c(`The version for package "${t}" is already up to date in the catalog: ${s}`,a$2):!valid(a(i[t]),true)||coerce(i[t])&&coerce(s)&&gt(coerce(s),coerce(i[t]))?(i[t]=`${e$1||""}${a(s)}`,b$1(`Writing version ${i[t]} to catalog for "${t}" package`,a$2),await Y(i,c$1)):l&&a$1(`The current version "${i[t]}" for package "${t}" is greater than or equal to the version "${s}" fetched from the npm registry with tag "${o}". No update performed.`,a$2);}export{F as a,V as b,Y as c,lt as d,ut as e};
@@ -1 +1 @@
1
- 'use strict';var chunkFM7LT3XE_cjs=require('./chunk-FM7LT3XE.cjs'),chunkOD4WMXVV_cjs=require('./chunk-OD4WMXVV.cjs'),devkit=require('@nx/devkit'),fs=require('fs'),promises=require('fs/promises'),prettier=require('prettier');async function C(c=process.cwd(),i=chunkOD4WMXVV_cjs.e(c)){let l=chunkOD4WMXVV_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 chunkFM7LT3XE_cjs.b(i),a=JSON.parse(m),g=chunkOD4WMXVV_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=chunkOD4WMXVV_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
+ 'use strict';var chunkZ4NTUVVZ_cjs=require('./chunk-Z4NTUVVZ.cjs'),chunkOD4WMXVV_cjs=require('./chunk-OD4WMXVV.cjs'),devkit=require('@nx/devkit'),fs=require('fs'),promises=require('fs/promises'),prettier=require('prettier');async function C(c=process.cwd(),i=chunkOD4WMXVV_cjs.e(c)){let l=chunkOD4WMXVV_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 chunkZ4NTUVVZ_cjs.b(i),a=JSON.parse(m),g=chunkOD4WMXVV_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=chunkOD4WMXVV_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-XYHSAV5B.js';import {d,e}from'./chunk-2KCXZSNX.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};
1
+ import {b}from'./chunk-3TXCSGH4.js';import {d,e}from'./chunk-2KCXZSNX.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
+ 'use strict';var chunkWAL5SD4G_cjs=require('./chunk-WAL5SD4G.cjs'),chunkOD4WMXVV_cjs=require('./chunk-OD4WMXVV.cjs'),child_process=require('child_process'),semver=require('semver'),S=require('strip-ansi');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var S__default=/*#__PURE__*/_interopDefault(S);var C="latest";var h=C;async function G(t="npm"){return new Promise((r,o)=>{child_process.exec(`${t} config get registry`,(e,f,c)=>e&&!e.message.toLowerCase().trim().startsWith("npm warn")?o(e):c&&!c.toLowerCase().trim().startsWith("npm warn")?o(c):r(f.trim()));})}async function P(t,r=h,o={}){let e=o.executable||"npm",f=o.retries??3,c=o.timeout??1e4,l=o.registry||await G(e),a;for(let i=0;i<=f;i++)try{let n=new AbortController,s=setTimeout(()=>{n.abort();},c),u=await Promise.resolve(new Promise((M,_)=>{child_process.exec(`${e} view ${t} version --registry=${l}`,{signal:n.signal,maxBuffer:1024*1024*10},(T,I,y)=>T&&!T.message.toLowerCase().trim().startsWith("npm warn")?_(T):y&&!y.toLowerCase().trim().startsWith("npm warn")?_(y):M(I.trim()));}));if(!semver.valid(u,!0))throw clearTimeout(s),new Error(S__default.default(u).startsWith("[WARN] Request took")?`A timeout occurred while fetching the version for package "${t}" with tag "${r}".`:`Invalid version "${u}" fetched for package "${t}" with tag "${r}"`);return clearTimeout(s),u}catch(n){if(a=n,i<f){let s=Math.pow(2,i)*100;await new Promise(u=>setTimeout(u,s));}}throw a}async function L(t=chunkOD4WMXVV_cjs.e(process.cwd())){let r=await chunkOD4WMXVV_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(([o,e])=>[o,e.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 F(t=chunkOD4WMXVV_cjs.e(process.cwd())){let r=await L(t);if(!r)throw new Error("No catalog entries found in pnpm-workspace.yaml file");return r}async function V(t,r=chunkOD4WMXVV_cjs.e(process.cwd())){let o=await chunkOD4WMXVV_cjs.h(r);if(!o)throw new Error("No pnpm-workspace.yaml file found");o.catalog=Object.fromEntries(Object.entries(t).filter(([,e])=>e&&(e.startsWith("npm:")||semver.valid(chunkWAL5SD4G_cjs.a(e),true))).map(([e,f])=>[e,f.replaceAll('"',"").replaceAll("'","")])),await chunkOD4WMXVV_cjs.i(o,r);}async function pt(t,r,o={}){let{tag:e=h,prefix:f="^",workspaceRoot:c=chunkOD4WMXVV_cjs.e(),verbose:l=false}=o,a=await chunkOD4WMXVV_cjs.f(true,{workspaceRoot:c});l&&chunkOD4WMXVV_cjs.c(`Upgrading catalog entry for package "${r}" with tag "${e}"`,a);let i=await P(r,e,{executable:"pnpm"});if(!i)throw new Error(`Failed to fetch version for package "${r}" with tag "${e}"`);if(!semver.valid(chunkWAL5SD4G_cjs.a(i),true))throw new Error(`Invalid version "${i}" fetched for package "${r}" with tag "${e}"`);let n=`${f||""}${chunkWAL5SD4G_cjs.a(i)}`,s=false;return t[r]?.startsWith("npm:")?(t[r]=n,chunkOD4WMXVV_cjs.b(`Writing version ${t[r]} to catalog for "${r}" package`,a)):!semver.valid(semver.coerce(t[r]))||semver.coerce(t[r])&&semver.coerce(n)&&semver.gt(semver.coerce(n),semver.coerce(t[r]))?(t[r]=`${f||""}${chunkWAL5SD4G_cjs.a(n)}`,chunkOD4WMXVV_cjs.b(`Writing version ${t[r]} to catalog for "${r}" package`,a),s=true):l&&chunkOD4WMXVV_cjs.b(`The current version ${t[r]} for package "${r}" is greater than or equal to the version ${chunkWAL5SD4G_cjs.a(n)} fetched from the npm registry with tag "${e}". No update performed.`,a),{catalog:t,updated:s}}async function lt(t,r={}){let{tag:o=h,prefix:e="^",throwIfMissingInCatalog:f=false,workspaceRoot:c=chunkOD4WMXVV_cjs.e(),verbose:l=false}=r,a=await chunkOD4WMXVV_cjs.f(true,{workspaceRoot:c}),i=await F(c);if(!i)throw new Error("No catalog found");if(f===true&&!i[t])throw new Error(`Package "${t}" not found in catalog: ${JSON.stringify(i,null,2)}`);l&&chunkOD4WMXVV_cjs.c(`Upgrading catalog entry for package "${t}" with tag "${o}"`,a);let n=await P(t,o,{executable:"pnpm"});if(!n)throw new Error(`Failed to fetch version for package "${t}" with tag "${o}"`);if(!semver.valid(chunkWAL5SD4G_cjs.a(n),true))throw new Error(`Invalid version "${n}" fetched for package "${t}" with tag "${o}"`);let s=`${e||""}${chunkWAL5SD4G_cjs.a(n)}`;s===i[t]?l&&chunkOD4WMXVV_cjs.c(`The version for package "${t}" is already up to date in the catalog: ${s}`,a):!semver.valid(chunkWAL5SD4G_cjs.a(i[t]),true)||semver.coerce(i[t])&&semver.coerce(s)&&semver.gt(semver.coerce(s),semver.coerce(i[t]))?(i[t]=`${e||""}${chunkWAL5SD4G_cjs.a(s)}`,chunkOD4WMXVV_cjs.b(`Writing version ${i[t]} to catalog for "${t}" package`,a),await V(i,c)):l&&chunkOD4WMXVV_cjs.a(`The current version "${i[t]}" for package "${t}" is greater than or equal to the version "${s}" fetched from the npm registry with tag "${o}". No update performed.`,a);}exports.a=L;exports.b=F;exports.c=V;exports.d=pt;exports.e=lt;
@@ -1 +1 @@
1
- 'use strict';var chunkFM7LT3XE_cjs=require('../chunk-FM7LT3XE.cjs');require('../chunk-WAL5SD4G.cjs'),require('../chunk-OD4WMXVV.cjs');Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkFM7LT3XE_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkFM7LT3XE_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkFM7LT3XE_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkFM7LT3XE_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkFM7LT3XE_cjs.d}});
1
+ 'use strict';var chunkZ4NTUVVZ_cjs=require('../chunk-Z4NTUVVZ.cjs');require('../chunk-WAL5SD4G.cjs'),require('../chunk-OD4WMXVV.cjs');Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkZ4NTUVVZ_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkZ4NTUVVZ_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkZ4NTUVVZ_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkZ4NTUVVZ_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkZ4NTUVVZ_cjs.d}});
@@ -1 +1 @@
1
- export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'../chunk-XYHSAV5B.js';import'../chunk-7QKHH2VM.js';import'../chunk-2KCXZSNX.js';
1
+ export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'../chunk-3TXCSGH4.js';import'../chunk-7QKHH2VM.js';import'../chunk-2KCXZSNX.js';
@@ -1 +1 @@
1
- 'use strict';require('../chunk-QNTSKZUU.cjs');var chunkF45T6WKJ_cjs=require('../chunk-F45T6WKJ.cjs'),chunkFM7LT3XE_cjs=require('../chunk-FM7LT3XE.cjs');require('../chunk-WAL5SD4G.cjs');var chunkOD4WMXVV_cjs=require('../chunk-OD4WMXVV.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunkF45T6WKJ_cjs.a}});Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkFM7LT3XE_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkFM7LT3XE_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkFM7LT3XE_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkFM7LT3XE_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkFM7LT3XE_cjs.d}});Object.defineProperty(exports,"getPnpmWorkspaceFilePath",{enumerable:true,get:function(){return chunkOD4WMXVV_cjs.g}});Object.defineProperty(exports,"readPnpmWorkspaceFile",{enumerable:true,get:function(){return chunkOD4WMXVV_cjs.h}});Object.defineProperty(exports,"writePnpmWorkspaceFile",{enumerable:true,get:function(){return chunkOD4WMXVV_cjs.i}});
1
+ 'use strict';require('../chunk-QNTSKZUU.cjs');var chunkA6MDFAK7_cjs=require('../chunk-A6MDFAK7.cjs'),chunkZ4NTUVVZ_cjs=require('../chunk-Z4NTUVVZ.cjs');require('../chunk-WAL5SD4G.cjs');var chunkOD4WMXVV_cjs=require('../chunk-OD4WMXVV.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunkA6MDFAK7_cjs.a}});Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkZ4NTUVVZ_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkZ4NTUVVZ_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkZ4NTUVVZ_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkZ4NTUVVZ_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkZ4NTUVVZ_cjs.d}});Object.defineProperty(exports,"getPnpmWorkspaceFilePath",{enumerable:true,get:function(){return chunkOD4WMXVV_cjs.g}});Object.defineProperty(exports,"readPnpmWorkspaceFile",{enumerable:true,get:function(){return chunkOD4WMXVV_cjs.h}});Object.defineProperty(exports,"writePnpmWorkspaceFile",{enumerable:true,get:function(){return chunkOD4WMXVV_cjs.i}});
@@ -1 +1 @@
1
- import'../chunk-GV6YH6UO.js';export{a as replaceDepsAliases}from'../chunk-PRQIURUD.js';export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'../chunk-XYHSAV5B.js';import'../chunk-7QKHH2VM.js';export{g as getPnpmWorkspaceFilePath,h as readPnpmWorkspaceFile,i as writePnpmWorkspaceFile}from'../chunk-2KCXZSNX.js';
1
+ import'../chunk-GV6YH6UO.js';export{a as replaceDepsAliases}from'../chunk-AOP3MROB.js';export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'../chunk-3TXCSGH4.js';import'../chunk-7QKHH2VM.js';export{g as getPnpmWorkspaceFilePath,h as readPnpmWorkspaceFile,i as writePnpmWorkspaceFile}from'../chunk-2KCXZSNX.js';
@@ -1 +1 @@
1
- 'use strict';var chunkF45T6WKJ_cjs=require('../chunk-F45T6WKJ.cjs');require('../chunk-FM7LT3XE.cjs'),require('../chunk-WAL5SD4G.cjs'),require('../chunk-OD4WMXVV.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunkF45T6WKJ_cjs.a}});
1
+ 'use strict';var chunkA6MDFAK7_cjs=require('../chunk-A6MDFAK7.cjs');require('../chunk-Z4NTUVVZ.cjs'),require('../chunk-WAL5SD4G.cjs'),require('../chunk-OD4WMXVV.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunkA6MDFAK7_cjs.a}});
@@ -1 +1 @@
1
- export{a as replaceDepsAliases}from'../chunk-PRQIURUD.js';import'../chunk-XYHSAV5B.js';import'../chunk-7QKHH2VM.js';import'../chunk-2KCXZSNX.js';
1
+ export{a as replaceDepsAliases}from'../chunk-AOP3MROB.js';import'../chunk-3TXCSGH4.js';import'../chunk-7QKHH2VM.js';import'../chunk-2KCXZSNX.js';
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';require('./chunk-SFZRYJZ2.cjs'),require('./chunk-QNTSKZUU.cjs');var chunkF45T6WKJ_cjs=require('./chunk-F45T6WKJ.cjs'),chunkFM7LT3XE_cjs=require('./chunk-FM7LT3XE.cjs');require('./chunk-WAL5SD4G.cjs');var chunkOD4WMXVV_cjs=require('./chunk-OD4WMXVV.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunkF45T6WKJ_cjs.a}});Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkFM7LT3XE_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkFM7LT3XE_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkFM7LT3XE_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkFM7LT3XE_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkFM7LT3XE_cjs.d}});Object.defineProperty(exports,"getPnpmWorkspaceFilePath",{enumerable:true,get:function(){return chunkOD4WMXVV_cjs.g}});Object.defineProperty(exports,"readPnpmWorkspaceFile",{enumerable:true,get:function(){return chunkOD4WMXVV_cjs.h}});Object.defineProperty(exports,"writePnpmWorkspaceFile",{enumerable:true,get:function(){return chunkOD4WMXVV_cjs.i}});
1
+ 'use strict';require('./chunk-SFZRYJZ2.cjs'),require('./chunk-QNTSKZUU.cjs');var chunkA6MDFAK7_cjs=require('./chunk-A6MDFAK7.cjs'),chunkZ4NTUVVZ_cjs=require('./chunk-Z4NTUVVZ.cjs');require('./chunk-WAL5SD4G.cjs');var chunkOD4WMXVV_cjs=require('./chunk-OD4WMXVV.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunkA6MDFAK7_cjs.a}});Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkZ4NTUVVZ_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkZ4NTUVVZ_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkZ4NTUVVZ_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkZ4NTUVVZ_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkZ4NTUVVZ_cjs.d}});Object.defineProperty(exports,"getPnpmWorkspaceFilePath",{enumerable:true,get:function(){return chunkOD4WMXVV_cjs.g}});Object.defineProperty(exports,"readPnpmWorkspaceFile",{enumerable:true,get:function(){return chunkOD4WMXVV_cjs.h}});Object.defineProperty(exports,"writePnpmWorkspaceFile",{enumerable:true,get:function(){return chunkOD4WMXVV_cjs.i}});
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import'./chunk-GGNOJ77I.js';import'./chunk-GV6YH6UO.js';export{a as replaceDepsAliases}from'./chunk-PRQIURUD.js';export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'./chunk-XYHSAV5B.js';import'./chunk-7QKHH2VM.js';export{g as getPnpmWorkspaceFilePath,h as readPnpmWorkspaceFile,i as writePnpmWorkspaceFile}from'./chunk-2KCXZSNX.js';
1
+ import'./chunk-GGNOJ77I.js';import'./chunk-GV6YH6UO.js';export{a as replaceDepsAliases}from'./chunk-AOP3MROB.js';export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'./chunk-3TXCSGH4.js';import'./chunk-7QKHH2VM.js';export{g as getPnpmWorkspaceFilePath,h as readPnpmWorkspaceFile,i as writePnpmWorkspaceFile}from'./chunk-2KCXZSNX.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/pnpm-tools",
3
- "version": "0.7.120",
3
+ "version": "0.7.122",
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,10 +73,10 @@
73
73
  "storm-pnpm-esm": "./bin/pnpm.js"
74
74
  },
75
75
  "dependencies": {
76
- "@storm-software/config": "^1.138.46",
77
- "@storm-software/config-tools": "^1.190.109",
78
- "@storm-software/npm-tools": "^0.6.227",
79
- "@storm-software/package-constants": "^0.1.122",
76
+ "@storm-software/config": "^1.138.48",
77
+ "@storm-software/config-tools": "^1.190.111",
78
+ "@storm-software/npm-tools": "^0.6.229",
79
+ "@storm-software/package-constants": "^0.1.124",
80
80
  "chalk": "^4.1.2",
81
81
  "commander": "^12.1.0",
82
82
  "defu": "^6.1.7",
@@ -91,5 +91,5 @@
91
91
  "tsup": "8.4.0"
92
92
  },
93
93
  "publishConfig": { "access": "public" },
94
- "gitHead": "9389e94089c0ddc0cc122425b1a47201f655eafd"
94
+ "gitHead": "12f7e1011f68248061d3f51a5a9b92e390d7d932"
95
95
  }
@@ -1,2 +0,0 @@
1
- 'use strict';var chunkWAL5SD4G_cjs=require('./chunk-WAL5SD4G.cjs'),chunkOD4WMXVV_cjs=require('./chunk-OD4WMXVV.cjs'),child_process=require('child_process'),semver=require('semver'),L=require('strip-ansi');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var L__default=/*#__PURE__*/_interopDefault(L);var C="latest";var m=C;async function G(t="npm"){return new Promise((r,o)=>{child_process.exec(`${t} config get registry`,(e,a,f)=>e&&!e.message.toLowerCase().trim().startsWith("npm warn")?o(e):f&&!f.toLowerCase().trim().startsWith("npm warn")?o(f):r(a.trim()));})}async function P(t,r=m,o={}){let e=o.executable||"npm",a=o.retries??3,f=o.timeout??1e4,l=o.registry||await G(e),c;for(let i=0;i<=a;i++)try{let n=new AbortController,s=setTimeout(()=>{n.abort();},f),u=await Promise.resolve(new Promise((M,_)=>{child_process.exec(`${e} view ${t} version --registry=${l}`,{signal:n.signal,maxBuffer:1024*1024*10},(T,I,y)=>T&&!T.message.toLowerCase().trim().startsWith("npm warn")?_(T):y&&!y.toLowerCase().trim().startsWith("npm warn")?_(y):M(I.trim()));}));if(!semver.valid(u,!0))throw clearTimeout(s),new Error(L__default.default(u).startsWith("[WARN] Request took")?`A timeout occurred while fetching the version for package "${t}" with tag "${r}".`:`Invalid version "${u}" fetched for package "${t}" with tag "${r}"`);return clearTimeout(s),u}catch(n){if(c=n,i<a){let s=Math.pow(2,i)*100;await new Promise(u=>setTimeout(u,s));}}throw c}async function W(t=chunkOD4WMXVV_cjs.e(process.cwd())){let r=await chunkOD4WMXVV_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(([o,e])=>[o,e.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 F(t=chunkOD4WMXVV_cjs.e(process.cwd())){let r=await W(t);if(!r)throw new Error("No catalog entries found in pnpm-workspace.yaml file");return r}async function V(t,r=chunkOD4WMXVV_cjs.e(process.cwd())){let o=await chunkOD4WMXVV_cjs.h(r);if(!o)throw new Error("No pnpm-workspace.yaml file found");o.catalog=Object.fromEntries(Object.entries(t).filter(([,e])=>e&&semver.valid(chunkWAL5SD4G_cjs.a(e),true)).map(([e,a])=>[e,a.replaceAll('"',"").replaceAll("'","")])),await chunkOD4WMXVV_cjs.i(o,r);}async function pt(t,r,o={}){let{tag:e=m,prefix:a="^",workspaceRoot:f=chunkOD4WMXVV_cjs.e(),verbose:l=false}=o,c=await chunkOD4WMXVV_cjs.f(true,{workspaceRoot:f});l&&chunkOD4WMXVV_cjs.c(`Upgrading catalog entry for package "${r}" with tag "${e}"`,c);let i=await P(r,e,{executable:"pnpm"});if(!i)throw new Error(`Failed to fetch version for package "${r}" with tag "${e}"`);if(!semver.valid(chunkWAL5SD4G_cjs.a(i),true))throw new Error(`Invalid version "${i}" fetched for package "${r}" with tag "${e}"`);let n=`${a||""}${chunkWAL5SD4G_cjs.a(i)}`,s=false;return !semver.valid(semver.coerce(t[r]))||semver.coerce(t[r])&&semver.coerce(n)&&semver.gt(semver.coerce(n),semver.coerce(t[r]))?(t[r]=`${a||""}${chunkWAL5SD4G_cjs.a(n)}`,chunkOD4WMXVV_cjs.b(`Writing version ${t[r]} to catalog for "${r}" package`,c),s=true):l&&chunkOD4WMXVV_cjs.b(`The current version ${t[r]} for package "${r}" is greater than or equal to the version ${chunkWAL5SD4G_cjs.a(n)} fetched from the npm registry with tag "${e}". No update performed.`,c),{catalog:t,updated:s}}async function lt(t,r={}){let{tag:o=m,prefix:e="^",throwIfMissingInCatalog:a=false,workspaceRoot:f=chunkOD4WMXVV_cjs.e(),verbose:l=false}=r,c=await chunkOD4WMXVV_cjs.f(true,{workspaceRoot:f}),i=await F(f);if(!i)throw new Error("No catalog found");if(a===true&&!i[t])throw new Error(`Package "${t}" not found in catalog: ${JSON.stringify(i,null,2)}`);l&&chunkOD4WMXVV_cjs.c(`Upgrading catalog entry for package "${t}" with tag "${o}"`,c);let n=await P(t,o,{executable:"pnpm"});if(!n)throw new Error(`Failed to fetch version for package "${t}" with tag "${o}"`);if(!semver.valid(chunkWAL5SD4G_cjs.a(n),true))throw new Error(`Invalid version "${n}" fetched for package "${t}" with tag "${o}"`);let s=`${e||""}${chunkWAL5SD4G_cjs.a(n)}`;s===i[t]?l&&chunkOD4WMXVV_cjs.c(`The version for package "${t}" is already up to date in the catalog: ${s}`,c):!semver.valid(chunkWAL5SD4G_cjs.a(i[t]),true)||semver.coerce(i[t])&&semver.coerce(s)&&semver.gt(semver.coerce(s),semver.coerce(i[t]))?(i[t]=`${e||""}${chunkWAL5SD4G_cjs.a(s)}`,chunkOD4WMXVV_cjs.b(`Writing version ${i[t]} to catalog for "${t}" package`,c),await V(i,f)):l&&chunkOD4WMXVV_cjs.a(`The current version "${i[t]}" for package "${t}" is greater than or equal to the version "${s}" fetched from the npm registry with tag "${o}". No update performed.`,c);}exports.a=W;exports.b=F;exports.c=V;exports.d=pt;exports.e=lt;
@@ -1,2 +0,0 @@
1
- import {a}from'./chunk-7QKHH2VM.js';import {h,e,i,f,c,b as b$1,a as a$1}from'./chunk-2KCXZSNX.js';import {exec}from'node:child_process';import {valid,coerce,gt}from'semver';import W from'strip-ansi';var G="latest";var m=G;async function b(t="npm"){return new Promise((r,o)=>{exec(`${t} config get registry`,(e,a,f)=>e&&!e.message.toLowerCase().trim().startsWith("npm warn")?o(e):f&&!f.toLowerCase().trim().startsWith("npm warn")?o(f):r(a.trim()));})}async function _(t,r=m,o={}){let e=o.executable||"npm",a=o.retries??3,f=o.timeout??1e4,l=o.registry||await b(e),c;for(let i=0;i<=a;i++)try{let n=new AbortController,s=setTimeout(()=>{n.abort();},f),u=await Promise.resolve(new Promise((I,A)=>{exec(`${e} view ${t} version --registry=${l}`,{signal:n.signal,maxBuffer:1024*1024*10},(T,O,y)=>T&&!T.message.toLowerCase().trim().startsWith("npm warn")?A(T):y&&!y.toLowerCase().trim().startsWith("npm warn")?A(y):I(O.trim()));}));if(!valid(u,!0))throw clearTimeout(s),new Error(W(u).startsWith("[WARN] Request took")?`A timeout occurred while fetching the version for package "${t}" with tag "${r}".`:`Invalid version "${u}" fetched for package "${t}" with tag "${r}"`);return clearTimeout(s),u}catch(n){if(c=n,i<a){let s=Math.pow(2,i)*100;await new Promise(u=>setTimeout(u,s));}}throw c}async function F(t=e(process.cwd())){let r=await h(t);if(!r)throw new Error("No pnpm-workspace.yaml file found");if(r?.catalog)return Object.fromEntries(Object.entries(r.catalog).map(([o,e])=>[o,e.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 V(t=e(process.cwd())){let r=await F(t);if(!r)throw new Error("No catalog entries found in pnpm-workspace.yaml file");return r}async function Y(t,r=e(process.cwd())){let o=await h(r);if(!o)throw new Error("No pnpm-workspace.yaml file found");o.catalog=Object.fromEntries(Object.entries(t).filter(([,e])=>e&&valid(a(e),true)).map(([e,a])=>[e,a.replaceAll('"',"").replaceAll("'","")])),await i(o,r);}async function lt(t,r,o={}){let{tag:e$1=m,prefix:a$1="^",workspaceRoot:f$1=e(),verbose:l=false}=o,c$1=await f(true,{workspaceRoot:f$1});l&&c(`Upgrading catalog entry for package "${r}" with tag "${e$1}"`,c$1);let i=await _(r,e$1,{executable:"pnpm"});if(!i)throw new Error(`Failed to fetch version for package "${r}" with tag "${e$1}"`);if(!valid(a(i),true))throw new Error(`Invalid version "${i}" fetched for package "${r}" with tag "${e$1}"`);let n=`${a$1||""}${a(i)}`,s=false;return !valid(coerce(t[r]))||coerce(t[r])&&coerce(n)&&gt(coerce(n),coerce(t[r]))?(t[r]=`${a$1||""}${a(n)}`,b$1(`Writing version ${t[r]} to catalog for "${r}" package`,c$1),s=true):l&&b$1(`The current version ${t[r]} for package "${r}" is greater than or equal to the version ${a(n)} fetched from the npm registry with tag "${e$1}". No update performed.`,c$1),{catalog:t,updated:s}}async function ut(t,r={}){let{tag:o=m,prefix:e$1="^",throwIfMissingInCatalog:a$2=false,workspaceRoot:f$1=e(),verbose:l=false}=r,c$1=await f(true,{workspaceRoot:f$1}),i=await V(f$1);if(!i)throw new Error("No catalog found");if(a$2===true&&!i[t])throw new Error(`Package "${t}" not found in catalog: ${JSON.stringify(i,null,2)}`);l&&c(`Upgrading catalog entry for package "${t}" with tag "${o}"`,c$1);let n=await _(t,o,{executable:"pnpm"});if(!n)throw new Error(`Failed to fetch version for package "${t}" with tag "${o}"`);if(!valid(a(n),true))throw new Error(`Invalid version "${n}" fetched for package "${t}" with tag "${o}"`);let s=`${e$1||""}${a(n)}`;s===i[t]?l&&c(`The version for package "${t}" is already up to date in the catalog: ${s}`,c$1):!valid(a(i[t]),true)||coerce(i[t])&&coerce(s)&&gt(coerce(s),coerce(i[t]))?(i[t]=`${e$1||""}${a(s)}`,b$1(`Writing version ${i[t]} to catalog for "${t}" package`,c$1),await Y(i,f$1)):l&&a$1(`The current version "${i[t]}" for package "${t}" is greater than or equal to the version "${s}" fetched from the npm registry with tag "${o}". No update performed.`,c$1);}export{F as a,V as b,Y as c,lt as d,ut as e};