mjeanroy / rollup-plugin-license

Rollup plugin to add license banner to the final bundle and output third party licenses
MIT License
105 stars 21 forks source link

Read also NOTICE file from the repository, as used/required by the Apache 2.0 license #1683

Closed mitar closed 3 months ago

mitar commented 4 months ago

First, thank you for this great plugin. It really nicely solves a big paint point of dealing with licenses.

Apache 2.0 license requires to bundle also any NOTICE file, if one exists in the repository, not just the LICENSE file. Could you please read that file as well and append it to licenseText, if it exists? Currently the code reads only LICENSE* file?

mjeanroy commented 4 months ago

Hi @mitar,

Thanks for your report!

It's definitely doable, thanks I didn't know the Apache 2.0 licence required the NOTICE file to be bundled as well, would you have a link I can read?

It seems quite easy to do, the only question I have is if it should be an option, or not. Said differently:

mitar commented 4 months ago

From the license:

If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.

mjeanroy commented 3 months ago

Hi @mitar,

I just published version 3.3.0 with this feature (the notice file will be included in the third party output). Feel free to re-open if you find an issue :)

mitar commented 3 months ago

Awesome, thank you!