@expo/metro-runtime 6.1.0 → 6.1.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metroServerLogs.native.d.ts","sourceRoot":"","sources":["../src/metroServerLogs.native.ts"],"names":[],"mappings":"AASA,wBAAgB,yBAAyB,
|
|
1
|
+
{"version":3,"file":"metroServerLogs.native.d.ts","sourceRoot":"","sources":["../src/metroServerLogs.native.ts"],"names":[],"mappings":"AASA,wBAAgB,yBAAyB,SAmDxC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/metro-runtime",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.1",
|
|
4
4
|
"description": "Tools for making advanced Metro bundler features work",
|
|
5
5
|
"sideEffects": true,
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"react-dom": "19.1.0"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "d44e41c9c0714a838b1652556d27bcb506fabbdf"
|
|
57
57
|
}
|
|
@@ -17,6 +17,16 @@ export function captureStackForServerLogs() {
|
|
|
17
17
|
return HMRClientLogOriginal.apply(HMRClient, [level, data]);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
const preventSymbolication = data.some(
|
|
21
|
+
(item) => hasBooleanKey(item, 'preventSymbolication') && item.preventSymbolication
|
|
22
|
+
);
|
|
23
|
+
if (preventSymbolication) {
|
|
24
|
+
// NOTE(krystofwoldrich): Although a generic flag, it's only used for compilation errors for which symbolication will fail.
|
|
25
|
+
// If the error would be send back to metro it would be printed multiple times, once by Metro and once from here.
|
|
26
|
+
// https://github.com/facebook/react-native/blob/a8bc74c0099252cb1d11ad3b80f3deac71dcc0d5/packages/react-native/Libraries/Utilities/HMRClient.js#L367
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
|
|
20
30
|
const hasErrorLikeStack = data.some((item) => hasStringKey(item, 'stack'));
|
|
21
31
|
const hasComponentStack = data.some(
|
|
22
32
|
(item) =>
|
|
@@ -80,6 +90,15 @@ function hasStringKey(obj: unknown, key: string): obj is { [key: string]: string
|
|
|
80
90
|
);
|
|
81
91
|
}
|
|
82
92
|
|
|
93
|
+
function hasBooleanKey(obj: unknown, key: string): obj is { [key: string]: boolean } {
|
|
94
|
+
return (
|
|
95
|
+
typeof obj === 'object' &&
|
|
96
|
+
obj !== null &&
|
|
97
|
+
key in obj &&
|
|
98
|
+
typeof (obj as Record<string, unknown>)[key] === 'boolean'
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
83
102
|
class NamelessError extends Error {
|
|
84
103
|
name = '';
|
|
85
104
|
}
|