sonda 0.12.1 → 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 +16 -0
- package/dist/index.js +5 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
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
|
+
|
|
9
|
+
## 0.13.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 24825cd: Replace the `open` dependency with `tiny-open`, removing 11 transitive dependencies from the published package.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 6ddc13c: Restore npm provenance publishing in the release workflow.
|
|
18
|
+
|
|
3
19
|
## 0.12.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { styleText } from "util";
|
|
|
2
2
|
import { access, mkdir, readFile, readdir, writeFile } from "fs/promises";
|
|
3
3
|
import { basename, dirname, extname, format, isAbsolute, join, parse, posix, relative, resolve, win32 } from "path";
|
|
4
4
|
import { isBuiltin } from "module";
|
|
5
|
-
import open from "open";
|
|
5
|
+
import open from "tiny-open";
|
|
6
6
|
import { fileURLToPath } from "url";
|
|
7
7
|
import { brotliCompressSync, gzipSync } from "zlib";
|
|
8
8
|
import { existsSync, readFileSync, statSync } from "fs";
|
|
@@ -168,7 +168,7 @@ function hasIgnoredExtension(name) {
|
|
|
168
168
|
}
|
|
169
169
|
//#endregion
|
|
170
170
|
//#region package.json
|
|
171
|
-
var version = "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]) =>
|
|
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"
|
|
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.
|
|
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",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"@jridgewell/remapping": "^2.3.5",
|
|
94
|
-
"open": "^
|
|
94
|
+
"tiny-open": "^1.3.0"
|
|
95
95
|
},
|
|
96
96
|
"engines": {
|
|
97
97
|
"node": ">=22.12"
|