From b42173d6b0ed1d8eb552212efef969202fcc0d3b Mon Sep 17 00:00:00 2001 From: gabrielburnworth Date: Wed, 18 Sep 2024 17:59:24 -0700 Subject: [PATCH] upgrade xterm --- frontend/terminal/__tests__/index_test.tsx | 2 +- frontend/terminal/__tests__/support_test.ts | 4 ++-- frontend/terminal/__tests__/terminal_session_test.ts | 2 +- frontend/terminal/index.tsx | 2 +- frontend/terminal/support.ts | 2 +- frontend/terminal/terminal_session.ts | 2 +- package.json | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/terminal/__tests__/index_test.tsx b/frontend/terminal/__tests__/index_test.tsx index 0cdf990aa3..07b4a03013 100644 --- a/frontend/terminal/__tests__/index_test.tsx +++ b/frontend/terminal/__tests__/index_test.tsx @@ -1,4 +1,4 @@ -jest.mock("xterm/css/xterm.css", () => { }); +jest.mock("@xterm/xterm/css/xterm.css", () => { }); const mockTS = { connect: jest.fn() }; jest.mock("../terminal_session", () => ({ TerminalSession: () => mockTS })); jest.mock("../support", () => ({ diff --git a/frontend/terminal/__tests__/support_test.ts b/frontend/terminal/__tests__/support_test.ts index c18a5fa7d1..a5ef4dcf99 100644 --- a/frontend/terminal/__tests__/support_test.ts +++ b/frontend/terminal/__tests__/support_test.ts @@ -3,7 +3,7 @@ const mockTerminal: Pick = { resize: jest.fn(), }; -jest.mock("xterm", () => { +jest.mock("@xterm/xterm", () => { return { Terminal: function () { return mockTerminal; @@ -11,7 +11,7 @@ jest.mock("xterm", () => { }; }); -import { Terminal } from "xterm"; +import { Terminal } from "@xterm/xterm"; import { attachTerminal, getCredentials } from "../support"; describe("getCredentials", () => { diff --git a/frontend/terminal/__tests__/terminal_session_test.ts b/frontend/terminal/__tests__/terminal_session_test.ts index bf50e9a935..e251b9acdd 100644 --- a/frontend/terminal/__tests__/terminal_session_test.ts +++ b/frontend/terminal/__tests__/terminal_session_test.ts @@ -11,7 +11,7 @@ jest.mock("mqtt", () => { }; }); -import { Terminal } from "xterm"; +import { Terminal } from "@xterm/xterm"; import { TerminalSession } from "../terminal_session"; type FakeTerminal = Pick; diff --git a/frontend/terminal/index.tsx b/frontend/terminal/index.tsx index faa14791fe..d5720c8e3c 100644 --- a/frontend/terminal/index.tsx +++ b/frontend/terminal/index.tsx @@ -1,4 +1,4 @@ -import "xterm/css/xterm.css"; +import "@xterm/xterm/css/xterm.css"; import { getCredentials, attachTerminal } from "./support"; import { TerminalSession } from "./terminal_session"; diff --git a/frontend/terminal/support.ts b/frontend/terminal/support.ts index de675c6631..023542512a 100644 --- a/frontend/terminal/support.ts +++ b/frontend/terminal/support.ts @@ -1,4 +1,4 @@ -import { Terminal } from "xterm"; +import { Terminal } from "@xterm/xterm"; import { AuthState } from "../auth/interfaces"; export const attachTerminal = () => { diff --git a/frontend/terminal/terminal_session.ts b/frontend/terminal/terminal_session.ts index 199a13198b..81ee296dea 100644 --- a/frontend/terminal/terminal_session.ts +++ b/frontend/terminal/terminal_session.ts @@ -1,6 +1,6 @@ import { times } from "lodash"; import mqtt, { MqttClient } from "mqtt"; -import { Terminal } from "xterm"; +import { Terminal } from "@xterm/xterm"; type TerminalLike = Pick; type KeysWeNeed = "publish" | "on" | "once" | "subscribe"; diff --git a/package.json b/package.json index f4dff66495..fc930ae5da 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "three": "0.167.1", "typescript": "5.6.2", "url": "0.11.4", - "xterm": "5.3.0" + "@xterm/xterm": "5.5.0" }, "devDependencies": { "@react-three/eslint-plugin": "0.1.1",