angular / angular/angular-cli

Support for list of allowed licenses for 3rdpartylicenses.txt

Aberta
#31,523 4 comentários 22 reações 0 responsáveis Ver no GitHub
angular/build:application feature feature: under consideration
Linguagem predominante
TypeScript
Estrelas
27k
Forks
11.8k
Merge médio
14h 23min
PRs com merge (30d)
162

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece em packages/angular/build/src/builders/application/execute-build.ts, próximo à geração de 3rdpartylicenses.txt vinculada na issue, e depois rastreie como as licenças do build final são coletadas. Defina como uma lista de licenças permitidas separada por vírgulas é fornecida ao ng build e como uma licença não permitida causa uma falha. Considera-se concluído quando o build verifica as licenças geradas do build, em vez de pacotes instalados não relacionados.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
angular, typescript
Domínio
build-system, cli
Tipo de issue
Funcionalidade
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.