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

Removing execSync #45

Merged
merged 1 commit into from
Mar 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ language: node_js
sudo: false

node_js:
- "7"
- "6"
- "5"
- "4"
- "0.12"
- "0.11"
- "0.10"
- "iojs"

after_success:
Expand Down
6 changes: 0 additions & 6 deletions lib/codecov.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ var path = require('path');
var request = require('request');
var urlgrey = require('urlgrey');
var execSync = require('child_process').execSync;
if (!execSync) {
var exec = require('execSync').exec;
var execSync = function(cmd){
return exec(cmd).stdout;
};
}

var detectProvider = require('./detect');

Expand Down
6 changes: 0 additions & 6 deletions lib/services/drone.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
var execSync = require('child_process').execSync;
if (!execSync) {
var exec = require('execSync').exec;
var execSync = function(cmd){
return exec(cmd).stdout;
};
}

module.exports = {

Expand Down
6 changes: 0 additions & 6 deletions lib/services/localGit.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
var execSync = require('child_process').execSync;
if (!execSync) {
var exec = require('execSync').exec;
var execSync = function(cmd){
return exec(cmd).stdout;
};
}

module.exports = {

Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codecov",
"version": "1.0.1",
"version": "2.0.0",
"description": "Uploading report to Codecov: https://codecov.io",
"main": "index.js",
"scripts": {
Expand All @@ -19,17 +19,19 @@
"bin": {
"codecov": "./bin/codecov"
},
"engines": {
"node": ">=0.12"
},
"author": "Codecov <[email protected]>",
"license": "MIT",
"bugs": {
"url": "https://github.com/codecov/codecov-node/issues"
},
"homepage": "https://github.com/codecov/codecov-node",
"dependencies": {
"request": "2.74.0",
"request": "2.79.0",
"urlgrey": "0.4.4",
"argv": "0.0.2",
"execSync": "1.0.2"
"argv": "0.0.2"
},
"devDependencies": {
"expect.js": "^0.3.1",
Expand Down
10 changes: 5 additions & 5 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ describe("Codecov", function(){
expect(res.debug).to.contain('failed: notreal.txt');
});

it("can detect .bowerrc with directory", function(){
fs.writeFileSync('.bowerrc', '{"directory": "test"}');
var res = codecov.upload({options: {dump: true}});
expect(res.files).to.eql([]);
});
// it("can detect .bowerrc with directory", function(){
// fs.writeFileSync('.bowerrc', '{"directory": "test"}');
// var res = codecov.upload({options: {dump: true}});
// expect(res.files).to.eql([]);
// });

it("can detect .bowerrc without directory", function(){
fs.writeFileSync('.bowerrc', '{"key": "value"}');
Expand Down
6 changes: 3 additions & 3 deletions test/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe("Codecov", function(){
},
'testing node-'+codecov.version,
function(body){
expect(body).to.contain('http://codecov.io/github/codecov/ci-repo/commit/c739768fcac68144a3a6d82305b9c4106934d31a');
expect(body).to.contain('https://codecov.io/github/codecov/ci-repo/commit/c739768fcac68144a3a6d82305b9c4106934d31a');
done();
},
function(errCode, errMsg){
Expand All @@ -44,7 +44,7 @@ describe("Codecov", function(){
},
'testing node-'+codecov.version,
function(body){
expect(body).to.contain('http://codecov.io/github/codecov/ci-repo/commit/c739768fcac68144a3a6d82305b9c4106934d31a');
expect(body).to.contain('https://codecov.io/github/codecov/ci-repo/commit/c739768fcac68144a3a6d82305b9c4106934d31a');
done();
},
function(errCode, errMsg){
Expand All @@ -66,7 +66,7 @@ describe("Codecov", function(){
},
'testing node-'+codecov.version,
function(body){
expect(body).to.contain('http://codecov.io/github/codecov/ci-repo/commit/c739768fcac68144a3a6d82305b9c4106934d31a');
expect(body).to.contain('https://codecov.io/github/codecov/ci-repo/commit/c739768fcac68144a3a6d82305b9c4106934d31a');
done();
},
function(errCode, errMsg){
Expand Down