Installation
npm install --save @types/lerna__package
Summary
This package contains type definitions for @lerna/package (https://github.com/lerna/lerna/tree/main/core/package).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lerna__package.
import type { Result } from "npm-package-arg";
export type RawManifest = {
name: string;
version: string;
private?: boolean;
bin?: Record<string, string> | string;
scripts?: Record<string, string>;
dependencies?: Record<string, string>;
devDependencies?: Record<string, string>;
optionalDependencies?: Record<string, string>;
peerDependencies?: Record<string, string>;
publishConfig?: Record<string, string>;
workspaces?: string[] | { packages: string[] };
} & { [key: string]: any };
export class Package {
static lazy(ref: string | Package | RawManifest, dir?: string): Package;
constructor(pkg: RawManifest, location: string, rootPath?: string);
name: string;
get location(): string;
get private(): boolean;
get resolved(): Result;
get rootPath(): string;
get scripts(): RawManifest["scripts"];
get bin(): RawManifest["scripts"];
get binLocation(): string;
get manifestLocation(): string;
get nodeModuleLocation(): string;
get __isLernaPackage(): boolean;
get version(): string;
set version(v: string);
get contents(): string;
set contents(subDirectory: string);
get dependencies(): RawManifest["dependencies"];
get devDependencies(): RawManifest["devDependencies"];
get optionalDependencies(): RawManifest["optionalDependencies"];
get peerDependencies(): RawManifest["peerDependencies"];
get<K extends keyof RawManifest | string>(key: K): RawManifest[K];
set<K extends keyof RawManifest | string>(key: K, val: RawManifest[K]): this;
toJSON(): RawManifest;
refresh(): Promise<this>;
serialize(): Promise<this>;
updateLocalDependency(resolved: Result, depVersion: string, savePrefix: string): void;
}
Additional Details
Credits
These definitions were written by DonMahallem.