From c130fca283499c260b158a440e65e9cc7fb77191 Mon Sep 17 00:00:00 2001 From: Andrew Coates <30809111+acoates-ms@users.noreply.github.com> Date: Thu, 5 Mar 2026 11:58:47 -0800 Subject: [PATCH 1/3] Bump TypeScript target to ES2021 (#15727) * Bump TS target * Change files --- ...-windows-cli-68487113-c891-4125-957b-630701ebe5e8.json | 7 +++++++ ...ws-telemetry-1255120d-5e7d-4c49-a035-b0b9043f6d5a.json | 7 +++++++ packages/@react-native-windows/cli/tsconfig.json | 8 -------- packages/@react-native-windows/telemetry/tsconfig.json | 8 -------- packages/@rnw-scripts/ts-config/tsconfig.json | 2 +- 5 files changed, 15 insertions(+), 17 deletions(-) create mode 100644 change/@react-native-windows-cli-68487113-c891-4125-957b-630701ebe5e8.json create mode 100644 change/@react-native-windows-telemetry-1255120d-5e7d-4c49-a035-b0b9043f6d5a.json diff --git a/change/@react-native-windows-cli-68487113-c891-4125-957b-630701ebe5e8.json b/change/@react-native-windows-cli-68487113-c891-4125-957b-630701ebe5e8.json new file mode 100644 index 00000000000..55e391a8d11 --- /dev/null +++ b/change/@react-native-windows-cli-68487113-c891-4125-957b-630701ebe5e8.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Bump TS target", + "packageName": "@react-native-windows/cli", + "email": "30809111+acoates-ms@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/change/@react-native-windows-telemetry-1255120d-5e7d-4c49-a035-b0b9043f6d5a.json b/change/@react-native-windows-telemetry-1255120d-5e7d-4c49-a035-b0b9043f6d5a.json new file mode 100644 index 00000000000..d6138ea2ced --- /dev/null +++ b/change/@react-native-windows-telemetry-1255120d-5e7d-4c49-a035-b0b9043f6d5a.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Bump TS target", + "packageName": "@react-native-windows/telemetry", + "email": "30809111+acoates-ms@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/packages/@react-native-windows/cli/tsconfig.json b/packages/@react-native-windows/cli/tsconfig.json index 9b9d9b6ff47..ef4af6815af 100644 --- a/packages/@react-native-windows/cli/tsconfig.json +++ b/packages/@react-native-windows/cli/tsconfig.json @@ -1,14 +1,6 @@ { "extends": "@rnw-scripts/ts-config", "compilerOptions": { - // Change the default to allow ES2019.String "trimEnd" - "lib": [ - "DOM", - "ES6", - "DOM.Iterable", - "ES2019.String" - ], - // Not clean "strictFunctionTypes": false, }, diff --git a/packages/@react-native-windows/telemetry/tsconfig.json b/packages/@react-native-windows/telemetry/tsconfig.json index 50bd4c80964..c6e7cab478e 100644 --- a/packages/@react-native-windows/telemetry/tsconfig.json +++ b/packages/@react-native-windows/telemetry/tsconfig.json @@ -1,14 +1,6 @@ { "extends": "@rnw-scripts/ts-config", "compilerOptions": { - // Change the default to allow ES2019.String "trimEnd" - "lib": [ - "DOM", - "ES6", - "DOM.Iterable", - "ES2019.String" - ], - // Not clean "strictFunctionTypes": false, "isolatedModules": false, diff --git a/packages/@rnw-scripts/ts-config/tsconfig.json b/packages/@rnw-scripts/ts-config/tsconfig.json index dbdffcbe070..1a1c403f2e3 100644 --- a/packages/@rnw-scripts/ts-config/tsconfig.json +++ b/packages/@rnw-scripts/ts-config/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "ES2018", + "target": "ES2021", "module": "commonjs", "jsx": "react", "sourceMap": true, From 1f2a706e7a7e7d71f21bce99082b1c777a14859b Mon Sep 17 00:00:00 2001 From: Andrew Coates <30809111+acoates-ms@users.noreply.github.com> Date: Thu, 5 Mar 2026 19:44:00 -0800 Subject: [PATCH 2/3] Stop writing codegen files if it just changes new lines (#15729) * Stop writing codegen files if it just changes new lines * Change files * format * fix * format --- ...ndows-codegen-e4cfdc4a-a4b9-4a36-8902-cc9aa78db21c.json | 7 +++++++ packages/@react-native-windows/codegen/src/index.ts | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 change/@react-native-windows-codegen-e4cfdc4a-a4b9-4a36-8902-cc9aa78db21c.json diff --git a/change/@react-native-windows-codegen-e4cfdc4a-a4b9-4a36-8902-cc9aa78db21c.json b/change/@react-native-windows-codegen-e4cfdc4a-a4b9-4a36-8902-cc9aa78db21c.json new file mode 100644 index 00000000000..f077c5efef8 --- /dev/null +++ b/change/@react-native-windows-codegen-e4cfdc4a-a4b9-4a36-8902-cc9aa78db21c.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Stop writing codegen files if it just changes new lines", + "packageName": "@react-native-windows/codegen", + "email": "30809111+acoates-ms@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/packages/@react-native-windows/codegen/src/index.ts b/packages/@react-native-windows/codegen/src/index.ts index 507732b8eac..79a7968f520 100644 --- a/packages/@react-native-windows/codegen/src/index.ts +++ b/packages/@react-native-windows/codegen/src/index.ts @@ -109,7 +109,8 @@ function checkFilesForChanges( } const currentContents = fs.readFileSync(fileName, 'utf8'); - if (currentContents !== contents) { + // The current file may be saved using crlf, in which case the new lines may differ from the new output + if (currentContents.replaceAll('\r\n', '\n') !== contents) { console.log(`- ${fileName} has changed`); hasChanges = true; continue; @@ -146,7 +147,8 @@ function writeMapToFiles(map: Map, outputDir: string) { if (fs.existsSync(fileName)) { const currentContents = fs.readFileSync(fileName, 'utf8'); // Don't update the files if there are no changes as this breaks incremental builds - if (currentContents === contents) { + // The current file may be saved using crlf, in which case the new lines may differ from the new output + if (currentContents.replaceAll('\r\n', '\n') === contents) { continue; } } From e6fee669d1e3e47b662c57ec689223d4d8ad880f Mon Sep 17 00:00:00 2001 From: Andrew Coates <30809111+acoates-ms@users.noreply.github.com> Date: Thu, 5 Mar 2026 20:48:29 -0800 Subject: [PATCH 3/3] fix change files --- ...tive-windows-cli-68487113-c891-4125-957b-630701ebe5e8.json | 4 ++-- ...-windows-codegen-e4cfdc4a-a4b9-4a36-8902-cc9aa78db21c.json | 4 ++-- ...indows-telemetry-1255120d-5e7d-4c49-a035-b0b9043f6d5a.json | 4 ++-- ...t-native-windows-8d24c2d8-08f9-4612-a46d-8bf25b0f020d.json | 4 ++-- ...t-native-windows-98ecf15d-5d4a-4fd9-8197-192eaf831e5f.json | 4 ++-- ...t-native-windows-b56ee389-667d-4a9b-bc6a-73fa937f57c8.json | 4 ++-- ...t-native-windows-facaf084-1207-4661-8ca0-5613b6ed5129.json | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/change/@react-native-windows-cli-68487113-c891-4125-957b-630701ebe5e8.json b/change/@react-native-windows-cli-68487113-c891-4125-957b-630701ebe5e8.json index 55e391a8d11..a40ba852c29 100644 --- a/change/@react-native-windows-cli-68487113-c891-4125-957b-630701ebe5e8.json +++ b/change/@react-native-windows-cli-68487113-c891-4125-957b-630701ebe5e8.json @@ -1,7 +1,7 @@ { - "type": "prerelease", + "type": "patch", "comment": "Bump TS target", "packageName": "@react-native-windows/cli", "email": "30809111+acoates-ms@users.noreply.github.com", "dependentChangeType": "patch" -} +} \ No newline at end of file diff --git a/change/@react-native-windows-codegen-e4cfdc4a-a4b9-4a36-8902-cc9aa78db21c.json b/change/@react-native-windows-codegen-e4cfdc4a-a4b9-4a36-8902-cc9aa78db21c.json index f077c5efef8..ab8b7ee6a09 100644 --- a/change/@react-native-windows-codegen-e4cfdc4a-a4b9-4a36-8902-cc9aa78db21c.json +++ b/change/@react-native-windows-codegen-e4cfdc4a-a4b9-4a36-8902-cc9aa78db21c.json @@ -1,7 +1,7 @@ { - "type": "prerelease", + "type": "patch", "comment": "Stop writing codegen files if it just changes new lines", "packageName": "@react-native-windows/codegen", "email": "30809111+acoates-ms@users.noreply.github.com", "dependentChangeType": "patch" -} +} \ No newline at end of file diff --git a/change/@react-native-windows-telemetry-1255120d-5e7d-4c49-a035-b0b9043f6d5a.json b/change/@react-native-windows-telemetry-1255120d-5e7d-4c49-a035-b0b9043f6d5a.json index d6138ea2ced..dd747366345 100644 --- a/change/@react-native-windows-telemetry-1255120d-5e7d-4c49-a035-b0b9043f6d5a.json +++ b/change/@react-native-windows-telemetry-1255120d-5e7d-4c49-a035-b0b9043f6d5a.json @@ -1,7 +1,7 @@ { - "type": "prerelease", + "type": "patch", "comment": "Bump TS target", "packageName": "@react-native-windows/telemetry", "email": "30809111+acoates-ms@users.noreply.github.com", "dependentChangeType": "patch" -} +} \ No newline at end of file diff --git a/change/react-native-windows-8d24c2d8-08f9-4612-a46d-8bf25b0f020d.json b/change/react-native-windows-8d24c2d8-08f9-4612-a46d-8bf25b0f020d.json index da6dd0cddc0..6063782052f 100644 --- a/change/react-native-windows-8d24c2d8-08f9-4612-a46d-8bf25b0f020d.json +++ b/change/react-native-windows-8d24c2d8-08f9-4612-a46d-8bf25b0f020d.json @@ -1,7 +1,7 @@ { - "type": "prerelease", + "type": "patch", "comment": "Implement overflow property support for Fabric architecture", "packageName": "react-native-windows", "email": "nitchaudhary@microsoft.com", "dependentChangeType": "patch" -} +} \ No newline at end of file diff --git a/change/react-native-windows-98ecf15d-5d4a-4fd9-8197-192eaf831e5f.json b/change/react-native-windows-98ecf15d-5d4a-4fd9-8197-192eaf831e5f.json index bb9f9495f87..3001dcd7151 100644 --- a/change/react-native-windows-98ecf15d-5d4a-4fd9-8197-192eaf831e5f.json +++ b/change/react-native-windows-98ecf15d-5d4a-4fd9-8197-192eaf831e5f.json @@ -1,7 +1,7 @@ { - "type": "prerelease", + "type": "patch", "comment": "Fix SHIFT+F10 keyboard shortcut for context menu in TextInput", "packageName": "react-native-windows", "email": "nitchaudhary@microsoft.com", "dependentChangeType": "patch" -} +} \ No newline at end of file diff --git a/change/react-native-windows-b56ee389-667d-4a9b-bc6a-73fa937f57c8.json b/change/react-native-windows-b56ee389-667d-4a9b-bc6a-73fa937f57c8.json index a2559a0aeac..8319355c104 100644 --- a/change/react-native-windows-b56ee389-667d-4a9b-bc6a-73fa937f57c8.json +++ b/change/react-native-windows-b56ee389-667d-4a9b-bc6a-73fa937f57c8.json @@ -1,7 +1,7 @@ { - "type": "prerelease", + "type": "patch", "comment": "Fix TextInput selection crash and feedback loop", "packageName": "react-native-windows", "email": "74712637+iamAbhi-916@users.noreply.github.com", "dependentChangeType": "patch" -} +} \ No newline at end of file diff --git a/change/react-native-windows-facaf084-1207-4661-8ca0-5613b6ed5129.json b/change/react-native-windows-facaf084-1207-4661-8ca0-5613b6ed5129.json index 48d8341c9ee..332968d8ec8 100644 --- a/change/react-native-windows-facaf084-1207-4661-8ca0-5613b6ed5129.json +++ b/change/react-native-windows-facaf084-1207-4661-8ca0-5613b6ed5129.json @@ -1,7 +1,7 @@ { - "type": "prerelease", + "type": "patch", "comment": "Implement ReactNativeWindow", "packageName": "react-native-windows", "email": "30809111+acoates-ms@users.noreply.github.com", "dependentChangeType": "patch" -} +} \ No newline at end of file