@atlaspack/bundler-default 2.12.1-dev.3450 → 2.12.1-dev.3466

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/bundler-default",
3
- "version": "2.12.1-dev.3450+58845ef87",
3
+ "version": "2.12.1-dev.3466+9a12fb8bd",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -13,16 +13,16 @@
13
13
  "source": "src/DefaultBundler.js",
14
14
  "engines": {
15
15
  "node": ">= 16.0.0",
16
- "parcel": "^2.12.1-dev.3450+58845ef87"
16
+ "parcel": "^2.12.1-dev.3466+9a12fb8bd"
17
17
  },
18
18
  "dependencies": {
19
- "@atlaspack/diagnostic": "2.12.1-dev.3450+58845ef87",
20
- "@atlaspack/feature-flags": "2.12.1-dev.3450+58845ef87",
21
- "@atlaspack/graph": "3.2.1-dev.3450+58845ef87",
22
- "@atlaspack/plugin": "2.12.1-dev.3450+58845ef87",
23
- "@atlaspack/rust": "2.12.1-dev.3450+58845ef87",
24
- "@atlaspack/utils": "2.12.1-dev.3450+58845ef87",
19
+ "@atlaspack/diagnostic": "2.12.1-dev.3466+9a12fb8bd",
20
+ "@atlaspack/feature-flags": "2.12.1-dev.3466+9a12fb8bd",
21
+ "@atlaspack/graph": "3.2.1-dev.3466+9a12fb8bd",
22
+ "@atlaspack/plugin": "2.12.1-dev.3466+9a12fb8bd",
23
+ "@atlaspack/rust": "2.12.1-dev.3466+9a12fb8bd",
24
+ "@atlaspack/utils": "2.12.1-dev.3466+9a12fb8bd",
25
25
  "nullthrows": "^1.1.1"
26
26
  },
27
- "gitHead": "58845ef87446fcedb7d7d8876440c64184645cbb"
27
+ "gitHead": "9a12fb8bd1b72e407ed043e20337dc60fbec9cbe"
28
28
  }
@@ -187,7 +187,7 @@ function decorateLegacyGraph(
187
187
  dependencyBundleGraph.getNodeIdByContentKey(String(bundleNodeId)),
188
188
  ALL_EDGE_TYPES,
189
189
  )
