expo-modules-autolinking 1.0.0 → 1.0.2

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.0.2 — 2023-01-10
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - Replace deprecated `File.exists?` with `File.exist?` to fix usage with `ruby@3.2`. ([#20470](https://github.com/expo/expo/pull/20757) by [@KiwiKilian](https://github.com/kiwikilian))
18
+
19
+ ## 1.0.1 — 2022-12-30
20
+
21
+ ### 🐛 Bug fixes
22
+
23
+ - Added React Native 0.71 support. ([#20470](https://github.com/expo/expo/pull/20470) by [@kudo](https://github.com/kudo))
24
+
13
25
  ## 1.0.0 — 2022-11-03
14
26
 
15
27
  _This version does not introduce any user-facing changes._
package/README.md CHANGED
@@ -4,7 +4,7 @@ Scripts that autolink Expo modules.
4
4
 
5
5
  # API documentation
6
6
 
7
- - [Documentation for the main branch](https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/module-autolinking.md)
7
+ - [Documentation for the main branch](https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/module-autolinking.mdx)
8
8
  - [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/module-autolinking/)
9
9
 
10
10
  # Installation in managed Expo projects
package/build/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ExpoModuleConfig } from './ExpoModuleConfig';
2
- export declare type SupportedPlatform = 'ios' | 'android' | 'web';
2
+ export type SupportedPlatform = 'ios' | 'android' | 'web';
3
3
  export interface SearchOptions {
4
4
  searchPaths: string[];
5
5
  ignorePaths?: string[] | null;
@@ -21,13 +21,13 @@ export interface PatchReactImportsOptions {
21
21
  podsRoot: string;
22
22
  dryRun: boolean;
23
23
  }
24
- export declare type PackageRevision = {
24
+ export type PackageRevision = {
25
25
  path: string;
26
26
  version: string;
27
27
  config?: ExpoModuleConfig;
28
28
  duplicates?: PackageRevision[];
29
29
  };
30
- export declare type SearchResults = {
30
+ export type SearchResults = {
31
31
  [moduleName: string]: PackageRevision;
32
32
  };
33
33
  export interface ModuleAndroidProjectInfo {
@@ -53,7 +53,7 @@ export interface ModuleDescriptorIos {
53
53
  reactDelegateHandlers: string[];
54
54
  debugOnly: boolean;
55
55
  }
56
- export declare type ModuleDescriptor = ModuleDescriptorAndroid | ModuleDescriptorIos;
56
+ export type ModuleDescriptor = ModuleDescriptorAndroid | ModuleDescriptorIos;
57
57
  /**
58
58
  * Represents a raw config from `expo-module.json`.
59
59
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-modules-autolinking",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
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": "0f11f9929a9fe6a8bb9733c780a6da506af1ab18"
51
+ "gitHead": "9047ecfbe233924e4848722b518d8ce1fa8b7173"
52
52
  }
@@ -173,11 +173,16 @@ module Expo
173
173
 
174
174
  private def use_modular_headers_for_dependencies(dependencies)
175
175
  dependencies.each { |dependency|
176
- unless @target_definition.build_pod_as_module?(dependency.name)
177
- UI.info "[Expo] ".blue << "Enabling modular headers for pod #{dependency.name.green}"
176
+ # The dependency name might be a subspec like `ReactCommon/turbomodule/core`,
177
+ # but the modular headers need to be enabled for the entire `ReactCommon` spec anyway,
178
+ # so we're stripping the subspec path from the dependency name.
179
+ root_spec_name = dependency.name.partition('/').first
180
+
181
+ unless @target_definition.build_pod_as_module?(root_spec_name)
182
+ UI.info "[Expo] ".blue << "Enabling modular headers for pod #{root_spec_name.green}"
178
183
 
179
184
  # This is an equivalent to setting `:modular_headers => true` for the specific dependency.
180
- @target_definition.set_use_modular_headers_for_pod(dependency.name, true)
185
+ @target_definition.set_use_modular_headers_for_pod(root_spec_name, true)
181
186
  end
182
187
  }
183
188
  end
@@ -34,8 +34,8 @@ module Pod
34
34
 
35
35
  patched_spec = Specification.from_json(spec_json.to_json)
36
36
 
37
- # Patch `ReactCommon.podspec` to define module
38
- elsif name == 'ReactCommon'
37
+ # Patch podspecs to define module
38
+ elsif ['ReactCommon', 'React-RCTAppDelegate'].include? name
39
39
  spec_json = JSON.parse(podspec.to_pretty_json)
40
40
  spec_json['pod_target_xcconfig']['DEFINES_MODULE'] = 'YES'
41
41
  patched_spec = Specification.from_json(spec_json.to_json)
@@ -5,7 +5,7 @@ require 'pathname'
5
5
  def maybe_generate_xcode_env_file!()
6
6
  project_directory = Pod::Config.instance.project_root
7
7
  xcode_env_file = File.join(project_directory, '.xcode.env.local')
8
- if File.exists?(xcode_env_file)
8
+ if File.exist?(xcode_env_file)
9
9
  return
10
10
  end
11
11