turborepo-template-upgrade
Version:
Upgrade projects based on a Turborepo template using selective git diffs, with support for ignore paths and skipped packages.
18 lines (17 loc) • 909 B
TypeScript
import { type UpgradeConfig } from "./config";
export type { UpgradeConfig as UpgradeOptions } from "./config";
/**
* Upgrade a repo created from the turborepo template.
*
* Features:
* - Ensures git tree is clean before applying changes.
* - Auto-adds "template" remote if missing.
* - Uses `.turborepo-template.lst` to track last applied template commit.
* - Generates a patch from template diff and applies with a 3-way merge.
* - Skips docs, lib, and user-removed directories (`scripts/templates`, `examples/express`, `packages/logger`).
* - Always runs from repo root (where `pnpm-lock.yaml` and `pnpm-workspace.yaml` exist).
*
* @param lastTemplateRepoCommit Optional SHA of last applied template commit.
* @param options Configuration options for the upgrade process.
*/
export declare const upgradeTemplate: (lastTemplateRepoCommit?: string, cliOptions?: UpgradeConfig) => Promise<void>;