create-expo-module
Advanced tools
Comparing version 0.8.0 to 0.8.1
@@ -366,3 +366,3 @@ "use strict"; | ||
console.log(`For example, you can add this line to your App.js or App.tsx file:`); | ||
console.log(`${chalk_1.default.gray.italic(`import { hello } from './modules/${slug}';`)}`); | ||
console.log(`${chalk_1.default.gray.italic(`import ${name} './modules/${slug}';`)}`); | ||
console.log(); | ||
@@ -369,0 +369,0 @@ console.log(`Learn more on Expo Modules APIs: ${chalk_1.default.blue.bold(DOCS_URL)}`); |
@@ -23,4 +23,7 @@ "use strict"; | ||
const json = (await response.json()); | ||
if (json.data.total_count > 0) { | ||
return json.data.items[0].login; | ||
const data = json.data ?? json; | ||
if (data?.total_count > 0) { | ||
if (data.items?.[0]?.login) { | ||
return data.items[0].login; | ||
} | ||
} | ||
@@ -27,0 +30,0 @@ return await findGitHubUserFromEmailByCommits(email); |
{ | ||
"name": "create-expo-module", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"description": "The script to create the Expo module", | ||
@@ -60,3 +60,3 @@ "main": "build/create-expo-module.js", | ||
}, | ||
"gitHead": "7c7d2362fff23bec26cd145ed34edd9c403551bd" | ||
"gitHead": "1f7a56b5a5bcef23ac6e55b16db53077f6a4065c" | ||
} |
@@ -474,3 +474,3 @@ import spawnAsync from '@expo/spawn-async'; | ||
console.log(`For example, you can add this line to your App.js or App.tsx file:`); | ||
console.log(`${chalk.gray.italic(`import { hello } from './modules/${slug}';`)}`); | ||
console.log(`${chalk.gray.italic(`import ${name} './modules/${slug}';`)}`); | ||
console.log(); | ||
@@ -477,0 +477,0 @@ console.log(`Learn more on Expo Modules APIs: ${chalk.blue.bold(DOCS_URL)}`); |
@@ -24,6 +24,8 @@ import type { Endpoints } from '@octokit/types'; | ||
const json = (await response.json()) as Endpoints['GET /search/users']['response']; | ||
if (json.data.total_count > 0) { | ||
return json.data.items[0].login; | ||
const data = json.data ?? json; | ||
if (data?.total_count > 0) { | ||
if (data.items?.[0]?.login) { | ||
return data.items[0].login; | ||
} | ||
} | ||
return await findGitHubUserFromEmailByCommits(email); | ||
@@ -30,0 +32,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
145089
2121