crate-cli 11.0.0

A command-line tool for managing Cargo package lifecycles: version bump, workspace dependency sync, members-ordered publish and code formatting.
Documentation
/// Directory names skipped during recursive workspace text formatting.
pub(crate) const FMT_SKIP_DIRS: &[&str] = &[
    ".git",
    ".worktrees",
    ".codegraph",
    ".cache",
    "target",
    "node_modules",
    "dist",
    "tmp",
    "results",
    "results2",
    "data",
    "logs",
    "uploads",
    "debug",
    "pkg",
];

/// Workspace ignore filename honored alongside `FMT_SKIP_DIRS` (matching VS Code Prettier).
pub(crate) const FMT_PRETTIER_IGNORE_FILE: &str = ".prettierignore";

/// File extension for Rust source files.
pub(crate) const FMT_EXT_RUST: &str = "rs";

/// File extensions formatted as Markdown (VS Code Prettier 3.7.4).
pub(crate) const FMT_EXT_MARKDOWN: &[&str] = &["md", "markdown", "mdx"];

/// File extensions formatted as YAML (VS Code Prettier 3.7.4).
pub(crate) const FMT_EXT_YAML: &[&str] = &["yml", "yaml"];

/// Exact filenames formatted via Prettier's YAML/JSON auto-detecting RC parser.
pub(crate) const FMT_NAME_YAML: &[&str] = &[".prettierrc"];

/// Exact filenames formatted with Prettier's `json-stringify` parser.
pub(crate) const FMT_NAME_JSON_STRINGIFY: &[&str] =
    &["package.json", "package-lock.json", "composer.json"];

/// File extensions formatted with Prettier's `json` parser.
pub(crate) const FMT_EXT_JSON: &[&str] = &["json"];

/// File extensions formatted with Prettier's `jsonc` parser.
pub(crate) const FMT_EXT_JSONC: &[&str] = &["jsonc", "cjson"];

/// File extensions formatted as TOML (VS Code `tamasfe.even-better-toml` / Taplo 0.7.0).
pub(crate) const FMT_EXT_TOML: &[&str] = &["toml"];

/// File extensions formatted as JavaScript (VS Code Prettier 3.7.4).
pub(crate) const FMT_EXT_JAVASCRIPT: &[&str] = &["js", "mjs", "cjs", "wxs"];

/// File extensions formatted as TypeScript (VS Code Prettier 3.7.4).
pub(crate) const FMT_EXT_TYPESCRIPT: &[&str] = &["ts", "mts", "cts"];

/// File extensions formatted as TypeScript JSX (VS Code Prettier 3.7.4).
pub(crate) const FMT_EXT_TSX: &[&str] = &["tsx"];

/// File extensions formatted as CSS (VS Code Prettier 3.7.4).
pub(crate) const FMT_EXT_CSS: &[&str] = &["css", "wxss"];

/// File extensions formatted as SCSS (VS Code Prettier 3.7.4).
pub(crate) const FMT_EXT_SCSS: &[&str] = &["scss"];

/// File extensions formatted as Less (VS Code Prettier 3.7.4).
pub(crate) const FMT_EXT_LESS: &[&str] = &["less"];

/// File extensions formatted as HTML (VS Code Prettier 3.7.4).
pub(crate) const FMT_EXT_HTML: &[&str] = &["html", "htm"];

/// File extensions formatted as Vue SFC (VS Code Prettier 3.7.4).
pub(crate) const FMT_EXT_VUE: &[&str] = &["vue"];

/// File extensions classified as plain UTF-8 text (VS Code save no-op).
pub(crate) const FMT_EXT_PLAIN_TEXT: &[&str] = &[
    "sh",
    "bash",
    "zsh",
    "txt",
    "mk",
    "dockerfile",
    "env",
    "gitignore",
    "dockerignore",
    "editorconfig",
    "conf",
    "cfg",
    "ini",
    "properties",
    "xml",
    "svg",
];

/// Exact filenames classified as plain text with significant leading tabs (VS Code save no-op).
pub(crate) const FMT_NAME_PRESERVE_TABS: &[&str] = &["Makefile", "makefile", ".gitattributes"];

