diff --git a/rollup.config.js b/rollup.config.js index 0bc75b5..79aae80 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -316,10 +316,15 @@ Dependencies: `, }, thirdParty: { - allow: { - test: '(MIT OR BSD-3-Clause OR Apache-2.0 OR LGPL-2.1-or-later)', - failOnUnlicensed: true, - failOnViolation: true, + allow(dependency) { + let licenses = [ + 'MIT', '(MIT OR GPL-3.0-or-later)', 'Apache-2.0', '(Apache-2.0)', + 'LGPL-2.1-or-later', 'BSD-3-Clause', 'BSD-2-Clause', 'BSD' + ]; + if (!licenses.includes(dependency.license)) { + throw new Error(`Unknown license for ${dependency.name}: ${dependency.license}`); + } + return true; }, }, }),