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.11.12 to 2.11.13

.snyk

5

lib/convertLcovToCoveralls.js

@@ -64,3 +64,6 @@ var TRAVIS_JOB_ID = process.env.TRAVIS_JOB_ID || 'unknown';

parsed.forEach(function(file){
postJson.source_files.push(convertLcovFileObject(file, filepath));
var currentFilePath = path.resolve(filepath, file.file);
if (fs.existsSync(currentFilePath)) {
postJson.source_files.push(convertLcovFileObject(file, filepath));
}
});

@@ -67,0 +70,0 @@ return cb(null, postJson);

14

lib/getOptions.js

@@ -12,2 +12,3 @@ var fs = require('fs');

var git_branch = process.env.COVERALLS_GIT_BRANCH;
var git_committer_name, git_committer_email, git_message;

@@ -61,2 +62,5 @@ var match = (process.env.CI_PULL_REQUEST || "").match(/(\d+)$/);

git_branch = process.env.CI_BRANCH;
git_committer_name = process.env.CI_COMMITTER_NAME;
git_committer_email = process.env.CI_COMMITTER_EMAIL;
git_message = process.env.CI_COMMIT_MESSAGE;
}

@@ -85,2 +89,7 @@

}
if(process.env.SURF_SHA1){
options.service_name = 'surf';
git_commit = process.env.SURF_SHA1;
git_branch = process.env.SURF_REF;
}
options.run_at = process.env.COVERALLS_RUN_AT || JSON.stringify(new Date()).slice(1, -1);

