Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getAllPackages() {
const repository = new Repository();
return PackageUtilities.getPackages(repository);
}
const getAllPackages = function () {
const Repository = require('lerna/lib/Repository');
const PackageUtilities = require('lerna/lib/PackageUtilities');
return PackageUtilities.getPackages(new Repository());
};
function loadPackages({log = npmlog, packageConfigs} = {log: npmlog}) {
const repo = new Repository()
const effectivePackageConfigs = packageConfigs || repo.packageConfigs
if (packageConfigs) {
log.verbose('loadPackages', 'using provided packageConfigs', {
packageConfigs: effectivePackageConfigs
})
} else {
log.verbose('loadPackages', 'using default packageConfigs', {
packageConfigs: effectivePackageConfigs
})
}
const loadedPackages = PackageUtilities.getPackages({
rootPath: repo.rootPath,
packageConfigs: effectivePackageConfigs
})
const batched = PackageUtilities.topologicallyBatchPackages(loadedPackages)
return _.flatten(batched)
}