react-native-update-cli 1.23.0 → 1.23.1

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/lib/bundle.js CHANGED
@@ -68,14 +68,16 @@ async function runReactNativeBundleCommand(bundleName, development, entryFile, o
68
68
  let cliPath = require.resolve('react-native/local-cli/cli.js', {
69
69
  paths: [process.cwd()]
70
70
  });
71
+ let isExpo = false;
71
72
  try {
72
73
  // use expo-cli if exists
73
74
  cliPath = require.resolve('@expo/cli', {
74
75
  paths: [process.cwd()]
75
76
  });
77
+ isExpo = true;
76
78
  console.log(`expo detected, will use @expo/cli to bundle.\n`);
77
79
  } catch (e) {}
78
- const bundleCommand = cliPath.includes('@expo/cli') ? 'export:embed' : 'bundle';
80
+ const bundleCommand = isExpo ? 'export:embed' : 'bundle';
79
81
 
80
82
  Array.prototype.push.apply(reactNativeBundleArgs, [cliPath, bundleCommand, '--assets-dest', outputFolder, '--bundle-output', _path2.default.join(outputFolder, bundleName), '--dev', development, '--entry-file', entryFile, '--platform', platform, '--reset-cache']);
81
83
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-update-cli",
3
- "version": "1.23.0",
3
+ "version": "1.23.1",
4
4
  "description": "Command tools for javaScript updater with `pushy` service for react native apps.",
5
5
  "main": "index.js",
6
6
  "bin": {
package/src/bundle.js CHANGED
@@ -54,16 +54,16 @@ async function runReactNativeBundleCommand(
54
54
  let cliPath = require.resolve('react-native/local-cli/cli.js', {
55
55
  paths: [process.cwd()],
56
56
  });
57
+ let isExpo = false;
57
58
  try {
58
59
  // use expo-cli if exists
59
60
  cliPath = require.resolve('@expo/cli', {
60
61
  paths: [process.cwd()],
61
62
  });
63
+ isExpo = true;
62
64
  console.log(`expo detected, will use @expo/cli to bundle.\n`);
63
65
  } catch (e) {}
64
- const bundleCommand = cliPath.includes('@expo/cli')
65
- ? 'export:embed'
66
- : 'bundle';
66
+ const bundleCommand = isExpo ? 'export:embed' : 'bundle';
67
67
 
68
68
  Array.prototype.push.apply(reactNativeBundleArgs, [
69
69
  cliPath,