Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

baobranch

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

baobranch - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

38

bin/commands/amend.js

@@ -19,6 +19,6 @@ import { execCommand } from '../utils.js';

.map(line => {
const match = line.match(/^..\s+(.+)$/);
const match = line.match(/^\s*(.)\s+(.+)$/);
return match ? {
status: line.substring(0, 2),
path: match[1]
status: match[1],
path: match[2]
} : null;

@@ -42,9 +42,9 @@ })

// If multiple matches and it's a directory query, confirm with user
if (matchingFiles.length > 1) {
console.log('Multiple files match:');
matchingFiles.forEach(file => console.log(` ${file.path}`));
if (matchingFiles.length) {
console.log('Changes to amend:');
matchingFiles.forEach(file => console.log(` ${file.status} ${file.path}`));
const { confirm } = await inquirer.prompt([{
type: 'confirm',
name: 'confirm',
message: 'Amend all these files?',
message: 'Amend these changes?',
default: false

@@ -68,15 +68,13 @@ }]);

else {
if (files.length !== 1) {
console.log('Amending multiple files:');
files.forEach(file => console.log(` ${file.path}`));
const { confirm } = await inquirer.prompt([{
type: 'confirm',
name: 'confirm',
message: 'Amend all these files?',
default: false
}]);
if (!confirm) {
console.log('Aborting amend');
process.exit(0);
}
console.log('Changes to amend:');
files.forEach(file => console.log(` ${file.status} ${file.path}`));
const { confirm } = await inquirer.prompt([{
type: 'confirm',
name: 'confirm',
message: 'Amend all these changes?',
default: false
}]);
if (!confirm) {
console.log('Aborting amend');
process.exit(0);
}

@@ -83,0 +81,0 @@ // Add all changes if no specific file

@@ -33,2 +33,3 @@ /**

}
const initialBranch = execCommand('git rev-parse --abbrev-ref HEAD');
// Handle continue case

@@ -47,12 +48,13 @@ if (status && options.continue) {

});
execCommand(`git checkout ${initialBranch}`);
return;
}
// Handle new evolution
const currentBranch = execCommand('git rev-parse --abbrev-ref HEAD');
tagEvolveBranches(currentBranch, options.scope);
tagEvolveBranches(initialBranch, options.scope);
evolveChain({
currentBranch,
currentBranch: initialBranch,
scope: options.scope,
flag: null
});
execCommand(`git checkout ${initialBranch}`);
}

@@ -59,0 +61,0 @@ /**

@@ -25,7 +25,10 @@ /**

// Force push the branch to origin
console.log(execCommand(`git push origin ${branch} -f`, true));
console.log(`Branch ${branch} successfully pushed to origin`);
const pushOutput = execCommand(`git push origin ${branch} -f`, true);
if (pushOutput.trim()) {
console.log(pushOutput);
}
console.log(`Branch ${branch} successfully pushed to origin\n`);
}
catch (e) {
console.error(`Failed to push branch ${branch} to origin`);
console.error(`Failed to push branch ${branch} to origin\n`);
console.error(e);

@@ -39,5 +42,7 @@ }

}
queue.push(child.branchName);
queue.push(child.branchName.trim());
});
}
console.log('Chain push operation complete,');
execCommand(`git checkout ${startBranch}`);
}

@@ -44,0 +49,0 @@ /**

{
"name": "baobranch",
"version": "0.1.3",
"version": "0.1.4",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc