From 9e7c47b5945b368a6fd5e2544674d5a3afd63d65 Mon Sep 17 00:00:00 2001 From: "Charles \"Demurgos\" Samborski" Date: Sat, 17 Feb 2024 22:18:27 +0000 Subject: [PATCH] fix(@angular-devkit/build-angular): allow `mts` and `cts` file replacement Updates the `fileReplacement` pattern to allow `.mts` and `.cts` files. This enables support for TypeScript files with explicit ESM support. Closes #27124 (cherry picked from commit fa146b8e86c951bd39bc0b61c3b303addfdf859f) --- .../build_angular/src/builders/application/schema.json | 4 ++-- .../src/builders/browser-esbuild/schema.json | 4 ++-- .../build_angular/src/builders/browser/schema.json | 8 ++++---- .../build_angular/src/builders/server/schema.json | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/builders/application/schema.json b/packages/angular_devkit/build_angular/src/builders/application/schema.json index 4cd4359bdc62..e82ecf523ead 100644 --- a/packages/angular_devkit/build_angular/src/builders/application/schema.json +++ b/packages/angular_devkit/build_angular/src/builders/application/schema.json @@ -572,11 +572,11 @@ "properties": { "replace": { "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" + "pattern": "\\.(([cm]?[jt])sx?|json)$" }, "with": { "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" + "pattern": "\\.(([cm]?[jt])sx?|json)$" } }, "additionalProperties": false, diff --git a/packages/angular_devkit/build_angular/src/builders/browser-esbuild/schema.json b/packages/angular_devkit/build_angular/src/builders/browser-esbuild/schema.json index fce927c3e443..20075928cd2a 100644 --- a/packages/angular_devkit/build_angular/src/builders/browser-esbuild/schema.json +++ b/packages/angular_devkit/build_angular/src/builders/browser-esbuild/schema.json @@ -483,11 +483,11 @@ "properties": { "replace": { "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" + "pattern": "\\.(([cm]?[jt])sx?|json)$" }, "with": { "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" + "pattern": "\\.(([cm]?[jt])sx?|json)$" } }, "additionalProperties": false, diff --git a/packages/angular_devkit/build_angular/src/builders/browser/schema.json b/packages/angular_devkit/build_angular/src/builders/browser/schema.json index 428124d41c73..263d121227c7 100644 --- a/packages/angular_devkit/build_angular/src/builders/browser/schema.json +++ b/packages/angular_devkit/build_angular/src/builders/browser/schema.json @@ -473,11 +473,11 @@ "properties": { "src": { "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" + "pattern": "\\.(([cm]?[jt])sx?|json)$" }, "replaceWith": { "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" + "pattern": "\\.(([cm]?[jt])sx?|json)$" } }, "additionalProperties": false, @@ -488,11 +488,11 @@ "properties": { "replace": { "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" + "pattern": "\\.(([cm]?[jt])sx?|json)$" }, "with": { "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" + "pattern": "\\.(([cm]?[jt])sx?|json)$" } }, "additionalProperties": false, diff --git a/packages/angular_devkit/build_angular/src/builders/server/schema.json b/packages/angular_devkit/build_angular/src/builders/server/schema.json index a18c468772ba..4ab03873d7d0 100644 --- a/packages/angular_devkit/build_angular/src/builders/server/schema.json +++ b/packages/angular_devkit/build_angular/src/builders/server/schema.json @@ -270,11 +270,11 @@ "properties": { "src": { "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" + "pattern": "\\.(([cm]?[jt])sx?|json)$" }, "replaceWith": { "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" + "pattern": "\\.(([cm]?[jt])sx?|json)$" } }, "additionalProperties": false, @@ -285,11 +285,11 @@ "properties": { "replace": { "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" + "pattern": "\\.(([cm]?[jt])sx?|json)$" }, "with": { "type": "string", - "pattern": "\\.(([cm]?j|t)sx?|json)$" + "pattern": "\\.(([cm]?[jt])sx?|json)$" } }, "additionalProperties": false,