metro 0.79.0 → 0.80.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 +19 -19
- package/src/Bundler/util.js.flow +1 -1
- package/src/Bundler.js.flow +1 -1
- package/src/DeltaBundler/Graph.js +5 -2
- package/src/DeltaBundler/Graph.js.flow +6 -3
- package/src/DeltaBundler/Serializers/getRamBundleInfo.js.flow +1 -1
- package/src/DeltaBundler/Serializers/helpers/processModules.js.flow +1 -1
- package/src/DeltaBundler/Transformer.js.flow +1 -1
- package/src/DeltaBundler/Worker.js.flow +1 -1
- package/src/IncrementalBundler/GraphNotFoundError.js.flow +1 -1
- package/src/IncrementalBundler/ResourceNotFoundError.js.flow +1 -1
- package/src/IncrementalBundler/RevisionNotFoundError.js.flow +1 -1
- package/src/ModuleGraph/worker/JsFileWrapping.js.flow +1 -1
- package/src/ModuleGraph/worker/generateImportNames.js.flow +1 -1
- package/src/index.js.flow +1 -1
- package/src/integration_tests/basic_bundle/TestBigInt.js.flow +1 -1
- package/src/lib/logToConsole.js.flow +1 -1
- package/src/lib/parseOptionsFromUrl.js +2 -1
- package/src/lib/parseOptionsFromUrl.js.flow +2 -1
- package/src/lib/reporting.js.flow +1 -1
- package/src/node-haste/Module.js.flow +1 -1
- package/src/shared/output/bundle.js.flow +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "metro",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.80.0",
|
|
4
4
|
"description": "🚇 The JavaScript bundler for React Native.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": "src/cli.js",
|
|
@@ -28,25 +28,25 @@
|
|
|
28
28
|
"denodeify": "^1.2.1",
|
|
29
29
|
"error-stack-parser": "^2.0.6",
|
|
30
30
|
"graceful-fs": "^4.2.4",
|
|
31
|
-
"hermes-parser": "0.
|
|
31
|
+
"hermes-parser": "0.17.0",
|
|
32
32
|
"image-size": "^1.0.2",
|
|
33
33
|
"invariant": "^2.2.4",
|
|
34
|
-
"jest-worker": "^
|
|
34
|
+
"jest-worker": "^29.6.3",
|
|
35
35
|
"jsc-safe-url": "^0.2.2",
|
|
36
36
|
"lodash.throttle": "^4.1.1",
|
|
37
|
-
"metro-babel-transformer": "0.
|
|
38
|
-
"metro-cache": "0.
|
|
39
|
-
"metro-cache-key": "0.
|
|
40
|
-
"metro-config": "0.
|
|
41
|
-
"metro-core": "0.
|
|
42
|
-
"metro-file-map": "0.
|
|
43
|
-
"metro-minify-terser": "0.
|
|
44
|
-
"metro-resolver": "0.
|
|
45
|
-
"metro-runtime": "0.
|
|
46
|
-
"metro-source-map": "0.
|
|
47
|
-
"metro-symbolicate": "0.
|
|
48
|
-
"metro-transform-plugins": "0.
|
|
49
|
-
"metro-transform-worker": "0.
|
|
37
|
+
"metro-babel-transformer": "0.80.0",
|
|
38
|
+
"metro-cache": "0.80.0",
|
|
39
|
+
"metro-cache-key": "0.80.0",
|
|
40
|
+
"metro-config": "0.80.0",
|
|
41
|
+
"metro-core": "0.80.0",
|
|
42
|
+
"metro-file-map": "0.80.0",
|
|
43
|
+
"metro-minify-terser": "0.80.0",
|
|
44
|
+
"metro-resolver": "0.80.0",
|
|
45
|
+
"metro-runtime": "0.80.0",
|
|
46
|
+
"metro-source-map": "0.80.0",
|
|
47
|
+
"metro-symbolicate": "0.80.0",
|
|
48
|
+
"metro-transform-plugins": "0.80.0",
|
|
49
|
+
"metro-transform-worker": "0.80.0",
|
|
50
50
|
"mime-types": "^2.1.27",
|
|
51
51
|
"node-fetch": "^2.2.0",
|
|
52
52
|
"nullthrows": "^1.1.1",
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
"@react-native/metro-babel-transformer": "0.73.11",
|
|
66
66
|
"babel-jest": "^29.6.3",
|
|
67
67
|
"dedent": "^0.7.0",
|
|
68
|
-
"jest-snapshot": "^
|
|
68
|
+
"jest-snapshot": "^29.6.3",
|
|
69
69
|
"jest-snapshot-serializer-raw": "^1.2.0",
|
|
70
|
-
"metro-babel-register": "0.
|
|
71
|
-
"metro-memory-fs": "0.
|
|
70
|
+
"metro-babel-register": "0.80.0",
|
|
71
|
+
"metro-memory-fs": "0.80.0",
|
|
72
72
|
"mock-req": "^0.2.0",
|
|
73
73
|
"mock-res": "^0.6.0",
|
|
74
74
|
"stack-trace": "^0.0.10"
|
package/src/Bundler/util.js.flow
CHANGED
package/src/Bundler.js.flow
CHANGED
|
@@ -394,14 +394,17 @@ class Graph {
|
|
|
394
394
|
// Weak dependencies are excluded from the bundle.
|
|
395
395
|
return;
|
|
396
396
|
}
|
|
397
|
+
const module = this.dependencies.get(absolutePath);
|
|
397
398
|
if (options.lazy && dependency.data.data.asyncType != null) {
|
|
398
399
|
this._decrementImportBundleReference(dependency, parentModule);
|
|
400
|
+
} else if (module) {
|
|
401
|
+
// Decrement inverseDependencies only if the dependency is not async,
|
|
402
|
+
// mirroring the increment conditions in _addDependency.
|
|
403
|
+
module.inverseDependencies.delete(parentModule.path);
|
|
399
404
|
}
|
|
400
|
-
const module = this.dependencies.get(absolutePath);
|
|
401
405
|
if (!module) {
|
|
402
406
|
return;
|
|
403
407
|
}
|
|
404
|
-
module.inverseDependencies.delete(parentModule.path);
|
|
405
408
|
if (
|
|
406
409
|
module.inverseDependencies.size > 0 ||
|
|
407
410
|
this.entryPoints.has(absolutePath)
|
|
@@ -485,16 +485,19 @@ export class Graph<T = MixedOutput> {
|
|
|
485
485
|
return;
|
|
486
486
|
}
|
|
487
487
|
|
|
488
|
+
const module = this.dependencies.get(absolutePath);
|
|
489
|
+
|
|
488
490
|
if (options.lazy && dependency.data.data.asyncType != null) {
|
|
489
491
|
this._decrementImportBundleReference(dependency, parentModule);
|
|
492
|
+
} else if (module) {
|
|
493
|
+
// Decrement inverseDependencies only if the dependency is not async,
|
|
494
|
+
// mirroring the increment conditions in _addDependency.
|
|
495
|
+
module.inverseDependencies.delete(parentModule.path);
|
|
490
496
|
}
|
|
491
497
|
|
|
492
|
-
const module = this.dependencies.get(absolutePath);
|
|
493
|
-
|
|
494
498
|
if (!module) {
|
|
495
499
|
return;
|
|
496
500
|
}
|
|
497
|
-
module.inverseDependencies.delete(parentModule.path);
|
|
498
501
|
if (
|
|
499
502
|
module.inverseDependencies.size > 0 ||
|
|
500
503
|
this.entryPoints.has(absolutePath)
|
package/src/index.js.flow
CHANGED
|
@@ -59,8 +59,9 @@ module.exports = function parseOptionsFromUrl(normalizedRequestUrl, platforms) {
|
|
|
59
59
|
// protocol is blob:http. This breaks loading source maps through
|
|
60
60
|
// protocol-relative URLs, which is why we must force the HTTP protocol
|
|
61
61
|
// when loading the bundle for either Android or iOS.
|
|
62
|
+
// TODO(T167298674): Remove when remote debugging is not needed in React Native
|
|
62
63
|
protocol:
|
|
63
|
-
platform != null && platform.match(/^(android|ios)$/) ? "http" : "",
|
|
64
|
+
platform != null && platform.match(/^(android|ios|vr)$/) ? "http" : "",
|
|
64
65
|
pathname: pathname.replace(/\.(bundle|delta)$/, ".map"),
|
|
65
66
|
}),
|
|
66
67
|
sourceUrl: jscSafeUrl.toJscSafeUrl(normalizedRequestUrl),
|
|
@@ -74,8 +74,9 @@ module.exports = function parseOptionsFromUrl(
|
|
|
74
74
|
// protocol is blob:http. This breaks loading source maps through
|
|
75
75
|
// protocol-relative URLs, which is why we must force the HTTP protocol
|
|
76
76
|
// when loading the bundle for either Android or iOS.
|
|
77
|
+
// TODO(T167298674): Remove when remote debugging is not needed in React Native
|
|
77
78
|
protocol:
|
|
78
|
-
platform != null && platform.match(/^(android|ios)$/) ? 'http' : '',
|
|
79
|
+
platform != null && platform.match(/^(android|ios|vr)$/) ? 'http' : '',
|
|
79
80
|
pathname: pathname.replace(/\.(bundle|delta)$/, '.map'),
|
|
80
81
|
}),
|
|
81
82
|
sourceUrl: jscSafeUrl.toJscSafeUrl(normalizedRequestUrl),
|