lockfile-info
Version:
Info about an npm project - which lockfile version, which lockfile(s) are present, etc.
14 lines (12 loc) • 426 B
TypeScript
declare namespace npmInfo {
type npmInfoObject = {
hasPackageJSON: boolean;
hasNodeModulesDir: boolean;
hasLockfile: boolean;
hasPackageLock: boolean;
hasShrinkwrap: boolean;
lockfileVersion: (typeof NaN) | 1 | 2 | 3; // https://github.com/microsoft/TypeScript/issues/47347
};
}
declare function npmInfo(cwd?: string): Promise<npmInfo.npmInfoObject>;
export = npmInfo;