@atlaspack/reporter-conditional-manifest 2.14.1-dev.16 → 2.14.1-dev.27

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.
@@ -30,17 +30,18 @@ async function report({
30
30
  // Replace bundles with file paths
31
31
  const mapBundles = bundles => bundles.map(bundle => (0, _path().relative)(bundle.target.distDir, bundle.filePath));
32
32
  const manifest = {};
33
- for (const [bundle, conditions] of bundles.entries()) {
33
+ for (const conditions of bundles.values()) {
34
34
  const bundleInfo = {};
35
35
  for (const [key, cond] of conditions) {
36
+ const bundle = cond.bundle;
36
37
  bundleInfo[key] = {
37
38
  // Reverse bundles so we load children bundles first
38
39
  ifTrueBundles: mapBundles(cond.ifTrueBundles).reverse(),
39
40
  ifFalseBundles: mapBundles(cond.ifFalseBundles).reverse()
40
41
  };
42
+ manifest[bundle.target.name] ??= {};
43
+ manifest[bundle.target.name][(0, _path().relative)(bundle.target.distDir, bundle.filePath)] = bundleInfo;
41
44
  }
42
- manifest[bundle.target.name] ??= {};
43
- manifest[bundle.target.name][(0, _path().relative)(bundle.target.distDir, bundle.filePath)] = bundleInfo;
44
45
  }
45
46
  const targets = new Set(event.bundleGraph.getBundles().map(bundle => bundle.target));
46
47
  const {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/reporter-conditional-manifest",
3
- "version": "2.14.1-dev.16+921d08b68",
3
+ "version": "2.14.1-dev.27+1b527bfa5",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -15,9 +15,9 @@
15
15
  "node": ">= 16.0.0"
16
16
  },
17
17
  "dependencies": {
18
- "@atlaspack/plugin": "2.14.1-dev.16+921d08b68",
18
+ "@atlaspack/plugin": "2.14.1-dev.27+1b527bfa5",
19
19
  "nullthrows": "^1.1.1"
20
20
  },
21
21
  "type": "commonjs",
22
- "gitHead": "921d08b68ca593f8cc8cb9ed0d182a5883a9e165"
22
+ "gitHead": "1b527bfa5ae58d415fe6f6f3c68a06c591708fdd"
23
23
  }
@@ -28,20 +28,20 @@ async function report({
28
28
  bundles.map((bundle) => relative(bundle.target.distDir, bundle.filePath));
29
29
 
30
30
  const manifest = {};
31
- for (const [bundle, conditions] of bundles.entries()) {
31
+ for (const conditions of bundles.values()) {
32
32
  const bundleInfo = {};
33
33
  for (const [key, cond] of conditions) {
34
+ const bundle = cond.bundle;
34
35
  bundleInfo[key] = {
35
36
  // Reverse bundles so we load children bundles first
36
37
  ifTrueBundles: mapBundles(cond.ifTrueBundles).reverse(),
37
38
  ifFalseBundles: mapBundles(cond.ifFalseBundles).reverse(),
38
39
  };
40
+ manifest[bundle.target.name] ??= {};
41
+ manifest[bundle.target.name][
42
+ relative(bundle.target.distDir, bundle.filePath)
43
+ ] = bundleInfo;
39
44
  }
40
-
41
- manifest[bundle.target.name] ??= {};
42
- manifest[bundle.target.name][
43
- relative(bundle.target.distDir, bundle.filePath)
44
- ] = bundleInfo;
45
45
  }
46
46
 
47
47
  const targets = new Set(