# @types/lerna__package

> TypeScript definitions for @lerna/package

Latest version **5.1.3** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/lerna__package
pnpm add @types/lerna__package
yarn add @types/lerna__package
bun add @types/lerna__package
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 5.1.3 |
| Published | 2023-11-07 |
| First published | 2022-01-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51444 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/lerna__package
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lerna__package
- npm.io page: https://npm.io/package/@types/lerna__package

## Dependencies (1)

- [@types/npm-package-arg](https://npm.io/package/@types/npm-package-arg.md) *

## Recent versions

- 5.1.3 (latest) — 2023-11-07
- 5.1.1 (ts4.3) — 2023-08-30
- 5.1.0 (ts3.9) — 2022-06-08
- 4.0.1 (ts3.8) — 2022-01-06
- 5.1.2 — 2023-10-18
- 4.0.2 — 2022-03-26
- 4.0.0 — 2022-01-02

## README

# 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.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lerna__package/index.d.ts)
````ts
import type { Result } from "npm-package-arg";

/**
 * Partial package.json representation
 */
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 };
/**
 * Lerna's internal representation of a local package, with
 * many values resolved directly from the original JSON.
 */
export class Package {
    /**
     * Create a Package instance from parameters, possibly reusing existing instance.
     * @param ref A path to a package.json file, Package instance, or JSON object
     * @param [dir] If `ref` is a JSON object, this is the location of the manifest
     */
    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;
    /**
     * Provide shallow copy for munging elsewhere
     */
    toJSON(): RawManifest;

    /**
     * Refresh internal state from disk (e.g., changed by external lifecycles)
     */
    refresh(): Promise<this>;
    /**
     * Write manifest changes to disk
     */
    serialize(): Promise<this>;
    /**
     * Mutate local dependency spec according to type
     */
    updateLocalDependency(resolved: Result, depVersion: string, savePrefix: string): void;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:38 GMT
 * Dependencies: [@types/npm-package-arg](https://npmjs.com/package/@types/npm-package-arg)

# Credits
These definitions were written by [DonMahallem](https://github.com/donmahallem).

---
_Source: https://npm.io/package/@types/lerna__package · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
