Support for list of allowed licenses for 3rdpartylicenses.txt
- Langage dominant
- TypeScript
- Étoiles
- 27k
- Forks
- 11.8k
- Merge moyen
- 14 h 23 min
- PR mergées (30 j)
- 162
Description
### 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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez dans packages/angular/build/src/builders/application/execute-build.ts, autour de la génération de 3rdpartylicenses.txt mentionnée dans l’issue, puis suivez la manière dont les licences du build final sont collectées. Définissez comment fournir à ng build une liste de licences autorisées séparées par des virgules et comment une licence non autorisée entraîne un échec. Le travail est terminé lorsque le build vérifie les licences générées du build plutôt que des packages installés sans rapport.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- build-system, cli
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100