@atlaspack/transformer-js 3.3.8-typescript-d6e6d169c.0 → 3.3.8-typescript-6de04fbae.0

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.
@@ -344,6 +344,7 @@ var _default = exports.default = new (_plugin().Transformer)({
344
344
  shebang,
345
345
  hoist_result,
346
346
  symbol_result,
347
+ is_empty_or_empty_export,
347
348
  needs_esm_helpers,
348
349
  diagnostics,
349
350
  used_env,
@@ -822,6 +823,9 @@ var _default = exports.default = new (_plugin().Transformer)({
822
823
  // (and the asset has side effects), or the asset is wrapped.
823
824
  // This allows accessing symbols that don't exist without errors in symbol propagation.
824
825
  if (hoist_result.has_cjs_exports || !hoist_result.is_esm && asset.sideEffects && deps.size === 0 && Object.keys(hoist_result.exported_symbols).length === 0 || hoist_result.should_wrap && !asset.symbols.hasExportSymbol('*')) {
826
+ if (is_empty_or_empty_export) {
827
+ asset.meta.emptyFileStarReexport = true;
828
+ }
825
829
  asset.symbols.set('*', `$${asset.id}$exports`);
826
830
  }
827
831
  asset.meta.hasCJSExports = hoist_result.has_cjs_exports;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/transformer-js",
3
- "version": "3.3.8-typescript-d6e6d169c.0",
3
+ "version": "3.3.8-typescript-6de04fbae.0",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -22,12 +22,12 @@
22
22
  "src"
23
23
  ],
24
24
  "dependencies": {
25
- "@atlaspack/diagnostic": "2.14.2-typescript-d6e6d169c.0",
26
- "@atlaspack/feature-flags": "2.18.5-typescript-d6e6d169c.0",
27
- "@atlaspack/plugin": "2.14.18-typescript-d6e6d169c.0",
28
- "@atlaspack/rust": "3.4.1-typescript-d6e6d169c.0",
29
- "@atlaspack/utils": "2.16.2-typescript-d6e6d169c.0",
30
- "@atlaspack/workers": "2.14.18-typescript-d6e6d169c.0",
25
+ "@atlaspack/diagnostic": "2.14.2-typescript-6de04fbae.0",
26
+ "@atlaspack/feature-flags": "2.18.5-typescript-6de04fbae.0",
27
+ "@atlaspack/plugin": "2.14.18-typescript-6de04fbae.0",
28
+ "@atlaspack/rust": "3.4.1-typescript-6de04fbae.0",
29
+ "@atlaspack/utils": "2.16.2-typescript-6de04fbae.0",
30
+ "@atlaspack/workers": "2.14.18-typescript-6de04fbae.0",
31
31
  "@parcel/source-map": "^2.1.1",
32
32
  "@swc/helpers": "^0.5.15",
33
33
  "browserslist": "^4.6.6",
@@ -39,5 +39,5 @@
39
39
  "@atlaspack/core": "^2.13.1"
40
40
  },
41
41
  "type": "commonjs",
42
- "gitHead": "d6e6d169cb16a0bbc98d7743646a7097b82c7fe2"
42
+ "gitHead": "6de04fbaeccfba1e7832c737f6318cbd603fc74d"
43
43
  }
@@ -428,6 +428,7 @@ export default (new Transformer({
428
428
  shebang,
429
429
  hoist_result,
430
430
  symbol_result,
431
+ is_empty_or_empty_export,
431
432
  needs_esm_helpers,
432
433
  diagnostics,
433
434
  used_env,
@@ -1004,6 +1005,9 @@ export default (new Transformer({
1004
1005
  Object.keys(hoist_result.exported_symbols).length === 0) ||
1005
1006
  (hoist_result.should_wrap && !asset.symbols.hasExportSymbol('*'))
1006
1007
  ) {
1008
+ if (is_empty_or_empty_export) {
1009
+ asset.meta.emptyFileStarReexport = true;
1010
+ }
1007
1011
  asset.symbols.set('*', `$${asset.id}$exports`);
1008
1012
  }
1009
1013