UNPKG

lerna

Version:

Lerna is a fast, modern build system for managing and publishing multiple JavaScript/TypeScript packages from the same repository

13 lines (11 loc) 420 B
// libs/commands/publish/src/lib/get-packages-without-license.ts import path from "path"; function getPackagesWithoutLicense(project, packagesToPublish) { return project.getPackageLicensePaths().then((licensePaths) => { const licensed = new Set(licensePaths.map((lp) => path.dirname(lp))); return packagesToPublish.filter((pkg) => !licensed.has(pkg.location)); }); } export { getPackagesWithoutLicense };