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

Commit 19b47f2

Browse files
authored
Merge pull request #304 from codecov/coveragefinaljson
Add coverage-final.json and bump to 3.8.2
2 parents d91e38f + bd9a87a commit 19b47f2

File tree

4 files changed

+66
-56
lines changed

4 files changed

+66
-56
lines changed

CHANGELOG.md

+35-29
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
1-
### 3.8.1
1+
## 3.8.2
22

3-
#### Fixes
3+
### Fixes
4+
5+
- # Add coverage-final.json as a possible coverage file during file lookup
6+
7+
## 3.8.1
8+
9+
### Fixes
410

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

7-
### 3.8.0
13+
## 3.8.0
814

9-
#### Features
15+
### Features
1016

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

13-
#### Fixes
19+
### Fixes
1420

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

50-
### 3.7.2
56+
## 3.7.2
5157

5258
- Fix issue with network and file finding
5359

54-
### 3.7.1
60+
## 3.7.1
5561

5662
- Move to execFileSync and security fixes
5763

58-
### 3.7.0
64+
## 3.7.0
5965

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

62-
### 3.6.4
68+
## 3.6.4
6369

6470
- Fix Cirrus CI
6571

66-
### 3.6.3
72+
## 3.6.3
6773

6874
- Fix for AWS Codebuild & package updates
6975

70-
### 3.6.2
76+
## 3.6.2
7177

7278
- Command line args sanitized fix
7379

74-
### 3.6.1
80+
## 3.6.1
7581

7682
- Fix for Semaphore
7783

78-
### 3.6.0
84+
## 3.6.0
7985

8086
- Added AWS CodeBuild and Semaphore2
8187

82-
### 3.5.0
88+
## 3.5.0
8389

8490
- Added TeamCity support
8591

86-
### 3.4.0
92+
## 3.4.0
8793

8894
- Added Heroku CI support
8995

90-
### 3.3.0
96+
## 3.3.0
9197

9298
- Added pipe with `--pipe`, `-l`
9399

94-
### 3.2.0
100+
## 3.2.0
95101

96102
- Added azure pipelines
97103
.
98104

99-
### 3.1.0
105+
## 3.1.0
100106

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

103-
### 3.0.4
109+
## 3.0.4
104110

105111
- Security fixes
106112

107-
### 3.0.3
113+
## 3.0.3
108114

109115
- Support non-git/hg root dirs
110116

111-
### 3.0.2
117+
## 3.0.2
112118

113119
- Security fixes
114120

115-
### 3.0.1
121+
## 3.0.1
116122

117123
- Security fixes
118124

119-
### 3.0.0
125+
## 3.0.0
120126

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

123-
### 2.3.0
129+
## 2.3.0
124130

125131
- Added support for Windows. Updated dependencies.
126132

127-
### 2.2.0
133+
## 2.2.0
128134

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

131-
### 2.1.0
137+
## 2.1.0
132138

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

135-
### 2.0.2
141+
## 2.0.2
136142

137143
- Display correct version number in console.
138144

139-
### 2.0.1
145+
## 2.0.1
140146

141147
- Publish as latest instead of next.
142148

143-
### 2.0.0
149+
## 2.0.0
144150

145151
- No longer supports node v0.10 because of the execSync.

lib/codecov.js

