@@ -139,9 +139,8 @@ fn get_default_formatter(config: &ResolvedCrateConfig, lang: Language) -> Option
139139 // `cargo sort` normalises the generated Cargo.toml so prek's cargo-sort hook
140140 // is a no-op; without it, cargo-sort reformats feature indentation after the
141141 // hash is finalised, making alef verify report the file as stale.
142- // `taplo fmt` then re-flows array/inline-table whitespace per the consumer's
143- // `.taplo.toml` so prek's taplo hook is likewise a no-op (best-effort: missing
144- // taplo is skipped silently via `is_tool_available`).
142+ // `oxfmt` then re-flows array/inline-table whitespace consistently with
143+ // the shared Kreuzberg pre-commit hook.
145144 Language :: Wasm => {
146145 let crate_dir = config
147146 . output_for ( "wasm" )
@@ -160,8 +159,8 @@ fn get_default_formatter(config: &ResolvedCrateConfig, lang: Language) -> Option
160159 args: vec![ "sort" . to_owned( ) , crate_dir_str] ,
161160 } ,
162161 FormatterCommand {
163- command: "taplo " . to_owned( ) ,
164- args: vec![ "fmt " . to_owned( ) , manifest_path] ,
162+ command: "pnpm " . to_owned( ) ,
163+ args: vec![ "dlx" . to_owned ( ) , "oxfmt ". to_owned( ) , manifest_path] ,
165164 } ,
166165 ] ,
167166 work_dir : String :: new ( ) ,
@@ -175,9 +174,8 @@ fn get_default_formatter(config: &ResolvedCrateConfig, lang: Language) -> Option
175174 // `cargo sort -w` normalises all workspace Cargo.toml files so prek's
176175 // cargo-sort hook is a no-op; without it the hook reformats feature
177176 // indentation after finalize_hashes, making alef verify report stale files.
178- // `taplo fmt` then re-flows whitespace across all workspace TOML files so
179- // prek's taplo hook is similarly a no-op (best-effort: missing taplo is
180- // skipped silently via `is_tool_available`).
177+ // `oxfmt` then re-flows whitespace across workspace TOML/JSON/JS/TS
178+ // files consistently with the shared Kreuzberg pre-commit hook.
181179 Language :: Ffi => Some ( FormatterSpec {
182180 commands : vec ! [
183181 FormatterCommand {
@@ -189,8 +187,8 @@ fn get_default_formatter(config: &ResolvedCrateConfig, lang: Language) -> Option
189187 args: vec![ "sort" . to_owned( ) , "-w" . to_owned( ) ] ,
190188 } ,
191189 FormatterCommand {
192- command: "taplo " . to_owned( ) ,
193- args: vec![ "fmt " . to_owned( ) ] ,
190+ command: "pnpm " . to_owned( ) ,
191+ args: vec![ "dlx" . to_owned ( ) , "oxfmt" . to_owned ( ) , ". ". to_owned( ) ] ,
194192 } ,
195193 ] ,
196194 work_dir : String :: new ( ) ,
@@ -541,11 +539,11 @@ project_file = "{project_file}"
541539 let config = make_config ( "liter-llm" ) ;
542540 let spec = get_default_formatter ( & config, Language :: Wasm ) . expect ( "should have formatter" ) ;
543541 // Three commands: cargo fmt (rs files), cargo sort (Cargo.toml table order),
544- // then taplo fmt (Cargo.toml whitespace/array wrapping).
542+ // then oxfmt (Cargo.toml whitespace/array wrapping).
545543 assert_eq ! (
546544 spec. commands. len( ) ,
547545 3 ,
548- "WASM must have cargo fmt + cargo sort + taplo fmt steps"
546+ "WASM must have cargo fmt + cargo sort + oxfmt steps"
549547 ) ;
550548 let fmt_cmd = & spec. commands [ 0 ] ;
551549 assert_eq ! ( fmt_cmd. command, "cargo" ) ;
@@ -560,12 +558,12 @@ project_file = "{project_file}"
560558 vec![ "sort" , "crates/liter-llm-wasm" ] ,
561559 "cargo sort arg must be the crate directory, not the manifest path"
562560 ) ;
563- let taplo_cmd = & spec. commands [ 2 ] ;
564- assert_eq ! ( taplo_cmd . command, "taplo " ) ;
561+ let oxfmt_cmd = & spec. commands [ 2 ] ;
562+ assert_eq ! ( oxfmt_cmd . command, "pnpm " ) ;
565563 assert_eq ! (
566- taplo_cmd . args,
567- vec![ "fmt " , "crates/liter-llm-wasm/Cargo.toml" ] ,
568- "taplo fmt must target the Cargo.toml manifest path so prek's taplo hook is a no-op "
564+ oxfmt_cmd . args,
565+ vec![ "dlx" , "oxfmt ", "crates/liter-llm-wasm/Cargo.toml" ] ,
566+ "oxfmt must target the Cargo.toml manifest path"
569567 ) ;
570568 assert ! ( spec. work_dir. is_empty( ) , "WASM formatter must run at workspace root" ) ;
571569 }
@@ -604,11 +602,11 @@ wasm = "crates/ts-pack-core-wasm/src/"
604602 let config = make_config ( "liter-llm" ) ;
605603 let spec = get_default_formatter ( & config, Language :: Ffi ) . expect ( "should have formatter" ) ;
606604 // Three commands: cargo fmt --all (rs files), cargo sort -w (Cargo.toml table
607- // order across the workspace), then taplo fmt (Cargo.toml whitespace).
605+ // order across the workspace), then oxfmt (workspace TOML/JSON/JS/TS whitespace).
608606 assert_eq ! (
609607 spec. commands. len( ) ,
610608 3 ,
611- "FFI must have cargo fmt + cargo sort + taplo fmt steps"
609+ "FFI must have cargo fmt + cargo sort + oxfmt steps"
612610 ) ;
613611 let fmt_cmd = & spec. commands [ 0 ] ;
614612 assert_eq ! ( fmt_cmd. command, "cargo" ) ;
@@ -620,12 +618,12 @@ wasm = "crates/ts-pack-core-wasm/src/"
620618 vec![ "sort" , "-w" ] ,
621619 "cargo sort must run workspace-wide so all binding crate Cargo.toml files are normalised"
622620 ) ;
623- let taplo_cmd = & spec. commands [ 2 ] ;
624- assert_eq ! ( taplo_cmd . command, "taplo " ) ;
621+ let oxfmt_cmd = & spec. commands [ 2 ] ;
622+ assert_eq ! ( oxfmt_cmd . command, "pnpm " ) ;
625623 assert_eq ! (
626- taplo_cmd . args,
627- vec![ "fmt " ] ,
628- "taplo fmt (no path) walks the workspace per .taplo.toml so prek's taplo hook is a no-op "
624+ oxfmt_cmd . args,
625+ vec![ "dlx" , "oxfmt" , ". "] ,
626+ "oxfmt must walk the workspace like the shared pre-commit hook"
629627 ) ;
630628 assert ! ( spec. work_dir. is_empty( ) , "FFI formatter must run at workspace root" ) ;
631629 }
0 commit comments