Skip to content

chore(metro): support TypeScript 7#4880

Open
Nsttt wants to merge 2 commits into
module-federation:feat/ts7from
Nsttt:feat/metro-typescript-7
Open

chore(metro): support TypeScript 7#4880
Nsttt wants to merge 2 commits into
module-federation:feat/ts7from
Nsttt:feat/metro-typescript-7

Conversation

@Nsttt

@Nsttt Nsttt commented Jul 10, 2026

Copy link
Copy Markdown
Member

Description

Restores the Metro-specific TypeScript 7 updates intentionally split from #4878.

  • use TypeScript 7.0.2 in the Metro consumer examples;
  • update Metro lint tooling for TypeScript 7;
  • normalize compiler paths and remove legacy node10 resolution;
  • replace ts-jest with @swc/jest for metro-plugin-rnc-cli;
  • compile React Native's pinned fmt 11.0.2 pod as C++17 for Xcode 26.4+ compatibility.

Publishable Metro packages continue compiling with TypeScript 6; TypeScript 7 runs at the consumer/example boundary. The originally reported iOS failure occurred in CocoaPods project generation, outside TypeScript compilation. A fresh PR build passed CocoaPods and then exposed the known fmt C++20 failure under Xcode 26.5, so the workaround targets only the fmt pod and leaves every other pod on C++20.

Validation:

  • pnpm install --frozen-lockfile
  • pnpm run ci:local --only=build-metro
  • changed-file Prettier check
  • git diff --check
  • Podfile syntax check with system Ruby

The Metro build, publint, tests, lint, and Android and iOS E2E passed. Local mobile E2E was unavailable because Maestro and the required Ruby 3.4.9 are not installed. The repo-wide Prettier check also reports an unrelated existing generated file: packages/playground/src/generated/bridgeRuntimeFiles.ts.

No changeset: this PR changes examples, development dependencies, and test/build configuration without changing published package behavior.

Related Issue

No dedicated issue. Follow-up to #4878.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation.
@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f299606

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jul 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

@module-federation/devtools

pnpm add https://pkg.pr.new/@module-federation/devtools@f299606

@module-federation/cli

pnpm add https://pkg.pr.new/@module-federation/cli@f299606

create-module-federation

pnpm add https://pkg.pr.new/create-module-federation@f299606

@module-federation/dts-plugin

pnpm add https://pkg.pr.new/@module-federation/dts-plugin@f299606

@module-federation/enhanced

pnpm add https://pkg.pr.new/@module-federation/enhanced@f299606

@module-federation/error-codes

pnpm add https://pkg.pr.new/@module-federation/error-codes@f299606

@module-federation/esbuild

pnpm add https://pkg.pr.new/@module-federation/esbuild@f299606

@module-federation/managers

pnpm add https://pkg.pr.new/@module-federation/managers@f299606

@module-federation/manifest

pnpm add https://pkg.pr.new/@module-federation/manifest@f299606

@module-federation/metro

pnpm add https://pkg.pr.new/@module-federation/metro@f299606

@module-federation/metro-plugin-rnc-cli

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnc-cli@f299606

@module-federation/metro-plugin-rnef

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnef@f299606

@module-federation/metro-plugin-rock

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rock@f299606

@module-federation/modern-js

pnpm add https://pkg.pr.new/@module-federation/modern-js@f299606

@module-federation/modern-js-v3

pnpm add https://pkg.pr.new/@module-federation/modern-js-v3@f299606

@module-federation/native-federation-tests

pnpm add https://pkg.pr.new/@module-federation/native-federation-tests@f299606

@module-federation/native-federation-typescript

pnpm add https://pkg.pr.new/@module-federation/native-federation-typescript@f299606

@module-federation/nextjs-mf

pnpm add https://pkg.pr.new/@module-federation/nextjs-mf@f299606

@module-federation/node

pnpm add https://pkg.pr.new/@module-federation/node@f299606

@module-federation/observability-plugin

pnpm add https://pkg.pr.new/@module-federation/observability-plugin@f299606

@module-federation/playground

pnpm add https://pkg.pr.new/@module-federation/playground@f299606

@module-federation/retry-plugin

pnpm add https://pkg.pr.new/@module-federation/retry-plugin@f299606

@module-federation/rsbuild-plugin

pnpm add https://pkg.pr.new/@module-federation/rsbuild-plugin@f299606

@module-federation/rspack

pnpm add https://pkg.pr.new/@module-federation/rspack@f299606

@module-federation/rspress-plugin

pnpm add https://pkg.pr.new/@module-federation/rspress-plugin@f299606

@module-federation/runtime

pnpm add https://pkg.pr.new/@module-federation/runtime@f299606

@module-federation/runtime-core

pnpm add https://pkg.pr.new/@module-federation/runtime-core@f299606

@module-federation/runtime-tools

pnpm add https://pkg.pr.new/@module-federation/runtime-tools@f299606

@module-federation/sdk

pnpm add https://pkg.pr.new/@module-federation/sdk@f299606

@module-federation/storybook-addon

pnpm add https://pkg.pr.new/@module-federation/storybook-addon@f299606

@module-federation/third-party-dts-extractor

pnpm add https://pkg.pr.new/@module-federation/third-party-dts-extractor@f299606

@module-federation/treeshake-frontend

pnpm add https://pkg.pr.new/@module-federation/treeshake-frontend@f299606

@module-federation/treeshake-server

pnpm add https://pkg.pr.new/@module-federation/treeshake-server@f299606

@module-federation/typescript

pnpm add https://pkg.pr.new/@module-federation/typescript@f299606

@module-federation/utilities

pnpm add https://pkg.pr.new/@module-federation/utilities@f299606

@module-federation/webpack-bundler-runtime

pnpm add https://pkg.pr.new/@module-federation/webpack-bundler-runtime@f299606

@module-federation/bridge-react

pnpm add https://pkg.pr.new/@module-federation/bridge-react@f299606

@module-federation/bridge-react-webpack-plugin

pnpm add https://pkg.pr.new/@module-federation/bridge-react-webpack-plugin@f299606

@module-federation/bridge-shared

pnpm add https://pkg.pr.new/@module-federation/bridge-shared@f299606

@module-federation/bridge-vue3

pnpm add https://pkg.pr.new/@module-federation/bridge-vue3@f299606

@module-federation/inject-external-runtime-core-plugin

pnpm add https://pkg.pr.new/@module-federation/inject-external-runtime-core-plugin@f299606

commit: f299606

@Nsttt Nsttt marked this pull request as ready for review July 10, 2026 15:30
@Nsttt Nsttt self-assigned this Jul 10, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f299606362

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +37 to +42
installer.pods_project.targets.each do |target|
next unless target.name == 'fmt'

target.build_configurations.each do |build_config|
build_config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17'
end

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Apply the fmt workaround to all Metro iOS examples

When developers run example-mini or example-nested-mini through their ios/pods scripts on Xcode 26.4+, those apps still use the same React Native 0.80 fmt 11.0.2 pod but their Podfiles keep the default C++20 setting. This workaround only patches the host app, so the same fmt build failure remains for the other Metro iOS examples outside the default host E2E path.

Useful? React with 👍 / 👎.

@ScriptedAlchemy

Copy link
Copy Markdown
Member

add changeset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants