Skip to content

Commit 4dd50f2

Browse files
committed
Upgrade all dependencies, export typescript interfaces, switch to yarn
1 parent 1054336 commit 4dd50f2

29 files changed

+2341
-111
lines changed

.editorconfig

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
# EditorConfig is awesome: http://EditorConfig.org
2-
3-
# top-most EditorConfig file
41
root = true
52

6-
# Unix-style newlines with a newline ending every file
73
[*]
84
end_of_line = lf
95
insert_final_newline = true
106
indent_style = space
117
indent_size = 3
128
trim_trailing_whitespace = true
139

14-
# but not for markdown files since there it can be a line break
10+
[*.json]
11+
indent_size = 2
12+
1513
[*.md]
1614
trim_trailing_whitespace = false

.travis.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
language: node_js
22

33
node_js:
4-
- "6"
4+
- "8"
55

66
install:
7-
- npm install
8-
9-
before_script:
10-
- npm install grunt-cli -g
7+
- yarn install
118

129
script:
1310
- grunt test

GruntFile.js

-64
This file was deleted.

package.json

+14-11
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,11 @@
1010
}
1111
],
1212
"dependencies": {
13-
"debug": "^3.1.0"
13+
"debug": "^4.0.1"
1414
},
1515
"devDependencies": {
16-
"grunt": "~0.4.1",
17-
"grunt-contrib-clean": "^1.0.0",
18-
"grunt-contrib-copy": "^1.0.0",
19-
"grunt-contrib-nodeunit": "^0.4.1",
20-
"grunt-release-steps": "~0.3.7",
21-
"nodeunit": "^0.9.1",
22-
"sinon": "^1.15.4"
16+
"nodeunit": "^0.11.3",
17+
"sinon": "^6.3.3"
2318
},
2419
"keywords": [
2520
"git",
@@ -28,9 +23,17 @@
2823
],
2924
"license": "MIT",
3025
"repository": "git://github.com/steveukx/git-js.git",
31-
"main": "src/index.js",
32-
"bin": {},
26+
"main": "./src/index.js",
27+
"types": "./typings/promise/index.d.ts",
28+
"files": [
29+
"src/",
30+
"typings/"
31+
],
3332
"scripts": {
34-
"test": "node node_modules/nodeunit/bin/nodeunit test/unit/"
33+
"test": "nodeunit test/**/test*.js ",
34+
"test:unit": "nodeunit test/unit/test*.js",
35+
"test:integration": "nodeunit test/integration/test*.js",
36+
"preversion": "npm test",
37+
"postversion": "git push && git push --tags"
3538
}
3639
}

test/unit/test-branch.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function testBranchDelete (test, options, err, branchSummary) {
2626

2727
exports.setUp = function (done) {
2828
restore();
29-
sandbox = sinon.sandbox.create();
29+
sandbox = sinon.createSandbox();
3030
done();
3131
};
3232

test/unit/test-catfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var git, sandbox;
88

99
exports.setUp = function (done) {
1010
setup.restore();
11-
sandbox = sinon.sandbox.create();
11+
sandbox = sinon.createSandbox();
1212
done();
1313
};
1414

test/unit/test-check-is-repo.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let git, sandbox;
77

88
exports.setUp = function (done) {
99
restore();
10-
sandbox = sinon.sandbox.create();
10+
sandbox = sinon.createSandbox();
1111
sandbox.stub(console, 'error');
1212
done();
1313
};

test/unit/test-clean.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let git, sandbox;
77

88
exports.setUp = function (done) {
99
restore();
10-
sandbox = sinon.sandbox.create();
10+
sandbox = sinon.createSandbox();
1111
done();
1212
};
1313

test/unit/test-clone.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var git, sandbox;
77

88
exports.setUp = function (done) {
99
restore();
10-
sandbox = sinon.sandbox.create();
10+
sandbox = sinon.createSandbox();
1111
done();
1212
};
1313

test/unit/test-commands.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const {Instance, childProcessEmits, closeWith, errorWith, theCommandRun, theEnvi
99
require('./include/setup');
1010

1111
exports.setUp = function (done) {
12-
sandbox = sinon.sandbox.create();
12+
sandbox = sinon.createSandbox();
1313
restore();
1414
done();
1515
};

test/unit/test-commit.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var CommitSummary = require('../../src/responses/CommitSummary');
1010

1111
exports.setUp = function (done) {
1212
setup.restore();
13-
sandbox = sinon.sandbox.create();
13+
sandbox = sinon.createSandbox();
1414
done();
1515
};
1616

test/unit/test-cwd.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let git, sandbox;
77

88
exports.setUp = function (done) {
99
restore();
10-
sandbox = sinon.sandbox.create();
10+
sandbox = sinon.createSandbox();
1111
done();
1212
};
1313

test/unit/test-fetch.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var git, sandbox;
88

99
exports.setUp = function (done) {
1010
setup.restore();
11-
sandbox = sinon.sandbox.create();
11+
sandbox = sinon.createSandbox();
1212
done();
1313
};
1414

test/unit/test-git.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var git, sandbox;
88

99
exports.setUp = function (done) {
1010
restore();
11-
sandbox = sinon.sandbox.create();
11+
sandbox = sinon.createSandbox();
1212
done();
1313
};
1414

test/unit/test-log.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ let git, sandbox;
1010

1111
exports.setUp = function (done) {
1212
restore();
13-
sandbox = sinon.sandbox.create();
13+
sandbox = sinon.createSandbox();
1414
sandbox.stub(console, 'warn');
1515
done();
1616
};

test/unit/test-merge.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var git, sandbox;
88

99
exports.setUp = function (done) {
1010
restore();
11-
sandbox = sinon.sandbox.create();
11+
sandbox = sinon.createSandbox();
1212
sandbox.stub(console, 'error');
1313
done();
1414
};

test/unit/test-mv.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const renaming = (from, to) => `Renaming ${from} to ${to}`;
1010

1111
exports.setUp = function (done) {
1212
restore();
13-
sandbox = sinon.sandbox.create();
13+
sandbox = sinon.createSandbox();
1414
done();
1515
};
1616

test/unit/test-pull.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var git, sandbox;
88

99
exports.setUp = function (done) {
1010
restore();
11-
sandbox = sinon.sandbox.create();
11+
sandbox = sinon.createSandbox();
1212
done();
1313
};
1414

test/unit/test-push.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var git, sandbox;
77

88
exports.setUp = function (done) {
99
setup.restore();
10-
sandbox = sinon.sandbox.create();
10+
sandbox = sinon.createSandbox();
1111
done();
1212
};
1313

test/unit/test-raw.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let git, sandbox;
77

88
exports.setUp = function (done) {
99
restore();
10-
sandbox = sinon.sandbox.create();
10+
sandbox = sinon.createSandbox();
1111
sandbox.stub(console, 'warn');
1212
done();
1313
};

test/unit/test-rebase.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var git, sandbox;
77

88
exports.setUp = function (done) {
99
setup.restore();
10-
sandbox = sinon.sandbox.create();
10+
sandbox = sinon.createSandbox();
1111
done();
1212
};
1313

test/unit/test-remote.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let git, sandbox;
77

88
exports.setUp = function (done) {
99
restore();
10-
sandbox = sinon.sandbox.create();
10+
sandbox = sinon.createSandbox();
1111
sandbox.stub(console, 'error');
1212
done();
1313
};

test/unit/test-revert.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var git, sandbox;
77

88
exports.setUp = function (done) {
99
setup.restore();
10-
sandbox = sinon.sandbox.create();
10+
sandbox = sinon.createSandbox();
1111
done();
1212
};
1313

test/unit/test-stash-list.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let git, sandbox;
88

99
exports.setUp = function (done) {
1010
restore();
11-
sandbox = sinon.sandbox.create();
11+
sandbox = sinon.createSandbox();
1212
done();
1313
};
1414

test/unit/test-stash.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var git, sandbox;
77

88
exports.setUp = function (done) {
99
setup.restore();
10-
sandbox = sinon.sandbox.create();
10+
sandbox = sinon.createSandbox();
1111
done();
1212
};
1313

test/unit/test-status.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var git, sandbox;
88

99
exports.setUp = function (done) {
1010
setup.restore();
11-
sandbox = sinon.sandbox.create();
11+
sandbox = sinon.createSandbox();
1212
done();
1313
};
1414

test/unit/test-tags.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var git, sandbox;
88

99
exports.setUp = function (done) {
1010
setup.restore();
11-
sandbox = sinon.sandbox.create();
11+
sandbox = sinon.createSandbox();
1212
done();
1313
};
1414

typings/response.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ export interface RemoteWithoutRefs {
9797
name: string;
9898
}
9999

100-
interface RemoteWithRefs extends RemoteWithoutRefs {
100+
export interface RemoteWithRefs extends RemoteWithoutRefs {
101101
refs: {
102-
fetch: string
103-
push: string
102+
fetch: string;
103+
push: string;
104104
}
105105
}
106106

0 commit comments

Comments
 (0)