Skip to content
Merged
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
15 changes: 7 additions & 8 deletions package/scripts/generate-formats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,12 @@ for (const format of formats) {
console.log(` wrote src/formats/${kebab}.ts`);
}

// Run linting and formatting on generated files using vp's bundled toolchain
// so output matches `vp fmt` / `vp check --fix` behavior everywhere.
console.log("Running linter and formatter...");
try {
execSync(`npx vp check --fix ${FORMATS_DIR}`, { cwd: ROOT, stdio: "pipe" });
} catch {
// vp check --fix may exit non-zero for unfixable issues; that's OK
}
// Format the generated files in place with vp's bundled oxfmt (the raw output
// has unwrapped imports). This must succeed: the sync-generated CI workflow
// commits whatever this writes, so a swallowed failure would land unformatted
// files on main. Fail loudly instead. Lint/typecheck correctness is enforced
// separately by the `ready` gate, so formatting is all that's needed here.
console.log("Formatting generated files...");
execSync(`npx vp fmt ${FORMATS_DIR}`, { cwd: ROOT, stdio: "inherit" });

console.log("Done.");
Loading