From 79cf69086de0731437035796987b6b849a80a576 Mon Sep 17 00:00:00 2001 From: Jesse Peterman Date: Tue, 10 Feb 2026 11:05:57 -0800 Subject: [PATCH 01/10] feat: add Metro 0.83 compatibility layer Metro 0.83 introduced a restrictive exports field that only allows metro/private/* paths instead of direct metro/src/* imports. This adds a metro-compat.ts utility that dynamically resolves the correct import path based on the installed Metro version, ensuring compatibility with both Metro 0.82 and 0.83+. Changes: - Add src/utils/metro-compat.ts compatibility layer - Update all metro/src/* imports to use metro-compat - Handle both .default and direct exports across Metro versions - Add changeset Co-authored-by: Zack Chapple <2133184+zackarychapple@users.noreply.github.com> --- .changeset/metro-083-compat.md | 5 ++ .../src/commands/bundle-host/index.ts | 8 ++- .../src/commands/bundle-remote/index.ts | 12 +++- .../src/commands/utils/create-resolver.ts | 7 +- .../commands/utils/get-community-plugin.ts | 9 ++- .../src/commands/utils/save-bundle-and-map.ts | 6 +- packages/metro-core/src/plugin/serializer.ts | 8 ++- packages/metro-core/src/utils/metro-compat.ts | 66 +++++++++++++++++++ packages/metro-core/src/utils/vm-manager.ts | 16 +++-- 9 files changed, 116 insertions(+), 21 deletions(-) create mode 100644 .changeset/metro-083-compat.md create mode 100644 packages/metro-core/src/utils/metro-compat.ts diff --git a/.changeset/metro-083-compat.md b/.changeset/metro-083-compat.md new file mode 100644 index 00000000000..242776d53d7 --- /dev/null +++ b/.changeset/metro-083-compat.md @@ -0,0 +1,5 @@ +--- +"@module-federation/metro": patch +--- + +Add Metro 0.83 compatibility layer. Metro 0.83 introduced a restrictive `exports` field that only allows `metro/private/*` paths instead of direct `metro/src/*` imports. This adds a `metro-compat` utility that dynamically resolves the correct import path, ensuring compatibility with both Metro 0.82 and 0.83+. diff --git a/packages/metro-core/src/commands/bundle-host/index.ts b/packages/metro-core/src/commands/bundle-host/index.ts index dfe3908d604..59cecd1b3c1 100644 --- a/packages/metro-core/src/commands/bundle-host/index.ts +++ b/packages/metro-core/src/commands/bundle-host/index.ts @@ -1,9 +1,8 @@ import path from 'node:path'; import util from 'node:util'; -import Server from 'metro/src/Server'; -import type { RequestOptions } from 'metro/src/shared/types'; import type { ModuleFederationConfigNormalized } from '../../types'; import { CLIError } from '../../utils/errors'; +import { type RequestOptions, Server } from '../../utils/metro-compat'; import type { Config } from '../types'; import { createResolver } from '../utils/create-resolver'; import { getCommunityCliPlugin } from '../utils/get-community-plugin'; @@ -59,7 +58,10 @@ async function bundleFederatedHost( communityCliPlugin.unstable_buildBundleWithConfig; return buildBundleWithConfig(args, config, { - build: async (server: Server, requestOpts: RequestOptions) => { + build: async ( + server: InstanceType, + requestOpts: RequestOptions, + ) => { // setup enhance middleware to trigger virtual modules setup config.server.enhanceMiddleware(server.processRequest, server); const resolver = await createResolver(server, args.platform); diff --git a/packages/metro-core/src/commands/bundle-remote/index.ts b/packages/metro-core/src/commands/bundle-remote/index.ts index 946eac4eb4a..c0053240315 100644 --- a/packages/metro-core/src/commands/bundle-remote/index.ts +++ b/packages/metro-core/src/commands/bundle-remote/index.ts @@ -3,10 +3,13 @@ import path from 'node:path'; import { pathToFileURL } from 'node:url'; import util from 'node:util'; import { mergeConfig } from 'metro'; -import Server from 'metro/src/Server'; -import type { OutputOptions, RequestOptions } from 'metro/src/shared/types'; import type { ModuleFederationConfigNormalized } from '../../types'; import { CLIError } from '../../utils/errors'; +import { + type OutputOptions, + type RequestOptions, + Server, +} from '../../utils/metro-compat'; import type { Config } from '../types'; import { createModulePathRemapper } from '../utils/create-module-path-remapper'; import { createResolver } from '../utils/create-resolver'; @@ -43,7 +46,10 @@ interface BundleRequestOptions extends RequestOptions { sourceUrl: string; } -async function buildBundle(server: Server, requestOpts: BundleRequestOptions) { +async function buildBundle( + server: InstanceType, + requestOpts: BundleRequestOptions, +) { const bundle = await server.build({ ...Server.DEFAULT_BUNDLE_OPTIONS, ...requestOpts, diff --git a/packages/metro-core/src/commands/utils/create-resolver.ts b/packages/metro-core/src/commands/utils/create-resolver.ts index f12574a2cad..795c37dd01d 100644 --- a/packages/metro-core/src/commands/utils/create-resolver.ts +++ b/packages/metro-core/src/commands/utils/create-resolver.ts @@ -1,4 +1,4 @@ -import type Server from 'metro/src/Server'; +import type { Server } from '../../utils/metro-compat'; /** * Creates a resolver utility that mirrors Metro's bundling resolution behavior. @@ -14,7 +14,10 @@ import type Server from 'metro/src/Server'; * @param platform - The target platform for resolution (e.g., 'ios', 'android', null for default) * @returns The resolver object with a resolve method that takes source and target paths */ -export async function createResolver(server: Server, platform: string | null) { +export async function createResolver( + server: InstanceType, + platform: string | null, +) { const bundler = server.getBundler().getBundler(); const depGraph = await bundler.getDependencyGraph(); diff --git a/packages/metro-core/src/commands/utils/get-community-plugin.ts b/packages/metro-core/src/commands/utils/get-community-plugin.ts index 7a1e73be00a..0281ec4953d 100644 --- a/packages/metro-core/src/commands/utils/get-community-plugin.ts +++ b/packages/metro-core/src/commands/utils/get-community-plugin.ts @@ -1,7 +1,10 @@ import type { ConfigT } from 'metro-config'; -import type Server from 'metro/src/Server'; -import type { OutputOptions, RequestOptions } from 'metro/src/shared/types'; import { CLIError } from '../../utils/errors'; +import type { + OutputOptions, + RequestOptions, + Server, +} from '../../utils/metro-compat'; interface Command { name: string; @@ -21,7 +24,7 @@ interface CommunityCliPlugin { config: ConfigT, bundleImpl: { build: ( - server: Server, + server: InstanceType, requestOpts: RequestOptions, ) => Promise<{ code: string; map: string }>; save: ( diff --git a/packages/metro-core/src/commands/utils/save-bundle-and-map.ts b/packages/metro-core/src/commands/utils/save-bundle-and-map.ts index c059a28bf83..5a47b92e033 100644 --- a/packages/metro-core/src/commands/utils/save-bundle-and-map.ts +++ b/packages/metro-core/src/commands/utils/save-bundle-and-map.ts @@ -1,8 +1,10 @@ import { promises as fs } from 'node:fs'; import util from 'node:util'; import type { MixedSourceMap } from 'metro-source-map'; -import relativizeSourceMapInline from 'metro/src/lib/relativizeSourceMap'; -import type { OutputOptions } from 'metro/src/shared/types'; +import { + type OutputOptions, + relativizeSourceMapInline, +} from '../../utils/metro-compat'; function relativizeSerializedMap( map: string, diff --git a/packages/metro-core/src/plugin/serializer.ts b/packages/metro-core/src/plugin/serializer.ts index a84f94e35df..0037d8d46b1 100644 --- a/packages/metro-core/src/plugin/serializer.ts +++ b/packages/metro-core/src/plugin/serializer.ts @@ -1,11 +1,13 @@ import path from 'node:path'; import type { Module, ReadOnlyGraph, SerializerOptions } from 'metro'; import type { SerializerConfigT } from 'metro-config'; -import baseJSBundle from 'metro/src/DeltaBundler/Serializers/baseJSBundle'; -import CountingSet from 'metro/src/lib/CountingSet'; -import bundleToString from 'metro/src/lib/bundleToString'; import type { ModuleFederationConfigNormalized, Shared } from '../types'; import { ConfigError } from '../utils/errors'; +import { + CountingSet, + baseJSBundle, + bundleToString, +} from '../utils/metro-compat'; type CustomSerializer = SerializerConfigT['customSerializer']; diff --git a/packages/metro-core/src/utils/metro-compat.ts b/packages/metro-core/src/utils/metro-compat.ts new file mode 100644 index 00000000000..ef7dd7acd57 --- /dev/null +++ b/packages/metro-core/src/utils/metro-compat.ts @@ -0,0 +1,66 @@ +/** + * Metro Compatibility Layer + * + * Provides backwards-compatible imports for Metro 0.82 and 0.83+ + * + * Metro 0.83 introduced a restrictive `exports` field that only allows + * `metro/private/*` paths instead of direct `metro/src/*` imports. + * + * This module dynamically resolves the correct import path based on the + * installed Metro version, ensuring compatibility with both versions. + */ + +/** + * Attempts to import from Metro 0.83 format first, falls back to 0.82 format + */ +function tryImport(metro83Path: string, metro82Path: string) { + try { + return require(metro83Path); + } catch { + return require(metro82Path); + } +} + +function getDefaultExport(mod: any) { + // CJS interop: if the module has a .default that is a function or object, use it + // Otherwise return the module itself (already the direct export) + if (mod != null && typeof mod === 'object' && 'default' in mod) { + return mod.default; + } + return mod; +} + +// Server class +export const Server = getDefaultExport( + tryImport('metro/private/Server', 'metro/src/Server'), +); + +// DeltaBundler Serializers +export const baseJSBundle = getDefaultExport( + tryImport( + 'metro/private/DeltaBundler/Serializers/baseJSBundle', + 'metro/src/DeltaBundler/Serializers/baseJSBundle', + ), +); + +// Utility classes +export const CountingSet = getDefaultExport( + tryImport('metro/private/lib/CountingSet', 'metro/src/lib/CountingSet'), +); + +// Bundle utilities +export const bundleToString = getDefaultExport( + tryImport('metro/private/lib/bundleToString', 'metro/src/lib/bundleToString'), +); + +const relativizeSourceMapModule = tryImport( + 'metro/private/lib/relativizeSourceMap', + 'metro/src/lib/relativizeSourceMap', +); +export const relativizeSourceMapInline = + relativizeSourceMapModule.relativizeSourceMapInline || + getDefaultExport(relativizeSourceMapModule); + +// Re-export types - these come from metro/src/shared/types in both versions +// The types themselves are available through the main 'metro' package export +export type { RequestOptions, OutputOptions } from 'metro/src/shared/types'; diff --git a/packages/metro-core/src/utils/vm-manager.ts b/packages/metro-core/src/utils/vm-manager.ts index 7babfca544a..ff4f1738099 100644 --- a/packages/metro-core/src/utils/vm-manager.ts +++ b/packages/metro-core/src/utils/vm-manager.ts @@ -6,11 +6,13 @@ import type { TransformerConfigT, } from 'metro-config'; import type { FileSystem } from 'metro-file-map'; -import type MetroServer from 'metro/src/Server'; +import type { Server as MetroServer } from './metro-compat'; type EnhanceMiddleware = ServerConfigT['enhanceMiddleware']; type GetTransformOptions = TransformerConfigT['getTransformOptions']; -type Bundler = ReturnType['getBundler']>; +type Bundler = ReturnType< + ReturnType['getBundler']>['getBundler'] +>; export class VirtualModuleManager { private setupFinished: Promise | null = null; @@ -69,8 +71,8 @@ export class VirtualModuleManager { setup(bundler: Bundler) { this.setupFinished = (async () => { const graph = await bundler.getDependencyGraph(); - // @ts-expect-error incomplete types - this.ensureFileSystemPatched(graph._fileSystem); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + this.ensureFileSystemPatched((graph as any)._fileSystem); this.ensureBundlerPatched(bundler); return true; })(); @@ -104,7 +106,11 @@ export class VirtualModuleManager { } const transformFile = bundler.transformFile.bind(bundler); - bundler.transformFile = async (filePath, transformOptions, fileBuffer) => { + bundler.transformFile = async ( + filePath: string, + transformOptions: any, + fileBuffer?: Buffer, + ) => { let buffer = fileBuffer; const virtualModule = this.virtualModules.get(filePath); From 5f300e2f457b0f27796a167ece7f37df2b50828d Mon Sep 17 00:00:00 2001 From: Jakub Romanczyk Date: Wed, 11 Feb 2026 14:58:58 +0100 Subject: [PATCH 02/10] feat(metro-core): add type safety to Metro 0.83 compatibility layer Type the dynamic imports in metro-compat.ts using type-only imports so consumers get proper IntelliSense and compile-time checks. Fix ambient module declarations by moving imports inside declare module blocks and add missing relativizeSourceMapInline export. Co-Authored-By: Claude Opus 4.6 --- packages/metro-core/src/plugin/serializer.ts | 2 +- .../src/types/metro/baseJSBundle.d.ts | 12 +++++------ .../src/types/metro/getAppendScripts.d.ts | 3 +-- .../src/types/metro/processModules.d.ts | 3 +-- .../src/types/metro/relativizeSourceMap.d.ts | 9 +++++++-- packages/metro-core/src/utils/metro-compat.ts | 20 ++++++++++++++----- 6 files changed, 31 insertions(+), 18 deletions(-) diff --git a/packages/metro-core/src/plugin/serializer.ts b/packages/metro-core/src/plugin/serializer.ts index 0037d8d46b1..cec91e81fdd 100644 --- a/packages/metro-core/src/plugin/serializer.ts +++ b/packages/metro-core/src/plugin/serializer.ts @@ -143,7 +143,7 @@ function generateVirtualModule(name: string, code: string): Module { return { dependencies: new Map(), getSource: (): Buffer => Buffer.from(code), - inverseDependencies: new CountingSet(), + inverseDependencies: new CountingSet(), path: name, output: [ { diff --git a/packages/metro-core/src/types/metro/baseJSBundle.d.ts b/packages/metro-core/src/types/metro/baseJSBundle.d.ts index 3bbb9660be9..4ed4414e466 100644 --- a/packages/metro-core/src/types/metro/baseJSBundle.d.ts +++ b/packages/metro-core/src/types/metro/baseJSBundle.d.ts @@ -1,10 +1,10 @@ -import type { - Module, - ReadOnlyGraph, - SerializerOptions, -} from 'metro/src/DeltaBundler/types'; - declare module 'metro/src/DeltaBundler/Serializers/baseJSBundle' { + import type { + Module, + ReadOnlyGraph, + SerializerOptions, + } from 'metro/src/DeltaBundler/types'; + interface Bundle { modules: readonly [number, string][]; post: string; diff --git a/packages/metro-core/src/types/metro/getAppendScripts.d.ts b/packages/metro-core/src/types/metro/getAppendScripts.d.ts index 1514bf44284..a56aec403a0 100644 --- a/packages/metro-core/src/types/metro/getAppendScripts.d.ts +++ b/packages/metro-core/src/types/metro/getAppendScripts.d.ts @@ -1,6 +1,5 @@ -import type { Module } from 'metro/src/DeltaBundler/types'; - declare module 'metro/src/lib/getAppendScripts' { + import type { Module } from 'metro/src/DeltaBundler/types'; interface Options { asyncRequireModulePath: string; createModuleId: (path: string) => T; diff --git a/packages/metro-core/src/types/metro/processModules.d.ts b/packages/metro-core/src/types/metro/processModules.d.ts index 5b414a46afe..a7de84c74c1 100644 --- a/packages/metro-core/src/types/metro/processModules.d.ts +++ b/packages/metro-core/src/types/metro/processModules.d.ts @@ -1,6 +1,5 @@ -import type { Module } from 'metro/src/DeltaBundler/types'; - declare module 'metro/src/DeltaBundler/Serializers/helpers/processModules' { + import type { Module } from 'metro/src/DeltaBundler/types'; interface Options { filter?: (module: Module) => boolean; createModuleId: (path: string) => number; diff --git a/packages/metro-core/src/types/metro/relativizeSourceMap.d.ts b/packages/metro-core/src/types/metro/relativizeSourceMap.d.ts index 335944e4688..043eac5ad95 100644 --- a/packages/metro-core/src/types/metro/relativizeSourceMap.d.ts +++ b/packages/metro-core/src/types/metro/relativizeSourceMap.d.ts @@ -1,8 +1,13 @@ -import type { MixedSourceMap } from 'metro-source-map'; - declare module 'metro/src/lib/relativizeSourceMap' { + import type { MixedSourceMap } from 'metro-source-map'; + export default function relativizeSourceMap( sourceMap: MixedSourceMap, sourcesRoot: string, ): void; + + export function relativizeSourceMapInline( + sourceMap: MixedSourceMap, + sourcesRoot: string, + ): void; } diff --git a/packages/metro-core/src/utils/metro-compat.ts b/packages/metro-core/src/utils/metro-compat.ts index ef7dd7acd57..2856c75dfa8 100644 --- a/packages/metro-core/src/utils/metro-compat.ts +++ b/packages/metro-core/src/utils/metro-compat.ts @@ -10,6 +10,13 @@ * installed Metro version, ensuring compatibility with both versions. */ +// Type-only imports — resolved at compile-time via metro/src/*.d.ts, erased at runtime +import type DefaultServer from 'metro/src/Server'; +import type DefaultBaseJSBundle from 'metro/src/DeltaBundler/Serializers/baseJSBundle'; +import type DefaultCountingSet from 'metro/src/lib/CountingSet'; +import type DefaultBundleToString from 'metro/src/lib/bundleToString'; +import type { MixedSourceMap } from 'metro-source-map'; + /** * Attempts to import from Metro 0.83 format first, falls back to 0.82 format */ @@ -33,7 +40,7 @@ function getDefaultExport(mod: any) { // Server class export const Server = getDefaultExport( tryImport('metro/private/Server', 'metro/src/Server'), -); +) as typeof DefaultServer; // DeltaBundler Serializers export const baseJSBundle = getDefaultExport( @@ -41,23 +48,26 @@ export const baseJSBundle = getDefaultExport( 'metro/private/DeltaBundler/Serializers/baseJSBundle', 'metro/src/DeltaBundler/Serializers/baseJSBundle', ), -); +) as typeof DefaultBaseJSBundle; // Utility classes export const CountingSet = getDefaultExport( tryImport('metro/private/lib/CountingSet', 'metro/src/lib/CountingSet'), -); +) as typeof DefaultCountingSet; // Bundle utilities export const bundleToString = getDefaultExport( tryImport('metro/private/lib/bundleToString', 'metro/src/lib/bundleToString'), -); +) as typeof DefaultBundleToString; const relativizeSourceMapModule = tryImport( 'metro/private/lib/relativizeSourceMap', 'metro/src/lib/relativizeSourceMap', ); -export const relativizeSourceMapInline = +export const relativizeSourceMapInline: ( + sourceMap: MixedSourceMap, + sourcesRoot: string, +) => void = relativizeSourceMapModule.relativizeSourceMapInline || getDefaultExport(relativizeSourceMapModule); From 28ab287277d46ab712c20196149337651e498324 Mon Sep 17 00:00:00 2001 From: Jakub Romanczyk Date: Wed, 11 Feb 2026 15:31:28 +0100 Subject: [PATCH 03/10] refactor(metro-core): separate type and runtime imports, add private path mapping Split mixed type/runtime imports from metro-compat into separate import type and import statements. Add tsconfig paths entry mapping metro/private/* to metro/src/* for future module resolution changes. Co-Authored-By: Claude Opus 4.6 --- packages/metro-core/src/commands/bundle-host/index.ts | 3 ++- packages/metro-core/src/commands/bundle-remote/index.ts | 7 ++----- .../metro-core/src/commands/utils/save-bundle-and-map.ts | 6 ++---- packages/metro-core/tsconfig.json | 5 ++++- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/packages/metro-core/src/commands/bundle-host/index.ts b/packages/metro-core/src/commands/bundle-host/index.ts index 59cecd1b3c1..d1bd0b683f7 100644 --- a/packages/metro-core/src/commands/bundle-host/index.ts +++ b/packages/metro-core/src/commands/bundle-host/index.ts @@ -2,7 +2,8 @@ import path from 'node:path'; import util from 'node:util'; import type { ModuleFederationConfigNormalized } from '../../types'; import { CLIError } from '../../utils/errors'; -import { type RequestOptions, Server } from '../../utils/metro-compat'; +import type { RequestOptions } from '../../utils/metro-compat'; +import { Server } from '../../utils/metro-compat'; import type { Config } from '../types'; import { createResolver } from '../utils/create-resolver'; import { getCommunityCliPlugin } from '../utils/get-community-plugin'; diff --git a/packages/metro-core/src/commands/bundle-remote/index.ts b/packages/metro-core/src/commands/bundle-remote/index.ts index c0053240315..d86a0946c8b 100644 --- a/packages/metro-core/src/commands/bundle-remote/index.ts +++ b/packages/metro-core/src/commands/bundle-remote/index.ts @@ -5,11 +5,8 @@ import util from 'node:util'; import { mergeConfig } from 'metro'; import type { ModuleFederationConfigNormalized } from '../../types'; import { CLIError } from '../../utils/errors'; -import { - type OutputOptions, - type RequestOptions, - Server, -} from '../../utils/metro-compat'; +import type { OutputOptions, RequestOptions } from '../../utils/metro-compat'; +import { Server } from '../../utils/metro-compat'; import type { Config } from '../types'; import { createModulePathRemapper } from '../utils/create-module-path-remapper'; import { createResolver } from '../utils/create-resolver'; diff --git a/packages/metro-core/src/commands/utils/save-bundle-and-map.ts b/packages/metro-core/src/commands/utils/save-bundle-and-map.ts index 5a47b92e033..ea42161797b 100644 --- a/packages/metro-core/src/commands/utils/save-bundle-and-map.ts +++ b/packages/metro-core/src/commands/utils/save-bundle-and-map.ts @@ -1,10 +1,8 @@ import { promises as fs } from 'node:fs'; import util from 'node:util'; import type { MixedSourceMap } from 'metro-source-map'; -import { - type OutputOptions, - relativizeSourceMapInline, -} from '../../utils/metro-compat'; +import type { OutputOptions } from '../../utils/metro-compat'; +import { relativizeSourceMapInline } from '../../utils/metro-compat'; function relativizeSerializedMap( map: string, diff --git a/packages/metro-core/tsconfig.json b/packages/metro-core/tsconfig.json index 798324680dc..2c0aa558177 100644 --- a/packages/metro-core/tsconfig.json +++ b/packages/metro-core/tsconfig.json @@ -2,6 +2,9 @@ "extends": "../../tsconfig.base.json", "include": ["src"], "compilerOptions": { - "rootDir": "src" + "rootDir": "src", + "paths": { + "metro/private/*": ["metro/src/*"] + } } } From a0dc74553ff280ac1a0519c0fe2f172b755e4973 Mon Sep 17 00:00:00 2001 From: Jakub Romanczyk Date: Wed, 11 Feb 2026 16:11:06 +0100 Subject: [PATCH 04/10] fix: resolve then require --- packages/metro-core/src/utils/metro-compat.ts | 39 +++++++++++++------ 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/packages/metro-core/src/utils/metro-compat.ts b/packages/metro-core/src/utils/metro-compat.ts index 2856c75dfa8..5f4b55559a2 100644 --- a/packages/metro-core/src/utils/metro-compat.ts +++ b/packages/metro-core/src/utils/metro-compat.ts @@ -18,19 +18,30 @@ import type DefaultBundleToString from 'metro/src/lib/bundleToString'; import type { MixedSourceMap } from 'metro-source-map'; /** - * Attempts to import from Metro 0.83 format first, falls back to 0.82 format + * Resolves and imports a Metro module, trying 0.83 path first then 0.82 fallback. + * Uses require.resolve() before require() so resolution failures (wrong path) + * are separated from load errors (broken module), enabling better diagnostics. */ -function tryImport(metro83Path: string, metro82Path: string) { +function resolveAndImport(metro83Path: string, metro82Path: string) { + let resolvedPath: string; try { - return require(metro83Path); + resolvedPath = require.resolve(metro83Path); } catch { - return require(metro82Path); + try { + resolvedPath = require.resolve(metro82Path); + } catch { + throw new Error( + `Could not resolve 'metro' module. Tried:\n` + + ` - ${metro83Path}\n` + + ` - ${metro82Path}\n` + + `Ensure 'metro' is installed.`, + ); + } } + return require(resolvedPath); } function getDefaultExport(mod: any) { - // CJS interop: if the module has a .default that is a function or object, use it - // Otherwise return the module itself (already the direct export) if (mod != null && typeof mod === 'object' && 'default' in mod) { return mod.default; } @@ -39,12 +50,12 @@ function getDefaultExport(mod: any) { // Server class export const Server = getDefaultExport( - tryImport('metro/private/Server', 'metro/src/Server'), + resolveAndImport('metro/private/Server', 'metro/src/Server'), ) as typeof DefaultServer; // DeltaBundler Serializers export const baseJSBundle = getDefaultExport( - tryImport( + resolveAndImport( 'metro/private/DeltaBundler/Serializers/baseJSBundle', 'metro/src/DeltaBundler/Serializers/baseJSBundle', ), @@ -52,15 +63,21 @@ export const baseJSBundle = getDefaultExport( // Utility classes export const CountingSet = getDefaultExport( - tryImport('metro/private/lib/CountingSet', 'metro/src/lib/CountingSet'), + resolveAndImport( + 'metro/private/lib/CountingSet', + 'metro/src/lib/CountingSet', + ), ) as typeof DefaultCountingSet; // Bundle utilities export const bundleToString = getDefaultExport( - tryImport('metro/private/lib/bundleToString', 'metro/src/lib/bundleToString'), + resolveAndImport( + 'metro/private/lib/bundleToString', + 'metro/src/lib/bundleToString', + ), ) as typeof DefaultBundleToString; -const relativizeSourceMapModule = tryImport( +const relativizeSourceMapModule = resolveAndImport( 'metro/private/lib/relativizeSourceMap', 'metro/src/lib/relativizeSourceMap', ); From 7a7707c2ddab0d7efb170d9c5ea4085b8aea8567 Mon Sep 17 00:00:00 2001 From: Jakub Romanczyk Date: Wed, 11 Feb 2026 16:34:10 +0100 Subject: [PATCH 05/10] refactor(metro-core): add Server type alias, simplify instance type usage Export a `Server` type alias from metro-compat so consumers can use `Server` directly instead of `InstanceType`. Remove redundant explicit parameter types in vm-manager.ts. Co-Authored-By: Claude Opus 4.6 --- packages/metro-core/src/commands/bundle-host/index.ts | 5 +---- .../metro-core/src/commands/bundle-remote/index.ts | 5 +---- .../metro-core/src/commands/utils/create-resolver.ts | 5 +---- .../src/commands/utils/get-community-plugin.ts | 2 +- packages/metro-core/src/utils/metro-compat.ts | 1 + packages/metro-core/src/utils/vm-manager.ts | 10 ++-------- 6 files changed, 7 insertions(+), 21 deletions(-) diff --git a/packages/metro-core/src/commands/bundle-host/index.ts b/packages/metro-core/src/commands/bundle-host/index.ts index d1bd0b683f7..b9d76dcc690 100644 --- a/packages/metro-core/src/commands/bundle-host/index.ts +++ b/packages/metro-core/src/commands/bundle-host/index.ts @@ -59,10 +59,7 @@ async function bundleFederatedHost( communityCliPlugin.unstable_buildBundleWithConfig; return buildBundleWithConfig(args, config, { - build: async ( - server: InstanceType, - requestOpts: RequestOptions, - ) => { + build: async (server: Server, requestOpts: RequestOptions) => { // setup enhance middleware to trigger virtual modules setup config.server.enhanceMiddleware(server.processRequest, server); const resolver = await createResolver(server, args.platform); diff --git a/packages/metro-core/src/commands/bundle-remote/index.ts b/packages/metro-core/src/commands/bundle-remote/index.ts index d86a0946c8b..8a43859324f 100644 --- a/packages/metro-core/src/commands/bundle-remote/index.ts +++ b/packages/metro-core/src/commands/bundle-remote/index.ts @@ -43,10 +43,7 @@ interface BundleRequestOptions extends RequestOptions { sourceUrl: string; } -async function buildBundle( - server: InstanceType, - requestOpts: BundleRequestOptions, -) { +async function buildBundle(server: Server, requestOpts: BundleRequestOptions) { const bundle = await server.build({ ...Server.DEFAULT_BUNDLE_OPTIONS, ...requestOpts, diff --git a/packages/metro-core/src/commands/utils/create-resolver.ts b/packages/metro-core/src/commands/utils/create-resolver.ts index 795c37dd01d..232807d0fc2 100644 --- a/packages/metro-core/src/commands/utils/create-resolver.ts +++ b/packages/metro-core/src/commands/utils/create-resolver.ts @@ -14,10 +14,7 @@ import type { Server } from '../../utils/metro-compat'; * @param platform - The target platform for resolution (e.g., 'ios', 'android', null for default) * @returns The resolver object with a resolve method that takes source and target paths */ -export async function createResolver( - server: InstanceType, - platform: string | null, -) { +export async function createResolver(server: Server, platform: string | null) { const bundler = server.getBundler().getBundler(); const depGraph = await bundler.getDependencyGraph(); diff --git a/packages/metro-core/src/commands/utils/get-community-plugin.ts b/packages/metro-core/src/commands/utils/get-community-plugin.ts index 0281ec4953d..90fe79256a6 100644 --- a/packages/metro-core/src/commands/utils/get-community-plugin.ts +++ b/packages/metro-core/src/commands/utils/get-community-plugin.ts @@ -24,7 +24,7 @@ interface CommunityCliPlugin { config: ConfigT, bundleImpl: { build: ( - server: InstanceType, + server: Server, requestOpts: RequestOptions, ) => Promise<{ code: string; map: string }>; save: ( diff --git a/packages/metro-core/src/utils/metro-compat.ts b/packages/metro-core/src/utils/metro-compat.ts index 5f4b55559a2..fe2e3e9d171 100644 --- a/packages/metro-core/src/utils/metro-compat.ts +++ b/packages/metro-core/src/utils/metro-compat.ts @@ -52,6 +52,7 @@ function getDefaultExport(mod: any) { export const Server = getDefaultExport( resolveAndImport('metro/private/Server', 'metro/src/Server'), ) as typeof DefaultServer; +export type Server = DefaultServer; // DeltaBundler Serializers export const baseJSBundle = getDefaultExport( diff --git a/packages/metro-core/src/utils/vm-manager.ts b/packages/metro-core/src/utils/vm-manager.ts index ff4f1738099..5957090f263 100644 --- a/packages/metro-core/src/utils/vm-manager.ts +++ b/packages/metro-core/src/utils/vm-manager.ts @@ -10,9 +10,7 @@ import type { Server as MetroServer } from './metro-compat'; type EnhanceMiddleware = ServerConfigT['enhanceMiddleware']; type GetTransformOptions = TransformerConfigT['getTransformOptions']; -type Bundler = ReturnType< - ReturnType['getBundler']>['getBundler'] ->; +type Bundler = ReturnType['getBundler']>; export class VirtualModuleManager { private setupFinished: Promise | null = null; @@ -106,11 +104,7 @@ export class VirtualModuleManager { } const transformFile = bundler.transformFile.bind(bundler); - bundler.transformFile = async ( - filePath: string, - transformOptions: any, - fileBuffer?: Buffer, - ) => { + bundler.transformFile = async (filePath, transformOptions, fileBuffer) => { let buffer = fileBuffer; const virtualModule = this.virtualModules.get(filePath); From 51630dd24dc7aaaf3b7cc92f9558e514b0ea11b1 Mon Sep 17 00:00:00 2001 From: Jakub Romanczyk Date: Wed, 11 Feb 2026 17:18:51 +0100 Subject: [PATCH 06/10] fix: dont cast to any --- packages/metro-core/src/utils/vm-manager.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/metro-core/src/utils/vm-manager.ts b/packages/metro-core/src/utils/vm-manager.ts index 5957090f263..836d9ffb36c 100644 --- a/packages/metro-core/src/utils/vm-manager.ts +++ b/packages/metro-core/src/utils/vm-manager.ts @@ -69,8 +69,8 @@ export class VirtualModuleManager { setup(bundler: Bundler) { this.setupFinished = (async () => { const graph = await bundler.getDependencyGraph(); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - this.ensureFileSystemPatched((graph as any)._fileSystem); + // @ts-expect-error incomplete types + this.ensureFileSystemPatched(graph._fileSystem); this.ensureBundlerPatched(bundler); return true; })(); From 4c52e91ac215a71dc34910a3e071757685a3bc50 Mon Sep 17 00:00:00 2001 From: Jakub Romanczyk Date: Wed, 11 Feb 2026 17:31:38 +0100 Subject: [PATCH 07/10] fix: testers setup --- apps/metro-example-host/ios/Podfile.lock | 6 +++--- apps/metro-example-host/metro.config.js | 9 +++++++-- apps/metro-example-mini/metro.config.js | 9 +++++++-- apps/metro-example-nested-mini/metro.config.js | 9 +++++++-- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/apps/metro-example-host/ios/Podfile.lock b/apps/metro-example-host/ios/Podfile.lock index 33788d401f3..40b75e5bcc9 100644 --- a/apps/metro-example-host/ios/Podfile.lock +++ b/apps/metro-example-host/ios/Podfile.lock @@ -2422,11 +2422,11 @@ SPEC CHECKSUMS: React-timing: a275a1c2e6112dba17f8f7dd496d439213bbea0d React-utils: 449a6e1fd53886510e284e80bdbb1b1c6db29452 ReactAppDependencyProvider: 3267432b637c9b38e86961b287f784ee1b08dde0 - ReactCodegen: a1a6d7288d6a5fc86f109e46149c35d707932702 + ReactCodegen: 2539080349c02b1edbf525d0a392df99f984f34b ReactCommon: b028d09a66e60ebd83ca59d8cc9a1216360db147 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 Yoga: 0c4b7d2aacc910a1f702694fa86be830386f4ceb -PODFILE CHECKSUM: a8134080201cda3c42e54a89f48d0930861e3c58 +PODFILE CHECKSUM: d7ddd7fd39d49e0dd5d1205cb5dc83483092e5fb -COCOAPODS: 1.15.2 \ No newline at end of file +COCOAPODS: 1.15.2 diff --git a/apps/metro-example-host/metro.config.js b/apps/metro-example-host/metro.config.js index b51dcf27fa9..ec49dd20eb5 100644 --- a/apps/metro-example-host/metro.config.js +++ b/apps/metro-example-host/metro.config.js @@ -11,10 +11,15 @@ const {withModuleFederation} = require('@module-federation/metro'); */ const config = { - resolver: {useWatchman: false}, + resolver: { + extraNodeModules: { + '@babel/runtime': path.resolve(__dirname, 'node_modules/@babel/runtime'), + }, + useWatchman: false, + }, watchFolders: [ path.resolve(__dirname, '../../node_modules'), - path.resolve(__dirname, '../../packages/core'), + path.resolve(__dirname, '../../packages'), ], }; diff --git a/apps/metro-example-mini/metro.config.js b/apps/metro-example-mini/metro.config.js index 412ecc34f0b..bd86ea7af45 100644 --- a/apps/metro-example-mini/metro.config.js +++ b/apps/metro-example-mini/metro.config.js @@ -10,10 +10,15 @@ const {withModuleFederation} = require('@module-federation/metro'); * @type {import('@react-native/metro-config').MetroConfig} */ const config = { - resolver: {useWatchman: false}, + resolver: { + extraNodeModules: { + '@babel/runtime': path.resolve(__dirname, 'node_modules/@babel/runtime'), + }, + useWatchman: false, + }, watchFolders: [ path.resolve(__dirname, '../../node_modules'), - path.resolve(__dirname, '../../packages/core'), + path.resolve(__dirname, '../../packages'), ], }; diff --git a/apps/metro-example-nested-mini/metro.config.js b/apps/metro-example-nested-mini/metro.config.js index 44fc2deeca4..d4c55a5ce72 100644 --- a/apps/metro-example-nested-mini/metro.config.js +++ b/apps/metro-example-nested-mini/metro.config.js @@ -10,10 +10,15 @@ const {withModuleFederation} = require('@module-federation/metro'); * @type {import('@react-native/metro-config').MetroConfig} */ const config = { - resolver: {useWatchman: false}, + resolver: { + extraNodeModules: { + '@babel/runtime': path.resolve(__dirname, 'node_modules/@babel/runtime'), + }, + useWatchman: false, + }, watchFolders: [ path.resolve(__dirname, '../../node_modules'), - path.resolve(__dirname, '../../packages/core'), + path.resolve(__dirname, '../../packages'), ], }; From 5024217cf593bf6f7b0477f97c693381c20ab807 Mon Sep 17 00:00:00 2001 From: Jakub Romanczyk Date: Wed, 11 Feb 2026 18:32:40 +0100 Subject: [PATCH 08/10] fix: don't swallow errors other than module resolution --- .../metro-core/src/commands/utils/get-community-plugin.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/metro-core/src/commands/utils/get-community-plugin.ts b/packages/metro-core/src/commands/utils/get-community-plugin.ts index 90fe79256a6..7df6e9c31fd 100644 --- a/packages/metro-core/src/commands/utils/get-community-plugin.ts +++ b/packages/metro-core/src/commands/utils/get-community-plugin.ts @@ -38,15 +38,14 @@ interface CommunityCliPlugin { } export function getCommunityCliPlugin(reactNativePath?: string) { - let communityCliPlugin: CommunityCliPlugin; + let communityCliPluginPath: string; try { - const communityCliPluginPath = require.resolve( + communityCliPluginPath = require.resolve( '@react-native/community-cli-plugin', { paths: [reactNativePath ?? require.resolve('react-native')] }, ); - communityCliPlugin = require(communityCliPluginPath); } catch { throw new CLIError('Community CLI plugin is not installed.'); } - return communityCliPlugin; + return require(communityCliPluginPath) as CommunityCliPlugin; } From 1ba06109c914a9741b02de98aab63115a9d358a5 Mon Sep 17 00:00:00 2001 From: Jakub Romanczyk Date: Wed, 11 Feb 2026 18:41:32 +0100 Subject: [PATCH 09/10] fix: undo changes to Podfile.lock --- apps/metro-example-host/ios/Podfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/metro-example-host/ios/Podfile.lock b/apps/metro-example-host/ios/Podfile.lock index 40b75e5bcc9..33788d401f3 100644 --- a/apps/metro-example-host/ios/Podfile.lock +++ b/apps/metro-example-host/ios/Podfile.lock @@ -2422,11 +2422,11 @@ SPEC CHECKSUMS: React-timing: a275a1c2e6112dba17f8f7dd496d439213bbea0d React-utils: 449a6e1fd53886510e284e80bdbb1b1c6db29452 ReactAppDependencyProvider: 3267432b637c9b38e86961b287f784ee1b08dde0 - ReactCodegen: 2539080349c02b1edbf525d0a392df99f984f34b + ReactCodegen: a1a6d7288d6a5fc86f109e46149c35d707932702 ReactCommon: b028d09a66e60ebd83ca59d8cc9a1216360db147 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 Yoga: 0c4b7d2aacc910a1f702694fa86be830386f4ceb -PODFILE CHECKSUM: d7ddd7fd39d49e0dd5d1205cb5dc83483092e5fb +PODFILE CHECKSUM: a8134080201cda3c42e54a89f48d0930861e3c58 -COCOAPODS: 1.15.2 +COCOAPODS: 1.15.2 \ No newline at end of file From fe926a3afceb75899ef0343eecb42c4aee9594d9 Mon Sep 17 00:00:00 2001 From: Jakub Romanczyk Date: Wed, 11 Feb 2026 18:45:42 +0100 Subject: [PATCH 10/10] chore: match ruby version on CI --- apps/metro-example-host/Gemfile.lock | 49 +++++++++---------- apps/metro-example-host/ios/Podfile.lock | 8 +-- apps/metro-example-mini/Gemfile.lock | 45 ++++++++--------- apps/metro-example-mini/ios/Podfile.lock | 4 +- apps/metro-example-nested-mini/Gemfile.lock | 45 ++++++++--------- .../ios/Podfile.lock | 4 +- 6 files changed, 73 insertions(+), 82 deletions(-) diff --git a/apps/metro-example-host/Gemfile.lock b/apps/metro-example-host/Gemfile.lock index 46cb5c886c6..6f58f7d9b75 100644 --- a/apps/metro-example-host/Gemfile.lock +++ b/apps/metro-example-host/Gemfile.lock @@ -1,31 +1,29 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.7) - base64 - nkf - rexml - activesupport (7.2.2.1) + CFPropertyList (3.0.9) + activesupport (7.1.6) base64 benchmark (>= 0.3) bigdecimal - concurrent-ruby (~> 1.0, >= 1.3.1) + concurrent-ruby (~> 1.0, >= 1.0.2) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) logger (>= 1.4.2) minitest (>= 5.1) + mutex_m securerandom (>= 0.3) - tzinfo (~> 2.0, >= 2.0.5) - addressable (2.8.7) - public_suffix (>= 2.0.2, < 7.0) + tzinfo (~> 2.0) + addressable (2.8.8) + public_suffix (>= 2.0.2, < 8.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) atomos (0.1.3) - base64 (0.2.0) - benchmark (0.4.0) - bigdecimal (3.1.9) + base64 (0.3.0) + benchmark (0.5.0) + bigdecimal (4.0.1) claide (1.1.0) cocoapods (1.15.2) addressable (~> 2.8) @@ -66,34 +64,33 @@ GEM cocoapods-try (1.2.0) colored2 (3.1.2) concurrent-ruby (1.3.3) - connection_pool (2.5.3) - drb (2.2.1) + connection_pool (2.5.5) + drb (2.2.3) escape (0.0.4) - ethon (0.16.0) + ethon (0.15.0) ffi (>= 1.15.0) - ffi (1.17.2) + ffi (1.17.3) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) httpclient (2.9.0) mutex_m - i18n (1.14.7) + i18n (1.14.8) concurrent-ruby (~> 1.0) - json (2.11.3) + json (2.18.1) logger (1.7.0) - minitest (5.25.5) + minitest (5.26.1) molinillo (0.8.0) mutex_m (0.3.0) nanaimo (0.3.0) nap (1.1.0) netrc (0.11.0) - nkf (0.2.0) public_suffix (4.0.7) - rexml (3.4.1) + rexml (3.4.4) ruby-macho (2.5.1) - securerandom (0.4.1) - typhoeus (1.4.1) - ethon (>= 0.9.0) + securerandom (0.3.2) + typhoeus (1.5.0) + ethon (>= 0.9.0, < 0.16.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) xcodeproj (1.25.1) @@ -118,7 +115,7 @@ DEPENDENCIES xcodeproj (< 1.26.0) RUBY VERSION - ruby 3.1.0p0 + ruby 2.7.6p219 BUNDLED WITH - 2.6.1 + 2.1.4 diff --git a/apps/metro-example-host/ios/Podfile.lock b/apps/metro-example-host/ios/Podfile.lock index 33788d401f3..e884a7c0a15 100644 --- a/apps/metro-example-host/ios/Podfile.lock +++ b/apps/metro-example-host/ios/Podfile.lock @@ -2422,11 +2422,11 @@ SPEC CHECKSUMS: React-timing: a275a1c2e6112dba17f8f7dd496d439213bbea0d React-utils: 449a6e1fd53886510e284e80bdbb1b1c6db29452 ReactAppDependencyProvider: 3267432b637c9b38e86961b287f784ee1b08dde0 - ReactCodegen: a1a6d7288d6a5fc86f109e46149c35d707932702 + ReactCodegen: d308d08c58717331dcf82d0129efa8b73e28a64c ReactCommon: b028d09a66e60ebd83ca59d8cc9a1216360db147 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 - Yoga: 0c4b7d2aacc910a1f702694fa86be830386f4ceb + Yoga: 395b5d614cd7cbbfd76b05d01bd67230a6ad004e -PODFILE CHECKSUM: a8134080201cda3c42e54a89f48d0930861e3c58 +PODFILE CHECKSUM: d7ddd7fd39d49e0dd5d1205cb5dc83483092e5fb -COCOAPODS: 1.15.2 \ No newline at end of file +COCOAPODS: 1.15.2 diff --git a/apps/metro-example-mini/Gemfile.lock b/apps/metro-example-mini/Gemfile.lock index 5af6b649c94..6f58f7d9b75 100644 --- a/apps/metro-example-mini/Gemfile.lock +++ b/apps/metro-example-mini/Gemfile.lock @@ -1,31 +1,29 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.7) - base64 - nkf - rexml - activesupport (7.2.2.1) + CFPropertyList (3.0.9) + activesupport (7.1.6) base64 benchmark (>= 0.3) bigdecimal - concurrent-ruby (~> 1.0, >= 1.3.1) + concurrent-ruby (~> 1.0, >= 1.0.2) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) logger (>= 1.4.2) minitest (>= 5.1) + mutex_m securerandom (>= 0.3) - tzinfo (~> 2.0, >= 2.0.5) - addressable (2.8.7) - public_suffix (>= 2.0.2, < 7.0) + tzinfo (~> 2.0) + addressable (2.8.8) + public_suffix (>= 2.0.2, < 8.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) atomos (0.1.3) base64 (0.3.0) - benchmark (0.4.1) - bigdecimal (3.2.2) + benchmark (0.5.0) + bigdecimal (4.0.1) claide (1.1.0) cocoapods (1.15.2) addressable (~> 2.8) @@ -66,34 +64,33 @@ GEM cocoapods-try (1.2.0) colored2 (3.1.2) concurrent-ruby (1.3.3) - connection_pool (2.5.3) + connection_pool (2.5.5) drb (2.2.3) escape (0.0.4) - ethon (0.16.0) + ethon (0.15.0) ffi (>= 1.15.0) - ffi (1.17.2) + ffi (1.17.3) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) httpclient (2.9.0) mutex_m - i18n (1.14.7) + i18n (1.14.8) concurrent-ruby (~> 1.0) - json (2.12.2) + json (2.18.1) logger (1.7.0) - minitest (5.25.5) + minitest (5.26.1) molinillo (0.8.0) mutex_m (0.3.0) nanaimo (0.3.0) nap (1.1.0) netrc (0.11.0) - nkf (0.2.0) public_suffix (4.0.7) - rexml (3.4.2) + rexml (3.4.4) ruby-macho (2.5.1) - securerandom (0.4.1) - typhoeus (1.4.1) - ethon (>= 0.9.0) + securerandom (0.3.2) + typhoeus (1.5.0) + ethon (>= 0.9.0, < 0.16.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) xcodeproj (1.25.1) @@ -118,7 +115,7 @@ DEPENDENCIES xcodeproj (< 1.26.0) RUBY VERSION - ruby 3.1.0p0 + ruby 2.7.6p219 BUNDLED WITH - 2.6.1 + 2.1.4 diff --git a/apps/metro-example-mini/ios/Podfile.lock b/apps/metro-example-mini/ios/Podfile.lock index 3b3b7029bb4..779df101702 100644 --- a/apps/metro-example-mini/ios/Podfile.lock +++ b/apps/metro-example-mini/ios/Podfile.lock @@ -2422,10 +2422,10 @@ SPEC CHECKSUMS: React-timing: a275a1c2e6112dba17f8f7dd496d439213bbea0d React-utils: 449a6e1fd53886510e284e80bdbb1b1c6db29452 ReactAppDependencyProvider: 3267432b637c9b38e86961b287f784ee1b08dde0 - ReactCodegen: a1a6d7288d6a5fc86f109e46149c35d707932702 + ReactCodegen: d308d08c58717331dcf82d0129efa8b73e28a64c ReactCommon: b028d09a66e60ebd83ca59d8cc9a1216360db147 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 - Yoga: 0c4b7d2aacc910a1f702694fa86be830386f4ceb + Yoga: 395b5d614cd7cbbfd76b05d01bd67230a6ad004e PODFILE CHECKSUM: a8134080201cda3c42e54a89f48d0930861e3c58 diff --git a/apps/metro-example-nested-mini/Gemfile.lock b/apps/metro-example-nested-mini/Gemfile.lock index 792397b7eb9..6f58f7d9b75 100644 --- a/apps/metro-example-nested-mini/Gemfile.lock +++ b/apps/metro-example-nested-mini/Gemfile.lock @@ -1,31 +1,29 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.7) - base64 - nkf - rexml - activesupport (7.2.2.1) + CFPropertyList (3.0.9) + activesupport (7.1.6) base64 benchmark (>= 0.3) bigdecimal - concurrent-ruby (~> 1.0, >= 1.3.1) + concurrent-ruby (~> 1.0, >= 1.0.2) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) logger (>= 1.4.2) minitest (>= 5.1) + mutex_m securerandom (>= 0.3) - tzinfo (~> 2.0, >= 2.0.5) - addressable (2.8.7) - public_suffix (>= 2.0.2, < 7.0) + tzinfo (~> 2.0) + addressable (2.8.8) + public_suffix (>= 2.0.2, < 8.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) atomos (0.1.3) base64 (0.3.0) - benchmark (0.4.1) - bigdecimal (3.2.2) + benchmark (0.5.0) + bigdecimal (4.0.1) claide (1.1.0) cocoapods (1.15.2) addressable (~> 2.8) @@ -66,34 +64,33 @@ GEM cocoapods-try (1.2.0) colored2 (3.1.2) concurrent-ruby (1.3.3) - connection_pool (2.5.3) + connection_pool (2.5.5) drb (2.2.3) escape (0.0.4) - ethon (0.16.0) + ethon (0.15.0) ffi (>= 1.15.0) - ffi (1.17.2) + ffi (1.17.3) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) httpclient (2.9.0) mutex_m - i18n (1.14.7) + i18n (1.14.8) concurrent-ruby (~> 1.0) - json (2.12.2) + json (2.18.1) logger (1.7.0) - minitest (5.25.5) + minitest (5.26.1) molinillo (0.8.0) mutex_m (0.3.0) nanaimo (0.3.0) nap (1.1.0) netrc (0.11.0) - nkf (0.2.0) public_suffix (4.0.7) - rexml (3.4.1) + rexml (3.4.4) ruby-macho (2.5.1) - securerandom (0.4.1) - typhoeus (1.4.1) - ethon (>= 0.9.0) + securerandom (0.3.2) + typhoeus (1.5.0) + ethon (>= 0.9.0, < 0.16.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) xcodeproj (1.25.1) @@ -118,7 +115,7 @@ DEPENDENCIES xcodeproj (< 1.26.0) RUBY VERSION - ruby 3.1.0p0 + ruby 2.7.6p219 BUNDLED WITH - 2.6.1 + 2.1.4 diff --git a/apps/metro-example-nested-mini/ios/Podfile.lock b/apps/metro-example-nested-mini/ios/Podfile.lock index 3b3b7029bb4..779df101702 100644 --- a/apps/metro-example-nested-mini/ios/Podfile.lock +++ b/apps/metro-example-nested-mini/ios/Podfile.lock @@ -2422,10 +2422,10 @@ SPEC CHECKSUMS: React-timing: a275a1c2e6112dba17f8f7dd496d439213bbea0d React-utils: 449a6e1fd53886510e284e80bdbb1b1c6db29452 ReactAppDependencyProvider: 3267432b637c9b38e86961b287f784ee1b08dde0 - ReactCodegen: a1a6d7288d6a5fc86f109e46149c35d707932702 + ReactCodegen: d308d08c58717331dcf82d0129efa8b73e28a64c ReactCommon: b028d09a66e60ebd83ca59d8cc9a1216360db147 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 - Yoga: 0c4b7d2aacc910a1f702694fa86be830386f4ceb + Yoga: 395b5d614cd7cbbfd76b05d01bd67230a6ad004e PODFILE CHECKSUM: a8134080201cda3c42e54a89f48d0930861e3c58