expo-modules-autolinking 1.10.1 → 1.10.3

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,18 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 1.10.3 — 2024-02-06
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - Fixed generating a list of app delegate subscribers. ([#26851](https://github.com/expo/expo/pull/26851) by [@tsapeta](https://github.com/tsapeta))
18
+
19
+ ## 1.10.2 — 2024-01-18
20
+
21
+ ### 🐛 Bug fixes
22
+
23
+ - Fixed a list of packages to include in the generated modules provider for tvOS and macOS platforms. ([#26497](https://github.com/expo/expo/pull/26497) by [@tsapeta](https://github.com/tsapeta))
24
+
13
25
  ## 1.10.1 — 2024-01-18
14
26
 
15
27
  ### 🎉 New features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-modules-autolinking",
3
- "version": "1.10.1",
3
+ "version": "1.10.3",
4
4
  "description": "Scripts that autolink Expo modules.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -48,5 +48,5 @@
48
48
  "find-up": "^5.0.0",
49
49
  "fs-extra": "^9.1.0"
50
50
  },
51
- "gitHead": "102899632731658eecba006c0d1c79b98ba8f5f7"
51
+ "gitHead": "4f3dcf3e23eae997f884117fdd34ad734efad9fd"
52
52
  }
@@ -56,7 +56,7 @@ module Expo
56
56
  # `pod install` may fail if there is no `use_modular_headers!` declaration or
57
57
  # `:modular_headers => true` is not used for this particular dependency.
58
58
  # The latter require adding transitive dependencies to user's Podfile that we'd rather like to avoid.
59
- if package.has_swift_modules_to_link?
59
+ if package.has_something_to_link?
60
60
  use_modular_headers_for_dependencies(pod.spec.all_dependencies)
61
61
  end
62
62
 
@@ -123,7 +123,13 @@ module Expo
123
123
 
124
124
  # Filters only these packages that needs to be included in the generated modules provider.
125
125
  public def packages_to_generate
126
- @packages.select { |package| package.modules.any? }
126
+ platform = @target_definition.platform
127
+
128
+ @packages.select do |package|
129
+ # Check whether the package has any module to autolink
130
+ # and if there is any pod that supports target's platform.
131
+ package.has_something_to_link? && package.pods.any? { |pod| pod.supports_platform?(platform) }
132
+ end
127
133
  end
128
134
 
129
135
  # Returns the provider name which is also a name of the generated file
@@ -47,7 +47,13 @@ module Expo
47
47
 
48
48
  # Whether this module should only be added to the debug configuration.
49
49
  attr_reader :debugOnly
50
-
50
+
51
+ # Names of Swift classes that hooks into `ExpoAppDelegate` to receive AppDelegate life-cycle events.
52
+ attr_reader :appDelegateSubscribers
53
+
54
+ # Names of Swift classes that implement `ExpoReactDelegateHandler` to hook React instance creation.
55
+ attr_reader :reactDelegateHandlers
56
+
51
57
  def initialize(json)
52
58
  @name = json['packageName']
53
59
  @version = json['packageVersion']
@@ -55,10 +61,13 @@ module Expo
55
61
  @flags = json.fetch('flags', {})
56
62
  @modules = json.fetch('modules', [])
57
63
  @debugOnly = json['debugOnly']
64
+ @appDelegateSubscribers = json.fetch('appDelegateSubscribers', [])
65
+ @reactDelegateHandlers = json.fetch('reactDelegateHandlers', [])
58
66
  end
59
67
 
60
- def has_swift_modules_to_link?
61
- return !@modules.empty?
68
+ # Returns a boolean value whether the package has any module, app delegate subscriber or react delegate handler to link.
69
+ def has_something_to_link?
70
+ return !@modules.empty? || !@appDelegateSubscribers.empty? || !@reactDelegateHandlers.empty?
62
71
  end
63
72
 
64
73
  end # class Package