Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: codecov/codecov-node
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6045ab208f07c8aba66b649c44805753ea88155c
Choose a base ref
...
head repository: codecov/codecov-node
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e427d900309adb50746a39a50aa7d80071a5ddd0
Choose a head ref

Commits on Oct 16, 2015

  1. update readme

    stevepeak committed Oct 16, 2015
    Copy the full SHA
    ae1931b View commit details

Commits on Nov 27, 2015

  1. Updated npm badge

    eddiemoore committed Nov 27, 2015
    Copy the full SHA
    e9e50d1 View commit details
  2. Merge pull request #3 from eddiemoore/patch-1

    Updated npm badge
    Steve Peak committed Nov 27, 2015
    Copy the full SHA
    2aeb508 View commit details

Commits on Dec 8, 2015

  1. Add tests.

    Test detect module.
    Test buildkite service detector.
    Edit snap service detector test to cover all paths.
    Bjørn authored and Bjørn committed Dec 8, 2015
    Copy the full SHA
    dcf3a00 View commit details
  2. Missing semicolon in text test

    Bjørn authored and Bjørn committed Dec 8, 2015
    Copy the full SHA
    0ddc2f3 View commit details
  3. Change service to Travis from AppVeyor.

    Travis is detected before AppVeyor on CI.
    Bjørn authored and Bjørn committed Dec 8, 2015
    Copy the full SHA
    1777030 View commit details
  4. Clear Travis env after test.

    Bjørn authored and Bjørn committed Dec 8, 2015
    Copy the full SHA
    8c3cf10 View commit details

Commits on Dec 11, 2015

  1. Merge pull request #5 from Crevil/master

    Add tests.
    Steve Peak committed Dec 11, 2015
    Copy the full SHA
    ee7fa55 View commit details
  2. [clean] variable names

    stevepeak committed Dec 11, 2015
    Copy the full SHA
    4622617 View commit details
  3. [clean] rebuild

    stevepeak committed Dec 11, 2015
    Copy the full SHA
    ea77764 View commit details

Commits on Apr 20, 2016

  1. Update README.md

    Steve Peak committed Apr 20, 2016
    1
    Copy the full SHA
    b3e5651 View commit details

Commits on May 13, 2016

  1. Copy the full SHA
    ea97b30 View commit details

Commits on May 14, 2016

  1. Merge pull request #15 from simov/detect-config-file

    Detect config file in the root folder
    Steve Peak committed May 14, 2016
    Copy the full SHA
    b6c7b7e View commit details

Commits on May 17, 2016

  1. Copy the full SHA
    635218e View commit details
  2. Merge pull request #17 from nfischer/chore/update-ci

    Update Travis to newer versions of node
    Steve Peak committed May 17, 2016
    Copy the full SHA
    9d1b186 View commit details

Commits on Jul 25, 2016

  1. Merge pull request #1 from codecov/master

    Pull from codecov master
    eddiemoore authored Jul 25, 2016
    Copy the full SHA
    e170be6 View commit details
  2. Copy the full SHA
    8f807bb View commit details
  3. Copy the full SHA
    ca4a466 View commit details
  4. Copy the full SHA
    85c43ca View commit details

Commits on Aug 19, 2016

  1. Merge pull request #26 from eddiemoore/updates

    Updates and Fixing tests
    eddiemoore authored Aug 19, 2016
    Copy the full SHA
    6f21a16 View commit details

Commits on Aug 31, 2016

  1. Copy the full SHA
    3eb26c1 View commit details
  2. check if response is falsy and if so, call the on_failure function wi…

    …th the error object instead of the response object
    dotnetCarpenter committed Aug 31, 2016
    Copy the full SHA
    925f194 View commit details
  3. Copy the full SHA
    fc1106b View commit details

Commits on Sep 1, 2016

  1. Merge pull request #28 from dotnetCarpenter/fix_offline_error

    Fix offline error
    Steve Peak authored Sep 1, 2016
    Copy the full SHA
    d9e5f5f View commit details

Commits on Sep 6, 2016

  1. Copy the full SHA
    f060b66 View commit details
  2. fix indentation

    dotnetCarpenter committed Sep 6, 2016
    Copy the full SHA
    d2e91e1 View commit details

Commits on Sep 14, 2016

  1. Copy the full SHA
    61ffcab View commit details
  2. Merge pull request #31 from dotnetCarpenter/fix_offline_error

    better check for connection errors in upload test
    Steve Peak authored Sep 14, 2016
    Copy the full SHA
    a12f122 View commit details

