expo-modules-autolinking 56.0.14 → 56.0.15
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 +6 -0
- package/package.json +3 -3
- package/scripts/ios/project_integrator.rb +25 -6
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 56.0.15 — 2026-06-05
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- Fixed the macro plugin flag not being applied to test targets, so macros couldn't be used in unit tests. ([#46595](https://github.com/expo/expo/pull/46595) by [@tsapeta](https://github.com/tsapeta))
|
|
18
|
+
|
|
13
19
|
## 56.0.14 — 2026-05-28
|
|
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.
|
|
3
|
+
"version": "56.0.15",
|
|
4
4
|
"description": "Scripts that autolink Expo modules.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"homepage": "https://github.com/expo/expo/tree/main/packages/expo-modules-autolinking#readme",
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"memfs": "^3.2.0",
|
|
44
|
-
"expo-module-scripts": "56.0.
|
|
44
|
+
"expo-module-scripts": "56.0.3"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@expo/require-utils": "^56.1.3",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"chalk": "^4.1.0",
|
|
50
50
|
"commander": "^7.2.0"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "175f1e78e3444ca99ddea473faea6777a0656668",
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build": "expo-module build",
|
|
55
55
|
"clean": "expo-module clean",
|
|
@@ -150,19 +150,38 @@ module Expo
|
|
|
150
150
|
is_core = pod_target.name == 'ExpoModulesCore'
|
|
151
151
|
has_core_dependency = pod_target.dependencies.find { |dependency| dependency == 'ExpoModulesCore' }
|
|
152
152
|
next unless is_core || has_core_dependency
|
|
153
|
+
|
|
153
154
|
pod_target.build_settings.each do |build_configuration_name, build_settings|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
155
|
+
xcconfig_path = pod_target.xcconfig_path(build_configuration_name)
|
|
156
|
+
append_macro_flags(build_settings, xcconfig_path, macro_flags)
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Test specs are compiled into their own native targets with their own xcconfigs, so the flag
|
|
160
|
+
# set on the library target above doesn't reach them. Apply it to each test spec's build
|
|
161
|
+
# settings as well, so macros can be used from unit tests.
|
|
162
|
+
pod_target.test_specs.each do |test_spec|
|
|
163
|
+
test_type = test_spec.consumer(pod_target.platform).test_type
|
|
164
|
+
pod_target.test_spec_build_settings_by_config[test_spec.name].each do |build_configuration_name, build_settings|
|
|
165
|
+
xcconfig_variant = "#{test_type.capitalize}-#{pod_target.subspec_label(test_spec)}.#{build_configuration_name}"
|
|
166
|
+
xcconfig_path = pod_target.xcconfig_path(xcconfig_variant)
|
|
167
|
+
append_macro_flags(build_settings, xcconfig_path, macro_flags)
|
|
160
168
|
end
|
|
161
169
|
end
|
|
162
170
|
end
|
|
163
171
|
end
|
|
164
172
|
end
|
|
165
173
|
|
|
174
|
+
# Appends the macro plugin flags to the target's `OTHER_SWIFT_FLAGS` and saves the xcconfig,
|
|
175
|
+
# skipping it when the flags are already present.
|
|
176
|
+
def self.append_macro_flags(build_settings, xcconfig_path, macro_flags)
|
|
177
|
+
xcconfig = build_settings.xcconfig
|
|
178
|
+
swift_flags = xcconfig.attributes[SWIFT_FLAGS] || '$(inherited)'
|
|
179
|
+
return if swift_flags.include?(macro_flags)
|
|
180
|
+
|
|
181
|
+
xcconfig.attributes[SWIFT_FLAGS] = "#{swift_flags} #{macro_flags}"
|
|
182
|
+
xcconfig.save_as(xcconfig_path)
|
|
183
|
+
end
|
|
184
|
+
|
|
166
185
|
def self.resolve_macros_plugin_dir(core_src_root)
|
|
167
186
|
js = "require.resolve('@expo/expo-modules-macros-plugin/package.json', { paths: #{[core_src_root].to_json} })"
|
|
168
187
|
stdout, stderr, status = Open3.capture3('node', '--print', js)
|