Skip to content

Finish ESM transition, move to composite builds, detangle type refs, and re-enable macos PR pipeline#4124

Merged
JasonVMo merged 24 commits into
mainfrom
user/jasonvmo/esm
Jun 13, 2026
Merged

Finish ESM transition, move to composite builds, detangle type refs, and re-enable macos PR pipeline#4124
JasonVMo merged 24 commits into
mainfrom
user/jasonvmo/esm

Conversation

@JasonVMo

@JasonVMo JasonVMo commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Platforms Impacted

  • all

Description of changes

This change has a number of things rolled together into one PR as one thing kind of led to another.

Move to ESM

The previous strategy of using module/moduleResolution: "nodenext" doesn't work to esm output on react native because if a module import as an extension (i.e. import { foo } from "myFile.ts";) this will stop both metro and typescript from finding myFile.android.ts or other module suffixes. As a result:

  • module -> "esnext" to get esm output
  • moduleResolution -> "bundler" to enable export maps
  • type -> undefined to allow type imports to handle extensionless importing. (module enables stricter handling)

Composite builds

To speed up builds, and avoid race conditions for the lage builds where the file wasn't fully committed before the next tsgo instance tried to pick it up, I turned on project references and building with tsgo -b.

  • this does an incremental build from any package and when building from the root will build the whole repo at once
  • build time has decreased substantially (<8s on my laptop for the whole repo)
  • noEmit builds are not permitted directly and must be done as builds from solution files.
  • yarn constraints (part of lint-repo) will validate the links are current and update them if necessary
  • references will include any workspace dependencies and any tsconfig.* files under a targets/ directory if present. This allows long-term platform specific type checking per-package and other patterns which would yield a large number of tsconfig files.

Type defragmentation

The massive parallelism of tsgo highlighted places where we were bringing in multiple versions of @types/react into the same package. The main sources were the icons package bringing in a @types/react-native: 0.68 package and the adapters package including rn, rnw, and rn-macos in the same build, each of which have rn -> react -> react types. Resolution in these cases can be order dependent and is a problem, these were all made more explicit.

Re-enable macos pipelines

This also attempts to enable the macos PR builds again as they were turned off in the recent 81 test app changeover.

Verification

Comment thread apps/tester-core/package.json
JasonVMo and others added 4 commits June 11, 2026 22:27
The Windows E2E launch script was throwing a cryptic 'Cannot find a process with the name ReactApp' when the app crashed during launch, hiding the root cause.

- Register WER local dumps BEFORE launching the app (so first-launch crashes are captured)

- Wait up to 30s for the app to appear with a top-level window (instead of 10s)

- On failure, dump running processes, WER dumps, Application event-log entries since launch, and the packager log, then throw a clear error

- Redirect 'yarn start' output to apps/fluent-tester/packager.log and upload it as a CI artifact

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The generated AppxManifest in 5.1.10 was missing the
`<PackageDependency Name="Microsoft.WindowsAppRuntime.1.8" .../>`
entry, which caused IReactNativeHost::PackageProviders to throw
REGDB_E_CLASSNOTREG (0x80040154) at launch (the activatable classes
from the Windows App SDK framework package were not visible to the
AppContainer process). The unhandled C++ exception terminated
ReactApp.exe before any window was created, breaking Windows E2E.

react-native-test-app 5.2.3 now correctly injects the WindowsAppRuntime
package dependency into the generated AppxManifest, restoring the
ability of the packaged app to activate WinAppSDK types.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread apps/fluent-tester/tsconfig.json
Comment thread apps/tester-core/assets/accessible-icon-brands.svg.d.ts
Comment thread apps/tester-core/package.json Outdated
Comment thread apps/win32-81/targets/tsconfig.check.json
Comment thread packages/utils/adapters/src/__drift__/macos.drift.ts
Comment thread scripts/src/tasks/constrain.ts
Comment thread scripts/src/tasks/constrain.ts
Comment thread scripts/src/utils/tsConfigs.ts

@Saadnajmi Saadnajmi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving to unblock

@JasonVMo JasonVMo enabled auto-merge (squash) June 13, 2026 00:15
@JasonVMo JasonVMo merged commit 6c2d6e6 into main Jun 13, 2026
14 checks passed
@JasonVMo JasonVMo deleted the user/jasonvmo/esm branch June 13, 2026 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants