angular / angular/angular-cli

Support for list of allowed licenses for 3rdpartylicenses.txt

Offen
#31,523 4 Kommentare 22 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
angular/build:application feature feature: under consideration
Vorherrschende Sprache
TypeScript
Sterne
27k
Forks
11.8k
Ø Merge
14 Std. 23 Min.
Gemergte PRs (30 T.)
162

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne bei packages/angular/build/src/builders/application/execute-build.ts rund um die im Issue verknüpfte Generierung von 3rdpartylicenses.txt und verfolge anschließend nach, wie die Lizenzen aus dem finalen Build gesammelt werden. Lege fest, wie eine erlaubte, durch Kommas getrennte Lizenzliste an ng build übergeben wird und wie eine nicht erlaubte Lizenz einen Fehler verursacht. Als erledigt gilt die Änderung, wenn der Build die generierten Build-Lizenzen statt beliebiger installierter Pakete prüft.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
angular, typescript
Bereich
build-system, cli
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.