import { TreeLike } from './tree'; /** * Modifies or initializes a `lerna.json` configuration file within a specified directory. * This function ensures that the Lerna configuration adheres to a standard schema and sets default values for various properties if they are not already specified. * * @param {TreeLike} tree - The file system abstraction that provides methods to read and write files. * @param {string} [baseDir=''] - The base directory path where the `lerna.json` file is located or will be created. Defaults to the current directory if not specified. * * The function performs the following operations on the `lerna.json` file: * - Sets the `$schema` property to the Lerna JSON schema URL if it is not already defined. * - Removes the `useWorkspaces` property if it exists, as its presence can conflict with other settings. * - Sets the `version` property to 'independent' to allow independent version management of packages if not specified. * - Sets the `npmClient` property to 'yarn' as the default client for managing node packages if not specified. * - Ensures the `command` object exists and initializes nested properties within it: * - `command.version` object is ensured and initialized with default settings for managing versions: * - `message` set to a default release message. * - `conventionalCommits` enabled to use conventional commit messages for versioning. * - `allowBranch` array is populated with default branch names and patterns that are allowed for releases. * - `ignoreChanges` array is populated with patterns of files to ignore when detecting changes for versioning. * - Creates the `lerna.json` file if it does not exist. * * Note: This function relies on `UpdateJsonFile` to read, modify, and write the JSON file, and `CoerceArrayItems` to ensure array properties contain specific default values. */ export declare function CoerceLernaJson(tree: TreeLike, baseDir?: string): void;