expo-dev-menu 4.1.0 β†’ 4.2.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/CHANGELOG.md CHANGED
@@ -10,6 +10,17 @@
10
10
 
11
11
  ### πŸ’‘ Others
12
12
 
13
+ ## 4.2.0 β€” 2023-09-15
14
+
15
+ ### πŸŽ‰ New features
16
+
17
+ - Add `control+d` as a hotkey to open the menu. ([#24434](https://github.com/expo/expo/pull/24434) by [@alanjhughes](https://github.com/alanjhughes))
18
+ - Separate `refresh` button from the rest ([#24426](https://github.com/expo/expo/pull/24426) by [@kadikraman](https://github.com/kadikraman))
19
+
20
+ ### πŸ› Bug fixes
21
+
22
+ - Fixed task ':expo-dev-menu:packageReleaseAssets' uses this output of task ':expo-dev-menu:copyAssets' without declaring an explicit or implicit dependency on Android. ([#24393](https://github.com/expo/expo/pull/24393) by [@lukmccall](https://github.com/lukmccall))
23
+
13
24
  ## 4.1.0 β€” 2023-09-04
14
25
 
15
26
  ### πŸŽ‰ New features
@@ -19,6 +30,7 @@
19
30
  ### πŸ’‘ Others
20
31
 
21
32
  - Migrate to Expo CLI. ([#23806](https://github.com/expo/expo/pull/23806) by [@EvanBacon](https://github.com/EvanBacon))
33
+ - Use dedicated `requireOptionalNativeModule` instead of try-catching `requireNativeModule`. ([#24262](https://github.com/expo/expo/pull/24262) by [@tsapeta](https://github.com/tsapeta))
22
34
 
23
35
  ## 4.0.0 β€” 2023-08-02
24
36
 
package/README.md CHANGED
@@ -10,7 +10,9 @@ You can find more information in the [Expo documentation](https://docs.expo.dev/
10
10
 
11
11
  The `expo-dev-menu` repository consists of two different parts, the exported package, which includes the native functions, located in the `android`, `ios` and `src` folders and the Dev Menu interface, located under the `app` folder.
12
12
 
13
- Local development is usually done through `bare-expo`.
13
+ Local development is usually done through [`bare-expo`](/apps/bare-expo).
14
+
15
+ First, make sure to `yarn` and `yarn start` in `expo-dev-menu` which will add the port for the dev menu packager to [`dev-menu-packager-host`](./assets/dev-menu-packager-host`). This is bundled into the native code in `bare-expo` so need to be done first.
14
16
 
15
17
  To use `dev-client` when running `bare-expo` on Android, open [MainApplication.java](/apps/bare-expo/android/app/src/main/java/dev/expo/payments/MainApplication.java) and set the `USE_DEV_CLIENT` value to `true`.
16
18
 
@@ -26,6 +28,8 @@ To use `dev-client` when running `bare-expo` on iOS, open [AppDelegate.mm](/apps
26
28
  + BOOL useDevClient = YES;
27
29
  ```
28
30
 
31
+ Then build the native apps with `npx pod-install && yarn ios` or `yarn android`.
32
+
29
33
  ### Making JavaScript changes inside the `app` folder
30
34
 
31
35
  To update the JavaScript code inside the `app` folder, you need to run the `dev-menu` bundler locally.
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '4.1.0'
6
+ version = '4.2.0'
7
7
 
8
8
  buildscript {
9
9
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
@@ -70,7 +70,7 @@ android {
70
70
  minSdkVersion safeExtGet("minSdkVersion", 21)
71
71
  targetSdkVersion safeExtGet("targetSdkVersion", 33)
72
72
  versionCode 10
73
- versionName '4.1.0'
73
+ versionName '4.2.0'
74
74
  }
75
75
  lintOptions {
76
76
  abortOnError false
@@ -112,11 +112,20 @@ android {
112
112
  }
113
113
  }
114
114
 
115
+ task clenupAssets(type: Delete) {
116
+ // In the past, assets were placed in the `main` directory.
117
+ // However, this is no longer the case. To ensure a smooth transition,
118
+ // we’re also removing assets from the old location.
119
+ delete files("src/main/assets")
120
+ }
121
+
115
122
  task copyAssets(type: Copy) {
123
+ dependsOn(clenupAssets)
124
+
116
125
  from('../assets') {
117
126
  exclude "*.ios.*"
118
127
  }
119
- into 'src/main/assets'
128
+ into 'src/debug/assets'
120
129
  }
121
130
 
122
131
  project.afterEvaluate {
@@ -23,12 +23,12 @@ import * as React from 'react';
23
23
  import { Platform, ScrollView, Switch } from 'react-native';
24
24
  import semver from 'semver';
25
25
 
26
+ import { Onboarding } from './Onboarding';
26
27
  import { useAppInfo } from '../hooks/useAppInfo';
27
28
  import { useClipboard } from '../hooks/useClipboard';
28
29
  import { useDevSettings } from '../hooks/useDevSettings';
29
30
  import { isDevLauncherInstalled } from '../native-modules/DevLauncher';
30
31
  import { hideMenu, fireCallbackAsync } from '../native-modules/DevMenu';
31
- import { Onboarding } from './Onboarding';
32
32
 
33
33
  type MainProps = {
34
34
  registeredCallbacks?: string[];
@@ -135,47 +135,29 @@ export function Main({ registeredCallbacks = [], isDevice }: MainProps) {
135
135
  <Text color="secondary">Connected to:</Text>
136
136
 
137
137
  <Spacer.Vertical size="small" />
138
-
139
- <Row align="center">
140
- <StatusIndicator style={{ width: 10, height: 10 }} status="success" />
141
- <Spacer.Horizontal size="small" />
142
- <View flex="1">
143
- <Text type="mono" numberOfLines={2} size="small">
144
- {appInfo.hostUrl}
145
- </Text>
146
- </View>
147
- <Spacer.Horizontal size="small" />
148
- </Row>
138
+ <Button.FadeOnPressContainer
139
+ bg="default"
140
+ onPress={onCopyUrlPress}
141
+ testID="main.copyUrlButton">
142
+ <Row align="center">
143
+ <StatusIndicator style={{ width: 10, height: 10 }} status="success" />
144
+ <Spacer.Horizontal size="small" />
145
+ <Row flex="1" justify="between">
146
+ <Text type="mono" numberOfLines={2} size="small">
147
+ {appInfo.hostUrl}
148
+ </Text>
149
+
150
+ <ClipboardIcon />
151
+ </Row>
152
+ <Spacer.Horizontal size="small" />
153
+ </Row>
154
+ </Button.FadeOnPressContainer>
149
155
  </View>
150
156
 
151
157
  <Divider />
152
158
  </>
153
159
  )}
154
160
 
155
- <Row padding="small">
156
- {isDevLauncherInstalled && (
157
- <View flex="1">
158
- <ActionButton
159
- icon={<HomeFilledIcon />}
160
- label="Go home"
161
- onPress={actions.navigateToLauncher}
162
- />
163
- </View>
164
- )}
165
-
166
- <Spacer.Horizontal size="medium" />
167
-
168
- <View flex="1">
169
- <ActionButton icon={<ClipboardIcon />} label="Copy link" onPress={onCopyUrlPress} />
170
- </View>
171
-
172
- <Spacer.Horizontal size="medium" />
173
-
174
- <View flex="1">
175
- <ActionButton icon={<RefreshIcon />} label="Reload" onPress={actions.reload} />
176
- </View>
177
- </Row>
178
-
179
161
  {registeredCallbacks.length > 0 && (
180
162
  <View>
181
163
  <View mx="large">
@@ -210,8 +192,28 @@ export function Main({ registeredCallbacks = [], isDevice }: MainProps) {
210
192
  </View>
211
193
  )}
212
194
 
195
+ <View margin="small">
196
+ <View
197
+ {...(isDevLauncherInstalled ? { roundedTop: 'large' } : { rounded: 'large' })}
198
+ bg="default">
199
+ <SettingsRowButton label="Reload" icon={<RefreshIcon />} onPress={actions.reload} />
200
+ </View>
201
+ {isDevLauncherInstalled && (
202
+ <>
203
+ <Divider />
204
+ <View roundedBottom="large" bg="default">
205
+ <SettingsRowButton
206
+ label="Go home"
207
+ icon={<HomeFilledIcon />}
208
+ onPress={actions.navigateToLauncher}
209
+ />
210
+ </View>
211
+ </>
212
+ )}
213
+ </View>
214
+
213
215
  <View mx="small">
214
- <View roundedTop="large" bg="default">
216
+ <View bg="default" roundedTop="large">
215
217
  <SettingsRowButton
216
218
  disabled={!devSettings.isPerfMonitorAvailable}
217
219
  label="Toggle performance monitor"
@@ -367,28 +369,6 @@ export function Main({ registeredCallbacks = [], isDevice }: MainProps) {
367
369
  );
368
370
  }
369
371
 
370
- type ActionButtonProps = {
371
- icon: React.ReactElement<any>;
372
- label: string;
373
- onPress: () => void;
374
- };
375
-
376
- function ActionButton({ icon, label, onPress }: ActionButtonProps) {
377
- return (
378
- <Button.FadeOnPressContainer bg="default" onPress={onPress}>
379
- <View padding="small" rounded="large" bg="default">
380
- <View align="centered">{icon}</View>
381
-
382
- <Spacer.Vertical size="tiny" />
383
-
384
- <Text size="small" align="center">
385
- {label}
386
- </Text>
387
- </View>
388
- </Button.FadeOnPressContainer>
389
- );
390
- }
391
-
392
372
  type SettingsRowButtonProps = {
393
373
  icon: React.ReactElement<any>;
394
374
  label: string;
@@ -12,7 +12,7 @@ const deviceMessage = Platform.select({
12
12
  const simulatorMessage = Platform.select({
13
13
  ios: (
14
14
  <Text size="medium">
15
- You can open it at any time with the <Text weight="bold">{'\u2318 + d '}</Text> keyboard
15
+ You can open it at any time with the <Text weight="bold">{'\u2303 + d '}</Text> keyboard
16
16
  shortcut{' '}
17
17
  <Text color="secondary" size="medium">
18
18
  ("Connect Hardware Keyboard" must be enabled on your simulator to use this shortcut, you can