Skip to content

Commit 8f44f40

Browse files
committed
Update deps
Also change Prettier `trailingComma` to 'es5' since otherwise it also adds trailing commas in `tsconfig.json` which is INVALID in JSON.
1 parent 6fdc0c4 commit 8f44f40

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+991
-998
lines changed

.prettierrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
"bracketSpacing": true,
66
"semi": true,
77
"singleQuote": true,
8-
"trailingComma": "all",
8+
"trailingComma": "es5",
99
"endOfLine": "auto"
1010
}

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### NEXT
44

5-
- C++: Update libsrtp to v3.0-alpha.
5+
- libsrtp: Update to v3.0-alpha version in our fork.
66

77
### 3.13.16
88

node/src/ActiveSpeakerObserver.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class ActiveSpeakerObserver<
5252
* @private
5353
*/
5454
constructor(
55-
options: RtpObserverObserverConstructorOptions<ActiveSpeakerObserverAppData>,
55+
options: RtpObserverObserverConstructorOptions<ActiveSpeakerObserverAppData>
5656
) {
5757
super(options);
5858

@@ -97,7 +97,7 @@ export class ActiveSpeakerObserver<
9797
logger.error('ignoring unknown event "%s"', event);
9898
}
9999
}
100-
},
100+
}
101101
);
102102
}
103103
}

node/src/AudioLevelObserver.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export class AudioLevelObserver<
7272
* @private
7373
*/
7474
constructor(
75-
options: AudioLevelObserverConstructorOptions<AudioLevelObserverAppData>,
75+
options: AudioLevelObserverConstructorOptions<AudioLevelObserverAppData>
7676
) {
7777
super(options);
7878

@@ -111,7 +111,7 @@ export class AudioLevelObserver<
111111
}) => ({
112112
producer: this.getProducerById(producerId)!,
113113
volume,
114-
}),
114+
})
115115
)
116116
.filter(({ producer }: { producer: Producer }) => producer);
117117

@@ -138,7 +138,7 @@ export class AudioLevelObserver<
138138
logger.error('ignoring unknown event "%s"', event);
139139
}
140140
}
141-
},
141+
}
142142
);
143143
}
144144
}

node/src/Channel.ts

+26-26
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export class Channel extends EnhancedEventEmitter {
7878
} else {
7979
this.#recvBuffer = Buffer.concat(
8080
[this.#recvBuffer, buffer],
81-
this.#recvBuffer.length + buffer.length,
81+
this.#recvBuffer.length + buffer.length
8282
);
8383
}
8484

