import { type Fs, type Ps } from "webappwiz/system"; import type { Package, Workspace } from "./workspace.js"; /** * The package.json files a release reads and stamps. One version covers the * whole workspace, and the root manifest is where it lives. */ /** * What a `ManifestWorkspace` reads through and spawns `bun` with; the real * filesystem and process by default. */ export interface ManifestWorkspaceOptions { fs?: Fs; ps?: Ps; } export declare class ManifestWorkspace implements Workspace { /** The directory whose package.json declares the workspaces. */ readonly root: string; private readonly fs; private readonly ps; constructor( /** The directory whose package.json declares the workspaces. */ root: string, opts?: ManifestWorkspaceOptions); /** * Finds the workspace `from` sits in, climbing until a manifest claims one. * A repo holding a single package declares no workspaces, so when nothing * above claims any, the nearest named manifest is a workspace of one. */ static at(from: string, opts?: ManifestWorkspaceOptions): Promise; /** The version every package in the workspace shares. */ version(): Promise; packages(): Promise; /** * Stamps `version` into every package, `bun.lock`, and the root manifest, * in lockstep. The root goes last, because it is the version a * release reads: stamping it first would leave a run that died partway * reading as the version it never finished, and send the next one past it. */ setVersion(version: string): Promise; private dirs; /** * Brings `bun.lock` up to the versions just stamped, as the next * `bun install` would; left behind, that install dirties the tree the * release just committed. bun writes it, so its format stays bun's business. */ private lock; private manifest; private stamp; }