Skip to content

Commit

Permalink
feat(web): xterm npm 包更名,修改导入 (#1237)
Browse files Browse the repository at this point in the history
The npm package `xterm` has been renamed to `@xterm/xterm`, and
`xterm-addon-fit` has been renamed to `@xterm/addon-fit`.
This change has resulted in the automatic update of these dependencies
not working. I renamed these two packages in portal-web's package.json
and conducted a test.
  • Loading branch information
Miracle575 authored May 6, 2024
1 parent 1ef7a92 commit c178b72
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
6 changes: 6 additions & 0 deletions .changeset/grumpy-spoons-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@scow/portal-web": patch
"@scow/ai": patch
---

xterm npm 包更名
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

"use client";

import "xterm/css/xterm.css";
import "@xterm/xterm/css/xterm.css";

import { Button, Space } from "antd";
import dynamic from "next/dynamic";
Expand Down
4 changes: 2 additions & 2 deletions apps/portal-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
"tslib": "2.6.2",
"typescript": "5.4.3",
"ws": "8.16.0",
"xterm": "5.3.0",
"xterm-addon-fit": "0.8.0"
"@xterm/xterm": "5.5.0",
"@xterm/addon-fit": "0.10.0"
},
"devDependencies": {
"@ddadaal/next-typed-api-routes-cli": "0.9.1",
Expand Down
4 changes: 2 additions & 2 deletions apps/portal-web/src/pageComponents/shell/Shell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
*/

import { debounce } from "@scow/lib-web/build/utils/debounce";
import { FitAddon } from "@xterm/addon-fit";
import { Terminal } from "@xterm/xterm";
import { join } from "path";
import { useEffect, useRef } from "react";
import { urlToDownload } from "src/pageComponents/filemanager/api";
import { ShellInputData, ShellOutputData } from "src/server/setup/shell";
import { User } from "src/stores/UserStore";
import { publicConfig } from "src/utils/config";
import { styled } from "styled-components";
import { Terminal } from "xterm";
import { FitAddon } from "xterm-addon-fit";

const TerminalContainer = styled.div`
background-color: black;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* See the Mulan PSL v2 for more details.
*/

import "xterm/css/xterm.css";
import "@xterm/xterm/css/xterm.css";

import { getI18nConfigCurrentText } from "@scow/lib-web/build/utils/systemLanguage";
import { Button, Popover, Space, Typography } from "antd";
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c178b72

Please sign in to comment.