New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ggit

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ggit - npm Package Compare versions

Comparing version 1.22.1 to 1.23.0

6

package.json
{
"name": "ggit",
"description": "Local promise-returning git command wrappers",
"version": "1.22.1",
"version": "1.23.0",
"author": "Gleb Bahmutov <gleb.bahmutov@gmail.com>",

@@ -60,3 +60,3 @@ "bin": {

"git-issues": "1.3.1",
"github-post-release": "1.7.1",
"github-post-release": "1.12.1",
"grunt": "0.4.5",

@@ -81,3 +81,3 @@ "grunt-bump": "0.8.0",

"semantic-release": "6.3.6",
"simple-commit-message": "3.1.0",
"simple-commit-message": "3.2.0",
"sinon": "2.3.8",

@@ -84,0 +84,0 @@ "snap-shot": "2.17.0",

@@ -33,3 +33,3 @@ # ggit

# get last commit id in the current folder, save into json file
ggit last -f build.json
ggit-last -f build.json

@@ -36,0 +36,0 @@ ## API

@@ -8,20 +8,30 @@ 'use strict'

function save (filename, data) {
var write = require('fs').writeFileSync
var contents = JSON.stringify(data, null, 2) + '\n'
write(filename, contents, 'utf8')
}
function saveBuildFile (filename, id) {
var exists = require('fs').existsSync
var read = require('fs').readFileSync
var short = id.substr(0, 7)
var currentTime = new Date()
var data = {
id: id,
short: short,
savedAt: currentTime.toISOString()
}
if (exists('./package.json')) {
var pkg = JSON.parse(read('./package.json', 'utf8'))
data.version = pkg.version
}
save(filename, data)
console.log('saved last commit %s (short %s) in file %s', id, short, filename)
}
function saveIntoFile (options, id) {
if (check.unemptyString(options.file)) {
var write = require('fs').writeFileSync
var short = id.substr(0, 7)
var currentTime = new Date()
var data = {
id: id,
short: short,
savedAt: currentTime.toISOString()
}
var contents = JSON.stringify(data, null, 2) + '\n'
write(options.file, contents, 'utf8')
console.log(
'saved last commit %s (short %s) in file %s',
id,
short,
options.file
)
saveBuildFile(options.file, id)
}

@@ -28,0 +38,0 @@ console.log('last commit:', id)

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