expo-modules-autolinking 56.0.13 → 56.0.14

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
+ ## 56.0.14 — 2026-05-28
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - Fixed build error for unresolvable `expo-modules-macros-plugin`. ([#46294](https://github.com/expo/expo/pull/46294) by [@kudo](https://github.com/kudo))
18
+
13
19
  ## 56.0.13 — 2026-05-26
14
20
 
15
21
  ### 🐛 Bug fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-modules-autolinking",
3
- "version": "56.0.13",
3
+ "version": "56.0.14",
4
4
  "description": "Scripts that autolink Expo modules.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -49,7 +49,7 @@
49
49
  "chalk": "^4.1.0",
50
50
  "commander": "^7.2.0"
51
51
  },
52
- "gitHead": "f67a101bcbe56114e982184834b93da7bbed00af",
52
+ "gitHead": "087b9a6ae9aeaa939544a178ced423a69d7a61a7",
53
53
  "scripts": {
54
54
  "build": "expo-module build",
55
55
  "clean": "expo-module clean",
@@ -1,4 +1,6 @@
1
1
  require 'fileutils'
2
+ require 'json'
3
+ require 'open3'
2
4
  require 'colored2'
3
5
 
4
6
  module Expo
@@ -140,7 +142,7 @@ module Expo
140
142
  core_pod_target = target.pod_targets.find { |pod_target| pod_target.name == 'ExpoModulesCore' }
141
143
  core_src_root = Expo::PrecompiledModules.package_root_for('ExpoModulesCore') ||
142
144
  File.realpath(core_pod_target.sandbox.pod_dir(core_pod_target.root_spec.name).to_s)
143
- macros_plugin_dir = File.join(core_src_root, 'node_modules', '@expo', 'expo-modules-macros-plugin', 'apple')
145
+ macros_plugin_dir = resolve_macros_plugin_dir(core_src_root)
144
146
  macro_flags = "-Xfrontend -load-plugin-executable -Xfrontend \"#{macros_plugin_dir}/ExpoModulesMacros-tool#ExpoModulesMacros\""
145
147
  end
146
148
 
@@ -161,6 +163,19 @@ module Expo
161
163
  end
162
164
  end
163
165
 
166
+ def self.resolve_macros_plugin_dir(core_src_root)
167
+ js = "require.resolve('@expo/expo-modules-macros-plugin/package.json', { paths: #{[core_src_root].to_json} })"
168
+ stdout, stderr, status = Open3.capture3('node', '--print', js)
169
+ pkg_json_path = stdout.strip
170
+
171
+ if !status.success? || pkg_json_path.empty?
172
+ node_error = stderr.lines.find { |line| line.start_with?('Error:') }&.strip
173
+ raise "[Expo] Could not resolve `@expo/expo-modules-macros-plugin` from #{core_src_root}.#{node_error ? " (#{node_error})" : ''} Reinstall your JavaScript dependencies and rerun `pod install`."
174
+ end
175
+
176
+ File.join(File.dirname(pkg_json_path), 'apple')
177
+ end
178
+
164
179
  # Makes sure that the build script configuring the project is installed,
165
180
  # is up-to-date and is placed before the "Compile Sources" phase.
166
181
  def self.integrate_build_script(autolinking_manager, project, target, native_target)