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

gitlog

Package Overview
Dependencies
Maintainers
2
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 4.0.2 to 4.0.3

12

CHANGELOG.md

@@ -0,1 +1,13 @@

# v4.0.3 (Mon Oct 05 2020)
#### 🐛 Bug Fix
- ensure large amount of renames doesn't break git log [#63](https://github.com/domharrington/node-gitlog/pull/63) ([@hipstersmoothie](https://github.com/hipstersmoothie))
#### Authors: 1
- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie))
---
# v4.0.2 (Fri Oct 02 2020)

@@ -2,0 +14,0 @@

2

dist/gitlog.cjs.development.js

@@ -144,3 +144,3 @@ 'use strict';

// Start constructing command
var command = "git log ";
var command = "git log -l0 ";

@@ -147,0 +147,0 @@ if (options.findCopiesHarder) {

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("child_process"),r=require("fs");function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var i=((e=require("debug"))&&"object"==typeof e&&"default"in e?e.default:e)("gitlog"),a={hash:"%H",abbrevHash:"%h",treeHash:"%T",abbrevTreeHash:"%t",parentHashes:"%P",abbrevParentHashes:"%P",authorName:"%an",authorEmail:"%ae",authorDate:"%ai",authorDateRel:"%ar",committerName:"%cn",committerEmail:"%ce",committerDate:"%cd",committerDateRel:"%cr",subject:"%s",body:"%b",rawBody:"%B"},o=["status","files"],s={number:10,fields:["abbrevHash","hash","subject","authorName","authorDate"],nameStatus:!0,includeMergeCommitFiles:!1,findCopiesHarder:!1,all:!1},l=function(e,t,r){return e.map((function(e){var n=e.split("@end@"),a=n[0].split("\t");if(n[1]){var s=n[1].trimLeft().split("\n");""===s[s.length-1]&&s.pop(),s.map((function(e){return e.split("\t")})).forEach((function(e){for(var t=e[0],r=[t,e[e.length-1]],n=1,i=e.length-1;n<i;n++)"R"===t.slice(0,1)&&r.push("D",e[n]);a.push.apply(a,r)}))}i("commit",a),a.shift();var l={};return r&&o.forEach((function(e){l[e]=[]})),a.forEach((function(e,n){if(t[n])l[t[n]]=e;else if(r){var a=(n-t.length)%o.length;i("nameStatus",n-t.length,o.length,a,e);var s=l[o[a]];Array.isArray(s)&&s.push(e)}})),l}))};function u(e,u){if(!e.repo)throw new Error("Repo required!");if(!r.existsSync(e.repo))throw new Error("Repo location does not exist");var f=n({},s,{},e),c=n({cwd:e.repo},e.execOptions),h=function(e){var t="git log ";return e.findCopiesHarder&&(t+="--find-copies-harder "),e.all&&(t+="--all "),e.includeMergeCommitFiles&&(t+="-m "),t=function(e,t){for(var r=e,n=["author","since","after","until","before","committer"],i=n.length;i--;)t[n[i]]&&(r+=" --"+n[i]+'="'+t[n[i]]+'"');return r}(t+="-n "+e.number,e),t+=' --pretty="@begin@',e.fields&&e.fields.forEach((function(e){if(!a[e]&&!o.includes(e))throw new Error("Unknown field: "+e);t+="\t"+a[e]})),t+='@end@"',e.branch&&(t+=" "+e.branch),e.nameStatus&&!e.fileLineRange&&(t+=" --name-status"),e.fileLineRange&&(t+=" -L "+e.fileLineRange.startLine+","+e.fileLineRange.endLine+":"+e.fileLineRange.file),e.file&&(t+=" -- "+e.file),i("command",e.execOptions,t),t}(f);if(!u){var m=t.execSync(h,c).toString().split("@begin@");return""===m[0]&&m.shift(),i("commits",m),l(m,f.fields,f.nameStatus)}t.exec(h,c,(function(e,t,r){i("stdout",t);var n=t.split("@begin@");""===n[0]&&n.shift(),i("commits",n),u(r||e,l(n,f.fields,f.nameStatus))}))}exports.default=u,exports.gitlogPromise=function(e){return new Promise((function(t,r){u(e,(function(e,n){e?r(e):t(n)}))}))};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("child_process"),r=require("fs");function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var i=((e=require("debug"))&&"object"==typeof e&&"default"in e?e.default:e)("gitlog"),a={hash:"%H",abbrevHash:"%h",treeHash:"%T",abbrevTreeHash:"%t",parentHashes:"%P",abbrevParentHashes:"%P",authorName:"%an",authorEmail:"%ae",authorDate:"%ai",authorDateRel:"%ar",committerName:"%cn",committerEmail:"%ce",committerDate:"%cd",committerDateRel:"%cr",subject:"%s",body:"%b",rawBody:"%B"},o=["status","files"],s={number:10,fields:["abbrevHash","hash","subject","authorName","authorDate"],nameStatus:!0,includeMergeCommitFiles:!1,findCopiesHarder:!1,all:!1},l=function(e,t,r){return e.map((function(e){var n=e.split("@end@"),a=n[0].split("\t");if(n[1]){var s=n[1].trimLeft().split("\n");""===s[s.length-1]&&s.pop(),s.map((function(e){return e.split("\t")})).forEach((function(e){for(var t=e[0],r=[t,e[e.length-1]],n=1,i=e.length-1;n<i;n++)"R"===t.slice(0,1)&&r.push("D",e[n]);a.push.apply(a,r)}))}i("commit",a),a.shift();var l={};return r&&o.forEach((function(e){l[e]=[]})),a.forEach((function(e,n){if(t[n])l[t[n]]=e;else if(r){var a=(n-t.length)%o.length;i("nameStatus",n-t.length,o.length,a,e);var s=l[o[a]];Array.isArray(s)&&s.push(e)}})),l}))};function u(e,u){if(!e.repo)throw new Error("Repo required!");if(!r.existsSync(e.repo))throw new Error("Repo location does not exist");var f=n({},s,{},e),c=n({cwd:e.repo},e.execOptions),h=function(e){var t="git log -l0 ";return e.findCopiesHarder&&(t+="--find-copies-harder "),e.all&&(t+="--all "),e.includeMergeCommitFiles&&(t+="-m "),t=function(e,t){for(var r=e,n=["author","since","after","until","before","committer"],i=n.length;i--;)t[n[i]]&&(r+=" --"+n[i]+'="'+t[n[i]]+'"');return r}(t+="-n "+e.number,e),t+=' --pretty="@begin@',e.fields&&e.fields.forEach((function(e){if(!a[e]&&!o.includes(e))throw new Error("Unknown field: "+e);t+="\t"+a[e]})),t+='@end@"',e.branch&&(t+=" "+e.branch),e.nameStatus&&!e.fileLineRange&&(t+=" --name-status"),e.fileLineRange&&(t+=" -L "+e.fileLineRange.startLine+","+e.fileLineRange.endLine+":"+e.fileLineRange.file),e.file&&(t+=" -- "+e.file),i("command",e.execOptions,t),t}(f);if(!u){var m=t.execSync(h,c).toString().split("@begin@");return""===m[0]&&m.shift(),i("commits",m),l(m,f.fields,f.nameStatus)}t.exec(h,c,(function(e,t,r){i("stdout",t);var n=t.split("@begin@");""===n[0]&&n.shift(),i("commits",n),u(r||e,l(n,f.fields,f.nameStatus))}))}exports.default=u,exports.gitlogPromise=function(e){return new Promise((function(t,r){u(e,(function(e,n){e?r(e):t(n)}))}))};
//# sourceMappingURL=gitlog.cjs.production.min.js.map

@@ -138,3 +138,3 @@ import { execSync, exec } from 'child_process';

// Start constructing command
var command = "git log ";
var command = "git log -l0 ";

@@ -141,0 +141,0 @@ if (options.findCopiesHarder) {

{
"name": "gitlog",
"version": "4.0.2",
"version": "4.0.3",
"description": "Git log parser for Node.JS",

@@ -5,0 +5,0 @@ "module": "dist/gitlog.esm.js",

@@ -241,3 +241,3 @@ import { exec, execSync, ExecSyncOptions, ExecException } from "child_process";

// Start constructing command
let command = "git log ";
let command = "git log -l0 ";

@@ -244,0 +244,0 @@ if (options.findCopiesHarder) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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