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

coveralls

Package Overview
Dependencies
Maintainers
2
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coveralls - npm Package Compare versions

Comparing version 2.12.0 to 2.13.0

test/detectLocalGit.js

21

lib/detectLocalGit.js

@@ -26,4 +26,23 @@ var fs = require('fs');

var commit = fs.readFileSync(path.join(dir, '.git', 'refs', 'heads', branch), 'utf-8').trim();
var commit = _parseCommitHashFromRef(dir, branch);
return { git_commit: commit, git_branch: branch };
};
function _parseCommitHashFromRef(dir, branch) {
var ref = path.join(dir, '.git', 'refs', 'heads', branch);
if (fs.existsSync(ref)) {
return fs.readFileSync(ref, 'utf-8').trim();
} else {
// ref does not exist; get it from packed-refs
var commit = '';
var packedRefs = path.join(dir, '.git', 'packed-refs');
var packedRefsText = fs.readFileSync(packedRefs, 'utf-8');
packedRefsText.split('\n').forEach(function (line) {
if (line.match('refs/heads/'+branch)) {
commit = line.split(' ')[0];
}
});
return commit;
}
}

2

package.json

@@ -8,3 +8,3 @@ {

],
"version": "2.12.0",
"version": "2.13.0",
"bugs": {

@@ -11,0 +11,0 @@ "url": "https://github.com/nickmerwin/node-coveralls/issues"

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

#node-coveralls
# node-coveralls

@@ -10,3 +10,3 @@ [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url]

##Installation:
## Installation:
Add the latest version of `coveralls` to your package.json:

@@ -22,3 +22,3 @@ ```

##Usage:
## Usage:

@@ -25,0 +25,0 @@ This script ( `bin/coveralls.js` ) can take standard input from any tool that emits the lcov data format (including [mocha](http://mochajs.org/)'s [LCov reporter](https://npmjs.org/package/mocha-lcov-reporter)) and send it to coveralls.io to report your code coverage there.

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