mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-09-16 09:41:38 +08:00
Swap React Native CLI paths based on version compatibility in runReactNativeBundleCommand function
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-native-update-cli",
|
"name": "react-native-update-cli",
|
||||||
"version": "1.42.0",
|
"version": "1.42.1",
|
||||||
"description": "Command tools for javaScript updater with `pushy` service for react native apps.",
|
"description": "Command tools for javaScript updater with `pushy` service for react native apps.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
@@ -102,13 +102,13 @@ async function runReactNativeBundleCommand({
|
|||||||
|
|
||||||
const getRnCli = () => {
|
const getRnCli = () => {
|
||||||
try {
|
try {
|
||||||
// rn >= 0.75
|
// rn < 0.75
|
||||||
cliPath = require.resolve('@react-native-community/cli/build/bin.js', {
|
cliPath = require.resolve('react-native/local-cli/cli.js', {
|
||||||
paths: [process.cwd()],
|
paths: [process.cwd()],
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// rn < 0.75
|
// rn >= 0.75
|
||||||
cliPath = require.resolve('react-native/local-cli/cli.js', {
|
cliPath = require.resolve('@react-native-community/cli/build/bin.js', {
|
||||||
paths: [process.cwd()],
|
paths: [process.cwd()],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user