Skip to content

Commit 2d47762

Browse files
authored
Merge pull request #47 from seegno/support/dependencies
Update project dependencies
2 parents 788f541 + 1c6c46d commit 2d47762

File tree

5 files changed

+1580
-1447
lines changed

5 files changed

+1580
-1447
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
language: node_js
22

33
node_js:
4-
- "6.0.0"
5-
- "8.0.0"
4+
- "6.14.0"
5+
- "8.10.0"
6+
- "node"
67

78
after_success:
89
- yarn coveralls

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,31 +45,31 @@
4545
"lint-staged"
4646
],
4747
"dependencies": {
48+
"@octokit/rest": "^15.9.2",
4849
"bluebird": "^3.3.1",
4950
"fs": "^0.0.2",
50-
"github": "^11.0.0",
51-
"inquirer": "^3.0.6",
52-
"lodash": "^4.3.0",
51+
"inquirer": "^6.0.0",
52+
"lodash": "4.17.10",
5353
"prettyjson": "^1.1.3",
54-
"yargs": "^8.0.2"
54+
"yargs": "^11.0.0"
5555
},
5656
"devDependencies": {
5757
"babel-cli": "^6.4.0",
58-
"babel-jest": "^19.0.0",
59-
"babel-plugin-module-resolver": "^2.7.1",
58+
"babel-jest": "^23.2.0",
59+
"babel-plugin-module-resolver": "^3.1.1",
6060
"babel-preset-es2015-node": "^6.1.1",
6161
"babel-preset-stage-1": "^6.24.1",
62-
"coveralls": "^2.13.1",
63-
"eslint": "4.18.1",
62+
"coveralls": "^3.0.1",
63+
"eslint": "5.0.1",
6464
"eslint-config-seegno": "10.0.0",
6565
"faker": "^4.1.0",
66-
"jest": "^20.0.4",
66+
"jest": "^23.2.0",
6767
"lint-staged": "7.2.0",
6868
"pre-commit": "^1.2.2",
6969
"standard-http-error": "^2.0.0"
7070
},
7171
"engines": {
72-
"node": ">=6"
72+
"node": "^6.14.0 || ^8.10.0 || >=9.10.0"
7373
},
7474
"jest": {
7575
"coverageDirectory": "coverage",

src/client.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44
*/
55

66
import { differenceBy, get, has } from 'lodash';
7-
import Github from 'github';
7+
import Github from '@octokit/rest';
88

99
/**
1010
* GitHub configuration.
1111
*/
1212

1313
const config = {
1414
debug: false,
15-
host: 'api.github.com',
16-
protocol: 'https',
1715
timeout: 5000,
1816
version: '3.0.0'
1917
};
@@ -137,8 +135,8 @@ export default class Client {
137135

138136
return await this.github.issues.updateLabel({
139137
color,
138+
current_name: name, // eslint-disable-line id-match
140139
name,
141-
oldname: name,
142140
owner,
143141
repo
144142
});

test/client.test.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
*/
55

66
import Client from 'client';
7-
import Github from 'github';
7+
import Github from '@octokit/rest';
88
import HttpError from 'standard-http-error';
99

1010
/**
1111
* Jest mocks.
1212
*/
1313

14-
jest.mock('github');
14+
jest.mock('@octokit/rest');
1515

1616
/**
1717
* Test `Client`.
@@ -231,7 +231,12 @@ describe('Client', () => {
231231
client.updateLabel(repository, 'foo', 'bar');
232232

233233
expect(client.github.issues.updateLabel).toHaveBeenCalledTimes(1);
234-
expect(client.github.issues.updateLabel).toHaveBeenCalledWith({ ...repositoryOptions, color: 'bar', name: 'foo', oldname: 'foo' });
234+
expect(client.github.issues.updateLabel).toHaveBeenCalledWith({
235+
...repositoryOptions,
236+
color: 'bar',
237+
current_name: 'foo', // eslint-disable-line id-match
238+
name: 'foo'
239+
});
235240
});
236241
});
237242

0 commit comments

Comments
 (0)