Commits on Oct 23, 2016

  1. Copy the full SHA
    17f2b92 View commit details

Commits on Nov 17, 2016

  1. fix gitlab ci detection

    Bill Thornton committed Nov 17, 2016
    Copy the full SHA
    5998040 View commit details

Commits on Dec 1, 2016

  1. Copy the full SHA
    23bc167 View commit details

Commits on Dec 2, 2016

  1. Merge pull request #38 from mightyiam/patch-3

    readme: `--save-dev`
    eddiemoore authored Dec 2, 2016
    Copy the full SHA
    2408ca9 View commit details

Commits on Feb 16, 2017

  1. Removing execSync

    eddiemoore committed Feb 16, 2017
    Copy the full SHA
    a8f07b8 View commit details

Commits on Feb 18, 2017

  1. Support CircleCI 2.0 (beta)

    dtinth authored Feb 18, 2017
    Copy the full SHA
    3c36cfa View commit details
  2. Add test for CircleCI 2.0

    dtinth committed Feb 18, 2017
    Copy the full SHA
    4aaeec3 View commit details

Commits on Feb 21, 2017

  1. Update test/upload.js to expect https link

    Codecov backend seems to return https link now.
    dtinth authored Feb 21, 2017
    Copy the full SHA
    da6847e View commit details
  2. Copy the full SHA
    e70ca5a View commit details
  3. Merge pull request #46 from dtinth/cci2

    Support CircleCI 2.0
    Steve Peak authored Feb 21, 2017
    Copy the full SHA
    f0c8aeb View commit details

Commits on Mar 2, 2017

  1. Merge pull request #37 from thornbill/gitlab-ci

    Fix GitLab CI detection
    Steve Peak authored Mar 2, 2017
    Copy the full SHA
    f224f6c View commit details

Commits on Mar 3, 2017

  1. Merge pull request #45 from codecov/fix/update

    Removing execSync
    eddiemoore authored Mar 3, 2017
    Copy the full SHA
    8b70699 View commit details

Commits on Mar 14, 2017

  1. v2.0.1

    eddiemoore committed Mar 14, 2017
    Copy the full SHA
    2f0069b View commit details
  2. Fixing test

    eddiemoore committed Mar 14, 2017
    Copy the full SHA
    93a383e View commit details
  3. Merge pull request #33 from Radagaisus/patch-1

    Update README.md distinquish -> distinguish
    eddiemoore authored Mar 14, 2017
    Copy the full SHA
    2d56b9c View commit details

Commits on Mar 15, 2017

  1. Updating Change Log

    eddiemoore authored Mar 15, 2017
    Copy the full SHA
    0d34b02 View commit details
  2. Copy the full SHA
    dc8867c View commit details
  3. Merge pull request #50 from ryanlntn/patch-1

    Fix typo in unknown service provider error message
    eddiemoore authored Mar 15, 2017
    Copy the full SHA
    a6bdf01 View commit details

Commits on Mar 16, 2017

  1. Copy the full SHA
    e90abf3 View commit details
  2. Copy the full SHA
    e7a3a72 View commit details
  3. Merge pull request #52 from codecov/fix/version

    Take version from package.json
    eddiemoore authored Mar 16, 2017
    Copy the full SHA
    458cc21 View commit details
  4. v2.0.2

    eddiemoore committed Mar 16, 2017
    Copy the full SHA
    1a5741f View commit details
