bunset 1.0.8 → 1.0.9

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
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.9
4
+
5
+ ### Bug Fixes
6
+
7
+ - improve error handling for no commits or packages found
8
+
3
9
  ## 1.0.8
4
10
 
5
11
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunset",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "module": "src/index.ts",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.ts CHANGED
@@ -67,8 +67,8 @@ debug(`last tag: ${lastTag ?? "(none)"}`);
67
67
  debug(`raw commits since tag: ${rawCommits.length}`);
68
68
 
69
69
  if (rawCommits.length === 0) {
70
- console.log("No commits found since last tag. Nothing to do.");
71
- process.exit(0);
70
+ console.error("No commits found since last tag. Nothing to do.");
71
+ process.exit(1);
72
72
  }
73
73
 
74
74
  const parsed = rawCommits.map((c) => parseCommit(c.hash, c.message, c.body));
@@ -124,8 +124,8 @@ let packages =
124
124
  debug(`scope: ${options.scope}, packages to process: ${packages.map((p) => p.name).join(", ") || "(none)"}`);
125
125
 
126
126
  if (packages.length === 0) {
127
- console.log("No changed packages found. Nothing to do.");
128
- process.exit(0);
127
+ console.error("No changed packages found. Nothing to do.");
128
+ process.exit(1);
129
129
  }
130
130
 
131
131
  function getPackageGroups(
@@ -296,8 +296,8 @@ for (const pkg of packages) {
296
296
  const uniqueTags = [...new Set(tags)];
297
297
 
298
298
  if (changedFiles.length === 0) {
299
- console.log("No packages were updated. Nothing to do.");
300
- process.exit(0);
299
+ console.error("No packages were updated. Nothing to do.");
300
+ process.exit(1);
301
301
  }
302
302
 
303
303
  // Update lockfile after package.json versions changed