UNPKG

@rnx-kit/align-deps

Version:

Manage dependencies within a repository and across many repositories

43 lines 2.12 kB
import type { PackageManifest } from "@rnx-kit/tools-node/package"; import type { AlignDepsConfig, Changes, ErrorCode, ManifestProfile, Options } from "../types"; type Report = { errors: Changes; errorCount: number; warnings: Changes["capabilities"]; }; /** * Builds a package manifest containing _all_ capabilities from profiles that * satisfy the specified requirements. * @param manifestPath The path to the package manifest * @param config Configuration from `package.json` or "generated" from command line flags * @returns A package manifest containing all capabilities */ export declare function buildManifestProfile(manifestPath: string, { kitType, alignDeps }: AlignDepsConfig): ManifestProfile; /** * Compares the package manifest with the desired profile and returns all * dependencies that are misaligned. * * Note that this function mutates the manifest when `write` is `true`. * * @param manifest The package manifest * @param profile The desired profile to compare against * @param options Whether misaligned dependencies should be updated * @returns A list of misaligned dependencies */ export declare function inspect(manifest: PackageManifest, profile: ManifestProfile, { noUnmanaged, write }: Pick<Options, "noUnmanaged" | "write">): Report; /** * Checks the specified package manifest for misaligned dependencies in place. * * Because the package is not configured, `align-deps` cannot know whether a * dependency should be declared as a direct or peer dependency. It can only * check whether the dependency is on the right version. * * @param manifestPath The path to the package manifest * @param options Options from command line * @param config Configuration from `package.json` or "generated" from command line flags * @param logError Function for outputting changes * @returns Whether the package needs changes */ export declare function checkPackageManifestUnconfigured(manifestPath: string, options: Options, config: AlignDepsConfig, logError?: (message?: any, ...optionalParams: any[]) => void): ErrorCode; export {}; //# sourceMappingURL=vigilant.d.ts.map