Skip to content

Commit 3a0470b

Browse files
authored
chore(deps): update deps and fix lint (#3833)
1 parent c1d396a commit 3a0470b

File tree

12 files changed

+39
-38
lines changed

12 files changed

+39
-38
lines changed

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,19 @@
3535
"runkitExampleFilename": "./docs/examples/ping.js",
3636
"unpkg": "./webpack/discord.min.js",
3737
"dependencies": {
38-
"@discordjs/collection": "^0.1.1",
38+
"@discordjs/collection": "^0.1.5",
3939
"abort-controller": "^3.0.0",
40-
"form-data": "^2.3.3",
41-
"node-fetch": "^2.3.0",
42-
"prism-media": "^1.0.0",
40+
"form-data": "^3.0.0",
41+
"node-fetch": "^2.6.0",
42+
"prism-media": "^1.2.0",
4343
"setimmediate": "^1.0.5",
44-
"tweetnacl": "^1.0.1",
45-
"ws": "^7.2.0"
44+
"tweetnacl": "^1.0.3",
45+
"ws": "^7.2.1"
4646
},
4747
"peerDependencies": {
4848
"bufferutil": "^4.0.1",
4949
"erlpack": "discordapp/erlpack",
50-
"libsodium-wrappers": "^0.7.4",
50+
"libsodium-wrappers": "^0.7.6",
5151
"sodium": "^3.0.2",
5252
"utf-8-validate": "^5.0.2",
5353
"zlib-sync": "^0.1.6"
@@ -74,20 +74,20 @@
7474
},
7575
"devDependencies": {
7676
"@types/node": "^10.12.24",
77-
"@types/ws": "^6.0.1",
77+
"@types/ws": "^7.2.1",
7878
"discord.js-docgen": "discordjs/docgen",
7979
"dtslint": "^3.0.0",
80-
"eslint": "^5.13.0",
81-
"jest": "^24.7.1",
80+
"eslint": "^6.8.0",
81+
"jest": "^25.1.0",
8282
"json-filter-loader": "^1.0.0",
8383
"terser-webpack-plugin": "^1.2.2",
84-
"tslint": "^5.12.1",
85-
"typescript": "^3.3.3",
86-
"webpack": "^4.29.3",
87-
"webpack-cli": "^3.2.3"
84+
"tslint": "^6.0.0",
85+
"typescript": "^3.8.2",
86+
"webpack": "^4.41.6",
87+
"webpack-cli": "^3.3.11"
8888
},
8989
"engines": {
90-
"node": ">=11.0.0"
90+
"node": ">=12.0.0"
9191
},
9292
"browser": {
9393
"@discordjs/opus": false,

src/client/voice/util/VolumeInterface.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ exports.applyToClass = function applyToClass(structure) {
106106
Object.defineProperty(
107107
structure.prototype,
108108
prop,
109-
Object.getOwnPropertyDescriptor(VolumeInterface.prototype, prop)
109+
Object.getOwnPropertyDescriptor(VolumeInterface.prototype, prop),
110110
);
111111
}
112112
};

src/client/websocket/handlers/GUILD_CREATE.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = async (client, { d: data }, shard) => {
1111
// If the client was ready before and we had unavailable guilds, fetch them
1212
if (client.ws.status === Status.READY && client.options.fetchAllMembers) {
1313
await guild.members.fetch().catch(err =>
14-
client.emit(Events.DEBUG, `Failed to fetch all members: ${err}\n${err.stack}`)
14+
client.emit(Events.DEBUG, `Failed to fetch all members: ${err}\n${err.stack}`),
1515
);
1616
}
1717
}
@@ -27,7 +27,7 @@ module.exports = async (client, { d: data }, shard) => {
2727
*/
2828
if (client.options.fetchAllMembers) {
2929
await guild.members.fetch().catch(err =>
30-
client.emit(Events.DEBUG, `Failed to fetch all members: ${err}\n${err.stack}`)
30+
client.emit(Events.DEBUG, `Failed to fetch all members: ${err}\n${err.stack}`),
3131
);
3232
}
3333
client.emit(Events.GUILD_CREATE, guild);

src/rest/RequestHandler.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class RequestHandler {
103103
// NodeFetch error expected for all "operational" errors, such as 500 status code
104104
this.busy = false;
105105
return reject(
106-
new HTTPError(error.message, error.constructor.name, error.status, request.method, request.path)
106+
new HTTPError(error.message, error.constructor.name, error.status, request.method, request.path),
107107
);
108108
}
109109

@@ -155,7 +155,7 @@ class RequestHandler {
155155
// Retry the specified number of times for possible serverside issues
156156
if (item.retries === this.manager.client.options.retryLimit) {
157157
return reject(
158-
new HTTPError(res.statusText, res.constructor.name, res.status, item.request.method, request.path)
158+
new HTTPError(res.statusText, res.constructor.name, res.status, item.request.method, request.path),
159159
);
160160
} else {
161161
item.retries++;
@@ -172,7 +172,7 @@ class RequestHandler {
172172
return null;
173173
} catch (err) {
174174
return reject(
175-
new HTTPError(err.message, err.constructor.name, err.status, request.method, request.path)
175+
new HTTPError(err.message, err.constructor.name, err.status, request.method, request.path),
176176
);
177177
}
178178
}

src/sharding/Shard.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ class Shard extends EventEmitter {
294294
if (message._sFetchProp) {
295295
this.manager.fetchClientValues(message._sFetchProp).then(
296296
results => this.send({ _sFetchProp: message._sFetchProp, _result: results }),
297-
err => this.send({ _sFetchProp: message._sFetchProp, _error: Util.makePlainError(err) })
297+
err => this.send({ _sFetchProp: message._sFetchProp, _error: Util.makePlainError(err) }),
298298
);
299299
return;
300300
}
@@ -303,7 +303,7 @@ class Shard extends EventEmitter {
303303
if (message._sEval) {
304304
this.manager.broadcastEval(message._sEval).then(
305305
results => this.send({ _sEval: message._sEval, _result: results }),
306-
err => this.send({ _sEval: message._sEval, _error: Util.makePlainError(err) })
306+
err => this.send({ _sEval: message._sEval, _error: Util.makePlainError(err) }),
307307
);
308308
return;
309309
}

src/structures/Guild.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ class Guild extends Base {
616616
user: this.client.users.add(ban.user),
617617
});
618618
return collection;
619-
}, new Collection())
619+
}, new Collection()),
620620
);
621621
}
622622

