react-native-update-cli 1.34.2 → 1.35.0

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
@@ -86,37 +86,31 @@ async function runReactNativeBundleCommand(bundleName, development, entryFile, o
86
86
  }
87
87
  _fsextra.emptyDirSync(outputFolder);
88
88
  let cliPath;
89
- try {
90
- // rn >= 0.75
91
- cliPath = require.resolve('@react-native-community/cli/build/bin.js', {
92
- paths: [
93
- process.cwd()
94
- ]
95
- });
96
- } catch (e) {
97
- // rn < 0.75
98
- cliPath = require.resolve('react-native/local-cli/cli.js', {
99
- paths: [
100
- process.cwd()
101
- ]
102
- });
103
- }
104
89
  let usingExpo = false;
105
90
  try {
106
- require.resolve('expo-router', {
107
- paths: [
108
- process.cwd()
109
- ]
110
- });
111
- console.log(`expo-router detected, will use @expo/cli to bundle.\n`);
112
- // if using expo-router, use expo-cli
113
91
  cliPath = require.resolve('@expo/cli', {
114
92
  paths: [
115
93
  process.cwd()
116
94
  ]
117
95
  });
118
96
  usingExpo = true;
119
- } catch (e) {}
97
+ } catch (e) {
98
+ try {
99
+ // rn >= 0.75
100
+ cliPath = require.resolve('@react-native-community/cli/build/bin.js', {
101
+ paths: [
102
+ process.cwd()
103
+ ]
104
+ });
105
+ } catch (e) {
106
+ // rn < 0.75
107
+ cliPath = require.resolve('react-native/local-cli/cli.js', {
108
+ paths: [
109
+ process.cwd()
110
+ ]
111
+ });
112
+ }
113
+ }
120
114
  const bundleCommand = usingExpo ? 'export:embed' : 'bundle';
121
115
  Array.prototype.push.apply(reactNativeBundleArgs, [
122
116
  cliPath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-update-cli",
3
- "version": "1.34.2",
3
+ "version": "1.35.0",
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
@@ -53,31 +53,25 @@ async function runReactNativeBundleCommand(
53
53
 
54
54
  let cliPath;
55
55
 
56
- try {
57
- // rn >= 0.75
58
- cliPath = require.resolve('@react-native-community/cli/build/bin.js', {
59
- paths: [process.cwd()],
60
- });
61
- } catch (e) {
62
- // rn < 0.75
63
- cliPath = require.resolve('react-native/local-cli/cli.js', {
64
- paths: [process.cwd()],
65
- });
66
- }
67
-
68
56
  let usingExpo = false;
69
57
  try {
70
- require.resolve('expo-router', {
71
- paths: [process.cwd()],
72
- });
73
-
74
- console.log(`expo-router detected, will use @expo/cli to bundle.\n`);
75
- // if using expo-router, use expo-cli
76
58
  cliPath = require.resolve('@expo/cli', {
77
59
  paths: [process.cwd()],
78
60
  });
79
61
  usingExpo = true;
80
- } catch (e) {}
62
+ } catch (e) {
63
+ try {
64
+ // rn >= 0.75
65
+ cliPath = require.resolve('@react-native-community/cli/build/bin.js', {
66
+ paths: [process.cwd()],
67
+ });
68
+ } catch (e) {
69
+ // rn < 0.75
70
+ cliPath = require.resolve('react-native/local-cli/cli.js', {
71
+ paths: [process.cwd()],
72
+ });
73
+ }
74
+ }
81
75
  const bundleCommand = usingExpo ? 'export:embed' : 'bundle';
82
76
 
83
77
  Array.prototype.push.apply(reactNativeBundleArgs, [