create-react-native-library
Advanced tools
Comparing version 0.34.2 to 0.34.3
@@ -168,2 +168,5 @@ "use strict"; | ||
}; | ||
// FIXME: fix the type | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
async function create(argv) { | ||
@@ -174,3 +177,3 @@ let local = false; | ||
} else { | ||
let hasPackageJson = await _fsExtra.default.pathExists(_path.default.join(process.cwd(), 'package.json')); | ||
const hasPackageJson = await _fsExtra.default.pathExists(_path.default.join(process.cwd(), 'package.json')); | ||
if (hasPackageJson) { | ||
@@ -263,3 +266,3 @@ // If we're under a project with package.json, ask the user if they want to create a local library | ||
message: 'What is the URL for the package author?', | ||
// @ts-ignore: this is supported, but types are wrong | ||
// @ts-expect-error this is supported, but types are wrong | ||
initial: async previous => { | ||
@@ -280,3 +283,2 @@ try { | ||
message: 'What is the URL for the repository?', | ||
// @ts-ignore: this is supported, but types are wrong | ||
initial: (_, answers) => { | ||
@@ -392,3 +394,5 @@ if (/^https?:\/\/github.com\/[^/]+/.test(answers.authorUrl)) { | ||
try { | ||
version = await Promise.race([new Promise(resolve => setTimeout(() => resolve(FALLBACK_BOB_VERSION), 1000)), (0, _spawn.spawn)('npm', ['view', 'react-native-builder-bob', 'dist-tags.latest'])]); | ||
version = await Promise.race([new Promise(resolve => { | ||
setTimeout(() => resolve(FALLBACK_BOB_VERSION), 1000); | ||
}), (0, _spawn.spawn)('npm', ['view', 'react-native-builder-bob', 'dist-tags.latest'])]); | ||
} catch (e) { | ||
@@ -620,3 +624,2 @@ // Fallback to a known version if we couldn't fetch | ||
} | ||
// eslint-disable-next-line babel/no-unused-expressions | ||
_yargs.default.command('$0 [name]', 'create a react native library', args, create).demandCommand().recommendCommands().fail((message, error) => { | ||
@@ -623,0 +626,0 @@ console.log('\n'); |
{ | ||
"name": "create-react-native-library", | ||
"version": "0.34.2", | ||
"version": "0.34.3", | ||
"description": "CLI to scaffold React Native libraries", | ||
@@ -68,3 +68,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "b0316a643a9a01544c2ad1acc3c511a786653005" | ||
"gitHead": "c233fed21e9a67e20207eedb84c85e9e2c0f985c" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
15369
3536564