Skip to content
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
7 changes: 4 additions & 3 deletions scripts/generate-json-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
} from "../src/constants/rulesync-paths.js";
import { RulesyncMcpFileSchema } from "../src/features/mcp/rulesync-mcp.js";
import { RulesyncPermissionsFileSchema } from "../src/types/permissions.js";
import { runOxfmt } from "./run-oxfmt.js";

type SchemaMeta = {
$id: string;
Expand Down Expand Up @@ -69,5 +68,7 @@ generateSchema(
permissionsOutputPath,
);

// Format generated schema files with oxfmt for consistent formatting
runOxfmt([outputPath, mcpOutputPath, permissionsOutputPath]);
// No oxfmt pass here: since oxfmt 0.62.0, gitignored paths are skipped even
// when passed explicitly, and these schema files are gitignored. The
// JSON.stringify output above is already deterministic, and no drift check
// compares these files, so the formatter pass is unnecessary.
4 changes: 3 additions & 1 deletion scripts/run-oxfmt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ export const repoRoot = join(import.meta.dirname, "..");
/**
* Format generated files with the repo's formatter so drift checks compare
* stable output. Shared by the generator scripts (docs content, supported-tools
* tables, JSON schemas) so a fix here reaches every call site.
* tables) so a fix here reaches every call site. Only pass tracked files:
* since oxfmt 0.62.0, gitignored paths are skipped even when passed
* explicitly, and the command fails with "Expected at least one target file".
*
* npx is npx.cmd on Windows; a shell resolves it. `--no-install` keeps npx from
* silently fetching a different oxfmt version when the pinned devDependency is
Expand Down
Loading