UNPKG

lerna

Version:

Lerna is a fast, modern build system for managing and publishing multiple JavaScript/TypeScript packages from the same repository

118 lines (117 loc) 4.82 kB
import { Arguments, Command, CommandConfigOptions, Package, PreInitializedProjectData, ProjectGraphProjectNodeWithPackage } from "@lerna/core"; import { createReleaseClient, ReleaseClientType } from "./lib/create-release"; import * as childProcess from "@lerna/child-process"; export declare function factory(argv: Arguments<VersionCommandConfigOptions>, preInitializedProjectData?: PreInitializedProjectData): VersionCommand; interface VersionCommandConfigOptions extends CommandConfigOptions { allowBranch?: string | string[]; conventionalCommits?: boolean; amend?: boolean; ciBehindBehavior?: "error" | "skip"; json?: boolean; commitHooks?: boolean; gitRemote?: string; gitTagVersion?: boolean; syncDistVersion?: boolean; granularPathspec?: boolean; push?: boolean; signGitCommit?: boolean; signoffGitCommit?: boolean; signGitTag?: boolean; forceGitTag?: boolean; tagVersionPrefix?: string; tagVersionSeparator?: string; createRelease?: ReleaseClientType; changelog?: boolean; exact?: boolean; conventionalPrerelease?: string; conventionalGraduate?: string; forceConventionalGraduate?: boolean; private?: boolean; forcePublish?: boolean | string | string[]; bump?: string; preid?: string; buildMetadata?: string; gitTagCommand?: string; message?: string; npmClientArgs?: string[]; runScriptsOnLockfileUpdate?: boolean; changelogPreset?: string; changelogEntryAdditionalMarkdown?: string; conventionalBumpPrerelease?: boolean; yes?: boolean; rejectCycles?: boolean; premajorVersionBump?: "default" | "force-patch"; } export declare class VersionCommand extends Command { options: VersionCommandConfigOptions; commitAndTag?: boolean; pushToRemote?: boolean; allowBranch?: boolean; gitRemote?: string; tagPrefix?: string; releaseClient?: ReturnType<typeof createReleaseClient>; releaseNotes?: { name: string; notes: string; }[]; gitOpts?: { amend?: boolean; commitHooks?: boolean; granularPathspec?: boolean; signGitCommit?: boolean; signoffGitCommit?: boolean; signGitTag?: boolean; forceGitTag?: boolean; overrideMessage?: boolean; }; savePrefix?: string; currentBranch?: string; updates: ProjectGraphProjectNodeWithPackage[]; tags?: string[]; globalVersion?: string; hasRootedLeaf?: boolean; runPackageLifecycle?: (pkg: Package, script: string) => Promise<void>; runRootLifecycle?: (script: string) => Promise<void> | void; updatesVersions?: Map<string, string>; packagesToVersion?: Package[]; projectsWithPackage: ProjectGraphProjectNodeWithPackage[]; premajorVersionBump?: "default" | "force-patch"; get otherCommandConfigs(): string[]; get requiresGit(): boolean; /** * Due to lerna publish's legacy of being backwards compatible with running versioning and publishing * in a single step, we need to be able to receive any project data which might already exist from the * publish command (in the case that it invokes the version command from within its implementation details). */ constructor(argv: Arguments<VersionCommandConfigOptions>, preInitializedProjectData?: PreInitializedProjectData); configureProperties(): void; initialize(): Promise<boolean>; execute(): Promise<{ updates: ProjectGraphProjectNodeWithPackage[]; updatesVersions: Map<string, string> | undefined; }>; /** * Gets a mapping of project names to their package's new version. * @returns {Promise<Record<string, string>>} A map of project names to their package's new versions */ getVersionsForUpdates(): Promise<Map<string, string>>; reduceVersions(getVersion: (node: ProjectGraphProjectNodeWithPackage) => string | Promise<string>): Promise<Map<string, string>>; getPrereleasePackageNames(): string[]; recommendVersions(resolvePrereleaseId: (existingPreid: string) => string): Promise<Map<string, string>>; setGlobalVersionFloor(): void; setGlobalVersionCeiling(versions: Map<string, string>): string; setUpdatesForVersions(versions: Map<string, string>): void; confirmVersions(): true | Promise<boolean>; updatePackageVersions(): Promise<void>; private updateDependencies; commitAndTagUpdates(): Promise<void>; gitCommitAndTagVersionForUpdates(): Promise<string[]>; gitCommitAndTagVersion(): Promise<string[]>; gitPushToRemote(): Promise<childProcess.LernaReturnValue>; private hasChanges; } declare const commonJsExport: typeof factory & { VersionCommand: typeof VersionCommand; }; export default commonJsExport; export { commonJsExport as "module.exports" };