Comparing version
var fs = require('fs') | ||
var path = require('path') | ||
var request = require('request') | ||
var request = require('teeny-request').teenyRequest | ||
var urlgrey = require('urlgrey') | ||
@@ -149,7 +149,8 @@ var jsYaml = require('js-yaml') | ||
// Direct to Codecov | ||
request.post( | ||
request( | ||
{ | ||
url: urlgrey(codecov_endpoint + '/upload/v2') | ||
uri: urlgrey(codecov_endpoint + '/upload/v2') | ||
.query(query) | ||
.toString(), | ||
method: 'POST', | ||
body: upload_body, | ||
@@ -184,7 +185,8 @@ headers: { | ||
// Direct to S3 | ||
request.post( | ||
request( | ||
{ | ||
url: urlgrey(codecov_endpoint + '/upload/v4') | ||
uri: urlgrey(codecov_endpoint + '/upload/v4') | ||
.query(query) | ||
.toString(), | ||
method: 'POST', | ||
body: '', | ||
@@ -207,5 +209,6 @@ headers: { | ||
var codecov_report_url = result.split('\n')[0] | ||
request.put( | ||
request( | ||
{ | ||
url: result.split('\n')[1], | ||
uri: result.split('\n')[1], | ||
method: 'PUT', | ||
body: upload_body, | ||
@@ -305,4 +308,5 @@ headers: { | ||
try { | ||
var loadedYamlFile = jsYaml.safeLoad(fs.readFileSync(query.yaml, 'utf8')) | ||
yamlToken = loadedYamlFile && loadedYamlFile.codecov && loadedYamlFile.codecov.token | ||
var loadedYamlFile = jsYaml.safeLoad(fs.readFileSync(query.yaml, 'utf8')) | ||
yamlToken = | ||
loadedYamlFile && loadedYamlFile.codecov && loadedYamlFile.codecov.token | ||
} catch (e) { | ||
@@ -309,0 +313,0 @@ // silently fail |
@@ -5,2 +5,3 @@ var services = { | ||
buildkite: require('./services/buildkite'), | ||
azurePipelines: require('./services/azurePipelines'), | ||
codeship: require('./services/codeship'), | ||
@@ -7,0 +8,0 @@ drone: require('./services/drone'), |
{ | ||
"name": "codecov", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"description": "Uploading report to Codecov: https://codecov.io", | ||
@@ -15,3 +15,8 @@ "main": "index.js", | ||
}, | ||
"keywords": ["coverage", "code-coverage", "codecov.io", "codecov"], | ||
"keywords": [ | ||
"coverage", | ||
"code-coverage", | ||
"codecov.io", | ||
"codecov" | ||
], | ||
"bin": { | ||
@@ -33,3 +38,3 @@ "codecov": "./bin/codecov" | ||
"js-yaml": "^3.12.0", | ||
"request": "^2.87.0", | ||
"teeny-request": "^3.7.0", | ||
"urlgrey": "^0.4.4" | ||
@@ -49,5 +54,11 @@ }, | ||
"lint-staged": { | ||
"**/*.js": ["prettier --write --parser=babylon", "git add"], | ||
"**/*.json": ["prettier --write --parser=json", "git add"] | ||
"**/*.js": [ | ||
"prettier --write --parser=babylon", | ||
"git add" | ||
], | ||
"**/*.json": [ | ||
"prettier --write --parser=json", | ||
"git add" | ||
] | ||
} | ||
} |
@@ -13,7 +13,11 @@ # Codecov NodeJS Uploader | ||
## Installation: | ||
Add the latest version of `codecov` to your package.json: | ||
``` | ||
npm install codecov --save-dev | ||
``` | ||
or | ||
``` | ||
@@ -32,2 +36,3 @@ yarn add codecov --dev | ||
#### Upload repo tokens | ||
> Repo tokens are **not** required for public repos tested on Travis-Org, CircleCI or AppVeyor. | ||
@@ -68,12 +73,8 @@ | ||
[travis-url]: https://travis-ci.org/codecov/codecov-node | ||
[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 | ||
@@ -91,2 +92,3 @@ [devdepstat-image]: https://img.shields.io/david/dev/codecov/codecov-node/master.svg | ||
## Change Log | ||
- v2.0.0 No longer supports node v0.10 because of the execSync. | ||
@@ -103,1 +105,3 @@ - v2.0.1 Publish as latest instead of next. | ||
- v3.0.4 Security fixes | ||
- v3.1.0 Custom yaml file. Allow codecov token from yml file. | ||
- v3.2.0 Added azure pipelines |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 9 instances in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
61678
3.59%51
4.08%1714
3.32%103
4.04%191
4.95%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed