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

gitty

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitty - npm Package Compare versions

Comparing version 3.2.1 to 3.2.2

9

lib/parser.js

@@ -17,8 +17,11 @@ /**

// JSON string
var h = log.match(/".*?": "(.*?)"[,}]/g);
var jsonValueRegex = /".*?":"(.*?)"[,}]/g;
var h = log.match(jsonValueRegex);
if (h) {
for (var i = h.length - 1; i >= 0; i--) {
var hh = h[i].replace(/".*?": "(.*?)"[,}]/g, '$1');
var hhh = hh.replace(/\"/g, '\\"');
var hh = h[i].replace(jsonValueRegex, '$1');
var hhh = hh.replace(/\"/g, '\\"').replace(/\'/g, "");

@@ -25,0 +28,0 @@ log = log.replace(hh, hhh);

{
"name": "gitty",
"version": "3.2.1",
"version": "3.2.2",
"description": "A Node.js wrapper for the Git CLI",

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

@@ -166,2 +166,21 @@ var fs = require('fs');

it('should be able to parse commit messages with quotation marks', function(done) {
//add a file so something can be committed
fs.writeFileSync(repo1.path + '/testFile.txt', 'i am a file');
repo1.addSync(['testFile.txt']);
var commitMessage = "this commit shouldn't fail due to apostrophe, or \"quotation marks";
repo1.commitSync(commitMessage.replace(/\"/g, '\\"').replace(/\'/g, "\\'"));
repo1.log(function(err, log) {
should.not.exist(err);
log.should.have.lengthOf(2);
repo1.resetSync(log[1].commit); //reset the commit
done();
});
});
});

@@ -168,0 +187,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