tsconfig.app.json 'includes' does not respect glob patterns for cypress
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
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- angular, cypress, typescript, webpack
- Lĩnh vực
- build-system, cli, testing
Hướng nghiên cứu
Tái hiện lỗi bằng npx cypress open trong repository được liên kết, sau đó kiểm tra tsconfig.app.json, cypress.config.ts và đường dẫn build Angular được @ngtools/webpack báo cáo. Xác minh cách tệp component của Cypress được chọn để biên dịch TypeScript. Được xem là hoàn tất khi component test mở mà không có lỗi thiếu khỏi quá trình biên dịch khi các tệp Cypress được chỉ định thông qua include.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Which @angular/* package(s) are the source of the bug?
Don't known / other
Is this a regression?
Yes
Description
I've included a link to repo that provides the basic setup. To test the issue, you just need to run npx cypress open with the setup I've created, then click on 'component tests'. Now click on 'app.ts'. The error is provided below - essentially it's asking me to include the app.ts file in either the 'files' or 'include' property of the tsconfig.
This is what works when added to tsconfig.app.json:
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"files": [
"src/main.ts",
"cypress/component/app.ts"
],
"include": [
"src/**/*.d.ts",
]
}
This is what fails when added to tsconfig.app.json:
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"files": [
"src/main.ts",
],
"include": [
"src/**/*.d.ts",
"cypress/**/*.ts",
]
}
I checked multiple sources, and cannot see any error in the cypress glob pattern added to include.
Note, this also fails:
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"files": [
"src/main.ts",
],
"include": [
"src/**/*.d.ts",
"cypress/component/app.ts"
]
}
It appears to be a bug - I can't define it in any other terms at this point, as it's a basic example, applied to a boilerplate Angular application, with virtually no additions/tweaks outside of the this app.ts test.
Please provide a link to a minimal reproduction of the bug
https://github.com/CMadden8/cypress-angular-test
Please provide the exception or error you saw
Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: C:\[omitted path]\cypress\component\app.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
Please provide the environment you discovered this bug in (run ng version)
Angular CLI: 15.2.2
Node: 16.14.2
Package Manager: npm 8.5.0
OS: win32 x64
Angular: 15.2.2
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1502.2
@angular-devkit/build-angular 15.2.2
@angular-devkit/core 15.2.2
@angular-devkit/schematics 15.2.2
@schematics/angular 15.2.2
rxjs 7.8.0
typescript 4.9.5
Anything else?
@badeball/cypress-cucumber-preprocessor and ts-loader were installed alongside cypress, and configured for component testing within cypress.config.ts
- Ngôn ngữ chính
- TypeScript
- Star
- 27k
- Fork
- 11.8k
- Merge trung bình
- 17 giờ 25 phút
- Pull request đã merge (30 ngày)
- 183
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.
Issue khác của angular/angular-cli
-
Can't use an array of hostnames in --allowedHosts cli parameter in @angular/build:dev-server Đang mởarea: @angular/build gemini-triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
angular/angular-cli#33055 · 1 bình luận · 3 reaction ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 1 người được giao ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 1 người được giao ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34128 · 1 người được giao ·
Tất cả issue của angular/angular-cli
Issue tương tự
-
[Bug]: Discord Activity titles with emoji are rejected as over 80 characters when they are not Đang mởclawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
ZCode 3.14.3 に対応する Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
supermomonga/zcode-acp#24 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
growthbook/growthbook#7100 ·
-
triage
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100