@atlaspack/transformer-js 3.2.3-canary.150 → 3.2.3-canary.151

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.
@@ -137,6 +137,9 @@ const CONFIG_SCHEMA = {
137
137
  }
138
138
  }]
139
139
  },
140
+ addReactDisplayName: {
141
+ type: 'boolean'
142
+ },
140
143
  magicComments: {
141
144
  type: 'boolean'
142
145
  },
@@ -238,8 +241,9 @@ var _default = exports.default = new (_plugin().Transformer)({
238
241
  let inlineFS = !ignoreFS;
239
242
  let inlineConstants = false;
240
243
  let magicComments = false;
244
+ let addReactDisplayName = false;
241
245
  if (conf && conf.contents) {
242
- var _conf$contents, _conf$contents2, _conf$contents3, _conf$contents4;
246
+ var _conf$contents, _conf$contents2, _conf$contents3, _conf$contents4, _conf$contents5;
243
247
  _utils().validateSchema.diagnostic(CONFIG_SCHEMA, {
244
248
  data: conf.contents,
245
249
  // FIXME
@@ -249,16 +253,18 @@ var _default = exports.default = new (_plugin().Transformer)({
249
253
  },
250
254
  // FIXME
251
255
  '@atlaspack/transformer-js', 'Invalid config for @atlaspack/transformer-js');
252
-
256
+ addReactDisplayName =
257
+ // @ts-expect-error TS2339
258
+ ((_conf$contents = conf.contents) === null || _conf$contents === void 0 ? void 0 : _conf$contents.addReactDisplayName) ?? addReactDisplayName;
253
259
  // @ts-expect-error TS2339
254
- magicComments = ((_conf$contents = conf.contents) === null || _conf$contents === void 0 ? void 0 : _conf$contents.magicComments) ?? magicComments;
260
+ magicComments = ((_conf$contents2 = conf.contents) === null || _conf$contents2 === void 0 ? void 0 : _conf$contents2.magicComments) ?? magicComments;
255
261
  // @ts-expect-error TS2339
256
- inlineEnvironment = ((_conf$contents2 = conf.contents) === null || _conf$contents2 === void 0 ? void 0 : _conf$contents2.inlineEnvironment) ?? inlineEnvironment;
262
+ inlineEnvironment = ((_conf$contents3 = conf.contents) === null || _conf$contents3 === void 0 ? void 0 : _conf$contents3.inlineEnvironment) ?? inlineEnvironment;
257
263
  // @ts-expect-error TS2339
258
- inlineFS = ((_conf$contents3 = conf.contents) === null || _conf$contents3 === void 0 ? void 0 : _conf$contents3.inlineFS) ?? inlineFS;
264
+ inlineFS = ((_conf$contents4 = conf.contents) === null || _conf$contents4 === void 0 ? void 0 : _conf$contents4.inlineFS) ?? inlineFS;
259
265
  inlineConstants =
260
266
  // @ts-expect-error TS2339
261
- ((_conf$contents4 = conf.contents) === null || _conf$contents4 === void 0 ? void 0 : _conf$contents4.unstable_inlineConstants) ?? inlineConstants;
267
+ ((_conf$contents5 = conf.contents) === null || _conf$contents5 === void 0 ? void 0 : _conf$contents5.unstable_inlineConstants) ?? inlineConstants;
262
268
  }
263
269
  return {
264
270
  isJSX,
@@ -269,6 +275,7 @@ var _default = exports.default = new (_plugin().Transformer)({
269
275
  inlineEnvironment,
270
276
  inlineFS,
271
277
  inlineConstants,
278
+ addReactDisplayName,
272
279
  reactRefresh,
273
280
  decorators,
274
281
  useDefineForClassFields,
@@ -421,6 +428,7 @@ var _default = exports.default = new (_plugin().Transformer)({
421
428
  conditional_bundling: options.featureFlags.conditionalBundlingApi,
422
429
  hmr_improvements: options.featureFlags.hmrImprovements,
423
430
  computed_properties_fix: options.featureFlags.unusedComputedPropertyFix,
431
+ add_display_name: Boolean(config.addReactDisplayName),
424
432
  magic_comments: Boolean(config === null || config === void 0 ? void 0 : config.magicComments) || (0, _featureFlags().getFeatureFlag)('supportWebpackChunkName'),
425
433
  callMacro: asset.isSource ? async (err, src, exportName, args, loc) => {
426
434
  let mod;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/transformer-js",
3
- "version": "3.2.3-canary.150+f1b48e7a0",
3
+ "version": "3.2.3-canary.151+ad26146f1",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -24,12 +24,12 @@
24
24
  "src"
25
25
  ],
26
26
  "dependencies": {
27
- "@atlaspack/diagnostic": "2.14.1-canary.218+f1b48e7a0",
28
- "@atlaspack/feature-flags": "2.14.1-canary.218+f1b48e7a0",
29
- "@atlaspack/plugin": "2.14.5-canary.150+f1b48e7a0",
30
- "@atlaspack/rust": "3.2.1-canary.150+f1b48e7a0",
31
- "@atlaspack/utils": "2.14.5-canary.150+f1b48e7a0",
32
- "@atlaspack/workers": "2.14.5-canary.150+f1b48e7a0",
27
+ "@atlaspack/diagnostic": "2.14.1-canary.219+ad26146f1",
28
+ "@atlaspack/feature-flags": "2.14.1-canary.219+ad26146f1",
29
+ "@atlaspack/plugin": "2.14.5-canary.151+ad26146f1",
30
+ "@atlaspack/rust": "3.2.1-canary.151+ad26146f1",
31
+ "@atlaspack/utils": "2.14.5-canary.151+ad26146f1",
32
+ "@atlaspack/workers": "2.14.5-canary.151+ad26146f1",
33
33
  "@parcel/source-map": "^2.1.1",
34
34
  "@swc/helpers": "^0.5.15",
35
35
  "browserslist": "^4.6.6",
@@ -41,5 +41,5 @@
41
41
  "@atlaspack/core": "^2.13.1"
42
42
  },
43
43
  "type": "commonjs",
44
- "gitHead": "f1b48e7a04e005cef0f36a3e692087a9ecdb6f7a"
44
+ "gitHead": "ad26146f13b4c1cc65d4a0f9c67060b90ef14ff3"
45
45
  }
@@ -108,6 +108,9 @@ const CONFIG_SCHEMA: SchemaEntity = {
108
108
  },
109
109
  ],
110
110
  },
111
+ addReactDisplayName: {
112
+ type: 'boolean',
113
+ },
111
114
  magicComments: {
112
115
  type: 'boolean',
113
116
  },
@@ -298,6 +301,7 @@ export default new Transformer({
298
301
  let inlineFS = !ignoreFS;
299
302
  let inlineConstants = false;
300
303
  let magicComments = false;
304
+ let addReactDisplayName = false;
301
305
 
302
306
  if (conf && conf.contents) {
303
307
  validateSchema.diagnostic(
@@ -314,6 +318,9 @@ export default new Transformer({
314
318
  'Invalid config for @atlaspack/transformer-js',
315
319
  );
316
320
 
321
+ addReactDisplayName =
322
+ // @ts-expect-error TS2339
323
+ conf.contents?.addReactDisplayName ?? addReactDisplayName;
317
324
  // @ts-expect-error TS2339
318
325
  magicComments = conf.contents?.magicComments ?? magicComments;
319
326
  // @ts-expect-error TS2339
@@ -334,6 +341,7 @@ export default new Transformer({
334
341
  inlineEnvironment,
335
342
  inlineFS,
336
343
  inlineConstants,
344
+ addReactDisplayName,
337
345
  reactRefresh,
338
346
  decorators,
339
347
  useDefineForClassFields,
@@ -510,6 +518,7 @@ export default new Transformer({
510
518
  conditional_bundling: options.featureFlags.conditionalBundlingApi,
511
519
  hmr_improvements: options.featureFlags.hmrImprovements,
512
520
  computed_properties_fix: options.featureFlags.unusedComputedPropertyFix,
521
+ add_display_name: Boolean(config.addReactDisplayName),
513
522
  magic_comments:
514
523
  Boolean(config?.magicComments) ||
515
524
  getFeatureFlag('supportWebpackChunkName'),