From 51a126cb31e8ca251cffd1325684662a85125b24 Mon Sep 17 00:00:00 2001 From: Alan Agius <17563226+alan-agius4@users.noreply.github.com> Date: Fri, 7 Nov 2025 08:39:01 +0000 Subject: [PATCH 1/2] fix(@schematics/angular): correct `tsconfig.spec.json` include for spec files Updates the files in both application and library schematics to specifically include instead of . This ensures that only test specification files are processed for testing, preventing unintended inclusion of other TypeScript files. --- .../application/files/common-files/tsconfig.spec.json.template | 2 +- .../angular/library/files/tsconfig.spec.json.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/schematics/angular/application/files/common-files/tsconfig.spec.json.template b/packages/schematics/angular/application/files/common-files/tsconfig.spec.json.template index af71f061e884..a9df39961f70 100644 --- a/packages/schematics/angular/application/files/common-files/tsconfig.spec.json.template +++ b/packages/schematics/angular/application/files/common-files/tsconfig.spec.json.template @@ -9,6 +9,6 @@ ] }, "include": [ - "src/**/*.ts" + "src/**/*<% if (standalone) { %>.spec<% } %>.ts" ] } diff --git a/packages/schematics/angular/library/files/tsconfig.spec.json.template b/packages/schematics/angular/library/files/tsconfig.spec.json.template index 0cec657c8ae9..2268df29bce9 100644 --- a/packages/schematics/angular/library/files/tsconfig.spec.json.template +++ b/packages/schematics/angular/library/files/tsconfig.spec.json.template @@ -9,6 +9,6 @@ ] }, "include": [ - "src/**/*.ts" + "src/**/*<% if (standalone) { %>.spec<% } %>.ts" ] } From a05528f1537ec82a0868f10aa166a6f2c8fcd83e Mon Sep 17 00:00:00 2001 From: Alan Agius <17563226+alan-agius4@users.noreply.github.com> Date: Sat, 8 Nov 2025 10:29:26 +0000 Subject: [PATCH 2/2] fixup! fix(@schematics/angular): correct `tsconfig.spec.json` include for spec files --- .../application/files/common-files/tsconfig.spec.json.template | 1 + .../angular/library/files/tsconfig.spec.json.template | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/application/files/common-files/tsconfig.spec.json.template b/packages/schematics/angular/application/files/common-files/tsconfig.spec.json.template index a9df39961f70..dae0fe57b3c4 100644 --- a/packages/schematics/angular/application/files/common-files/tsconfig.spec.json.template +++ b/packages/schematics/angular/application/files/common-files/tsconfig.spec.json.template @@ -9,6 +9,7 @@ ] }, "include": [ + "src/**/*.d.ts", "src/**/*<% if (standalone) { %>.spec<% } %>.ts" ] } diff --git a/packages/schematics/angular/library/files/tsconfig.spec.json.template b/packages/schematics/angular/library/files/tsconfig.spec.json.template index 2268df29bce9..b2370befce4f 100644 --- a/packages/schematics/angular/library/files/tsconfig.spec.json.template +++ b/packages/schematics/angular/library/files/tsconfig.spec.json.template @@ -9,6 +9,7 @@ ] }, "include": [ - "src/**/*<% if (standalone) { %>.spec<% } %>.ts" + "src/**/*.d.ts", + "src/**/*<% if (standalone) { %>.spec<% } %>.ts" ] }