@storm-software/pnpm-tools 0.7.86 → 0.7.88
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 +32 -0
- package/README.md +1 -1
- package/bin/pnpm.cjs +36 -32
- package/bin/pnpm.js +36 -32
- package/dist/{chunk-C3J2ASUJ.cjs → chunk-5DGGSWUE.cjs} +1 -1
- package/dist/chunk-7QKHH2VM.js +1 -0
- package/dist/{chunk-OZ2QYXXF.js → chunk-D5OWPJ4N.js} +1 -1
- package/dist/chunk-HDFKZ7VD.cjs +2 -0
- package/dist/chunk-WAL5SD4G.cjs +1 -0
- package/dist/chunk-YS5TOJST.js +2 -0
- package/dist/helpers/catalog.cjs +1 -1
- package/dist/helpers/catalog.d.cts +6 -0
- package/dist/helpers/catalog.d.ts +6 -0
- package/dist/helpers/catalog.js +1 -1
- package/dist/helpers/format.cjs +1 -0
- package/dist/helpers/format.d.cts +9 -0
- package/dist/helpers/format.d.ts +9 -0
- package/dist/helpers/format.js +1 -0
- package/dist/helpers/index.cjs +1 -1
- package/dist/helpers/index.js +1 -1
- package/dist/helpers/replace-deps-aliases.cjs +1 -1
- package/dist/helpers/replace-deps-aliases.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +6 -6
- package/dist/chunk-453VGPIV.cjs +0 -2
- package/dist/chunk-5NPDT7WW.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - Pnpm Tools
|
|
4
4
|
|
|
5
|
+
## [0.7.88](https://github.com/storm-software/storm-ops/releases/tag/pnpm-tools%400.7.88) (06/24/2026)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- **pnpm-tools:** Resolve issue with replace statement when formatting semver ([f9e233720](https://github.com/storm-software/storm-ops/commit/f9e233720))
|
|
10
|
+
|
|
11
|
+
### Updated Dependencies
|
|
12
|
+
|
|
13
|
+
- Updated **config** to **v1.138.14**
|
|
14
|
+
- Updated **config-tools** to **v1.190.77**
|
|
15
|
+
- Updated **npm-tools** to **v0.6.195**
|
|
16
|
+
- Updated **package-constants** to **v0.1.90**
|
|
17
|
+
- Updated **testing-tools** to **v1.119.230**
|
|
18
|
+
|
|
19
|
+
## [0.7.87](https://github.com/storm-software/storm-ops/releases/tag/pnpm-tools%400.7.87) (06/24/2026)
|
|
20
|
+
|
|
21
|
+
### Miscellaneous
|
|
22
|
+
|
|
23
|
+
- **monorepo:** Update workspace packages' dependencies ([ab5da025e](https://github.com/storm-software/storm-ops/commit/ab5da025e))
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
- **pnpm-tools:** Added `verbose` flag to CLI and improvoed semver validation logic ([b9dbabed0](https://github.com/storm-software/storm-ops/commit/b9dbabed0))
|
|
28
|
+
|
|
29
|
+
### Updated Dependencies
|
|
30
|
+
|
|
31
|
+
- Updated **config** to **v1.138.13**
|
|
32
|
+
- Updated **config-tools** to **v1.190.76**
|
|
33
|
+
- Updated **npm-tools** to **v0.6.194**
|
|
34
|
+
- Updated **package-constants** to **v0.1.89**
|
|
35
|
+
- Updated **testing-tools** to **v1.119.229**
|
|
36
|
+
|
|
5
37
|
## [0.7.86](https://github.com/storm-software/storm-ops/releases/tag/pnpm-tools%400.7.86) (06/23/2026)
|
|
6
38
|
|
|
7
39
|
### 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
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
31
31
|
|
|
32
32
|
<!-- prettier-ignore-start -->
|
|
33
33
|
<!-- markdownlint-disable -->
|
package/bin/pnpm.cjs
CHANGED
|
@@ -2186,7 +2186,7 @@ var import_commander = require("commander");
|
|
|
2186
2186
|
// package.json
|
|
2187
2187
|
var package_default = {
|
|
2188
2188
|
name: "@storm-software/pnpm-tools",
|
|
2189
|
-
version: "0.7.
|
|
2189
|
+
version: "0.7.88",
|
|
2190
2190
|
private: false,
|
|
2191
2191
|
description: "A set of [pnpm](https://pnpm.io/) plugins and utilities for managing workspace packages/dependencies.",
|
|
2192
2192
|
repository: {
|
|
@@ -2345,6 +2345,11 @@ async function getVersion(packageName, tag = DEFAULT_NPM_TAG, options = {}) {
|
|
|
2345
2345
|
// src/helpers/catalog.ts
|
|
2346
2346
|
var import_semver = require("semver");
|
|
2347
2347
|
|
|
2348
|
+
// src/helpers/format.ts
|
|
2349
|
+
function replacePrefix(value) {
|
|
2350
|
+
return (value ?? "").replace(/^===/g, "").replace(/^!==/g, "").replace(/^==/g, "").replace(/^!=/g, "").replace(/^>/g, "").replace(/^>=/g, "").replace(/^</g, "").replace(/^<=/g, "").replace(/^\^/g, "").replace(/^~/g, "");
|
|
2351
|
+
}
|
|
2352
|
+
|
|
2348
2353
|
// src/helpers/pnpm-workspace.ts
|
|
2349
2354
|
var import_node_fs4 = require("fs");
|
|
2350
2355
|
var import_promises2 = require("fs/promises");
|
|
@@ -2415,12 +2420,7 @@ async function setCatalog(catalog, workspaceRoot = findWorkspaceRoot(process.cwd
|
|
|
2415
2420
|
throw new Error("No pnpm-workspace.yaml file found");
|
|
2416
2421
|
}
|
|
2417
2422
|
pnpmWorkspaceFile.catalog = Object.fromEntries(
|
|
2418
|
-
Object.entries(catalog).filter(([, value]) => value).map(([key, value]) => {
|
|
2419
|
-
if (!(0, import_semver.valid)(value)) {
|
|
2420
|
-
throw new Error(
|
|
2421
|
-
`Tried to save invalid version "${value}" for package "${key}" to the PNPM catalog in the pnpm-workspace.yaml file. Please ensure that the version is valid before saving.`
|
|
2422
|
-
);
|
|
2423
|
-
}
|
|
2423
|
+
Object.entries(catalog).filter(([, value]) => value && (0, import_semver.valid)(replacePrefix(value), true)).map(([key, value]) => {
|
|
2424
2424
|
return [key, value.replaceAll('"', "").replaceAll("'", "")];
|
|
2425
2425
|
})
|
|
2426
2426
|
);
|
|
@@ -2430,13 +2430,16 @@ async function upgradeCatalog(catalog, packageName, options = {}) {
|
|
|
2430
2430
|
const {
|
|
2431
2431
|
tag = DEFAULT_NPM_TAG,
|
|
2432
2432
|
prefix = "^",
|
|
2433
|
-
workspaceRoot = findWorkspaceRoot()
|
|
2433
|
+
workspaceRoot = findWorkspaceRoot(),
|
|
2434
|
+
verbose = false
|
|
2434
2435
|
} = options;
|
|
2435
2436
|
const workspaceConfig = await getWorkspaceConfig(true, { workspaceRoot });
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2437
|
+
if (verbose) {
|
|
2438
|
+
writeTrace(
|
|
2439
|
+
`Upgrading catalog entry for package "${packageName}" with tag "${tag}"`,
|
|
2440
|
+
workspaceConfig
|
|
2441
|
+
);
|
|
2442
|
+
}
|
|
2440
2443
|
const origVersion = await getVersion(packageName, tag, {
|
|
2441
2444
|
executable: "pnpm"
|
|
2442
2445
|
});
|
|
@@ -2445,24 +2448,26 @@ async function upgradeCatalog(catalog, packageName, options = {}) {
|
|
|
2445
2448
|
`Failed to fetch version for package "${packageName}" with tag "${tag}"`
|
|
2446
2449
|
);
|
|
2447
2450
|
}
|
|
2448
|
-
if (!(0, import_semver.valid)(origVersion)) {
|
|
2451
|
+
if (!(0, import_semver.valid)(replacePrefix(origVersion), true)) {
|
|
2449
2452
|
throw new Error(
|
|
2450
2453
|
`Invalid version "${origVersion}" fetched for package "${packageName}" with tag "${tag}"`
|
|
2451
2454
|
);
|
|
2452
2455
|
}
|
|
2453
|
-
const version = `${prefix || ""}${origVersion
|
|
2456
|
+
const version = `${prefix || ""}${replacePrefix(origVersion)}`;
|
|
2454
2457
|
let updated = false;
|
|
2455
2458
|
if (!(0, import_semver.valid)((0, import_semver.coerce)(catalog[packageName])) || (0, import_semver.coerce)(catalog[packageName]) && (0, import_semver.coerce)(version) && // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
2456
2459
|
(0, import_semver.gt)((0, import_semver.coerce)(version), (0, import_semver.coerce)(catalog[packageName]))) {
|
|
2457
|
-
catalog[packageName] = `${prefix || ""}${version
|
|
2460
|
+
catalog[packageName] = `${prefix || ""}${replacePrefix(version)}`;
|
|
2458
2461
|
writeDebug(
|
|
2459
2462
|
`Writing version ${catalog[packageName]} to catalog for "${packageName}" package`,
|
|
2460
2463
|
workspaceConfig
|
|
2461
2464
|
);
|
|
2462
2465
|
updated = true;
|
|
2463
|
-
} else {
|
|
2466
|
+
} else if (verbose) {
|
|
2464
2467
|
writeDebug(
|
|
2465
|
-
`The current version ${catalog[packageName]} for package "${packageName}" is greater than or equal to the version ${
|
|
2468
|
+
`The current version ${catalog[packageName]} for package "${packageName}" is greater than or equal to the version ${replacePrefix(
|
|
2469
|
+
version
|
|
2470
|
+
)} fetched from the npm registry with tag "${tag}". No update performed.`,
|
|
2466
2471
|
workspaceConfig
|
|
2467
2472
|
);
|
|
2468
2473
|
}
|
|
@@ -2510,6 +2515,10 @@ function createProgram(config) {
|
|
|
2510
2515
|
- Wildcard (*): Allows the most flexibility by accepting any version. Example: \u201C*2.4.6" allows any version.`,
|
|
2511
2516
|
"^"
|
|
2512
2517
|
).option("--internal", "Whether to update all Storm Software packages.").option("--nx", "Whether to update Nx packages.").option(
|
|
2518
|
+
"--verbose",
|
|
2519
|
+
"An option to enable verbose logging for the update process.",
|
|
2520
|
+
false
|
|
2521
|
+
).option(
|
|
2513
2522
|
"--pnpm-plugin",
|
|
2514
2523
|
"Whether to upgrade the Storm Software pnpm plugin."
|
|
2515
2524
|
).option(
|
|
@@ -2534,9 +2543,10 @@ async function updateAction(packages, options) {
|
|
|
2534
2543
|
install,
|
|
2535
2544
|
all,
|
|
2536
2545
|
internal = all,
|
|
2537
|
-
nx =
|
|
2546
|
+
nx = false,
|
|
2538
2547
|
pnpmPlugin,
|
|
2539
|
-
prefix = "^"
|
|
2548
|
+
prefix = "^",
|
|
2549
|
+
verbose = false
|
|
2540
2550
|
} = options || {};
|
|
2541
2551
|
let packagesFound = false;
|
|
2542
2552
|
let pkgs = packages && Array.isArray(packages) ? packages : [];
|
|
@@ -2583,7 +2593,8 @@ async function updateAction(packages, options) {
|
|
|
2583
2593
|
const result = await upgradeCatalog(catalog, matchedPackage, {
|
|
2584
2594
|
tag,
|
|
2585
2595
|
prefix,
|
|
2586
|
-
workspaceRoot: _config.workspaceRoot
|
|
2596
|
+
workspaceRoot: _config.workspaceRoot,
|
|
2597
|
+
verbose
|
|
2587
2598
|
});
|
|
2588
2599
|
if (result.updated && result.catalog[matchedPackage]) {
|
|
2589
2600
|
catalog[matchedPackage] = result.catalog[matchedPackage];
|
|
@@ -2663,26 +2674,19 @@ async function updateAction(packages, options) {
|
|
|
2663
2674
|
`${brandIcon(_config)} Successfully updated${install ? " and installed" : ""} the following package(s):
|
|
2664
2675
|
${changed.map(
|
|
2665
2676
|
(pkg) => `- ${import_chalk3.default.bold(pkg.packageName)}: ${import_chalk3.default.bold(
|
|
2666
|
-
import_chalk3.default.red(`v${pkg.previous
|
|
2667
|
-
)} -> ${import_chalk3.default.bold(
|
|
2668
|
-
import_chalk3.default.green(`v${pkg.current.replace(/^[\^~><=]*/, "")}`)
|
|
2669
|
-
)}`
|
|
2677
|
+
import_chalk3.default.red(`v${replacePrefix(pkg.previous)}`)
|
|
2678
|
+
)} -> ${import_chalk3.default.bold(import_chalk3.default.green(`v${replacePrefix(pkg.current)}`))}`
|
|
2670
2679
|
).join("\n")}`,
|
|
2671
2680
|
_config
|
|
2672
2681
|
);
|
|
2673
2682
|
}
|
|
2674
2683
|
} catch (error) {
|
|
2675
2684
|
writeFatal(
|
|
2676
|
-
`A fatal error occurred while running
|
|
2677
|
-
|
|
2678
|
-
${JSON.stringify(
|
|
2679
|
-
error,
|
|
2680
|
-
null,
|
|
2681
|
-
2
|
|
2682
|
-
)}`,
|
|
2685
|
+
`A fatal error occurred while running storm-pnpm update: ${typeof error === "object" ? error.message ? error.message : `
|
|
2686
|
+
${JSON.stringify(error, null, 2)}` : error}`,
|
|
2683
2687
|
_config
|
|
2684
2688
|
);
|
|
2685
|
-
throw
|
|
2689
|
+
throw error;
|
|
2686
2690
|
}
|
|
2687
2691
|
}
|
|
2688
2692
|
|
package/bin/pnpm.js
CHANGED
|
@@ -2164,7 +2164,7 @@ import { Command } from "commander";
|
|
|
2164
2164
|
// package.json
|
|
2165
2165
|
var package_default = {
|
|
2166
2166
|
name: "@storm-software/pnpm-tools",
|
|
2167
|
-
version: "0.7.
|
|
2167
|
+
version: "0.7.88",
|
|
2168
2168
|
private: false,
|
|
2169
2169
|
description: "A set of [pnpm](https://pnpm.io/) plugins and utilities for managing workspace packages/dependencies.",
|
|
2170
2170
|
repository: {
|
|
@@ -2323,6 +2323,11 @@ async function getVersion(packageName, tag = DEFAULT_NPM_TAG, options = {}) {
|
|
|
2323
2323
|
// src/helpers/catalog.ts
|
|
2324
2324
|
import { coerce, gt, valid } from "semver";
|
|
2325
2325
|
|
|
2326
|
+
// src/helpers/format.ts
|
|
2327
|
+
function replacePrefix(value) {
|
|
2328
|
+
return (value ?? "").replace(/^===/g, "").replace(/^!==/g, "").replace(/^==/g, "").replace(/^!=/g, "").replace(/^>/g, "").replace(/^>=/g, "").replace(/^</g, "").replace(/^<=/g, "").replace(/^\^/g, "").replace(/^~/g, "");
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2326
2331
|
// src/helpers/pnpm-workspace.ts
|
|
2327
2332
|
import { existsSync as existsSync4 } from "node:fs";
|
|
2328
2333
|
import { readFile as readFile2, writeFile } from "node:fs/promises";
|
|
@@ -2393,12 +2398,7 @@ async function setCatalog(catalog, workspaceRoot = findWorkspaceRoot(process.cwd
|
|
|
2393
2398
|
throw new Error("No pnpm-workspace.yaml file found");
|
|
2394
2399
|
}
|
|
2395
2400
|
pnpmWorkspaceFile.catalog = Object.fromEntries(
|
|
2396
|
-
Object.entries(catalog).filter(([, value]) => value).map(([key, value]) => {
|
|
2397
|
-
if (!valid(value)) {
|
|
2398
|
-
throw new Error(
|
|
2399
|
-
`Tried to save invalid version "${value}" for package "${key}" to the PNPM catalog in the pnpm-workspace.yaml file. Please ensure that the version is valid before saving.`
|
|
2400
|
-
);
|
|
2401
|
-
}
|
|
2401
|
+
Object.entries(catalog).filter(([, value]) => value && valid(replacePrefix(value), true)).map(([key, value]) => {
|
|
2402
2402
|
return [key, value.replaceAll('"', "").replaceAll("'", "")];
|
|
2403
2403
|
})
|
|
2404
2404
|
);
|
|
@@ -2408,13 +2408,16 @@ async function upgradeCatalog(catalog, packageName, options = {}) {
|
|
|
2408
2408
|
const {
|
|
2409
2409
|
tag = DEFAULT_NPM_TAG,
|
|
2410
2410
|
prefix = "^",
|
|
2411
|
-
workspaceRoot = findWorkspaceRoot()
|
|
2411
|
+
workspaceRoot = findWorkspaceRoot(),
|
|
2412
|
+
verbose = false
|
|
2412
2413
|
} = options;
|
|
2413
2414
|
const workspaceConfig = await getWorkspaceConfig(true, { workspaceRoot });
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2415
|
+
if (verbose) {
|
|
2416
|
+
writeTrace(
|
|
2417
|
+
`Upgrading catalog entry for package "${packageName}" with tag "${tag}"`,
|
|
2418
|
+
workspaceConfig
|
|
2419
|
+
);
|
|
2420
|
+
}
|
|
2418
2421
|
const origVersion = await getVersion(packageName, tag, {
|
|
2419
2422
|
executable: "pnpm"
|
|
2420
2423
|
});
|
|
@@ -2423,24 +2426,26 @@ async function upgradeCatalog(catalog, packageName, options = {}) {
|
|
|
2423
2426
|
`Failed to fetch version for package "${packageName}" with tag "${tag}"`
|
|
2424
2427
|
);
|
|
2425
2428
|
}
|
|
2426
|
-
if (!valid(origVersion)) {
|
|
2429
|
+
if (!valid(replacePrefix(origVersion), true)) {
|
|
2427
2430
|
throw new Error(
|
|
2428
2431
|
`Invalid version "${origVersion}" fetched for package "${packageName}" with tag "${tag}"`
|
|
2429
2432
|
);
|
|
2430
2433
|
}
|
|
2431
|
-
const version = `${prefix || ""}${origVersion
|
|
2434
|
+
const version = `${prefix || ""}${replacePrefix(origVersion)}`;
|
|
2432
2435
|
let updated = false;
|
|
2433
2436
|
if (!valid(coerce(catalog[packageName])) || coerce(catalog[packageName]) && coerce(version) && // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
2434
2437
|
gt(coerce(version), coerce(catalog[packageName]))) {
|
|
2435
|
-
catalog[packageName] = `${prefix || ""}${version
|
|
2438
|
+
catalog[packageName] = `${prefix || ""}${replacePrefix(version)}`;
|
|
2436
2439
|
writeDebug(
|
|
2437
2440
|
`Writing version ${catalog[packageName]} to catalog for "${packageName}" package`,
|
|
2438
2441
|
workspaceConfig
|
|
2439
2442
|
);
|
|
2440
2443
|
updated = true;
|
|
2441
|
-
} else {
|
|
2444
|
+
} else if (verbose) {
|
|
2442
2445
|
writeDebug(
|
|
2443
|
-
`The current version ${catalog[packageName]} for package "${packageName}" is greater than or equal to the version ${
|
|
2446
|
+
`The current version ${catalog[packageName]} for package "${packageName}" is greater than or equal to the version ${replacePrefix(
|
|
2447
|
+
version
|
|
2448
|
+
)} fetched from the npm registry with tag "${tag}". No update performed.`,
|
|
2444
2449
|
workspaceConfig
|
|
2445
2450
|
);
|
|
2446
2451
|
}
|
|
@@ -2488,6 +2493,10 @@ function createProgram(config) {
|
|
|
2488
2493
|
- Wildcard (*): Allows the most flexibility by accepting any version. Example: \u201C*2.4.6" allows any version.`,
|
|
2489
2494
|
"^"
|
|
2490
2495
|
).option("--internal", "Whether to update all Storm Software packages.").option("--nx", "Whether to update Nx packages.").option(
|
|
2496
|
+
"--verbose",
|
|
2497
|
+
"An option to enable verbose logging for the update process.",
|
|
2498
|
+
false
|
|
2499
|
+
).option(
|
|
2491
2500
|
"--pnpm-plugin",
|
|
2492
2501
|
"Whether to upgrade the Storm Software pnpm plugin."
|
|
2493
2502
|
).option(
|
|
@@ -2512,9 +2521,10 @@ async function updateAction(packages, options) {
|
|
|
2512
2521
|
install,
|
|
2513
2522
|
all,
|
|
2514
2523
|
internal = all,
|
|
2515
|
-
nx =
|
|
2524
|
+
nx = false,
|
|
2516
2525
|
pnpmPlugin,
|
|
2517
|
-
prefix = "^"
|
|
2526
|
+
prefix = "^",
|
|
2527
|
+
verbose = false
|
|
2518
2528
|
} = options || {};
|
|
2519
2529
|
let packagesFound = false;
|
|
2520
2530
|
let pkgs = packages && Array.isArray(packages) ? packages : [];
|
|
@@ -2561,7 +2571,8 @@ async function updateAction(packages, options) {
|
|
|
2561
2571
|
const result = await upgradeCatalog(catalog, matchedPackage, {
|
|
2562
2572
|
tag,
|
|
2563
2573
|
prefix,
|
|
2564
|
-
workspaceRoot: _config.workspaceRoot
|
|
2574
|
+
workspaceRoot: _config.workspaceRoot,
|
|
2575
|
+
verbose
|
|
2565
2576
|
});
|
|
2566
2577
|
if (result.updated && result.catalog[matchedPackage]) {
|
|
2567
2578
|
catalog[matchedPackage] = result.catalog[matchedPackage];
|
|
@@ -2641,26 +2652,19 @@ async function updateAction(packages, options) {
|
|
|
2641
2652
|
`${brandIcon(_config)} Successfully updated${install ? " and installed" : ""} the following package(s):
|
|
2642
2653
|
${changed.map(
|
|
2643
2654
|
(pkg) => `- ${chalk2.bold(pkg.packageName)}: ${chalk2.bold(
|
|
2644
|
-
chalk2.red(`v${pkg.previous
|
|
2645
|
-
)} -> ${chalk2.bold(
|
|
2646
|
-
chalk2.green(`v${pkg.current.replace(/^[\^~><=]*/, "")}`)
|
|
2647
|
-
)}`
|
|
2655
|
+
chalk2.red(`v${replacePrefix(pkg.previous)}`)
|
|
2656
|
+
)} -> ${chalk2.bold(chalk2.green(`v${replacePrefix(pkg.current)}`))}`
|
|
2648
2657
|
).join("\n")}`,
|
|
2649
2658
|
_config
|
|
2650
2659
|
);
|
|
2651
2660
|
}
|
|
2652
2661
|
} catch (error) {
|
|
2653
2662
|
writeFatal(
|
|
2654
|
-
`A fatal error occurred while running
|
|
2655
|
-
|
|
2656
|
-
${JSON.stringify(
|
|
2657
|
-
error,
|
|
2658
|
-
null,
|
|
2659
|
-
2
|
|
2660
|
-
)}`,
|
|
2663
|
+
`A fatal error occurred while running storm-pnpm update: ${typeof error === "object" ? error.message ? error.message : `
|
|
2664
|
+
${JSON.stringify(error, null, 2)}` : error}`,
|
|
2661
2665
|
_config
|
|
2662
2666
|
);
|
|
2663
|
-
throw
|
|
2667
|
+
throw error;
|
|
2664
2668
|
}
|
|
2665
2669
|
}
|
|
2666
2670
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkHDFKZ7VD_cjs=require('./chunk-HDFKZ7VD.cjs'),chunk5XC5YOKM_cjs=require('./chunk-5XC5YOKM.cjs'),devkit=require('@nx/devkit'),fs=require('fs'),promises=require('fs/promises'),prettier=require('prettier');async function C(c=process.cwd(),i=chunk5XC5YOKM_cjs.e(c)){let l=chunk5XC5YOKM_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 chunkHDFKZ7VD_cjs.b(i),a=JSON.parse(m),g=chunk5XC5YOKM_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=chunk5XC5YOKM_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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function p(e){return (e??"").replace(/^===/g,"").replace(/^!==/g,"").replace(/^==/g,"").replace(/^!=/g,"").replace(/^>/g,"").replace(/^>=/g,"").replace(/^</g,"").replace(/^<=/g,"").replace(/^\^/g,"").replace(/^~/g,"")}export{p as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-YS5TOJST.js';import {d,e}from'./chunk-BKKIARGK.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'),chunk5XC5YOKM_cjs=require('./chunk-5XC5YOKM.cjs'),child_process=require('child_process'),semver=require('semver');var _="latest";var w=_;async function P(r="npm"){return new Promise((t,o)=>{child_process.exec(`${r} config get registry`,(e,g,a)=>e&&!e.message.toLowerCase().trim().startsWith("npm warn")?o(e):a&&!a.toLowerCase().trim().startsWith("npm warn")?o(a):t(g.trim()));})}async function R(r,t=w,o={}){let e=o.executable||"npm",g=o.registry||await P(e);return new Promise((a,p)=>{child_process.exec(`${e} view ${r} version --registry=${g}`,(s,n,i)=>s&&!s.message.toLowerCase().trim().startsWith("npm warn")?p(s):i&&!i.toLowerCase().trim().startsWith("npm warn")?p(i):a(n.trim()));})}async function C(r=chunk5XC5YOKM_cjs.e(process.cwd())){let t=await chunk5XC5YOKM_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(([o,e])=>[o,e.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=chunk5XC5YOKM_cjs.e(process.cwd())){let t=await C(r);if(!t)throw new Error("No catalog entries found in pnpm-workspace.yaml file");return t}async function b(r,t=chunk5XC5YOKM_cjs.e(process.cwd())){let o=await chunk5XC5YOKM_cjs.h(t);if(!o)throw new Error("No pnpm-workspace.yaml file found");o.catalog=Object.fromEntries(Object.entries(r).filter(([,e])=>e&&semver.valid(chunkWAL5SD4G_cjs.a(e),true)).map(([e,g])=>[e,g.replaceAll('"',"").replaceAll("'","")])),await chunk5XC5YOKM_cjs.i(o,t);}async function tr(r,t,o={}){let{tag:e=w,prefix:g="^",workspaceRoot:a=chunk5XC5YOKM_cjs.e(),verbose:p=false}=o,s=await chunk5XC5YOKM_cjs.f(true,{workspaceRoot:a});p&&chunk5XC5YOKM_cjs.c(`Upgrading catalog entry for package "${t}" with tag "${e}"`,s);let n=await R(t,e,{executable:"pnpm"});if(!n)throw new Error(`Failed to fetch version for package "${t}" with tag "${e}"`);if(!semver.valid(chunkWAL5SD4G_cjs.a(n),true))throw new Error(`Invalid version "${n}" fetched for package "${t}" with tag "${e}"`);let i=`${g||""}${chunkWAL5SD4G_cjs.a(n)}`,c=false;return !semver.valid(semver.coerce(r[t]))||semver.coerce(r[t])&&semver.coerce(i)&&semver.gt(semver.coerce(i),semver.coerce(r[t]))?(r[t]=`${g||""}${chunkWAL5SD4G_cjs.a(i)}`,chunk5XC5YOKM_cjs.b(`Writing version ${r[t]} to catalog for "${t}" package`,s),c=true):p&&chunk5XC5YOKM_cjs.b(`The current version ${r[t]} for package "${t}" is greater than or equal to the version ${chunkWAL5SD4G_cjs.a(i)} fetched from the npm registry with tag "${e}". No update performed.`,s),{catalog:r,updated:c}}async function er(r,t={}){let{tag:o=w,prefix:e="^",throwIfMissingInCatalog:g=false,workspaceRoot:a=chunk5XC5YOKM_cjs.e(),verbose:p=false}=t,s=await chunk5XC5YOKM_cjs.f(true,{workspaceRoot:a}),n=await M(a);if(!n)throw new Error("No catalog found");if(g===true&&!n[r])throw new Error(`Package "${r}" not found in catalog: ${JSON.stringify(n,null,2)}`);p&&chunk5XC5YOKM_cjs.c(`Upgrading catalog entry for package "${r}" with tag "${o}"`,s);let i=await R(r,o,{executable:"pnpm"});if(!i)throw new Error(`Failed to fetch version for package "${r}" with tag "${o}"`);if(!semver.valid(chunkWAL5SD4G_cjs.a(i),true))throw new Error(`Invalid version "${i}" fetched for package "${r}" with tag "${o}"`);let c=`${e||""}${chunkWAL5SD4G_cjs.a(i)}`;c===n[r]?p&&chunk5XC5YOKM_cjs.c(`The version for package "${r}" is already up to date in the catalog: ${c}`,s):!semver.valid(chunkWAL5SD4G_cjs.a(n[r]),true)||semver.coerce(n[r])&&semver.coerce(c)&&semver.gt(semver.coerce(c),semver.coerce(n[r]))?(n[r]=`${e||""}${chunkWAL5SD4G_cjs.a(c)}`,chunk5XC5YOKM_cjs.b(`Writing version ${n[r]} to catalog for "${r}" package`,s),await b(n,a)):p&&chunk5XC5YOKM_cjs.a(`The current version "${n[r]}" for package "${r}" is greater than or equal to the version "${c}" fetched from the npm registry with tag "${o}". No update performed.`,s);}exports.a=C;exports.b=M;exports.c=b;exports.d=tr;exports.e=er;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';function c(e){return (e??"").replace(/^===/g,"").replace(/^!==/g,"").replace(/^==/g,"").replace(/^!=/g,"").replace(/^>/g,"").replace(/^>=/g,"").replace(/^</g,"").replace(/^<=/g,"").replace(/^\^/g,"").replace(/^~/g,"")}exports.a=c;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a}from'./chunk-7QKHH2VM.js';import {h,e,i,f,c,b as b$1,a as a$1}from'./chunk-BKKIARGK.js';import {exec}from'node:child_process';import {valid,coerce,gt}from'semver';var P="latest";var w=P;async function A(r="npm"){return new Promise((t,o)=>{exec(`${r} config get registry`,(e,g,a)=>e&&!e.message.toLowerCase().trim().startsWith("npm warn")?o(e):a&&!a.toLowerCase().trim().startsWith("npm warn")?o(a):t(g.trim()));})}async function x(r,t=w,o={}){let e=o.executable||"npm",g=o.registry||await A(e);return new Promise((a,p)=>{exec(`${e} view ${r} version --registry=${g}`,(s,n,i)=>s&&!s.message.toLowerCase().trim().startsWith("npm warn")?p(s):i&&!i.toLowerCase().trim().startsWith("npm warn")?p(i):a(n.trim()));})}async function M(r=e(process.cwd())){let t=await h(r);if(!t)throw new Error("No pnpm-workspace.yaml file found");if(t?.catalog)return Object.fromEntries(Object.entries(t.catalog).map(([o,e])=>[o,e.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 b(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 I(r,t=e(process.cwd())){let o=await h(t);if(!o)throw new Error("No pnpm-workspace.yaml file found");o.catalog=Object.fromEntries(Object.entries(r).filter(([,e])=>e&&valid(a(e),true)).map(([e,g])=>[e,g.replaceAll('"',"").replaceAll("'","")])),await i(o,t);}async function er(r,t,o={}){let{tag:e$1=w,prefix:g="^",workspaceRoot:a$1=e(),verbose:p=false}=o,s=await f(true,{workspaceRoot:a$1});p&&c(`Upgrading catalog entry for package "${t}" with tag "${e$1}"`,s);let n=await x(t,e$1,{executable:"pnpm"});if(!n)throw new Error(`Failed to fetch version for package "${t}" with tag "${e$1}"`);if(!valid(a(n),true))throw new Error(`Invalid version "${n}" fetched for package "${t}" with tag "${e$1}"`);let i=`${g||""}${a(n)}`,c$1=false;return !valid(coerce(r[t]))||coerce(r[t])&&coerce(i)&>(coerce(i),coerce(r[t]))?(r[t]=`${g||""}${a(i)}`,b$1(`Writing version ${r[t]} to catalog for "${t}" package`,s),c$1=true):p&&b$1(`The current version ${r[t]} for package "${t}" is greater than or equal to the version ${a(i)} fetched from the npm registry with tag "${e$1}". No update performed.`,s),{catalog:r,updated:c$1}}async function or(r,t={}){let{tag:o=w,prefix:e$1="^",throwIfMissingInCatalog:g=false,workspaceRoot:a$2=e(),verbose:p=false}=t,s=await f(true,{workspaceRoot:a$2}),n=await b(a$2);if(!n)throw new Error("No catalog found");if(g===true&&!n[r])throw new Error(`Package "${r}" not found in catalog: ${JSON.stringify(n,null,2)}`);p&&c(`Upgrading catalog entry for package "${r}" with tag "${o}"`,s);let i=await x(r,o,{executable:"pnpm"});if(!i)throw new Error(`Failed to fetch version for package "${r}" with tag "${o}"`);if(!valid(a(i),true))throw new Error(`Invalid version "${i}" fetched for package "${r}" with tag "${o}"`);let c$1=`${e$1||""}${a(i)}`;c$1===n[r]?p&&c(`The version for package "${r}" is already up to date in the catalog: ${c$1}`,s):!valid(a(n[r]),true)||coerce(n[r])&&coerce(c$1)&>(coerce(c$1),coerce(n[r]))?(n[r]=`${e$1||""}${a(c$1)}`,b$1(`Writing version ${n[r]} to catalog for "${r}" package`,s),await I(n,a$2)):p&&a$1(`The current version "${n[r]}" for package "${r}" is greater than or equal to the version "${c$1}" fetched from the npm registry with tag "${o}". No update performed.`,s);}export{M as a,b,I as c,er as d,or as e};
|
package/dist/helpers/catalog.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkHDFKZ7VD_cjs=require('../chunk-HDFKZ7VD.cjs');require('../chunk-WAL5SD4G.cjs'),require('../chunk-5XC5YOKM.cjs');Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkHDFKZ7VD_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkHDFKZ7VD_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkHDFKZ7VD_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkHDFKZ7VD_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkHDFKZ7VD_cjs.d}});
|
|
@@ -51,6 +51,12 @@ interface UpgradeCatalogPackageOptions {
|
|
|
51
51
|
* @defaultValue `"^"`
|
|
52
52
|
*/
|
|
53
53
|
prefix?: "^" | "~" | ">" | "<" | ">=" | "<=" | "*";
|
|
54
|
+
/**
|
|
55
|
+
* An indicator of whether to enable debug logging for the upgrade process.
|
|
56
|
+
*
|
|
57
|
+
* @defaultValue `false`
|
|
58
|
+
*/
|
|
59
|
+
verbose?: boolean;
|
|
54
60
|
}
|
|
55
61
|
interface UpgradeCatalogResult {
|
|
56
62
|
catalog: Record<string, string>;
|
|
@@ -51,6 +51,12 @@ interface UpgradeCatalogPackageOptions {
|
|
|
51
51
|
* @defaultValue `"^"`
|
|
52
52
|
*/
|
|
53
53
|
prefix?: "^" | "~" | ">" | "<" | ">=" | "<=" | "*";
|
|
54
|
+
/**
|
|
55
|
+
* An indicator of whether to enable debug logging for the upgrade process.
|
|
56
|
+
*
|
|
57
|
+
* @defaultValue `false`
|
|
58
|
+
*/
|
|
59
|
+
verbose?: boolean;
|
|
54
60
|
}
|
|
55
61
|
interface UpgradeCatalogResult {
|
|
56
62
|
catalog: Record<string, string>;
|
package/dist/helpers/catalog.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'../chunk-
|
|
1
|
+
export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'../chunk-YS5TOJST.js';import'../chunk-7QKHH2VM.js';import'../chunk-BKKIARGK.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkWAL5SD4G_cjs=require('../chunk-WAL5SD4G.cjs');Object.defineProperty(exports,"replacePrefix",{enumerable:true,get:function(){return chunkWAL5SD4G_cjs.a}});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Replaces all the prefixes in a string with an empty string.
|
|
3
|
+
*
|
|
4
|
+
* @param value - The string to replace the prefixes in.
|
|
5
|
+
* @returns The string with all the prefixes replaced with an empty string.
|
|
6
|
+
*/
|
|
7
|
+
declare function replacePrefix(value?: string): string;
|
|
8
|
+
|
|
9
|
+
export { replacePrefix };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Replaces all the prefixes in a string with an empty string.
|
|
3
|
+
*
|
|
4
|
+
* @param value - The string to replace the prefixes in.
|
|
5
|
+
* @returns The string with all the prefixes replaced with an empty string.
|
|
6
|
+
*/
|
|
7
|
+
declare function replacePrefix(value?: string): string;
|
|
8
|
+
|
|
9
|
+
export { replacePrefix };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as replacePrefix}from'../chunk-7QKHH2VM.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 chunk5DGGSWUE_cjs=require('../chunk-5DGGSWUE.cjs'),chunkHDFKZ7VD_cjs=require('../chunk-HDFKZ7VD.cjs');require('../chunk-WAL5SD4G.cjs');var chunk5XC5YOKM_cjs=require('../chunk-5XC5YOKM.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunk5DGGSWUE_cjs.a}});Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkHDFKZ7VD_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkHDFKZ7VD_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkHDFKZ7VD_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkHDFKZ7VD_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkHDFKZ7VD_cjs.d}});Object.defineProperty(exports,"getPnpmWorkspaceFilePath",{enumerable:true,get:function(){return chunk5XC5YOKM_cjs.g}});Object.defineProperty(exports,"readPnpmWorkspaceFile",{enumerable:true,get:function(){return chunk5XC5YOKM_cjs.h}});Object.defineProperty(exports,"writePnpmWorkspaceFile",{enumerable:true,get:function(){return chunk5XC5YOKM_cjs.i}});
|
package/dist/helpers/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import'../chunk-GV6YH6UO.js';export{a as replaceDepsAliases}from'../chunk-
|
|
1
|
+
import'../chunk-GV6YH6UO.js';export{a as replaceDepsAliases}from'../chunk-D5OWPJ4N.js';export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'../chunk-YS5TOJST.js';import'../chunk-7QKHH2VM.js';export{g as getPnpmWorkspaceFilePath,h as readPnpmWorkspaceFile,i as writePnpmWorkspaceFile}from'../chunk-BKKIARGK.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk5DGGSWUE_cjs=require('../chunk-5DGGSWUE.cjs');require('../chunk-HDFKZ7VD.cjs'),require('../chunk-WAL5SD4G.cjs'),require('../chunk-5XC5YOKM.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunk5DGGSWUE_cjs.a}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as replaceDepsAliases}from'../chunk-
|
|
1
|
+
export{a as replaceDepsAliases}from'../chunk-D5OWPJ4N.js';import'../chunk-YS5TOJST.js';import'../chunk-7QKHH2VM.js';import'../chunk-BKKIARGK.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 chunk5DGGSWUE_cjs=require('./chunk-5DGGSWUE.cjs'),chunkHDFKZ7VD_cjs=require('./chunk-HDFKZ7VD.cjs');require('./chunk-WAL5SD4G.cjs');var chunk5XC5YOKM_cjs=require('./chunk-5XC5YOKM.cjs');Object.defineProperty(exports,"replaceDepsAliases",{enumerable:true,get:function(){return chunk5DGGSWUE_cjs.a}});Object.defineProperty(exports,"getCatalog",{enumerable:true,get:function(){return chunkHDFKZ7VD_cjs.b}});Object.defineProperty(exports,"getCatalogSafe",{enumerable:true,get:function(){return chunkHDFKZ7VD_cjs.a}});Object.defineProperty(exports,"saveCatalog",{enumerable:true,get:function(){return chunkHDFKZ7VD_cjs.e}});Object.defineProperty(exports,"setCatalog",{enumerable:true,get:function(){return chunkHDFKZ7VD_cjs.c}});Object.defineProperty(exports,"upgradeCatalog",{enumerable:true,get:function(){return chunkHDFKZ7VD_cjs.d}});Object.defineProperty(exports,"getPnpmWorkspaceFilePath",{enumerable:true,get:function(){return chunk5XC5YOKM_cjs.g}});Object.defineProperty(exports,"readPnpmWorkspaceFile",{enumerable:true,get:function(){return chunk5XC5YOKM_cjs.h}});Object.defineProperty(exports,"writePnpmWorkspaceFile",{enumerable:true,get:function(){return chunk5XC5YOKM_cjs.i}});
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import'./chunk-GGNOJ77I.js';import'./chunk-GV6YH6UO.js';export{a as replaceDepsAliases}from'./chunk-
|
|
1
|
+
import'./chunk-GGNOJ77I.js';import'./chunk-GV6YH6UO.js';export{a as replaceDepsAliases}from'./chunk-D5OWPJ4N.js';export{b as getCatalog,a as getCatalogSafe,e as saveCatalog,c as setCatalog,d as upgradeCatalog}from'./chunk-YS5TOJST.js';import'./chunk-7QKHH2VM.js';export{g as getPnpmWorkspaceFilePath,h as readPnpmWorkspaceFile,i as writePnpmWorkspaceFile}from'./chunk-BKKIARGK.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/pnpm-tools",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.88",
|
|
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.
|
|
77
|
-
"@storm-software/config-tools": "^1.190.
|
|
78
|
-
"@storm-software/npm-tools": "^0.6.
|
|
79
|
-
"@storm-software/package-constants": "^0.1.
|
|
76
|
+
"@storm-software/config": "^1.138.14",
|
|
77
|
+
"@storm-software/config-tools": "^1.190.77",
|
|
78
|
+
"@storm-software/npm-tools": "^0.6.195",
|
|
79
|
+
"@storm-software/package-constants": "^0.1.90",
|
|
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": "
|
|
94
|
+
"gitHead": "365027d64f43f04f519c6e53011e3f93bf6b78b4"
|
|
95
95
|
}
|
package/dist/chunk-453VGPIV.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunk5XC5YOKM_cjs=require('./chunk-5XC5YOKM.cjs'),child_process=require('child_process'),semver=require('semver');var E="latest";var l=E;async function x(r="npm"){return new Promise((t,n)=>{child_process.exec(`${r} config get registry`,(e,s,a)=>e&&!e.message.toLowerCase().trim().startsWith("npm warn")?n(e):a&&!a.toLowerCase().trim().startsWith("npm warn")?n(a):t(s.trim()));})}async function T(r,t=l,n={}){let e=n.executable||"npm",s=n.registry||await x(e);return new Promise((a,g)=>{child_process.exec(`${e} view ${r} version --registry=${s}`,(o,p,i)=>o&&!o.message.toLowerCase().trim().startsWith("npm warn")?g(o):i&&!i.toLowerCase().trim().startsWith("npm warn")?g(i):a(p.trim()));})}async function v(r=chunk5XC5YOKM_cjs.e(process.cwd())){let t=await chunk5XC5YOKM_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(([n,e])=>[n,e.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 G(r=chunk5XC5YOKM_cjs.e(process.cwd())){let t=await v(r);if(!t)throw new Error("No catalog entries found in pnpm-workspace.yaml file");return t}async function C(r,t=chunk5XC5YOKM_cjs.e(process.cwd())){let n=await chunk5XC5YOKM_cjs.h(t);if(!n)throw new Error("No pnpm-workspace.yaml file found");n.catalog=Object.fromEntries(Object.entries(r).filter(([,e])=>e).map(([e,s])=>{if(!semver.valid(s))throw new Error(`Tried to save invalid version "${s}" for package "${e}" to the PNPM catalog in the pnpm-workspace.yaml file. Please ensure that the version is valid before saving.`);return [e,s.replaceAll('"',"").replaceAll("'","")]})),await chunk5XC5YOKM_cjs.i(n,t);}async function Q(r,t,n={}){let{tag:e=l,prefix:s="^",workspaceRoot:a=chunk5XC5YOKM_cjs.e()}=n,g=await chunk5XC5YOKM_cjs.f(true,{workspaceRoot:a});chunk5XC5YOKM_cjs.c(`Upgrading catalog entry for package "${t}" with tag "${e}"`,g);let o=await T(t,e,{executable:"pnpm"});if(!o)throw new Error(`Failed to fetch version for package "${t}" with tag "${e}"`);if(!semver.valid(o))throw new Error(`Invalid version "${o}" fetched for package "${t}" with tag "${e}"`);let p=`${s||""}${o.replace(/^[\^~><=*]+/g,"")}`,i=false;return !semver.valid(semver.coerce(r[t]))||semver.coerce(r[t])&&semver.coerce(p)&&semver.gt(semver.coerce(p),semver.coerce(r[t]))?(r[t]=`${s||""}${p.replace(/^[\^~><=*]+/g,"")}`,chunk5XC5YOKM_cjs.b(`Writing version ${r[t]} to catalog for "${t}" package`,g),i=true):chunk5XC5YOKM_cjs.b(`The current version ${r[t]} for package "${t}" is greater than or equal to the version ${p} fetched from the npm registry with tag "${e}". No update performed.`,g),{catalog:r,updated:i}}async function Z(r,t={}){let{tag:n=l,prefix:e="^",throwIfMissingInCatalog:s=false,workspaceRoot:a=chunk5XC5YOKM_cjs.e()}=t,g=await chunk5XC5YOKM_cjs.f(true,{workspaceRoot:a}),o=await G(a);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)}`);chunk5XC5YOKM_cjs.c(`Upgrading catalog entry for package "${r}" with tag "${n}"`,g);let p=await T(r,n,{executable:"pnpm"});if(!p)throw new Error(`Failed to fetch version for package "${r}" with tag "${n}"`);if(!semver.valid(p))throw new Error(`Invalid version "${p}" fetched for package "${r}" with tag "${n}"`);let i=`${e||""}${p.replace(/^[\^~><=*]+/g,"")}`;i===o[r]?chunk5XC5YOKM_cjs.c(`The version for package "${r}" is already up to date in the catalog: ${i}`,g):!semver.valid(semver.coerce(o[r]))||semver.coerce(o[r])&&semver.coerce(i)&&semver.gt(semver.coerce(i),semver.coerce(o[r]))?(o[r]=`${e||""}${i.replace(/^[\^~><=*]+/g,"")}`,chunk5XC5YOKM_cjs.b(`Writing version ${o[r]} to catalog for "${r}" package`,g),await C(o,a)):chunk5XC5YOKM_cjs.a(`The current version "${o[r]}" for package "${r}" is greater than or equal to the version "${i}" fetched from the npm registry with tag "${n}". No update performed.`,g);}exports.a=v;exports.b=G;exports.c=C;exports.d=Q;exports.e=Z;
|
package/dist/chunk-5NPDT7WW.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {h,e,i,f,c,b,a}from'./chunk-BKKIARGK.js';import {exec}from'node:child_process';import {valid,coerce,gt}from'semver';var x="latest";var l=x;async function P(r="npm"){return new Promise((t,n)=>{exec(`${r} config get registry`,(e,s,a)=>e&&!e.message.toLowerCase().trim().startsWith("npm warn")?n(e):a&&!a.toLowerCase().trim().startsWith("npm warn")?n(a):t(s.trim()));})}async function y(r,t=l,n={}){let e=n.executable||"npm",s=n.registry||await P(e);return new Promise((a,g)=>{exec(`${e} view ${r} version --registry=${s}`,(o,p,i)=>o&&!o.message.toLowerCase().trim().startsWith("npm warn")?g(o):i&&!i.toLowerCase().trim().startsWith("npm warn")?g(i):a(p.trim()));})}async function G(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(([n,e])=>[n,e.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 G(r);if(!t)throw new Error("No catalog entries found in pnpm-workspace.yaml file");return t}async function M(r,t=e(process.cwd())){let n=await h(t);if(!n)throw new Error("No pnpm-workspace.yaml file found");n.catalog=Object.fromEntries(Object.entries(r).filter(([,e])=>e).map(([e,s])=>{if(!valid(s))throw new Error(`Tried to save invalid version "${s}" for package "${e}" to the PNPM catalog in the pnpm-workspace.yaml file. Please ensure that the version is valid before saving.`);return [e,s.replaceAll('"',"").replaceAll("'","")]})),await i(n,t);}async function Z(r,t,n={}){let{tag:e$1=l,prefix:s="^",workspaceRoot:a=e()}=n,g=await f(true,{workspaceRoot:a});c(`Upgrading catalog entry for package "${t}" with tag "${e$1}"`,g);let o=await y(t,e$1,{executable:"pnpm"});if(!o)throw new Error(`Failed to fetch version for package "${t}" with tag "${e$1}"`);if(!valid(o))throw new Error(`Invalid version "${o}" fetched for package "${t}" with tag "${e$1}"`);let p=`${s||""}${o.replace(/^[\^~><=*]+/g,"")}`,i=false;return !valid(coerce(r[t]))||coerce(r[t])&&coerce(p)&>(coerce(p),coerce(r[t]))?(r[t]=`${s||""}${p.replace(/^[\^~><=*]+/g,"")}`,b(`Writing version ${r[t]} to catalog for "${t}" package`,g),i=true):b(`The current version ${r[t]} for package "${t}" is greater than or equal to the version ${p} fetched from the npm registry with tag "${e$1}". No update performed.`,g),{catalog:r,updated:i}}async function rr(r,t={}){let{tag:n=l,prefix:e$1="^",throwIfMissingInCatalog:s=false,workspaceRoot:a$1=e()}=t,g=await f(true,{workspaceRoot:a$1}),o=await C(a$1);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 "${n}"`,g);let p=await y(r,n,{executable:"pnpm"});if(!p)throw new Error(`Failed to fetch version for package "${r}" with tag "${n}"`);if(!valid(p))throw new Error(`Invalid version "${p}" fetched for package "${r}" with tag "${n}"`);let i=`${e$1||""}${p.replace(/^[\^~><=*]+/g,"")}`;i===o[r]?c(`The version for package "${r}" is already up to date in the catalog: ${i}`,g):!valid(coerce(o[r]))||coerce(o[r])&&coerce(i)&>(coerce(i),coerce(o[r]))?(o[r]=`${e$1||""}${i.replace(/^[\^~><=*]+/g,"")}`,b(`Writing version ${o[r]} to catalog for "${r}" package`,g),await M(o,a$1)):a(`The current version "${o[r]}" for package "${r}" is greater than or equal to the version "${i}" fetched from the npm registry with tag "${n}". No update performed.`,g);}export{G as a,C as b,M as c,Z as d,rr as e};
|