UNPKG

bit-bin

Version:

<a href="https://opensource.org/licenses/Apache-2.0"><img alt="apache" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a> <a href="https://github.com/teambit/bit/blob/master/CONTRIBUTING.md"><img alt="prs" src="https://img.shields.io/b

45 lines (44 loc) 2.04 kB
import { BitId } from '../../bit-id'; export declare type PackageJsonProps = { name?: string; version?: string; homepage?: string; main?: string; dependencies?: Record<string, any>; devDependencies?: Record<string, any>; peerDependencies?: Record<string, any>; license?: string; scripts?: Record<string, any>; workspaces?: string[]; private?: boolean; componentId?: BitId; }; export default class PackageJson { name?: string; version?: string; homepage?: string; main?: string; dependencies?: Record<string, any>; devDependencies?: Record<string, any>; peerDependencies?: Record<string, any>; componentRootFolder?: string; license?: string; scripts?: Record<string, any>; workspaces?: string[]; componentId?: BitId; constructor(componentRootFolder: string, { name, version, homepage, main, dependencies, devDependencies, peerDependencies, license, scripts, workspaces, componentId }: PackageJsonProps); static loadSync(componentRootFolder: string): PackageJson | null; static hasExisting(componentRootFolder: string): boolean; static findPath(dir: any): string | null; static findPackage(dir: any, addPaths?: any): any; static getPackageJson(pathStr: string): Promise<any>; static saveRawObject(pathStr: string, obj: Record<string, any>): Promise<void>; static addWorkspacesToPackageJson(rootDir: string, componentsDefaultDirectory: string, dependenciesDirectory: string, customImportPath: string | null | undefined): Promise<void>; static removeComponentsFromWorkspaces(rootDir: string, pathsTOoRemove: string[]): Promise<void>; static removeComponentsFromDependencies(rootDir: string, registryPrefix: any, componentIds: string[]): Promise<void>; static extractWorkspacesPackages(packageJson: { [k: string]: any; }): string[] | null; static updateWorkspacesPackages(packageJson: any, workspacesPackages: any): void; static throwForInvalidWorkspacesConfig(packageJson: any): void; }