Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions bin/licensetool
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ class LicenseMap {
});
})();

const copyright = packageConfig.copyright;

// Resolve license text
const licenseContent = (() => {
if (packageConfig.licenseContent) {
Expand Down Expand Up @@ -153,10 +155,11 @@ class LicenseMap {
let entry = data.find(
(localEntry) =>
localEntry.licenseName === licenseName &&
localEntry.licenseContent === licenseContent
localEntry.licenseContent === licenseContent &&
localEntry.copyright === copyright
);
if (!entry) {
entry = { licenseName, licenseContent, packageNames: [] };
entry = { licenseName, licenseContent, packageNames: [], copyright };
data.push(entry);
}
entry.packageNames.push(packageName);
Expand All @@ -178,6 +181,10 @@ class LicenseMap {
buf.push("");
buf.push("=".repeat(entry.licenseName.length + 1));
buf.push(entry.licenseName);
if (entry.copyright) {
buf.push("");
buf.push(entry.copyright);
}
buf.push("=".repeat(entry.licenseName.length + 1));
buf.push("");
buf.push(entry.licenseContent);
Expand Down