sonda 0.13.0 → 0.13.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.13.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 6e692b5: Fixed missing lazy-loaded JavaScript files in reports for SvelteKit and other Vite-based builds.
8
+
3
9
  ## 0.13.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.js CHANGED
@@ -168,7 +168,7 @@ function hasIgnoredExtension(name) {
168
168
  }
169
169
  //#endregion
170
170
  //#region package.json
171
- var version = "0.13.0";
171
+ var version = "0.13.1";
172
172
  //#endregion
173
173
  //#region src/report/formatters/Formatter.ts
174
174
  var Formatter = class {
@@ -414,6 +414,7 @@ const parentMap = {};
414
414
  * Update the report with the output assets and their sources from the source map.
415
415
  */
416
416
  function updateOutput(report, path, entrypoints) {
417
+ if (!existsSync(path)) return;
417
418
  const type = getTypeByName(path);
418
419
  RESOURCE_TYPES_TO_ANALYZE.includes(type) ? addAnalyzableType(report, path, entrypoints, type) : addNonAnalyzableType(report, path, type);
419
420
  }
@@ -602,7 +603,7 @@ var Report = class {
602
603
  this.assets[name] = entrypoints;
603
604
  }
604
605
  async generate() {
605
- Object.entries(this.assets).filter(([_, entrypoints]) => !!entrypoints).forEach(([path, entrypoints]) => updateOutput(this, path, entrypoints));
606
+ Object.entries(this.assets).filter(([_, entrypoints]) => entrypoints !== void 0).forEach(([path, entrypoints]) => updateOutput(this, path, entrypoints));
606
607
  this.dependencies = updateDependencies(this);
607
608
  const outputs = [];
608
609
  for (const format of this.config.format) {
@@ -733,7 +734,7 @@ function SondaRollupPlugin(userOptions = {}) {
733
734
  },
734
735
  async writeBundle({ dir, file }, bundle) {
735
736
  const outputDir = resolve(process.cwd(), dir ?? dirname(file));
736
- for (const [path, asset] of Object.entries(bundle)) report.addAsset(resolve(outputDir, path), asset.type === "chunk" && asset.facadeModuleId ? [asset.facadeModuleId] : void 0);
737
+ for (const [path, asset] of Object.entries(bundle)) report.addAsset(resolve(outputDir, path), asset.type === "chunk" ? asset.facadeModuleId ? [asset.facadeModuleId] : [] : void 0);
737
738
  },
738
739
  async closeBundle() {
739
740
  const reportPaths = await report.generate();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sonda",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "description": "Universal bundle analyzer and visualizer that works with most popular bundlers and frameworks.",
5
5
  "keywords": [
6
6
  "analyzer",