fix: 迁移弃用的 xterm 依赖至 @xterm/xterm(Closes #122) (#128)
* fix: 迁移弃用的 xterm 依赖至 @xterm/xterm(#122) - dependencies 移除 xterm@^5.3.0(已弃用)与 @xterm/addon-fit(二者始终 内联进 lib/client-terminal.js 懒加载 chunk,运行时零依赖) - 二者移至 devDependencies(构建期仍需:tsdown 内联 + CSS 构建期解析 + 类型) - 代码与构建注释改用官方新包名 @xterm/xterm@^5.5.0(addon-fit@0.10.0 的 peer 约束锁 ^5.0.0,不用 6.x),CSS 路径同步为 @xterm/xterm/css/xterm.css - 消除用户安装时的 deprecated 警告与 missing peer @xterm/xterm 警告 * chore: 顺带升级 @xterm/addon-fit 至 ^0.11.0 - 0.11.0(2025-12 发布)不再声明 peer 依赖,消除 peer 解析噪音 - 其运行时 API(_renderService.clear / options.overviewRuler 兜底)与 @xterm/xterm@^5.5.0 兼容:overviewRuler 在 5.x 为 undefined 时回退 14, 与 0.10.0 行为一致;typecheck/build/test(515)/ 挂载门禁均通过
This commit is contained in:
@@ -20,9 +20,9 @@
|
||||
* reconnect grace.
|
||||
*/
|
||||
import { useEffect, useRef, useState } from 'react'
|
||||
import { Terminal, type ITheme } from 'xterm'
|
||||
import { Terminal, type ITheme } from '@xterm/xterm'
|
||||
import { FitAddon } from '@xterm/addon-fit'
|
||||
import 'xterm/css/xterm.css'
|
||||
import '@xterm/xterm/css/xterm.css'
|
||||
import { t } from './locales.ts'
|
||||
import { openWhenSized } from './open-when-sized.ts'
|
||||
import type { SessionScope } from './api.ts'
|
||||
|
||||
Reference in New Issue
Block a user