Skip to content

Commit 40d0ea0

Browse files
author
Raphael Benitte
committed
chore(upgrade): upgrade outdated packages
1 parent 70c9123 commit 40d0ea0

13 files changed

+113
-87
lines changed

package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,36 +26,36 @@
2626
},
2727
"dependencies": {
2828
"babelify": "7.2.0",
29-
"babel-core": "6.7.2",
29+
"babel-core": "6.7.6",
3030
"babel-preset-es2015": "6.6.0",
3131
"babel-preset-react": "6.5.0",
32-
"bluebird": "3.3.4",
32+
"bluebird": "3.3.5",
3333
"chalk": "1.1.3",
34-
"convict": "^0.6.1",
35-
"lodash": "4.6.1",
36-
"moment": "^2.10.3",
37-
"moment-duration-format": "^1.3.0",
34+
"convict": "1.2.0",
35+
"lodash": "4.10.0",
36+
"moment": "2.12.0",
37+
"moment-duration-format": "1.3.0",
3838
"react-mixin": "3.0.4",
39-
"reflux": "0.4.0",
39+
"reflux": "0.4.1",
4040
"superagent": "1.8.3",
4141
"superagent-bluebird-promise": "3.0.0"
4242
},
4343
"devDependencies": {
44-
"ava": "0.13.0",
45-
"babel-eslint": "5.0.0",
44+
"ava": "0.14.0",
45+
"babel-eslint": "6.0.2",
4646
"babel-register": "6.7.2",
47-
"coveralls": "2.11.8",
48-
"enzyme": "2.1.0",
49-
"eslint": "2.2.0",
50-
"eslint-plugin-react": "4.2.2",
51-
"mockery": "1.4.1",
52-
"nock": "7.7.2",
53-
"nyc": "6.1.1",
47+
"coveralls": "2.11.9",
48+
"enzyme": "2.2.0",
49+
"eslint": "2.7.0",
50+
"eslint-plugin-react": "4.3.0",
51+
"mockery": "1.5.1",
52+
"nock": "8.0.0",
53+
"nyc": "6.4.0",
5454
"react": "^0.13.3",
5555
"sinon": "1.17.3"
5656
},
5757
"peerDependencies": {
58-
"mozaik": ">=1.1.0",
58+
"mozaik": ">=1.4.2",
5959
"react": "^0.13.3"
6060
},
6161
"scripts": {

src/components/IssueLabelsDonut.jsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@ class IssueLabelsDonut extends Component {
1616
}
1717

1818
getApiRequest() {
19-
let { repository } = this.props;
19+
const { repository } = this.props;
2020

2121
return {
2222
id: `github.issues.${ repository }`,
23-
params: {
24-
repository: repository
25-
}
23+
params: { repository }
2624
};
2725
}
2826

@@ -85,4 +83,5 @@ IssueLabelsDonut.propTypes = {
8583
reactMixin(IssueLabelsDonut.prototype, ListenerMixin);
8684
reactMixin(IssueLabelsDonut.prototype, Mozaik.Mixin.ApiConsumer);
8785

88-
export { IssueLabelsDonut as default };
86+
87+
export default IssueLabelsDonut;

src/components/PullRequestsGauge.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ class PullRequestsGauge extends Component {
6060
</div>
6161
<div className="widget__body">
6262
<div className="github__pull-requests_gauge_chart">
63-
<Gauge ranges={normThresholds} value={pullRequests.length}/>
63+
<Gauge
64+
donutRatio={0.65}
65+
spacing={{ top: 45, right: 45, left: 45 }}
66+
ranges={normThresholds}
67+
value={pullRequests.length}
68+
/>
6469
</div>
6570
<div className="github__pull-requests_gauge_message">
6671
{message}

src/components/UserBadge.jsx

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,46 @@ class UserBadge extends Component {
4444
</span>
4545
</div>
4646
<div className="github__user-badge__info">
47-
<div className="github__user-badge__info__item">
48-
<span className="count">{this.state.user.public_repos}</span>&nbsp;
49-
public repos
50-
</div>
51-
<div className="github__user-badge__info__item">
52-
<span className="count">{this.state.user.public_gists}</span>&nbsp;
53-
public gists
54-
</div>
55-
<div className="github__user-badge__info__item">
56-
<span className="count">{this.state.user.followers}</span>&nbsp;
57-
followers
58-
</div>
59-
<div className="github__user-badge__info__item">
60-
<span className="count">{this.state.user.following}</span>&nbsp;
61-
following
62-
</div>
63-
<div className="github__user-badge__info__item">
64-
company:&nbsp;
65-
<span className="prop__value">{this.state.user.company}</span>
66-
</div>
47+
<span className="label__group">
48+
<span className="label__addon">
49+
{this.state.user.public_repos}
50+
</span>
51+
<span className="label">
52+
public repos
53+
</span>
54+
</span>
55+
<span className="label__group">
56+
<span className="label__addon">
57+
{this.state.user.public_gists}
58+
</span>
59+
<span className="label">
60+
public gists
61+
</span>
62+
</span>
63+
<span className="label__group">
64+
<span className="label__addon">
65+
{this.state.user.followers}
66+
</span>
67+
<span className="label">
68+
followers
69+
</span>
70+
</span>
71+
<span className="label__group">
72+
<span className="label__addon">
73+
{this.state.user.following}
74+
</span>
75+
<span className="label">
76+
following
77+
</span>
78+
</span>
79+
<span className="label__group">
80+
<span className="label">
81+
company
82+
</span>
83+
<span className="label__addon">
84+
{this.state.user.company}
85+
</span>
86+
</span>
6787
</div>
6888
</div>
6989
);

styl/_pull-requests-gauge.styl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
.github__pull-requests_gauge
22
position relative
33

4+
.widget__body
5+
overflow-y hidden
6+
47
&_chart
5-
height 110%
8+
height 95%
69

710
&_message
8-
height 18%
911
text-align center
1012
position absolute
11-
bottom 0
12-
left 0
13-
right 0
14-
line-height 1.25
13+
bottom 1.6vmin
14+
left 0
15+
right 0

styl/_user-badge.styl

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
.github__user-badge
22
.widget__body
3-
display -webkit-flex
3+
padding 1.6vmin
44
display flex
5-
-webkit-justify-content center
6-
justify-content center
7-
-webkit-align-items stretch
8-
align-items stretch
9-
align-content stretch
10-
-webkit-flex-direction column
11-
flex-direction column
5+
justify-content center
6+
align-content stretch
7+
flex-direction column
128

139
img
1410
max-width 100%
@@ -33,9 +29,14 @@
3329
display inline-block
3430

3531
&__info
36-
flex-shrink 1
32+
display flex
33+
flex-wrap wrap
34+
justify-content space-between
35+
36+
.label__group
37+
width 48%
38+
margin-bottom 1vmin
3739

38-
&__item
39-
width 50%
40-
float left
41-
padding 5px 15px
40+
&:last-child
41+
width 100%
42+
margin-bottom 0

test/client.test.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ test('organization', t => {
6262

6363
return client.organization({ organization })
6464
.then(orgData => {
65-
t.same(orgData, sampleOrganization);
66-
t.ok(mozaik.logger.info.calledOnce);
65+
t.deepEqual(orgData, sampleOrganization);
66+
t.truthy(mozaik.logger.info.calledOnce);
6767
t.is(mozaik.logger.info.getCall(0).args[0], `[github] calling ${githubBaseUrl}/orgs/${organization}`);
6868
})
6969
;
@@ -82,8 +82,8 @@ test('user', t => {
8282

8383
return client.user({ user })
8484
.then(userData => {
85-
t.same(userData, sampleUser);
86-
t.ok(mozaik.logger.info.calledOnce);
85+
t.deepEqual(userData, sampleUser);
86+
t.truthy(mozaik.logger.info.calledOnce);
8787
t.is(mozaik.logger.info.getCall(0).args[0], `[github] calling ${githubBaseUrl}/users/${user}`);
8888
})
8989
;
@@ -102,8 +102,8 @@ test('pullRequests', t => {
102102

103103
return client.pullRequests({ repository })
104104
.then(pullRequestsData => {
105-
t.same(pullRequestsData, samplePullRequests);
106-
t.ok(mozaik.logger.info.calledOnce);
105+
t.deepEqual(pullRequestsData, samplePullRequests);
106+
t.truthy(mozaik.logger.info.calledOnce);
107107
t.is(mozaik.logger.info.getCall(0).args[0], `[github] calling ${githubBaseUrl}/repos/${repository}/pulls`);
108108
})
109109
;
@@ -123,8 +123,8 @@ test('branch', t => {
123123

124124
return client.branch({ repository, branch })
125125
.then(branchData => {
126-
t.same(branchData, sampleBranch);
127-
t.ok(mozaik.logger.info.calledOnce);
126+
t.deepEqual(branchData, sampleBranch);
127+
t.truthy(mozaik.logger.info.calledOnce);
128128
t.is(mozaik.logger.info.getCall(0).args[0], `[github] calling ${githubBaseUrl}/repos/${repository}/branches/${branch}`);
129129
})
130130
;
@@ -143,8 +143,8 @@ test('repositoryContributorsStats', t => {
143143

144144
return client.repositoryContributorsStats({ repository })
145145
.then(contribsData => {
146-
t.same(contribsData, sampleContribs);
147-
t.ok(mozaik.logger.info.calledOnce);
146+
t.deepEqual(contribsData, sampleContribs);
147+
t.truthy(mozaik.logger.info.calledOnce);
148148
t.is(mozaik.logger.info.getCall(0).args[0], `[github] calling ${githubBaseUrl}/repos/${repository}/stats/contributors`);
149149
})
150150
;
@@ -163,8 +163,8 @@ test('issues', t => {
163163

164164
return client.issues({ repository })
165165
.then(issuesData => {
166-
t.same(issuesData, sampleIssues);
167-
t.ok(mozaik.logger.info.calledOnce);
166+
t.deepEqual(issuesData, sampleIssues);
167+
t.truthy(mozaik.logger.info.calledOnce);
168168
t.is(mozaik.logger.info.getCall(0).args[0], `[github] calling ${githubBaseUrl}/repos/${repository}/issues`);
169169
})
170170
;
@@ -183,8 +183,8 @@ test('status', t => {
183183

184184
return client.status()
185185
.then(statusData => {
186-
t.same(statusData, sampleStatus);
187-
t.ok(mozaik.logger.info.calledOnce);
186+
t.deepEqual(statusData, sampleStatus);
187+
t.truthy(mozaik.logger.info.calledOnce);
188188
t.is(mozaik.logger.info.getCall(0).args[0], `[github] calling ${statusUrl}`);
189189
})
190190
;

test/components/Branches.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ test.after(t => {
3535
test('should return correct api request', t => {
3636
const wrapper = shallow(<Branches repository={sampleRepository} />);
3737

38-
t.same(wrapper.instance().getApiRequest(), {
38+
t.deepEqual(wrapper.instance().getApiRequest(), {
3939
id: `github.branches.${sampleRepository}`,
4040
params: { repository: sampleRepository }
4141
});

test/components/OrganizationBadge.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ test.after('after hook', () => {
2929
test('should return correct api request', t => {
3030
const wrapper = shallow(<OrganizationBadge organization={sampleOrganization} />);
3131

32-
t.same(wrapper.instance().getApiRequest(), {
32+
t.deepEqual(wrapper.instance().getApiRequest(), {
3333
id: `github.organization.${sampleOrganization}`,
3434
params: { organization: sampleOrganization }
3535
});

test/components/PullRequests.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ test.after(t => {
5252
test('should return correct api request', t => {
5353
const wrapper = shallow(<PullRequests repository={sampleRepository} />);
5454

55-
t.same(wrapper.instance().getApiRequest(), {
55+
t.deepEqual(wrapper.instance().getApiRequest(), {
5656
id: `github.pullRequests.${sampleRepository}`,
5757
params: { repository: sampleRepository }
5858
});

0 commit comments

Comments
 (0)