Skip to content

Commit

Permalink
chore: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
mjeanroy committed Sep 3, 2023
1 parent 1745d11 commit 4e3d793
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4e3d793

Please sign in to comment.