metro-transform-worker 0.76.2 → 0.76.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "metro-transform-worker",
3
- "version": "0.76.2",
3
+ "version": "0.76.4",
4
4
  "description": "🚇 Transform worker for Metro.",
5
5
  "main": "src/index.js",
6
6
  "repository": {
@@ -18,18 +18,18 @@
18
18
  "@babel/parser": "^7.20.0",
19
19
  "@babel/types": "^7.20.0",
20
20
  "babel-preset-fbjs": "^3.4.0",
21
- "metro": "0.76.2",
22
- "metro-babel-transformer": "0.76.2",
23
- "metro-cache": "0.76.2",
24
- "metro-cache-key": "0.76.2",
25
- "metro-source-map": "0.76.2",
26
- "metro-transform-plugins": "0.76.2",
21
+ "metro": "0.76.4",
22
+ "metro-babel-transformer": "0.76.4",
23
+ "metro-cache": "0.76.4",
24
+ "metro-cache-key": "0.76.4",
25
+ "metro-source-map": "0.76.4",
26
+ "metro-transform-plugins": "0.76.4",
27
27
  "nullthrows": "^1.1.1"
28
28
  },
29
29
  "devDependencies": {
30
- "metro-memory-fs": "0.76.2",
31
- "metro-minify-terser": "0.76.2",
32
- "metro-react-native-babel-transformer": "0.76.2"
30
+ "metro-memory-fs": "0.76.4",
31
+ "metro-minify-terser": "0.76.4",
32
+ "metro-react-native-babel-transformer": "0.76.4"
33
33
  },
34
34
  "engines": {
35
35
  "node": ">=16"
package/src/index.js CHANGED
@@ -60,8 +60,11 @@ const minifyCode = async (
60
60
  code,
61
61
  source,
62
62
  map,
63
+ // functionMap is overridden by the serializer
63
64
  functionMap: null,
64
65
  path: filename,
66
+ // isIgnored is overriden by the serializer
67
+ isIgnored: false,
65
68
  },
66
69
  ]).toMap(undefined, {});
67
70
  const minify = getMinifier(config.minifierPath);
@@ -151,7 +154,7 @@ async function transformJS(file, { config, options, projectRoot }) {
151
154
  babelrc: false,
152
155
  code: false,
153
156
  configFile: false,
154
- comments: false,
157
+ comments: true,
155
158
  filename: file.filename,
156
159
  plugins,
157
160
  sourceMaps: false,
@@ -173,7 +176,7 @@ async function transformJS(file, { config, options, projectRoot }) {
173
176
  babelrc: false,
174
177
  code: false,
175
178
  configFile: false,
176
- comments: false,
179
+ comments: true,
177
180
  filename: file.filename,
178
181
  plugins: [
179
182
  [metroTransformPlugins.constantFoldingPlugin, babelPluginOpts],
@@ -256,7 +259,7 @@ async function transformJS(file, { config, options, projectRoot }) {
256
259
  const result = generate(
257
260
  wrappedAst,
258
261
  {
259
- comments: false,
262
+ comments: true,
260
263
  compact: config.unstable_compactOutput,
261
264
  filename: file.filename,
262
265
  retainLines: false,
package/src/index.js.flow CHANGED
@@ -195,7 +195,16 @@ const minifyCode = async (
195
195
  ...
196
196
  }> => {
197
197
  const sourceMap = fromRawMappings([
198
- {code, source, map, functionMap: null, path: filename},
198
+ {
199
+ code,
200
+ source,
201
+ map,
202
+ // functionMap is overridden by the serializer
203
+ functionMap: null,
204
+ path: filename,
205
+ // isIgnored is overriden by the serializer
206
+ isIgnored: false,
207
+ },
199
208
  ]).toMap(undefined, {});
200
209
 
201
210
  const minify = getMinifier(config.minifierPath);
@@ -299,7 +308,7 @@ async function transformJS(
299
308
  babelrc: false,
300
309
  code: false,
301
310
  configFile: false,
302
- comments: false,
311
+ comments: true,
303
312
  filename: file.filename,
304
313
  plugins,
305
314
  sourceMaps: false,
@@ -322,7 +331,7 @@ async function transformJS(
322
331
  babelrc: false,
323
332
  code: false,
324
333
  configFile: false,
325
- comments: false,
334
+ comments: true,
326
335
  filename: file.filename,
327
336
  plugins: [
328
337
  [metroTransformPlugins.constantFoldingPlugin, babelPluginOpts],
@@ -407,7 +416,7 @@ async function transformJS(
407
416
  const result = generate(
408
417
  wrappedAst,
409
418
  {
410
- comments: false,
419
+ comments: true,
411
420
  compact: config.unstable_compactOutput,
412
421
  filename: file.filename,
413
422
  retainLines: false,