From 0f0bc30c98079512c89298d6a5c0be96771a57a0 Mon Sep 17 00:00:00 2001 From: Andrii Kostenko Date: Thu, 4 Mar 2021 19:05:59 +0200 Subject: [PATCH 1/2] Support zero parity license for husky module --- lib/license.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/license.js b/lib/license.js index a46e291..05834d7 100644 --- a/lib/license.js +++ b/lib/license.js @@ -13,6 +13,7 @@ const LGPL = /(?:LESSER|LIBRARY) GENERAL PUBLIC LICENSE\s*Version ([^,]*)/i; const APACHE_VERSION = /\bApache License\s*Version ([^,\s]*)/i; const APACHE = /\bApache License\b/; const WTFPL = /\bWTFPL\b/; +const ZERO_PARITY_LICENSE = /\bZero Parity\b/; // https://creativecommons.org/publicdomain/zero/1.0/ const CC0_1_0 = /The\s+person\s+who\s+associated\s+a\s+work\s+with\s+this\s+deed\s+has\s+dedicated\s+the\s+work\s+to\s+the\s+public\s+domain\s+by\s+waiving\s+all\s+of\s+his\s+or\s+her\s+rights\s+to\s+the\s+work\s+worldwide\s+under\s+copyright\s+law,\s+including\s+all\s+related\s+and\s+neighboring\s+rights,\s+to\s+the\s+extent\s+allowed\s+by\s+law.\s+You\s+can\s+copy,\s+modify,\s+distribute\s+and\s+perform\s+the\s+work,\s+even\s+for\s+commercial\s+purposes,\s+all\s+without\s+asking\s+permission./i; // jshint ignore:line const PUBLIC_DOMAIN = /[Pp]ublic[\-_ ]*[Dd]omain/; @@ -41,6 +42,10 @@ module.exports = function exports(str = 'undefined') { if (typeof str === 'undefined' || !str || str === 'undefined') { return 'Undefined'; } + + if (ZERO_PARITY_LICENSE.test(str)) { + return 'Zero Parity*'; + } if (ISC_LICENSE.test(str)) { return 'ISC*'; From f89cc1988309839bfd15570e240c90728df1deb5 Mon Sep 17 00:00:00 2001 From: Andrii Kostenko Date: Thu, 4 Mar 2021 22:19:29 +0200 Subject: [PATCH 2/2] Update license.js --- lib/license.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/license.js b/lib/license.js index 05834d7..ae738f5 100644 --- a/lib/license.js +++ b/lib/license.js @@ -13,7 +13,7 @@ const LGPL = /(?:LESSER|LIBRARY) GENERAL PUBLIC LICENSE\s*Version ([^,]*)/i; const APACHE_VERSION = /\bApache License\s*Version ([^,\s]*)/i; const APACHE = /\bApache License\b/; const WTFPL = /\bWTFPL\b/; -const ZERO_PARITY_LICENSE = /\bZero Parity\b/; +const ZERO_PARITY_LICENSE = /\bParity\b/; // https://creativecommons.org/publicdomain/zero/1.0/ const CC0_1_0 = /The\s+person\s+who\s+associated\s+a\s+work\s+with\s+this\s+deed\s+has\s+dedicated\s+the\s+work\s+to\s+the\s+public\s+domain\s+by\s+waiving\s+all\s+of\s+his\s+or\s+her\s+rights\s+to\s+the\s+work\s+worldwide\s+under\s+copyright\s+law,\s+including\s+all\s+related\s+and\s+neighboring\s+rights,\s+to\s+the\s+extent\s+allowed\s+by\s+law.\s+You\s+can\s+copy,\s+modify,\s+distribute\s+and\s+perform\s+the\s+work,\s+even\s+for\s+commercial\s+purposes,\s+all\s+without\s+asking\s+permission./i; // jshint ignore:line const PUBLIC_DOMAIN = /[Pp]ublic[\-_ ]*[Dd]omain/;