update dependencies & lint

This commit is contained in:
Kevin Jahns 2022-04-24 15:01:34 +02:00
parent 3037783947
commit cc597be93b
3 changed files with 4827 additions and 670 deletions

5453
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -45,20 +45,22 @@ const debugResolve = {
return null
}
}
const minificationPlugins = process.env.PRODUCTION ? [terser({
module: true,
compress: {
hoist_vars: true,
const minificationPlugins = process.env.PRODUCTION
? [terser({
module: true,
passes: 1,
pure_getters: true,
unsafe_comps: true,
unsafe_undefined: true
},
mangle: {
toplevel: true
}
})] : []
compress: {
hoist_vars: true,
module: true,
passes: 1,
pure_getters: true,
unsafe_comps: true,
unsafe_undefined: true
},
mangle: {
toplevel: true
}
})]
: []
const plugins = [
debugResolve,

View file

@ -498,13 +498,15 @@ export class SignalingConn extends ws.WebsocketClient {
// ignore messages that are not addressed to this conn, or from clients that are connected via broadcastchannel
return
}
const emitPeerChange = webrtcConns.has(data.from) ? () => {} : () =>
room.provider.emit('peers', [{
removed: [],
added: [data.from],
webrtcPeers: Array.from(room.webrtcConns.keys()),
bcPeers: Array.from(room.bcConns)
}])
const emitPeerChange = webrtcConns.has(data.from)
? () => {}
: () =>
room.provider.emit('peers', [{
removed: [],
added: [data.from],
webrtcPeers: Array.from(room.webrtcConns.keys()),
bcPeers: Array.from(room.bcConns)
}])
switch (data.type) {
case 'announce':
if (webrtcConns.size < room.provider.maxConns) {