sonda 0.10.1 → 0.10.2

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,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.10.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 8cd728c: Allow uploading a JSON report when no report is embedded in the HTML.
8
+ - b78ff1d: [esbuild] Remove duplicate entrypoint connection pointing in the wrong direction.
9
+
3
10
  ## 0.10.1
4
11
 
5
12
  ### Patch Changes
package/README.md CHANGED
@@ -4,19 +4,19 @@ Sonda is a universal bundle analyzer and visualizer. It generates an interactive
4
4
 
5
5
  Sonda works with the following tools:
6
6
 
7
- * **Bundlers**
8
- * Vite
9
- * Rollup
10
- * Rolldown
11
- * esbuild
12
- * webpack
13
- * Rspack
14
- * **Frameworks**
15
- * Next.js
16
- * Nuxt
17
- * Astro
18
- * SvelteKit
19
- * Angular CLI
7
+ - **Bundlers**
8
+ - Vite
9
+ - Rollup
10
+ - Rolldown
11
+ - esbuild
12
+ - webpack
13
+ - Rspack
14
+ - **Frameworks**
15
+ - Next.js
16
+ - Nuxt
17
+ - Astro
18
+ - SvelteKit
19
+ - Angular CLI
20
20
 
21
21
  ## Installation
22
22
 
@@ -7,43 +7,43 @@ import Sonda from 'sonda/angular';
7
7
  * Use `RegExp.escape()` when it's more widely available.
8
8
  */
9
9
  function stringToRegExp(value) {
10
- // 1) Grab optional ^, then any characters, then optional $
11
- const [, start, core, end] = /^(\^?)(.*?)(\$?)$/.exec( value );
10
+ // 1) Grab optional ^, then any characters, then optional $
11
+ const [, start, core, end] = /^(\^?)(.*?)(\$?)$/.exec(value);
12
12
 
13
- // 2) Escape all regex‑meta in the core
14
- const escaped = core.replace( /[-.*+?^${}()|[\]\\]/g, '\\$&' );
13
+ // 2) Escape all regex‑meta in the core
14
+ const escaped = core.replace(/[-.*+?^${}()|[\]\\]/g, '\\$&');
15
15
 
16
- // 3) Stitch back the string
17
- return new RegExp( start + escaped + end );
16
+ // 3) Stitch back the string
17
+ return new RegExp(start + escaped + end);
18
18
  }
19
19
 
