Skip to content

Commit

Permalink
rollup: fix licence checking plugin config
Browse files Browse the repository at this point in the history
dialog-polyfill use an invalid license field:
GoogleChrome/dialog-polyfill#227
  • Loading branch information
zsuffad committed Aug 27, 2024
1 parent a76844a commit a29bc68
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
},
}),
Expand Down

0 comments on commit a29bc68

Please sign in to comment.