@expo/config-plugins
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -19,4 +19,3 @@ "use strict"; | ||
const [, target] = findNativeTargetById(project, targetId); | ||
const type = target.productType === TargetType.EXTENSION || | ||
target.productType === `"${TargetType.EXTENSION}"` | ||
const type = isTargetOfType(target, TargetType.EXTENSION) | ||
? TargetType.EXTENSION | ||
@@ -36,2 +35,5 @@ : TargetType.OTHER; | ||
exports.findApplicationTargetWithDependenciesAsync = findApplicationTargetWithDependenciesAsync; | ||
function isTargetOfType(target, targetType) { | ||
return target.productType === targetType || target.productType === `"${targetType}"`; | ||
} | ||
function getNativeTargets(project) { | ||
@@ -44,6 +46,7 @@ const section = project.pbxNativeTargetSection(); | ||
const targets = getNativeTargets(project); | ||
if (targets.length === 0) { | ||
throw new Error(`Could not find any target in project.pbxproj`); | ||
const applicationTargets = targets.filter(([, target]) => isTargetOfType(target, TargetType.APPLICATION)); | ||
if (applicationTargets.length === 0) { | ||
throw new Error(`Could not find any application target in project.pbxproj`); | ||
} | ||
return targets[0]; | ||
return applicationTargets[0]; | ||
} | ||
@@ -50,0 +53,0 @@ exports.findFirstNativeTarget = findFirstNativeTarget; |
@@ -251,3 +251,2 @@ "use strict"; | ||
.filter(isBuildConfig) | ||
.filter(isNotTestHost) | ||
.filter(([key]) => buildConfigurations.includes(key)); | ||
@@ -259,3 +258,3 @@ } | ||
if (!xcBuildConfigurationEntry) { | ||
throw new Error(`Build configuration '${buildConfiguration} does not exist in list with id '${configurationListId}'`); | ||
throw new Error(`Build configuration '${buildConfiguration}' does not exist in list with id '${configurationListId}'`); | ||
} | ||
@@ -262,0 +261,0 @@ return xcBuildConfigurationEntry; |
{ | ||
"name": "@expo/config-plugins", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "A library for Expo config plugins", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
849071
8673