/** * Utility class for setting up Conventional Commits tooling in a Node.js project. * * The `SetupConventionalUtil` automates the installation and configuration of Husky and Commitlint, * ensuring that commit messages follow the Conventional Commits specification. It detects the project's * package manager (npm, yarn, or pnpm), installs necessary dependencies, configures scripts, and sets up * Husky Git hooks and Commitlint configuration files. * * @remarks * This utility is intended to be used in Node.js project environments and assumes that the project * already contains a `package.json` file. It handles differences between Yarn v1 and v2+ when configuring * scripts and ensures that all Husky hooks have the correct executable permissions. * * @example * ```typescript * const util = new SetupConventionalUtil(); * await util.setupConventional('/path/to/project'); * ``` */ export declare class SetupConventionalUtil { private readonly filesUtils; constructor(); /** * Sets up Conventional Commits tooling in a Node.js project at the specified root directory. * * This method performs the following steps: * 1. Detects the package manager in use (npm, yarn, or pnpm). * 2. Installs Husky for Git hooks management. * 3. Configures the `prepare` script in `package.json` to initialize Husky, handling differences between Yarn v1 and v2+. * 4. Runs the `prepare` script to set up Husky. * 5. Installs Commitlint and its conventional config for commit message linting. * 6. Initializes the `.husky` directory and removes any existing `commit-msg` hook and `commitlint.config.js`. * 7. Creates a new `commitlint.config.js` and Husky `commit-msg` hook with the appropriate content. * 8. Ensures Husky hooks have executable permissions. * * @param root - The root directory of the Node.js project where Conventional Commits tooling should be set up. * @returns A Promise that resolves when the setup is complete. */ setupConventional(root: string): Promise; }