@atlaspack/transformer-js 3.2.3-canary.305 → 3.2.3-canary.306

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.
@@ -255,6 +255,9 @@ var _default = exports.default = new (_plugin().Transformer)({
255
255
  let globalAliasingConfig = options.env.NATIVE_GLOBAL_ALIASING && JSON.parse(options.env.NATIVE_GLOBAL_ALIASING);
256
256
  let enableLazyLoading = options.env.NATIVE_LAZY_LOADING === 'true';
257
257
  let enableReactHooksRemoval = options.env.NATIVE_REACT_HOOKS_REMOVAL === 'true';
258
+ let enableReactAsyncImportLift = options.env.NATIVE_REACT_ASYNC_IMPORT_LIFT === 'true';
259
+ let reactAsyncLiftByDefault = options.env.REACT_ASYNC_IMPORT_LIFTING_BY_DEFAULT === 'true';
260
+ let reactAsyncLiftReportLevel = options.env.REACT_ASYNC_LIFT_REPORT_LEVEL || 'none';
258
261
  let enableStaticPrevaluation = options.env.NATIVE_PREVALUATION === 'true';
259
262
  let enableDeadReturnsRemoval = options.env.NATIVE_DEAD_RETURNS_REMOVAL === 'true';
260
263
  let enableUnusedBindingsRemoval = options.env.NATIVE_UNUSED_BINDINGS_REMOVAL === 'true';
@@ -328,7 +331,10 @@ var _default = exports.default = new (_plugin().Transformer)({
328
331
  enableUnusedBindingsRemoval,
329
332
  enableStaticPrevaluation,
330
333
  enableReactHooksRemoval,
331
- syncDynamicImportConfig
334
+ syncDynamicImportConfig,
335
+ enableReactAsyncImportLift,
336
+ reactAsyncLiftByDefault,
337
+ reactAsyncLiftReportLevel
332
338
  };
333
339
  },
334
340
  async transform({
@@ -480,7 +486,6 @@ var _default = exports.default = new (_plugin().Transformer)({
480
486
  exports_rebinding_optimisation: options.featureFlags.exportsRebindingOptimisation,
481
487
  magic_comments: Boolean(config === null || config === void 0 ? void 0 : config.magicComments) || (0, _featureFlags().getFeatureFlag)('supportWebpackChunkName'),
482
488
  is_source: asset.isSource,
483
- sync_dynamic_import_config: config.syncDynamicImportConfig,
484
489
  nested_promise_import_fix: options.featureFlags.nestedPromiseImportFix,
485
490
  global_aliasing_config: config.globalAliasingConfig,
486
491
  enable_ssr_typeof_replacement: Boolean(config.enableSsrTypeofReplacement),
@@ -489,6 +494,10 @@ var _default = exports.default = new (_plugin().Transformer)({
489
494
  enable_unused_bindings_removal: Boolean(config.enableUnusedBindingsRemoval),
490
495
  enable_static_prevaluation: Boolean(config.enableStaticPrevaluation),
491
496
  enable_react_hooks_removal: Boolean(config.enableReactHooksRemoval),
497
+ enable_react_async_import_lift: Boolean(config.enableReactAsyncImportLift),
498
+ react_async_lift_by_default: Boolean(config.reactAsyncLiftByDefault),
499
+ react_async_lift_report_level: String(config.reactAsyncLiftReportLevel),
500
+ sync_dynamic_import_config: config.syncDynamicImportConfig,
492
501
  callMacro: asset.isSource ? async (err, src, exportName, args, loc) => {
493
502
  let mod;
494
503
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/transformer-js",
3
- "version": "3.2.3-canary.305+96f1d7f3e",
3
+ "version": "3.2.3-canary.306+308e7ff97",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -24,14 +24,14 @@
24
24
  "src"
25
25
  ],
26
26
  "dependencies": {
27
- "@atlaspack/build-cache": "2.13.3-canary.373+96f1d7f3e",
28
- "@atlaspack/diagnostic": "2.14.1-canary.373+96f1d7f3e",
29
- "@atlaspack/feature-flags": "2.14.1-canary.373+96f1d7f3e",
30
- "@atlaspack/plugin": "2.14.5-canary.305+96f1d7f3e",
31
- "@atlaspack/rust": "3.2.1-canary.305+96f1d7f3e",
32
- "@atlaspack/source-map": "3.1.2-canary.4084+96f1d7f3e",
33
- "@atlaspack/utils": "2.14.5-canary.305+96f1d7f3e",
34
- "@atlaspack/workers": "2.14.5-canary.305+96f1d7f3e",
27
+ "@atlaspack/build-cache": "2.13.3-canary.374+308e7ff97",
28
+ "@atlaspack/diagnostic": "2.14.1-canary.374+308e7ff97",
29
+ "@atlaspack/feature-flags": "2.14.1-canary.374+308e7ff97",
30
+ "@atlaspack/plugin": "2.14.5-canary.306+308e7ff97",
31
+ "@atlaspack/rust": "3.2.1-canary.306+308e7ff97",
32
+ "@atlaspack/source-map": "3.1.2-canary.4085+308e7ff97",
33
+ "@atlaspack/utils": "2.14.5-canary.306+308e7ff97",
34
+ "@atlaspack/workers": "2.14.5-canary.306+308e7ff97",
35
35
  "@swc/helpers": "^0.5.15",
36
36
  "browserslist": "^4.6.6",
37
37
  "nullthrows": "^1.1.1",
@@ -42,5 +42,5 @@
42
42
  "@atlaspack/core": "2.29.0"
43
43
  },
44
44
  "type": "commonjs",
45
- "gitHead": "96f1d7f3efef12ce4f5966e34d00b299fcefb4dd"
45
+ "gitHead": "308e7ff979c05c1ae97fe6b08a65666b53d86cc7"
46
46
  }
@@ -313,6 +313,12 @@ export default new Transformer({
313
313
  let enableLazyLoading = options.env.NATIVE_LAZY_LOADING === 'true';
314
314
  let enableReactHooksRemoval =
315
315
  options.env.NATIVE_REACT_HOOKS_REMOVAL === 'true';
316
+ let enableReactAsyncImportLift =
317
+ options.env.NATIVE_REACT_ASYNC_IMPORT_LIFT === 'true';
318
+ let reactAsyncLiftByDefault =
319
+ options.env.REACT_ASYNC_IMPORT_LIFTING_BY_DEFAULT === 'true';
320
+ let reactAsyncLiftReportLevel =
321
+ options.env.REACT_ASYNC_LIFT_REPORT_LEVEL || 'none';
316
322
  let enableStaticPrevaluation = options.env.NATIVE_PREVALUATION === 'true';
317
323
  let enableDeadReturnsRemoval =
318
324
  options.env.NATIVE_DEAD_RETURNS_REMOVAL === 'true';
@@ -410,6 +416,9 @@ export default new Transformer({
410
416
  enableStaticPrevaluation,
411
417
  enableReactHooksRemoval,
412
418
  syncDynamicImportConfig,
419
+ enableReactAsyncImportLift,
420
+ reactAsyncLiftByDefault,
421
+ reactAsyncLiftReportLevel,
413
422
  };
414
423
  },
415
424
  async transform({asset, config, options, logger}) {
@@ -589,7 +598,6 @@ export default new Transformer({
589
598
  Boolean(config?.magicComments) ||
590
599
  getFeatureFlag('supportWebpackChunkName'),
591
600
  is_source: asset.isSource,
592
- sync_dynamic_import_config: config.syncDynamicImportConfig,
593
601
  nested_promise_import_fix: options.featureFlags.nestedPromiseImportFix,
594
602
  global_aliasing_config: config.globalAliasingConfig,
595
603
  enable_ssr_typeof_replacement: Boolean(config.enableSsrTypeofReplacement),
@@ -600,6 +608,12 @@ export default new Transformer({
600
608
  ),
601
609
  enable_static_prevaluation: Boolean(config.enableStaticPrevaluation),
602
610
  enable_react_hooks_removal: Boolean(config.enableReactHooksRemoval),
611
+ enable_react_async_import_lift: Boolean(
612
+ config.enableReactAsyncImportLift,
613
+ ),
614
+ react_async_lift_by_default: Boolean(config.reactAsyncLiftByDefault),
615
+ react_async_lift_report_level: String(config.reactAsyncLiftReportLevel),
616
+ sync_dynamic_import_config: config.syncDynamicImportConfig,
603
617
  callMacro: asset.isSource
604
618
  ? async (err: any, src: any, exportName: any, args: any, loc: any) => {
605
619
  let mod;