Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 867c922

Browse files
authored
Merge pull request #289 from CoderDojo/chore/dep-updates
Chore/dep updates
2 parents 458145e + 8c5a556 commit 867c922

File tree

13 files changed

+858
-456
lines changed

13 files changed

+858
-456
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@
7171
"cross-env": "^4.0.0",
7272
"css-loader": "^0.28.0",
7373
"cypress": "^3.7.0",
74-
"eslint": "^3.19.0",
74+
"eslint": "^4.18.2",
7575
"eslint-config-airbnb-base": "^11.1.3",
7676
"eslint-friendly-formatter": "^2.0.7",
7777
"eslint-import-resolver-webpack": "^0.8.1",
78-
"eslint-loader": "^1.7.1",
78+
"eslint-loader": "^2.0.0",
7979
"eslint-plugin-cypress": "^2.7.0",
80-
"eslint-plugin-html": "^2.0.0",
80+
"eslint-plugin-html": "^3.0.0",
8181
"eslint-plugin-import": "^2.2.0",
8282
"eventsource-polyfill": "^0.9.6",
8383
"express": "^4.17.1",
@@ -104,7 +104,7 @@
104104
"mocha": "^3.2.0",
105105
"nodemon": "^1.17.5",
106106
"opn": "^4.0.2",
107-
"optimize-css-assets-webpack-plugin": "^1.3.0",
107+
"optimize-css-assets-webpack-plugin": "^2.0.0",
108108
"ora": "^1.2.0",
109109
"phantomjs-prebuilt": "^2.1.14",
110110
"po-loader": "^0.4.1",

src/dashboard/cd-dashboard-news.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
// },
7979
sortPostsByDate(posts) {
8080
const sortedPosts = posts.sort((a, b) =>
81-
b.date - a.date);
81+
b.date - a.date);
8282
return sortedPosts.map(post => Object.assign({
8383
formattedDate: post.date.utc().format('DD/MM/YYYY'),
8484
}, post));

