@react-native/codegen 0.74.0-nightly-20240203-4473fe8f2 → 0.74.0-nightly-20240205-e4342f5b0

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.
@@ -25,6 +25,15 @@ function generateSupportedApplePlatformsMacro(
25
25
  if (!supportedPlatformsMap) {
26
26
  return fileTemplate;
27
27
  }
28
+
29
+ // According to Podspec Syntax Reference, when `platform` or `deployment_target` is not specified, it defaults to all platforms.
30
+ // https://guides.cocoapods.org/syntax/podspec.html#platform
31
+ const everyPlatformIsUnsupported = Object.keys(supportedPlatformsMap).every(
32
+ platform => supportedPlatformsMap[platform] === false,
33
+ );
34
+ if (everyPlatformIsUnsupported) {
35
+ return fileTemplate;
36
+ }
28
37
  const compilerMacroString = Object.keys(supportedPlatformsMap)
29
38
  .reduce((acc, platform) => {
30
39
  if (!supportedPlatformsMap[platform]) {
@@ -26,6 +26,16 @@ function generateSupportedApplePlatformsMacro(
26
26
  return fileTemplate;
27
27
  }
28
28
 
29
+ // According to Podspec Syntax Reference, when `platform` or `deployment_target` is not specified, it defaults to all platforms.
30
+ // https://guides.cocoapods.org/syntax/podspec.html#platform
31
+ const everyPlatformIsUnsupported = Object.keys(supportedPlatformsMap).every(
32
+ platform => supportedPlatformsMap[platform] === false,
33
+ );
34
+
35
+ if (everyPlatformIsUnsupported) {
36
+ return fileTemplate;
37
+ }
38
+
29
39
  const compilerMacroString = Object.keys(supportedPlatformsMap)
30
40
  .reduce((acc: string[], platform) => {
31
41
  if (!supportedPlatformsMap[platform]) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native/codegen",
3
- "version": "0.74.0-nightly-20240203-4473fe8f2",
3
+ "version": "0.74.0-nightly-20240205-e4342f5b0",
4
4
  "description": "Code generation tools for React Native",
5
5
  "license": "MIT",
6
6
  "repository": {