190
- .map(nodeId => {
190
+ .map((nodeId) => {
191
191
  let dependency = nullthrows(dependencyBundleGraph.getNode(nodeId));
192
192
  invariant(dependency.type === 'dependency');
193
193
  return dependency.value;
@@ -224,7 +224,7 @@ function decorateLegacyGraph(
224
224
  let uniqueKey =
225
225
  idealBundle.uniqueKey != null
226
226
  ? idealBundle.uniqueKey
227
- : [...idealBundle.assets].map(asset => asset.id).join(',');
227
+ : [...idealBundle.assets].map((asset) => asset.id).join(',');
228
228
 
229
229
  bundle = nullthrows(
230
230
  bundleGraph.createBundle({
@@ -273,7 +273,7 @@ function decorateLegacyGraph(
273
273
  if (!idealBundle || idealBundle === 'root') continue;
274
274
  let bundle = nullthrows(idealBundleToLegacyBundle.get(idealBundle));
275
275
  if (idealBundle.internalizedAssets) {
276
- idealBundle.internalizedAssets.forEach(internalized => {
276
+ idealBundle.internalizedAssets.forEach((internalized) => {
277
277
  let incomingDeps = bundleGraph.getIncomingDependencies(
278
278
  idealGraph.assets[internalized],
279
279
  );
@@ -471,7 +471,7 @@ function createIdealGraph(
471
471
  }
472
472
 
473
473
  let parentAsset = configToParentAsset.get(c);
474
- let assetRegexes = c.assets.map(glob => globToRegex(glob));
474
+ let assetRegexes = c.assets.map((glob) => globToRegex(glob));
475
475
 
476
476
  assetGraph.traverse((node, _, actions) => {
477
477
  if (
@@ -482,7 +482,7 @@ function createIdealGraph(
482
482
  config.projectRoot,
483
483
  node.value.filePath,
484
484
  );
485
- if (!assetRegexes.some(regex => regex.test(projectRelativePath))) {
485
+ if (!assetRegexes.some((regex) => regex.test(projectRelativePath))) {
486
486
  return;
487
487
  }
488
488
 
@@ -896,7 +896,7 @@ function createIdealGraph(
896
896
  if (asset.meta.isConstantModule === true) {
897
897
  let parents = assetGraph
898
898
  .getIncomingDependencies(asset)
899
- .map(dep => nullthrows(assetGraph.getAssetWithDependency(dep)));
899
+ .map((dep) => nullthrows(assetGraph.getAssetWithDependency(dep)));
900
900
 
901
901
  for (let parent of parents) {
902
902
  inlineConstantDeps.get(parent).add(asset);
@@ -1090,7 +1090,7 @@ function createIdealGraph(
1090
1090
  // Neither can non-splittable, isolated, or needing of stable name bundles.
1091
1091
  // Reserve those filtered out bundles since we add the asset back into them.
1092
1092
  reachableNonEntries.clear();
1093
- reachableRoots[i].forEach(nodeId => {
1093
+ reachableRoots[i].forEach((nodeId) => {
1094
1094
  let assetId = bundleRootGraph.getNode(nodeId);
1095
1095
  if (assetId == null) return; // deleted
1096
1096
  let a = assets[assetId];
@@ -1118,7 +1118,7 @@ function createIdealGraph(
1118
1118
  let bundleId;
1119
1119
  let manualSharedBundleKey = manualSharedObject.name + ',' + asset.type;
1120
1120
  let sourceBundles = [];
1121
- reachable.forEach(id => {
1121
+ reachable.forEach((id) => {
1122
1122
  sourceBundles.push(nullthrows(bundleRoots.get(assets[id]))[0]);
1123
1123
  });
1124
1124
 
@@ -1181,7 +1181,7 @@ function createIdealGraph(
1181
1181
 
1182
1182
  // if a bundle b is a subgraph of another bundle f, reuse it, drawing an edge between the two
1183
1183
  if (config.disableSharedBundles === false) {
1184
- reachableNonEntries.forEach(candidateId => {
1184
+ reachableNonEntries.forEach((candidateId) => {
1185
1185
  let candidateSourceBundleRoot = assets[candidateId];
1186
1186
  let candidateSourceBundleId = nullthrows(
1187
1187
  bundleRoots.get(candidateSourceBundleRoot),
@@ -1207,7 +1207,7 @@ function createIdealGraph(
1207
1207
  ],
1208
1208
  );
1209
1209
 
1210
- reachableIntersection.forEach(otherCandidateId => {
1210
+ reachableIntersection.forEach((otherCandidateId) => {
1211
1211
  let otherReuseCandidate = assets[otherCandidateId];
1212
1212
  if (candidateSourceBundleRoot === otherReuseCandidate) return;
1213
1213
  let reusableBundleId = nullthrows(
@@ -1227,7 +1227,7 @@ function createIdealGraph(
1227
1227
  }
1228
1228
 
1229
1229
  let reachableArray = [];
1230
- reachable.forEach(id => {
1230
+ reachable.forEach((id) => {
1231
1231
  reachableArray.push(assets[id]);
1232
1232
  });
1233
1233
 
@@ -1237,9 +1237,9 @@ function createIdealGraph(
1237
1237
  reachableArray.length > config.minBundles
1238
1238
  ) {
1239
1239
  let sourceBundles = reachableArray.map(
1240
- a => nullthrows(bundleRoots.get(a))[0],
1240
+ (a) => nullthrows(bundleRoots.get(a))[0],
1241
1241
  );
1242
- let key = reachableArray.map(a => a.id).join(',') + '.' + asset.type;
1242
+ let key = reachableArray.map((a) => a.id).join(',') + '.' + asset.type;
1243
1243
  let bundleId = bundles.get(key);
1244
1244
  let bundle;
1245
1245
  if (bundleId == null) {
@@ -1407,7 +1407,7 @@ function createIdealGraph(
1407
1407
  }, 0);
1408
1408
 
1409
1409
  if (numBundlesContributingToPRL > config.maxParallelRequests) {
1410
- let sharedBundleIdsInBundleGroup = bundleIdsInGroup.filter(b => {
1410
+ let sharedBundleIdsInBundleGroup = bundleIdsInGroup.filter((b) => {
1411
1411
  let bundle = nullthrows(bundleGraph.getNode(b));
1412
1412
  // shared bundles must have source bundles, we could have a bundle
1413
1413
  // connected to another bundle that isnt a shared bundle, so check
@@ -1421,7 +1421,7 @@ function createIdealGraph(
1421
1421
 
1422
1422
  // Sort the bundles so the smallest ones are removed first.
1423
1423
  let sharedBundlesInGroup = sharedBundleIdsInBundleGroup
1424
- .map(id => ({
1424
+ .map((id) => ({
1425
1425
  id,
1426
1426
  bundle: nullthrows(bundleGraph.getNode(id)),
1427
1427
  }))
@@ -1444,7 +1444,7 @@ function createIdealGraph(
1444
1444
  // but total # bundles still exceeds limit due to non shared bundles
1445
1445
 
1446
1446
  // Add all assets in the shared bundle into the source bundles that are within this bundle group.
1447
- let sourceBundles = [...bundleToRemove.sourceBundles].filter(b =>
1447
+ let sourceBundles = [...bundleToRemove.sourceBundles].filter((b) =>
1448
1448
  bundleIdsInGroup.includes(b),
1449
1449
  );
1450
1450
 
@@ -1526,7 +1526,7 @@ function createIdealGraph(
1526
1526
  }
1527
1527
  function getBundlesForBundleGroup(bundleGroupId) {
1528
1528
  let bundlesInABundleGroup = [];
1529
- bundleGraph.traverse(nodeId => {
1529
+ bundleGraph.traverse((nodeId) => {
1530
1530
  bundlesInABundleGroup.push(nodeId);
1531
1531
  }, bundleGroupId);
1532
1532
  return bundlesInABundleGroup;
@@ -1584,7 +1584,7 @@ function createIdealGraph(
1584
1584
  for (let asset of bundle.assets) {
1585
1585
  assetReference.set(
1586
1586
  asset,
1587
- assetReference.get(asset).filter(t => !t.includes(bundle)),
1587
+ assetReference.get(asset).filter((t) => !t.includes(bundle)),
1588
1588
  );
1589
1589
  for (let sourceBundleId of bundle.sourceBundles) {
1590
1590
  let sourceBundle = nullthrows(bundleGraph.getNode(sourceBundleId));
@@ -1611,7 +1611,7 @@ const CONFIG_SCHEMA: SchemaEntity = {
1611
1611
  properties: {
1612
1612
  http: {
1613
1613
  type: 'number',
1614
- enum: Object.keys(HTTP_OPTIONS).map(k => Number(k)),
1614
+ enum: Object.keys(HTTP_OPTIONS).map((k) => Number(k)),
1615
1615
  },
1616
1616
  manualSharedBundles: {
1617
1617
  type: 'array',
@@ -1781,7 +1781,7 @@ async function loadBundlerConfig(
1781
1781
  }
1782
1782
 
1783
1783
  if (modeConfig.manualSharedBundles) {
1784
- let nameArray = modeConfig.manualSharedBundles.map(a => a.name);
1784
+ let nameArray = modeConfig.manualSharedBundles.map((a) => a.name);
1785
1785
  let nameSet = new Set(nameArray);
1786
1786
  invariant(
1787
1787
  nameSet.size == nameArray.length,