@expo/metro-runtime 5.0.2 → 5.0.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/build/index.d.ts +0 -1
- package/build/index.d.ts.map +1 -1
- package/build/location/install.native.d.ts.map +1 -1
- package/package.json +2 -3
- package/src/index.ts +0 -1
- package/src/location/install.native.ts +0 -28
- package/rsc/virtual.js +0 -1
- package/symbolicate/index.d.ts +0 -1
- package/symbolicate/index.js +0 -1
package/build/index.d.ts
CHANGED
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,oBAAoB,CAAC;AAE5B,OAAO,WAAW,CAAC;AAEnB,OAAO,iBAAiB,CAAC;AAEzB,OAAO,iCAAiC,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,oBAAoB,CAAC;AAE5B,OAAO,WAAW,CAAC;AAEnB,OAAO,iBAAiB,CAAC;AAEzB,OAAO,iCAAiC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.native.d.ts","sourceRoot":"","sources":["../../src/location/install.native.ts"],"names":[],"mappings":"AACA,OAAO,4CAA4C,CAAC;AAGpD,OAAO,cAAc,CAAC;AAEtB,OAAO,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"install.native.d.ts","sourceRoot":"","sources":["../../src/location/install.native.ts"],"names":[],"mappings":"AACA,OAAO,4CAA4C,CAAC;AAGpD,OAAO,cAAc,CAAC;AAEtB,OAAO,MAAM,CAAC;AA4Cd,QAAA,MAAM,cAAc,eAAqD,CAAC;AAE1E,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,QAAQ,GAAG;IAAE,CAAC,cAAc,CAAC,CAAC,EAAE,OAAO,CAAA;CAAE;uBAAT,OAAO;EAmBzF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/metro-runtime",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.4",
|
|
4
4
|
"description": "Tools for making advanced Metro bundler features work",
|
|
5
5
|
"sideEffects": true,
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
"build",
|
|
14
14
|
"src",
|
|
15
15
|
"rsc",
|
|
16
|
-
"symbolicate",
|
|
17
16
|
"async-require.js",
|
|
18
17
|
"async-require.d.ts",
|
|
19
18
|
"error-overlay.js",
|
|
@@ -37,5 +36,5 @@
|
|
|
37
36
|
"peerDependencies": {
|
|
38
37
|
"react-native": "*"
|
|
39
38
|
},
|
|
40
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "45bd8a319fb2d6abadac8dcb0c821a55a1f0caa3"
|
|
41
40
|
}
|
package/src/index.ts
CHANGED
|
@@ -8,7 +8,6 @@ import 'expo';
|
|
|
8
8
|
// This file configures the runtime environment to increase compatibility with WinterCG.
|
|
9
9
|
// https://wintercg.org/
|
|
10
10
|
import Constants from 'expo-constants';
|
|
11
|
-
import { polyfillGlobal as installGlobal } from 'react-native/Libraries/Utilities/PolyfillFunctions';
|
|
12
11
|
|
|
13
12
|
import { install, setLocationHref } from './Location';
|
|
14
13
|
import getDevServer from '../getDevServer';
|
|
@@ -72,33 +71,6 @@ export function wrapFetchWithWindowLocation(fetch: Function & { [polyfillSymbol]
|
|
|
72
71
|
return _fetch;
|
|
73
72
|
}
|
|
74
73
|
|
|
75
|
-
// Add a well-known shared symbol that doesn't show up in iteration or inspection
|
|
76
|
-
// this can be used to detect if the global object abides by the Expo team's documented
|
|
77
|
-
// built-in requirements.
|
|
78
|
-
const BUILTIN_SYMBOL = Symbol.for('expo.builtin');
|
|
79
|
-
|
|
80
|
-
function addBuiltinSymbol(obj: object) {
|
|
81
|
-
Object.defineProperty(obj, BUILTIN_SYMBOL, {
|
|
82
|
-
value: true,
|
|
83
|
-
enumerable: false,
|
|
84
|
-
configurable: false,
|
|
85
|
-
});
|
|
86
|
-
return obj;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
function installBuiltin(name: string, getValue: () => any) {
|
|
90
|
-
installGlobal(name, () => addBuiltinSymbol(getValue()));
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
try {
|
|
94
|
-
require('web-streams-polyfill');
|
|
95
|
-
// NOTE: Fetch is polyfilled in expo/metro-runtime
|
|
96
|
-
installBuiltin(
|
|
97
|
-
'ReadableStream',
|
|
98
|
-
() => require('web-streams-polyfill/ponyfill/es6').ReadableStream
|
|
99
|
-
);
|
|
100
|
-
} catch {}
|
|
101
|
-
|
|
102
74
|
const extra = manifest?.extra as ExpoExtraRouterConfig | null;
|
|
103
75
|
if (extra?.router?.origin !== false) {
|
|
104
76
|
// Polyfill window.location in native runtimes.
|
package/rsc/virtual.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// The contents of this file are added in Metro.
|
package/symbolicate/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../build/symbolicate";
|
package/symbolicate/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../src/symbolicate';
|