Support for list of allowed licenses for 3rdpartylicenses.txt

Đang mở
#31,523 4 bình luận 22 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
angular, typescript
Lĩnh vực
build-system, cli

Hướng nghiên cứu

Bắt đầu tại packages/angular/build/src/builders/application/execute-build.ts, xung quanh phần tạo 3rdpartylicenses.txt được liên kết trong issue, sau đó theo dõi cách các license từ build cuối cùng được thu thập. Xác định cách cung cấp danh sách license được cho phép, phân tách bằng dấu phẩy, cho ng build và cách một license không được cho phép khiến thao tác thất bại. Được xem là hoàn tất khi build kiểm tra các license được tạo ra từ build thay vì các package đã cài đặt không liên quan.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

angular/build:application feature feature: under consideration
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=<comma separated license names>. As soon as a different license is found, the build fails. also php 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.

Ngôn ngữ chính
TypeScript
Star
27k
Fork
11.8k
Merge trung bình
16 giờ 35 phút
Pull request đã merge (30 ngày)
176

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của angular/angular-cli

Tất cả issue của angular/angular-cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.