Socket
Socket
Sign inDemoInstall

coveralls

Package Overview
Dependencies
54
Maintainers
2
Versions
71
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.9 to 3.0.10

56

lib/getOptions.js

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

options.service_pull_request = process.env.TRAVIS_PULL_REQUEST;
git_commit = 'HEAD';
git_commit = process.env.TRAVIS_COMMIT || 'HEAD';
git_branch = process.env.TRAVIS_BRANCH;

@@ -135,7 +135,14 @@ }

options.run_at = process.env.COVERALLS_RUN_AT || JSON.stringify(new Date()).slice(1, -1);
if (process.env.COVERALLS_SERVICE_NAME) {
options.service_name = process.env.COVERALLS_SERVICE_NAME;
if (process.env.CF_BRANCH) {
options.service_name = 'Codefresh';
options.service_job_id = process.env.CF_BUILD_ID;
options.service_pull_request = process.env.CF_PULL_REQUEST_ID;
git_commit = process.env.CF_REVISION;
git_branch = process.env.CF_BRANCH;
git_committer_name = process.env.CF_COMMIT_AUTHOR;
git_message = process.env.CF_COMMIT_MESSAGE;
}
options.run_at = process.env.COVERALLS_RUN_AT || JSON.stringify(new Date()).slice(1, -1);
if (process.env.COVERALLS_SERVICE_JOB_ID) {

@@ -157,22 +164,39 @@ options.service_job_id = process.env.COVERALLS_SERVICE_JOB_ID;

// try to get the repo token as an environment variable
if (process.env.COVERALLS_REPO_TOKEN) {
options.repo_token = process.env.COVERALLS_REPO_TOKEN;
} else {
// try to get the repo token from a .coveralls.yml file
// load a .coveralls.yml file
const coveralls_yaml_conf = (() => {
const yml = path.join(process.cwd(), '.coveralls.yml');
try {
if (fs.statSync(yml).isFile()) {
const coveralls_yaml_conf = yaml.safeLoad(fs.readFileSync(yml, 'utf8'));
options.repo_token = coveralls_yaml_conf.repo_token;
if (coveralls_yaml_conf.service_name) {
options.service_name = coveralls_yaml_conf.service_name;
}
return yaml.safeLoad(fs.readFileSync(yml, 'utf8'));
}
} catch (_) {
logger.warn('Repo token could not be determined. Continuing without it. ' +
'This is necessary for private repos only, so may not be an issue at all.');
logger.debug('No valid .coveralls.yml file found');
}
})();
// try to get repo token and service name from .coveralls.yml file
if (coveralls_yaml_conf) {
if (coveralls_yaml_conf.repo_token) {
options.repo_token = coveralls_yaml_conf.repo_token;
}
if (coveralls_yaml_conf.service_name) {
options.service_name = coveralls_yaml_conf.service_name;
}
}
// try to get the repo token as an environment variable
if (process.env.COVERALLS_REPO_TOKEN) {
options.repo_token = process.env.COVERALLS_REPO_TOKEN;
}
if ('travis-pro' === options.service_name && !options.repo_token) {
logger.warn('Repo token could not be determined. Continuing without it. ' +
'This is necessary for private repos only, so may not be an issue at all.');
}
// try to get the service name as an environment variable
if (process.env.COVERALLS_SERVICE_NAME) {
options.service_name = process.env.COVERALLS_SERVICE_NAME;
}
if (process.env.COVERALLS_FLAG_NAME) {

@@ -179,0 +203,0 @@ options.flag_name = process.env.COVERALLS_FLAG_NAME;

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

],
"version": "3.0.9",
"version": "3.0.10",
"bugs": {

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

"log-driver": "^1.2.7",
"minimist": "^1.2.0",
"minimist": "^1.2.5",
"request": "^2.88.0"

@@ -44,0 +44,0 @@ },

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

Supported CI services: [Travis CI](https://travis-ci.org/), [CodeShip](https://codeship.com/), [CircleCI](https://circleci.com/), [Jenkins](https://jenkins.io/), [Gitlab CI](https://gitlab.com/), [AppVeyor](https://www.appveyor.com/), [Buildkite](https://buildkite.com/), [GitHub Actions CI](https://github.com/features/actions)
Supported CI services: [Travis CI](https://travis-ci.org/), [CodeShip](https://codeship.com/), [CircleCI](https://circleci.com/), [Jenkins](https://jenkins.io/), [Gitlab CI](https://gitlab.com/), [AppVeyor](https://www.appveyor.com/), [Buildkite](https://buildkite.com/), [GitHub Actions CI](https://github.com/features/actions), [CodeFresh](https://codefresh.io)

@@ -57,6 +57,6 @@ ## Installation:

- Install [jest](https://jestjs.io/docs/en/getting-started)
- Use the following to run tests and push files to coveralls:
- Use the following to run tests and push files to coveralls on success:
```sh
jest --coverage --coverageReporters=text-lcov | coveralls
jest --coverage && coveralls < coverage/lcov.info
```

@@ -63,0 +63,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc