rollup-plugin-stats 3.0.0-beta.1 → 3.0.0-beta.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.
@@ -1,6 +1,5 @@
1
1
  import { ExcludeFilepathPatterns } from "./utils/check-exclude-filepath.cjs";
2
2
  import { OutputAsset, OutputBundle, OutputChunk, RenderedModule } from "./types.cjs";
3
-
4
3
  //#region src/extract.d.ts
5
4
  type AssetStatsOptionalProperties = {
6
5
  source?: OutputAsset['source'];
@@ -1 +1 @@
1
- {"version":3,"file":"extract.d.cts","names":[],"sources":["../src/extract.ts"],"mappings":";;;;KAaY,4BAAA;EACV,MAAA,GAAS,WAAW;AAAA;AAAA,KAGV,UAAA,GAAa,IAAA,CAAK,WAAA,QAAmB,4BAAA,IAC/C,4BAAA;AAAA,KAEU,6BAAA;EACV,IAAA,GAAO,cAAc;AAAA;AAAA,KAGX,WAAA,GAAc,IAAA,CACxB,cAAA,QACM,6BAAA,IAEN,6BAAA;AAAA,KAEU,4BAAA;EACV,IAAA,GAAO,WAAA;EACP,GAAA,GAAM,WAAW;AAAA;AAAA,KAGP,UAAA,GAAa,IAAA,CACvB,WAAA,QACM,4BAAA;EAEN,OAAA,EAAS,MAAA,SAAe,WAAA;AAAA,IACtB,4BAAA;AAAA,KAEQ,KAAA,GAAQ,MAAA,SAAe,UAAA,GAAa,UAAA;AAAA,KAEpC,YAAA;EA3BkB;;;;EAgC5B,MAAA;EA7BU;;;;EAkCV,GAAA;EA9BU;;;EAkCV,aAAA,GAAgB,uBAAA;EAhCV;;;EAoCN,cAAA,GAAiB,uBAAuB;AAAA;;;;;;AAlCX;AAE/B;;;iBA4CwB,kBAAA,CACtB,MAAA,EAAQ,YAAA,EACR,OAAA,GAAS,YAAA,GACR,KAAA"}
1
+ {"version":3,"file":"extract.d.cts","names":[],"sources":["../src/extract.ts"],"mappings":";;;KAaY;EACV,SAAS;;KAGC,aAAa,KAAK,mBAAmB,gCAC/C;KAEU;EACV,OAAO;;KAGG,cAAc,KACxB,sBACM,iCAEN;KAEU;EACV,OAAO;EACP,MAAM;;KAGI,aAAa,KACvB,mBACM;EAEN,SAAS,eAAe;IACtB;KAEQ,QAAQ,eAAe,aAAa;KAEpC;;;;;EAKV;;;;;EAKA;;;;EAIA,gBAAgB;;;;EAIhB,iBAAiB;;;;;;;;;;;iBAYK,mBACtB,QAAQ,cACR,UAAS,eACR"}
@@ -1,6 +1,5 @@
1
1
  import { ExcludeFilepathPatterns } from "./utils/check-exclude-filepath.mjs";
2
2
  import { OutputAsset, OutputBundle, OutputChunk, RenderedModule } from "./types.mjs";
3
-
4
3
  //#region src/extract.d.ts
5
4
  type AssetStatsOptionalProperties = {
6
5
  source?: OutputAsset['source'];
@@ -1 +1 @@
1
- {"version":3,"file":"extract.d.mts","names":[],"sources":["../src/extract.ts"],"mappings":";;;;KAaY,4BAAA;EACV,MAAA,GAAS,WAAW;AAAA;AAAA,KAGV,UAAA,GAAa,IAAA,CAAK,WAAA,QAAmB,4BAAA,IAC/C,4BAAA;AAAA,KAEU,6BAAA;EACV,IAAA,GAAO,cAAc;AAAA;AAAA,KAGX,WAAA,GAAc,IAAA,CACxB,cAAA,QACM,6BAAA,IAEN,6BAAA;AAAA,KAEU,4BAAA;EACV,IAAA,GAAO,WAAA;EACP,GAAA,GAAM,WAAW;AAAA;AAAA,KAGP,UAAA,GAAa,IAAA,CACvB,WAAA,QACM,4BAAA;EAEN,OAAA,EAAS,MAAA,SAAe,WAAA;AAAA,IACtB,4BAAA;AAAA,KAEQ,KAAA,GAAQ,MAAA,SAAe,UAAA,GAAa,UAAA;AAAA,KAEpC,YAAA;EA3BkB;;;;EAgC5B,MAAA;EA7BU;;;;EAkCV,GAAA;EA9BU;;;EAkCV,aAAA,GAAgB,uBAAA;EAhCV;;;EAoCN,cAAA,GAAiB,uBAAuB;AAAA;;;;;;AAlCX;AAE/B;;;iBA4CwB,kBAAA,CACtB,MAAA,EAAQ,YAAA,EACR,OAAA,GAAS,YAAA,GACR,KAAA"}
1
+ {"version":3,"file":"extract.d.mts","names":[],"sources":["../src/extract.ts"],"mappings":";;;KAaY;EACV,SAAS;;KAGC,aAAa,KAAK,mBAAmB,gCAC/C;KAEU;EACV,OAAO;;KAGG,cAAc,KACxB,sBACM,iCAEN;KAEU;EACV,OAAO;EACP,MAAM;;KAGI,aAAa,KACvB,mBACM;EAEN,SAAS,eAAe;IACtB;KAEQ,QAAQ,eAAe,aAAa;KAEpC;;;;;EAKV;;;;;EAKA;;;;EAIA,gBAAgB;;;;EAIhB,iBAAiB;;;;;;;;;;;iBAYK,mBACtB,QAAQ,cACR,UAAS,eACR"}
package/dist/plugin.d.cts CHANGED
@@ -1,21 +1,24 @@
1
1
  import { OutputBundle } from "./types.cjs";
2
2
  import { StatsOptions } from "./extract.cjs";
3
3
  import { RollupStatsWrite } from "./write.cjs";
4
-
5
4
  //#region src/plugin.d.ts
6
5
  /**
7
6
  * A subset of resolved output options provided to the `generateBundle` hook by Vite/Rolldown/Rollup,
8
7
  * containing only the fields this plugin uses to generate a stats file for a specific output.
9
8
  */
10
9
  type OutputOptions = {
11
- /** Output directory for the generated files. */dir?: string | undefined; /** Output format */
10
+ /** Output directory for the generated files. */
11
+ dir?: string | undefined;
12
+ /** Output format */
12
13
  format?: 'es' | 'esm' | 'module' | 'cjs' | 'commonjs' | 'iife' | 'umd' | 'amd' | 'system' | 'systemjs' | undefined;
13
14
  };
14
15
  /**
15
16
  * Subset of the Vite/Rolldown/Rollup plugin hook context (`this`) used by this plugin.
16
17
  */
17
18
  type PluginContext = {
18
- /** Log an informational message through Vite/Rolldown/Rollup's logging pipeline. */info: (message: string) => void; /** Log a warning through Vite/Rolldown/Rollup's logging pipeline without stopping the build. */
19
+ /** Log an informational message through Vite/Rolldown/Rollup's logging pipeline. */
20
+ info: (message: string) => void;
21
+ /** Log a warning through Vite/Rolldown/Rollup's logging pipeline without stopping the build. */
19
22
  warn: (message: string) => void;
20
23
  };
21
24
  /**
@@ -28,7 +31,8 @@ type PluginContext = {
28
31
  * }
29
32
  */
30
33
  type Plugin = {
31
- /** Unique identifier for the plugin, used in error messages and logs. */name: string;
34
+ /** Unique identifier for the plugin, used in error messages and logs. */
35
+ name: string;
32
36
  /**
33
37
  * Hook called after the bundle has been fully generated but before it is
34
38
  * written to disk. Receives the resolved output options and the complete
@@ -55,5 +59,5 @@ type RollupStatsOptions = {
55
59
  type RollupStatsOptionsOrOutputOptions = RollupStatsOptions | ((outputOptions: OutputOptions) => RollupStatsOptions);
56
60
  declare function rollupStats(options?: RollupStatsOptionsOrOutputOptions): Plugin;
57
61
  //#endregion
58
- export { RollupStatsOptions, RollupStatsOptionsOrOutputOptions, rollupStats };
62
+ export { OutputOptions, Plugin, RollupStatsOptions, RollupStatsOptionsOrOutputOptions, rollupStats };
59
63
  //# sourceMappingURL=plugin.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.cts","names":[],"sources":["../src/plugin.ts"],"mappings":";;;;;;;AAeA;;KAAY,aAAA;EAEV,gDAAA,GAAA,uBAoBG;EAjBH,MAAM;AAAA;;;;KAiBH,aAAA;EAKI,oFAHP,IAAA,GAAO,OAAA,mBAGe;EAAtB,IAAA,GAAO,OAAA;AAAA;;;;;;;;;;KAYG,MAAA;EAUR,yEARF,IAAA;EASE;;;;;EAFF,cAAA,IACE,IAAA,EAAM,aAAA,EACN,aAAA,EAAe,aAAA,EACf,MAAA,EAAQ,YAAA,EACR,OAAA,qBACU,OAAA;AAAA;AAAA,KAGF,kBAAA;EAAkB;;;;EAK5B,QAAA;EAIQ;;;EAAR,KAAA,GAAQ,YAAA;EAKgB;AAG1B;;;EAHE,KAAA,GAAQ,gBAAgB;AAAA;AAAA,KAGd,iCAAA,GACR,kBAAA,KACE,aAAA,EAAe,aAAA,KAAkB,kBAAA;AAAA,iBAEvB,WAAA,CACd,OAAA,GAAS,iCAAA,GACR,MAAM"}
1
+ {"version":3,"file":"plugin.d.cts","names":[],"sources":["../src/plugin.ts"],"mappings":";;;;;;;;KAeY;;EAEV;;EAGA;;;;;KAiBG;;EAEH,OAAO;;EAGP,OAAO;;;;;;;;;;;KAYG;;EAEV;;;;;;EAOA,kBACE,MAAM,eACN,eAAe,eACf,QAAQ,cACR,4BACU;;KAGF;;;;;EAKV;;;;EAIA,QAAQ;;;;;EAKR,QAAQ;;KAGE,oCACR,uBACE,eAAe,kBAAkB;iBAEvB,YACd,UAAS,oCACR"}
package/dist/plugin.d.mts CHANGED
@@ -1,21 +1,24 @@
1
1
  import { OutputBundle } from "./types.mjs";
2
2
  import { StatsOptions } from "./extract.mjs";
3
3
  import { RollupStatsWrite } from "./write.mjs";
4
-
5
4
  //#region src/plugin.d.ts
6
5
  /**
7
6
  * A subset of resolved output options provided to the `generateBundle` hook by Vite/Rolldown/Rollup,
8
7
  * containing only the fields this plugin uses to generate a stats file for a specific output.
9
8
  */
10
9
  type OutputOptions = {
11
- /** Output directory for the generated files. */dir?: string | undefined; /** Output format */
10
+ /** Output directory for the generated files. */
11
+ dir?: string | undefined;
12
+ /** Output format */
12
13
  format?: 'es' | 'esm' | 'module' | 'cjs' | 'commonjs' | 'iife' | 'umd' | 'amd' | 'system' | 'systemjs' | undefined;
13
14
  };
14
15
  /**
15
16
  * Subset of the Vite/Rolldown/Rollup plugin hook context (`this`) used by this plugin.
16
17
  */
17
18
  type PluginContext = {
18
- /** Log an informational message through Vite/Rolldown/Rollup's logging pipeline. */info: (message: string) => void; /** Log a warning through Vite/Rolldown/Rollup's logging pipeline without stopping the build. */
19
+ /** Log an informational message through Vite/Rolldown/Rollup's logging pipeline. */
20
+ info: (message: string) => void;
21
+ /** Log a warning through Vite/Rolldown/Rollup's logging pipeline without stopping the build. */
19
22
  warn: (message: string) => void;
20
23
  };
21
24
  /**
@@ -28,7 +31,8 @@ type PluginContext = {
28
31
  * }
29
32
  */
30
33
  type Plugin = {
31
- /** Unique identifier for the plugin, used in error messages and logs. */name: string;
34
+ /** Unique identifier for the plugin, used in error messages and logs. */
35
+ name: string;
32
36
  /**
33
37
  * Hook called after the bundle has been fully generated but before it is
34
38
  * written to disk. Receives the resolved output options and the complete
@@ -55,5 +59,5 @@ type RollupStatsOptions = {
55
59
  type RollupStatsOptionsOrOutputOptions = RollupStatsOptions | ((outputOptions: OutputOptions) => RollupStatsOptions);
56
60
  declare function rollupStats(options?: RollupStatsOptionsOrOutputOptions): Plugin;
57
61
  //#endregion
58
- export { RollupStatsOptions, RollupStatsOptionsOrOutputOptions, rollupStats };
62
+ export { OutputOptions, Plugin, RollupStatsOptions, RollupStatsOptionsOrOutputOptions, rollupStats };
59
63
  //# sourceMappingURL=plugin.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.mts","names":[],"sources":["../src/plugin.ts"],"mappings":";;;;;;;AAeA;;KAAY,aAAA;EAEV,gDAAA,GAAA,uBAoBG;EAjBH,MAAM;AAAA;;;;KAiBH,aAAA;EAKI,oFAHP,IAAA,GAAO,OAAA,mBAGe;EAAtB,IAAA,GAAO,OAAA;AAAA;;;;;;;;;;KAYG,MAAA;EAUR,yEARF,IAAA;EASE;;;;;EAFF,cAAA,IACE,IAAA,EAAM,aAAA,EACN,aAAA,EAAe,aAAA,EACf,MAAA,EAAQ,YAAA,EACR,OAAA,qBACU,OAAA;AAAA;AAAA,KAGF,kBAAA;EAAkB;;;;EAK5B,QAAA;EAIQ;;;EAAR,KAAA,GAAQ,YAAA;EAKgB;AAG1B;;;EAHE,KAAA,GAAQ,gBAAgB;AAAA;AAAA,KAGd,iCAAA,GACR,kBAAA,KACE,aAAA,EAAe,aAAA,KAAkB,kBAAA;AAAA,iBAEvB,WAAA,CACd,OAAA,GAAS,iCAAA,GACR,MAAM"}
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../src/plugin.ts"],"mappings":";;;;;;;;KAeY;;EAEV;;EAGA;;;;;KAiBG;;EAEH,OAAO;;EAGP,OAAO;;;;;;;;;;;KAYG;;EAEV;;;;;;EAOA,kBACE,MAAM,eACN,eAAe,eACf,QAAQ,cACR,4BACU;;KAGF;;;;;EAKV;;;;EAIA,QAAQ;;;;;EAKR,QAAQ;;KAGE,oCACR,uBACE,eAAe,kBAAkB;iBAEvB,YACd,UAAS,oCACR"}
package/dist/types.d.cts CHANGED
@@ -7,11 +7,17 @@
7
7
  * @see https://github.com/rolldown/rolldown/blob/main/packages/rolldown/src/types/rolldown-output.ts#L26
8
8
  */
9
9
  type SourceMap = {
10
- /** Name of the generated file this source map corresponds to. */file: string; /** Base64 VLQ-encoded string describing the source mappings. */
11
- mappings: string; /** Original symbol names referenced by the mappings. */
12
- names: string[]; /** Paths to the original source files. */
13
- sources: string[]; /** Optional inline content of each original source file, parallel to `sources`. */
14
- sourcesContent?: string[] | undefined; /** Source map specification version — always `3`. */
10
+ /** Name of the generated file this source map corresponds to. */
11
+ file: string;
12
+ /** Base64 VLQ-encoded string describing the source mappings. */
13
+ mappings: string;
14
+ /** Original symbol names referenced by the mappings. */
15
+ names: string[];
16
+ /** Paths to the original source files. */
17
+ sources: string[];
18
+ /** Optional inline content of each original source file, parallel to `sources`. */
19
+ sourcesContent?: string[] | undefined;
20
+ /** Source map specification version — always `3`. */
15
21
  version: number;
16
22
  };
17
23
  /**
@@ -21,19 +27,22 @@ type SourceMap = {
21
27
  * @see https://github.com/rolldown/rolldown/blob/main/packages/rolldown/src/types/rolldown-output.ts#L85
22
28
  */
23
29
  type OutputAsset = {
24
- type: 'asset'; /** The emitted file name of the asset relative to the output directory. */
30
+ type: 'asset';
31
+ /** The emitted file name of the asset relative to the output directory. */
25
32
  fileName: string;
26
33
  /**
27
34
  * The asset name, or `undefined` when not available.
28
35
  * @deprecated Use `names` instead.
29
36
  */
30
- name: string | undefined; /** All entry names that reference this asset. */
37
+ name: string | undefined;
38
+ /** All entry names that reference this asset. */
31
39
  names: string[];
32
40
  /**
33
41
  * The original file name of the source asset before any transformations, or `null` when not applicable.
34
42
  * @deprecated Use `originalFileNames` instead.
35
43
  */
36
- originalFileName: string | null; /** The original file names of the source assets before any transformations. */
44
+ originalFileName: string | null;
45
+ /** The original file names of the source assets before any transformations. */
37
46
  originalFileNames: string[];
38
47
  /**
39
48
  * The asset content as a string (text assets) or a `Uint8Array` (binary assets).
@@ -46,9 +55,12 @@ type OutputAsset = {
46
55
  *
47
56
  * @see https://github.com/rollup/rollup/issues/4774
48
57
  */
49
- needsCodeReference?: boolean; /** Vite - specific metadata */
58
+ needsCodeReference?: boolean;
59
+ /** Vite - specific metadata */
50
60
  viteMetadata?: {
51
- /** Set of asset file names imported by this asset (e.g. images referenced in CSS). */importedAssets: Set<string>; /** Set of CSS file names imported by this asset. */
61
+ /** Set of asset file names imported by this asset (e.g. images referenced in CSS). */
62
+ importedAssets: Set<string>;
63
+ /** Set of CSS file names imported by this asset. */
52
64
  importedCss: Set<string>;
53
65
  };
54
66
  };
@@ -63,10 +75,14 @@ type RenderedModule = {
63
75
  * module was fully tree-shaken.
64
76
  * Available only when options.stats.source = true (default false)
65
77
  */
66
- readonly code?: string | null; /** Size of the original module source in bytes, before any transformations. */
67
- originalLength: number; /** Rollup - exports removed from this module by tree-shaking. */
68
- removedExports?: string[]; /** Exports from this module that are retained in the final bundle. */
69
- renderedExports: string[]; /** Rollup - size of the rendered module code in bytes. */
78
+ readonly code?: string | null;
79
+ /** Size of the original module source in bytes, before any transformations. */
80
+ originalLength: number;
81
+ /** Rollup - exports removed from this module by tree-shaking. */
82
+ removedExports?: string[];
83
+ /** Exports from this module that are retained in the final bundle. */
84
+ renderedExports: string[];
85
+ /** Rollup - size of the rendered module code in bytes. */
70
86
  renderedLength?: number;
71
87
  };
72
88
  /**
@@ -76,30 +92,44 @@ type RenderedModule = {
76
92
  * @see https://github.com/rolldown/rolldown/blob/main/packages/rolldown/src/types/rolldown-output.ts#L85
77
93
  */
78
94
  type OutputChunk = {
79
- type: 'chunk'; /** The chunk name as used in `chunkFileNames` and `entryFileNames` patterns */
80
- name: string; /** The emitted file name of the chunk relative to the output directory. */
81
- fileName: string; /** The file name of this chunk before content hashes are applied. */
82
- preliminaryFileName: string; /** Rollup - file names of assets referenced via `import.meta.ROLLUP_FILE_URL_<id>` in this chunk. */
83
- referencedFiles?: string[]; /** The file name of the source map for this chunk, or `null` when source maps are not generated. */
84
- sourcemapFileName: string | null; /** Names exported by this chunk. */
95
+ type: 'chunk';
96
+ /** The chunk name as used in `chunkFileNames` and `entryFileNames` patterns */
97
+ name: string;
98
+ /** The emitted file name of the chunk relative to the output directory. */
99
+ fileName: string;
100
+ /** The file name of this chunk before content hashes are applied. */
101
+ preliminaryFileName: string;
102
+ /** Rollup - file names of assets referenced via `import.meta.ROLLUP_FILE_URL_<id>` in this chunk. */
103
+ referencedFiles?: string[];
104
+ /** The file name of the source map for this chunk, or `null` when source maps are not generated. */
105
+ sourcemapFileName: string | null;
106
+ /** Names exported by this chunk. */
85
107
  exports: string[];
86
108
  /**
87
109
  * The module ID of the entry point that this chunk acts as a facade for,
88
110
  * or `null` when this chunk is not an entry facade.
89
111
  */
90
- facadeModuleId: string | null; /** Rollup - file names of chunks that should be loaded before this implicit entry point. */
91
- implicitlyLoadedBefore?: string[]; /** Rollup - per-import binding names imported from each dependency chunk, keyed by the imported chunk's file name. */
92
- importedBindings?: Record<string, string[]>; /** Whether this chunk is a dynamic entry point (i.e. produced by a dynamic `import()`). */
93
- isDynamicEntry: boolean; /** Whether this chunk is a static entry point declared in the Vite/Rolldown/Rollup input options. */
94
- isEntry: boolean; /** Rollup - whether this chunk is an implicit entry point, loaded after another entry via `implicitlyLoadedAfterOneOf`. */
95
- isImplicitEntry?: boolean; /** File names of chunks that are dynamically imported by this chunk. */
96
- dynamicImports: string[]; /** File names of chunks that are statically imported by this chunk. */
112
+ facadeModuleId: string | null;
113
+ /** Rollup - file names of chunks that should be loaded before this implicit entry point. */
114
+ implicitlyLoadedBefore?: string[];
115
+ /** Rollup - per-import binding names imported from each dependency chunk, keyed by the imported chunk's file name. */
116
+ importedBindings?: Record<string, string[]>;
117
+ /** Whether this chunk is a dynamic entry point (i.e. produced by a dynamic `import()`). */
118
+ isDynamicEntry: boolean;
119
+ /** Whether this chunk is a static entry point declared in the Vite/Rolldown/Rollup input options. */
120
+ isEntry: boolean;
121
+ /** Rollup - whether this chunk is an implicit entry point, loaded after another entry via `implicitlyLoadedAfterOneOf`. */
122
+ isImplicitEntry?: boolean;
123
+ /** File names of chunks that are dynamically imported by this chunk. */
124
+ dynamicImports: string[];
125
+ /** File names of chunks that are statically imported by this chunk. */
97
126
  imports: string[];
98
127
  /**
99
128
  * Per-module render stats for every module included in this chunk,
100
129
  * keyed by the module's original file path.
101
130
  */
102
- modules: Record<string, RenderedModule>; /** IDs of all modules included in this chunk, in the order they appear in the bundle. */
131
+ modules: Record<string, RenderedModule>;
132
+ /** IDs of all modules included in this chunk, in the order they appear in the bundle. */
103
133
  moduleIds: string[];
104
134
  /**
105
135
  * The rendered JavaScript source code of this chunk.
@@ -110,9 +140,12 @@ type OutputChunk = {
110
140
  * Source map for this chunk, or `null` when source maps are not enabled.
111
141
  * Available when options.stats.source = true (default: false)
112
142
  */
113
- map?: SourceMap | null; /** Vite - Optional specific metadata */
143
+ map?: SourceMap | null;
144
+ /** Vite - Optional specific metadata */
114
145
  viteMetadata?: {
115
- /** Set of asset file names imported by this chunk (e.g. images, fonts). */importedAssets: Set<string>; /** Set of CSS file names imported by this chunk. */
146
+ /** Set of asset file names imported by this chunk (e.g. images, fonts). */
147
+ importedAssets: Set<string>;
148
+ /** Set of CSS file names imported by this chunk. */
116
149
  importedCss: Set<string>;
117
150
  };
118
151
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","names":[],"sources":["../src/types.ts"],"mappings":";;AAOA;;;;;;KAAY,SAAA;EAQV,iEANA,IAAA,UAUA;EARA,QAAA,UAQO;EANP,KAAA,YAeqB;EAbrB,OAAA,YAyCkB;EAvClB,cAAA,yBAsDe;EApDf,OAAA;AAAA;;;;;;;KASU,WAAA;EACV,IAAA,WAmCA;EAhCA,QAAA;EAqCE;;;;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AGA;;EAGA;;EAGA;;EAGA;;EAGA;;;;;EAMA;;EAGA;;EAGA,mBAAmB;;EAGnB;;EAGA;;EAGA;;EAGA;;EAGA;;;;;EAMA,SAAS,eAAe;;EAGxB;;;;;EAMA;;;;;EAMA,MAAM;;EAGN;;IAEE,gBAAgB;;IAEhB,aAAa;;;;;;;KAQL,eAAe,eAAe,cAAc"}
package/dist/types.d.mts CHANGED
@@ -7,11 +7,17 @@
7
7
  * @see https://github.com/rolldown/rolldown/blob/main/packages/rolldown/src/types/rolldown-output.ts#L26
8
8
  */
9
9
  type SourceMap = {
10
- /** Name of the generated file this source map corresponds to. */file: string; /** Base64 VLQ-encoded string describing the source mappings. */
11
- mappings: string; /** Original symbol names referenced by the mappings. */
12
- names: string[]; /** Paths to the original source files. */
13
- sources: string[]; /** Optional inline content of each original source file, parallel to `sources`. */
14
- sourcesContent?: string[] | undefined; /** Source map specification version — always `3`. */
10
+ /** Name of the generated file this source map corresponds to. */
11
+ file: string;
12
+ /** Base64 VLQ-encoded string describing the source mappings. */
13
+ mappings: string;
14
+ /** Original symbol names referenced by the mappings. */
15
+ names: string[];
16
+ /** Paths to the original source files. */
17
+ sources: string[];
18
+ /** Optional inline content of each original source file, parallel to `sources`. */
19
+ sourcesContent?: string[] | undefined;
20
+ /** Source map specification version — always `3`. */
15
21
  version: number;
16
22
  };
17
23
  /**
@@ -21,19 +27,22 @@ type SourceMap = {
21
27
  * @see https://github.com/rolldown/rolldown/blob/main/packages/rolldown/src/types/rolldown-output.ts#L85
22
28
  */
23
29
  type OutputAsset = {
24
- type: 'asset'; /** The emitted file name of the asset relative to the output directory. */
30
+ type: 'asset';
31
+ /** The emitted file name of the asset relative to the output directory. */
25
32
  fileName: string;
26
33
  /**
27
34
  * The asset name, or `undefined` when not available.
28
35
  * @deprecated Use `names` instead.
29
36
  */
30
- name: string | undefined; /** All entry names that reference this asset. */
37
+ name: string | undefined;
38
+ /** All entry names that reference this asset. */
31
39
  names: string[];
32
40
  /**
33
41
  * The original file name of the source asset before any transformations, or `null` when not applicable.
34
42
  * @deprecated Use `originalFileNames` instead.
35
43
  */
36
- originalFileName: string | null; /** The original file names of the source assets before any transformations. */
44
+ originalFileName: string | null;
45
+ /** The original file names of the source assets before any transformations. */
37
46
  originalFileNames: string[];
38
47
  /**
39
48
  * The asset content as a string (text assets) or a `Uint8Array` (binary assets).
@@ -46,9 +55,12 @@ type OutputAsset = {
46
55
  *
47
56
  * @see https://github.com/rollup/rollup/issues/4774
48
57
  */
49
- needsCodeReference?: boolean; /** Vite - specific metadata */
58
+ needsCodeReference?: boolean;
59
+ /** Vite - specific metadata */
50
60
  viteMetadata?: {
51
- /** Set of asset file names imported by this asset (e.g. images referenced in CSS). */importedAssets: Set<string>; /** Set of CSS file names imported by this asset. */
61
+ /** Set of asset file names imported by this asset (e.g. images referenced in CSS). */
62
+ importedAssets: Set<string>;
63
+ /** Set of CSS file names imported by this asset. */
52
64
  importedCss: Set<string>;
53
65
  };
54
66
  };
@@ -63,10 +75,14 @@ type RenderedModule = {
63
75
  * module was fully tree-shaken.
64
76
  * Available only when options.stats.source = true (default false)
65
77
  */
66
- readonly code?: string | null; /** Size of the original module source in bytes, before any transformations. */
67
- originalLength: number; /** Rollup - exports removed from this module by tree-shaking. */
68
- removedExports?: string[]; /** Exports from this module that are retained in the final bundle. */
69
- renderedExports: string[]; /** Rollup - size of the rendered module code in bytes. */
78
+ readonly code?: string | null;
79
+ /** Size of the original module source in bytes, before any transformations. */
80
+ originalLength: number;
81
+ /** Rollup - exports removed from this module by tree-shaking. */
82
+ removedExports?: string[];
83
+ /** Exports from this module that are retained in the final bundle. */
84
+ renderedExports: string[];
85
+ /** Rollup - size of the rendered module code in bytes. */
70
86
  renderedLength?: number;
71
87
  };
72
88
  /**
@@ -76,30 +92,44 @@ type RenderedModule = {
76
92
  * @see https://github.com/rolldown/rolldown/blob/main/packages/rolldown/src/types/rolldown-output.ts#L85
77
93
  */
78
94
  type OutputChunk = {
79
- type: 'chunk'; /** The chunk name as used in `chunkFileNames` and `entryFileNames` patterns */
80
- name: string; /** The emitted file name of the chunk relative to the output directory. */
81
- fileName: string; /** The file name of this chunk before content hashes are applied. */
82
- preliminaryFileName: string; /** Rollup - file names of assets referenced via `import.meta.ROLLUP_FILE_URL_<id>` in this chunk. */
83
- referencedFiles?: string[]; /** The file name of the source map for this chunk, or `null` when source maps are not generated. */
84
- sourcemapFileName: string | null; /** Names exported by this chunk. */
95
+ type: 'chunk';
96
+ /** The chunk name as used in `chunkFileNames` and `entryFileNames` patterns */
97
+ name: string;
98
+ /** The emitted file name of the chunk relative to the output directory. */
99
+ fileName: string;
100
+ /** The file name of this chunk before content hashes are applied. */
101
+ preliminaryFileName: string;
102
+ /** Rollup - file names of assets referenced via `import.meta.ROLLUP_FILE_URL_<id>` in this chunk. */
103
+ referencedFiles?: string[];
104
+ /** The file name of the source map for this chunk, or `null` when source maps are not generated. */
105
+ sourcemapFileName: string | null;
106
+ /** Names exported by this chunk. */
85
107
  exports: string[];
86
108
  /**
87
109
  * The module ID of the entry point that this chunk acts as a facade for,
88
110
  * or `null` when this chunk is not an entry facade.
89
111
  */
90
- facadeModuleId: string | null; /** Rollup - file names of chunks that should be loaded before this implicit entry point. */
91
- implicitlyLoadedBefore?: string[]; /** Rollup - per-import binding names imported from each dependency chunk, keyed by the imported chunk's file name. */
92
- importedBindings?: Record<string, string[]>; /** Whether this chunk is a dynamic entry point (i.e. produced by a dynamic `import()`). */
93
- isDynamicEntry: boolean; /** Whether this chunk is a static entry point declared in the Vite/Rolldown/Rollup input options. */
94
- isEntry: boolean; /** Rollup - whether this chunk is an implicit entry point, loaded after another entry via `implicitlyLoadedAfterOneOf`. */
95
- isImplicitEntry?: boolean; /** File names of chunks that are dynamically imported by this chunk. */
96
- dynamicImports: string[]; /** File names of chunks that are statically imported by this chunk. */
112
+ facadeModuleId: string | null;
113
+ /** Rollup - file names of chunks that should be loaded before this implicit entry point. */
114
+ implicitlyLoadedBefore?: string[];
115
+ /** Rollup - per-import binding names imported from each dependency chunk, keyed by the imported chunk's file name. */
116
+ importedBindings?: Record<string, string[]>;
117
+ /** Whether this chunk is a dynamic entry point (i.e. produced by a dynamic `import()`). */
118
+ isDynamicEntry: boolean;
119
+ /** Whether this chunk is a static entry point declared in the Vite/Rolldown/Rollup input options. */
120
+ isEntry: boolean;
121
+ /** Rollup - whether this chunk is an implicit entry point, loaded after another entry via `implicitlyLoadedAfterOneOf`. */
122
+ isImplicitEntry?: boolean;
123
+ /** File names of chunks that are dynamically imported by this chunk. */
124
+ dynamicImports: string[];
125
+ /** File names of chunks that are statically imported by this chunk. */
97
126
  imports: string[];
98
127
  /**
99
128
  * Per-module render stats for every module included in this chunk,
100
129
  * keyed by the module's original file path.
101
130
  */
102
- modules: Record<string, RenderedModule>; /** IDs of all modules included in this chunk, in the order they appear in the bundle. */
131
+ modules: Record<string, RenderedModule>;
132
+ /** IDs of all modules included in this chunk, in the order they appear in the bundle. */
103
133
  moduleIds: string[];
104
134
  /**
105
135
  * The rendered JavaScript source code of this chunk.
@@ -110,9 +140,12 @@ type OutputChunk = {
110
140
  * Source map for this chunk, or `null` when source maps are not enabled.
111
141
  * Available when options.stats.source = true (default: false)
112
142
  */
113
- map?: SourceMap | null; /** Vite - Optional specific metadata */
143
+ map?: SourceMap | null;
144
+ /** Vite - Optional specific metadata */
114
145
  viteMetadata?: {
115
- /** Set of asset file names imported by this chunk (e.g. images, fonts). */importedAssets: Set<string>; /** Set of CSS file names imported by this chunk. */
146
+ /** Set of asset file names imported by this chunk (e.g. images, fonts). */
147
+ importedAssets: Set<string>;
148
+ /** Set of CSS file names imported by this chunk. */
116
149
  importedCss: Set<string>;
117
150
  };
118
151
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.mts","names":[],"sources":["../src/types.ts"],"mappings":";;AAOA;;;;;;KAAY,SAAA;EAQV,iEANA,IAAA,UAUA;EARA,QAAA,UAQO;EANP,KAAA,YAeqB;EAbrB,OAAA,YAyCkB;EAvClB,cA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B,aAAa;;;;;;;;KASL;;;;;;WAMD;;EAGT;;EAGA;;EAGA;;EAGA;;;;;;;;KASU;EACV;;EAGA;;EAGA;;EAGA;;EAGA;;EAGA;;EAGA;;;;;EAMA;;EAGA;;EAGA,mBAAmB;;EAGnB;;EAGA;;EAGA;;EAGA;;EAGA;;;;;EAMA,SAAS,eAAe;;EAGxB;;;;;EAMA;;;;;EAMA,MAAM;;EAGN;;IAEE,gBAAgB;;IAEhB,aAAa;;;;;;;KAQL,eAAe,eAAe,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"check-exclude-filepath.d.cts","names":[],"sources":["../../src/utils/check-exclude-filepath.ts"],"mappings":";KAAK,oBAAA,YAAgC,MAAM,KAAK,QAAgB;AAAA,KAEpD,uBAAA,GACR,oBAAA,GACA,KAAA,CAAM,oBAAA"}
1
+ {"version":3,"file":"check-exclude-filepath.d.cts","names":[],"sources":["../../src/utils/check-exclude-filepath.ts"],"mappings":";KAAK,gCAAgC,WAAW;KAEpC,0BACR,uBACA,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"check-exclude-filepath.d.mts","names":[],"sources":["../../src/utils/check-exclude-filepath.ts"],"mappings":";KAAK,oBAAA,YAAgC,MAAM,KAAK,QAAgB;AAAA,KAEpD,uBAAA,GACR,oBAAA,GACA,KAAA,CAAM,oBAAA"}
1
+ {"version":3,"file":"check-exclude-filepath.d.mts","names":[],"sources":["../../src/utils/check-exclude-filepath.ts"],"mappings":";KAAK,gCAAgC,WAAW;KAEpC,0BACR,uBACA,MAAM"}
package/dist/write.d.cts CHANGED
@@ -5,5 +5,5 @@ type RollupStatsWriteResponse = {
5
5
  };
6
6
  type RollupStatsWrite = (filepath: string, stats: Record<string, unknown>) => RollupStatsWriteResponse;
7
7
  //#endregion
8
- export { RollupStatsWrite };
8
+ export { RollupStatsWrite, RollupStatsWriteResponse };
9
9
  //# sourceMappingURL=write.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"write.d.cts","names":[],"sources":["../src/write.ts"],"mappings":";KAGY,wBAAA;EACV,QAAA;EACA,OAAO;AAAA;AAAA,KAGG,gBAAA,IACV,QAAA,UACA,KAAA,EAAO,MAAA,sBACJ,wBAAwB"}
1
+ {"version":3,"file":"write.d.cts","names":[],"sources":["../src/write.ts"],"mappings":";KAGY;EACV;EACA;;KAGU,oBACV,kBACA,OAAO,4BACJ"}
package/dist/write.d.mts CHANGED
@@ -5,5 +5,5 @@ type RollupStatsWriteResponse = {
5
5
  };
6
6
  type RollupStatsWrite = (filepath: string, stats: Record<string, unknown>) => RollupStatsWriteResponse;
7
7
  //#endregion
8
- export { RollupStatsWrite };
8
+ export { RollupStatsWrite, RollupStatsWriteResponse };
9
9
  //# sourceMappingURL=write.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"write.d.mts","names":[],"sources":["../src/write.ts"],"mappings":";KAGY,wBAAA;EACV,QAAA;EACA,OAAO;AAAA;AAAA,KAGG,gBAAA,IACV,QAAA,UACA,KAAA,EAAO,MAAA,sBACJ,wBAAwB"}
1
+ {"version":3,"file":"write.d.mts","names":[],"sources":["../src/write.ts"],"mappings":";KAGY;EACV;EACA;;KAGU,oBACV,kBACA,OAAO,4BACJ"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rollup-plugin-stats",
3
3
  "description": "Vite/Rolldown/Rollup plugin to generate bundle stats JSON file",
4
- "version": "3.0.0-beta.1",
4
+ "version": "3.0.0-beta.2",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "repository": {
@@ -75,22 +75,22 @@
75
75
  "@eslint/js": "10.0.1",
76
76
  "@release-it/conventional-changelog": "11.0.1",
77
77
  "@types/deep-freeze-strict": "1.1.2",
78
- "@types/node": "26.0.0",
78
+ "@types/node": "26.1.1",
79
79
  "deep-freeze-strict": "1.1.1",
80
- "eslint": "10.5.0",
80
+ "eslint": "10.7.0",
81
81
  "eslint-config-prettier": "10.1.8",
82
- "globals": "17.6.0",
82
+ "globals": "17.7.0",
83
83
  "husky": "9.1.7",
84
- "lint-staged": "17.0.7",
85
- "memfs": "4.57.7",
86
- "prettier": "3.8.4",
87
- "release-it": "20.2.0",
84
+ "lint-staged": "17.2.0",
85
+ "memfs": "4.64.0",
86
+ "prettier": "3.9.6",
87
+ "release-it": "20.2.1",
88
88
  "rimraf": "6.1.3",
89
- "tsdown": "0.22.3",
89
+ "tsdown": "0.22.14",
90
90
  "typescript": "6.0.3",
91
- "typescript-eslint": "8.61.1",
92
- "vite": "8.0.16",
93
- "vitest": "4.1.9"
91
+ "typescript-eslint": "8.65.0",
92
+ "vite": "8.1.5",
93
+ "vitest": "4.1.10"
94
94
  },
95
95
  "peerDependencies": {
96
96
  "rolldown": "^1.0.0-beta.0",