diff --git a/package.json b/package.json index 5c57c79cf2..41fc1e666e 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "e2e": "start-server-and-test start:test http://localhost:61812 cy:run", "mocha": "pnpm --filter backend run mocha", "test": "pnpm run mocha", - "format": "pnpm rome format packages/**/* --write && pnpm --filter client run format", + "format": "pnpm rome format packages/**/* --write && pnpm -r run format", "clean": "pnpm node ./scripts/clean.js", "clean-all": "pnpm node ./scripts/clean-all.js", "cleanall": "pnpm run clean-all" diff --git a/packages/backend/native-utils/package.json b/packages/backend/native-utils/package.json index 8423f569b1..1503bca19d 100644 --- a/packages/backend/native-utils/package.json +++ b/packages/backend/native-utils/package.json @@ -40,6 +40,7 @@ "test": "ava", "universal": "napi universal", "version": "napi version", + "format": "cargo fmt", "cargo:unit": "cargo test unit_test", "cargo:integration": "cargo test --no-default-features -F noarray int_test -- --test-threads=1" } diff --git a/packages/backend/native-utils/src/util/id.rs b/packages/backend/native-utils/src/util/id.rs index 539b0415e8..b8bf54747f 100644 --- a/packages/backend/native-utils/src/util/id.rs +++ b/packages/backend/native-utils/src/util/id.rs @@ -61,10 +61,10 @@ cfg_if! { #[cfg(test)] mod unit_test { + use crate::util::id; use cfg_if::cfg_if; use pretty_assertions::{assert_eq, assert_ne}; use std::thread; - use crate::util::id; cfg_if! { if #[cfg(feature = "napi")] { diff --git a/packages/backend/src/misc/gen-id.ts b/packages/backend/src/misc/gen-id.ts index a016111ca9..ea0d414e77 100644 --- a/packages/backend/src/misc/gen-id.ts +++ b/packages/backend/src/misc/gen-id.ts @@ -1,5 +1,8 @@ import config from "@/config/index.js"; -import { nativeCreateId, nativeInitIdGenerator } from "native-utils/built/index.js"; +import { + nativeCreateId, + nativeInitIdGenerator, +} from "native-utils/built/index.js"; const length = Math.min(Math.max(config.cuid?.length ?? 16, 16), 24); const fingerprint = config.cuid?.fingerprint ?? "";