Browse Source

chore(deps): 升级 npm 与 Cargo 依赖并适配 API

刷新前端与 Rust 依赖;pangu 10 改用 spaceText,toml 0.9 改为解析 Table。

Co-authored-by: Cursor <cursoragent@cursor.com>
darknessomi 2 tuần trước cách đây
mục cha
commit
28318f99e3

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 255 - 266
package-lock.json


+ 25 - 25
package.json

@@ -18,7 +18,7 @@
     "build:github-release": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"if (-not $env:TAURI_SIGNING_PRIVATE_KEY_PATH) { $env:TAURI_SIGNING_PRIVATE_KEY_PATH = Join-Path $env:USERPROFILE '.tauri\\qmai-updater.key' }; if (-not (Test-Path $env:TAURI_SIGNING_PRIVATE_KEY_PATH)) { throw '缺少 TAURI_SIGNING_PRIVATE_KEY_PATH 对应的签名私钥文件' }; if ($null -eq $env:TAURI_SIGNING_PRIVATE_KEY_PASSWORD) { $env:TAURI_SIGNING_PRIVATE_KEY_PASSWORD = '' }; npx tauri build; if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }; node scripts/build-portable.mjs; if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }; node scripts/prepare-github-release.mjs\""
   },
   "dependencies": {
-    "@base-ui/react": "^1.7.0",
+    "@base-ui/react": "^1.8.0",
     "@dnd-kit/core": "^6.3.1",
     "@dnd-kit/sortable": "^8.0.0",
     "@dnd-kit/utilities": "^3.2.2",
@@ -29,39 +29,39 @@
     "@sigma/edge-curve": "^3.1.0",
     "@tailwindcss/vite": "^4.3.3",
     "@tauri-apps/api": "^2.11.1",
-    "@tauri-apps/plugin-dialog": "^2.7.2",
-    "@tauri-apps/plugin-http": "^2.5.9",
-    "@tauri-apps/plugin-notification": "^2.3.3",
-    "@tauri-apps/plugin-opener": "^2.5.4",
+    "@tauri-apps/plugin-dialog": "^2.7.3",
+    "@tauri-apps/plugin-http": "^2.6.0",
+    "@tauri-apps/plugin-notification": "^2.4.0",
+    "@tauri-apps/plugin-opener": "^2.5.5",
     "@tauri-apps/plugin-store": "^2.4.4",
-    "@tauri-apps/plugin-updater": "^2.10.1",
+    "@tauri-apps/plugin-updater": "^2.11.0",
     "class-variance-authority": "^0.7.1",
     "clsx": "^2.1.1",
     "diff": "^9.0.0",
     "graphology": "^0.26.0",
     "graphology-communities-louvain": "^2.0.2",
     "graphology-layout-forceatlas2": "^0.10.1",
-    "i18next": "^26.3.6",
-    "js-yaml": "^4.3.1",
+    "i18next": "^26.4.2",
+    "js-yaml": "^4.3.2",
     "jsonrepair": "^3.15.0",
     "katex": "^0.16.47",
-    "lucide-react": "^1.31.0",
-    "mermaid": "^11.16.1",
-    "opencc-js": "^1.4.1",
-    "pangu": "^9.1.0",
-    "pinyin-pro": "^3.29.1",
-    "react": "^19.2.8",
+    "lucide-react": "^1.46.0",
+    "mermaid": "^11.17.2",
+    "opencc-js": "^1.4.2",
+    "pangu": "^10.1.1",
+    "pinyin-pro": "^3.29.4",
+    "react": "^19.3.0",
     "react-diff-viewer-continued": "^4.4.0",
-    "react-dom": "^19.2.8",
-    "react-i18next": "^17.0.11",
+    "react-dom": "^19.3.0",
+    "react-i18next": "^17.0.14",
     "react-markdown": "^10.1.0",
-    "react-resizable-panels": "^4.12.2",
+    "react-resizable-panels": "^4.12.4",
     "rehype-katex": "^7.0.1",
     "remark-gfm": "^4.0.1",
     "remark-math": "^6.0.0",
-    "shadcn": "^4.18.0",
+    "shadcn": "^4.21.0",
     "sigma": "^3.0.3",
-    "tailwind-merge": "^3.6.0",
+    "tailwind-merge": "^3.7.0",
     "tailwindcss": "^4.3.3",
     "tw-animate-css": "^1.4.0",
     "zustand": "^5.0.15"
@@ -69,14 +69,14 @@
   "devDependencies": {
     "@tauri-apps/cli": "^2.11.4",
     "@types/js-yaml": "^4.0.9",
-    "@types/node": "^24.13.3",
-    "@types/react": "^19.2.18",
-    "@types/react-dom": "^19.2.4",
-    "@vitejs/plugin-react": "^6.0.5",
+    "@types/node": "^24.13.4",
+    "@types/react": "^19.3.0",
+    "@types/react-dom": "^19.3.0",
+    "@vitejs/plugin-react": "^6.1.1",
     "iconv-lite": "^0.7.3",
     "jsdom": "^29.1.1",
     "typescript": "^5.9.3",
-    "vite": "^8.2.1",
-    "vitest": "^4.1.10"
+    "vite": "^8.3.0",
+    "vitest": "^4.1.11"
   }
 }

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 197 - 149
src-tauri/Cargo.lock


