add format script
This commit is contained in:
parent
80e5d25698
commit
c443a5601c
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
|
|
|
@ -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")] {
|
||||
|
|
|
@ -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 ?? "";
|
||||
|
|
Loading…
Reference in New Issue