metro-transform-worker 0.77.0 → 0.78.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 +10 -11
- package/src/index.js +3 -8
- package/src/index.js.flow +3 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "metro-transform-worker",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.78.1",
|
|
4
4
|
"description": "🚇 Transform worker for Metro.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -17,19 +17,18 @@
|
|
|
17
17
|
"@babel/generator": "^7.20.0",
|
|
18
18
|
"@babel/parser": "^7.20.0",
|
|
19
19
|
"@babel/types": "^7.20.0",
|
|
20
|
-
"
|
|
21
|
-
"metro": "0.
|
|
22
|
-
"metro-
|
|
23
|
-
"metro-cache": "0.
|
|
24
|
-
"metro-
|
|
25
|
-
"metro-
|
|
26
|
-
"metro-transform-plugins": "0.77.0",
|
|
20
|
+
"metro": "0.78.1",
|
|
21
|
+
"metro-babel-transformer": "0.78.1",
|
|
22
|
+
"metro-cache": "0.78.1",
|
|
23
|
+
"metro-cache-key": "0.78.1",
|
|
24
|
+
"metro-source-map": "0.78.1",
|
|
25
|
+
"metro-transform-plugins": "0.78.1",
|
|
27
26
|
"nullthrows": "^1.1.1"
|
|
28
27
|
},
|
|
29
28
|
"devDependencies": {
|
|
30
|
-
"metro-memory-fs": "0.
|
|
31
|
-
"metro-minify-terser": "0.
|
|
32
|
-
"
|
|
29
|
+
"metro-memory-fs": "0.78.1",
|
|
30
|
+
"metro-minify-terser": "0.78.1",
|
|
31
|
+
"@react-native/metro-babel-transformer": "0.73.11"
|
|
33
32
|
},
|
|
34
33
|
"engines": {
|
|
35
34
|
"node": ">=18"
|
package/src/index.js
CHANGED
|
@@ -140,8 +140,7 @@ async function transformJS(file, { config, options, projectRoot }) {
|
|
|
140
140
|
}
|
|
141
141
|
if (options.inlineRequires) {
|
|
142
142
|
plugins.push([
|
|
143
|
-
|
|
144
|
-
require("babel-preset-fbjs/plugins/inline-requires"),
|
|
143
|
+
metroTransformPlugins.inlineRequiresPlugin,
|
|
145
144
|
{
|
|
146
145
|
...babelPluginOpts,
|
|
147
146
|
ignoredRequires: options.nonInlinedRequires,
|
|
@@ -393,19 +392,15 @@ function getBabelTransformArgs(
|
|
|
393
392
|
{ options, config, projectRoot },
|
|
394
393
|
plugins = []
|
|
395
394
|
) {
|
|
395
|
+
const { inlineRequires: _, ...babelTransformerOptions } = options;
|
|
396
396
|
return {
|
|
397
397
|
filename: file.filename,
|
|
398
398
|
options: {
|
|
399
|
-
...
|
|
399
|
+
...babelTransformerOptions,
|
|
400
400
|
enableBabelRCLookup: config.enableBabelRCLookup,
|
|
401
401
|
enableBabelRuntime: config.enableBabelRuntime,
|
|
402
402
|
globalPrefix: config.globalPrefix,
|
|
403
403
|
hermesParser: config.hermesParser,
|
|
404
|
-
// Inline requires are now performed at a secondary step. We cannot
|
|
405
|
-
// unfortunately remove it from the internal transformer, since this one
|
|
406
|
-
// is used by other tooling, and this would affect it.
|
|
407
|
-
inlineRequires: false,
|
|
408
|
-
nonInlinedRequires: [],
|
|
409
404
|
projectRoot,
|
|
410
405
|
publicPath: config.publicPath,
|
|
411
406
|
},
|
package/src/index.js.flow
CHANGED
|
@@ -292,8 +292,7 @@ async function transformJS(
|
|
|
292
292
|
|
|
293
293
|
if (options.inlineRequires) {
|
|
294
294
|
plugins.push([
|
|
295
|
-
|
|
296
|
-
require('babel-preset-fbjs/plugins/inline-requires'),
|
|
295
|
+
metroTransformPlugins.inlineRequiresPlugin,
|
|
297
296
|
{
|
|
298
297
|
...babelPluginOpts,
|
|
299
298
|
ignoredRequires: options.nonInlinedRequires,
|
|
@@ -571,19 +570,15 @@ function getBabelTransformArgs(
|
|
|
571
570
|
{options, config, projectRoot}: TransformationContext,
|
|
572
571
|
plugins?: Plugins = [],
|
|
573
572
|
): BabelTransformerArgs {
|
|
573
|
+
const {inlineRequires: _, ...babelTransformerOptions} = options;
|
|
574
574
|
return {
|
|
575
575
|
filename: file.filename,
|
|
576
576
|
options: {
|
|
577
|
-
...
|
|
577
|
+
...babelTransformerOptions,
|
|
578
578
|
enableBabelRCLookup: config.enableBabelRCLookup,
|
|
579
579
|
enableBabelRuntime: config.enableBabelRuntime,
|
|
580
580
|
globalPrefix: config.globalPrefix,
|
|
581
581
|
hermesParser: config.hermesParser,
|
|
582
|
-
// Inline requires are now performed at a secondary step. We cannot
|
|
583
|
-
// unfortunately remove it from the internal transformer, since this one
|
|
584
|
-
// is used by other tooling, and this would affect it.
|
|
585
|
-
inlineRequires: false,
|
|
586
|
-
nonInlinedRequires: [],
|
|
587
582
|
projectRoot,
|
|
588
583
|
publicPath: config.publicPath,
|
|
589
584
|
},
|