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:
Atlas Zeng authored and GitHub committed 2026-08-16 19:14:57 +08:00
1 parent 3c196fffc3
commit fc4031e65f
5 files changed
+21 -29

No files matched your search

+12 -22
View File
@@ -74,9 +74,6 @@ importers:
'@lezer/highlight':
specifier: ^1.2.3
version: 1.2.3
'@xterm/addon-fit':
specifier: ^0.10.0
version: 0.10.0(@xterm/xterm@5.4.0)
clsx:
specifier: ^2.1.1
version: 2.1.1
@@ -92,9 +89,6 @@ importers:
ws:
specifier: ^8.18.0
version: 8.21.3
xterm:
specifier: ^5.3.0
version: 5.3.0
devDependencies:
'@cordisjs/plugin-loader':
specifier: ^1.0.0-rc.5
@@ -159,6 +153,12 @@ importers:
'@types/ws':
specifier: ^8.5.10
version: 8.18.1
'@xterm/addon-fit':
specifier: ^0.11.0
version: 0.11.0
'@xterm/xterm':
specifier: ^5.5.0
version: 5.5.0
cordis:
specifier: ^4.0.0-rc.7
version: 4.0.0-rc.8(@cordisjs/plugin-loader@1.0.0-rc.5)
@@ -1186,13 +1186,11 @@ packages:
'@vitest/utils@4.1.10':
resolution: {integrity: sha512-fy9am/HWxbaGt/Sawrp90vt6Y6jQwf1RX77cz3uwoJwJVMli/e1IEwRPnMNJ7vKfPTwo0diXifkpPvwH9v7nGA==}
'@xterm/addon-fit@0.10.0':
resolution: {integrity: sha512-UFYkDm4HUahf2lnEyHvio51TNGiLK66mqP2JoATy7hRZeXaGMRDr00JiSF7m63vR5WKATF605yEggJKsw0JpMQ==}
peerDependencies:
'@xterm/xterm': ^5.0.0
'@xterm/addon-fit@0.11.0':
resolution: {integrity: sha512-jYcgT6xtVYhnhgxh3QgYDnnNMYTcf8ElbxxFzX0IZo+vabQqSPAjC3c1wJrKB5E19VwQei89QCiZZP86DCPF7g==}
'@xterm/xterm@5.4.0':
resolution: {integrity: sha512-GlyzcZZ7LJjhFevthHtikhiDIl8lnTSgol6eTM4aoSNLcuXu3OEhnbqdCVIjtIil3jjabf3gDtb1S8FGahsuEw==}
'@xterm/xterm@5.5.0':
resolution: {integrity: sha512-hqJHYaQb5OptNunnyAnkHyM8aCjZ1MEIDTQu1iIbbTD/xops91NB5yq1ZK/dC2JDbVWtF23zUtl9JE2NqwT87A==}
'@yuku-codegen/binding-android-arm64@0.8.5':
resolution: {integrity: sha512-+oEBxK35kdbskhxozjZhI8N6qrMOfphpIkXnqBj6N2DC08rdkg10MUMRNKZLBNU6uNyoYiLcLyCE6aFV2sfMKw==}
@@ -2166,10 +2164,6 @@ packages:
xmlchars@2.2.0:
resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==}
xterm@5.3.0:
resolution: {integrity: sha512-8QqjlekLUFTrU6x7xck1MsPzPA571K5zNqWm0M0oroYEWVOptZ0+ubQSkQ3uxIEhcIHRujJy6emDWX4A7qyFzg==}
deprecated: This package is now deprecated. Move to @xterm/xterm instead.
yuku-ast@0.8.5:
resolution: {integrity: sha512-Ez2CI2BnPK/if0tVI7jB9UUDSNibcChjJDEPEKuWPJNRkbvzSoAQrSqpKtdzl8qTPp4ftVb87f/jx5HIKOieQw==}
@@ -3390,11 +3384,9 @@ snapshots:
convert-source-map: 2.0.0
tinyrainbow: 3.1.1
'@xterm/addon-fit@0.10.0(@xterm/xterm@5.4.0)':
dependencies:
'@xterm/xterm': 5.4.0
'@xterm/addon-fit@0.11.0': {}
'@xterm/xterm@5.4.0': {}
'@xterm/xterm@5.5.0': {}
'@yuku-codegen/binding-android-arm64@0.8.5':
optional: true
@@ -4385,8 +4377,6 @@ snapshots:
xmlchars@2.2.0: {}
xterm@5.3.0: {}
yuku-ast@0.8.5:
dependencies:
'@yuku-toolchain/types': 0.8.5