@atlaspack/bundler-default 2.13.2-dev.3666 → 2.13.2-dev.3682

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.
package/lib/idealGraph.js CHANGED
@@ -710,6 +710,11 @@ function createIdealGraph(assetGraph, config, entries, logger) {
710
710
  reachableIntersection.bits.set(reachableNonEntries.bits);
711
711
  reachableIntersection.intersect(reachableAssets[(0, _nullthrows().default)(assetToBundleRootNodeId.get(candidateSourceBundleRoot))]);
712
712
  reachableIntersection.forEach(otherCandidateId => {
713
+ // In the case of a circular dependency, you may end up with two
714
+ // reusable bundles that each delete the other, leaving no reusable
715
+ // bundles actually reachable. This check is to avoid assigning the
716
+ // asset to a reusable bundle that has already been marked unreachable.
717
+ if (!reachable.has(otherCandidateId)) return;
713
718
  let otherReuseCandidate = assets[otherCandidateId];
714
719
  if (candidateSourceBundleRoot === otherReuseCandidate) return;
715
720
  let reusableBundleId = (0, _nullthrows().default)(bundles.get(otherReuseCandidate.id));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/bundler-default",
3
- "version": "2.13.2-dev.3666+0afd6de27",
3
+ "version": "2.13.2-dev.3682+e6c0286ea",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -12,17 +12,17 @@
12
12
  "main": "lib/DefaultBundler.js",
13
13
  "source": "src/DefaultBundler.js",
14
14
  "engines": {
15
- "atlaspack": "^2.13.2-dev.3666+0afd6de27",
15
+ "atlaspack": "^2.13.2-dev.3682+e6c0286ea",
16
16
  "node": ">= 16.0.0"
17
17
  },
18
18
  "dependencies": {
19
- "@atlaspack/diagnostic": "2.13.2-dev.3666+0afd6de27",
20
- "@atlaspack/feature-flags": "2.13.2-dev.3666+0afd6de27",
21
- "@atlaspack/graph": "3.3.2-dev.3666+0afd6de27",
22
- "@atlaspack/plugin": "2.13.2-dev.3666+0afd6de27",
23
- "@atlaspack/rust": "2.13.2-dev.3666+0afd6de27",
24
- "@atlaspack/utils": "2.13.2-dev.3666+0afd6de27",
19
+ "@atlaspack/diagnostic": "2.13.2-dev.3682+e6c0286ea",
20
+ "@atlaspack/feature-flags": "2.13.2-dev.3682+e6c0286ea",
21
+ "@atlaspack/graph": "3.3.2-dev.3682+e6c0286ea",
22
+ "@atlaspack/plugin": "2.13.2-dev.3682+e6c0286ea",
23
+ "@atlaspack/rust": "2.13.2-dev.3682+e6c0286ea",
24
+ "@atlaspack/utils": "2.13.2-dev.3682+e6c0286ea",
25
25
  "nullthrows": "^1.1.1"
26
26
  },
27
- "gitHead": "0afd6de27cde19f2c9377e864bce83da5c098a54"
27
+ "gitHead": "e6c0286ea2a77c6a41c6c0f38d51caf420d61aae"
28
28
  }
package/src/idealGraph.js CHANGED
@@ -961,6 +961,12 @@ export function createIdealGraph(
961
961
  );
962
962
 
963
963
  reachableIntersection.forEach((otherCandidateId) => {
964
+ // In the case of a circular dependency, you may end up with two
965
+ // reusable bundles that each delete the other, leaving no reusable
966
+ // bundles actually reachable. This check is to avoid assigning the
967
+ // asset to a reusable bundle that has already been marked unreachable.
968
+ if (!reachable.has(otherCandidateId)) return;
969
+
964
970
  let otherReuseCandidate = assets[otherCandidateId];
965
971
  if (candidateSourceBundleRoot === otherReuseCandidate) return;
966
972
  let reusableBundleId = nullthrows(