This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

fix: import xterm serialize addon as ESM namespace (#43)

authored by

AI assistant of @schickling and committed by
GitHub
(Jun 25, 2026, 3:21 PM +0200) f237992c 0074a33a

+4 -4
+3 -3
src/server.ts
··· 2 2 import * as fs from "node:fs"; 3 3 import { execFileSync } from "node:child_process"; 4 4 import * as pty from "node-pty"; 5 - // @xterm packages are CJS-only. Named imports fail under Node's native ESM 6 - // loader (Node v24+), so we use default imports + separate type imports. 5 + // @xterm/headless is CJS-only, so keep its default import. The serialize addon 6 + // ships native ESM with named exports, so import its runtime namespace. 7 7 import type { Terminal } from "@xterm/headless"; 8 8 import type { SerializeAddon } from "@xterm/addon-serialize"; 9 9 import xterm from "@xterm/headless"; 10 - import xtermSerialize from "@xterm/addon-serialize"; 10 + import * as xtermSerialize from "@xterm/addon-serialize"; 11 11 import { 12 12 MessageType, 13 13 PacketReader,
+1 -1
src/testing/session.ts
··· 2 2 import type { Terminal } from "@xterm/headless"; 3 3 import type { SerializeAddon } from "@xterm/addon-serialize"; 4 4 import xterm from "@xterm/headless"; 5 - import xtermSerialize from "@xterm/addon-serialize"; 5 + import * as xtermSerialize from "@xterm/addon-serialize"; 6 6 import * as pty from "node-pty"; 7 7 import { PtyServer, type ServerOptions as PtyServerOptions } from "../server.ts"; 8 8 import {