From 3826dab62accf0c7666293559f4e6cc9a58398e8 Mon Sep 17 00:00:00 2001 From: Yuya Unno Date: Fri, 30 Jun 2023 17:51:33 +0900 Subject: [PATCH 1/2] Show copyright --- bin/licensetool | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/licensetool b/bin/licensetool index 48c7f77..743454a 100755 --- a/bin/licensetool +++ b/bin/licensetool @@ -112,6 +112,8 @@ class LicenseMap { }); })(); + const copyright = packageConfig.copyright; + // Resolve license text const licenseContent = (() => { if (packageConfig.licenseContent) { @@ -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); @@ -177,6 +180,9 @@ class LicenseMap { } buf.push(""); buf.push("=".repeat(entry.licenseName.length + 1)); + if (entry.copyright) { + buf.push(entry.copyright); + } buf.push(entry.licenseName); buf.push("=".repeat(entry.licenseName.length + 1)); buf.push(""); From 13c2651c364bac1eab2aacb2560725bf97654412 Mon Sep 17 00:00:00 2001 From: Yuya Unno Date: Fri, 30 Jun 2023 18:05:25 +0900 Subject: [PATCH 2/2] Change line --- bin/licensetool | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/licensetool b/bin/licensetool index 743454a..6e82677 100755 --- a/bin/licensetool +++ b/bin/licensetool @@ -180,10 +180,11 @@ 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(entry.licenseName); buf.push("=".repeat(entry.licenseName.length + 1)); buf.push(""); buf.push(entry.licenseContent);