+21-23
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,18 @@ if (!isWindows) {
2222
patterns = (
2323
'-type f ( ' +
2424
'-name *coverage.* ' +
25-
'-or -name nosetests.xml ' +
26-
'-or -name jacoco*.xml ' +
25+
'-or -name *.gcov ' +
26+
'-or -name *.lcov ' +
27+
'-or -name *.lst ' +
2728
'-or -name clover.xml ' +
28-
'-or -name report.xml ' +
2929
'-or -name cobertura.xml ' +
30-
'-or -name luacov.report.out ' +
31-
'-or -name lcov.info ' +
32-
'-or -name *.lcov ' +
30+
'-or -name coverage-final.json ' +
3331
'-or -name gcov.info ' +
34-
'-or -name *.gcov ' +
35-
'-or -name *.lst ' +
32+
'-or -name jacoco*.xml ' +
33+
'-or -name lcov.info ' +
34+
'-or -name luacov.report.out ' +
35+
'-or -name nosetests.xml ' +
36+
'-or -name report.xml ' +
3637
') ' +
3738
'-not -name *.sh ' +
3839
'-not -name *.data ' +
@@ -144,7 +145,7 @@ if (!isWindows) {
144145
).split(' ')
145146
}
146147

147-
var sendToCodecovV2 = function(
148+
var sendToCodecovV2 = function (
148149
codecov_endpoint,
149150
query,
150151
upload_body,
@@ -164,7 +165,7 @@ var sendToCodecovV2 = function(
164165
Accept: 'text/plain',
165166
},
166167
},
167-
function(err, response) {
168+
function (err, response) {
168169
if (err || response.statusCode !== 200) {
169170
console.log(' ' + (err || response.body))
170171
return response
@@ -179,7 +180,7 @@ var sendToCodecovV2 = function(
179180
)
180181
}
181182

182-
var sendToCodecovV4 = function(
183+
var sendToCodecovV4 = function (
183184
codecov_endpoint,
184185
query,
185186
upload_body,
@@ -199,7 +200,7 @@ var sendToCodecovV4 = function(
199200
Accept: 'text/plain',
200201
},
201202
},
202-
function(err, response, result) {
203+
function (err, response, result) {
203204
if (err) {
204205
sendToCodecovV2(
205206
codecov_endpoint,
@@ -219,7 +220,7 @@ var sendToCodecovV4 = function(
219220
'Content-Type': 'text/plain',
220221
},
221222
},
222-
function(err) {
223+
function (err) {
223224
if (err) {
224225
sendToCodecovV2(
225226
codecov_endpoint,
@@ -240,7 +241,7 @@ var sendToCodecovV4 = function(
240241
)
241242
}
242243

243-
var upload = function(args, on_success, on_failure) {
244+
var upload = function (args, on_success, on_failure) {
244245
// Build query
245246
var codecov_endpoint =
246247
args.options.url ||
@@ -274,7 +275,7 @@ var upload = function(args, on_success, on_failure) {
274275
debug.push('disabled detect')
275276
}
276277

277-
query.yaml = [yamlFile, '.codecov.yml'].reduce(function(result, file) {
278+
query.yaml = [yamlFile, '.codecov.yml'].reduce(function (result, file) {
278279
return (
279280
result ||
280281
(fs.existsSync(path.resolve(process.cwd(), file))
@@ -382,14 +383,14 @@ var upload = function(args, on_success, on_failure) {
382383
if (!isWindows) {
383384
gcg = gcg
384385
.split(' ')
385-
.map(function(p) {
386+
.map(function (p) {
386387
return "-not -path '" + p + "'"
387388
})
388389
.join(' ')
389390
} else {
390391
gcg = gcg
391392
.split(' ')
392-
.map(function(p) {
393+
.map(function (p) {
393394
return '^| findstr /i /v ' + p
394395
})
395396
.join(' ')
@@ -493,10 +494,7 @@ var upload = function(args, on_success, on_failure) {
493494
if (more_patterns) {
494495
_findArgs.concat(more_patterns)
495496
}
496-
_files = execFileSync('find', _findArgs)
497-
.toString()
498-
.trim()
499-
.split('\n')
497+
_files = execFileSync('find', _findArgs).toString().trim().split('\n')
500498
} else {
501499
// @TODO support for a root directory
502500
// It's not straightforward due to the nature of the dir command
@@ -549,7 +547,7 @@ var upload = function(args, on_success, on_failure) {
549547
codecov_endpoint,
550548
query,
551549
upload,
552-
function() {
550+
function () {
553551
// remove files after Uploading
554552
if (args.options.clear) {
555553
for (var i = files.length - 1; i >= 0; i--) {
@@ -562,7 +560,7 @@ var upload = function(args, on_success, on_failure) {
562560
on_success.apply(this, arguments)
563561
}
564562
},
565-
on_failure || function() {}
563+
on_failure || function () {}
566564
)
567565
}
568566
}

package-lock.json

+9-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codecov",
3-
"version": "3.8.1",
3+
"version": "3.8.2",
44
"description": "Uploading report to Codecov: https://codecov.io",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)