Skip to content

Commit

Permalink
🔖 Prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
GertjanReynaert committed Dec 22, 2021
1 parent 1f4e428 commit 77f7bb3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions dist/licenseUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
const isValidLicense = license => validLicense.some(i => i === license);

exports.isValidLicense = isValidLicense;
4 changes: 2 additions & 2 deletions dist/packageUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
};
}

0 comments on commit 77f7bb3

Please sign in to comment.