/** * Policy settings for the PackageLicense repo policy. * * @alpha */ export interface PackageLicenseSettings { /** * Whether to skip validation for private packages. * * @defaultValue true * * @remarks * * Private packages (those with `private: true` in package.json) are typically * not published and may not need a LICENSE file. Set to `false` to require * LICENSE files for all packages. */ skipPrivate?: boolean; /** * The name of the LICENSE file to look for and sync. * * @defaultValue "LICENSE" */ licenseFileName?: string; } /** * A repo policy that ensures each package has a LICENSE file that matches the root LICENSE. * * @remarks * * This policy is essential for monorepos where individual packages are published * to npm. Each published package should include a LICENSE file, and it should * match the root repository's LICENSE to ensure consistent licensing. * * The policy: * 1. Checks if a LICENSE file exists in the package directory * 2. Compares it with the root LICENSE file * 3. Can auto-fix by copying the root LICENSE to the package directory * * By default, private packages are skipped since they're not published. * * @example * ```typescript * import { makePolicy } from "repopo"; * import { PackageLicense } from "repopo/policies"; * * const config: RepopoConfig = { * policies: [ * // Use defaults (skip private, look for LICENSE) * makePolicy(PackageLicense), * * // Or require LICENSE for all packages including private * makePolicy(PackageLicense, { skipPrivate: false }), * ], * }; * ``` * * @alpha */ export declare const PackageLicense: import("../policy.js").PolicyShape; //# sourceMappingURL=PackageLicense.d.ts.map