expo-modules-autolinking 3.0.12 → 3.1.0-canary-20250919-7a31b96
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 +2 -4
- package/android/expo-gradle-plugin/expo-autolinking-plugin/build.gradle.kts +3 -2
- package/android/expo-gradle-plugin/expo-autolinking-settings-plugin/build.gradle.kts +3 -2
- package/build/commands/generateModulesProviderCommand.js +2 -1
- package/build/commands/generateModulesProviderCommand.js.map +1 -1
- package/package.json +3 -4
- package/scripts/ios/autolinking_manager.rb +14 -5
- package/scripts/ios/project_integrator.rb +2 -0
- package/src/commands/generateModulesProviderCommand.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,11 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
### 🎉 New features
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
### 💡 Others
|
|
9
|
+
- Use app root to generate modules provider ([#39728](https://github.com/expo/expo/pull/39728) by [@gabrieldonadel](https://github.com/gabrieldonadel))
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
### 🐛 Bug fixes
|
|
14
12
|
|
|
15
13
|
### 💡 Others
|
|
16
14
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
1
2
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
2
3
|
|
|
3
4
|
plugins {
|
|
@@ -22,8 +23,8 @@ java {
|
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
tasks.withType<KotlinCompile> {
|
|
25
|
-
|
|
26
|
-
jvmTarget
|
|
26
|
+
compilerOptions {
|
|
27
|
+
jvmTarget.set(JvmTarget.JVM_11)
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
|
2
|
+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
2
3
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
3
4
|
|
|
4
5
|
plugins {
|
|
@@ -27,8 +28,8 @@ java {
|
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
tasks.withType<KotlinCompile> {
|
|
30
|
-
|
|
31
|
-
jvmTarget
|
|
31
|
+
compilerOptions {
|
|
32
|
+
jvmTarget.set(JvmTarget.JVM_11)
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
|
|
@@ -11,6 +11,7 @@ function generateModulesProviderCommand(cli) {
|
|
|
11
11
|
.option('-t, --target <path>', 'Path to the target file, where the package list should be written to.')
|
|
12
12
|
.option('--entitlement <path>', 'Path to the Apple code signing entitlements file.')
|
|
13
13
|
.option('-p, --packages <packages...>', 'Names of the packages to include in the generated modules provider.')
|
|
14
|
+
.option('--app-root <path>', 'Path to the app root directory.')
|
|
14
15
|
.action(async (searchPaths, commandArguments) => {
|
|
15
16
|
const platform = commandArguments.platform ?? 'apple';
|
|
16
17
|
const autolinkingOptionsLoader = (0, autolinkingOptions_1.createAutolinkingOptionsLoader)({
|
|
@@ -20,7 +21,7 @@ function generateModulesProviderCommand(cli) {
|
|
|
20
21
|
const autolinkingOptions = await autolinkingOptionsLoader.getPlatformOptions(platform);
|
|
21
22
|
const expoModulesSearchResults = await (0, findModules_1.findModulesAsync)({
|
|
22
23
|
autolinkingOptions: await autolinkingOptionsLoader.getPlatformOptions(platform),
|
|
23
|
-
appRoot: await autolinkingOptionsLoader.getAppRoot(),
|
|
24
|
+
appRoot: commandArguments.appRoot ?? (await autolinkingOptionsLoader.getAppRoot()),
|
|
24
25
|
});
|
|
25
26
|
const expoModulesResolveResults = await (0, resolveModules_1.resolveModulesAsync)(expoModulesSearchResults, autolinkingOptions);
|
|
26
27
|
const includeModules = new Set(commandArguments.packages ?? []);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateModulesProviderCommand.js","sourceRoot":"","sources":["../../src/commands/generateModulesProviderCommand.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"generateModulesProviderCommand.js","sourceRoot":"","sources":["../../src/commands/generateModulesProviderCommand.ts"],"names":[],"mappings":";;AAmBA,wEA0CC;AA3DD,6DAI8B;AAC9B,4DAA8D;AAC9D,4EAAkF;AAClF,kEAAoE;AASpE,0EAA0E;AAC1E,SAAgB,8BAA8B,CAAC,GAA8B;IAC3E,OAAO,IAAA,iDAA4B,EAAC,GAAG,CAAC,OAAO,CAAC,4CAA4C,CAAC,CAAC;SAC3F,MAAM,CACL,qBAAqB,EACrB,uEAAuE,CACxE;SACA,MAAM,CAAC,sBAAsB,EAAE,mDAAmD,CAAC;SACnF,MAAM,CACL,8BAA8B,EAC9B,qEAAqE,CACtE;SACA,MAAM,CAAC,mBAAmB,EAAE,iCAAiC,CAAC;SAC9D,MAAM,CACL,KAAK,EAAE,WAA4B,EAAE,gBAAkD,EAAE,EAAE;QACzF,MAAM,QAAQ,GAAG,gBAAgB,CAAC,QAAQ,IAAI,OAAO,CAAC;QACtD,MAAM,wBAAwB,GAAG,IAAA,mDAA8B,EAAC;YAC9D,GAAG,gBAAgB;YACnB,WAAW;SACZ,CAAC,CAAC;QACH,MAAM,kBAAkB,GAAG,MAAM,wBAAwB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QAEvF,MAAM,wBAAwB,GAAG,MAAM,IAAA,8BAAgB,EAAC;YACtD,kBAAkB,EAAE,MAAM,wBAAwB,CAAC,kBAAkB,CAAC,QAAQ,CAAC;YAC/E,OAAO,EAAE,gBAAgB,CAAC,OAAO,IAAI,CAAC,MAAM,wBAAwB,CAAC,UAAU,EAAE,CAAC;SACnF,CAAC,CAAC;QACH,MAAM,yBAAyB,GAAG,MAAM,IAAA,oCAAmB,EACzD,wBAAwB,EACxB,kBAAkB,CACnB,CAAC;QAEF,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,gBAAgB,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;QAChE,MAAM,eAAe,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAClE,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,CACvC,CAAC;QAEF,MAAM,IAAA,kDAA4B,EAAC,eAAe,EAAE;YAClD,QAAQ;YACR,UAAU,EAAE,gBAAgB,CAAC,MAAM;YACnC,eAAe,EAAE,gBAAgB,CAAC,WAAW,IAAI,IAAI;SACtD,CAAC,CAAC;IACL,CAAC,CACF,CAAC;AACN,CAAC","sourcesContent":["import commander from 'commander';\n\nimport {\n AutolinkingCommonArguments,\n createAutolinkingOptionsLoader,\n registerAutolinkingArguments,\n} from './autolinkingOptions';\nimport { findModulesAsync } from '../autolinking/findModules';\nimport { generateModulesProviderAsync } from '../autolinking/generatePackageList';\nimport { resolveModulesAsync } from '../autolinking/resolveModules';\n\ninterface GenerateModulesProviderArguments extends AutolinkingCommonArguments {\n target: string;\n entitlement?: string;\n packages?: string[] | null;\n appRoot?: string;\n}\n\n/** Generates a source file listing all packages to link in the runtime */\nexport function generateModulesProviderCommand(cli: commander.CommanderStatic) {\n return registerAutolinkingArguments(cli.command('generate-modules-provider [searchPaths...]'))\n .option(\n '-t, --target <path>',\n 'Path to the target file, where the package list should be written to.'\n )\n .option('--entitlement <path>', 'Path to the Apple code signing entitlements file.')\n .option(\n '-p, --packages <packages...>',\n 'Names of the packages to include in the generated modules provider.'\n )\n .option('--app-root <path>', 'Path to the app root directory.')\n .action(\n async (searchPaths: string[] | null, commandArguments: GenerateModulesProviderArguments) => {\n const platform = commandArguments.platform ?? 'apple';\n const autolinkingOptionsLoader = createAutolinkingOptionsLoader({\n ...commandArguments,\n searchPaths,\n });\n const autolinkingOptions = await autolinkingOptionsLoader.getPlatformOptions(platform);\n\n const expoModulesSearchResults = await findModulesAsync({\n autolinkingOptions: await autolinkingOptionsLoader.getPlatformOptions(platform),\n appRoot: commandArguments.appRoot ?? (await autolinkingOptionsLoader.getAppRoot()),\n });\n const expoModulesResolveResults = await resolveModulesAsync(\n expoModulesSearchResults,\n autolinkingOptions\n );\n\n const includeModules = new Set(commandArguments.packages ?? []);\n const filteredModules = expoModulesResolveResults.filter((module) =>\n includeModules.has(module.packageName)\n );\n\n await generateModulesProviderAsync(filteredModules, {\n platform,\n targetPath: commandArguments.target,\n entitlementPath: commandArguments.entitlement ?? null,\n });\n }\n );\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-modules-autolinking",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0-canary-20250919-7a31b96",
|
|
4
4
|
"description": "Scripts that autolink Expo modules.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"license": "MIT",
|
|
35
35
|
"homepage": "https://github.com/expo/expo/tree/main/packages/expo-modules-autolinking#readme",
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"expo-module-scripts": "
|
|
37
|
+
"expo-module-scripts": "5.0.8-canary-20250919-7a31b96",
|
|
38
38
|
"memfs": "^3.2.0",
|
|
39
39
|
"minimatch": "^9.0.0"
|
|
40
40
|
},
|
|
@@ -45,6 +45,5 @@
|
|
|
45
45
|
"glob": "^10.4.2",
|
|
46
46
|
"require-from-string": "^2.0.2",
|
|
47
47
|
"resolve-from": "^5.0.0"
|
|
48
|
-
}
|
|
49
|
-
"gitHead": "0d9ae61f3dea2e2b854576859e5b50fca5503fc1"
|
|
48
|
+
}
|
|
50
49
|
}
|
|
@@ -166,6 +166,12 @@ module Expo
|
|
|
166
166
|
return @target_definition.platform&.string_name
|
|
167
167
|
end
|
|
168
168
|
|
|
169
|
+
# Returns the app project root if provided in the options.
|
|
170
|
+
public def custom_app_root
|
|
171
|
+
# TODO: Follow up on renaming `:projectRoot` and migrate to `appRoot`
|
|
172
|
+
return @options.fetch(:appRoot, @options.fetch(:projectRoot, nil))
|
|
173
|
+
end
|
|
174
|
+
|
|
169
175
|
# privates
|
|
170
176
|
|
|
171
177
|
private def resolve
|
|
@@ -230,12 +236,15 @@ module Expo
|
|
|
230
236
|
end
|
|
231
237
|
|
|
232
238
|
public def generate_modules_provider_command_args(target_path)
|
|
239
|
+
command_args = ['--target', target_path]
|
|
240
|
+
|
|
241
|
+
if !custom_app_root.nil?
|
|
242
|
+
command_args.concat(['--app-root', custom_app_root])
|
|
243
|
+
end
|
|
244
|
+
|
|
233
245
|
node_command_args('generate-modules-provider').concat(
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
target_path,
|
|
237
|
-
'--packages'
|
|
238
|
-
],
|
|
246
|
+
command_args,
|
|
247
|
+
['--packages'],
|
|
239
248
|
packages_to_generate.map(&:name)
|
|
240
249
|
)
|
|
241
250
|
end
|
|
@@ -245,6 +245,7 @@ module Expo
|
|
|
245
245
|
platform = autolinking_manager.platform_name.downcase
|
|
246
246
|
package_names = autolinking_manager.packages_to_generate.map { |package| "\"#{package.name}\"" }
|
|
247
247
|
entitlement_param = entitlement_path.nil? ? '' : "--entitlement \"#{entitlement_path}\""
|
|
248
|
+
app_root_param = autolinking_manager.custom_app_root.nil? ? '' : "--app-root \"#{autolinking_manager.custom_app_root}\""
|
|
248
249
|
|
|
249
250
|
<<~SUPPORT_SCRIPT
|
|
250
251
|
#!/usr/bin/env bash
|
|
@@ -296,6 +297,7 @@ module Expo
|
|
|
296
297
|
generate-modules-provider #{args.join(' ')} \\
|
|
297
298
|
--target "#{modules_provider_path}" \\
|
|
298
299
|
#{entitlement_param} \\
|
|
300
|
+
#{app_root_param} \\
|
|
299
301
|
--platform "apple" \\
|
|
300
302
|
--packages #{package_names.join(' ')}
|
|
301
303
|
SUPPORT_SCRIPT
|
|
@@ -13,6 +13,7 @@ interface GenerateModulesProviderArguments extends AutolinkingCommonArguments {
|
|
|
13
13
|
target: string;
|
|
14
14
|
entitlement?: string;
|
|
15
15
|
packages?: string[] | null;
|
|
16
|
+
appRoot?: string;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
/** Generates a source file listing all packages to link in the runtime */
|
|
@@ -27,6 +28,7 @@ export function generateModulesProviderCommand(cli: commander.CommanderStatic) {
|
|
|
27
28
|
'-p, --packages <packages...>',
|
|
28
29
|
'Names of the packages to include in the generated modules provider.'
|
|
29
30
|
)
|
|
31
|
+
.option('--app-root <path>', 'Path to the app root directory.')
|
|
30
32
|
.action(
|
|
31
33
|
async (searchPaths: string[] | null, commandArguments: GenerateModulesProviderArguments) => {
|
|
32
34
|
const platform = commandArguments.platform ?? 'apple';
|
|
@@ -38,7 +40,7 @@ export function generateModulesProviderCommand(cli: commander.CommanderStatic) {
|
|
|
38
40
|
|
|
39
41
|
const expoModulesSearchResults = await findModulesAsync({
|
|
40
42
|
autolinkingOptions: await autolinkingOptionsLoader.getPlatformOptions(platform),
|
|
41
|
-
appRoot: await autolinkingOptionsLoader.getAppRoot(),
|
|
43
|
+
appRoot: commandArguments.appRoot ?? (await autolinkingOptionsLoader.getAppRoot()),
|
|
42
44
|
});
|
|
43
45
|
const expoModulesResolveResults = await resolveModulesAsync(
|
|
44
46
|
expoModulesSearchResults,
|