Support for list of allowed licenses for 3rdpartylicenses.txt
- 主要言語
- TypeScript
- スター
- 27k
- フォーク
- 11.8k
- 平均マージ
- 14時間 23分
- マージ済み PR(30日)
- 162
説明
### Command
build
### Description
When running `ng build` angular will generate the file `3rdpartylicenses.txt` which contains information about 3rd party licenses included in the build result.
While this is awesome, it would be good to have an option to allow licenses that can be included in the build. For example `MIT`, `Apache-2.0` and as soon as a license which is not allowed is included, the build should fail.
https://github.com/angular/angular-cli/blob/ec7dd59e38f84db91f5a2e4ed653bbc54cb82d54/packages/angular/build/src/builders/application/execute-build.ts#L247-L253
### Describe the solution you'd like
In go, the package https://github.com/google/go-licenses for example supports `--allowed_licenses=`. As soon as a different license is found, the build fails. also [php](https://github.com/dominikb/composer-license-checker) or other languages have tools for this.
### Describe alternatives you've considered
Currently I'm trying to implement this using the npm package: https://www.npmjs.com/package/@onebeyond/license-checker
The issue is, that it includes a lot of npm packages which are not part of the final angular app - such as `argparse` for example.
コントリビューションガイド
調査の方向性
issue で関連付けられている 3rdpartylicenses.txt の生成箇所付近にある packages/angular/build/src/builders/application/execute-build.ts から開始し、その後、最終ビルドのライセンスがどのように収集されるかを追跡します。カンマ区切りの許可ライセンス一覧を ng build に渡す方法と、許可されていないライセンスによって失敗する方法を定義します。完了条件は、ビルドが無関係なインストール済みパッケージではなく、生成されたビルドのライセンスをチェックすることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- build-system, cli
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100