From 77f7bb31b6cdf28cd1ccd177fcfd04001e7a85c6 Mon Sep 17 00:00:00 2001 From: Gertjan Reynaert Date: Wed, 22 Dec 2021 15:46:58 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=96=20Prepare=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/licenseUtils.js | 11 +++++------ dist/packageUtils.js | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/dist/licenseUtils.js b/dist/licenseUtils.js index 35f268f..715b406 100644 --- a/dist/licenseUtils.js +++ b/dist/licenseUtils.js @@ -3,12 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.isValidLicense = isValidLicense; -exports.licenseSnippets = void 0; -const validLicense = ['MIT', 'BSD', 'Apache License', 'Creative Commons', 'GPL', 'Apache-2.0', 'BSD-3-Clause', "ISC"]; +exports.licenseSnippets = exports.isValidLicense = void 0; +const validLicense = ['MIT', 'BSD', 'Apache License', 'Creative Commons', 'GPL', 'Apache-2.0', 'BSD-3-Clause', 'ISC']; const licenseSnippets = ['MIT License', 'The GNU General Public License is a free, copyleft license for software and other kinds of works.']; exports.licenseSnippets = licenseSnippets; -function isValidLicense(license) { - return validLicense.some(i => i === license); -} \ No newline at end of file +const isValidLicense = license => validLicense.some(i => i === license); + +exports.isValidLicense = isValidLicense; \ No newline at end of file diff --git a/dist/packageUtils.js b/dist/packageUtils.js index 92fcdcb..13cf055 100644 --- a/dist/packageUtils.js +++ b/dist/packageUtils.js @@ -64,10 +64,10 @@ async function getPackageDescriptor(dep) { function getPackageInfo(pkg) { var _pkg$repository, _pkg$repository2; - const [url] = [pkg.homepage, (_pkg$repository = pkg.repository) === null || _pkg$repository === void 0 ? void 0 : _pkg$repository.url, (_pkg$repository2 = pkg.repository) === null || _pkg$repository2 === void 0 ? void 0 : _pkg$repository2.baseUrl, pkg.repo].filter(Boolean).filter(url => url.startsWith('https')); + const [url] = [pkg.homepage, (_pkg$repository = pkg.repository) === null || _pkg$repository === void 0 ? void 0 : _pkg$repository.url, (_pkg$repository2 = pkg.repository) === null || _pkg$repository2 === void 0 ? void 0 : _pkg$repository2.baseUrl, pkg.repo].filter(Boolean).filter(url => url === null || url === void 0 ? void 0 : url.startsWith('https')); return { version: pkg.version, license: pkg.license, - url + url: url ?? `https://npmjs.com/package/${pkg.name}` }; } \ No newline at end of file