@@ -104,7 +104,7 @@ export class Channel extends EnhancedEventEmitter {
104104

105105
const dataView = new DataView(
106106
this.#recvBuffer.buffer,
107-
this.#recvBuffer.byteOffset + msgStart,
107+
this.#recvBuffer.byteOffset + msgStart
108108
);
109109
const msgLen = dataView.getUint32(0, IS_LITTLE_ENDIAN);
110110

@@ -115,7 +115,7 @@ export class Channel extends EnhancedEventEmitter {
115115

116116
const payload = this.#recvBuffer.subarray(
117117
msgStart + 4,
118-
msgStart + 4 + msgLen,
118+
msgStart + 4 + msgLen
119119
);
120120

121121
msgStart += 4 + msgLen;
@@ -160,14 +160,14 @@ export class Channel extends EnhancedEventEmitter {
160160
console.warn(
161161
`worker[pid:${pid}] unexpected data: ${payload.toString(
162162
'utf8',
163-
1,
164-
)}`,
163+
1
164+
)}`
165165
);
166166
}
167167
}
168168
} catch (error) {
169169
logger.error(
170-
`received invalid message from the worker process: ${error}`,
170+
`received invalid message from the worker process: ${error}`
171171
);
172172
}
173173
}
@@ -178,19 +178,19 @@ export class Channel extends EnhancedEventEmitter {
178178
});
179179

180180
this.#consumerSocket.on('end', () =>
181-
logger.debug('Consumer Channel ended by the worker process'),
181+
logger.debug('Consumer Channel ended by the worker process')
182182
);
183183

184184
this.#consumerSocket.on('error', error =>
185-
logger.error(`Consumer Channel error: ${error}`),
185+
logger.error(`Consumer Channel error: ${error}`)
186186
);
187187

188188
this.#producerSocket.on('end', () =>
189-
logger.debug('Producer Channel ended by the worker process'),
189+
logger.debug('Producer Channel ended by the worker process')
190190
);
191191

192192
this.#producerSocket.on('error', error =>
193-
logger.error(`Producer Channel error: ${error}`),
193+
logger.error(`Producer Channel error: ${error}`)
194194
);
195195
}
196196

@@ -244,13 +244,13 @@ export class Channel extends EnhancedEventEmitter {
244244
event: Event,
245245
bodyType?: NotificationBody,
246246
bodyOffset?: number,
247-
handlerId?: string,
247+
handlerId?: string
248248
): void {
249249
logger.debug(`notify() [event:${Event[event]}]`);
250250

251251
if (this.#closed) {
252252
throw new InvalidStateError(
253-
`Channel closed, cannot send notification [event:${Event[event]}]`,
253+
`Channel closed, cannot send notification [event:${Event[event]}]`
254254
);
255255
}
256256

@@ -264,22 +264,22 @@ export class Channel extends EnhancedEventEmitter {
264264
handlerIdOffset,
265265
event,
266266
bodyType,
267-
bodyOffset,
267+
bodyOffset
268268
);
269269
} else {
270270
notificationOffset = Notification.createNotification(
271271
this.#bufferBuilder,
272272
handlerIdOffset,
273273
event,
274274
NotificationBody.NONE,
275-
0,
275+
0
276276
);
277277
}
278278

279279
const messageOffset = Message.createMessage(
280280
this.#bufferBuilder,
281281
MessageBody.Notification,
282-
notificationOffset,
282+
notificationOffset
283283
);
284284

285285
// Finalizes the buffer and adds a 4 byte prefix with the size of the buffer.
@@ -310,13 +310,13 @@ export class Channel extends EnhancedEventEmitter {
310310
method: Method,
311311
bodyType?: RequestBody,
312312
bodyOffset?: number,
313-
handlerId?: string,
313+
handlerId?: string
314314
): Promise<Response> {
315315
logger.debug(`request() [method:${Method[method]}]`);
316316

317317
if (this.#closed) {
318318
throw new InvalidStateError(
319-
`Channel closed, cannot send request [method:${Method[method]}]`,
319+
`Channel closed, cannot send request [method:${Method[method]}]`
320320
);
321321
}
322322

@@ -335,7 +335,7 @@ export class Channel extends EnhancedEventEmitter {
335335
method,
336336
handlerIdOffset,
337337
bodyType,
338-
bodyOffset,
338+
bodyOffset
339339
);
340340
} else {
341341
requestOffset = Request.createRequest(
@@ -344,14 +344,14 @@ export class Channel extends EnhancedEventEmitter {
344344
method,
345345
handlerIdOffset,
346346
RequestBody.NONE,
347-
0,
347+
0
348348
);
349349
}
350350

351351
const messageOffset = Message.createMessage(
352352
this.#bufferBuilder,
353353
MessageBody.Request,
354-
requestOffset,
354+
requestOffset
355355
);
356356

357357
// Finalizes the buffer and adds a 4 byte prefix with the size of the buffer.
@@ -392,8 +392,8 @@ export class Channel extends EnhancedEventEmitter {
392392
close: () => {
393393
pReject(
394394
new InvalidStateError(
395-
`Channel closed, pending request aborted [method:${Method[method]}, id:${id}]`,
396-
),
395+
`Channel closed, pending request aborted [method:${Method[method]}, id:${id}]`
396+
)
397397
);
398398
},
399399
};
@@ -408,7 +408,7 @@ export class Channel extends EnhancedEventEmitter {
408408

409409
if (!sent) {
410410
logger.error(
411-
`received response does not match any sent request [id:${response.id}]`,
411+
`received response does not match any sent request [id:${response.id}]`
412412
);
413413

414414
return;
@@ -422,7 +422,7 @@ export class Channel extends EnhancedEventEmitter {
422422
logger.warn(
423423
`request failed [method:${sent.method}, id:${
424424
sent.id
425-
}]: ${response.reason()}`,
425+
}]: ${response.reason()}`
426426
);
427427

428428
switch (response.error()!) {
@@ -438,7 +438,7 @@ export class Channel extends EnhancedEventEmitter {
438438
}
439439
} else {
440440
logger.error(
441-
`received response is not accepted nor rejected [method:${sent.method}, id:${sent.id}]`,
441+
`received response is not accepted nor rejected [method:${sent.method}, id:${sent.id}]`
442442
);
443443
}
444444
}
@@ -451,7 +451,7 @@ export class Channel extends EnhancedEventEmitter {
451451
// here.
452452
// See https://github.com/versatica/mediasoup/issues/510
453453
setImmediate(() =>
454-
this.emit(notification.handlerId()!, notification.event(), notification),
454+
this.emit(notification.handlerId()!, notification.event(), notification)
455455
);
456456
}
457457

0 commit comments

Comments
 (0)