Skip to content

Commit aa126e9

Browse files
committed
eliminate all use of deprecated "new Buffer"
1 parent e69d84c commit aa126e9

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

src/packages/frontend/account/ssh-keys/fingerprint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import md5 from "md5";
1111
const colons = (s: string) => s.replace(/(.{2})(?=.)/g, "$1:");
1212

1313
export function compute_fingerprint(pub: string): string {
14-
const pubbuffer = new Buffer(pub, "base64");
14+
const pubbuffer = Buffer.from(pub, "base64");
1515
const key = md5(pubbuffer);
1616
return colons(key);
1717
}

src/packages/frontend/jupyter/output-messages/ipywidget.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ export function IpyWidget({ id: cell_id, value, actions }: WidgetProps) {
8989
<Button
9090
type="link"
9191
onClick={() => {
92-
console.log("hi", cell_id);
9392
actions.run_cell(cell_id);
9493
}}
9594
>

src/packages/jupyter/kernel/kernel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ class JupyterKernel extends EventEmitter implements JupyterKernelInterface {
10111011
const dbg = this.dbg("send_comm_message_to_kernel");
10121012
dbg({ msg_id, comm_id, target_name, data, buffers64 });
10131013
if (buffers64 != null && buffers64.length > 0) {
1014-
buffers = buffers64?.map((x) => new Buffer(base64ToBuffer(x))) ?? [];
1014+
buffers = buffers64?.map((x) => Buffer.from(base64ToBuffer(x))) ?? [];
10151015
dbg(
10161016
"buffers lengths = ",
10171017
buffers.map((x) => x.byteLength),

0 commit comments

Comments
 (0)