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

Commit

Permalink
Merge pull request #304 from codecov/coveragefinaljson
Browse files Browse the repository at this point in the history
Add coverage-final.json and bump to 3.8.2
  • Loading branch information
thomasrockhu authored May 3, 2021
2 parents d91e38f + bd9a87a commit 19b47f2
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 56 deletions.
64 changes: 35 additions & 29 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
### 3.8.1
## 3.8.2

#### Fixes
### Fixes

- # Add coverage-final.json as a possible coverage file during file lookup

## 3.8.1

### Fixes

- [#246](https://github.com/codecov/codecov-node/pull/246) Revert "Bump teeny-request from 6.0.1 to 7.0.0"

### 3.8.0
## 3.8.0

#### Features
### Features

- [#160](https://github.com/codecov/codecov-node/pull/160) Add Github Actions support

#### Fixes
### Fixes

- [#173](https://github.com/codecov/codecov-node/pull/173) Fix broken gcov command
- [#195](https://github.com/codecov/codecov-node/pull/195) Update Node testing versions
Expand Down Expand Up @@ -47,99 +53,99 @@
- [#223](https://github.com/codecov/codecov-node/pull/223) Bump eslint from 7.9.0 to 7.10.0
- [#224](https://github.com/codecov/codecov-node/pull/224) Bump teeny-request from 7.0.0 to 7.0.1

### 3.7.2
## 3.7.2

- Fix issue with network and file finding

### 3.7.1
## 3.7.1

- Move to execFileSync and security fixes

### 3.7.0
## 3.7.0

- Remove the X-Amz-Acl: public-read header

### 3.6.4
## 3.6.4

- Fix Cirrus CI

### 3.6.3
## 3.6.3

- Fix for AWS Codebuild & package updates

### 3.6.2
## 3.6.2

- Command line args sanitized fix

### 3.6.1
## 3.6.1

- Fix for Semaphore

### 3.6.0
## 3.6.0

- Added AWS CodeBuild and Semaphore2

### 3.5.0
## 3.5.0

- Added TeamCity support

### 3.4.0
## 3.4.0

- Added Heroku CI support

### 3.3.0
## 3.3.0

- Added pipe with `--pipe`, `-l`

### 3.2.0
## 3.2.0

- Added azure pipelines
.

### 3.1.0
## 3.1.0

- Custom yaml file. Allow codecov token from yml file.

### 3.0.4
## 3.0.4

- Security fixes

### 3.0.3
## 3.0.3

- Support non-git/hg root dirs

### 3.0.2
## 3.0.2

- Security fixes

### 3.0.1
## 3.0.1

- Security fixes

### 3.0.0
## 3.0.0

- No longer supports node v0.12 because of new version of request

### 2.3.0
## 2.3.0

- Added support for Windows. Updated dependencies.

### 2.2.0
## 2.2.0

- Support for Jenkins Blue Ocean. Clean reports after upload. Fix for Gitlab.

### 2.1.0
## 2.1.0

- Flags supported http://docs.codecov.io/docs/flags

### 2.0.2
## 2.0.2

- Display correct version number in console.

### 2.0.1
## 2.0.1

- Publish as latest instead of next.

### 2.0.0
## 2.0.0

- No longer supports node v0.10 because of the execSync.
44 changes: 21 additions & 23 deletions lib/codecov.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,18 @@ if (!isWindows) {
patterns = (
'-type f ( ' +
'-name *coverage.* ' +
'-or -name nosetests.xml ' +
'-or -name jacoco*.xml ' +
'-or -name *.gcov ' +
'-or -name *.lcov ' +
'-or -name *.lst ' +
'-or -name clover.xml ' +
'-or -name report.xml ' +
'-or -name cobertura.xml ' +
'-or -name luacov.report.out ' +
'-or -name lcov.info ' +
'-or -name *.lcov ' +
'-or -name coverage-final.json ' +
'-or -name gcov.info ' +
'-or -name *.gcov ' +
'-or -name *.lst ' +
'-or -name jacoco*.xml ' +
'-or -name lcov.info ' +
'-or -name luacov.report.out ' +
'-or -name nosetests.xml ' +
'-or -name report.xml ' +
') ' +
'-not -name *.sh ' +
'-not -name *.data ' +
Expand Down Expand Up @@ -144,7 +145,7 @@ if (!isWindows) {
).split(' ')
}

var sendToCodecovV2 = function(
var sendToCodecovV2 = function (
codecov_endpoint,
query,
upload_body,
Expand All @@ -164,7 +165,7 @@ var sendToCodecovV2 = function(
Accept: 'text/plain',
},
},
function(err, response) {
function (err, response) {
if (err || response.statusCode !== 200) {
console.log(' ' + (err || response.body))
return response
Expand All @@ -179,7 +180,7 @@ var sendToCodecovV2 = function(
)
}

var sendToCodecovV4 = function(
var sendToCodecovV4 = function (
codecov_endpoint,
query,
upload_body,
Expand All @@ -199,7 +200,7 @@ var sendToCodecovV4 = function(
Accept: 'text/plain',
},
},
function(err, response, result) {
function (err, response, result) {
if (err) {
sendToCodecovV2(
codecov_endpoint,
Expand All @@ -219,7 +220,7 @@ var sendToCodecovV4 = function(
'Content-Type': 'text/plain',
},
},
function(err) {
function (err) {
if (err) {
sendToCodecovV2(
codecov_endpoint,
Expand All @@ -240,7 +241,7 @@ var sendToCodecovV4 = function(
)
}

var upload = function(args, on_success, on_failure) {
var upload = function (args, on_success, on_failure) {
// Build query
var codecov_endpoint =
args.options.url ||
Expand Down Expand Up @@ -274,7 +275,7 @@ var upload = function(args, on_success, on_failure) {
debug.push('disabled detect')
}

query.yaml = [yamlFile, '.codecov.yml'].reduce(function(result, file) {
query.yaml = [yamlFile, '.codecov.yml'].reduce(function (result, file) {
return (
result ||
(fs.existsSync(path.resolve(process.cwd(), file))
Expand Down Expand Up @@ -382,14 +383,14 @@ var upload = function(args, on_success, on_failure) {
if (!isWindows) {
gcg = gcg
.split(' ')
.map(function(p) {
.map(function (p) {
return "-not -path '" + p + "'"
})
.join(' ')
} else {
gcg = gcg
.split(' ')
.map(function(p) {
.map(function (p) {
return '^| findstr /i /v ' + p
})
.join(' ')
Expand Down Expand Up @@ -493,10 +494,7 @@ var upload = function(args, on_success, on_failure) {
if (more_patterns) {
_findArgs.concat(more_patterns)
}
_files = execFileSync('find', _findArgs)
.toString()
.trim()
.split('\n')
_files = execFileSync('find', _findArgs).toString().trim().split('\n')
} else {
// @TODO support for a root directory
// It's not straightforward due to the nature of the dir command
Expand Down Expand Up @@ -549,7 +547,7 @@ var upload = function(args, on_success, on_failure) {
codecov_endpoint,
query,
upload,
function() {
function () {
// remove files after Uploading
if (args.options.clear) {
for (var i = files.length - 1; i >= 0; i--) {
Expand All @@ -562,7 +560,7 @@ var upload = function(args, on_success, on_failure) {
on_success.apply(this, arguments)
}
},
on_failure || function() {}
on_failure || function () {}
)
}
}
Expand Down
12 changes: 9 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codecov",
"version": "3.8.1",
"version": "3.8.2",
"description": "Uploading report to Codecov: https://codecov.io",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 19b47f2

Please sign in to comment.