microsoft / microsoft/TypeScript
Resolve project references from root
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Go
- Star
- 111k
- Fork
- 14.3k
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 117
Mô tả
Search Terms
Project reference root resolve.
Suggestion
Resolve project reference paths from root directory of a mono repository.
Use Cases
We have a large mono-repository with 1000s of sub-packages we want to convert to TS projects. Currently the references between them must be defined as relative paths, leading to configuration like:
"references": [
{
"path": "../../../base"
},
{
"path": "../colors"
},
{
"path": "../device_capabilities"
}
],
Which is:
- Hard to read and reason about
- Creates noisy diffs when moving packages
Ideally project references could be resolved from the root of the mono-repo project, e.g. rootDir or baseUrl options.
E.g.:
"references": [
{
"path": "base"
},
{
"path": "ui/base/colors"
},
{
"path": "ui/base/device_capabilities"
}
],
Checklist
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Issue không nêu tên tệp nguồn, các bài kiểm thử hay các điểm vào. Hãy bắt đầu bằng cách xác định project-reference path resolution và xem xét mối quan hệ giữa rootDir, baseUrl với hành vi được đề xuất; công việc được xem là hoàn tất khi đã thống nhất và triển khai root-relative references, đồng thời giữ nguyên hành vi hiện có đối với các đường dẫn tương đối.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- typescript
- Lĩnh vực
- build-system, compilers
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100