@@ -129,3 +138,6 @@ if (process.env.COVERALLS_SERVICE_NAME){

head: {
id: git_commit
id: git_commit,
committer_name: git_committer_name,
committer_email: git_committer_email,
message: git_message
},

@@ -132,0 +144,0 @@ branch: git_branch

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

],
"version": "2.11.12",
"version": "2.11.13",
"bugs": {

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

"scripts": {
"test": "make test"
"test": "snyk test && make test"
},

@@ -31,18 +31,20 @@ "bin": {

"mattjmorrison <mattjmorrison@mattjmorrison.com> (http://mattjmorrison.com)",
"Arpad Borsos <arpad.borsos@googlemail.com> (http://swatinem.de/)"
"Arpad Borsos <arpad.borsos@googlemail.com> (http://swatinem.de/)",
"Adam Moss (https://github.com/adam-moss)"
],
"dependencies": {
"js-yaml": "3.0.1",
"lcov-parse": "0.0.6",
"log-driver": "1.2.4",
"request": "2.74.0",
"minimist": "1.2.0"
"js-yaml": "3.6.1",
"lcov-parse": "0.0.10",
"log-driver": "1.2.5",
"minimist": "1.2.0",
"request": "2.73.0"
},
"devDependencies": {
"sinon-restore": "1.0.0",
"mocha-lcov-reporter": "0.0.1",
"mocha": "1.8.1",
"should": "1.1.0",
"istanbul": "0.2.10",
"jshint": "2.1.3"
"istanbul": "0.4.4",
"jshint": "2.9.3",
"mocha": "2.5.3",
"mocha-lcov-reporter": "1.2.0",
"should": "9.0.2",
"sinon-restore": "1.0.1",
"snyk": "1.17.0"
},

@@ -49,0 +51,0 @@ "engines": {

#node-coveralls
[![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Codeship Build Status][codeship-image]][codeship-url]
[![Known Vulnerabilities](https://snyk.io/test/github/nickmerwin/node-coveralls/badge.svg)](https://snyk.io/test/github/nickmerwin/node-coveralls)

@@ -5,0 +6,0 @@ [Coveralls.io](https://coveralls.io/) support for node.js. Get the great coverage reporting of coveralls.io and add a cool coverage button ( like the one above ) to your README.

@@ -78,4 +78,8 @@ var convertLcovToCoveralls = require('../index').convertLcovToCoveralls;

var originalExistsSync = fs.existsSync;
fs.existsSync = function () { return true; };
convertLcovToCoveralls(input, {filepath: libpath}, function(err, output){
fs.readFileSync = originalReadFileSync;
fs.existsSync = originalExistsSync;

@@ -87,2 +91,32 @@ should.not.exist(err);

});
it ("should ignore files that do not exists", function(done){
process.env.TRAVIS_JOB_ID = -1;
var lcovpath = __dirname + "/../fixtures/istanbul.lcov";
var input = fs.readFileSync(lcovpath, "utf8");
var libpath = "/Users/deepsweet/Dropbox/projects/svgo/lib";
var sourcepath = path.resolve(libpath, "svgo/config.js");
var originalReadFileSync = fs.readFileSync;
fs.readFileSync = function(filepath) {
if (filepath === sourcepath) {
return '';
}
return originalReadFileSync.apply(fs, arguments);
};
var originalExistsSync = fs.existsSync;
fs.existsSync = function () { return false; };
convertLcovToCoveralls(input, {filepath: libpath}, function(err, output){
fs.readFileSync = originalReadFileSync;
fs.existsSync = originalExistsSync;
should.not.exist(err);
output.source_files.should.be.empty();
done();
});
});
});

@@ -101,3 +101,3 @@ var should = require('should');

}, function(err, str){
str.branch.should.be.a("string");
str.branch.should.be.String();
fetchGitData({

@@ -109,3 +109,3 @@ "head": {

}, function(err, str){
str.branch.should.be.a("string");
str.branch.should.be.String();
done();

@@ -173,7 +173,7 @@ });

options = options.git;
options.head.should.be.a("object");
options.head.should.be.Object();
options.head.author_name.should.not.equal("Unknown Author");
options.head.committer_name.should.not.equal("Unknown Committer");
options.head.message.should.not.equal("Unknown Commit Message");
options.branch.should.be.a("string");
options.branch.should.be.String();
options.should.have.property("remotes");

@@ -180,0 +180,0 @@ options.remotes.should.be.instanceof(Array);

@@ -147,2 +147,5 @@ var should = require('should');

});
it ("should set service_name and service_job_id if it's running via Surf", function(done){
testSurf(getOptions, done);
});
it ("should override set options with user options", function(done){

@@ -207,3 +210,3 @@ var userOptions = {service_name: 'OVERRIDDEN_SERVICE_NAME'};

else
options.git.should.not.have.property('branch');
options.git.should.not.have.key('branch');
localGit.wrapUp();

@@ -343,2 +346,5 @@ done();

process.env.CI_BRANCH = "master";
process.env.CI_COMMITTER_NAME = "John Doe";
process.env.CI_COMMITTER_EMAIL = "jd@example.com";
process.env.CI_COMMIT_MESSAGE = "adadadadadadadadadad";
sut(function(err, options){

@@ -351,5 +357,5 @@ options.service_name.should.equal("codeship");

author_email: '',
committer_name: 'Unknown Committer',
committer_email: '',
message: 'Unknown Commit Message' },
committer_name: 'John Doe',
committer_email: 'jd@example.com',
message: 'adadadadadadadadadad' },
branch: 'master',

@@ -425,2 +431,22 @@ remotes: [] });

var testSurf = function(sut, done) {
process.env.CI_NAME = 'surf';
process.env.SURF_SHA1 = "e3e3e3e3e3e3e3e3e";
process.env.SURF_REF = "feature";
sut(function(err, options){
options.service_name.should.equal("surf");
options.git.should.eql({ head:
{ id: 'e3e3e3e3e3e3e3e3e',
author_name: 'Unknown Author',
author_email: '',
committer_name: 'Unknown Committer',
committer_email: '',
message: 'Unknown Commit Message' },
branch: 'feature',
remotes: [] });
done();
});
};
function ensureLocalGitContext(options) {

@@ -427,0 +453,0 @@ var path = require('path');

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