bonzai-burn 1.0.5 โ†’ 1.0.6

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/btrim.js +4 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bonzai-burn",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Git branch-based cleanup tool with btrim and brevert commands",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/btrim.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { execSync, spawn } from 'child_process';
3
+ import crypto from 'crypto';
3
4
  import fs from 'fs';
4
5
  import { join } from 'path';
5
6
 
@@ -218,16 +219,9 @@ async function burn() {
218
219
  console.log(`โœ“ Work saved on ${originalBranch}\n`);
219
220
  }
220
221
 
221
- // Always use same burn branch name
222
- const burnBranch = 'bonzai-burn';
223
-
224
- // Delete existing burn branch if it exists
225
- try {
226
- exec(`git branch -D ${burnBranch}`);
227
- console.log(`๐Ÿงน Cleaned up old ${burnBranch} branch\n`);
228
- } catch {
229
- // Branch doesn't exist, that's fine
230
- }
222
+ // Generate unique branch name with short UUID
223
+ const shortId = crypto.randomUUID().slice(0, 8);
224
+ const burnBranch = `bonzai-burn-${shortId}`;
231
225
 
232
226
  console.log(`๐Ÿ“ Starting from: ${originalBranch}`);
233
227
  console.log(`๐ŸŒฟ Creating: ${burnBranch}\n`);