Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/lerna__package

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/lerna__package

TypeScript definitions for @lerna/package

  • 5.1.3
  • ts4.5
  • ts4.6
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

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

Credits

These definitions were written by DonMahallem.

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc