expo-modules-autolinking 0.10.2 → 0.11.0

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,7 +10,11 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
- ## 0.10.2 — 2022-08-10
13
+ ## 0.11.0 — 2022-10-06
14
+
15
+ ### 🎉 New features
16
+
17
+ - Added `includeTests` option to `use_expo_modules!` to include test specs from autolinked modules. ([#18496](https://github.com/expo/expo/pull/18496) by [@tsapeta](https://github.com/tsapeta))
14
18
 
15
19
  ### 🐛 Bug fixes
16
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-modules-autolinking",
3
- "version": "0.10.2",
3
+ "version": "0.11.0",
4
4
  "description": "Scripts that autolink Expo modules.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -37,7 +37,7 @@
37
37
  "@expo/spawn-async": "^1.5.0",
38
38
  "@tsconfig/node12": "^1.0.9",
39
39
  "@types/fs-extra": "^9.0.11",
40
- "expo-module-scripts": "~2.0.0",
40
+ "expo-module-scripts": "~2.1.0",
41
41
  "minimatch": "^3.0.4",
42
42
  "tempy": "^0.7.1"
43
43
  },
@@ -48,5 +48,5 @@
48
48
  "find-up": "^5.0.0",
49
49
  "fs-extra": "^9.1.0"
50
50
  },
51
- "gitHead": "9628e396726e9085b644a3a6d3fc53e33912a0dc"
51
+ "gitHead": "1327fe2bc92f71f7213cd5ddd40fa4f8a5336bc6"
52
52
  }
@@ -26,6 +26,8 @@ module Expo
26
26
  end
27
27
 
28
28
  global_flags = @options.fetch(:flags, {})
29
+ tests_only = @options.fetch(:testsOnly, false)
30
+ include_tests = @options.fetch(:includeTests, false)
29
31
 
30
32
  project_directory = Pod::Config.instance.project_root
31
33
 
@@ -46,7 +48,7 @@ module Expo
46
48
  :configuration => package.debugOnly ? ['Debug'] : [] # An empty array means all configurations
47
49
  }.merge(global_flags, package.flags)
48
50
 
49
- if links_for_testing?
51
+ if tests_only || include_tests
50
52
  podspec_file_path = File.join(podspec_dir_path, pod.pod_name + ".podspec")
51
53
  podspec = Pod::Specification.from_file(podspec_file_path)
52
54
  test_specs_names = podspec.test_specs.map { |test_spec|
@@ -55,7 +57,7 @@ module Expo
55
57
 
56
58
  # Jump to the next package when it doesn't have any test specs (except interfaces, they're required)
57
59
  # TODO: Can remove interface check once we move all the interfaces into the core.
58
- next if test_specs_names.empty? && !pod.pod_name.end_with?('Interface')
60
+ next if tests_only && test_specs_names.empty? && !pod.pod_name.end_with?('Interface')
59
61
 
60
62
  pod_options[:testspecs] = test_specs_names
61
63
  end
@@ -93,13 +95,9 @@ module Expo
93
95
  @options.fetch(:providerName, Constants::MODULES_PROVIDER_FILE_NAME)
94
96
  end
95
97
 
96
- public def links_for_testing?
97
- @options.fetch(:testsOnly, false)
98
- end
99
-
100
98
  # For now there is no need to generate the modules provider for testing.
101
99
  public def should_generate_modules_provider?
102
- return !links_for_testing?
100
+ return !@options.fetch(:testsOnly, false)
103
101
  end
104
102
 
105
103
  # privates