From 4e3d7932455a013b6c8ffa403f1468e7a84fae5a Mon Sep 17 00:00:00 2001 From: Mickael Jeanroy Date: Sun, 3 Sep 2023 21:10:38 +0200 Subject: [PATCH] chore: update README --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index cf18066c..edfc6406 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ module.exports = { thirdParty: { includePrivate: true, // Default is false. + multipleVersions: true, // Default is false. output: { file: path.join(__dirname, 'dist', 'dependencies.txt'), encoding: 'utf-8', // Default is utf-8. @@ -307,8 +308,33 @@ license({ }) ``` +Starting with version `3.1.0`, you can also use the `multipleVersions` option to track dependencies in different version as a different dependency. +It can be particularly useful in case a dependency changed its license between two versions. + +Note that this option is `false` by default (mainly to keep backward compatibility). + +```javascript +license({ + thirdParty: { + includePrivate: false, + multipleVersions: true, + output: { + file: path.join(__dirname, 'dist', 'dependencies.txt'), // Path of the license report + encoding: 'utf-8', // default is UTF-8 + template(dependencies) { + return dependencies.map((dependency) => `${dependency.name}:${dependency.version} -- ${dependency.license}`).join('\n'); + }, + }, + }, +}) +``` + ## Changelogs +- 3.1.0 + - Add `thirdParty.multipleVersions` option ([#1528](https://github.com/mjeanroy/rollup-plugin-license/pull/1528)) +- 3.0.0 + - Support rollup^3.0.0 - 2.8.0 - Relax production dependency versions ([#1128]()https://github.com/mjeanroy/rollup-plugin-license/issues/1128) - Update dependencies