Interface PackageInfo

Contents of package.json, plus the packageJsonPath

interface PackageInfo {
    dependencies?: {
        [dep: string]: string;
    };
    devDependencies?: {
        [dep: string]: string;
    };
    group?: string;
    name: string;
    optionalDependencies?: {
        [dep: string]: string;
    };
    packageJsonPath: string;
    peerDependencies?: {
        [dep: string]: string;
    };
    private?: boolean;
    repository?: string | {
        directory?: string;
        type: string;
        url: string;
    };
    scripts?: {
        [scriptName: string]: string;
    };
    version: string;
    workspaces?: string[] | {
        catalog?: Catalog;
        catalogs?: NamedCatalogs;
        nohoist?: string[];
        packages: string[];
        [key: string]: any;
    };
    [key: string]: any;
}

Indexable

[key: string]: any

Properties

dependencies?: {
    [dep: string]: string;
}

Type declaration

  • [dep: string]: string
devDependencies?: {
    [dep: string]: string;
}

Type declaration

  • [dep: string]: string
group?: string
name: string
optionalDependencies?: {
    [dep: string]: string;
}

Type declaration

  • [dep: string]: string
packageJsonPath: string

Absolute path to this package.json file

peerDependencies?: {
    [dep: string]: string;
}

Type declaration

  • [dep: string]: string
private?: boolean
repository?: string | {
    directory?: string;
    type: string;
    url: string;
}

Type declaration

  • Optional directory?: string
  • type: string
  • url: string
scripts?: {
    [scriptName: string]: string;
}

Type declaration

  • [scriptName: string]: string
version: string
workspaces?: string[] | {
    catalog?: Catalog;
    catalogs?: NamedCatalogs;
    nohoist?: string[];
    packages: string[];
    [key: string]: any;
}

Workspace info, only in the root package.json for certain managers. If an array of strings, it's a list of workspace package patterns.

Type declaration

  • [key: string]: any
  • Optional catalog?: Catalog

    midgard-yarn-strict catalog definition (yarn4/pnpm use yaml config)

  • Optional catalogs?: NamedCatalogs

    midgard-yarn-strict named catalog definition (yarn4/pnpm use yaml config)

  • Optional nohoist?: string[]
  • packages: string[]

    List of workspace package patterns