diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000000000..3eeda446893fb5 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +//localhost:4873/:_authToken=secretToken diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index ae750abe9f060d..862b0bf05a65be 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -2,10 +2,7 @@ "name": "@react-native/community-cli-plugin", "version": "0.74.78", "description": "Core CLI commands for React Native", - "keywords": [ - "react-native", - "tools" - ], + "keywords": ["react-native", "tools"], "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/community-cli-plugin#readme", "bugs": "https://github.com/facebook/react-native/issues", "repository": { @@ -14,13 +11,8 @@ "directory": "packages/community-cli-plugin" }, "license": "MIT", - "exports": { - ".": "./src/index.js", - "./package.json": "./package.json" - }, - "files": [ - "dist" - ], + "exports": { ".": "./dist/index.js", "./package.json": "./package.json" }, + "files": ["dist"], "dependencies": { "@react-native-community/cli-server-api": "13.6.4", "@react-native-community/cli-tools": "13.6.4", @@ -35,10 +27,6 @@ "querystring": "^0.2.1", "readline": "^1.3.0" }, - "devDependencies": { - "metro-resolver": "^0.80.3" - }, - "engines": { - "node": ">=18" - } + "devDependencies": { "metro-resolver": "^0.80.3" }, + "engines": { "node": ">=18" } } diff --git a/packages/dev-middleware/package.json b/packages/dev-middleware/package.json index 634c5030fad993..598e305b1bb254 100644 --- a/packages/dev-middleware/package.json +++ b/packages/dev-middleware/package.json @@ -2,10 +2,7 @@ "name": "@react-native/dev-middleware", "version": "0.74.78", "description": "Dev server middleware for React Native", - "keywords": [ - "react-native", - "tools" - ], + "keywords": ["react-native", "tools"], "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/dev-middleware#readme", "bugs": "https://github.com/facebook/react-native/issues", "repository": { @@ -14,13 +11,8 @@ "directory": "packages/dev-middleware" }, "license": "MIT", - "exports": { - ".": "./src/index.js", - "./package.json": "./package.json" - }, - "files": [ - "dist" - ], + "exports": { ".": "./dist/index.js", "./package.json": "./package.json" }, + "files": ["dist"], "dependencies": { "@isaacs/ttlcache": "^1.4.1", "@react-native/debugger-frontend": "0.74.78", @@ -36,9 +28,7 @@ "temp-dir": "^2.0.0", "ws": "^6.2.2" }, - "engines": { - "node": ">=18" - }, + "engines": { "node": ">=18" }, "devDependencies": { "data-uri-to-buffer": "^6.0.1", "undici": "^5.27.2", diff --git a/packages/metro-config/package.json b/packages/metro-config/package.json index c3f052bbd58f86..be59bed8011052 100644 --- a/packages/metro-config/package.json +++ b/packages/metro-config/package.json @@ -9,22 +9,11 @@ "directory": "packages/metro-config" }, "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/metro-config#readme", - "keywords": [ - "metro", - "config", - "react-native" - ], + "keywords": ["metro", "config", "react-native"], "bugs": "https://github.com/facebook/react-native/issues", - "engines": { - "node": ">=18" - }, - "exports": { - ".": "./src/index.js", - "./package.json": "./package.json" - }, - "files": [ - "dist" - ], + "engines": { "node": ">=18" }, + "exports": { ".": "./dist/index.js", "./package.json": "./package.json" }, + "files": ["dist"], "dependencies": { "@react-native/js-polyfills": "0.74.78", "@react-native/metro-babel-transformer": "0.74.78", diff --git a/packages/react-native/React/Base/RCTBridgeProxy.h b/packages/react-native/React/Base/RCTBridgeProxy.h index 71bb9cf0831640..d49360e57f20f3 100644 --- a/packages/react-native/React/Base/RCTBridgeProxy.h +++ b/packages/react-native/React/Base/RCTBridgeProxy.h @@ -18,6 +18,14 @@ NS_ASSUME_NONNULL_BEGIN @interface RCTBridgeProxy : NSProxy +- (instancetype)initWithViewRegistry:(RCTViewRegistry *)viewRegistry + moduleRegistry:(RCTModuleRegistry *)moduleRegistry + bundleManager:(RCTBundleManager *)bundleManager + callableJSModules:(RCTCallableJSModules *)callableJSModules + dispatchToJSThread:(void (^)(dispatch_block_t))dispatchToJSThread + registerSegmentWithId:(void (^)(NSNumber *, NSString *))registerSegmentWithId + runtime:(void *)runtime __deprecated; + - (instancetype)initWithViewRegistry:(RCTViewRegistry *)viewRegistry moduleRegistry:(RCTModuleRegistry *)moduleRegistry bundleManager:(RCTBundleManager *)bundleManager diff --git a/packages/react-native/React/Base/RCTBridgeProxy.mm b/packages/react-native/React/Base/RCTBridgeProxy.mm index 5b3e0656929ee3..82ee59a189ff50 100644 --- a/packages/react-native/React/Base/RCTBridgeProxy.mm +++ b/packages/react-native/React/Base/RCTBridgeProxy.mm @@ -41,6 +41,24 @@ @implementation RCTBridgeProxy { void *_runtime; } +- (instancetype)initWithViewRegistry:(RCTViewRegistry *)viewRegistry + moduleRegistry:(RCTModuleRegistry *)moduleRegistry + bundleManager:(RCTBundleManager *)bundleManager + callableJSModules:(RCTCallableJSModules *)callableJSModules + dispatchToJSThread:(void (^)(dispatch_block_t))dispatchToJSThread + registerSegmentWithId:(void (^)(NSNumber *, NSString *))registerSegmentWithId + runtime:(void *)runtime +{ + return [self initWithViewRegistry:viewRegistry + moduleRegistry:moduleRegistry + bundleManager:bundleManager + callableJSModules:callableJSModules + dispatchToJSThread:dispatchToJSThread + registerSegmentWithId:registerSegmentWithId + runtime:runtime + launchOptions:@{}]; +} + - (instancetype)initWithViewRegistry:(RCTViewRegistry *)viewRegistry moduleRegistry:(RCTModuleRegistry *)moduleRegistry bundleManager:(RCTBundleManager *)bundleManager diff --git a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.h b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.h index 87f6de0b7fa045..f5bd7d631355b6 100644 --- a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.h +++ b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.h @@ -59,6 +59,11 @@ typedef std::shared_ptr (^RCTHostJSEngineProv jsEngineProvider:(RCTHostJSEngineProvider)jsEngineProvider launchOptions:(nullable NSDictionary *)launchOptions __deprecated; +- (instancetype)initWithBundleURL:(NSURL *)bundleURL + hostDelegate:(id)hostDelegate + turboModuleManagerDelegate:(id)turboModuleManagerDelegate + jsEngineProvider:(RCTHostJSEngineProvider)jsEngineProvider __deprecated; + @property (nonatomic, weak, nullable) id runtimeDelegate; @property (nonatomic, readonly) RCTSurfacePresenter *surfacePresenter; diff --git a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm index cddebbe109fba7..a07faa7045e379 100644 --- a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm +++ b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm @@ -79,6 +79,21 @@ + (void)initialize _RCTInitializeJSThreadConstantInternal(); } +- (instancetype)initWithBundleURL:(NSURL *)bundleURL + hostDelegate:(id)hostDelegate + turboModuleManagerDelegate:(id)turboModuleManagerDelegate + jsEngineProvider:(RCTHostJSEngineProvider)jsEngineProvider +{ + return [self + initWithBundleURLProvider:^{ + return bundleURL; + } + hostDelegate:hostDelegate + turboModuleManagerDelegate:turboModuleManagerDelegate + jsEngineProvider:jsEngineProvider + launchOptions:@{}]; +} + - (instancetype)initWithBundleURL:(NSURL *)bundleURL hostDelegate:(id)hostDelegate turboModuleManagerDelegate:(id)turboModuleManagerDelegate diff --git a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.h b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.h index 6eaba0a1a8b782..1b803144d5aeb9 100644 --- a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.h +++ b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.h @@ -56,6 +56,14 @@ typedef void (^_Null_unspecified RCTInstanceInitialBundleLoadCompletionBlock)(); */ @interface RCTInstance : NSObject +- (instancetype)initWithDelegate:(id)delegate + jsRuntimeFactory:(std::shared_ptr)jsRuntimeFactory + bundleManager:(RCTBundleManager *)bundleManager + turboModuleManagerDelegate:(id)turboModuleManagerDelegate + onInitialBundleLoad:(RCTInstanceInitialBundleLoadCompletionBlock)onInitialBundleLoad + moduleRegistry:(RCTModuleRegistry *)moduleRegistry + parentInspectorTarget:(facebook::react::jsinspector_modern::PageTarget *)parentInspectorTarget __deprecated; + - (instancetype)initWithDelegate:(id)delegate jsRuntimeFactory:(std::shared_ptr)jsRuntimeFactory bundleManager:(RCTBundleManager *)bundleManager @@ -63,7 +71,7 @@ typedef void (^_Null_unspecified RCTInstanceInitialBundleLoadCompletionBlock)(); onInitialBundleLoad:(RCTInstanceInitialBundleLoadCompletionBlock)onInitialBundleLoad moduleRegistry:(RCTModuleRegistry *)moduleRegistry parentInspectorTarget:(facebook::react::jsinspector_modern::PageTarget *)parentInspectorTarget - launchOptions:(nullable NSDictionary *)launchOptions; + launchOptions:(nullable NSDictionary *)launchOptions NS_DESIGNATED_INITIALIZER; - (void)callFunctionOnJSModule:(NSString *)moduleName method:(NSString *)method args:(NSArray *)args; diff --git a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm index 029525a10c033a..b8b572ac439a52 100644 --- a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +++ b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm @@ -93,6 +93,24 @@ @implementation RCTInstance { #pragma mark - Public +- (instancetype)initWithDelegate:(id)delegate + jsRuntimeFactory:(std::shared_ptr)jsRuntimeFactory + bundleManager:(RCTBundleManager *)bundleManager + turboModuleManagerDelegate:(id)turboModuleManagerDelegate + onInitialBundleLoad:(RCTInstanceInitialBundleLoadCompletionBlock)onInitialBundleLoad + moduleRegistry:(RCTModuleRegistry *)moduleRegistry + parentInspectorTarget:(facebook::react::jsinspector_modern::PageTarget *)parentInspectorTarget +{ + return [self initWithDelegate:delegate + jsRuntimeFactory:jsRuntimeFactory + bundleManager:bundleManager + turboModuleManagerDelegate:turboModuleManagerDelegate + onInitialBundleLoad:onInitialBundleLoad + moduleRegistry:moduleRegistry + parentInspectorTarget:parentInspectorTarget + launchOptions:@{}]; +} + - (instancetype)initWithDelegate:(id)delegate jsRuntimeFactory:(std::shared_ptr)jsRuntimeFactory bundleManager:(RCTBundleManager *)bundleManager diff --git a/packages/react-native/react-native-1000.0.0-cb2d93ea5.tgz b/packages/react-native/react-native-1000.0.0-cb2d93ea5.tgz new file mode 100644 index 00000000000000..ecd9532202cc32 Binary files /dev/null and b/packages/react-native/react-native-1000.0.0-cb2d93ea5.tgz differ diff --git a/packages/react-native/template/package.json b/packages/react-native/template/package.json index 77525b6f2f533b..13dc15e382bd30 100644 --- a/packages/react-native/template/package.json +++ b/packages/react-native/template/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "react": "18.2.0", - "react-native": "0.74.0-rc.7" + "react-native": "file:///Users/cipolleschi/Official/react-native/packages/react-native/react-native-1000.0.0-cb2d93ea5.tgz" }, "devDependencies": { "@babel/core": "^7.20.0", diff --git a/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj b/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj index 27217c190103fe..fe45b7b8d539d6 100644 --- a/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj +++ b/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj @@ -375,8 +375,8 @@ 13B07F8E1A680F5B00A75B9A /* Resources */, 68CD48B71D2BCB2C007E06A9 /* Build JS Bundle */, 79E8BE2B119D4C5CCD2F04B3 /* [RN] Copy Hermes Framework */, - A41785EFA563389E1508FB58 /* [CP] Embed Pods Frameworks */, 5E028B80F3C32FE3D52DF9A7 /* [CP] Copy Pods Resources */, + 3B576E60C9D1854D1423F203 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -395,8 +395,8 @@ E7DB209B22B2BA84005AC45F /* Sources */, E7DB209C22B2BA84005AC45F /* Frameworks */, E7DB209D22B2BA84005AC45F /* Resources */, - 3FA5A4AA0B18E37634BDB153 /* [CP] Embed Pods Frameworks */, 829D7C63C528493FD8CA45E9 /* [CP] Copy Pods Resources */, + 943145340CE6DACC96B61E69 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -416,8 +416,8 @@ E7DB214F22B2F332005AC45F /* Sources */, E7DB215022B2F332005AC45F /* Frameworks */, E7DB215122B2F332005AC45F /* Resources */, - 659CD3193D6E6ED5B92470CE /* [CP] Embed Pods Frameworks */, C5A1A0DE195B37E2DE72DBE8 /* [CP] Copy Pods Resources */, + A2B1F303B66EA7596F4151BC /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -521,21 +521,21 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 3FA5A4AA0B18E37634BDB153 /* [CP] Embed Pods Frameworks */ = { + 3B576E60C9D1854D1423F203 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; 5E028B80F3C32FE3D52DF9A7 /* [CP] Copy Pods Resources */ = { @@ -555,23 +555,6 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 659CD3193D6E6ED5B92470CE /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; 68CD48B71D2BCB2C007E06A9 /* Build JS Bundle */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -645,6 +628,23 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + 943145340CE6DACC96B61E69 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; 9E05A96E88B51366B482536F /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -667,21 +667,21 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - A41785EFA563389E1508FB58 /* [CP] Embed Pods Frameworks */ = { + A2B1F303B66EA7596F4151BC /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; C5A1A0DE195B37E2DE72DBE8 /* [CP] Copy Pods Resources */ = {