浏览代码

Update frontend dependencies and clippy lints (#33)

Eric Zhang 3 年之前
父节点
当前提交
7cc5b9c939
共有 6 个文件被更改,包括 323 次插入342 次删除
  1. 305 329
      package-lock.json
  2. 10 10
      package.json
  3. 1 1
      rustpad-server/src/lib.rs
  4. 0 1
      rustpad-server/tests/persist.rs
  5. 2 0
      rustpad-wasm/src/lib.rs
  6. 5 1
      src/ConnectionStatus.tsx

文件差异内容过多而无法显示
+ 305 - 329
package-lock.json


+ 10 - 10
package.json

@@ -9,9 +9,9 @@
     "format": "prettier --write ."
   },
   "dependencies": {
-    "@chakra-ui/react": "^1.7.0",
-    "@emotion/react": "^11.5.0",
-    "@emotion/styled": "^11.3.0",
+    "@chakra-ui/react": "^1.7.3",
+    "@emotion/react": "^11.7.1",
+    "@emotion/styled": "^11.6.0",
     "@monaco-editor/react": "^4.3.1",
     "framer-motion": "^4.1.17",
     "lodash.debounce": "^4.0.8",
@@ -19,16 +19,16 @@
     "react-dom": "^17.0.2",
     "react-icons": "^4.3.1",
     "rustpad-wasm": "file:./rustpad-wasm/pkg",
-    "use-local-storage-state": "^11.0.0"
+    "use-local-storage-state": "^13.0.0"
   },
   "devDependencies": {
     "@types/lodash.debounce": "^4.0.6",
-    "@types/react": "^17.0.34",
+    "@types/react": "^17.0.38",
     "@types/react-dom": "^17.0.11",
-    "@vitejs/plugin-react": "^1.0.8",
-    "monaco-editor": "^0.30.1",
-    "prettier": "2.4.1",
-    "typescript": "~4.4.4",
-    "vite": "^2.6.14"
+    "@vitejs/plugin-react": "^1.1.3",
+    "monaco-editor": "^0.31.1",
+    "prettier": "2.5.1",
+    "typescript": "~4.5.4",
+    "vite": "^2.7.7"
   }
 }

+ 1 - 1
rustpad-server/src/lib.rs

@@ -124,7 +124,7 @@ fn backend(config: ServerConfig) -> BoxedFilter<(impl Reply,)> {
         .as_secs();
     let stats = warp::path!("stats")
         .and(warp::any().map(move || start_time))
-        .and(state_filter.clone())
+        .and(state_filter)
         .and_then(stats_handler);
 
     socket.or(text).or(stats).boxed()

+ 0 - 1
rustpad-server/tests/persist.rs

@@ -66,7 +66,6 @@ async fn test_persist() -> Result<()> {
     let filter = server(ServerConfig {
         expiry_days: 2,
         database: Some(Database::new(&temp_sqlite_uri()?).await?),
-        ..ServerConfig::default()
     });
 
     expect_text(&filter, "persist", "").await;

+ 2 - 0
rustpad-wasm/src/lib.rs

@@ -155,11 +155,13 @@ impl OpSeq {
     }
 
     /// Attempts to deserialize an `OpSeq` from a JSON string.
+    #[allow(clippy::should_implement_trait)]
     pub fn from_str(s: &str) -> Option<OpSeq> {
         serde_json::from_str(s).ok()
     }
 
     /// Converts this object to a JSON string.
+    #[allow(clippy::inherent_to_string)]
     pub fn to_string(&self) -> String {
         serde_json::to_string(self).expect("json serialization failure")
     }

+ 5 - 1
src/ConnectionStatus.tsx

@@ -19,7 +19,11 @@ function ConnectionStatus({ connection, darkMode }: ConnectionStatusProps) {
           }[connection]
         }
       />
-      <Text fontSize="sm" fontStyle="italic" color={darkMode ? "gray.300" : "gray.600"}>
+      <Text
+        fontSize="sm"
+        fontStyle="italic"
+        color={darkMode ? "gray.300" : "gray.600"}
+      >
         {
           {
             connected: "You are connected!",

部分文件因为文件数量过多而无法显示