metro-runtime 0.72.2 → 0.73.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/package.json
CHANGED
package/src/modules/HMRClient.js
CHANGED
package/src/polyfills/require.js
CHANGED
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @polyfill
|
|
8
7
|
*
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall react_native
|
|
10
|
+
* @polyfill
|
|
10
11
|
*/
|
|
11
12
|
"use strict";
|
|
12
13
|
/* eslint-disable no-bitwise */
|
|
@@ -23,7 +24,7 @@ const CYCLE_DETECTED = {};
|
|
|
23
24
|
const { hasOwnProperty } = {};
|
|
24
25
|
|
|
25
26
|
if (__DEV__) {
|
|
26
|
-
global.$RefreshReg$ = () => {};
|
|
27
|
+
global.$RefreshReg$ = () => {};
|
|
27
28
|
|
|
28
29
|
global.$RefreshSig$ = () => (type) => type;
|
|
29
30
|
}
|
|
@@ -436,10 +437,11 @@ function moduleThrewError(id, error) {
|
|
|
436
437
|
}
|
|
437
438
|
|
|
438
439
|
if (__DEV__) {
|
|
440
|
+
// $FlowFixMe[prop-missing]
|
|
439
441
|
metroRequire.Systrace = {
|
|
440
442
|
beginEvent: () => {},
|
|
441
443
|
endEvent: () => {},
|
|
442
|
-
};
|
|
444
|
+
}; // $FlowFixMe[prop-missing]
|
|
443
445
|
|
|
444
446
|
metroRequire.getModules = () => {
|
|
445
447
|
return modules;
|
|
@@ -968,12 +970,14 @@ if (__DEV__) {
|
|
|
968
970
|
// having to make them publicly available.
|
|
969
971
|
var requireSystrace = function requireSystrace() {
|
|
970
972
|
return (
|
|
973
|
+
// $FlowFixMe[prop-missing]
|
|
971
974
|
global[__METRO_GLOBAL_PREFIX__ + "__SYSTRACE"] || metroRequire.Systrace
|
|
972
975
|
);
|
|
973
976
|
};
|
|
974
977
|
|
|
975
978
|
var requireRefresh = function requireRefresh() {
|
|
976
979
|
return (
|
|
980
|
+
// $FlowFixMe[prop-missing]
|
|
977
981
|
global[__METRO_GLOBAL_PREFIX__ + "__ReactRefresh"] || metroRequire.Refresh
|
|
978
982
|
);
|
|
979
983
|
};
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @polyfill
|
|
8
7
|
* @flow
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall react_native
|
|
10
|
+
* @polyfill
|
|
10
11
|
*/
|
|
11
12
|
|
|
12
13
|
'use strict';
|
|
@@ -79,7 +80,6 @@ const {hasOwnProperty} = {};
|
|
|
79
80
|
|
|
80
81
|
if (__DEV__) {
|
|
81
82
|
global.$RefreshReg$ = () => {};
|
|
82
|
-
// $FlowFixMe[missing-local-annot]
|
|
83
83
|
global.$RefreshSig$ = () => type => type;
|
|
84
84
|
}
|
|
85
85
|
|
|
@@ -505,10 +505,12 @@ function moduleThrewError(id: ModuleID, error: any): Error {
|
|
|
505
505
|
}
|
|
506
506
|
|
|
507
507
|
if (__DEV__) {
|
|
508
|
+
// $FlowFixMe[prop-missing]
|
|
508
509
|
metroRequire.Systrace = {
|
|
509
510
|
beginEvent: (): void => {},
|
|
510
511
|
endEvent: (): void => {},
|
|
511
512
|
};
|
|
513
|
+
// $FlowFixMe[prop-missing]
|
|
512
514
|
metroRequire.getModules = (): ModuleList => {
|
|
513
515
|
return modules;
|
|
514
516
|
};
|
|
@@ -993,12 +995,14 @@ if (__DEV__) {
|
|
|
993
995
|
|
|
994
996
|
var requireSystrace = function requireSystrace() {
|
|
995
997
|
return (
|
|
998
|
+
// $FlowFixMe[prop-missing]
|
|
996
999
|
global[__METRO_GLOBAL_PREFIX__ + '__SYSTRACE'] || metroRequire.Systrace
|
|
997
1000
|
);
|
|
998
1001
|
};
|
|
999
1002
|
|
|
1000
1003
|
var requireRefresh = function requireRefresh() {
|
|
1001
1004
|
return (
|
|
1005
|
+
// $FlowFixMe[prop-missing]
|
|
1002
1006
|
global[__METRO_GLOBAL_PREFIX__ + '__ReactRefresh'] || metroRequire.Refresh
|
|
1003
1007
|
);
|
|
1004
1008
|
};
|