angular / angular/angular-cli

Support for list of allowed licenses for 3rdpartylicenses.txt

Abierto
#31,523 4 comentarios 22 reacciones 0 asignados Ver en GitHub
angular/build:application feature feature: under consideration
Lenguaje dominante
TypeScript
Estrellas
27k
Forks
11.8k
Merge medio
14 h 23 min
PR fusionados (30 d)
162

Descripción

### 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.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza en packages/angular/build/src/builders/application/execute-build.ts, alrededor de la generación de 3rdpartylicenses.txt enlazada en el issue, y luego sigue el proceso para ver cómo se recopilan las licencias del build final. Define cómo se proporciona a ng build una lista de licencias permitidas separadas por comas y cómo una licencia no permitida provoca un fallo. Se considera terminado cuando el build comprueba las licencias generadas del build en lugar de paquetes instalados no relacionados.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
angular, typescript
Área
build-system, cli
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.