Skip to content

Commit

Permalink
upgrade xterm
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielburnworth committed Sep 19, 2024
1 parent 5a9a5f0 commit b42173d
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion frontend/terminal/__tests__/index_test.tsx
Original file line number Diff line number Diff line change
@@ -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", () => ({
Expand Down
4 changes: 2 additions & 2 deletions frontend/terminal/__tests__/support_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const mockTerminal: Pick<Terminal, "open" | "resize"> = {
resize: jest.fn(),
};

jest.mock("xterm", () => {
jest.mock("@xterm/xterm", () => {
return {
Terminal: function () {
return mockTerminal;
}
};
});

import { Terminal } from "xterm";
import { Terminal } from "@xterm/xterm";
import { attachTerminal, getCredentials } from "../support";

describe("getCredentials", () => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/terminal/__tests__/terminal_session_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jest.mock("mqtt", () => {
};
});

import { Terminal } from "xterm";
import { Terminal } from "@xterm/xterm";
import { TerminalSession } from "../terminal_session";

type FakeTerminal = Pick<Terminal, "write" | "onKey">;
Expand Down
2 changes: 1 addition & 1 deletion frontend/terminal/index.tsx
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion frontend/terminal/support.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Terminal } from "xterm";
import { Terminal } from "@xterm/xterm";
import { AuthState } from "../auth/interfaces";

export const attachTerminal = () => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/terminal/terminal_session.ts
Original file line number Diff line number Diff line change
@@ -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<Terminal, "write" | "onKey">;
type KeysWeNeed = "publish" | "on" | "once" | "subscribe";
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit b42173d

Please sign in to comment.