Showing with 7,512 additions and 998 deletions.
  1. +14 −0 .eslintrc.json
  2. +1 −0 .gitignore
  3. +3 −0 .prettierignore
  4. +6 −0 .prettierrc
  5. +8 −7 .travis.yml
  6. +0 −23 Makefile
  7. +36 −20 README.md
  8. +29 −0 appveyor.yml
  9. +4 −1 bin/codecov
  10. +2 −8 circle.yml
  11. +4 −0 codecov.yml
  12. +2 −2 index.js
  13. +453 −200 lib/codecov.js
  14. +27 −26 lib/detect.js
  15. +15 −0 lib/git.js
  16. +14 −0 lib/offline.js
  17. +18 −15 lib/services/appveyor.js
  18. +23 −0 lib/services/azurePipelines.js
  19. +13 −15 lib/services/buildkite.js
  20. +35 −15 lib/services/circle.js
  21. +12 −14 lib/services/codeship.js
  22. +14 −22 lib/services/drone.js
  23. +20 −17 lib/services/gitlab.js
  24. +20 −16 lib/services/jenkins.js
  25. +11 −19 lib/services/localGit.js
  26. +15 −15 lib/services/semaphore.js
  27. +13 −16 lib/services/shippable.js
  28. +11 −13 lib/services/snap.js
  29. +14 −16 lib/services/travis.js
  30. +16 −15 lib/services/wercker.js
  31. +5,777 −0 package-lock.json
  32. +26 −16 package.json
  33. +17 −0 test/detect.js
  34. +20 −0 test/git.js
  35. +265 −125 test/index.js
  36. +25 −27 test/services/appveyor.js
  37. +31 −0 test/services/azure-pipelines.js
  38. +25 −0 test/services/buildkite.js
  39. +58 −25 test/services/circle.js
  40. +19 −21 test/services/codeship.js
  41. +21 −29 test/services/drone.js
  42. +44 −21 test/services/gitlab.js
  43. +58 −40 test/services/jenkins.js
  44. +15 −19 test/services/localGit.js
  45. +20 −22 test/services/semaphore.js
  46. +25 −27 test/services/shippable.js
  47. +35 −35 test/services/snap.js
  48. +26 −28 test/services/travis.js
  49. +22 −24 test/services/wercker.js
  50. +129 −43 test/upload.js
  51. +1 −1 testinit.js
14 changes: 14 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"env": {
"node": true,
"mocha": true
},
"globals": {
"expect": true
},
"extends": ["eslint:recommended", "prettier"],
"rules": {
"no-console": "off",
"no-empty": ["error", { "allowEmptyCatch": true }]
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ lib-cov

# Coverage directory used by tools like istanbul
coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
.git/
coverage/
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": false,
"trailingComma": "es5",
"singleQuote": true,
"useTabs": false
}
15 changes: 8 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -3,12 +3,13 @@ language: node_js
sudo: false

node_js:
- "4.1"
- "4.0"
- "0.12"
- "0.11"
- "0.10"
- "iojs"
- "10"
- "9"
- "8"
- "7"
- "6"
- "5"
- "4"

after_success:
- ./bin/codecov -e TRAVIS_NODE_VERSION
- ./bin/codecov -e TRAVIS_NODE_VERSION -f .nyc_output/*.json
23 changes: 0 additions & 23 deletions Makefile

This file was deleted.

56 changes: 36 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Codecov NodeJS Uploader

[![NPM version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url] [![codecov.io](https://codecov.io/github/codecov/codecov-node/coverage.svg?branch=master)](https://codecov.io/github/codecov/codecov-node?branch=master)
[![Build Status][travis-image]][travis-url]
[![Build Status][appveyor-image]][appveyor-url]
[![codecov.io](https://codecov.io/github/codecov/codecov-node/coverage.svg?branch=master)](https://codecov.io/github/codecov/codecov-node?branch=master)
[![Dependency Status][depstat-image]][depstat-url]
[![Dev Dependency Status][devdepstat-image]][devdepstat-url]

@@ -10,7 +12,11 @@
## Installation:
Add the latest version of `codecov` to your package.json:
```
npm install codecov --save
npm install codecov --save-dev
```
or
```
yarn add codecov --dev
```

## Usage:
@@ -24,7 +30,7 @@ This library currently supports the following CI companies: [Travis CI](https://
#### Upload repo tokens
> Repo tokens are **not** required for public repos tested on Travis-Org, CircleCI or AppVeyor.
Repo tokens are neccessary to distinquish your repository from others. You can find your repo token on your repository page at Codecov. Set this unique uuid to `CODECOV_TOKEN` in your environment variables.
Repo tokens are necessary to distinguish your repository from others. You can find your repo token on your repository page at Codecov. Set this unique uuid to `CODECOV_TOKEN` in your environment variables.

```
export CODECOV_TOKEN=":uuid-repo-token"
@@ -55,29 +61,39 @@ istanbul cover test.js
./node_modules/.bin/codecov
```

----

## Advanced: Partial Line Coverage
**Codecov does support partial line coverage**. However, some node projects do not report partial coverage accurate enough.
You can decide to upload the partial coverage report by chaning the target upload file to `./coverage/coverage.json`.
View your report on Codecov, if the reports are not accurate then switch back to the `lcov` provided above.

We are working on improving this implementation and appreciate your patience.

## Contributing

I generally don't accept pull requests that are untested, or break the build, because I'd like to keep the quality high (this is a coverage tool afterall!).

I also don't care for "soft-versioning" or "optimistic versioning" (dependencies that have ^, x, > in them, or anything other than numbers and dots). There have been too many problems with bad semantic versioning in dependencies, and I'd rather have a solid library than a bleeding edge one.

[travis-image]: https://travis-ci.org/codecov/codecov-node.svg?branch=master
[travis-url]: https://travis-ci.org/codecov/codecov-node

[npm-url]: https://npmjs.org/package/codecov.io
[npm-image]: https://img.shields.io/npm/v/codecov.io.svg
[appveyor-image]: https://ci.appveyor.com/api/projects/status/ea1suiv0tprnq61l?svg=true
[appveyor-url]: https://ci.appveyor.com/project/eddiemoore/codecov-node/branch/master

[npm-url]: https://npmjs.org/package/codecov
[npm-image]: https://img.shields.io/npm/v/codecov.svg

[depstat-url]: https://david-dm.org/codecov/codecov-node
[depstat-image]: https://img.shields.io/david/codecov/codecov-node/master.svg

[devdepstat-url]: https://david-dm.org/codecov/codecov-node#info=devDependencies
[devdepstat-image]: https://img.shields.io/david/dev/codecov/codecov-node/master.svg

**With NYC**

```
nyc npm test
nyc report --reporter=text-lcov > coverage.lcov
./node_modules/.bin/codecov
```

## Change Log
- v2.0.0 No longer supports node v0.10 because of the execSync.
- v2.0.1 Publish as latest instead of next.
- v2.0.2 Display correct version number in console.
- v2.1.0 Flags supported http://docs.codecov.io/docs/flags
- v2.2.0 Support for Jenkins Blue Ocean. Clean reports after upload. Fix for Gitlab.
- v2.3.0 Added support for Windows. Updated dependencies.
- v3.0.0 No longer supports node v0.12 because of new version of request
- v3.0.1 Security fixes
- v3.0.2 Security fixes
- v3.0.3 Support non-git/hg root dirs
- v3.0.4 Security fixes
- v3.1.0 Custom yaml file. Allow codecov token from yml file.
29 changes: 29 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
environment:
matrix:
- nodejs_version: "8"
- nodejs_version: "7"
- nodejs_version: "6"
- nodejs_version: "5"
- nodejs_version: "4"

max_jobs: 4

clone_depth: 50

init:
- git config --global core.autocrlf true

install:
- ps: Install-Product node $env:nodejs_version
- npm install

test_script:
- cmd: SET PATH=C:\MinGW\bin;%PATH%
- npm run test

after_test:
- node .\bin\codecov -f .nyc_output\*.json

build: off

deploy: off
5 changes: 4 additions & 1 deletion bin/codecov
Original file line number Diff line number Diff line change
@@ -14,11 +14,14 @@ var args = argv.option([
{name: 'gcov-args', type: 'string', description: "extra arguments to pass to gcov"},
{name: 'disable', short: 'X', type: 'string', description: "Disable features. Accepting `search` to disable crawling through directories, `detect` to disable detecting CI provider, `gcov` disable gcov commands"},
{name: 'commit', short: 'c', type: 'string', description: "Commit sha, set automatically"},
{name: 'clear', short: 'C', type: 'boolean', description: "Remove all discovered reports after uploading"},
{name: 'branch', short: 'b', type: 'string', description: "Branch name"},
{name: 'build', short: 'B', type: 'string', description: "Specify a custom build number to distinguish ci jobs, provided automatically for supported ci companies"},
{name: 'slug', short: 'r', type: 'string', description: "Specify repository slug for Enterprise ex. owner/repo"},
{name: 'url', short: 'u', type: 'string', description: "Your Codecov endpoint"},
{name: 'dump', type: 'boolean', description: "Dump collected data and do not send to Codecov"}
{name: 'flags', short: 'F', type: 'string', description: "Codecov Flags"},
{name: 'dump', type: 'boolean', description: "Dump collected data and do not send to Codecov"},
{name: 'yml', short: 'y', type: 'string', description: "Configuration file Used to specify the location of the .codecov.yml config file. Defaults to codecov.yml and .codecov.yml"}
]).run();

codecov.upload(args);
10 changes: 2 additions & 8 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
machine:
node:
version: 0.12.7
version: 4

test:
post:
- ./bin/codecov

deployment:
suite:
branch: /.*/
commands:
- make testsuite
- ./bin/codecov -f .nyc_output/*.json
4 changes: 4 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
coverage:
parsers:
javascript:
enable_partials: no
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
var handleInput = require('./lib/codecov');
var handleInput = require('./lib/codecov')

exports.handleInput = handleInput;
exports.handleInput = handleInput
Loading