Skip to content

Commit 889dfbc

Browse files
committedMar 10, 2024
fix: add missing multipleVersions option to validated schema
1 parent a64478a commit 889dfbc

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
 

‎src/license-plugin-option.js

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const SCHEMA = {
6262
validators.func(),
6363
validators.object({
6464
includePrivate: validators.boolean(),
65+
multipleVersions: validators.boolean(),
6566

6667
allow: [
6768
validators.string(),

‎test/integration/it.spec.js

+20
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,26 @@ describe('rollup-plugin-license', () => {
284284
});
285285
});
286286

287+
it('should generate bundle with multipleVersion flag', (done) => {
288+
const thirdPartyOutput = path.join(tmpDir.name, 'dependencies.txt');
289+
const rollupConfig = createRollupConfig({
290+
thirdParty: {
291+
includePrivate: false,
292+
multipleVersions: true,
293+
output: {
294+
file: thirdPartyOutput,
295+
},
296+
},
297+
});
298+
299+
writeBundle(rollupConfig).then(() => {
300+
verifyFile(thirdPartyOutput, done, (data) => {
301+
expect(warn).not.toHaveBeenCalled();
302+
expect(data.toString()).toContain('lodash');
303+
});
304+
});
305+
});
306+
287307
function createRollupConfig(licensePluginOptions) {
288308
return {
289309
input: path.join(__dirname, 'bundle.js'),

0 commit comments

Comments
 (0)
Please sign in to comment.