-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add automatic JS license generation #11810
Conversation
lint error |
Lint fixed. Fingers crossed the integration test passes. |
I guess webpack files are not available by the time these test run. Should I just remove that test or try getting the webpack build in? (which might cause the tests to run 2-3 mins longer) |
@silverwind I think we can remove this url from the test |
You're right. While I do think that there is some value in testing the webpack build output, it's probably not warranted the extra load it creates on CI. Frontend build was removed in #11159 from the testing steps, btw. |
But it is not compatible with librejs imho |
LibreJS is a meme imho. Its Firefox extension has a whopping 257 users and their approach can not possibly work with bundlers like webpack anyways. |
I'm not against the idea of librejs but I see no sane way of handing out the licensing info in a parsable format. Of course, if there is a webpack plugin to handle this task, I'm all for adding it, but there appears to be none. We certainly don't want to manually handle this like we did before (the file had many errors and was generally inaccurate because it did not list indirect dependencies). Also see https://lists.gnu.org/archive/html/bug-librejs/2019-02/msg00003.html |
🚀 |
BTW we do have the option to generate HTML as well using this mechanism but I see no point in doing it just for Librejs because they can only block non-free scripts on a per-file level so for example would block our |
Removed librejs file and replaced it with a plaintext file that is built from all JS dependencies that are included in the webpack build. It does not cover the few remaining statically vendored files and fomantic is added manually because it's not yet in the webpack build process. Fixes: go-gitea#11630
Rebased and added one more tweak that localizes the previously hardcoded word |
Reduced footer text to just "Licences". I feel it's not fully correct to label them as JS as we're also depending on modules that only provide like svg/css/fonts and more. |
With vendored golang dependencies, it shouldn't be too hard to also add them to the output. Once they are unvendored, it will be more tricky thought and we'd probably need a tool to retrieve them. |
* Add automatic JS license generation Removed librejs file and replaced it with a plaintext file that is built from all JS dependencies that are included in the webpack build. It does not cover the few remaining statically vendored files and fomantic is added manually because it's not yet in the webpack build process. Fixes: go-gitea#11630 * fix lint * remove jslicense, we're not librejs compatible any more * remove license.txt test as it depens on absent files * small optimization * trailing comma * localize and capitalize the word 'licenses' * reduce text to just 'Licenses' Co-authored-by: Lauris BH <[email protected]>
For the sake of performance and simplicity, remove this seemingly useless license header. It's related to LibreJS which we already pretty much killed of in an earlier commit [1]. Initially added in [2]. Note that the StaticUrlPrefix here was never actually correctly resolved and has rendered including the template fences. [1] go-gitea#11810 [2] go-gitea@a915a09
For the sake of performance and simplicity, remove this seemingly useless license header. It's related to LibreJS which we already pretty much killed of in an earlier commit [1]. Initially added in [2]. Note that the StaticUrlPrefix here was never actually correctly resolved and has rendered including the template fences. [1] #11810 [2] a915a09 Co-authored-by: techknowlogick <[email protected]>
Removed librejs file and replaced it with a plaintext file that is built from all JS dependencies that are included in the webpack build. It does not cover the few remaining statically vendored files and fomantic is added manually because it's not yet in the webpack build process.
Fixes: #11630
Sample License (source):