Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public static createVirtualTempPackage(packageJsonFilename: string, installFolderName: string): Package {
const packageJson: IPackageJson = JsonFile.loadJsonFile(packageJsonFilename);
const npmPackage: readPackageTree.PackageNode = {
children: [],
error: undefined,
id: 0,
isLink: false,
package: packageJson,
parent: undefined,
path: installFolderName,
realpath: installFolderName
};
return Package.createFromNpm(npmPackage);
}