metro 0.80.0 → 0.80.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "metro",
3
- "version": "0.80.0",
3
+ "version": "0.80.1",
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.17.0",
31
+ "hermes-parser": "0.17.1",
32
32
  "image-size": "^1.0.2",
33
33
  "invariant": "^2.2.4",
34
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.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",
37
+ "metro-babel-transformer": "0.80.1",
38
+ "metro-cache": "0.80.1",
39
+ "metro-cache-key": "0.80.1",
40
+ "metro-config": "0.80.1",
41
+ "metro-core": "0.80.1",
42
+ "metro-file-map": "0.80.1",
43
+ "metro-minify-terser": "0.80.1",
44
+ "metro-resolver": "0.80.1",
45
+ "metro-runtime": "0.80.1",
46
+ "metro-source-map": "0.80.1",
47
+ "metro-symbolicate": "0.80.1",
48
+ "metro-transform-plugins": "0.80.1",
49
+ "metro-transform-worker": "0.80.1",
50
50
  "mime-types": "^2.1.27",
51
51
  "node-fetch": "^2.2.0",
52
52
  "nullthrows": "^1.1.1",
@@ -67,8 +67,8 @@
67
67
  "dedent": "^0.7.0",
68
68
  "jest-snapshot": "^29.6.3",
69
69
  "jest-snapshot-serializer-raw": "^1.2.0",
70
- "metro-babel-register": "0.80.0",
71
- "metro-memory-fs": "0.80.0",
70
+ "metro-babel-register": "0.80.1",
71
+ "metro-memory-fs": "0.80.1",
72
72
  "mock-req": "^0.2.0",
73
73
  "mock-res": "^0.6.0",
74
74
  "stack-trace": "^0.0.10"
@@ -35,6 +35,7 @@ class Transformer {
35
35
  getTransformOptions: _getTransformOptions,
36
36
  transformVariants: _transformVariants,
37
37
  workerPath: _workerPath,
38
+ unstable_workerThreads: _workerThreads,
38
39
  ...transformerConfig
39
40
  } = this._config.transformer;
40
41
  const transformerOptions = {
@@ -44,6 +44,7 @@ class Transformer {
44
44
  getTransformOptions: _getTransformOptions,
45
45
  transformVariants: _transformVariants,
46
46
  workerPath: _workerPath,
47
+ unstable_workerThreads: _workerThreads,
47
48
  ...transformerConfig
48
49
  } = this._config.transformer;
49
50
 
@@ -83,6 +83,7 @@ class WorkerFarm {
83
83
  this._computeWorkerKey
84
84
  : undefined,
85
85
  exposedMethods,
86
+ enableWorkerThreads: this._config.transformer.unstable_workerThreads,
86
87
  forkOptions: {
87
88
  env,
88
89
  },
@@ -125,6 +125,7 @@ class WorkerFarm {
125
125
  this._computeWorkerKey
126
126
  : undefined,
127
127
  exposedMethods,
128
+ enableWorkerThreads: this._config.transformer.unstable_workerThreads,
128
129
  forkOptions: {env},
129
130
  numWorkers,
130
131
  });
@@ -61,7 +61,9 @@ module.exports = function parseOptionsFromUrl(normalizedRequestUrl, platforms) {
61
61
  // when loading the bundle for either Android or iOS.
62
62
  // TODO(T167298674): Remove when remote debugging is not needed in React Native
63
63
  protocol:
64
- platform != null && platform.match(/^(android|ios|vr)$/) ? "http" : "",
64
+ platform != null && platform.match(/^(android|ios|vr|windows|macos)$/)
65
+ ? "http"
66
+ : "",
65
67
  pathname: pathname.replace(/\.(bundle|delta)$/, ".map"),
66
68
  }),
67
69
  sourceUrl: jscSafeUrl.toJscSafeUrl(normalizedRequestUrl),
@@ -76,7 +76,9 @@ module.exports = function parseOptionsFromUrl(
76
76
  // when loading the bundle for either Android or iOS.
77
77
  // TODO(T167298674): Remove when remote debugging is not needed in React Native
78
78
  protocol:
79
- platform != null && platform.match(/^(android|ios|vr)$/) ? 'http' : '',
79
+ platform != null && platform.match(/^(android|ios|vr|windows|macos)$/)
80
+ ? 'http'
81
+ : '',
80
82
  pathname: pathname.replace(/\.(bundle|delta)$/, '.map'),
81
83
  }),
82
84
  sourceUrl: jscSafeUrl.toJscSafeUrl(normalizedRequestUrl),
@@ -18,7 +18,13 @@ var _isAssetFile = _interopRequireDefault(
18
18
  function _interopRequireDefault(obj) {
19
19
  return obj && obj.__esModule ? obj : { default: obj };
20
20
  }
21
- const baseIgnoredInlineRequires = ["React", "react", "react-native"];
21
+ const baseIgnoredInlineRequires = [
22
+ "React",
23
+ "react",
24
+ "react/jsx-dev-runtime",
25
+ "react/jsx-runtime",
26
+ "react-native",
27
+ ];
22
28
  async function calcTransformerOptions(
23
29
  entryFiles,
24
30
  bundler,
@@ -35,7 +35,13 @@ type TransformOptionsWithRawInlines = {
35
35
  +inlineRequires: InlineRequiresRaw,
36
36
  };
37
37
 
38
- const baseIgnoredInlineRequires = ['React', 'react', 'react-native'];
38
+ const baseIgnoredInlineRequires = [
39
+ 'React',
40
+ 'react',
41
+ 'react/jsx-dev-runtime',
42
+ 'react/jsx-runtime',
43
+ 'react-native',
44
+ ];
39
45
 
40
46
  async function calcTransformerOptions(
41
47
  entryFiles: $ReadOnlyArray<string>,
@@ -110,6 +110,7 @@ function createFileMap(config, options) {
110
110
  dependencyExtractor: config.resolver.dependencyExtractor,
111
111
  enableHastePackages: config?.resolver.enableGlobalPackages,
112
112
  enableSymlinks: config.resolver.unstable_enableSymlinks,
113
+ enableWorkerThreads: config.watcher.unstable_workerThreads,
113
114
  extensions: Array.from(
114
115
  new Set([
115
116
  ...config.resolver.sourceExts,
@@ -84,6 +84,7 @@ function createFileMap(
84
84
  dependencyExtractor: config.resolver.dependencyExtractor,
85
85
  enableHastePackages: config?.resolver.enableGlobalPackages,
86
86
  enableSymlinks: config.resolver.unstable_enableSymlinks,
87
+ enableWorkerThreads: config.watcher.unstable_workerThreads,
87
88
  extensions: Array.from(
88
89
  new Set([
89
90
  ...config.resolver.sourceExts,