Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dependencies #670

Merged
merged 7 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
971 changes: 618 additions & 353 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/legacy/src/components/pages/SignUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function SignUp() {
<Title>注册账号</Title>
{registerError && (
<InformationBar variant="ERROR">
<>{errorText(registerError)}</>
<>{errorText(registerError).description}</>
</InformationBar>
)}
<form onSubmit={handleSubmit(onSubmit)}>
Expand Down
14 changes: 7 additions & 7 deletions apps/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ regex = "1"
ring = "0.17"
serde_json = "1.0"
serde_urlencoded = "0.7"
sysinfo = "0.31.2"
thiserror = "1.0"
sysinfo = "0.33.0"
thiserror = "2.0"
tokio-stream = "0.1"
tokio-tungstenite = "0.23.1"
sqlx = { version = "0.8.0", features = [
tokio-tungstenite = "0.24"
sqlx = { version = "0.8.2", features = [
"runtime-tokio",
"tls-rustls",
"postgres",
Expand All @@ -50,13 +50,13 @@ sqlx = { version = "0.8.0", features = [
] }
http-body-util = "0.1.2"
hyper-util = { version = "0.1.7", features = ["full"] }
deadpool-redis = "0.17.0"
deadpool-redis = "0.18.0"
arc-swap = "1.7.1"
quick_cache = "0.6.9"


[dependencies.ts-rs]
version = "9"
version = "10"
features = ["serde-compat", "uuid-impl", "chrono-impl"]

[dependencies.reqwest]
Expand Down Expand Up @@ -94,7 +94,7 @@ features = [
]

[dependencies.fern]
version = "0.6"
version = "0.7"
features = ["colored"]

[target.'cfg(not(target_env = "msvc"))'.dependencies]
Expand Down
4 changes: 2 additions & 2 deletions apps/server/bindings/ChannelMembers.ts

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

4 changes: 2 additions & 2 deletions apps/server/bindings/ChannelWithRelated.ts

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

2 changes: 1 addition & 1 deletion apps/server/bindings/EventBody.ts

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

6 changes: 3 additions & 3 deletions apps/server/bindings/SpaceWithRelated.ts

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

2 changes: 1 addition & 1 deletion apps/server/src/channels/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ async fn export(req: Request<impl Body>) -> Result<Vec<Message>, AppError> {
if channel_member.is_none() && !space_member.is_admin {
return Err(AppError::NoPermission("user is not channel member".to_string()));
}
let hide = channel_member.map_or(true, |member| !member.is_master);
let hide = channel_member.is_none_or(|member| !member.is_master);
Message::export(&mut *trans, &channel.id, hide, after)
.await
.map_err(Into::into)
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ static SECRET: OnceCell<String> = OnceCell::new();

fn env_bool<T: AsRef<str>>(s: T) -> bool {
let s = s.as_ref().trim();
!(s.is_empty() || s == "0" || s.to_ascii_lowercase() == "false")
!(s.is_empty() || s == "0" || s.eq_ignore_ascii_case("false"))
}

pub fn ci() -> bool {
Expand Down
2 changes: 2 additions & 0 deletions apps/server/src/events/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ async fn check_permissions(
Ok(())
}

// Allow the needless return for keep some visual hints
#[allow(clippy::needless_return)]
async fn push_events(mailbox: Uuid, outgoing: &mut Sender, after: Option<i64>, seq: Option<u16>) {
use futures::channel::mpsc::channel;
use tokio::sync::broadcast::error::RecvError;
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/spaces/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async fn list(_req: Request<impl Body>) -> Result<Vec<Space>, AppError> {

{
let space_list = space_list_lock.load();
if space_list.spaces.len() > 0 && space_list.instant.elapsed().as_secs() < 10 {
if !space_list.spaces.is_empty() && space_list.instant.elapsed().as_secs() < 10 {
return Ok(space_list.spaces.clone());
}
}
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/validators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::error::ValidationFailed;
pub type ValidateFn<T> = dyn Fn(&T) -> bool + Sync;
pub struct Validator<'a, T: ?Sized>(&'a [(&'static str, &'a ValidateFn<T>)]);

impl<'a, T: ?Sized> Validator<'a, T> {
impl<T: ?Sized> Validator<'_, T> {
pub fn run<U: AsRef<T>>(&self, value: U) -> Result<(), ValidationFailed> {
let Validator(sub_validators) = *self;
for (message, validator) in sub_validators {
Expand Down
2 changes: 1 addition & 1 deletion apps/site/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
8 changes: 4 additions & 4 deletions apps/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@
"@boluo/theme": "*",
"@boluo/ui": "*",
"@boluo/utils": "*",
"@formatjs/intl": "^2.10.0",
"@formatjs/intl": "^3.0.4",
"@next/mdx": "^14.1.1",
"clsx": "^2.1.0",
"jotai": "^2.7.0",
"negotiator": "^0.6.3",
"negotiator": "^1.0.0",
"next": "^14.1.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.51.0",
"react-intl": "^6.6.2",
"react-intl": "^7.0.4",
"server-only": "^0.0.1",
"swr": "^2.2.5",
"tslib": "^2.6.2",
"uuid": "^10.0.0"
"uuid": "^11.0.3"
},
"devDependencies": {
"@babel/core": "^7.23.7",
Expand Down
5 changes: 4 additions & 1 deletion apps/spa/hooks/useConnectionEffect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ export const useConnectionEffect = (mailboxId: string, isTokenLoading: boolean,
});
return;
case 'STATUS_MAP':
void mutate<Record<string, UserStatus>>(['/spaces/users_status', event.body.spaceId], event.body.statusMap);
void mutate<Record<string, UserStatus | undefined>>(
['/spaces/users_status', event.body.spaceId],
event.body.statusMap,
);
return;
case 'ERROR':
dispatch({ type: 'connectionError', payload: { mailboxId, code: event.body.code ?? 'UNEXPECTED' } });
Expand Down
2 changes: 1 addition & 1 deletion apps/spa/hooks/useDefaultInGame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { useChannel } from './useChannel';

export const useDefaultInGame = (): boolean => {
const channel = useChannel();
return channel?.type === 'IN_GAME' ?? false;
return channel?.type === 'IN_GAME';
};
2 changes: 1 addition & 1 deletion apps/spa/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
12 changes: 6 additions & 6 deletions apps/spa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
"@boluo/lang": "*",
"@boluo/ui": "*",
"@boluo/utils": "*",
"@dnd-kit/core": "^6.1.0",
"@dnd-kit/modifiers": "^7.0.0",
"@dnd-kit/sortable": "^8.0.0",
"@dnd-kit/core": "^6.3.0",
"@dnd-kit/modifiers": "^9.0.0",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@floating-ui/react": "^0.26.13",
"@floating-ui/react": "^0.27.0",
"@sentry/nextjs": "^8.26.0",
"@sentry/react": "^8.0.0",
"clsx": "^2.1.0",
Expand All @@ -34,11 +34,11 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.51.3",
"react-intl": "^6.6.5",
"react-intl": "^7.0.4",
"react-virtuoso": "^4.7.10",
"rich-textarea": "^0.26.2",
"swr": "^2.2.5",
"uuid": "^10.0.0",
"uuid": "^11.0.3",
"zod": "^3.23.5"
},
"devDependencies": {
Expand Down
40 changes: 20 additions & 20 deletions flake.lock

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

3 changes: 1 addition & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
description = "A chat tool made for play RPG";

inputs = {
nixpkgs.url = "nixpkgs/nixos-24.05";
nixpkgs.url = "nixpkgs/nixos-24.11";
flake-parts.url = "github:hercules-ci/flake-parts";
devshell = {
url = "github:numtide/devshell";
inputs.nixpkgs.follows = "nixpkgs";
};
crane = {
url = "github:ipetkov/crane";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
Expand Down
Loading
Loading