react-native 0.81.3 → 0.81.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,6 +17,6 @@ export const version: $ReadOnly<{
17
17
  }> = {
18
18
  major: 0,
19
19
  minor: 81,
20
- patch: 3,
20
+ patch: 4,
21
21
  prerelease: null,
22
22
  };
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(81),
26
- RCTVersionPatch: @(3),
26
+ RCTVersionPatch: @(4),
27
27
  RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.81.3
1
+ VERSION_NAME=0.81.4
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
 
4
4
  android.useAndroidX=true
@@ -14,7 +14,7 @@ public object ReactNativeVersion {
14
14
  public val VERSION: Map<String, Any?> = mapOf(
15
15
  "major" to 0,
16
16
  "minor" to 81,
17
- "patch" to 3,
17
+ "patch" to 4,
18
18
  "prerelease" to null
19
19
  )
20
20
  }
@@ -14,14 +14,14 @@
14
14
 
15
15
  #define REACT_NATIVE_VERSION_MAJOR 0
16
16
  #define REACT_NATIVE_VERSION_MINOR 81
17
- #define REACT_NATIVE_VERSION_PATCH 3
17
+ #define REACT_NATIVE_VERSION_PATCH 4
18
18
 
19
19
  namespace facebook::react {
20
20
 
21
21
  constexpr struct {
22
22
  int32_t Major = 0;
23
23
  int32_t Minor = 81;
24
- int32_t Patch = 3;
24
+ int32_t Patch = 4;
25
25
  std::string_view Prerelease = "";
26
26
  } ReactNativeVersion;
27
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native",
3
- "version": "0.81.3",
3
+ "version": "0.81.4",
4
4
  "description": "A framework for building native apps using React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -162,13 +162,13 @@
162
162
  },
