expo-modules-autolinking 3.0.20 → 3.0.21

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.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,12 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 3.0.21 — 2025-11-07
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - Fix [#40601](https://github.com/expo/expo/pull/40601) assuming case-insensitive path for default derived podspec path in `react-native-config` resolution
18
+
13
19
  ## 3.0.20 — 2025-11-03
14
20
 
15
21
  ### 🐛 Bug fixes
@@ -9,8 +9,13 @@ const path_1 = __importDefault(require("path"));
9
9
  const utils_1 = require("../utils");
10
10
  /** Find first *.podspec file in target directory */
11
11
  const findPodspecFile = async (targetPath) => {
12
- const podspecFiles = await (0, utils_1.listFilesSorted)(targetPath, (basename) => basename.endsWith('.podspec'));
13
- return podspecFiles.length > 0 ? podspecFiles[0] : null;
12
+ const podspecFiles = await (0, utils_1.listFilesSorted)(targetPath, (basename) => {
13
+ return basename.endsWith('.podspec');
14
+ });
15
+ // NOTE(@kitten): Compare case-insensitively against basename of derived name
16
+ const mainBasename = path_1.default.basename(targetPath).toLowerCase();
17
+ const mainPodspecFile = podspecFiles.find((podspecFile) => path_1.default.basename(podspecFile, '.podspec').toLowerCase() === mainBasename);
18
+ return mainPodspecFile ?? (podspecFiles.length > 0 ? podspecFiles[0] : null);
14
19
  };
15
20
  async function resolveDependencyConfigImplIosAsync(resolution, reactNativeConfig, expoModuleConfig) {
16
21
  if (reactNativeConfig === null) {
@@ -1 +1 @@
1
- {"version":3,"file":"iosResolver.js","sourceRoot":"","sources":["../../src/reactNativeConfig/iosResolver.ts"],"names":[],"mappings":";;;;;AAkBA,kFAyCC;AA3DD,4CAAoB;AACpB,gDAAwB;AAOxB,oCAA2C;AAE3C,oDAAoD;AACpD,MAAM,eAAe,GAAG,KAAK,EAAE,UAAkB,EAA0B,EAAE;IAC3E,MAAM,YA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I,EAAE,CAAC;YACnC,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO;QACL,WAAW;QACX,OAAO,EAAE,UAAU,CAAC,OAAO;QAC3B,cAAc,EAAE,iBAAiB,EAAE,cAAc,IAAI,EAAE;QACvD,YAAY,EAAE,iBAAiB,EAAE,YAAY,IAAI,EAAE;KACpD,CAAC;AACJ,CAAC","sourcesContent":["import fs from 'fs';\nimport path from 'path';\n\nimport type {\n RNConfigDependencyIos,\n RNConfigReactNativePlatformsConfigIos,\n} from './reactNativeConfig.types';\nimport type { ExpoModuleConfig } from '../ExpoModuleConfig';\nimport { listFilesSorted } from '../utils';\n\n/** Find first *.podspec file in target directory */\nconst findPodspecFile = async (targetPath: string): Promise<string | null> => {\n const podspecFiles = await listFilesSorted(targetPath, (basename) =>\n basename.endsWith('.podspec')\n );\n return podspecFiles.length > 0 ? podspecFiles[0] : null;\n};\n\nexport async function resolveDependencyConfigImplIosAsync(\n resolution: { path: string; version: string },\n reactNativeConfig: RNConfigReactNativePlatformsConfigIos | null | undefined,\n expoModuleConfig?: ExpoModuleConfig | null\n): Promise<RNConfigDependencyIos | null> {\n if (reactNativeConfig === null) {\n // Skip autolinking for this package.\n return null;\n }\n\n const mainPackagePodspec = path.join(\n resolution.path,\n path.basename(resolution.path) + '.podspec'\n );\n const podspecPath = fs.existsSync(mainPackagePodspec)\n ? mainPackagePodspec\n : await findPodspecFile(resolution.path);\n if (!podspecPath) {\n return null;\n }\n\n if (reactNativeConfig === undefined && expoModuleConfig?.supportsPlatform('apple')) {\n // Check if Expo podspec files contain the React Native podspec file\n const overlappingPodspecPath = expoModuleConfig.applePodspecPaths().find((targetFile) => {\n const expoPodspecPath = path.join(resolution.path, targetFile);\n return expoPodspecPath === podspecPath;\n });\n // NOTE(@kitten): If we don't have a react-native.config.{js,ts} file and the\n // package is also an Expo module, we only link it as a React Native module\n // if both don't point at the same podspec file\n if (overlappingPodspecPath != null) {\n return null;\n }\n }\n\n return {\n podspecPath,\n version: resolution.version,\n configurations: reactNativeConfig?.configurations || [],\n scriptPhases: reactNativeConfig?.scriptPhases || [],\n };\n}\n"]}
1
+ {"version":3,"file":"iosResolver.js","sourceRoot":"","sources":["../../src/reactNativeConfig/iosResolver.ts"],"names":[],"mappings":";;;;;AAuBA,kFAyCC;AAhED,4CAAoB;AACpB,gDAAwB;AAOxB,oCAA2C;AAE3C,oDAAoD;AACpD,MAAM,eAAe,GAAG,KAAK,EAAE,UAAkB,EAA0B,EAAE;IAC3E,MAAM,YAAY,GAAG,MAAM,IAAA,uBAAe,EAAC,UAAU,EAAE,CAAC,QAAQ,EAAE,EAAE;QAClE,OAAO,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;IACH,6EAA6E;IAC7E,MAAM,YAAY,GAAG,cAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;IAC7D,MAAM,eAAe,GAAG,YAAY,CAAC,IAAI,CACvC,CAAC,WAAW,EAAE,EAAE,CAAC,cAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC,WAAW,EAAE,KAAK,YAAY,CACvF,CAAC;IACF,OAAO,eAAe,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAC/E,CAAC,CAAC;AAEK,KAAK,UAAU,mCAAmC,CACvD,UAA6C,EAC7C,iBAA2E,EAC3E,gBAA0C;IAE1C,IAAI,iBAAiB,KAAK,IAAI,EAAE,CAAC;QAC/B,qCAAqC;QACrC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,kBAAkB,GAAG,cAAI,CAAC,IAAI,CAClC,UAAU,CAAC,IAAI,EACf,cAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,UAAU,CAC5C,CAAC;IACF,MAAM,WAAW,GAAG,YAAE,CAAC,UAAU,CAAC,kBAAkB,CAAC;QACnD,CAAC,CAAC,kBAAkB;QACpB,CAAC,CAAC,MAAM,eAAe,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC3C,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,iBAAiB,KAAK,SAAS,IAAI,gBAAgB,EAAE,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC;QACnF,oEAAoE;QACpE,MAAM,sBAAsB,GAAG,gBAAgB,CAAC,iBAAiB,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE;YACtF,MAAM,eAAe,GAAG,cAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;YAC/D,OAAO,eAAe,KAAK,WAAW,CAAC;QACzC,CAAC,CAAC,CAAC;QACH,6EAA6E;QAC7E,2EAA2E;QAC3E,+CAA+C;QAC/C,IAAI,sBAAsB,IAAI,IAAI,EAAE,CAAC;YACnC,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO;QACL,WAAW;QACX,OAAO,EAAE,UAAU,CAAC,OAAO;QAC3B,cAAc,EAAE,iBAAiB,EAAE,cAAc,IAAI,EAAE;QACvD,YAAY,EAAE,iBAAiB,EAAE,YAAY,IAAI,EAAE;KACpD,CAAC;AACJ,CAAC","sourcesContent":["import fs from 'fs';\nimport path from 'path';\n\nimport type {\n RNConfigDependencyIos,\n RNConfigReactNativePlatformsConfigIos,\n} from './reactNativeConfig.types';\nimport type { ExpoModuleConfig } from '../ExpoModuleConfig';\nimport { listFilesSorted } from '../utils';\n\n/** Find first *.podspec file in target directory */\nconst findPodspecFile = async (targetPath: string): Promise<string | null> => {\n const podspecFiles = await listFilesSorted(targetPath, (basename) => {\n return basename.endsWith('.podspec');\n });\n // NOTE(@kitten): Compare case-insensitively against basename of derived name\n const mainBasename = path.basename(targetPath).toLowerCase();\n const mainPodspecFile = podspecFiles.find(\n (podspecFile) => path.basename(podspecFile, '.podspec').toLowerCase() === mainBasename\n );\n return mainPodspecFile ?? (podspecFiles.length > 0 ? podspecFiles[0] : null);\n};\n\nexport async function resolveDependencyConfigImplIosAsync(\n resolution: { path: string; version: string },\n reactNativeConfig: RNConfigReactNativePlatformsConfigIos | null | undefined,\n expoModuleConfig?: ExpoModuleConfig | null\n): Promise<RNConfigDependencyIos | null> {\n if (reactNativeConfig === null) {\n // Skip autolinking for this package.\n return null;\n }\n\n const mainPackagePodspec = path.join(\n resolution.path,\n path.basename(resolution.path) + '.podspec'\n );\n const podspecPath = fs.existsSync(mainPackagePodspec)\n ? mainPackagePodspec\n : await findPodspecFile(resolution.path);\n if (!podspecPath) {\n return null;\n }\n\n if (reactNativeConfig === undefined && expoModuleConfig?.supportsPlatform('apple')) {\n // Check if Expo podspec files contain the React Native podspec file\n const overlappingPodspecPath = expoModuleConfig.applePodspecPaths().find((targetFile) => {\n const expoPodspecPath = path.join(resolution.path, targetFile);\n return expoPodspecPath === podspecPath;\n });\n // NOTE(@kitten): If we don't have a react-native.config.{js,ts} file and the\n // package is also an Expo module, we only link it as a React Native module\n // if both don't point at the same podspec file\n if (overlappingPodspecPath != null) {\n return null;\n }\n }\n\n return {\n podspecPath,\n version: resolution.version,\n configurations: reactNativeConfig?.configurations || [],\n scriptPhases: reactNativeConfig?.scriptPhases || [],\n };\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-modules-autolinking",
3
- "version": "3.0.20",
3
+ "version": "3.0.21",
4
4
  "description": "Scripts that autolink Expo modules.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -45,5 +45,5 @@
45
45
  "require-from-string": "^2.0.2",
46
46
  "resolve-from": "^5.0.0"
47
47
  },
48
- "gitHead": "1bba12a43e14a442f2cf1c73fe21968e0ef097c1"
48
+ "gitHead": "d3e95a82fd9d48b0b751c4290216083244b360d2"
49
49
  }
@@ -10,10 +10,15 @@ import { listFilesSorted } from '../utils';
10
10
 
11
11
  /** Find first *.podspec file in target directory */
12
12
  const findPodspecFile = async (targetPath: string): Promise<string | null> => {
13
- const podspecFiles = await listFilesSorted(targetPath, (basename) =>
14
- basename.endsWith('.podspec')
13
+ const podspecFiles = await listFilesSorted(targetPath, (basename) => {
14
+ return basename.endsWith('.podspec');
15
+ });
16
+ // NOTE(@kitten): Compare case-insensitively against basename of derived name
17
+ const mainBasename = path.basename(targetPath).toLowerCase();
18
+ const mainPodspecFile = podspecFiles.find(
19
+ (podspecFile) => path.basename(podspecFile, '.podspec').toLowerCase() === mainBasename
15
20
  );
16
- return podspecFiles.length > 0 ? podspecFiles[0] : null;
21
+ return mainPodspecFile ?? (podspecFiles.length > 0 ? podspecFiles[0] : null);
17
22
  };
18
23
 
19
24
  export async function resolveDependencyConfigImplIosAsync(