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:
1 parent
3c196fffc3
commit
fc4031e65f
5 files changed
+21
-29
No files matched your search
+1
-1
@@ -248,7 +248,7 @@ function makeCssPlugin(pluginId: string): BuildPlugin {
|
||||
resolveId(source: string, importer: string | undefined) {
|
||||
if (!source.endsWith('.css')) return null
|
||||
// Relative/absolute paths resolve against the importer; bare
|
||||
// specifiers (e.g. 'xterm/css/xterm.css') resolve from the package.
|
||||
// specifiers (e.g. '@xterm/xterm/css/xterm.css') resolve from the package.
|
||||
let abs: string
|
||||
if (source.startsWith('.') || source.startsWith('/') || /^[A-Za-z]:[\\/]/.test(source)) {
|
||||
abs = importer === undefined ? source : resolvePath(dirname(importer), source)
|
||||
|
||||
Reference in new issue
Block a user