+ 11 - 11
src-tauri/Cargo.toml

@@ -17,19 +17,19 @@ tauri-build = { version = "2", features = [] }
 
 [dependencies]
 tauri = { version = "2", features = ["protocol-asset"] }
-tauri-plugin-opener = "2"
+tauri-plugin-opener = "2.5.5"
 serde = { version = "1", features = ["derive"] }
 serde_json = "1"
 chrono = { version = "0.4", features = ["clock"] }
-tauri-plugin-dialog = "2.7.2"
-tauri-plugin-updater = "2"
+tauri-plugin-dialog = "2.7.3"
+tauri-plugin-updater = "2.11.0"
 tauri-plugin-store = "2.4.4"
-tauri-plugin-http = { version = "2", features = ["unsafe-headers"] }
+tauri-plugin-http = { version = "2.6.0", features = ["unsafe-headers"] }
 zip = "2"
-calamine = "0.34.0"
+calamine = "0.36.1"
 docx-rs = "0.4.22"
 cfb = "0.7.3"
-encoding_rs = "0.8.35"
+encoding_rs = "0.8.41"
 # Local vector store only. lancedb 0.27.2 already has empty default features;
 # keep them off so aws/gcs/azure/remote/openai never sneak in. DataFusion is a
 # hard dependency of this crate and cannot be feature-gated away.
@@ -42,9 +42,9 @@ futures = "0.3"
 # stream stdout line-by-line back to the frontend. tokio::process gives us
 # async io and clean cancellation; `which` locates the binary on PATH.
 tokio = { version = "1", features = ["process", "io-util", "sync", "macros", "rt"] }
-which = "7"
+which = "8"
 uuid = { version = "1", features = ["v4"] }
-toml = "0.8"
+toml = "0.9"
 # Multimodal image extraction (Office docs):
 #   `image` decodes embedded PPTX/DOCX raster bytes so we can apply
 #   the size filter before writing them to disk.
@@ -60,9 +60,9 @@ sha2 = "0.10"
 md-5 = "0.10"
 notify = "8"
 walkdir = "2"
-tauri-plugin-single-instance = "2"
-tauri-plugin-notification = "2"
-keepawake = "0.6"
+tauri-plugin-single-instance = "2.4.4"
+tauri-plugin-notification = "2.4.0"
+keepawake = "0.6.1"
 
 [target.'cfg(target_os = "macos")'.dependencies]
 objc2 = "0.6.4"

+ 2 - 3
src-tauri/src/commands/codex_cli.rs

@@ -112,8 +112,7 @@ fn isolated_codex_config(home_dir: Option<&Path>) -> toml::Table {
     let mut isolated = toml::Table::new();
     let source = home_dir
         .and_then(|home| std::fs::read_to_string(home.join(".codex").join("config.toml")).ok())
-        .and_then(|content| content.parse::<toml::Value>().ok())
-        .and_then(|value| value.as_table().cloned())
+        .and_then(|content| content.parse::<toml::Table>().ok())
         .unwrap_or_default();
     for key in CODEX_CONFIG_PASSTHROUGH_KEYS {
         if let Some(value) = source.get(*key) {
@@ -839,7 +838,7 @@ command = "danger"
         );
 
         let serialized = serialize_isolated_codex_config(Some(&dir)).unwrap();
-        let reparsed = serialized.parse::<toml::Value>().unwrap();
+        let reparsed = serialized.parse::<toml::Table>().unwrap();
         assert_eq!(
             reparsed.get("model_provider").and_then(toml::Value::as_str),
             Some("proxy")

+ 1 - 1
src-tauri/src/commands/local_cli_config.rs

@@ -120,7 +120,7 @@ pub fn read_codex_local_config(home_dir: Option<&Path>) -> LocalCliConfigInfo {
     let Ok(content) = std::fs::read_to_string(path) else {
         return LocalCliConfigInfo::default();
     };
-    let Ok(value) = content.parse::<toml::Value>() else {
+    let Ok(value) = content.parse::<toml::Table>() else {
         return LocalCliConfigInfo::default();
     };
 

+ 3 - 1
src/lib/chapter-formatting.ts

@@ -1,8 +1,10 @@
 import pangu from "pangu"
 import { parseFrontmatter } from "@/lib/frontmatter"
 
+// pangu 10 still treats CJK-N hyphen as an operator: 苏-35 → 苏 - 35
 const CJK_MODEL_HYPHEN =
   /(?<=[\p{Script=Han}])-(?=(?=[A-Z0-9-]*\d)[A-Z0-9]+(?:-[A-Z0-9]+)*)/gu
+// pangu 10 still normalizes · • ‧ to katakana ・
 const LOSSY_MIDDLE_DOT = /[·•‧]/gu
 const PROTECTED_TEXT_PATTERN = /\uE100(\d+)\uE101/gu
 
@@ -18,7 +20,7 @@ function spacingChapterText(text: string): string {
     .replace(CJK_MODEL_HYPHEN, () => protect("-"))
 
   return pangu
-    .spacingText(protectedText)
+    .spaceText(protectedText)
     .replace(PROTECTED_TEXT_PATTERN, (_match, index: string) => protectedValues[Number(index)] ?? "")
 }
 

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác