Support for list of allowed licenses for 3rdpartylicenses.txt
- Lingua principale
- TypeScript
- Stelle
- 27k
- Fork
- 11.8k
- Merge medio
- 14h 23m
- PR unite (30g)
- 162
Descrizione
### 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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia da packages/angular/build/src/builders/application/execute-build.ts, nei pressi della generazione di 3rdpartylicenses.txt collegata nell’issue, quindi segui il modo in cui vengono raccolte le licenze del build finale. Definisci come fornire a ng build un elenco di licenze consentite separate da virgole e come una licenza non consentita causi un errore. Il lavoro è completato quando il build controlla le licenze generate del build anziché pacchetti installati non correlati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, typescript
- Ambito
- build-system, cli
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100