From 9ea82e781f919b995f34d0c12f236f60f1634cc6 Mon Sep 17 00:00:00 2001 From: Rut Mehta Date: Thu, 5 Nov 2026 03:38:58 +0000 Subject: [PATCH] Stub NativeModules, TurboModuleRegistry and Component in the publish import smoke test (monorepo #22724) --- .github/workflows/npm-publish.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index ca6ab15..3de4a0d 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -174,11 +174,14 @@ jobs: export const Platform = { OS: "ios", Version: "0", constants: {} }; export const AppState = { currentState: "active", addEventListener: () => ({ remove() {} }) }; export const View = () => null; + export const NativeModules = {}; + export const TurboModuleRegistry = { get: () => null }; EOF cat > node_modules/react/package.json <<'EOF' { "name": "react", "version": "0.0.0-stub", "type": "module", "main": "index.js" } EOF cat > node_modules/react/index.js <<'EOF' + export class Component {} export const createElement = () => null; EOF node --input-type=module -e "