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

gitlog

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitlog - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

11

index.js

@@ -52,4 +52,11 @@ module.exports = gitlog

var prevWorkingDir = process.cwd()
try {
process.chdir(options.repo)
} catch (e) {
throw new Error('Repo location does not exist')
}
// Start constructing command
var command = 'cd ' + options.repo + ' && git log -n ' + options.number
var command = 'git log -n ' + options.number

@@ -95,2 +102,4 @@ command = addOptional(command, options)

})
process.chdir(prevWorkingDir);
}

@@ -97,0 +106,0 @@

2

package.json
{
"name": "gitlog",
"version": "2.1.0",
"version": "2.1.1",
"description": "Git log parser for Node.JS",

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

@@ -32,6 +32,12 @@ var gitlog = require('../')

it('throws an error when repo location does not exist', function() {
(function() {
gitlog({ repo: 'wrong directory' }, function() {})
}).should.throw('Repo location does not exist')
})
it('throws an error when an unknown field is used', function() {
var field = 'fake-field'
; (function() {
gitlog({ repo: 'test-repo', fields: [ field ] }, function() {});
gitlog({ repo: testRepoLocation, fields: [ field ] }, function() {});
}).should.throw('Unknown field: ' + field)

@@ -38,0 +44,0 @@ })

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