@@ -634,7 +634,7 @@ class Guild extends Base {
634634
return this.client.api.guilds(this.id).integrations.get().then(data =>
635635
data.reduce((collection, integration) =>
636636
collection.set(integration.id, new Integration(this.client, integration, this)),
637-
new Collection())
637+
new Collection()),
638638
);
639639
}
640640

@@ -1086,7 +1086,7 @@ class Guild extends Base {
10861086
this.client.actions.GuildChannelsPositionUpdate.handle({
10871087
guild_id: this.id,
10881088
channels: updatedChannels,
1089-
}).guild
1089+
}).guild,
10901090
);
10911091
}
10921092

@@ -1120,7 +1120,7 @@ class Guild extends Base {
11201120
this.client.actions.GuildRolePositionUpdate.handle({
11211121
guild_id: this.id,
11221122
roles: rolePositions,
1123-
}).guild
1123+
}).guild,
11241124
);
11251125
}
11261126

@@ -1250,7 +1250,7 @@ class Guild extends Base {
12501250
_sortedChannels(channel) {
12511251
const category = channel.type === ChannelTypes.CATEGORY;
12521252
return Util.discordSort(this.channels.cache.filter(c =>
1253-
c.type === channel.type && (category || c.parent === channel.parent)
1253+
c.type === channel.type && (category || c.parent === channel.parent),
12541254
));
12551255
}
12561256
}

src/structures/GuildChannel.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ class GuildChannel extends Channel {
375375
*/
376376
setParent(channel, { lockPermissions = true, reason } = {}) {
377377
return this.edit({
378+
// eslint-disable-next-line no-prototype-builtins
378379
parentID: channel !== null ? channel.hasOwnProperty('id') ? channel.id : channel : null,
379380
lockPermissions,
380381
}, reason);

src/structures/Message.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class Message extends Base {
108108
if (data.attachments) {
109109
for (const attachment of data.attachments) {
110110
this.attachments.set(attachment.id, new MessageAttachment(
111-
attachment.url, attachment.filename, attachment
111+
attachment.url, attachment.filename, attachment,
112112
));
113113
}
114114
}
@@ -230,7 +230,7 @@ class Message extends Base {
230230
this.attachments = new Collection();
231231
for (const attachment of data.attachments) {
232232
this.attachments.set(attachment.id, new MessageAttachment(
233-
attachment.url, attachment.filename, attachment
233+
attachment.url, attachment.filename, attachment,
234234
));
235235
}
236236
} else {
@@ -242,7 +242,7 @@ class Message extends Base {
242242
'mentions' in data ? data.mentions : this.mentions.users,
243243
'mentions_roles' in data ? data.mentions_roles : this.mentions.roles,
244244
'mention_everyone' in data ? data.mention_everyone : this.mentions.everyone,
245-
'mention_channels' in data ? data.mention_channels : this.mentions.crosspostedChannels
245+
'mention_channels' in data ? data.mention_channels : this.mentions.crosspostedChannels,
246246
);
247247

248248
this.flags = new MessageFlags('flags' in data ? data.flags : 0).freeze();
@@ -511,7 +511,7 @@ class Message extends Base {
511511
reply(content, options) {
512512
return this.channel.send(content instanceof APIMessage ?
513513
content :
514-
APIMessage.transformOptions(content, options, { reply: this.member || this.author })
514+
APIMessage.transformOptions(content, options, { reply: this.member || this.author }),
515515
);
516516
}
517517

src/structures/interfaces/TextBasedChannel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ class TextBasedChannel {
300300
let messageIDs = messages instanceof Collection ? messages.keyArray() : messages.map(m => m.id || m);
301301
if (filterOld) {
302302
messageIDs = messageIDs.filter(id =>
303-
Date.now() - Snowflake.deconstruct(id).date.getTime() < 1209600000
303+
Date.now() - Snowflake.deconstruct(id).date.getTime() < 1209600000,
304304
);
305305
}
306306
if (messageIDs.length === 0) return new Collection();
@@ -336,7 +336,7 @@ class TextBasedChannel {
336336
'typing',
337337
'typingCount',
338338
'createMessageCollector',
339-
'awaitMessages'
339+
'awaitMessages',
340340
);
341341
}
342342
for (const prop of props) {

src/util/Snowflake.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class SnowflakeUtil {
3636
if (timestamp instanceof Date) timestamp = timestamp.getTime();
3737
if (typeof timestamp !== 'number' || isNaN(timestamp)) {
3838
throw new TypeError(
39-
`"timestamp" argument must be a number (received ${isNaN(timestamp) ? 'NaN' : typeof timestamp})`
39+
`"timestamp" argument must be a number (received ${isNaN(timestamp) ? 'NaN' : typeof timestamp})`,
4040
);
4141
}
4242
if (INCREMENT >= 4095) INCREMENT = 0;

0 commit comments

Comments
 (0)