@expo/log-box 55.0.6 → 55.0.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/log-box",
3
- "version": "55.0.6",
3
+ "version": "55.0.8",
4
4
  "main": "app/index.ts",
5
5
  "scripts": {
6
6
  "start": "expo start",
@@ -30,7 +30,7 @@
30
30
  "glob": "^13.0.0",
31
31
  "npm-run-all2": "^8.0.4",
32
32
  "react": "19.2.0",
33
- "react-native": "0.83.1",
33
+ "react-native": "0.83.4",
34
34
  "rimraf": "^6.1.2",
35
35
  "typescript": "~5.9.2",
36
36
  "typescript-plugin-css-modules": "^5.2.0"
@@ -45,5 +45,5 @@
45
45
  "author": "Expo",
46
46
  "homepage": "https://github.com/expo/expo/tree/main/packages/@expo/log-box",
47
47
  "description": "Error overlay for universal Expo apps.",
48
- "gitHead": "cd3638bb85f9560392acfd5160a266cf97880b3b"
48
+ "gitHead": "f63217deac00dcd278f75d9846933c11e5c6f9a3"
49
49
  }
@@ -1,18 +1,6 @@
1
- export type FetchTextAsync = (
2
- input: string,
3
- init?: {
4
- method?: string;
5
- body?: string;
6
- }
7
- ) => Promise<string>;
1
+ export type FetchTextAsync = (input: string, init?: RequestInit) => Promise<string>;
8
2
 
9
- function defaultFetchTextAsync(
10
- input: string,
11
- init?: {
12
- method?: string;
13
- body?: string;
14
- }
15
- ): Promise<string> {
3
+ function defaultFetchTextAsync(input: string, init?: RequestInit): Promise<string> {
16
4
  return fetch(input, init).then((res) => res.text());
17
5
  }
18
6
 
@@ -22,9 +10,6 @@ export function setFetchText(fn: FetchTextAsync) {
22
10
  fetchTextAsyncFn = fn;
23
11
  }
24
12
 
25
- export function fetchTextAsync(
26
- input: string,
27
- init?: { method?: string; body?: string }
28
- ): Promise<string> {
13
+ export function fetchTextAsync(input: string, init?: RequestInit): Promise<string> {
29
14
  return fetchTextAsyncFn(input, init);
30
15
  }
@@ -27,7 +27,7 @@ export function getBaseUrl() {
27
27
  return window.location.protocol + '//' + window.location.host;
28
28
  }
29
29
 
30
- function fetchTextAsyncWithBase(url: string, init?: { method?: string; body?: string }) {
30
+ function fetchTextAsyncWithBase(url: string, init?: RequestInit) {
31
31
  const fullUrl = new URL(url, getBaseUrl()).href;
32
32
  return fetchTextAsync(fullUrl, init);
33
33
  }
@@ -35,6 +35,9 @@ function fetchTextAsyncWithBase(url: string, init?: { method?: string; body?: st
35
35
  export function openFileInEditor(file: string, lineNumber: number): void {
36
36
  fetchTextAsyncWithBase('/open-stack-frame', {
37
37
  method: 'POST',
38
+ headers: {
39
+ 'Content-Type': 'application/json',
40
+ },
38
41
  body: JSON.stringify({ file, lineNumber }),
39
42
  });
40
43
  }
@@ -54,6 +57,9 @@ export async function fetchProjectMetadataAsync(): Promise<{
54
57
  async function symbolicateStackTrace(stack: MetroStackFrame[]): Promise<SymbolicatedStackTrace> {
55
58
  const response = await fetchTextAsyncWithBase('/symbolicate', {
56
59
  method: 'POST',
60
+ headers: {
61
+ 'Content-Type': 'application/json',
62
+ },
57
63
  body: JSON.stringify({ stack }),
58
64
  });
59
65
  return JSON.parse(response);