UNPKG

syncpack

Version:

Manage multiple package.json files, such as in Lerna Monorepos and Yarn/Pnpm Workspaces

22 lines (21 loc) 871 B
import { DependencyType } from '../../constants'; import { SourceWrapper } from './get-wrappers'; export interface Installation { /** which section the package was installed in */ type: DependencyType; /** eg 'lodash' */ name: string; /** package.json file contents */ source: SourceWrapper; /** eg '0.1.0' */ version: string; } export interface InstalledPackage { /** eg 'lodash' */ name: string; /** each location this package is installed */ installations: Installation[]; } export declare function getDependencies(types: DependencyType[], wrappers: SourceWrapper[]): Generator<InstalledPackage>; export declare function getMismatchedDependencies(types: DependencyType[], wrappers: SourceWrapper[]): Generator<InstalledPackage>; export declare const sortByName: (a: InstalledPackage, b: InstalledPackage) => 0 | 1 | -1;