expo-dev-launcher 2.1.2 → 2.1.4
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
|
+
## 2.1.4 — 2023-02-28
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- Fixed dev client crash when server URL has no scheme. ([#21274](https://github.com/expo/expo/pull/21274) by [@gabrieldonadel](https://github.com/gabrieldonadel))
|
|
18
|
+
- Fixed dev client not showing logged user and initial data. ([#21425](https://github.com/expo/expo/pull/21425) by [@gabrieldonadel](https://github.com/gabrieldonadel))
|
|
19
|
+
|
|
20
|
+
## 2.1.3 — 2023-02-25
|
|
21
|
+
|
|
22
|
+
_This version does not introduce any user-facing changes._
|
|
23
|
+
|
|
13
24
|
## 2.1.2 — 2023-02-17
|
|
14
25
|
|
|
15
26
|
_This version does not introduce any user-facing changes._
|
package/android/build.gradle
CHANGED
package/bundle/App.tsx
CHANGED
|
@@ -26,8 +26,8 @@ type LauncherAppProps = object;
|
|
|
26
26
|
|
|
27
27
|
export function App(props: LauncherAppProps) {
|
|
28
28
|
return (
|
|
29
|
-
<
|
|
30
|
-
<
|
|
29
|
+
<View style={{ direction: 'ltr', flex: 1 }}>
|
|
30
|
+
<LoadInitialData loader={<Splash />}>
|
|
31
31
|
<AppProviders>
|
|
32
32
|
<Stack.Navigator
|
|
33
33
|
initialRouteName="Main"
|
|
@@ -44,8 +44,8 @@ export function App(props: LauncherAppProps) {
|
|
|
44
44
|
<Stack.Screen name="Crash Report" component={CrashReportScreen} />
|
|
45
45
|
</Stack.Navigator>
|
|
46
46
|
</AppProviders>
|
|
47
|
-
</
|
|
48
|
-
</
|
|
47
|
+
</LoadInitialData>
|
|
48
|
+
</View>
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -65,11 +65,11 @@ public class EXDevLauncherURLHelper: NSObject {
|
|
|
65
65
|
|
|
66
66
|
@objc
|
|
67
67
|
public static func replaceEXPScheme(_ url: URL, to scheme: String) -> URL {
|
|
68
|
-
var components = URLComponents
|
|
69
|
-
if components
|
|
70
|
-
components
|
|
68
|
+
var components = URLComponents(url: url, resolvingAgainstBaseURL: false)
|
|
69
|
+
if components?.scheme == "exp" {
|
|
70
|
+
components?.scheme = scheme
|
|
71
71
|
}
|
|
72
|
-
return components
|
|
72
|
+
return components?.url ?? url
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
@objc
|
|
@@ -5,9 +5,9 @@ import XCTest
|
|
|
5
5
|
@testable import EXDevLauncher
|
|
6
6
|
|
|
7
7
|
class EXDevLauncherURLHelperTests: XCTestCase {
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
let encodedUrlString = "http%3A%2F%2Flocalhost%3A8081"
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
func testIsDevLauncherURL() {
|
|
12
12
|
let defaultUrl = "scheme://expo-development-client"
|
|
13
13
|
XCTAssertTrue(EXDevLauncherURLHelper.isDevLauncherURL(URL(string: defaultUrl)))
|
|
@@ -22,28 +22,32 @@ class EXDevLauncherURLHelperTests: XCTestCase {
|
|
|
22
22
|
|
|
23
23
|
let actual2 = EXDevLauncherURLHelper.replaceEXPScheme(URL(string: "http://expo-development-client/?url=http%3A%2F%2Flocalhost%3A8081")!, to: "scheme")
|
|
24
24
|
XCTAssertEqual(URL(string: "http://expo-development-client/?url=http%3A%2F%2Flocalhost%3A8081"), actual2)
|
|
25
|
+
|
|
26
|
+
// should not crash if provided URL does not include scheme
|
|
27
|
+
let actual3 = EXDevLauncherURLHelper.replaceEXPScheme(URL(string: "192.168.0.12:19000")!, to: "scheme")
|
|
28
|
+
XCTAssertEqual(URL(string: "192.168.0.12:19000"), actual3)
|
|
25
29
|
}
|
|
26
|
-
|
|
30
|
+
|
|
27
31
|
func testDevLauncherUrls() {
|
|
28
32
|
// dev-client scheme with valid url param -> loadApp with specified url param
|
|
29
33
|
expectDevLauncherUrlToEqual(input:"scheme://expo-development-client/?url=http%3A%2F%2Flocalhost%3A8081%2Findex.bundle%3Fplatform%3Dios%26dev%3Dtrue",
|
|
30
34
|
expected:"http://localhost:8081/index.bundle?platform=ios&dev=true")
|
|
31
|
-
|
|
35
|
+
|
|
32
36
|
// non-dev-client scheme with valid url param -> defer loading to loaded app
|
|
33
37
|
expectDevLauncherUrlToEqual(input: "scheme://not-dev-client/?url=\(encodedUrlString)",
|
|
34
38
|
expected: "scheme://not-dev-client/?url=\(encodedUrlString)")
|
|
35
39
|
|
|
36
40
|
}
|
|
37
|
-
|
|
41
|
+
|
|
38
42
|
func testDevLauncherUrlQueryParams() {
|
|
39
43
|
let url = "scheme://expo-development-client/?url=http%3A%2F%2Flocalhost%3A8081&updateMessage=123"
|
|
40
44
|
let devLauncherUrl = EXDevLauncherUrl(URL(string:url)!)
|
|
41
45
|
let queryParams = devLauncherUrl.queryParams
|
|
42
|
-
|
|
46
|
+
|
|
43
47
|
XCTAssertEqual(queryParams["updateMessage"], "123")
|
|
44
48
|
XCTAssertEqual(queryParams["url"], "http://localhost:8081")
|
|
45
49
|
}
|
|
46
|
-
|
|
50
|
+
|
|
47
51
|
// HELPER
|
|
48
52
|
func expectDevLauncherUrlToEqual(input: String, expected: String) {
|
|
49
53
|
let devLauncherUrl = EXDevLauncherUrl(URL(string:input)!)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-dev-launcher",
|
|
3
3
|
"title": "Expo Development Launcher",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.4",
|
|
5
5
|
"description": "Pre-release version of the Expo development launcher package for testing.",
|
|
6
6
|
"main": "build/DevLauncher.js",
|
|
7
7
|
"types": "build/DevLauncher.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"homepage": "https://docs.expo.dev",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"expo-dev-menu": "2.1.
|
|
32
|
+
"expo-dev-menu": "2.1.3",
|
|
33
33
|
"resolve-from": "^5.0.0",
|
|
34
34
|
"semver": "^7.3.5"
|
|
35
35
|
},
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"./setupTests.ts"
|
|
64
64
|
]
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "8174f5855f6a2abe0cc7dc0063b559cf635774c2"
|
|
67
67
|
}
|