@atlaspack/transformer-js 3.2.3-canary.245 → 3.2.3-canary.247

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.
@@ -242,6 +242,7 @@ var _default = exports.default = new (_plugin().Transformer)({
242
242
  let inlineConstants = false;
243
243
  let magicComments = false;
244
244
  let addReactDisplayName = false;
245
+ let enableGlobalThisAliaser = Boolean(options.env.NATIVE_GLOBAL_THIS_ALIASER);
245
246
  if (conf && conf.contents) {
246
247
  var _conf$contents, _conf$contents2, _conf$contents3, _conf$contents4, _conf$contents5;
247
248
  _utils().validateSchema.diagnostic(CONFIG_SCHEMA, {
@@ -279,7 +280,8 @@ var _default = exports.default = new (_plugin().Transformer)({
279
280
  reactRefresh,
280
281
  decorators,
281
282
  useDefineForClassFields,
282
- magicComments
283
+ magicComments,
284
+ enableGlobalThisAliaser
283
285
  };
284
286
  },
285
287
  async transform({
@@ -430,6 +432,7 @@ var _default = exports.default = new (_plugin().Transformer)({
430
432
  add_display_name: Boolean(config.addReactDisplayName),
431
433
  exports_rebinding_optimisation: options.featureFlags.exportsRebindingOptimisation,
432
434
  magic_comments: Boolean(config === null || config === void 0 ? void 0 : config.magicComments) || (0, _featureFlags().getFeatureFlag)('supportWebpackChunkName'),
435
+ enable_global_this_aliaser: Boolean(config.enableGlobalThisAliaser),
433
436
  callMacro: asset.isSource ? async (err, src, exportName, args, loc) => {
434
437
  let mod;
435
438
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/transformer-js",
3
- "version": "3.2.3-canary.245+a77c6d278",
3
+ "version": "3.2.3-canary.247+02f6aa190",
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.313+a77c6d278",
28
- "@atlaspack/feature-flags": "2.14.1-canary.313+a77c6d278",
29
- "@atlaspack/plugin": "2.14.5-canary.245+a77c6d278",
30
- "@atlaspack/rust": "3.2.1-canary.245+a77c6d278",
31
- "@atlaspack/utils": "2.14.5-canary.245+a77c6d278",
32
- "@atlaspack/workers": "2.14.5-canary.245+a77c6d278",
27
+ "@atlaspack/diagnostic": "2.14.1-canary.315+02f6aa190",
28
+ "@atlaspack/feature-flags": "2.14.1-canary.315+02f6aa190",
29
+ "@atlaspack/plugin": "2.14.5-canary.247+02f6aa190",
30
+ "@atlaspack/rust": "3.2.1-canary.247+02f6aa190",
31
+ "@atlaspack/utils": "2.14.5-canary.247+02f6aa190",
32
+ "@atlaspack/workers": "2.14.5-canary.247+02f6aa190",
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.26.0"
42
42
  },
43
43
  "type": "commonjs",
44
- "gitHead": "a77c6d278127493cc665bda2acc09dc8c70e6364"
44
+ "gitHead": "02f6aa1906953fc184d2b49c905c2ef815cb878d"
45
45
  }
@@ -303,6 +303,10 @@ export default new Transformer({
303
303
  let magicComments = false;
304
304
  let addReactDisplayName = false;
305
305
 
306
+ let enableGlobalThisAliaser = Boolean(
307
+ options.env.NATIVE_GLOBAL_THIS_ALIASER,
308
+ );
309
+
306
310
  if (conf && conf.contents) {
307
311
  validateSchema.diagnostic(
308
312
  CONFIG_SCHEMA,
@@ -346,6 +350,7 @@ export default new Transformer({
346
350
  decorators,
347
351
  useDefineForClassFields,
348
352
  magicComments,
353
+ enableGlobalThisAliaser,
349
354
  };
350
355
  },
351
356
  async transform({asset, config, options, logger}) {
@@ -524,6 +529,7 @@ export default new Transformer({
524
529
  magic_comments:
525
530
  Boolean(config?.magicComments) ||
526
531
  getFeatureFlag('supportWebpackChunkName'),
532
+ enable_global_this_aliaser: Boolean(config.enableGlobalThisAliaser),
527
533
  callMacro: asset.isSource
528
534
  ? async (err: any, src: any, exportName: any, args: any, loc: any) => {
529
535
  let mod;