20
- const { values } = parseArgs( {
21
- options: {
22
- config: { type: 'string' },
23
- projects: { type: 'string', multiple: true },
24
- include: { type: 'string', multiple: true },
25
- exclude: { type: 'string', multiple: true },
26
- format: { type: 'string', multiple: true },
27
- filename: { type: 'string' },
28
- outputDir: { type: 'string' },
29
- open: { type: 'string' },
30
- 'no-open': { type: 'boolean' },
31
- deep: { type: 'boolean' },
32
- sources: { type: 'boolean' },
33
- gzip: { type: 'boolean' },
34
- brotli: { type: 'boolean' }
35
- },
36
-
37
- // Fail when unknown argument is used
38
- strict: true
39
- } );
40
-
41
- if ( values[ 'no-open' ] ) {
42
- values.open = false;
43
- delete values[ 'no-open' ];
20
+ const { values } = parseArgs({
21
+ options: {
22
+ config: { type: 'string' },
23
+ projects: { type: 'string', multiple: true },
24
+ include: { type: 'string', multiple: true },
25
+ exclude: { type: 'string', multiple: true },
26
+ format: { type: 'string', multiple: true },
27
+ filename: { type: 'string' },
28
+ outputDir: { type: 'string' },
29
+ open: { type: 'string' },
30
+ 'no-open': { type: 'boolean' },
31
+ deep: { type: 'boolean' },
32
+ sources: { type: 'boolean' },
33
+ gzip: { type: 'boolean' },
34
+ brotli: { type: 'boolean' }
35
+ },
36
+
37
+ // Fail when unknown argument is used
38
+ strict: true
39
+ });
40
+
41
+ if (values['no-open']) {
42
+ values.open = false;
43
+ delete values['no-open'];
44
44
  }
45
45
 
46
- values.include = values.include?.map( stringToRegExp );
47
- values.exclude = values.exclude?.map( stringToRegExp );
46
+ values.include = values.include?.map(stringToRegExp);
47
+ values.exclude = values.exclude?.map(stringToRegExp);
48
48
 
49
- Sonda( values );
49
+ Sonda(values);
@@ -3,7 +3,7 @@ import { readFileSync, readdirSync } from "fs";
3
3
  import { Config, processEsbuildMetafile } from "sonda";
4
4
 
5
5
  //#region src/entrypoints/angular.ts
6
- async function SondaAngular({ config = "angular.json", projects = [],...userOptions }) {
6
+ async function SondaAngular({ config = "angular.json", projects = [], ...userOptions }) {
7
7
  const options = new Config(userOptions, {
8
8
  integration: "angular",
9
9
  filename: "sonda_[env]_[index]"
@@ -2,7 +2,7 @@ import { Config, SondaVitePlugin } from "sonda";
2
2
 
3
3
  //#region src/entrypoints/nuxt.ts
4
4
  function SondaNuxtPlugin(userOptions = {}) {
5
- return function SondaNuxtPlugin$1(_, nuxt) {
5
+ return function SondaNuxtPlugin(_, nuxt) {
6
6
  const options = new Config(userOptions, {
7
7
  integration: "nuxt",
8
8
  filename: "sonda_[env]_[index]"
package/dist/index.d.ts CHANGED
@@ -248,54 +248,54 @@ interface Metadata {
248
248
  }
249
249
  /**
250
250
  * Base interface for all resources.
251
- *
251
+ *
252
252
  * Resources represent the following inputs:
253
- *
253
+ *
254
254
  * ┌─────────────────────────────┐
255
255
  * │ │
256
256
  * │ OPTIONAL ORIGINAL SOURCE │
257
257
  * │ │
258
258
  * └──────────────▲──────────────┘
259
- * │
260
- * │
261
- * VIA SOURCEMAP
262
- * │
263
- * │
259
+ * │
260
+ * │
261
+ * VIA SOURCEMAP
262
+ * │
263
+ * │
264
264
  * ┌─────────────────────────────┐ ┌──────────────┼──────────────┐
265
265
  * │ │ │ │
266
266
  * │ INTERNAL SOURCE │ │ EXTERNAL SOURCE │
267
267
  * │ │ │ │
268
268
  * └──────────────┬──────────────┘ └──────────────┬──────────────┘
269
- * │ │
270
- * │ │
271
- * └─────────────────┬─────────────────┘
272
- * │
273
- * │
274
- * ┌──────────────▼──────────────┐
275
- * │ │
276
- * │ BUNDLER │
277
- * │ │
278
- * └──────────────┬──────────────┘
279
- * │
280
- * │
281
- * │
282
- * │
283
- * │
284
- * ┌──────────────▼──────────────┐
285
- * │ │
286
- * │ ASSET │
287
- * │ │
288
- * └──────────────┬──────────────┘
289
- * │
290
- * │
291
- * VIA SOURCEMAP
292
- * │
293
- * │
294
- * ┌──────────────▼──────────────┐
295
- * │ │
296
- * │ CHUNK │
297
- * │ │
298
- * └─────────────────────────────┘
269
+ * │ │
270
+ * │ │
271
+ * └─────────────────┬─────────────────┘
272
+ * │
273
+ * │
274
+ * ┌──────────────▼──────────────┐
275
+ * │ │
276
+ * │ BUNDLER │
277
+ * │ │
278
+ * └──────────────┬──────────────┘
279
+ * │
280
+ * │
281
+ * │
282
+ * │
283
+ * │
284
+ * ┌──────────────▼──────────────┐
285
+ * │ │
286
+ * │ ASSET │
287
+ * │ │
288
+ * └──────────────┬──────────────┘
289
+ * │
290
+ * │
291
+ * VIA SOURCEMAP
292
+ * │
293
+ * │
294
+ * ┌──────────────▼──────────────┐
295
+ * │ │
296
+ * │ CHUNK │
297
+ * │ │
298
+ * └─────────────────────────────┘
299
299
  */
300
300
  interface ResourceBase {
301
301
  /**
@@ -322,13 +322,13 @@ interface ResourceBase {
322
322
  uncompressed: number;
323
323
  /**
324
324
  * Size of the resource after GZIP compression.
325
- *
325
+ *
326
326
  * This value is only available when the `gzip` option is enabled.
327
327
  */
328
328
  gzip?: number;
329
329
  /**
330
330
  * Size of the resource after Brotli compression.
331
- *
331
+ *
332
332
  * This value is only available when the `brotli` option is enabled.
333
333
  */
334
334
  brotli?: number;
@@ -337,7 +337,7 @@ interface ResourceBase {
337
337
  *
338
338
  * If the `kind` is `chunk`, this resource is a part of the output
339
339
  * asset and value of `parent` is the name of the output asset.
340
- *
340
+ *
341
341
  * If the `kind` is `sourcemap`, this resource is a part of the source
342
342
  * map of other resource and value of `parent` is the name of that resource.
343
343
  */
@@ -437,7 +437,7 @@ interface SourceMap {
437
437
  name: string;
438
438
  /**
439
439
  * Stringified source map.
440
- *
440
+ *
441
441
  * Use the `DecodedMap` type for the decoded version of this map (after `JSON.parse()`).
442
442
  */
443
443
  map: string;