src/dojos/manage-request-to-join.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
/* eslint-disable no-nested-ternary */
3434
return this.status === 'accept' && this.loaderIsVisible ?
3535
(this.ready ? this.userTypeString : 'Accepting the user...') :
36-
(this.status === 'refuse' && this.loaderIsVisible ?
37-
(this.ready ? 'The request to join your Dojo has been refused.' : 'Refusing this user from joining your Dojo...') :
38-
'Invalid action, try again or contact support.');
36+
(this.status === 'refuse' && this.loaderIsVisible ?
37+
(this.ready ? 'The request to join your Dojo has been refused.' : 'Refusing this user from joining your Dojo...') :
38+
'Invalid action, try again or contact support.');
3939
/* eslint-enable no-nested-ternary */
4040
},
4141
conflictUrl() {
@@ -102,7 +102,7 @@
102102
@brand-success: #5cb85c;
103103
@loader-size: 7em;
104104
@check-thickness: 0.5em;
105-
@loader-thickness: @check-thickness/2;
105+
@loader-thickness: @check-thickness/2;
106106
@check-height: @loader-size/2;
107107
@check-width: @check-height/2;
108108
@check-left: (@loader-size/6 + @loader-size/12 - @check-thickness/2);
@@ -133,14 +133,14 @@
133133
display: none;
134134
&--visible {
135135
display: block;
136-
}
136+
}
137137
&.draw:after {
138138
animation-duration: 800ms;
139139
animation-timing-function: ease;
140140
animation-name: checkmark;
141141
transform: scaleX(-1) rotate(135deg);
142142
}
143-
143+
144144
&:after {
145145
opacity: 1;
146146
height: @check-height;

src/events/cd-event-form.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,11 @@
301301
302302
if (eventId) {
303303
const event = (await EventsService.v3.load(
304-
eventId, {
305-
params: {
306-
related: 'sessions.tickets',
307-
},
308-
})).body;
304+
eventId, {
305+
params: {
306+
related: 'sessions.tickets',
307+
},
308+
})).body;
309309
310310
if (!event.newForm) {
311311
this.$router.push(`/dashboard/dojo/${dojoId}/event-form/${eventId}`);

src/events/event-store.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ const store = new Vuex.Store({
137137
moment().isoWeekday() <= neededDay
138138
? moment().isoWeekday(neededDay)
139139
: moment()
140-
.add(1, 'weeks')
141-
.isoWeekday(neededDay);
140+
.add(1, 'weeks')
141+
.isoWeekday(neededDay);
142142
}
143143

144144
state.eventDate = newDate.format('YYYY-MM-DD');

src/events/order/cd-event-add-child-ticket.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
<p class="gender-why" v-show="genderExplaination && errors.has(`gender-${id}:required`)">{{ $t(`We want to provide activities that appeal to people regardless of their gender.`) }}<br/>{{ $t(`To check how well we are succeeding, we'd like to find out whether people of different genders are equally likely to attend.`) }}</p>
3030

3131
<label class="cd-child-ticket__label">{{ $t('Ticket') }}</label>
32-
<div class="cd-child-ticket__ticket-selector">
32+
<div class="cd-child-ticket__ticket-selector">
3333
<multiselect v-model="selectedTickets" :options="childTickets" group-label="name" group-values="tickets" :multiple="true" :searchable="false" :group-select="false" :placeholder="$t('Select Event Tickets')" track-by="id" label="name" @close="onBlur" @open="onFocus" :data-vv-name="`tickets-${id}`" v-validate="'required'"></multiselect>
3434
</div>
35-
<p class="cd-child-ticket__ticket-select-err text-danger" v-show="errors.has(`tickets-${id}:required`)">{{ $t('Ticket selection is required') }}</p>
35+
<p class="cd-child-ticket__ticket-select-err text-danger" v-show="errors.has(`tickets-${id}:required`)">{{ $t('Ticket selection is required') }}</p>
3636

3737
<special-req-component class="cd-child-ticket__special-req-selector" v-model="notes"></special-req-component>
3838
</form>
@@ -96,9 +96,9 @@
9696
},
9797
async createChild() {
9898
return UserService.addChild(this.child)
99-
.then((response) => {
100-
this.userId = response.body.userId;
101-
});
99+
.then((response) => {
100+
this.userId = response.body.userId;
101+
});
102102
},
103103
},
104104
watch: {

src/users/cd-tickets.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
));
5555
this.events = (events.reduce((acc, dojoEvents) =>
5656
acc.concat(dojoEvents.body.results), []))
57-
.sort(EventUtils.orderByStartTime);
57+
.sort(EventUtils.orderByStartTime);
5858
},
5959
async loadUserDojos() {
6060
const res = await DojosService.getUsersDojos(this.currentUser.id);

src/users/cdf-manage.vue

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -143,18 +143,18 @@
143143
this.dojos = res[1].map(resp => resp.body);
144144
})
145145
// Split this function from the promise.all : CORS errors are hard to catch
146-
.then((async () => {
147-
if (this.user.email) {
148-
// TODO : once the forum integration is done back-end wise
149-
// we can fully automate from there
150-
try {
151-
this.forumUser = (await ForumService.user.search(this.user.email)).body;
152-
} catch (e) {
153-
// You might not have the forums running in development; and that's fine
154-
this.errors.add('forumUserNotFound', 'User not found');
146+
.then((async () => {
147+
if (this.user.email) {
148+
// TODO : once the forum integration is done back-end wise
149+
// we can fully automate from there
150+
try {
151+
this.forumUser = (await ForumService.user.search(this.user.email)).body;
152+
} catch (e) {
153+
// You might not have the forums running in development; and that's fine
154+
this.errors.add('forumUserNotFound', 'User not found');
155+
}
155156
}
156-
}
157-
})());
157+
})());
158158
} catch (e) {
159159
if ((e.status === 404 && e.body.message === '404 - "Invalid userId"') ||
160160
e.message === 'Invalid email') {

test/unit/specs/dashboard/cd-dashboard-news.spec.js

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ describe('Dashboard children component', () => {
2727
// ARRANGE
2828
const vm = vueUnitHelper(DashboardNewsComponentWithMocks);
2929
vm.news = [
30-
{ date: '2018-08-09T10:00:00.000Z', link: 'blah1', title: { rendered: 'blah1' } },
31-
{ date: '2018-08-10T10:00:00.000Z', link: 'blah2', title: { rendered: 'blah2' } },
32-
{ date: '2018-08-11T10:00:00.000Z', link: 'blah3', title: { rendered: 'blah3' } },
33-
{ date: '2018-08-12T10:00:00.000Z', link: 'blah4', title: { rendered: 'blah4' } },
34-
{ date: '2018-08-13T10:00:00.000Z', link: 'blah5', title: { rendered: 'blah5' } },
35-
{ date: '2018-08-14T10:00:00.000Z', link: 'blah6', title: { rendered: 'blah6' } },
36-
{ date: '2018-08-15T10:00:00.000Z', link: 'blah7', title: { rendered: 'blah7' } }];
30+
{ date: '2018-08-09T10:00:00.000Z', link: 'blah1', title: { rendered: 'blah1' } },
31+
{ date: '2018-08-10T10:00:00.000Z', link: 'blah2', title: { rendered: 'blah2' } },
32+
{ date: '2018-08-11T10:00:00.000Z', link: 'blah3', title: { rendered: 'blah3' } },
33+
{ date: '2018-08-12T10:00:00.000Z', link: 'blah4', title: { rendered: 'blah4' } },
34+
{ date: '2018-08-13T10:00:00.000Z', link: 'blah5', title: { rendered: 'blah5' } },
35+
{ date: '2018-08-14T10:00:00.000Z', link: 'blah6', title: { rendered: 'blah6' } },
36+
{ date: '2018-08-15T10:00:00.000Z', link: 'blah7', title: { rendered: 'blah7' } }];
3737

3838
vm.sortPostsByDate = sinon.stub().returns([
3939
{ type: 'News', date: moment('2018-08-15T10:00:00.000Z'), formattedDate: '15/08/2018', link: 'blah7', title: 'blah7' },
@@ -67,23 +67,23 @@ describe('Dashboard children component', () => {
6767
it('should return a formatted array of news posts', () => {
6868
// ARRANGE
6969
const mockFormattedNews = [
70-
{ type: 'News', date: moment('2018-08-09T10:00:00.000Z'), link: 'blah1', title: 'blah1' },
71-
{ type: 'News', date: moment('2018-08-10T10:00:00.000Z'), link: 'blah2', title: 'blah2' },
72-
{ type: 'News', date: moment('2018-08-11T10:00:00.000Z'), link: 'blah3', title: 'blah3' },
73-
{ type: 'News', date: moment('2018-08-12T10:00:00.000Z'), link: 'blah4', title: 'blah4' },
74-
{ type: 'News', date: moment('2018-08-13T10:00:00.000Z'), link: 'blah5', title: 'blah5' },
75-
{ type: 'News', date: moment('2018-08-14T10:00:00.000Z'), link: 'blah6', title: 'blah6' },
76-
{ type: 'News', date: moment('2018-08-15T10:00:00.000Z'), link: 'blah7', title: 'blah7' }];
70+
{ type: 'News', date: moment('2018-08-09T10:00:00.000Z'), link: 'blah1', title: 'blah1' },
71+
{ type: 'News', date: moment('2018-08-10T10:00:00.000Z'), link: 'blah2', title: 'blah2' },
72+
{ type: 'News', date: moment('2018-08-11T10:00:00.000Z'), link: 'blah3', title: 'blah3' },
73+
{ type: 'News', date: moment('2018-08-12T10:00:00.000Z'), link: 'blah4', title: 'blah4' },
74+
{ type: 'News', date: moment('2018-08-13T10:00:00.000Z'), link: 'blah5', title: 'blah5' },
75+
{ type: 'News', date: moment('2018-08-14T10:00:00.000Z'), link: 'blah6', title: 'blah6' },
76+
{ type: 'News', date: moment('2018-08-15T10:00:00.000Z'), link: 'blah7', title: 'blah7' }];
7777

7878
const vm = vueUnitHelper(DashboardNewsComponentWithMocks);
7979
vm.news = [
80-
{ date: '2018-08-09T10:00:00.000Z', link: 'blah1', title: { rendered: 'blah1' } },
81-
{ date: '2018-08-10T10:00:00.000Z', link: 'blah2', title: { rendered: 'blah2' } },
82-
{ date: '2018-08-11T10:00:00.000Z', link: 'blah3', title: { rendered: 'blah3' } },
83-
{ date: '2018-08-12T10:00:00.000Z', link: 'blah4', title: { rendered: 'blah4' } },
84-
{ date: '2018-08-13T10:00:00.000Z', link: 'blah5', title: { rendered: 'blah5' } },
85-
{ date: '2018-08-14T10:00:00.000Z', link: 'blah6', title: { rendered: 'blah6' } },
86-
{ date: '2018-08-15T10:00:00.000Z', link: 'blah7', title: { rendered: 'blah7' } }];
80+
{ date: '2018-08-09T10:00:00.000Z', link: 'blah1', title: { rendered: 'blah1' } },
81+
{ date: '2018-08-10T10:00:00.000Z', link: 'blah2', title: { rendered: 'blah2' } },
82+
{ date: '2018-08-11T10:00:00.000Z', link: 'blah3', title: { rendered: 'blah3' } },
83+
{ date: '2018-08-12T10:00:00.000Z', link: 'blah4', title: { rendered: 'blah4' } },
84+
{ date: '2018-08-13T10:00:00.000Z', link: 'blah5', title: { rendered: 'blah5' } },
85+
{ date: '2018-08-14T10:00:00.000Z', link: 'blah6', title: { rendered: 'blah6' } },
86+
{ date: '2018-08-15T10:00:00.000Z', link: 'blah7', title: { rendered: 'blah7' } }];
8787

8888
// ASSERT
8989
expect(vm.formattedNews).to.deep.equal(mockFormattedNews);
@@ -117,9 +117,9 @@ describe('Dashboard children component', () => {
117117
it('should load the latest news', async () => {
118118
// ARRANGE
119119
const mockNews = [
120-
{ date: '2018-08-09T', link: 'blah1', title: { rendered: 'blah1' } },
121-
{ date: '2018-08-10T', link: 'blah2', title: { rendered: 'blah2' } },
122-
{ date: '2018-08-11T', link: 'blah3', title: { rendered: 'blah3' } }];
120+
{ date: '2018-08-09T', link: 'blah1', title: { rendered: 'blah1' } },
121+
{ date: '2018-08-10T', link: 'blah2', title: { rendered: 'blah2' } },
122+
{ date: '2018-08-11T', link: 'blah3', title: { rendered: 'blah3' } }];
123123
MockUpdatesService.loadNews.resolves({ body: mockNews });
124124
const vm = vueUnitHelper(DashboardNewsComponentWithMocks);
125125

@@ -135,13 +135,13 @@ describe('Dashboard children component', () => {
135135
it('should sort the list of posts by date', async () => {
136136
// ARRANGE
137137
const posts = [
138-
{ type: 'News', date: moment('2018-08-10T10:00:00.000Z'), link: 'blah2', title: 'blah2' },
139-
{ type: 'News', date: moment('2018-08-12T10:00:00.000Z'), link: 'blah1', title: 'blah1' },
140-
{ type: 'News', date: moment('2018-08-15T10:00:00.000Z'), link: 'blah3', title: 'blah3' }];
138+
{ type: 'News', date: moment('2018-08-10T10:00:00.000Z'), link: 'blah2', title: 'blah2' },
139+
{ type: 'News', date: moment('2018-08-12T10:00:00.000Z'), link: 'blah1', title: 'blah1' },
140+
{ type: 'News', date: moment('2018-08-15T10:00:00.000Z'), link: 'blah3', title: 'blah3' }];
141141
const sortedPosts = [
142-
{ formattedDate: '15/08/2018', type: 'News', date: moment('2018-08-15T10:00:00.000Z').utc(), link: 'blah3', title: 'blah3' },
143-
{ formattedDate: '12/08/2018', type: 'News', date: moment('2018-08-12T10:00:00.000Z').utc(), link: 'blah1', title: 'blah1' },
144-
{ formattedDate: '10/08/2018', type: 'News', date: moment('2018-08-10T10:00:00.000Z').utc(), link: 'blah2', title: 'blah2' }];
142+
{ formattedDate: '15/08/2018', type: 'News', date: moment('2018-08-15T10:00:00.000Z').utc(), link: 'blah3', title: 'blah3' },
143+
{ formattedDate: '12/08/2018', type: 'News', date: moment('2018-08-12T10:00:00.000Z').utc(), link: 'blah1', title: 'blah1' },
144+
{ formattedDate: '10/08/2018', type: 'News', date: moment('2018-08-10T10:00:00.000Z').utc(), link: 'blah2', title: 'blah2' }];
145145

146146
const vm = vueUnitHelper(DashboardNewsComponentWithMocks);
147147

test/unit/specs/dojos/service.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ describe('Dojos Service', () => {
194194
});
195195
describe('membership:loadPending', () => {
196196
it('should transform a request to join into a membership', async () => {
197-
// ARRANGE
197+
// ARRANGE
198198
const dojoId = 'd1';
199199
const requestId = 'rq1';
200200

0 commit comments

Comments
 (0)