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

branchinfo

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

branchinfo - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

1

index.js

@@ -30,5 +30,4 @@ #!/usr/bin/env node

}
console.log(output)
})

2

package.json
{
"name": "branchinfo",
"version": "1.0.2",
"version": "1.0.3",
"description": "给git分支加注释,来清晰的记录git分支的作用",

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

const fs = require('fs')
const path = require('path')
let git_branch = ''
let currentPath = process.cwd()
while(currentPath !== '/') {
if(fs.existsSync(path.resolve(currentPath, '.gitbranch'))) {
break
} else {
currentPath = path.resolve(currentPath, '../')
}
}
try {
git_branch = fs.readFileSync('./.gitbranch').toString()
git_branch = fs.readFileSync(path.resolve(currentPath, '.gitbranch')).toString()
} catch(e) {

@@ -7,0 +18,0 @@ if(e.code === 'ENOENT') {

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