/// Exact extensionless or dotfile names classified as plain text (VS Code save no-op).
pub(crate) const FMT_NAME_PLAIN_TEXT: &[&str] = &[
    "Dockerfile",
    "LICENSE",
    ".gitignore",
    ".dockerignore",
    ".npmignore",
    ".prettierignore",
    ".eslintignore",
    ".vscodeignore",
    ".editorconfig",
    ".gitconfig",
    ".npmrc",
    ".env",
    ".env.example",
    ".bashrc",
    ".zshrc",
    "pre-commit",
    "commit-msg",
    "pre-push",
];

/// Filename prefix matching multi-dot Dockerfile variants (`Dockerfile.dev`, `Dockerfile.perf`).
pub(crate) const FMT_PREFIX_DOCKERFILE: &str = "Dockerfile.";

/// Filename prefix matching multi-dot environment files (`.env.local`, `.env.production`).
pub(crate) const FMT_PREFIX_DOTENV: &str = ".env.";

/// Error message emitted when `--check` detects unformatted text files.
pub(crate) const ERROR_TEXT_FMT_CHECK_FAILED: &str = "unformatted text files detected";

/// Maximum byte length of a file extension supported by `detect_format_kind`.
pub(crate) const FMT_EXT_MAX_LEN: usize = 16;

/// Stack buffer capacity used by `glob_match_path` before falling back to heap vectors.
pub(crate) const FMT_GLOB_STACK_CAP: usize = 256;

/// Minimum file count before `format_workspace_text_files` fans work across worker threads.
pub(crate) const FMT_PARALLEL_THRESHOLD: usize = 4;

/// Target files per worker thread to balance thread spawn overhead against multi-core throughput.
pub(crate) const FMT_FILES_PER_WORKER: usize = 10;

/// Leading dot byte for dotfile filename dispatch.
pub(crate) const FMT_BYTE_DOT: u8 = b'.';

/// Leading uppercase `D` byte for `Dockerfile*` filename dispatch.
pub(crate) const FMT_BYTE_UPPER_D: u8 = b'D';

/// Leading uppercase `L` byte for `LICENSE` filename dispatch.
pub(crate) const FMT_BYTE_UPPER_L: u8 = b'L';

/// Leading uppercase `M` byte for `Makefile` filename dispatch.
pub(crate) const FMT_BYTE_UPPER_M: u8 = b'M';

/// Lowercase ASCII `c` byte for filename and extension dispatch.
pub(crate) const FMT_BYTE_LOWER_C: u8 = b'c';

/// Lowercase ASCII `h` byte for extension dispatch.
pub(crate) const FMT_BYTE_LOWER_H: u8 = b'h';

/// Lowercase ASCII `j` byte for extension dispatch.
pub(crate) const FMT_BYTE_LOWER_J: u8 = b'j';

/// Lowercase ASCII `l` byte for extension dispatch.
pub(crate) const FMT_BYTE_LOWER_L: u8 = b'l';

/// Lowercase ASCII `m` byte for filename and extension dispatch.
pub(crate) const FMT_BYTE_LOWER_M: u8 = b'm';

/// Lowercase ASCII `p` byte for filename and extension dispatch.
pub(crate) const FMT_BYTE_LOWER_P: u8 = b'p';

/// Lowercase ASCII `r` byte for extension dispatch.
pub(crate) const FMT_BYTE_LOWER_R: u8 = b'r';

/// Lowercase ASCII `s` byte for extension dispatch.
pub(crate) const FMT_BYTE_LOWER_S: u8 = b's';

/// Lowercase ASCII `t` byte for extension dispatch.
pub(crate) const FMT_BYTE_LOWER_T: u8 = b't';

/// Lowercase ASCII `v` byte for extension dispatch.
pub(crate) const FMT_BYTE_LOWER_V: u8 = b'v';

/// Lowercase ASCII `w` byte for extension dispatch.
pub(crate) const FMT_BYTE_LOWER_W: u8 = b'w';

/// Lowercase ASCII `y` byte for extension dispatch.
pub(crate) const FMT_BYTE_LOWER_Y: u8 = b'y';

/// First bytes of extensions that can only map to `FileFormatKind::PlainText`.
pub(crate) const FMT_PLAIN_TEXT_ONLY_FIRST_BYTES: &[u8] = b"bdegipxz";

/// Path separator byte used in glob matching.
pub(crate) const FMT_GLOB_SLASH: u8 = b'/';

/// Wildcard star byte used in glob matching.
pub(crate) const FMT_GLOB_STAR: u8 = b'*';

/// Single-character wildcard question byte used in glob matching.
pub(crate) const FMT_GLOB_QUESTION: u8 = b'?';