Huge News!Announcing our $40M Series B led by Abstract Ventures.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 3.0.0 to 3.0.1

LICENSE

21

lib/getOptions.js

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

if (process.env.DRONE){

@@ -97,2 +96,22 @@ options.service_name = 'drone';

}
if(process.env.BUILDKITE){
options.service_name = 'buildkite';
options.service_job_number = process.env.BUILDKITE_BUILD_NUMBER;
options.service_job_id = process.env.BUILDKITE_BUILD_ID;
options.service_pull_request = process.env.BUILDKITE_PULL_REQUEST;
git_commit = process.env.BUILDKITE_COMMIT;
git_branch = process.env.BUILDKITE_BRANCH;
git_committer_name = process.env.BUILDKITE_BUILD_CREATOR;
git_committer_email = process.env.BUILDKITE_BUILD_CREATOR_EMAIL;
git_message = process.env.BUILDKITE_MESSAGE;
}
if(process.env.SEMAPHORE){
options.service_name = 'semaphore';
options.service_job_id = process.env.SEMAPHORE_BUILD_NUMBER;
git_commit = process.env.REVISION;
git_branch = process.env.BRANCH_NAME;
}
options.run_at = process.env.COVERALLS_RUN_AT || JSON.stringify(new Date()).slice(1, -1);

@@ -99,0 +118,0 @@ if (process.env.COVERALLS_SERVICE_NAME){

2

lib/logger.js

@@ -9,3 +9,3 @@ var index = require('../index');

if (index.options.verbose || hasDebugEnvVariable()) {
return 'warn';
return 'debug';
}

@@ -12,0 +12,0 @@ return 'error';

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

],
"version": "3.0.0",
"version": "3.0.1",
"bugs": {

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

@@ -8,3 +8,3 @@ # node-coveralls

Supported CI services: [travis-ci](https://travis-ci.org/), [codeship](https://www.codeship.io/), [circleci](https://circleci.com/), [jenkins](http://jenkins-ci.org/), [Gitlab CI](http://gitlab.com/)
Supported CI services: [travis-ci](https://travis-ci.org/), [codeship](https://www.codeship.io/), [circleci](https://circleci.com/), [jenkins](http://jenkins-ci.org/), [Gitlab CI](http://gitlab.com/), [AppVeyor](http://appveyor.com/), [Buildkite](https://buildkite.com/)

@@ -37,2 +37,9 @@ ## Installation:

* COVERALLS_PARALLEL (more info here: https://coveralls.zendesk.com/hc/en-us/articles/203484329)
### [Jest](https://facebook.github.io/jest/)
- Install [jest](https://facebook.github.io/jest/docs/en/getting-started.html)
- Use the following to run tests and push files to coveralls:
```sh
jest --coverage --coverageReporters=text-lcov | coveralls
```
Check out an example [here](https://github.com/Ethan-Arrowood/harperdb-connect/blob/master/.travis.yml) which makes use of Travis-CI build stages

@@ -39,0 +46,0 @@ ### [Mocha](http://mochajs.org/) + [Blanket.js](https://github.com/alex-seville/blanket)

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

});
it ("should set service_name and service_job_id if it's running on Buildkite", function(done){
testBuildkite(getBaseOptions, done);
});
});

@@ -147,2 +150,8 @@

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

@@ -243,3 +252,3 @@ var userOptions = {service_name: 'OVERRIDDEN_SERVICE_NAME'};

var file = path.join(process.cwd(), '.coveralls.yml'), token, service_name, synthetic = false;
if (fs.exists(file)) {
if (fs.existsSync(file)) {
var yaml = require('js-yaml');

@@ -263,4 +272,3 @@ var coveralls_yml_doc = yaml.safeLoad(fs.readFileSync(yml, 'utf8'));

if (synthetic)
fs.unlink(file);
done();
fs.unlink(file, done);
});

@@ -453,3 +461,49 @@ };

var testBuildkite = function(sut, done) {
process.env.BUILDKITE = true;
process.env.BUILDKITE_BUILD_NUMBER = "1234";
process.env.BUILDKITE_COMMIT = "e3e3e3e3e3e3e3e3e";
process.env.BUILDKITE_BRANCH = "feature";
process.env.BUILDKITE_BUILD_CREATOR = 'john doe';
process.env.BUILDKITE_BUILD_CREATOR_EMAIL = 'john@doe.com';
process.env.BUILDKITE_MESSAGE = 'msgmsgmsg';
sut(function(err, options){
options.service_name.should.equal("buildkite");
options.git.should.eql({ head:
{ id: 'e3e3e3e3e3e3e3e3e',
author_name: 'Unknown Author',
author_email: '',
committer_name: 'john doe',
committer_email: 'john@doe.com',
message: 'msgmsgmsg' },
branch: 'feature',
remotes: [] });
done();
});
};
var testSemaphore = function(sut, done) {
process.env.SEMAPHORE = true;
process.env.SEMAPHORE_BUILD_NUMBER = '1234';
process.env.REVISION = "e3e3e3e3e3e3e3e3e";
process.env.BRANCH_NAME = "master";
sut(function(err, options){
options.service_name.should.equal("semaphore");
options.service_job_id.should.equal("1234");
options.git.should.eql({ head:
{ id: 'e3e3e3e3e3e3e3e3e',
author_name: 'Unknown Author',
author_email: '',
committer_name: 'Unknown Committer',
committer_email: '',
message: 'Unknown Commit Message' },
branch: 'master',
remotes: [] });
done();
});
};
function ensureLocalGitContext(options) {

@@ -456,0 +510,0 @@ var path = require('path');

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

var logger = require('../index').logger();
logger.level.should.equal('warn');
logger.level.should.equal('debug');
});

@@ -17,3 +17,3 @@

var logger = require('../index').logger();
logger.level.should.equal('warn');
logger.level.should.equal('debug');
});

@@ -25,3 +25,3 @@

var logger = require('../index').logger();
logger.level.should.equal('warn');
logger.level.should.equal('debug');
});

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