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 return null
} }
} }
const minificationPlugins = process.env.PRODUCTION ? [terser({ const minificationPlugins = process.env.PRODUCTION
module: true, ? [terser({
compress: {
hoist_vars: true,
module: true, module: true,
passes: 1, compress: {
pure_getters: true, hoist_vars: true,
unsafe_comps: true, module: true,
unsafe_undefined: true passes: 1,
}, pure_getters: true,
mangle: { unsafe_comps: true,
toplevel: true unsafe_undefined: true
} },
})] : [] mangle: {
toplevel: true
}
})]
: []
const plugins = [ const plugins = [
debugResolve, 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 // ignore messages that are not addressed to this conn, or from clients that are connected via broadcastchannel
return return
} }
const emitPeerChange = webrtcConns.has(data.from) ? () => {} : () => const emitPeerChange = webrtcConns.has(data.from)
room.provider.emit('peers', [{ ? () => {}
removed: [], : () =>
added: [data.from], room.provider.emit('peers', [{
webrtcPeers: Array.from(room.webrtcConns.keys()), removed: [],
bcPeers: Array.from(room.bcConns) added: [data.from],
}]) webrtcPeers: Array.from(room.webrtcConns.keys()),
bcPeers: Array.from(room.bcConns)
}])
switch (data.type) { switch (data.type) {
case 'announce': case 'announce':
if (webrtcConns.size < room.provider.maxConns) { if (webrtcConns.size < room.provider.maxConns) {