Update frontend dependencies and clippy lints (#33)
This commit is contained in:
parent
4ac57685c1
commit
7cc5b9c939
6 changed files with 1299 additions and 1334 deletions
2602
package-lock.json
generated
2602
package-lock.json
generated
File diff suppressed because it is too large
Load diff
20
package.json
20
package.json
|
@ -9,9 +9,9 @@
|
||||||
"format": "prettier --write ."
|
"format": "prettier --write ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chakra-ui/react": "^1.7.0",
|
"@chakra-ui/react": "^1.7.3",
|
||||||
"@emotion/react": "^11.5.0",
|
"@emotion/react": "^11.7.1",
|
||||||
"@emotion/styled": "^11.3.0",
|
"@emotion/styled": "^11.6.0",
|
||||||
"@monaco-editor/react": "^4.3.1",
|
"@monaco-editor/react": "^4.3.1",
|
||||||
"framer-motion": "^4.1.17",
|
"framer-motion": "^4.1.17",
|
||||||
"lodash.debounce": "^4.0.8",
|
"lodash.debounce": "^4.0.8",
|
||||||
|
@ -19,16 +19,16 @@
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
"react-icons": "^4.3.1",
|
"react-icons": "^4.3.1",
|
||||||
"rustpad-wasm": "file:./rustpad-wasm/pkg",
|
"rustpad-wasm": "file:./rustpad-wasm/pkg",
|
||||||
"use-local-storage-state": "^11.0.0"
|
"use-local-storage-state": "^13.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/lodash.debounce": "^4.0.6",
|
"@types/lodash.debounce": "^4.0.6",
|
||||||
"@types/react": "^17.0.34",
|
"@types/react": "^17.0.38",
|
||||||
"@types/react-dom": "^17.0.11",
|
"@types/react-dom": "^17.0.11",
|
||||||
"@vitejs/plugin-react": "^1.0.8",
|
"@vitejs/plugin-react": "^1.1.3",
|
||||||
"monaco-editor": "^0.30.1",
|
"monaco-editor": "^0.31.1",
|
||||||
"prettier": "2.4.1",
|
"prettier": "2.5.1",
|
||||||
"typescript": "~4.4.4",
|
"typescript": "~4.5.4",
|
||||||
"vite": "^2.6.14"
|
"vite": "^2.7.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,7 @@ fn backend(config: ServerConfig) -> BoxedFilter<(impl Reply,)> {
|
||||||
.as_secs();
|
.as_secs();
|
||||||
let stats = warp::path!("stats")
|
let stats = warp::path!("stats")
|
||||||
.and(warp::any().map(move || start_time))
|
.and(warp::any().map(move || start_time))
|
||||||
.and(state_filter.clone())
|
.and(state_filter)
|
||||||
.and_then(stats_handler);
|
.and_then(stats_handler);
|
||||||
|
|
||||||
socket.or(text).or(stats).boxed()
|
socket.or(text).or(stats).boxed()
|
||||||
|
|
|
@ -66,7 +66,6 @@ async fn test_persist() -> Result<()> {
|
||||||
let filter = server(ServerConfig {
|
let filter = server(ServerConfig {
|
||||||
expiry_days: 2,
|
expiry_days: 2,
|
||||||
database: Some(Database::new(&temp_sqlite_uri()?).await?),
|
database: Some(Database::new(&temp_sqlite_uri()?).await?),
|
||||||
..ServerConfig::default()
|
|
||||||
});
|
});
|
||||||
|
|
||||||
expect_text(&filter, "persist", "").await;
|
expect_text(&filter, "persist", "").await;
|
||||||
|
|
|
@ -155,11 +155,13 @@ impl OpSeq {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Attempts to deserialize an `OpSeq` from a JSON string.
|
/// Attempts to deserialize an `OpSeq` from a JSON string.
|
||||||
|
#[allow(clippy::should_implement_trait)]
|
||||||
pub fn from_str(s: &str) -> Option<OpSeq> {
|
pub fn from_str(s: &str) -> Option<OpSeq> {
|
||||||
serde_json::from_str(s).ok()
|
serde_json::from_str(s).ok()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Converts this object to a JSON string.
|
/// Converts this object to a JSON string.
|
||||||
|
#[allow(clippy::inherent_to_string)]
|
||||||
pub fn to_string(&self) -> String {
|
pub fn to_string(&self) -> String {
|
||||||
serde_json::to_string(self).expect("json serialization failure")
|
serde_json::to_string(self).expect("json serialization failure")
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,11 @@ function ConnectionStatus({ connection, darkMode }: ConnectionStatusProps) {
|
||||||
}[connection]
|
}[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!",
|
connected: "You are connected!",
|
||||||
|
|
Loading…
Add table
Reference in a new issue