@theholocron/cli 5.0.0-alpha.137 → 5.0.0-alpha.140
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/dist/cli.mjs +28 -35
- package/dist/cli.mjs.map +1 -1
- package/package.json +6 -6
package/dist/cli.mjs
CHANGED
|
@@ -2256,46 +2256,39 @@ async function runNpmBumpVersions(input) {
|
|
|
2256
2256
|
bumped.push(label);
|
|
2257
2257
|
}
|
|
2258
2258
|
bumpFile(join(cwd, "package.json"), "root");
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
entries = listDir(packagesDir);
|
|
2263
|
-
} catch {
|
|
2264
|
-
const status = dryRun ? "dry-run" : "ok";
|
|
2265
|
-
logger.info({
|
|
2266
|
-
version,
|
|
2267
|
-
status,
|
|
2268
|
-
bumped: bumped.length,
|
|
2269
|
-
skipped: skipped.length
|
|
2270
|
-
}, "npm bump-versions: done");
|
|
2271
|
-
return {
|
|
2272
|
-
status,
|
|
2273
|
-
bumped,
|
|
2274
|
-
skipped
|
|
2275
|
-
};
|
|
2276
|
-
}
|
|
2277
|
-
for (const entry of entries) {
|
|
2278
|
-
const pkgDir = join(packagesDir, entry);
|
|
2279
|
-
try {
|
|
2280
|
-
if (!isDir(pkgDir)) continue;
|
|
2281
|
-
} catch {
|
|
2282
|
-
continue;
|
|
2283
|
-
}
|
|
2284
|
-
const pkgFile = join(pkgDir, "package.json");
|
|
2285
|
-
let pkg;
|
|
2259
|
+
function bumpWorkspaceDir(dirName) {
|
|
2260
|
+
const dirPath = join(cwd, dirName);
|
|
2261
|
+
let entries;
|
|
2286
2262
|
try {
|
|
2287
|
-
|
|
2263
|
+
entries = listDir(dirPath);
|
|
2288
2264
|
} catch {
|
|
2289
|
-
|
|
2290
|
-
continue;
|
|
2265
|
+
return;
|
|
2291
2266
|
}
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2267
|
+
for (const entry of entries) {
|
|
2268
|
+
const pkgDir = join(dirPath, entry);
|
|
2269
|
+
try {
|
|
2270
|
+
if (!isDir(pkgDir)) continue;
|
|
2271
|
+
} catch {
|
|
2272
|
+
continue;
|
|
2273
|
+
}
|
|
2274
|
+
const pkgFile = join(pkgDir, "package.json");
|
|
2275
|
+
let pkg;
|
|
2276
|
+
try {
|
|
2277
|
+
pkg = JSON.parse(readFile(pkgFile));
|
|
2278
|
+
} catch {
|
|
2279
|
+
print(` ! skipping ${dirName}/${entry}: no package.json or malformed JSON`);
|
|
2280
|
+
continue;
|
|
2281
|
+
}
|
|
2282
|
+
if (pkg.private) {
|
|
2283
|
+
print(` · skipping private package ${dirName}/${entry}`);
|
|
2284
|
+
skipped.push(`${dirName}/${entry}`);
|
|
2285
|
+
continue;
|
|
2286
|
+
}
|
|
2287
|
+
bumpFile(pkgFile, `${dirName}/${entry}`);
|
|
2296
2288
|
}
|
|
2297
|
-
bumpFile(pkgFile, `packages/${entry}`);
|
|
2298
2289
|
}
|
|
2290
|
+
bumpWorkspaceDir("packages");
|
|
2291
|
+
bumpWorkspaceDir("plugins");
|
|
2299
2292
|
const status = dryRun ? "dry-run" : "ok";
|
|
2300
2293
|
logger.info({
|
|
2301
2294
|
version,
|