mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
52
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23f62acd83 | ||
|
|
1099c0ccf7 | ||
|
|
e8fdd3c5ac | ||
|
|
a22e29c192 | ||
|
|
6d300b6fb8 | ||
|
|
e490b1ed9f | ||
|
|
1a04e5db62 | ||
|
|
efc475c3f9 | ||
|
|
947734f235 | ||
|
|
a4210ef245 | ||
|
|
d129e9a1b5 | ||
|
|
b958fe13f9 | ||
|
|
ec9e1718aa | ||
|
|
c4714e81d8 | ||
|
|
b8fa7c80ff | ||
|
|
4126ce844d | ||
|
|
95021db72a | ||
|
|
83eb95e72a | ||
|
|
3b44182c1d | ||
|
|
f4fd248d53 | ||
|
|
c41ab475b1 | ||
|
|
1dd89df561 | ||
|
|
a0f11acc34 | ||
|
|
507934f7d9 | ||
|
|
e6396039c7 | ||
|
|
fdb5721ead | ||
|
|
123b25226a | ||
|
|
6259ee91bd | ||
|
|
b4aab7fb52 | ||
|
|
064887675b | ||
|
|
2a10923863 | ||
|
|
bf14325d30 | ||
|
|
2085076449 | ||
|
|
d67d91407e | ||
|
|
4d67a27c37 | ||
|
|
b0db081a76 | ||
|
|
959eafca33 | ||
|
|
bc62261dfa | ||
|
|
4af4311fc8 | ||
|
|
e78ea9f6d9 | ||
|
|
33d175f51b | ||
|
|
f60fbc15ae | ||
|
|
28facc2824 | ||
|
|
cf5d04d3e1 | ||
|
|
1e3c583d73 | ||
|
|
026fd325ab | ||
|
|
b395208303 | ||
|
|
8041e410e3 | ||
|
|
13ab63b60a | ||
|
|
965d84314a | ||
|
|
b93b378fa0 | ||
|
|
f55759e633 |
@@ -22,7 +22,7 @@ runs:
|
||||
- name: Restore Cached Artifacts
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
key: v4-hermes-artifacts-${{ inputs.flavor }}-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}
|
||||
key: v4-hermes-artifacts-${{ inputs.flavor }}-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}-${{ hashFiles('./packages/react-native/sdks/hermes/utils/build-apple-frameworks.sh') }}
|
||||
path: |
|
||||
/tmp/hermes/osx-bin/${{ inputs.flavor }}
|
||||
/tmp/hermes/dSYM/${{ inputs.flavor }}
|
||||
@@ -200,7 +200,7 @@ runs:
|
||||
uses: actions/cache/save@v4
|
||||
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
|
||||
with:
|
||||
key: v4-hermes-artifacts-${{ inputs.flavor }}-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}
|
||||
key: v4-hermes-artifacts-${{ inputs.flavor }}-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}-${{ hashFiles('./packages/react-native/sdks/hermes/utils/build-apple-frameworks.sh') }}
|
||||
path: |
|
||||
/tmp/hermes/osx-bin/${{ inputs.flavor }}
|
||||
/tmp/hermes/dSYM/${{ inputs.flavor }}
|
||||
|
||||
+7
-11
@@ -32,8 +32,7 @@
|
||||
"test-typescript": "dtslint packages/react-native/types",
|
||||
"test": "jest",
|
||||
"trigger-react-native-release": "node ./scripts/releases-local/trigger-react-native-release.js",
|
||||
"update-lock": "npx yarn-deduplicate",
|
||||
"postinstall": "cd packages/react-native-codegen && yarn build"
|
||||
"update-lock": "npx yarn-deduplicate"
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/*",
|
||||
@@ -50,8 +49,8 @@
|
||||
"@definitelytyped/dtslint": "^0.0.127",
|
||||
"@jest/create-cache-key-function": "^29.6.3",
|
||||
"@pkgjs/parseargs": "^0.11.0",
|
||||
"@react-native/metro-babel-transformer": "0.76.0-main",
|
||||
"@react-native/metro-config": "0.76.0-main",
|
||||
"@react-native/metro-babel-transformer": "0.76.0-rc.2",
|
||||
"@react-native/metro-config": "0.76.0-rc.2",
|
||||
"@tsconfig/node18": "1.0.1",
|
||||
"@types/react": "^18.2.6",
|
||||
"@typescript-eslint/parser": "^7.1.1",
|
||||
@@ -87,24 +86,21 @@
|
||||
"jest": "^29.6.3",
|
||||
"jest-junit": "^10.0.0",
|
||||
"jscodeshift": "^0.14.0",
|
||||
"metro-babel-register": "^0.80.10",
|
||||
"metro-memory-fs": "^0.80.10",
|
||||
"metro-babel-register": "^0.81.0-alpha.0",
|
||||
"metro-memory-fs": "^0.81.0-alpha.0",
|
||||
"micromatch": "^4.0.4",
|
||||
"mkdirp": "^0.5.1",
|
||||
"node-fetch": "^2.2.0",
|
||||
"nullthrows": "^1.1.1",
|
||||
"prettier": "2.8.8",
|
||||
"prettier-plugin-hermes-parser": "0.23.1",
|
||||
"react": "19.0.0-rc-fb9a90fa48-20240614",
|
||||
"react-test-renderer": "19.0.0-rc-fb9a90fa48-20240614",
|
||||
"react": "18.3.1",
|
||||
"react-test-renderer": "18.3.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"shelljs": "^0.8.5",
|
||||
"signedsource": "^1.0.0",
|
||||
"supports-color": "^7.1.0",
|
||||
"typescript": "5.0.4",
|
||||
"ws": "^6.2.3"
|
||||
},
|
||||
"resolutions": {
|
||||
"react-is": "19.0.0-rc-fb9a90fa48-20240614"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/assets-registry",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"description": "Asset support code for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/babel-plugin-codegen",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"description": "Babel plugin to generate native module and view manager code for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -25,7 +25,7 @@
|
||||
"index.js"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/codegen": "0.76.0-main"
|
||||
"@react-native/codegen": "0.76.0-rc.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/community-cli-plugin",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"description": "Core CLI commands for React Native",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
@@ -22,18 +22,18 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/dev-middleware": "0.76.0-main",
|
||||
"@react-native/metro-babel-transformer": "0.76.0-main",
|
||||
"@react-native/dev-middleware": "0.76.0-rc.2",
|
||||
"@react-native/metro-babel-transformer": "0.76.0-rc.2",
|
||||
"chalk": "^4.0.0",
|
||||
"execa": "^5.1.1",
|
||||
"metro": "^0.80.10",
|
||||
"metro-config": "^0.80.10",
|
||||
"metro-core": "^0.80.10",
|
||||
"metro": "^0.81.0-alpha.0",
|
||||
"metro-config": "^0.81.0-alpha.0",
|
||||
"metro-core": "^0.81.0-alpha.0",
|
||||
"node-fetch": "^2.2.0",
|
||||
"readline": "^1.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"metro-resolver": "^0.80.10"
|
||||
"metro-resolver": "^0.81.0-alpha.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@react-native-community/cli-server-api": "*"
|
||||
|
||||
@@ -19,6 +19,18 @@ import fetch from 'node-fetch';
|
||||
|
||||
const CTRL_C = '\u0003';
|
||||
const CTRL_D = '\u0004';
|
||||
const RELOAD_TIMEOUT = 500;
|
||||
|
||||
const throttle = (callback: () => void, timeout: number) => {
|
||||
let previousCallTimestamp = 0;
|
||||
return () => {
|
||||
const currentCallTimestamp = new Date().getTime();
|
||||
if (currentCallTimestamp - previousCallTimestamp > timeout) {
|
||||
previousCallTimestamp = currentCallTimestamp;
|
||||
callback();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
export default function attachKeyHandlers({
|
||||
cliConfig,
|
||||
@@ -41,11 +53,15 @@ export default function attachKeyHandlers({
|
||||
env: {FORCE_COLOR: chalk.supportsColor ? 'true' : 'false'},
|
||||
};
|
||||
|
||||
const reload = throttle(() => {
|
||||
logger.info('Reloading connected app(s)...');
|
||||
messageSocket.broadcast('reload', null);
|
||||
}, RELOAD_TIMEOUT);
|
||||
|
||||
const onPress = async (key: string) => {
|
||||
switch (key.toLowerCase()) {
|
||||
case 'r':
|
||||
logger.info('Reloading connected app(s)...');
|
||||
messageSocket.broadcast('reload', null);
|
||||
reload();
|
||||
break;
|
||||
case 'd':
|
||||
logger.info('Opening Dev Menu...');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/core-cli-utils",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"description": "React Native CLI library for Frameworks to build on",
|
||||
"license": "MIT",
|
||||
"main": "./src/index.flow.js",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@generated SignedSource<<d156d11a5d3cc2a10238c2f014ada9f9>>
|
||||
Git revision: a556d261a5e2131864f4e38ded62d8f90e81c39a
|
||||
@generated SignedSource<<85fb986aee1b601b649481b64d2b5dc8>>
|
||||
Git revision: e8c79432972029c625c91d16967b07fe61f04a61
|
||||
Built with --nohooks: false
|
||||
Is local checkout: false
|
||||
Remote URL: https://github.com/facebookexperimental/rn-chrome-devtools-frontend
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
import*as e from"../../core/i18n/i18n.js";import*as o from"../../ui/legacy/legacy.js";const t={title:"⚛️ Components",command:"Show React DevTools Components panel"},n=e.i18n.registerUIStrings("panels/react_devtools/react_devtools_components-meta.ts",t),a=e.i18n.getLazilyComputedLocalizedString.bind(void 0,n);let i;o.ViewManager.registerViewExtension({location:"panel",id:"react-devtools-components",title:a(t.title),commandPrompt:a(t.command),persistence:"permanent",order:1e3,loadView:async()=>new((await async function(){return i||(i=await import("./react_devtools.js")),i}()).ReactDevToolsComponentsView.ReactDevToolsComponentsViewImpl)});
|
||||
import*as e from"../../core/i18n/i18n.js";import*as o from"../../ui/legacy/legacy.js";const t={title:"Components ⚛",command:"Show React DevTools Components panel"},n=e.i18n.registerUIStrings("panels/react_devtools/react_devtools_components-meta.ts",t),a=e.i18n.getLazilyComputedLocalizedString.bind(void 0,n);let i;o.ViewManager.registerViewExtension({location:"panel",id:"react-devtools-components",title:a(t.title),commandPrompt:a(t.command),persistence:"permanent",order:1e3,loadView:async()=>new((await async function(){return i||(i=await import("./react_devtools.js")),i}()).ReactDevToolsComponentsView.ReactDevToolsComponentsViewImpl)});
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import*as e from"../../core/i18n/i18n.js";import*as o from"../../ui/legacy/legacy.js";const t={title:"⚛️ Profiler",command:"Show React DevTools Profiler panel"},i=e.i18n.registerUIStrings("panels/react_devtools/react_devtools_profiler-meta.ts",t),r=e.i18n.getLazilyComputedLocalizedString.bind(void 0,i);let a;o.ViewManager.registerViewExtension({location:"panel",id:"react-devtools-profiler",title:r(t.title),commandPrompt:r(t.command),persistence:"permanent",order:1e3,loadView:async()=>new((await async function(){return a||(a=await import("./react_devtools.js")),a}()).ReactDevToolsProfilerView.ReactDevToolsProfilerViewImpl)});
|
||||
import*as e from"../../core/i18n/i18n.js";import*as o from"../../ui/legacy/legacy.js";const t={title:"Profiler ⚛",command:"Show React DevTools Profiler panel"},i=e.i18n.registerUIStrings("panels/react_devtools/react_devtools_profiler-meta.ts",t),r=e.i18n.getLazilyComputedLocalizedString.bind(void 0,i);let a;o.ViewManager.registerViewExtension({location:"panel",id:"react-devtools-profiler",title:r(t.title),commandPrompt:r(t.command),persistence:"permanent",order:1e3,loadView:async()=>new((await async function(){return a||(a=await import("./react_devtools.js")),a}()).ReactDevToolsProfilerView.ReactDevToolsProfilerViewImpl)});
|
||||
|
||||
+18
-18
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/debugger-frontend",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"description": "Debugger frontend for React Native based on Chrome DevTools",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/dev-middleware",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"description": "Dev server middleware for React Native",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
@@ -23,7 +23,7 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@isaacs/ttlcache": "^1.4.1",
|
||||
"@react-native/debugger-frontend": "0.76.0-main",
|
||||
"@react-native/debugger-frontend": "0.76.0-rc.2",
|
||||
"chrome-launcher": "^0.15.2",
|
||||
"chromium-edge-launcher": "^0.2.0",
|
||||
"connect": "^3.6.5",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/eslint-config",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"description": "ESLint config for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -22,7 +22,7 @@
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/eslint-parser": "^7.25.1",
|
||||
"@react-native/eslint-plugin": "0.76.0-main",
|
||||
"@react-native/eslint-plugin": "0.76.0-rc.2",
|
||||
"@typescript-eslint/eslint-plugin": "^7.1.1",
|
||||
"@typescript-eslint/parser": "^7.1.1",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/eslint-plugin",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"description": "ESLint rules for @react-native/eslint-config",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/eslint-plugin-specs",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"description": "ESLint rules to validate NativeModule and Component Specs",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -31,7 +31,7 @@
|
||||
"@babel/eslint-parser": "^7.25.1",
|
||||
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
|
||||
"@babel/preset-flow": "^7.24.7",
|
||||
"@react-native/codegen": "0.76.0-main",
|
||||
"@react-native/codegen": "0.76.0-rc.2",
|
||||
"make-dir": "^2.1.0",
|
||||
"pirates": "^4.0.1",
|
||||
"source-map-support": "0.5.0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/gradle-plugin",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"description": "Gradle Plugin for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
+1
@@ -188,6 +188,7 @@ abstract class ReactExtension @Inject constructor(val project: Project) {
|
||||
?.dependencies
|
||||
?.values
|
||||
?.filter { it.platforms?.android !== null }
|
||||
?.filterNot { it.platforms?.android?.isPureCxxDependency == true }
|
||||
?.forEach { deps ->
|
||||
val nameCleansed = deps.nameCleansed
|
||||
val dependencyConfiguration = deps.platforms?.android?.dependencyConfiguration
|
||||
|
||||
+11
-2
@@ -30,10 +30,19 @@ abstract class GeneratePackageListTask : DefaultTask() {
|
||||
|
||||
@TaskAction
|
||||
fun taskAction() {
|
||||
val model = JsonUtils.fromAutolinkingConfigJson(autolinkInputFile.get().asFile)
|
||||
val model =
|
||||
JsonUtils.fromAutolinkingConfigJson(autolinkInputFile.get().asFile)
|
||||
?: error(
|
||||
"""
|
||||
RNGP - Autolinking: Could not parse autolinking config file:
|
||||
${autolinkInputFile.get().asFile.absolutePath}
|
||||
|
||||
The file is either missing or not containing valid JSON so the build won't succeed.
|
||||
"""
|
||||
.trimIndent())
|
||||
|
||||
val packageName =
|
||||
model?.project?.android?.packageName
|
||||
model.project?.android?.packageName
|
||||
?: error(
|
||||
"RNGP - Autolinking: Could not find project.android.packageName in react-native config output! Could not autolink packages without this field.")
|
||||
|
||||
|
||||
+38
@@ -189,6 +189,44 @@ class ReactExtensionTest {
|
||||
assertThat(deps).isEmpty()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun getGradleDependenciesToApply_withIsPureCxxDeps_filtersCorrectly() {
|
||||
val validJsonFile =
|
||||
createJsonFile(
|
||||
"""
|
||||
{
|
||||
"reactNativeVersion": "1000.0.0",
|
||||
"dependencies": {
|
||||
"@react-native/oss-library-example": {
|
||||
"root": "./node_modules/@react-native/android-example",
|
||||
"name": "@react-native/android-example",
|
||||
"platforms": {
|
||||
"android": {
|
||||
"sourceDir": "src/main/java",
|
||||
"packageImportPath": "com.facebook.react"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@react-native/another-library-for-testing": {
|
||||
"root": "./node_modules/@react-native/cxx-testing",
|
||||
"name": "@react-native/cxx-testing",
|
||||
"platforms": {
|
||||
"android": {
|
||||
"sourceDir": "src/main/java",
|
||||
"packageImportPath": "com.facebook.react",
|
||||
"isPureCxxDependency": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
.trimIndent())
|
||||
|
||||
val deps = getGradleDependenciesToApply(validJsonFile)
|
||||
assertThat(deps).containsExactly("implementation" to ":react-native_android-example")
|
||||
}
|
||||
|
||||
private fun createJsonFile(@Language("JSON") input: String) =
|
||||
tempFolder.newFile().apply { writeText(input) }
|
||||
}
|
||||
|
||||
+17
-2
@@ -21,8 +21,23 @@ object JsonUtils {
|
||||
}
|
||||
|
||||
fun fromAutolinkingConfigJson(input: File): ModelAutolinkingConfigJson? =
|
||||
input.bufferedReader().use {
|
||||
runCatching { gsonConverter.fromJson(it, ModelAutolinkingConfigJson::class.java) }
|
||||
input.bufferedReader().use { reader ->
|
||||
runCatching {
|
||||
// We sanitize the output of the `config` command as it could contain debug logs
|
||||
// such as:
|
||||
//
|
||||
// > AwesomeProject@0.0.1 npx
|
||||
// > rnc-cli config
|
||||
//
|
||||
// which will render the JSON invalid.
|
||||
val content =
|
||||
reader
|
||||
.readLines()
|
||||
.filterNot { line -> line.startsWith(">") }
|
||||
.joinToString("\n")
|
||||
.trim()
|
||||
gsonConverter.fromJson(content, ModelAutolinkingConfigJson::class.java)
|
||||
}
|
||||
.getOrNull()
|
||||
}
|
||||
}
|
||||
|
||||
+48
@@ -186,6 +186,54 @@ class JsonUtilsTest {
|
||||
assertThat("implementation").isEqualTo(parsed.project!!.android!!.dependencyConfiguration)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun fromAutolinkingConfigJson_withInfoLogs_sanitizeAndParseIt() {
|
||||
@Suppress("JsonStandardCompliance")
|
||||
val validJson =
|
||||
createJsonFile(
|
||||
"""
|
||||
|
||||
> AwesomeProject@0.0.1 npx
|
||||
> rnc-cli config
|
||||
|
||||
{
|
||||
"reactNativeVersion": "1000.0.0",
|
||||
"project": {
|
||||
"ios": {
|
||||
"sourceDir": "./packages/rn-tester",
|
||||
"xcodeProject": {
|
||||
"name": "RNTesterPods.xcworkspace",
|
||||
"isWorkspace": true
|
||||
},
|
||||
"automaticPodsInstallation": false
|
||||
},
|
||||
"android": {
|
||||
"sourceDir": "./packages/rn-tester",
|
||||
"appName": "RN-Tester",
|
||||
"packageName": "com.facebook.react.uiapp",
|
||||
"applicationId": "com.facebook.react.uiapp",
|
||||
"mainActivity": ".RNTesterActivity",
|
||||
"watchModeCommandParams": [
|
||||
"--mode HermesDebug"
|
||||
],
|
||||
"dependencyConfiguration": "implementation"
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
.trimIndent())
|
||||
val parsed = JsonUtils.fromAutolinkingConfigJson(validJson)!!
|
||||
|
||||
assertThat("./packages/rn-tester").isEqualTo(parsed.project!!.android!!.sourceDir)
|
||||
assertThat("RN-Tester").isEqualTo(parsed.project!!.android!!.appName)
|
||||
assertThat("com.facebook.react.uiapp").isEqualTo(parsed.project!!.android!!.packageName)
|
||||
assertThat("com.facebook.react.uiapp").isEqualTo(parsed.project!!.android!!.applicationId)
|
||||
assertThat(".RNTesterActivity").isEqualTo(parsed.project!!.android!!.mainActivity)
|
||||
assertThat("--mode HermesDebug")
|
||||
.isEqualTo(parsed.project!!.android!!.watchModeCommandParams!![0])
|
||||
assertThat("implementation").isEqualTo(parsed.project!!.android!!.dependencyConfiguration)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun fromAutolinkingConfigJson_withDependenciesSpecified_canParseIt() {
|
||||
val validJson =
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.facebook.react.ReactPackage
|
||||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
|
||||
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
|
||||
import com.facebook.react.defaults.DefaultReactNativeHost
|
||||
import com.facebook.react.soloader.OpenSourceMergedSoMapping
|
||||
import com.facebook.soloader.SoLoader
|
||||
|
||||
class MainApplication : Application(), ReactApplication {
|
||||
@@ -41,7 +42,7 @@ class MainApplication : Application(), ReactApplication {
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
SoLoader.init(this, false)
|
||||
SoLoader.init(this, OpenSourceMergedSoMapping)
|
||||
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
||||
// If you opted-in for the New Architecture, we load the native entry point for this app.
|
||||
load()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "helloworld",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"bootstrap": "node ./cli.js bootstrap",
|
||||
@@ -12,24 +12,24 @@
|
||||
"test": "jest"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "19.0.0-rc-fb9a90fa48-20240614",
|
||||
"react-native": "1000.0.0"
|
||||
"react": "18.3.1",
|
||||
"react-native": "0.76.0-rc.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/runtime": "^7.25.0",
|
||||
"@react-native/babel-preset": "0.76.0-main",
|
||||
"@react-native/core-cli-utils": "0.76.0-main",
|
||||
"@react-native/eslint-config": "0.76.0-main",
|
||||
"@react-native/metro-config": "0.76.0-main",
|
||||
"@react-native/babel-preset": "0.76.0-rc.2",
|
||||
"@react-native/core-cli-utils": "0.76.0-rc.2",
|
||||
"@react-native/eslint-config": "0.76.0-rc.2",
|
||||
"@react-native/metro-config": "0.76.0-rc.2",
|
||||
"babel-jest": "^29.6.3",
|
||||
"chalk": "^4.1.2",
|
||||
"commander": "^12.0.0",
|
||||
"eslint": "^8.19.0",
|
||||
"jest": "^29.6.3",
|
||||
"listr2": "^8.2.1",
|
||||
"react-test-renderer": "19.0.0-rc-fb9a90fa48-20240614",
|
||||
"react-test-renderer": "18.3.1",
|
||||
"rxjs": "^7.8.1"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/hermes-inspector-msggen",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"private": true,
|
||||
"description": "Hermes Inspector Message Generator for React Native",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/metro-config",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"description": "Metro configuration for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -26,9 +26,9 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/js-polyfills": "0.76.0-main",
|
||||
"@react-native/metro-babel-transformer": "0.76.0-main",
|
||||
"metro-config": "^0.80.10",
|
||||
"metro-runtime": "^0.80.10"
|
||||
"@react-native/js-polyfills": "0.76.0-rc.2",
|
||||
"@react-native/metro-babel-transformer": "0.76.0-rc.2",
|
||||
"metro-config": "^0.81.0-alpha.0",
|
||||
"metro-runtime": "^0.81.0-alpha.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/normalize-colors",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"description": "Color normalization for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/js-polyfills",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"description": "Polyfills for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/babel-preset",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"description": "Babel preset for React Native applications",
|
||||
"main": "src/index.js",
|
||||
"repository": {
|
||||
@@ -56,7 +56,7 @@
|
||||
"@babel/plugin-transform-typescript": "^7.25.2",
|
||||
"@babel/plugin-transform-unicode-regex": "^7.24.7",
|
||||
"@babel/template": "^7.25.0",
|
||||
"@react-native/babel-plugin-codegen": "0.76.0-main",
|
||||
"@react-native/babel-plugin-codegen": "0.76.0-rc.2",
|
||||
"babel-plugin-transform-flow-enums": "^0.0.2",
|
||||
"react-refresh": "^0.14.0"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/metro-babel-transformer",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"description": "Babel transformer for React Native applications.",
|
||||
"main": "src/index.js",
|
||||
"repository": {
|
||||
@@ -16,7 +16,7 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@react-native/babel-preset": "0.76.0-main",
|
||||
"@react-native/babel-preset": "0.76.0-rc.2",
|
||||
"hermes-parser": "0.23.1",
|
||||
"nullthrows": "^1.1.1"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@react-native/bots",
|
||||
"description": "React Native Bots",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/codegen-typescript-test",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"private": true,
|
||||
"description": "TypeScript related unit test for @react-native/codegen",
|
||||
"license": "MIT",
|
||||
@@ -19,7 +19,7 @@
|
||||
"prepare": "yarn run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@react-native/codegen": "0.76.0-main"
|
||||
"@react-native/codegen": "0.76.0-rc.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/codegen",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"description": "Code generation tools for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native-info",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"main": "build/index.js",
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/popup-menu-android",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"description": "PopupMenu for the Android platform",
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
@@ -17,7 +17,7 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@react-native/codegen": "0.76.0-main"
|
||||
"@react-native/codegen": "0.76.0-rc.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^18.2.6",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/oss-library-example",
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"private": true,
|
||||
"description": "Package that includes native module exapmle, native component example, targets both the old and the new architecture. It should serve as an example of a real-world OSS library.",
|
||||
"license": "MIT",
|
||||
@@ -26,8 +26,8 @@
|
||||
],
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@react-native/babel-preset": "0.76.0-main",
|
||||
"react-native": "1000.0.0"
|
||||
"@react-native/babel-preset": "0.76.0-rc.2",
|
||||
"react-native": "0.76.0-rc.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@react-native/test-renderer",
|
||||
"private": true,
|
||||
"version": "0.76.0-main",
|
||||
"version": "0.76.0-rc.2",
|
||||
"description": "A Test rendering library for React Native",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1931,19 +1931,22 @@ function createRefForwarder<TNativeInstance, TPublicInstance>(
|
||||
return state;
|
||||
}
|
||||
|
||||
// TODO: After upgrading to React 19, remove `forwardRef` from this component.
|
||||
// NOTE: This wrapper component is necessary because `ScrollView` is a class
|
||||
// component and we need to map `ref` to a differently named prop. This can be
|
||||
// removed when `ScrollView` is a functional component.
|
||||
function Wrapper({
|
||||
ref,
|
||||
...props
|
||||
}: {
|
||||
...Props,
|
||||
ref: React.RefSetter<PublicScrollViewInstance>,
|
||||
}): React.Node {
|
||||
return <ScrollView {...props} scrollViewRef={ref} />;
|
||||
}
|
||||
const Wrapper = React.forwardRef(function Wrapper(
|
||||
props: Props,
|
||||
ref: ?React.RefSetter<PublicScrollViewInstance>,
|
||||
): React.Node {
|
||||
return ref == null ? (
|
||||
<ScrollView {...props} />
|
||||
) : (
|
||||
<ScrollView {...props} scrollViewRef={ref} />
|
||||
);
|
||||
});
|
||||
Wrapper.displayName = 'ScrollView';
|
||||
// $FlowExpectedError[prop-missing]
|
||||
Wrapper.Context = ScrollViewContext;
|
||||
|
||||
module.exports = ((Wrapper: $FlowFixMe): React.AbstractComponent<
|
||||
|
||||
+3
@@ -160,6 +160,9 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig =
|
||||
snapToInterval: true,
|
||||
snapToOffsets: true,
|
||||
snapToStart: true,
|
||||
verticalScrollIndicatorInsets: {
|
||||
diff: require('../../Utilities/differ/insetsDiffer'),
|
||||
},
|
||||
zoomScale: true,
|
||||
...ConditionallyIgnoredEventHandlers({
|
||||
onScrollBeginDrag: true,
|
||||
|
||||
+10
@@ -85,8 +85,15 @@ const RCTTextInputViewConfig = {
|
||||
topContentSizeChange: {
|
||||
registrationName: 'onContentSizeChange',
|
||||
},
|
||||
topChangeSync: {
|
||||
registrationName: 'onChangeSync',
|
||||
},
|
||||
topKeyPressSync: {
|
||||
registrationName: 'onKeyPressSync',
|
||||
},
|
||||
},
|
||||
validAttributes: {
|
||||
dynamicTypeRamp: true,
|
||||
fontSize: true,
|
||||
fontWeight: true,
|
||||
fontVariant: true,
|
||||
@@ -97,6 +104,7 @@ const RCTTextInputViewConfig = {
|
||||
textTransform: true,
|
||||
textAlign: true,
|
||||
fontFamily: true,
|
||||
lineBreakModeIOS: true,
|
||||
lineHeight: true,
|
||||
isHighlighted: true,
|
||||
writingDirection: true,
|
||||
@@ -150,6 +158,8 @@ const RCTTextInputViewConfig = {
|
||||
onSelectionChange: true,
|
||||
onContentSizeChange: true,
|
||||
onScroll: true,
|
||||
onChangeSync: true,
|
||||
onKeyPressSync: true,
|
||||
}),
|
||||
},
|
||||
};
|
||||
|
||||
+2
-2
@@ -120,7 +120,7 @@ const ReactNativeStyleAttributes: {[string]: AnyAttributeType, ...} = {
|
||||
/**
|
||||
* Filter
|
||||
*/
|
||||
experimental_filter: {process: processFilter},
|
||||
filter: {process: processFilter},
|
||||
|
||||
/**
|
||||
* MixBlendMode
|
||||
@@ -135,7 +135,7 @@ const ReactNativeStyleAttributes: {[string]: AnyAttributeType, ...} = {
|
||||
/*
|
||||
* BoxShadow
|
||||
*/
|
||||
experimental_boxShadow: {process: processBoxShadow},
|
||||
boxShadow: {process: processBoxShadow},
|
||||
|
||||
/**
|
||||
* Linear Gradient
|
||||
|
||||
@@ -14,10 +14,10 @@ const version: $ReadOnly<{
|
||||
patch: number,
|
||||
prerelease: string | null,
|
||||
}> = {
|
||||
major: 1000,
|
||||
minor: 0,
|
||||
major: 0,
|
||||
minor: 76,
|
||||
patch: 0,
|
||||
prerelease: null,
|
||||
prerelease: 'rc.2',
|
||||
};
|
||||
|
||||
module.exports = {version};
|
||||
|
||||
@@ -169,10 +169,10 @@ const validAttributesForNonEventProps = {
|
||||
experimental_backgroundImage: {
|
||||
process: require('../StyleSheet/processBackgroundImage').default,
|
||||
},
|
||||
experimental_boxShadow: {
|
||||
boxShadow: {
|
||||
process: require('../StyleSheet/processBoxShadow').default,
|
||||
},
|
||||
experimental_filter: {
|
||||
filter: {
|
||||
process: require('../StyleSheet/processFilter').default,
|
||||
},
|
||||
experimental_mixBlendMode: true,
|
||||
|
||||
@@ -198,6 +198,7 @@ const validAttributesForNonEventProps = {
|
||||
testID: true,
|
||||
backgroundColor: {process: require('../StyleSheet/processColor').default},
|
||||
backfaceVisibility: true,
|
||||
cursor: true,
|
||||
opacity: true,
|
||||
shadowColor: {process: require('../StyleSheet/processColor').default},
|
||||
shadowOffset: {diff: require('../Utilities/differ/sizesDiffer')},
|
||||
@@ -216,16 +217,18 @@ const validAttributesForNonEventProps = {
|
||||
role: true,
|
||||
borderRadius: true,
|
||||
borderColor: {process: require('../StyleSheet/processColor').default},
|
||||
borderBlockColor: {process: require('../StyleSheet/processColor').default},
|
||||
borderCurve: true,
|
||||
borderWidth: true,
|
||||
borderBlockWidth: true,
|
||||
borderStyle: true,
|
||||
hitSlop: {diff: require('../Utilities/differ/insetsDiffer')},
|
||||
collapsable: true,
|
||||
collapsableChildren: true,
|
||||
experimental_filter: {
|
||||
filter: {
|
||||
process: require('../StyleSheet/processFilter').default,
|
||||
},
|
||||
experimental_boxShadow: {
|
||||
boxShadow: {
|
||||
process: require('../StyleSheet/processBoxShadow').default,
|
||||
},
|
||||
experimental_mixBlendMode: true,
|
||||
@@ -240,9 +243,15 @@ const validAttributesForNonEventProps = {
|
||||
borderLeftWidth: true,
|
||||
borderLeftColor: {process: require('../StyleSheet/processColor').default},
|
||||
borderStartWidth: true,
|
||||
borderBlockStartWidth: true,
|
||||
borderStartColor: {process: require('../StyleSheet/processColor').default},
|
||||
borderBlockStartColor: {
|
||||
process: require('../StyleSheet/processColor').default,
|
||||
},
|
||||
borderEndWidth: true,
|
||||
borderBlockEndWidth: true,
|
||||
borderEndColor: {process: require('../StyleSheet/processColor').default},
|
||||
borderBlockEndColor: {process: require('../StyleSheet/processColor').default},
|
||||
|
||||
borderTopLeftRadius: true,
|
||||
borderTopRightRadius: true,
|
||||
|
||||
@@ -188,6 +188,10 @@ function getProcessorForType(typeName: string): ?(nextProp: any) => any {
|
||||
case 'UIImage':
|
||||
case 'RCTImageSource':
|
||||
return resolveAssetSource;
|
||||
case 'BoxShadowArray':
|
||||
return processBoxShadow;
|
||||
case 'FilterArray':
|
||||
return processFilter;
|
||||
// Android Types
|
||||
case 'Color':
|
||||
return processColor;
|
||||
|
||||
+27141
-16426
File diff suppressed because it is too large
Load Diff
+1630
-2675
File diff suppressed because it is too large
Load Diff
+1682
-2945
File diff suppressed because it is too large
Load Diff
+27607
-16730
File diff suppressed because it is too large
Load Diff
+1652
-2709
File diff suppressed because it is too large
Load Diff
+1733
-2980
File diff suppressed because it is too large
Load Diff
@@ -110,11 +110,102 @@ export interface FlexStyle {
|
||||
top?: DimensionValue | undefined;
|
||||
width?: DimensionValue | undefined;
|
||||
zIndex?: number | undefined;
|
||||
direction?: 'inherit' | 'ltr' | 'rtl' | undefined;
|
||||
|
||||
/**
|
||||
* @platform ios
|
||||
* Equivalent to `top`, `bottom`, `right` and `left`
|
||||
*/
|
||||
direction?: 'inherit' | 'ltr' | 'rtl' | undefined;
|
||||
inset?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `top`, `bottom`
|
||||
*/
|
||||
insetBlock?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `bottom`
|
||||
*/
|
||||
insetBlockEnd?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `top`
|
||||
*/
|
||||
insetBlockStart?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `right` and `left`
|
||||
*/
|
||||
insetInline?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `right` or `left`
|
||||
*/
|
||||
insetInlineEnd?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `right` or `left`
|
||||
*/
|
||||
insetInlineStart?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `marginVertical`
|
||||
*/
|
||||
marginBlock?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `marginBottom`
|
||||
*/
|
||||
marginBlockEnd?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `marginTop`
|
||||
*/
|
||||
marginBlockStart?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `marginHorizontal`
|
||||
*/
|
||||
marginInline?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `marginEnd`
|
||||
*/
|
||||
marginInlineEnd?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `marginStart`
|
||||
*/
|
||||
marginInlineStart?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `paddingVertical`
|
||||
*/
|
||||
paddingBlock?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `paddingBottom`
|
||||
*/
|
||||
paddingBlockEnd?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `paddingTop`
|
||||
*/
|
||||
paddingBlockStart?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `paddingHorizontal`
|
||||
*/
|
||||
paddingInline?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `paddingEnd`
|
||||
*/
|
||||
paddingInlineEnd?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `paddingStart`
|
||||
*/
|
||||
paddingInlineStart?: DimensionValue | undefined;
|
||||
}
|
||||
|
||||
export interface ShadowStyleIOS {
|
||||
@@ -239,16 +330,16 @@ export type FilterFunction =
|
||||
| {opacity: number | string}
|
||||
| {saturate: number | string}
|
||||
| {sepia: number | string}
|
||||
| {dropShadow: DropShadowPrimitive | string};
|
||||
| {dropShadow: DropShadowValue | string};
|
||||
|
||||
export type DropShadowPrimitive = {
|
||||
export type DropShadowValue = {
|
||||
offsetX: number | string;
|
||||
offsetY: number | string;
|
||||
standardDeviation?: number | string | undefined;
|
||||
color?: ColorValue | number | undefined;
|
||||
};
|
||||
|
||||
export type BoxShadowPrimitive = {
|
||||
export type BoxShadowValue = {
|
||||
offsetX: number | string;
|
||||
offsetY: number | string;
|
||||
color?: string | undefined;
|
||||
@@ -336,6 +427,8 @@ export interface ViewStyle extends FlexStyle, ShadowStyleIOS, TransformsStyle {
|
||||
pointerEvents?: 'box-none' | 'none' | 'box-only' | 'auto' | undefined;
|
||||
isolation?: 'auto' | 'isolate' | undefined;
|
||||
cursor?: CursorValue | undefined;
|
||||
boxShadow?: ReadonlyArray<BoxShadowValue> | string | undefined;
|
||||
filter?: ReadonlyArray<FilterFunction> | string | undefined;
|
||||
}
|
||||
|
||||
export type FontVariant =
|
||||
|
||||
@@ -700,9 +700,9 @@ export type FilterFunction =
|
||||
| {opacity: number | string}
|
||||
| {saturate: number | string}
|
||||
| {sepia: number | string}
|
||||
| {dropShadow: DropShadowPrimitive | string};
|
||||
| {dropShadow: DropShadowValue | string};
|
||||
|
||||
export type DropShadowPrimitive = {
|
||||
export type DropShadowValue = {
|
||||
offsetX: number | string,
|
||||
offsetY: number | string,
|
||||
standardDeviation?: number | string,
|
||||
@@ -719,7 +719,7 @@ export type GradientValue = {
|
||||
}>,
|
||||
};
|
||||
|
||||
export type BoxShadowPrimitive = {
|
||||
export type BoxShadowValue = {
|
||||
offsetX: number | string,
|
||||
offsetY: number | string,
|
||||
color?: ____ColorValue_Internal,
|
||||
@@ -788,8 +788,8 @@ export type ____ViewStyle_InternalCore = $ReadOnly<{
|
||||
elevation?: number,
|
||||
pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only',
|
||||
cursor?: CursorValue,
|
||||
experimental_boxShadow?: $ReadOnlyArray<BoxShadowPrimitive> | string,
|
||||
experimental_filter?: $ReadOnlyArray<FilterFunction> | string,
|
||||
boxShadow?: $ReadOnlyArray<BoxShadowValue> | string,
|
||||
filter?: $ReadOnlyArray<FilterFunction> | string,
|
||||
experimental_mixBlendMode?: ____BlendMode_Internal,
|
||||
experimental_backgroundImage?: $ReadOnlyArray<GradientValue> | string,
|
||||
isolation?: 'auto' | 'isolate',
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
import type {ProcessedColorValue} from './processColor';
|
||||
import type {BoxShadowPrimitive} from './StyleSheetTypes';
|
||||
import type {BoxShadowValue} from './StyleSheetTypes';
|
||||
|
||||
import processColor from './processColor';
|
||||
|
||||
@@ -24,7 +24,7 @@ export type ParsedBoxShadow = {
|
||||
};
|
||||
|
||||
export default function processBoxShadow(
|
||||
rawBoxShadows: ?($ReadOnlyArray<BoxShadowPrimitive> | string),
|
||||
rawBoxShadows: ?($ReadOnlyArray<BoxShadowValue> | string),
|
||||
): Array<ParsedBoxShadow> {
|
||||
const result: Array<ParsedBoxShadow> = [];
|
||||
if (rawBoxShadows == null) {
|
||||
@@ -106,16 +106,14 @@ export default function processBoxShadow(
|
||||
return result;
|
||||
}
|
||||
|
||||
function parseBoxShadowString(
|
||||
rawBoxShadows: string,
|
||||
): Array<BoxShadowPrimitive> {
|
||||
let result: Array<BoxShadowPrimitive> = [];
|
||||
function parseBoxShadowString(rawBoxShadows: string): Array<BoxShadowValue> {
|
||||
let result: Array<BoxShadowValue> = [];
|
||||
|
||||
for (const rawBoxShadow of rawBoxShadows
|
||||
.split(/,(?![^()]*\))/) // split by comma that is not in parenthesis
|
||||
.map(bS => bS.trim())
|
||||
.filter(bS => bS !== '')) {
|
||||
const boxShadow: BoxShadowPrimitive = {
|
||||
const boxShadow: BoxShadowValue = {
|
||||
offsetX: 0,
|
||||
offsetY: 0,
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
'use strict';
|
||||
|
||||
import type {ColorValue} from './StyleSheet';
|
||||
import type {DropShadowPrimitive, FilterFunction} from './StyleSheetTypes';
|
||||
import type {DropShadowValue, FilterFunction} from './StyleSheetTypes';
|
||||
|
||||
import processColor from './processColor';
|
||||
|
||||
@@ -179,7 +179,7 @@ function _getFilterAmount(filterName: string, filterArgs: mixed): ?number {
|
||||
}
|
||||
|
||||
function parseDropShadow(
|
||||
rawDropShadow: string | DropShadowPrimitive,
|
||||
rawDropShadow: string | DropShadowValue,
|
||||
): ?ParsedDropShadow {
|
||||
const dropShadow =
|
||||
typeof rawDropShadow === 'string'
|
||||
@@ -248,8 +248,8 @@ function parseDropShadow(
|
||||
return parsedDropShadow;
|
||||
}
|
||||
|
||||
function parseDropShadowString(rawDropShadow: string): ?DropShadowPrimitive {
|
||||
const dropShadow: DropShadowPrimitive = {
|
||||
function parseDropShadowString(rawDropShadow: string): ?DropShadowValue {
|
||||
const dropShadow: DropShadowValue = {
|
||||
offsetX: 0,
|
||||
offsetY: 0,
|
||||
};
|
||||
|
||||
@@ -8232,8 +8232,8 @@ export type FilterFunction =
|
||||
| { opacity: number | string }
|
||||
| { saturate: number | string }
|
||||
| { sepia: number | string }
|
||||
| { dropShadow: DropShadowPrimitive | string };
|
||||
export type DropShadowPrimitive = {
|
||||
| { dropShadow: DropShadowValue | string };
|
||||
export type DropShadowValue = {
|
||||
offsetX: number | string,
|
||||
offsetY: number | string,
|
||||
standardDeviation?: number | string,
|
||||
@@ -8247,7 +8247,7 @@ export type GradientValue = {
|
||||
positions?: $ReadOnlyArray<string>,
|
||||
}>,
|
||||
};
|
||||
export type BoxShadowPrimitive = {
|
||||
export type BoxShadowValue = {
|
||||
offsetX: number | string,
|
||||
offsetY: number | string,
|
||||
color?: ____ColorValue_Internal,
|
||||
@@ -8314,8 +8314,8 @@ export type ____ViewStyle_InternalCore = $ReadOnly<{
|
||||
elevation?: number,
|
||||
pointerEvents?: \\"auto\\" | \\"none\\" | \\"box-none\\" | \\"box-only\\",
|
||||
cursor?: CursorValue,
|
||||
experimental_boxShadow?: $ReadOnlyArray<BoxShadowPrimitive> | string,
|
||||
experimental_filter?: $ReadOnlyArray<FilterFunction> | string,
|
||||
boxShadow?: $ReadOnlyArray<BoxShadowValue> | string,
|
||||
filter?: $ReadOnlyArray<FilterFunction> | string,
|
||||
experimental_mixBlendMode?: ____BlendMode_Internal,
|
||||
experimental_backgroundImage?: $ReadOnlyArray<GradientValue> | string,
|
||||
isolation?: \\"auto\\" | \\"isolate\\",
|
||||
@@ -8586,7 +8586,7 @@ exports[`public API should not change unintentionally Libraries/StyleSheet/proce
|
||||
inset?: boolean,
|
||||
};
|
||||
declare export default function processBoxShadow(
|
||||
rawBoxShadows: ?($ReadOnlyArray<BoxShadowPrimitive> | string)
|
||||
rawBoxShadows: ?($ReadOnlyArray<BoxShadowValue> | string)
|
||||
): Array<ParsedBoxShadow>;
|
||||
"
|
||||
`;
|
||||
|
||||
@@ -21,10 +21,10 @@ NSDictionary* RCTGetReactNativeVersion(void)
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^(void){
|
||||
__rnVersion = @{
|
||||
RCTVersionMajor: @(1000),
|
||||
RCTVersionMinor: @(0),
|
||||
RCTVersionMajor: @(0),
|
||||
RCTVersionMinor: @(76),
|
||||
RCTVersionPatch: @(0),
|
||||
RCTVersionPrerelease: [NSNull null],
|
||||
RCTVersionPrerelease: @"rc.2",
|
||||
};
|
||||
});
|
||||
return __rnVersion;
|
||||
|
||||
+23
@@ -723,6 +723,29 @@ static inline UIViewAnimationOptions animationOptionsWithCurve(UIViewAnimationCu
|
||||
[self _handleFinishedScrolling:scrollView];
|
||||
}
|
||||
|
||||
- (void)didMoveToWindow
|
||||
{
|
||||
[super didMoveToWindow];
|
||||
|
||||
if (!self.window) {
|
||||
// The view is being removed, ensure that the scroll end event is dispatched
|
||||
[self _handleScrollEndIfNeeded];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)_handleScrollEndIfNeeded
|
||||
{
|
||||
if (_scrollView.isDecelerating || !_scrollView.isTracking) {
|
||||
if (!_eventEmitter) {
|
||||
return;
|
||||
}
|
||||
static_cast<const ScrollViewEventEmitter &>(*_eventEmitter).onMomentumScrollEnd([self _scrollViewMetrics]);
|
||||
|
||||
[self _updateStateWithContentOffset];
|
||||
_isUserTriggeredScrolling = NO;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)_handleFinishedScrolling:(UIScrollView *)scrollView
|
||||
{
|
||||
[self _forceDispatchNextScrollEvent];
|
||||
|
||||
@@ -431,18 +431,19 @@ RCT_CUSTOM_VIEW_PROPERTY(experimental_layoutConformance, NSString *, RCTView)
|
||||
// filtered by view configs.
|
||||
}
|
||||
|
||||
RCT_CUSTOM_VIEW_PROPERTY(experimental_filter, NSArray *, RCTView)
|
||||
typedef NSArray *FilterArray; // Custom type to make the StaticViewConfigValidator Happy
|
||||
RCT_CUSTOM_VIEW_PROPERTY(filter, FilterArray, RCTView)
|
||||
{
|
||||
// Property is only to be used in the new renderer.
|
||||
// It is necessary to add it here, otherwise it gets
|
||||
// filtered by view configs.
|
||||
// Property is only to be used in the new renderer.
|
||||
// It is necessary to add it here, otherwise it gets
|
||||
// filtered by view configs.
|
||||
}
|
||||
|
||||
RCT_CUSTOM_VIEW_PROPERTY(experimental_boxShadow, NSArray *, RCTView)
|
||||
typedef NSArray *BoxShadowArray; // Custom type to make the StaticViewConfigValidator Happy
|
||||
RCT_CUSTOM_VIEW_PROPERTY(boxShadow, BoxShadowArray, RCTView)
|
||||
{
|
||||
// Property is only to be used in the new renderer.
|
||||
// It is necessary to add it here, otherwise it gets
|
||||
// filtered by view configs.
|
||||
// Property is only to be used in the new renderer.
|
||||
// It is necessary to add it here, otherwise it gets
|
||||
// filtered by view configs.
|
||||
}
|
||||
|
||||
RCT_CUSTOM_VIEW_PROPERTY(experimental_mixBlendMode, NSString *, RCTView)
|
||||
|
||||
@@ -848,6 +848,26 @@ RCT_SCROLL_EVENT_HANDLER(scrollViewDidScrollToTop, onScrollToTop)
|
||||
RCT_FORWARD_SCROLL_EVENT(scrollViewDidEndZooming : scrollView withView : view atScale : scale);
|
||||
}
|
||||
|
||||
- (void)didMoveToWindow
|
||||
{
|
||||
[super didMoveToWindow];
|
||||
if (self.window == nil) {
|
||||
// Check if the ScrollView was in motion
|
||||
if (_scrollView.isDecelerating || !_scrollView.isTracking) {
|
||||
// Trigger the onMomentumScrollEnd event manually
|
||||
RCT_SEND_SCROLL_EVENT(onMomentumScrollEnd, nil);
|
||||
// We can't use the RCT_FORWARD_SCROLL_EVENT here beacuse the `_cmd` parameter passed
|
||||
// to `respondsToSelector` is the current method - so it will be `didMoveToWindow` - and not
|
||||
// `scrollViewDidEndDecelerating` that is passed.
|
||||
for (NSObject<UIScrollViewDelegate> *scrollViewListener in _scrollListeners) {
|
||||
if ([scrollViewListener respondsToSelector:@selector(scrollViewDidEndDecelerating:)]) {
|
||||
[scrollViewListener scrollViewDidEndDecelerating:_scrollView];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
|
||||
{
|
||||
// Fire a final scroll event
|
||||
|
||||
@@ -4047,6 +4047,33 @@ public class com/facebook/react/shell/MainReactPackage$$ReactModuleInfoProvider
|
||||
public fun getReactModuleInfos ()Ljava/util/Map;
|
||||
}
|
||||
|
||||
public final class com/facebook/react/soloader/OpenSourceMergedSoMapping : com/facebook/soloader/ExternalSoMapping {
|
||||
public static final field INSTANCE Lcom/facebook/react/soloader/OpenSourceMergedSoMapping;
|
||||
public fun invokeJniOnload (Ljava/lang/String;)V
|
||||
public final fun libfabricjni_so ()I
|
||||
public final fun libhermes_executor_so ()I
|
||||
public final fun libhermesinstancejni_so ()I
|
||||
public final fun libhermestooling_so ()I
|
||||
public final fun libjscexecutor_so ()I
|
||||
public final fun libjscinstance_so ()I
|
||||
public final fun libjscruntime_so ()I
|
||||
public final fun libjsctooling_so ()I
|
||||
public final fun libjsijniprofiler_so ()I
|
||||
public final fun libjsinspector_so ()I
|
||||
public final fun libmapbufferjni_so ()I
|
||||
public final fun libreact_devsupportjni_so ()I
|
||||
public final fun libreact_featureflagsjni_so ()I
|
||||
public final fun libreact_newarchdefaults_so ()I
|
||||
public final fun libreactnative_so ()I
|
||||
public final fun libreactnativeblob_so ()I
|
||||
public final fun libreactnativejni_so ()I
|
||||
public final fun librninstance_so ()I
|
||||
public final fun libturbomodulejsijni_so ()I
|
||||
public final fun libuimanagerjni_so ()I
|
||||
public final fun libyoga_so ()I
|
||||
public fun mapLibName (Ljava/lang/String;)Ljava/lang/String;
|
||||
}
|
||||
|
||||
public final class com/facebook/react/touch/JSResponderHandler : com/facebook/react/touch/OnInterceptTouchEventListener {
|
||||
public fun <init> ()V
|
||||
public final fun clearJSResponder ()V
|
||||
|
||||
@@ -220,10 +220,20 @@ val preparePrefab by
|
||||
Pair(
|
||||
"../ReactCommon/react/renderer/observers/events/",
|
||||
"react/renderer/observers/events/"),
|
||||
// react_timing
|
||||
Pair("../ReactCommon/react/timing/", "react/timing/"),
|
||||
// yoga
|
||||
Pair("../ReactCommon/yoga/", ""),
|
||||
Pair("src/main/jni/first-party/yogajni/jni", ""),
|
||||
)),
|
||||
PrefabPreprocessingEntry("hermestooling",
|
||||
// hermes_executor
|
||||
Pair("../ReactCommon/hermes/inspector-modern/", "hermes/inspector-modern/")
|
||||
),
|
||||
PrefabPreprocessingEntry("jsctooling",
|
||||
// jsc
|
||||
Pair("../ReactCommon/jsc/", "jsc/")
|
||||
),
|
||||
))
|
||||
outputDir.set(prefabHeadersDir)
|
||||
}
|
||||
@@ -550,7 +560,6 @@ android {
|
||||
"src/main/res/views/alert",
|
||||
"src/main/res/views/modal",
|
||||
"src/main/res/views/uimanager"))
|
||||
kotlin.srcDir(project.file("../sdks/ossonly-soloader/src/main/java"))
|
||||
java.exclude("com/facebook/react/processing")
|
||||
java.exclude("com/facebook/react/module/processing")
|
||||
}
|
||||
@@ -580,6 +589,8 @@ android {
|
||||
prefab {
|
||||
create("jsi") { headers = File(prefabHeadersDir, "jsi").absolutePath }
|
||||
create("reactnative") { headers = File(prefabHeadersDir, "reactnative").absolutePath }
|
||||
create("hermestooling") { headers = File(prefabHeadersDir, "hermestooling").absolutePath }
|
||||
create("jsctooling") { headers = File(prefabHeadersDir, "jsctooling").absolutePath }
|
||||
}
|
||||
|
||||
publishing {
|
||||
@@ -598,11 +609,6 @@ android {
|
||||
tasks.withType<KotlinCompile>().configureEach { exclude("com/facebook/annotationprocessors/**") }
|
||||
|
||||
dependencies {
|
||||
implementation(libs.fresco)
|
||||
implementation(libs.fresco.middleware)
|
||||
implementation(libs.fresco.imagepipeline.okhttp3)
|
||||
implementation(libs.fresco.ui.common)
|
||||
|
||||
api(libs.androidx.appcompat)
|
||||
api(libs.androidx.appcompat.resources)
|
||||
api(libs.androidx.autofill)
|
||||
@@ -610,7 +616,12 @@ dependencies {
|
||||
api(libs.androidx.tracing)
|
||||
|
||||
api(libs.fbjni)
|
||||
api(libs.fresco)
|
||||
api(libs.fresco.imagepipeline.okhttp3)
|
||||
api(libs.fresco.middleware)
|
||||
api(libs.fresco.ui.common)
|
||||
api(libs.infer.annotation)
|
||||
api(libs.soloader)
|
||||
api(libs.yoga.proguard.annotations)
|
||||
|
||||
api(libs.jsr305)
|
||||
@@ -631,8 +642,6 @@ dependencies {
|
||||
testImplementation(libs.thoughtworks)
|
||||
}
|
||||
|
||||
configurations.all { exclude(group = "com.facebook.soloader") }
|
||||
|
||||
react {
|
||||
// TODO: The library name is chosen for parity with Fabric components & iOS
|
||||
// This should be changed to a more generic name, e.g. `ReactCoreSpec`.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VERSION_NAME=1000.0.0
|
||||
VERSION_NAME=0.76.0-rc.2
|
||||
react.internal.publishingGroup=com.facebook.react
|
||||
|
||||
android.useAndroidX=true
|
||||
|
||||
@@ -315,8 +315,6 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
configurations.all { exclude(group = "com.facebook.soloader") }
|
||||
|
||||
afterEvaluate {
|
||||
if (!overrideHermesDir) {
|
||||
// If you're not specifying a Hermes Path override, we want to
|
||||
|
||||
+13
-14
@@ -169,26 +169,25 @@ public class HeadlessJsTaskContext {
|
||||
|
||||
/**
|
||||
* Finish a JS task. Doesn't actually stop the task on the JS side, only removes it from the list
|
||||
* of active tasks and notifies listeners. A task can only be finished once.
|
||||
* of active tasks and notifies listeners.
|
||||
*
|
||||
* @param taskId the unique id returned by {@link #startTask}.
|
||||
*/
|
||||
public synchronized void finishTask(final int taskId) {
|
||||
Assertions.assertCondition(
|
||||
mActiveTasks.remove(taskId), "Tried to finish non-existent task with id " + taskId + ".");
|
||||
Assertions.assertCondition(
|
||||
mActiveTaskConfigs.remove(taskId) != null,
|
||||
"Tried to remove non-existent task config with id " + taskId + ".");
|
||||
boolean removed = mActiveTasks.remove(taskId);
|
||||
mActiveTaskConfigs.remove(taskId);
|
||||
removeTimeout(taskId);
|
||||
UiThreadUtil.runOnUiThread(
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
for (HeadlessJsTaskEventListener listener : mHeadlessJsTaskEventListeners) {
|
||||
listener.onHeadlessJsTaskFinish(taskId);
|
||||
if (removed) {
|
||||
UiThreadUtil.runOnUiThread(
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
for (HeadlessJsTaskEventListener listener : mHeadlessJsTaskEventListeners) {
|
||||
listener.onHeadlessJsTaskFinish(taskId);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void removeTimeout(int taskId) {
|
||||
|
||||
+3
-3
@@ -15,8 +15,8 @@ import java.util.Map;
|
||||
|
||||
public class ReactNativeVersion {
|
||||
public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
|
||||
"major", 1000,
|
||||
"minor", 0,
|
||||
"major", 0,
|
||||
"minor", 76,
|
||||
"patch", 0,
|
||||
"prerelease", null);
|
||||
"prerelease", "rc.2");
|
||||
}
|
||||
|
||||
+14
-9
@@ -23,6 +23,8 @@ import com.facebook.react.devsupport.HMRClient;
|
||||
import com.facebook.react.devsupport.ReactInstanceDevHelper;
|
||||
import com.facebook.react.devsupport.interfaces.DevSplitBundleCallback;
|
||||
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
||||
import com.facebook.react.runtime.internal.bolts.Continuation;
|
||||
import com.facebook.react.runtime.internal.bolts.Task;
|
||||
|
||||
/**
|
||||
* An implementation of {@link com.facebook.react.devsupport.interfaces.DevSupportManager} that
|
||||
@@ -67,17 +69,20 @@ class BridgelessDevSupportManager extends DevSupportManagerBase {
|
||||
mReactHost
|
||||
.loadBundle(bundleLoader)
|
||||
.onSuccess(
|
||||
task -> {
|
||||
if (task.isCompleted()) {
|
||||
String bundleURL =
|
||||
getDevServerHelper().getDevServerSplitBundleURL(bundlePath);
|
||||
ReactContext reactContext = mReactHost.getCurrentReactContext();
|
||||
if (reactContext != null) {
|
||||
reactContext.getJSModule(HMRClient.class).registerBundle(bundleURL);
|
||||
new Continuation<Boolean, Void>() {
|
||||
@Override
|
||||
public Void then(Task<Boolean> task) {
|
||||
if (task.getResult().equals(Boolean.TRUE)) {
|
||||
String bundleURL =
|
||||
getDevServerHelper().getDevServerSplitBundleURL(bundlePath);
|
||||
ReactContext reactContext = mReactHost.getCurrentReactContext();
|
||||
if (reactContext != null) {
|
||||
reactContext.getJSModule(HMRClient.class).registerBundle(bundleURL);
|
||||
}
|
||||
callback.onSuccess();
|
||||
}
|
||||
callback.onSuccess();
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+26
-21
@@ -9,6 +9,8 @@ package com.facebook.react.runtime;
|
||||
|
||||
import static com.facebook.infer.annotation.Assertions.assertNotNull;
|
||||
import static com.facebook.infer.annotation.ThreadConfined.UI;
|
||||
import static java.lang.Boolean.FALSE;
|
||||
import static java.lang.Boolean.TRUE;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
@@ -250,12 +252,13 @@ public class ReactHostImpl implements ReactHost {
|
||||
|
||||
detachSurface(surface);
|
||||
return callWithExistingReactInstance(
|
||||
method,
|
||||
reactInstance -> {
|
||||
log(method, "Execute");
|
||||
reactInstance.stopSurface(surface);
|
||||
},
|
||||
mBGExecutor);
|
||||
method,
|
||||
reactInstance -> {
|
||||
log(method, "Execute");
|
||||
reactInstance.stopSurface(surface);
|
||||
},
|
||||
mBGExecutor)
|
||||
.makeVoid();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -776,7 +779,7 @@ public class ReactHostImpl implements ReactHost {
|
||||
};
|
||||
}
|
||||
|
||||
/* package */ Task<Void> loadBundle(final JSBundleLoader bundleLoader) {
|
||||
/* package */ Task<Boolean> loadBundle(final JSBundleLoader bundleLoader) {
|
||||
final String method = "loadBundle()";
|
||||
log(method, "Schedule");
|
||||
|
||||
@@ -789,7 +792,7 @@ public class ReactHostImpl implements ReactHost {
|
||||
null);
|
||||
}
|
||||
|
||||
/* package */ Task<Void> registerSegment(
|
||||
/* package */ Task<Boolean> registerSegment(
|
||||
final int segmentId, final String path, final Callback callback) {
|
||||
final String method =
|
||||
"registerSegment(segmentId = \"" + segmentId + "\", path = \"" + path + "\")";
|
||||
@@ -825,7 +828,7 @@ public class ReactHostImpl implements ReactHost {
|
||||
* @param args Arguments to be passed to the function
|
||||
* @return A Task that will complete when the function call has been enqueued on the JS thread.
|
||||
*/
|
||||
/* package */ Task<Void> callFunctionOnModule(
|
||||
/* package */ Task<Boolean> callFunctionOnModule(
|
||||
final String moduleName, final String methodName, final NativeArray args) {
|
||||
final String method = "callFunctionOnModule(\"" + moduleName + "\", \"" + methodName + "\")";
|
||||
return callWithExistingReactInstance(
|
||||
@@ -947,9 +950,9 @@ public class ReactHostImpl implements ReactHost {
|
||||
}
|
||||
|
||||
/** Schedule work on a ReactInstance that is already created. */
|
||||
private Task<Void> callWithExistingReactInstance(
|
||||
private Task<Boolean> callWithExistingReactInstance(
|
||||
final String callingMethod,
|
||||
final ReactInstanceCalback callback,
|
||||
final ReactInstanceCalback continuation,
|
||||
@Nullable Executor executor) {
|
||||
final String method = "callWithExistingReactInstance(" + callingMethod + ")";
|
||||
|
||||
@@ -959,18 +962,19 @@ public class ReactHostImpl implements ReactHost {
|
||||
|
||||
return mCreateReactInstanceTaskRef
|
||||
.get()
|
||||
.continueWith(
|
||||
.onSuccess(
|
||||
task -> {
|
||||
final ReactInstance reactInstance =
|
||||
ReactNativeFeatureFlags.completeReactInstanceCreationOnBgThreadOnAndroid()
|
||||
? task.getResult()
|
||||
: mReactInstance;
|
||||
if (reactInstance == null || task.isFaulted()) {
|
||||
if (reactInstance == null) {
|
||||
raiseSoftException(method, "Execute: reactInstance is null. Dropping work.");
|
||||
} else {
|
||||
callback.then(reactInstance);
|
||||
return FALSE;
|
||||
}
|
||||
return null;
|
||||
|
||||
continuation.then(reactInstance);
|
||||
return TRUE;
|
||||
},
|
||||
executor);
|
||||
}
|
||||
@@ -978,7 +982,7 @@ public class ReactHostImpl implements ReactHost {
|
||||
/** Create a ReactInstance if it doesn't exist already, and schedule work on it. */
|
||||
private Task<Void> callAfterGetOrCreateReactInstance(
|
||||
final String callingMethod,
|
||||
final ReactInstanceCalback callback,
|
||||
final ReactInstanceCalback runnable,
|
||||
@Nullable Executor executor) {
|
||||
final String method = "callAfterGetOrCreateReactInstance(" + callingMethod + ")";
|
||||
|
||||
@@ -987,17 +991,18 @@ public class ReactHostImpl implements ReactHost {
|
||||
}
|
||||
|
||||
return getOrCreateReactInstance()
|
||||
.continueWith(
|
||||
.onSuccess(
|
||||
task -> {
|
||||
final ReactInstance reactInstance =
|
||||
ReactNativeFeatureFlags.completeReactInstanceCreationOnBgThreadOnAndroid()
|
||||
? task.getResult()
|
||||
: mReactInstance;
|
||||
if (reactInstance == null || task.isFaulted()) {
|
||||
if (reactInstance == null) {
|
||||
raiseSoftException(method, "Execute: reactInstance is null. Dropping work.");
|
||||
} else {
|
||||
callback.then(reactInstance);
|
||||
return null;
|
||||
}
|
||||
|
||||
runnable.then(reactInstance);
|
||||
return null;
|
||||
},
|
||||
executor)
|
||||
|
||||
+6
-4
@@ -5,7 +5,9 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.soloader
|
||||
package com.facebook.react.soloader
|
||||
|
||||
import com.facebook.soloader.ExternalSoMapping
|
||||
|
||||
/**
|
||||
* This class is a manually created MergedSoMapping.
|
||||
@@ -16,9 +18,9 @@ package com.facebook.soloader
|
||||
* entry in the [invokeJniOnload] method, the [mapLibName] method as well as a new external function
|
||||
* that will take care of calling the JNI_OnLoad method.
|
||||
*/
|
||||
public object MergedSoMapping {
|
||||
public object OpenSourceMergedSoMapping : ExternalSoMapping {
|
||||
|
||||
public fun mapLibName(input: String): String =
|
||||
override public fun mapLibName(input: String): String =
|
||||
when (input) {
|
||||
"fabricjni",
|
||||
"jsinspector",
|
||||
@@ -47,7 +49,7 @@ public object MergedSoMapping {
|
||||
else -> input
|
||||
}
|
||||
|
||||
public fun invokeJniOnload(libraryName: String): Unit {
|
||||
override public fun invokeJniOnload(libraryName: String): Unit {
|
||||
when (libraryName) {
|
||||
"fabricjni" -> libfabricjni_so()
|
||||
"hermes_executor" -> libhermes_executor_so()
|
||||
+2
-2
@@ -136,8 +136,8 @@ public object ViewProps {
|
||||
public const val BORDER_START_COLOR: String = "borderStartColor"
|
||||
public const val BORDER_END_COLOR: String = "borderEndColor"
|
||||
public const val ON_LAYOUT: String = "onLayout"
|
||||
public const val BOX_SHADOW: String = "experimental_boxShadow"
|
||||
public const val FILTER: String = "experimental_filter"
|
||||
public const val BOX_SHADOW: String = "boxShadow"
|
||||
public const val FILTER: String = "filter"
|
||||
public const val MIX_BLEND_MODE: String = "experimental_mixBlendMode"
|
||||
public const val TRANSFORM: String = "transform"
|
||||
public const val TRANSFORM_ORIGIN: String = "transformOrigin"
|
||||
|
||||
+2
-1
@@ -24,7 +24,8 @@
|
||||
|
||||
// Class with mapping that will be generated by buck or manually edited by
|
||||
// users.
|
||||
static const char* invoke_class_name = "com/facebook/soloader/MergedSoMapping";
|
||||
static const char* invoke_class_name =
|
||||
"com/facebook/react/soloader/OpenSourceMergedSoMapping";
|
||||
|
||||
// Stub pre-merged library to ensure that our custom section gets created
|
||||
// when we merge a group of native libraries with no JNI_OnLoad. We don't
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
namespace facebook::react {
|
||||
|
||||
constexpr struct {
|
||||
int32_t Major = 1000;
|
||||
int32_t Minor = 0;
|
||||
int32_t Major = 0;
|
||||
int32_t Minor = 76;
|
||||
int32_t Patch = 0;
|
||||
std::string_view Prerelease = "";
|
||||
std::string_view Prerelease = "rc.2";
|
||||
} ReactNativeVersion;
|
||||
|
||||
} // namespace facebook::react
|
||||
|
||||
@@ -155,7 +155,7 @@ BaseViewProps::BaseViewProps(
|
||||
: convertRawProp(
|
||||
context,
|
||||
rawProps,
|
||||
"experimental_boxShadow",
|
||||
"boxShadow",
|
||||
sourceProps.boxShadow,
|
||||
{})),
|
||||
filter(
|
||||
@@ -163,7 +163,7 @@ BaseViewProps::BaseViewProps(
|
||||
: convertRawProp(
|
||||
context,
|
||||
rawProps,
|
||||
"experimental_filter",
|
||||
"filter",
|
||||
sourceProps.filter,
|
||||
{})),
|
||||
backgroundImage(
|
||||
@@ -346,8 +346,8 @@ void BaseViewProps::setProp(
|
||||
RAW_SET_PROP_SWITCH_CASE_BASIC(removeClippedSubviews);
|
||||
RAW_SET_PROP_SWITCH_CASE_BASIC(experimental_layoutConformance);
|
||||
RAW_SET_PROP_SWITCH_CASE_BASIC(cursor);
|
||||
RAW_SET_PROP_SWITCH_CASE(filter, "experimental_filter");
|
||||
RAW_SET_PROP_SWITCH_CASE(boxShadow, "experimental_boxShadow");
|
||||
RAW_SET_PROP_SWITCH_CASE(filter, "filter");
|
||||
RAW_SET_PROP_SWITCH_CASE(boxShadow, "boxShadow");
|
||||
// events field
|
||||
VIEW_EVENT_CASE(PointerEnter);
|
||||
VIEW_EVENT_CASE(PointerEnterCapture);
|
||||
|
||||
+3
@@ -22,6 +22,9 @@ using CrashManagerProvider =
|
||||
class RCTHermesInstance : public JSRuntimeFactory {
|
||||
public:
|
||||
RCTHermesInstance();
|
||||
RCTHermesInstance(
|
||||
std::shared_ptr<const ReactNativeConfig> reactNativeConfig,
|
||||
CrashManagerProvider crashManagerProvider);
|
||||
RCTHermesInstance(
|
||||
std::shared_ptr<const ReactNativeConfig> reactNativeConfig,
|
||||
CrashManagerProvider crashManagerProvider,
|
||||
|
||||
+7
@@ -11,6 +11,13 @@ namespace facebook::react {
|
||||
|
||||
RCTHermesInstance::RCTHermesInstance() : RCTHermesInstance(nullptr, nullptr, false) {}
|
||||
|
||||
RCTHermesInstance::RCTHermesInstance(
|
||||
std::shared_ptr<const ReactNativeConfig> reactNativeConfig,
|
||||
CrashManagerProvider crashManagerProvider)
|
||||
: RCTHermesInstance(reactNativeConfig, std::move(crashManagerProvider), false)
|
||||
{
|
||||
}
|
||||
|
||||
RCTHermesInstance::RCTHermesInstance(
|
||||
std::shared_ptr<const ReactNativeConfig> reactNativeConfig,
|
||||
CrashManagerProvider crashManagerProvider,
|
||||
|
||||
Vendored
+9
-5
@@ -109,7 +109,7 @@ function warnWithDeprecationSchedule() {
|
||||
${chalk.yellow('⚠️')} The \`init\` command is deprecated.
|
||||
The behavior will be changed on ${chalk.white.bold(CLI_DEPRECATION_DATE.toLocaleDateString())} ${emphasis(`(${daysRemaining} day${daysRemaining > 1 ? 's' : ''})`)}.
|
||||
|
||||
- Switch to ${chalk.dim('npx @react-native-community/cli init')} for the identical behavior.
|
||||
- Switch to ${chalk.grey.bold('npx @react-native-community/cli init')} for the identical behavior.
|
||||
- Refer to the documentation for information about alternative tools: ${chalk.dim('https://reactnative.dev/docs/getting-started')}`);
|
||||
}
|
||||
|
||||
@@ -117,11 +117,10 @@ function warnWithDeprecated() {
|
||||
if (!isInitCommand) {
|
||||
return;
|
||||
}
|
||||
|
||||
console.warn(`
|
||||
🚨️ The \`init\` command is deprecated.
|
||||
|
||||
- Switch to ${chalk.dim('npx @react-native-community/cli init')} for the identical behavior.
|
||||
- Switch to ${chalk.grey.bold('npx @react-native-community/cli init')} for the identical behavior.
|
||||
- Refer to the documentation for information about alternative tools: ${chalk.dim('https://reactnative.dev/docs/getting-started')}`);
|
||||
}
|
||||
|
||||
@@ -174,7 +173,7 @@ async function main() {
|
||||
|
||||
const isDeprecated =
|
||||
CLI_DEPRECATION_DATE.getTime() <= new Date().getTime() ||
|
||||
currentVersion.startsWith('0.76');
|
||||
currentVersion.startsWith('0.77');
|
||||
|
||||
/**
|
||||
* This command is now deprecated. We will continue to proxy commands to @react-native-community/cli, but it
|
||||
@@ -191,8 +190,13 @@ async function main() {
|
||||
warnWithDeprecated();
|
||||
// We only exit if the user calls `init` and it's deprecated. All other cases should proxy to to @react-native-community/cli.
|
||||
// Be careful with this as it can break a lot of users.
|
||||
console.warn(`${chalk.green('Exiting...')}`);
|
||||
process.exit(1);
|
||||
} else if (currentVersion.startsWith('0.75')) {
|
||||
} else if (
|
||||
currentVersion.startsWith('0.75') ||
|
||||
currentVersion.startsWith('0.76')
|
||||
) {
|
||||
// We check deprecation schedule only for 0.75 and 0.76 and 0.77 is expected to land in Jan 2025.
|
||||
warnWithDeprecationSchedule();
|
||||
}
|
||||
warnWhenRunningInit();
|
||||
|
||||
@@ -29,6 +29,7 @@ nexus-publish = "1.3.0"
|
||||
okhttp = "4.9.2"
|
||||
okio = "2.9.0"
|
||||
robolectric = "4.9.2"
|
||||
soloader = "0.12.1"
|
||||
xstream = "1.4.20"
|
||||
yoga-proguard-annotations = "1.19.0"
|
||||
# Native Dependencies
|
||||
@@ -55,6 +56,7 @@ fresco-middleware = { module = "com.facebook.fresco:middleware", version.ref = "
|
||||
fresco-imagepipeline-okhttp3 = { module = "com.facebook.fresco:imagepipeline-okhttp3", version.ref = "fresco" }
|
||||
fresco-ui-common = { module = "com.facebook.fresco:ui-common", version.ref = "fresco" }
|
||||
infer-annotation = { module = "com.facebook.infer.annotation:infer-annotation", version.ref = "infer-annotation" }
|
||||
soloader = { module = "com.facebook.soloader:soloader", version.ref = "soloader" }
|
||||
yoga-proguard-annotations = { module = "com.facebook.yoga:proguard-annotations", version.ref = "yoga-proguard-annotations" }
|
||||
|
||||
jsr305 = { module = "com.google.code.findbugs:jsr305", version.ref = "jsr305" }
|
||||
|
||||
Vendored
+5
-1
@@ -15,7 +15,11 @@ module.exports = {
|
||||
platforms: ['android', 'ios', 'native'],
|
||||
},
|
||||
transform: {
|
||||
'^.+\\.(js|ts|tsx)$': 'babel-jest',
|
||||
'^.+\\.(js)$': [
|
||||
'babel-jest',
|
||||
{plugins: ['babel-plugin-syntax-hermes-parser']},
|
||||
],
|
||||
'^.+\\.(ts|tsx)$': 'babel-jest',
|
||||
'^.+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$': require.resolve(
|
||||
'./jest/assetFileTransformer.js',
|
||||
),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native",
|
||||
"version": "1000.0.0",
|
||||
"version": "0.76.0-rc.2",
|
||||
"description": "A framework for building native apps using React",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -82,7 +82,6 @@
|
||||
"scripts/react-native-xcode.sh",
|
||||
"sdks/.hermesversion",
|
||||
"sdks/hermes-engine",
|
||||
"sdks/ossonly-soloader",
|
||||
"sdks/hermesc",
|
||||
"settings.gradle.kts",
|
||||
"src",
|
||||
@@ -101,7 +100,7 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^18.2.6",
|
||||
"react": "^19.0.0-rc-fb9a90fa48-20240614"
|
||||
"react": "^18.2.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
@@ -110,16 +109,18 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@jest/create-cache-key-function": "^29.6.3",
|
||||
"@react-native/assets-registry": "0.76.0-main",
|
||||
"@react-native/codegen": "0.76.0-main",
|
||||
"@react-native/community-cli-plugin": "0.76.0-main",
|
||||
"@react-native/gradle-plugin": "0.76.0-main",
|
||||
"@react-native/js-polyfills": "0.76.0-main",
|
||||
"@react-native/normalize-colors": "0.76.0-main",
|
||||
"@react-native/virtualized-lists": "0.76.0-main",
|
||||
"@react-native/assets-registry": "0.76.0-rc.2",
|
||||
"@react-native/codegen": "0.76.0-rc.2",
|
||||
"@react-native/community-cli-plugin": "0.76.0-rc.2",
|
||||
"@react-native/gradle-plugin": "0.76.0-rc.2",
|
||||
"@react-native/js-polyfills": "0.76.0-rc.2",
|
||||
"@react-native/normalize-colors": "0.76.0-rc.2",
|
||||
"@react-native/virtualized-lists": "0.76.0-rc.2",
|
||||
"abort-controller": "^3.0.0",
|
||||
"anser": "^1.4.9",
|
||||
"ansi-regex": "^5.0.0",
|
||||
"babel-jest": "^29.7.0",
|
||||
"babel-plugin-syntax-hermes-parser": "^0.23.1",
|
||||
"base64-js": "^1.5.1",
|
||||
"chalk": "^4.0.0",
|
||||
"commander": "^12.0.0",
|
||||
@@ -130,8 +131,8 @@
|
||||
"jest-environment-node": "^29.6.3",
|
||||
"jsc-android": "^250231.0.0",
|
||||
"memoize-one": "^5.0.0",
|
||||
"metro-runtime": "^0.80.10",
|
||||
"metro-source-map": "^0.80.10",
|
||||
"metro-runtime": "^0.81.0-alpha.0",
|
||||
"metro-source-map": "^0.81.0-alpha.0",
|
||||
"mkdirp": "^0.5.1",
|
||||
"nullthrows": "^1.1.1",
|
||||
"pretty-format": "^29.7.0",
|
||||
@@ -139,7 +140,7 @@
|
||||
"react-devtools-core": "^5.3.1",
|
||||
"react-refresh": "^0.14.0",
|
||||
"regenerator-runtime": "^0.13.2",
|
||||
"scheduler": "0.25.0-rc-fb9a90fa48-20240614",
|
||||
"scheduler": "0.24.0-canary-efb381bbf-20230505",
|
||||
"semver": "^7.1.3",
|
||||
"stacktrace-parser": "^0.1.10",
|
||||
"whatwg-fetch": "^3.0.0",
|
||||
|
||||
@@ -40,27 +40,15 @@ class NewArchitectureTests < Test::Unit::TestCase
|
||||
|
||||
assert_equal(installer.aggregate_targets[0].user_project.build_configurations[0].build_settings["CLANG_CXX_LANGUAGE_STANDARD"], "c++20")
|
||||
assert_equal(installer.aggregate_targets[1].user_project.build_configurations[0].build_settings["CLANG_CXX_LANGUAGE_STANDARD"], "c++20")
|
||||
assert_equal(installer.pods_project.targets[1].received_resolved_build_setting_parameters, [ReceivedCommonResolvedBuildSettings.new("CLANG_CXX_LANGUAGE_STANDARD", true)])
|
||||
assert_equal(Pod::UI.collected_messages, ["Setting CLANG_CXX_LANGUAGE_STANDARD to c++20 on /test/path.xcproj", "Setting CLANG_CXX_LANGUAGE_STANDARD to c++20 on /test/path2.xcproj"])
|
||||
end
|
||||
|
||||
def test_setClangCxxLanguageStandardIfNeeded_whenReactCoreIsNotPresent
|
||||
installer = prepare_mocked_installer_without_react_core
|
||||
NewArchitectureHelper.set_clang_cxx_language_standard_if_needed(installer)
|
||||
|
||||
assert_equal(installer.aggregate_targets[0].user_project.build_configurations[0].build_settings["CLANG_CXX_LANGUAGE_STANDARD"], nil)
|
||||
assert_equal(installer.aggregate_targets[1].user_project.build_configurations[0].build_settings["CLANG_CXX_LANGUAGE_STANDARD"], nil)
|
||||
assert_equal(installer.pods_project.targets[0].received_resolved_build_setting_parameters, [])
|
||||
assert_equal(Pod::UI.collected_messages, [])
|
||||
end
|
||||
|
||||
def test_setClangCxxLanguageStandardIfNeeded_whenThereAreDifferentValuesForLanguageStandard_takesTheFirstValue
|
||||
installer = prepare_mocked_installer_with_react_core_and_different_language_standards
|
||||
NewArchitectureHelper.set_clang_cxx_language_standard_if_needed(installer)
|
||||
|
||||
assert_equal(installer.aggregate_targets[0].user_project.build_configurations[0].build_settings["CLANG_CXX_LANGUAGE_STANDARD"], "c++20")
|
||||
assert_equal(installer.aggregate_targets[1].user_project.build_configurations[0].build_settings["CLANG_CXX_LANGUAGE_STANDARD"], "c++20")
|
||||
assert_equal(installer.pods_project.targets[1].received_resolved_build_setting_parameters, [ReceivedCommonResolvedBuildSettings.new("CLANG_CXX_LANGUAGE_STANDARD", true)])
|
||||
assert_equal(Pod::UI.collected_messages, ["Setting CLANG_CXX_LANGUAGE_STANDARD to c++20 on /test/path.xcproj", "Setting CLANG_CXX_LANGUAGE_STANDARD to c++20 on /test/path2.xcproj"])
|
||||
end
|
||||
|
||||
|
||||
@@ -701,9 +701,6 @@ class UtilsTests < Test::Unit::TestCase
|
||||
# Assert
|
||||
assert_equal(FileMock.exist_invocation_params, ["/.xcode.env", "/.xcode.env.local"])
|
||||
assert_equal($collected_commands[0], "echo 'export NODE_BINARY=$(command -v node)' > /.xcode.env")
|
||||
|
||||
assert_true($collected_commands[1].start_with? "echo 'export NODE_BINARY=")
|
||||
assert_true($collected_commands[1].end_with? "' > /.xcode.env.local")
|
||||
end
|
||||
|
||||
# ============================ #
|
||||
@@ -1116,6 +1113,26 @@ class UtilsTests < Test::Unit::TestCase
|
||||
assert_equal("$(inherited)" + test_flag, twiceProcessed_xcconfig.attributes["OTHER_CPLUSPLUSFLAGS"])
|
||||
end
|
||||
|
||||
def test_add_flag_to_map_with_inheritance_whenUsedWithArrayAttributes
|
||||
# Arrange
|
||||
initialized_xcconfig = XCConfigMock.new("InitializedConfig", attributes: {
|
||||
"OTHER_CPLUSPLUSFLAGS" => ["INIT_FLAG"]
|
||||
})
|
||||
twiceProcessed_xcconfig = XCConfigMock.new("TwiceProcessedConfig", attributes: {
|
||||
"OTHER_CPLUSPLUSFLAGS" => []
|
||||
})
|
||||
test_flag = " -DTEST_FLAG=1"
|
||||
|
||||
# Act
|
||||
ReactNativePodsUtils.add_flag_to_map_with_inheritance(initialized_xcconfig.attributes, "OTHER_CPLUSPLUSFLAGS", test_flag)
|
||||
ReactNativePodsUtils.add_flag_to_map_with_inheritance(twiceProcessed_xcconfig.attributes, "OTHER_CPLUSPLUSFLAGS", test_flag)
|
||||
ReactNativePodsUtils.add_flag_to_map_with_inheritance(twiceProcessed_xcconfig.attributes, "OTHER_CPLUSPLUSFLAGS", test_flag)
|
||||
|
||||
# Assert
|
||||
assert_equal(["$(inherited)", "INIT_FLAG", test_flag], initialized_xcconfig.attributes["OTHER_CPLUSPLUSFLAGS"])
|
||||
assert_equal(["$(inherited)", test_flag], twiceProcessed_xcconfig.attributes["OTHER_CPLUSPLUSFLAGS"])
|
||||
end
|
||||
|
||||
def test_add_ndebug_flag_to_pods_in_release
|
||||
# Arrange
|
||||
xcconfig = XCConfigMock.new("Config")
|
||||
|
||||
@@ -67,14 +67,29 @@ module PrivacyManifestUtils
|
||||
end
|
||||
|
||||
def self.ensure_reference(file_path, user_project, target)
|
||||
reference_exists = target.resources_build_phase.files_references.any? { |file_ref| file_ref&.path&.end_with? "PrivacyInfo.xcprivacy" }
|
||||
unless reference_exists
|
||||
# We try to find the main group, but if it doesn't exist, we default to adding the file to the project root – both work
|
||||
file_root = user_project.root_object.main_group.children.find { |group|
|
||||
group.class == Xcodeproj::Project::Object::PBXGroup && (group.name == target.name || group.path == target.name)
|
||||
} || user_project
|
||||
file_ref = file_root.new_file(file_path)
|
||||
build_file = target.resources_build_phase.add_file_reference(file_ref, true)
|
||||
privacy_info_filename = File.basename(file_path)
|
||||
|
||||
# Check if the file is already in the PBXBuildFile section
|
||||
build_phase_reference_exists = target.resources_build_phase.files_references.any? { |file_ref| file_ref&.path&.end_with?(privacy_info_filename) }
|
||||
|
||||
unless build_phase_reference_exists
|
||||
# Check if the file is already in the PBXFileReference section
|
||||
existing_file_reference = user_project.files.find { |file| file.path&.end_with?(privacy_info_filename) }
|
||||
|
||||
if existing_file_reference
|
||||
# If the file reference exists, add it to the build phase
|
||||
target.resources_build_phase.add_file_reference(existing_file_reference, true)
|
||||
else
|
||||
# If the file reference doesn't exist, add it to the project and the build phase
|
||||
# We try to find the main group, but if it doesn't exist, we default to adding the file to the project root - both work
|
||||
file_root = user_project.root_object.main_group.children.find { |group|
|
||||
group.class == Xcodeproj::Project::Object::PBXGroup && (group.name == target.name || group.path == target.name)
|
||||
} || user_project
|
||||
puts "file_root: #{file_root}"
|
||||
|
||||
file_ref = file_root.new_file(file_path)
|
||||
target.resources_build_phase.add_file_reference(file_ref, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -696,10 +696,18 @@ class ReactNativePodsUtils
|
||||
map[field] = "$(inherited)" + flag
|
||||
else
|
||||
unless map[field].include?(flag)
|
||||
map[field] = map[field] + flag
|
||||
if map[field].instance_of? String
|
||||
map[field] = map[field] + flag
|
||||
elsif map[field].instance_of? Array
|
||||
map[field].push(flag)
|
||||
end
|
||||
end
|
||||
unless map[field].include?("$(inherited)")
|
||||
map[field] = "$(inherited) " + map[field]
|
||||
if map[field].instance_of? String
|
||||
map[field] = "$(inherited) " + map[field]
|
||||
elsif map[field].instance_of? Array
|
||||
map[field].unshift("$(inherited)")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -92,6 +92,8 @@ fi
|
||||
|
||||
[ -z "$CLI_PATH" ] && CLI_PATH="$REACT_NATIVE_DIR/scripts/bundle.js"
|
||||
|
||||
[ -z "$BUNDLE_COMMAND" ] && BUNDLE_COMMAND="bundle"
|
||||
|
||||
[ -z "$COMPOSE_SOURCEMAP_PATH" ] && COMPOSE_SOURCEMAP_PATH="$REACT_NATIVE_DIR/scripts/compose-source-maps.js"
|
||||
|
||||
if [[ -z "$BUNDLE_CONFIG" ]]; then
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
hermes-2024-09-09-RNv0.76.0-db6d12e202e15f7a446d8848d6ca8f7abb3cfb32
|
||||
@@ -207,19 +207,7 @@ function create_universal_framework {
|
||||
for i in "${!platforms[@]}"; do
|
||||
local platform="${platforms[$i]}"
|
||||
local hermes_framework_path="${platform}/hermes.framework"
|
||||
local dSYM_path="$hermes_framework_path"
|
||||
local dSYM_base_path="$HERMES_PATH/destroot/Library/Frameworks"
|
||||
|
||||
# If the dSYM rename has failed, the dSYM are generated as 0.dSYM
|
||||
# (Apple default name) rather then hermes.framework.dSYM.
|
||||
if [[ -e "$dSYM_base_path/${platform}/0.dSYM" ]]; then
|
||||
dSYM_path="${platform}/0"
|
||||
fi
|
||||
|
||||
args+="-framework $hermes_framework_path "
|
||||
|
||||
# Path to dSYM must be absolute
|
||||
args+="-debug-symbols $dSYM_base_path/$dSYM_path.dSYM "
|
||||
done
|
||||
|
||||
mkdir -p universal
|
||||
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.soloader
|
||||
|
||||
public annotation class DoNotOptimize {}
|
||||
-53
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
@file:Suppress("UNUSED_EXPRESSION", "ControlFlowWithEmptyBody", "UNUSED_PARAMETER")
|
||||
|
||||
package com.facebook.soloader
|
||||
|
||||
import android.content.Context
|
||||
|
||||
/**
|
||||
* This class is a stub of SoLoader used ONLY by React Native OSS.
|
||||
*
|
||||
* This allows us to do not mutate the SoLoader.init and SoLoader.loadLibrary methods, which are
|
||||
* used by the React Native, while also allowing us to implement custom JNI_OnLoad calling which
|
||||
* enables merging of SOs.
|
||||
*/
|
||||
public object SoLoader {
|
||||
|
||||
private val loadedLibraries = mutableSetOf<String>()
|
||||
|
||||
private fun mapLibName(input: String) = MergedSoMapping.mapLibName(input)
|
||||
|
||||
private fun invokeJniOnload(libraryName: String) = MergedSoMapping.invokeJniOnload(libraryName)
|
||||
|
||||
@Deprecated("This method is a no-op and you should not be calling it")
|
||||
@JvmStatic
|
||||
public fun init(context: Context, exoPackage: Boolean) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public fun loadLibrary(libraryName: String): Boolean {
|
||||
if (libraryName in loadedLibraries) {
|
||||
return false
|
||||
}
|
||||
val mapLibraryName = mapLibName(libraryName)
|
||||
System.loadLibrary(mapLibraryName)
|
||||
loadedLibraries.add(libraryName)
|
||||
if (libraryName != mapLibraryName) {
|
||||
invokeJniOnload(libraryName)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public fun setInTestMode() {
|
||||
// Do nothing
|
||||
}
|
||||
}
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.soloader.nativeloader
|
||||
|
||||
/**
|
||||
* This class is a stub of NativeLoader used ONLY by React Native OSS.
|
||||
*
|
||||
* Fresco in OSS depends on NativeLoader, but we don't want to include the real
|
||||
* NativeLoader/SoLoader in React Native OSS. This stub is used to make Fresco work properly for us.
|
||||
*/
|
||||
public object NativeLoader {
|
||||
|
||||
@JvmStatic
|
||||
public fun loadLibrary(libraryName: String): Boolean {
|
||||
System.loadLibrary(libraryName)
|
||||
return true
|
||||
}
|
||||
|
||||
@JvmStatic public fun isInitialized(): Boolean = true
|
||||
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
public fun initIfUninitialized(systemDelegate: SystemDelegate): Unit = Unit
|
||||
}
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.soloader.nativeloader
|
||||
|
||||
/**
|
||||
* This class is a stub of NativeLoaderDelegate used ONLY by React Native OSS.
|
||||
*
|
||||
* Fresco in OSS depends on NativeLoader, but we don't want to include the real
|
||||
* NativeLoader/SoLoader in React Native OSS. This stub is used to make Fresco work properly for us.
|
||||
*/
|
||||
public interface NativeLoaderDelegate {
|
||||
|
||||
public fun loadLibrary(shortName: String?, flags: Int): Boolean
|
||||
|
||||
public fun getLibraryPath(libName: String?): String
|
||||
|
||||
public fun getSoSourcesVersion(): Int
|
||||
}
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.soloader.nativeloader
|
||||
|
||||
public class SystemDelegate {}
|
||||
+9
-8
@@ -21,33 +21,34 @@ import Platform from '../../../Libraries/Utilities/Platform';
|
||||
import AndroidHorizontalScrollContentViewNativeComponent from '../specs/components/AndroidHorizontalScrollContentViewNativeComponent';
|
||||
import useSyncOnScroll from './useSyncOnScroll';
|
||||
import * as React from 'react';
|
||||
import {forwardRef} from 'react';
|
||||
|
||||
const HScrollViewNativeComponentForPlatform =
|
||||
Platform.OS === 'android'
|
||||
? AndroidHorizontalScrollViewNativeComponent
|
||||
: ScrollViewNativeComponent;
|
||||
|
||||
// TODO: After upgrading to React 19, remove `forwardRef` from this component.
|
||||
export const HScrollViewNativeComponent: React.AbstractComponent<
|
||||
ScrollViewNativeProps,
|
||||
TScrollViewNativeImperativeHandle,
|
||||
// $FlowExpectedError[incompatible-type] - Flow cannot model imperative handles, yet.
|
||||
> = function HScrollViewNativeComponent(props: {
|
||||
...ScrollViewNativeProps,
|
||||
ref?: React.RefSetter<TScrollViewNativeImperativeHandle | null>,
|
||||
...
|
||||
}): React.Node {
|
||||
const [ref, enableSyncOnScroll] = useSyncOnScroll(props.ref);
|
||||
> = forwardRef(function HScrollViewNativeComponent(
|
||||
props: ScrollViewNativeProps,
|
||||
ref: ?React.RefSetter<TScrollViewNativeImperativeHandle | null>,
|
||||
): React.Node {
|
||||
const [componentRef, enableSyncOnScroll] = useSyncOnScroll(ref);
|
||||
// NOTE: When `useSyncOnScroll` triggers an update, `props` will not have
|
||||
// changed. Notably, `props.children` will be the same, allowing React to
|
||||
// bail out during reconciliation.
|
||||
return (
|
||||
<HScrollViewNativeComponentForPlatform
|
||||
{...props}
|
||||
ref={ref}
|
||||
ref={componentRef}
|
||||
enableSyncOnScroll={enableSyncOnScroll}
|
||||
/>
|
||||
);
|
||||
};
|
||||
});
|
||||
|
||||
export const HScrollContentViewNativeComponent: HostComponent<ViewProps> =
|
||||
Platform.OS === 'android'
|
||||
|
||||
+11
-9
@@ -13,15 +13,17 @@ import type {ViewProps} from '../../../Libraries/Components/View/ViewPropTypes';
|
||||
import Platform from '../../../Libraries/Utilities/Platform';
|
||||
import View from '../../../Libraries/Components/View/View';
|
||||
import * as React from 'react';
|
||||
export * from '../../../src/private/specs/components/RCTSafeAreaViewNativeComponent';
|
||||
import RCTSafeAreaViewNativeComponent from '../../../src/private/specs/components/RCTSafeAreaViewNativeComponent';
|
||||
|
||||
let exported: React.AbstractComponent<ViewProps, React.ElementRef<typeof View>>;
|
||||
|
||||
if (Platform.OS === 'android' || Platform.OS === 'ios') {
|
||||
exported = RCTSafeAreaViewNativeComponent;
|
||||
} else {
|
||||
exported = View;
|
||||
}
|
||||
const exported: React.AbstractComponent<
|
||||
ViewProps,
|
||||
React.ElementRef<typeof View>,
|
||||
> = Platform.select({
|
||||
ios: require('../../../src/private/specs/components/RCTSafeAreaViewNativeComponent')
|
||||
.default,
|
||||
android:
|
||||
require('../../../src/private/specs/components/RCTSafeAreaViewNativeComponent')
|
||||
.default,
|
||||
default: View,
|
||||
});
|
||||
|
||||
export default exported;
|
||||
|
||||
+9
-8
@@ -20,28 +20,29 @@ import View from '../../../Libraries/Components/View/View';
|
||||
import Platform from '../../../Libraries/Utilities/Platform';
|
||||
import useSyncOnScroll from './useSyncOnScroll';
|
||||
import * as React from 'react';
|
||||
import {forwardRef} from 'react';
|
||||
|
||||
// TODO: After upgrading to React 19, remove `forwardRef` from this component.
|
||||
export const VScrollViewNativeComponent: React.AbstractComponent<
|
||||
ScrollViewNativeProps,
|
||||
TScrollViewNativeImperativeHandle,
|
||||
// $FlowExpectedError[incompatible-type] - Flow cannot model imperative handles, yet.
|
||||
> = function VScrollViewNativeComponent(props: {
|
||||
...ScrollViewNativeProps,
|
||||
ref?: React.RefSetter<TScrollViewNativeImperativeHandle | null>,
|
||||
...
|
||||
}): React.Node {
|
||||
const [ref, enableSyncOnScroll] = useSyncOnScroll(props.ref);
|
||||
> = forwardRef(function VScrollViewNativeComponent(
|
||||
props: ScrollViewNativeProps,
|
||||
ref: ?React.RefSetter<TScrollViewNativeImperativeHandle | null>,
|
||||
): React.Node {
|
||||
const [componentRef, enableSyncOnScroll] = useSyncOnScroll(ref);
|
||||
// NOTE: When `useSyncOnScroll` triggers an update, `props` will not have
|
||||
// changed. Notably, `props.children` will be the same, allowing React to
|
||||
// bail out during reconciliation.
|
||||
return (
|
||||
<ScrollViewNativeComponent
|
||||
{...props}
|
||||
ref={ref}
|
||||
ref={componentRef}
|
||||
enableSyncOnScroll={enableSyncOnScroll}
|
||||
/>
|
||||
);
|
||||
};
|
||||
});
|
||||
|
||||
export const VScrollContentViewNativeComponent: HostComponent<ViewProps> =
|
||||
Platform.OS === 'android' ? View : ScrollContentViewNativeComponent;
|
||||
|
||||
-105
@@ -35,111 +35,11 @@
|
||||
import {
|
||||
GradientValue,
|
||||
BlendMode,
|
||||
BoxShadowPrimitive,
|
||||
DimensionValue,
|
||||
FilterFunction,
|
||||
} from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
|
||||
|
||||
export {};
|
||||
|
||||
declare module '.' {
|
||||
export interface FlexStyle {
|
||||
/**
|
||||
* Equivalent to `top`, `bottom`, `right` and `left`
|
||||
*/
|
||||
inset?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `top`, `bottom`
|
||||
*/
|
||||
insetBlock?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `bottom`
|
||||
*/
|
||||
insetBlockEnd?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `top`
|
||||
*/
|
||||
insetBlockStart?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `right` and `left`
|
||||
*/
|
||||
insetInline?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `right` or `left`
|
||||
*/
|
||||
insetInlineEnd?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `right` or `left`
|
||||
*/
|
||||
insetInlineStart?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `marginVertical`
|
||||
*/
|
||||
marginBlock?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `marginBottom`
|
||||
*/
|
||||
marginBlockEnd?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `marginTop`
|
||||
*/
|
||||
marginBlockStart?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `marginHorizontal`
|
||||
*/
|
||||
marginInline?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `marginEnd`
|
||||
*/
|
||||
marginInlineEnd?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `marginStart`
|
||||
*/
|
||||
marginInlineStart?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `paddingVertical`
|
||||
*/
|
||||
paddingBlock?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `paddingBottom`
|
||||
*/
|
||||
paddingBlockEnd?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `paddingTop`
|
||||
*/
|
||||
paddingBlockStart?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `paddingHorizontal`
|
||||
*/
|
||||
paddingInline?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `paddingEnd`
|
||||
*/
|
||||
paddingInlineEnd?: DimensionValue | undefined;
|
||||
|
||||
/**
|
||||
* Equivalent to `paddingStart`
|
||||
*/
|
||||
paddingInlineStart?: DimensionValue | undefined;
|
||||
}
|
||||
|
||||
export interface ViewProps {
|
||||
/**
|
||||
* Contols whether this view, and its transitive children, are laid in a way
|
||||
@@ -150,11 +50,6 @@ declare module '.' {
|
||||
}
|
||||
|
||||
export interface ViewStyle {
|
||||
experimental_boxShadow?:
|
||||
| ReadonlyArray<BoxShadowPrimitive>
|
||||
| string
|
||||
| undefined;
|
||||
experimental_filter?: ReadonlyArray<FilterFunction> | string | undefined;
|
||||
experimental_mixBlendMode?: BlendMode | undefined;
|
||||
experimental_backgroundImage?:
|
||||
| ReadonlyArray<GradientValue>
|
||||
|
||||
+285
-293
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user