163
163
  "dependencies": {
164
164
  "@jest/create-cache-key-function": "^29.7.0",
165
- "@react-native/assets-registry": "0.81.3",
166
- "@react-native/codegen": "0.81.3",
167
- "@react-native/community-cli-plugin": "0.81.3",
168
- "@react-native/gradle-plugin": "0.81.3",
169
- "@react-native/js-polyfills": "0.81.3",
170
- "@react-native/normalize-colors": "0.81.3",
171
- "@react-native/virtualized-lists": "0.81.3",
165
+ "@react-native/assets-registry": "0.81.4",
166
+ "@react-native/codegen": "0.81.4",
167
+ "@react-native/community-cli-plugin": "0.81.4",
168
+ "@react-native/gradle-plugin": "0.81.4",
169
+ "@react-native/js-polyfills": "0.81.4",
170
+ "@react-native/normalize-colors": "0.81.4",
171
+ "@react-native/virtualized-lists": "0.81.4",
172
172
  "abort-controller": "^3.0.0",
173
173
  "anser": "^1.4.9",
174
174
  "ansi-regex": "^5.0.0",
@@ -40,6 +40,12 @@ def list_native_modules!(config_command)
40
40
  packages = config["dependencies"]
41
41
  ios_project_root = Pathname.new(config["project"]["ios"]["sourceDir"])
42
42
  react_native_path = Pathname.new(config["reactNativePath"])
43
+ codegen_output_path = ios_project_root.join("build/generated/autolinking/autolinking.json")
44
+
45
+ # Write autolinking react-native-config output to codegen folder
46
+ FileUtils.mkdir_p(File.dirname(codegen_output_path))
47
+ File.write(codegen_output_path, json)
48
+
43
49
  found_pods = []
44
50
 
45
51
  packages.each do |package_name, package|
@@ -87,7 +87,7 @@ class CodegenUtils
87
87
  codegen_path = file_manager.join(ios_folder, codegen_dir)
88
88
  return if !dir_manager.exist?(codegen_path)
89
89
 
90
- FileUtils.rm_rf(dir_manager.glob("#{codegen_path}/*"))
90
+ FileUtils.rm_rf("#{codegen_path}")
91
91
  base_provider_path = file_manager.join(rn_path, 'React', 'Fabric', 'RCTThirdPartyFabricComponentsProvider')
92
92
  FileUtils.rm_rf("#{base_provider_path}.h")
93
93
  FileUtils.rm_rf("#{base_provider_path}.mm")
@@ -86,16 +86,19 @@ function execute(
86
86
  buildCodegenIfNeeded();
87
87
  }
88
88
 
89
- const reactNativeConfig = readReactNativeConfig(projectRoot);
89
+ const reactNativeConfig = readReactNativeConfig(
90
+ projectRoot,
91
+ baseOutputPath,
92
+ );
90
93
  const codegenEnabledLibraries = findCodegenEnabledLibraries(
91
94
  pkgJson,
92
95
  projectRoot,
96
+ baseOutputPath,
93
97
  reactNativeConfig,
94
98
  );
95
99
 
96
100
  if (codegenEnabledLibraries.length === 0) {
97
101
  codegenLog('No codegen-enabled libraries found.', true);
98
- return;
99
102
  }
100
103
 
101
104
  let platforms =
@@ -110,10 +113,6 @@ function execute(
110
113
  ({name}) => !disabledLibraries.includes(name),
111
114
  );
112
115
 
113
- if (!libraries.length) {
114
- continue;
115
- }
116
-
117
116
  const outputPath = computeOutputPath(
118
117
  projectRoot,
119
118
  baseOutputPath,
@@ -97,15 +97,40 @@ function cleanupEmptyFilesAndFolders(filepath /*: string */) {
97
97
  }
98
98
  }
99
99
 
100
- function readReactNativeConfig(projectRoot /*: string */) /*: $FlowFixMe */ {
101
- const rnConfigFilePath = path.resolve(projectRoot, 'react-native.config.js');
100
+ function readGeneratedAutolinkingOutput(
101
+ baseOutputPath /*: string */,
102
+ ) /*: $FlowFixMe */ {
103
+ // NOTE: Generated by scripts/cocoapods/autolinking.rb in list_native_modules (called by use_native_modules)
104
+ const autolinkingGeneratedPath = path.resolve(
105
+ baseOutputPath,
106
+ 'build/generated/autolinking/autolinking.json',
107
+ );
108
+ if (fs.existsSync(autolinkingGeneratedPath)) {
109
+ // $FlowFixMe[unsupported-syntax]
110
+ return require(autolinkingGeneratedPath);
111
+ } else {
112
+ codegenLog(
113
+ `Could not find generated autolinking output at: ${autolinkingGeneratedPath}`,
114
+ );
115
+ return null;
116
+ }
117
+ }
102
118
 
103
- if (!fs.existsSync(rnConfigFilePath)) {
119
+ function readReactNativeConfig(
120
+ projectRoot /*: string */,
121
+ baseOutputPath /*: string */,
122
+ ) /*: $FlowFixMe */ {
123
+ const autolinkingOutput = readGeneratedAutolinkingOutput(baseOutputPath);
124
+ const rnConfigFilePath = path.resolve(projectRoot, 'react-native.config.js');
125
+ if (autolinkingOutput) {
126
+ return autolinkingOutput;
127
+ } else if (fs.existsSync(rnConfigFilePath)) {
128
+ // $FlowIgnore[unsupported-syntax]
129
+ return require(rnConfigFilePath);
130
+ } else {
131
+ codegenLog(`Could not find React Native config at: ${rnConfigFilePath}`);
104
132
  return {};
105
133
  }
106
-
107
- // $FlowIgnore[unsupported-syntax]
108
- return require(rnConfigFilePath);
109
134
  }
110
135
 
111
136
  /**
@@ -114,17 +139,23 @@ function readReactNativeConfig(projectRoot /*: string */) /*: $FlowFixMe */ {
114
139
  function findCodegenEnabledLibraries(
115
140
  pkgJson /*: $FlowFixMe */,
116
141
  projectRoot /*: string */,
142
+ baseOutputPath /*: string */,
117
143
  reactNativeConfig /*: $FlowFixMe */,
118
144
  ) /*: Array<$FlowFixMe> */ {
119
145
  const projectLibraries = findProjectRootLibraries(pkgJson, projectRoot);
120
146
  if (pkgJsonIncludesGeneratedCode(pkgJson)) {
121
147
  return projectLibraries;
122
148
  } else {
123
- return [
124
- ...projectLibraries,
125
- ...findExternalLibraries(pkgJson, projectRoot),
149
+ const libraries = [...projectLibraries];
150
+ // If we ran autolinking, we shouldn't try to run our own "autolinking-like"
151
+ // library discovery
152
+ if (!readGeneratedAutolinkingOutput(baseOutputPath)) {
153
+ libraries.push(...findExternalLibraries(pkgJson, projectRoot));
154
+ }
155
+ libraries.push(
126
156
  ...findLibrariesFromReactNativeConfig(projectRoot, reactNativeConfig),
127
- ];
157
+ );
158
+ return libraries;
128
159
  }
129
160
  }
130
161
 
Binary file
Binary file
Binary file