@atlaspack/reporter-bundle-stats 2.14.5-canary.20 → 2.14.5-canary.200
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,234 @@
|
|
|
1
1
|
# @atlaspack/reporter-bundle-stats
|
|
2
2
|
|
|
3
|
+
## 2.14.32
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#785](https://github.com/atlassian-labs/atlaspack/pull/785) [`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922) Thanks [@matt-koko](https://github.com/matt-koko)! - We need to re-publish every package in Atlaspack with the corrected types field.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922), [`686a398`](https://github.com/atlassian-labs/atlaspack/commit/686a398faa1f9e19cbf9274add2c46e246bafba8)]:
|
|
10
|
+
- @atlaspack/core@2.24.1
|
|
11
|
+
- @atlaspack/plugin@2.14.31
|
|
12
|
+
- @atlaspack/utils@2.19.3
|
|
13
|
+
|
|
14
|
+
## 2.14.31
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`eedcbc4`](https://github.com/atlassian-labs/atlaspack/commit/eedcbc408fc1e86a2a8e25f1a41c57146d8529e1), [`5a0363f`](https://github.com/atlassian-labs/atlaspack/commit/5a0363f1086e81068959b87e92064bed5a11a9b4), [`038e87a`](https://github.com/atlassian-labs/atlaspack/commit/038e87a7858d39556d59d3a2d17db534d45f62c6), [`f6532d7`](https://github.com/atlassian-labs/atlaspack/commit/f6532d7a4f7f007bd4e5e36af04dd466f0b9f572), [`8604d2a`](https://github.com/atlassian-labs/atlaspack/commit/8604d2a49ace5e9194ec4f76e71f06b93610f6b4)]:
|
|
19
|
+
- @atlaspack/core@2.24.0
|
|
20
|
+
- @atlaspack/utils@2.19.2
|
|
21
|
+
- @atlaspack/plugin@2.14.30
|
|
22
|
+
|
|
23
|
+
## 2.14.30
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies []:
|
|
28
|
+
- @atlaspack/core@2.23.5
|
|
29
|
+
- @atlaspack/utils@2.19.1
|
|
30
|
+
- @atlaspack/plugin@2.14.29
|
|
31
|
+
|
|
32
|
+
## 2.14.29
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- Updated dependencies [[`f0349a6`](https://github.com/atlassian-labs/atlaspack/commit/f0349a6b9b04755088f121095ca6301a2ada3767)]:
|
|
37
|
+
- @atlaspack/utils@2.19.0
|
|
38
|
+
- @atlaspack/core@2.23.4
|
|
39
|
+
- @atlaspack/plugin@2.14.28
|
|
40
|
+
|
|
41
|
+
## 2.14.28
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- Updated dependencies []:
|
|
46
|
+
- @atlaspack/core@2.23.3
|
|
47
|
+
- @atlaspack/utils@2.18.4
|
|
48
|
+
- @atlaspack/plugin@2.14.27
|
|
49
|
+
|
|
50
|
+
## 2.14.27
|
|
51
|
+
|
|
52
|
+
### Patch Changes
|
|
53
|
+
|
|
54
|
+
- [#742](https://github.com/atlassian-labs/atlaspack/pull/742) [`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd) Thanks [@yamadapc](https://github.com/yamadapc)! - Internal changes and bug fixes to environmentDeduplication flag
|
|
55
|
+
|
|
56
|
+
- Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd), [`889c65c`](https://github.com/atlassian-labs/atlaspack/commit/889c65cd25b811045e26a117e7404f694dde77a2), [`b6e72b6`](https://github.com/atlassian-labs/atlaspack/commit/b6e72b6dd2b517cbb0e700fa69e63332d3eacb1e)]:
|
|
57
|
+
- @atlaspack/plugin@2.14.26
|
|
58
|
+
- @atlaspack/utils@2.18.3
|
|
59
|
+
- @atlaspack/core@2.23.2
|
|
60
|
+
|
|
61
|
+
## 2.14.26
|
|
62
|
+
|
|
63
|
+
### Patch Changes
|
|
64
|
+
|
|
65
|
+
- Updated dependencies []:
|
|
66
|
+
- @atlaspack/core@2.23.1
|
|
67
|
+
- @atlaspack/utils@2.18.2
|
|
68
|
+
- @atlaspack/plugin@2.14.25
|
|
69
|
+
|
|
70
|
+
## 2.14.25
|
|
71
|
+
|
|
72
|
+
### Patch Changes
|
|
73
|
+
|
|
74
|
+
- Updated dependencies [[`7f5841c`](https://github.com/atlassian-labs/atlaspack/commit/7f5841c39df049f9546cccbeea2a7337e0337b45)]:
|
|
75
|
+
- @atlaspack/core@2.23.0
|
|
76
|
+
- @atlaspack/utils@2.18.1
|
|
77
|
+
- @atlaspack/plugin@2.14.24
|
|
78
|
+
|
|
79
|
+
## 2.14.24
|
|
80
|
+
|
|
81
|
+
### Patch Changes
|
|
82
|
+
|
|
83
|
+
- Updated dependencies [[`23d561e`](https://github.com/atlassian-labs/atlaspack/commit/23d561e51e68b0c38fd1ff4e4fb173e5e7b01cf2)]:
|
|
84
|
+
- @atlaspack/utils@2.18.0
|
|
85
|
+
- @atlaspack/core@2.22.0
|
|
86
|
+
- @atlaspack/plugin@2.14.23
|
|
87
|
+
|
|
88
|
+
## 2.14.23
|
|
89
|
+
|
|
90
|
+
### Patch Changes
|
|
91
|
+
|
|
92
|
+
- [#720](https://github.com/atlassian-labs/atlaspack/pull/720) [`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94) Thanks [@alshdavid](https://github.com/alshdavid)! - Migrate to TypeScript
|
|
93
|
+
|
|
94
|
+
- Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94), [`43fdd22`](https://github.com/atlassian-labs/atlaspack/commit/43fdd223860fbc97af17d68c65419b97412cb888), [`12bee0e`](https://github.com/atlassian-labs/atlaspack/commit/12bee0e23f0464d7f6bd3e24fbe0d19c126d587d)]:
|
|
95
|
+
- @atlaspack/plugin@2.14.22
|
|
96
|
+
- @atlaspack/utils@2.17.4
|
|
97
|
+
- @atlaspack/core@2.21.0
|
|
98
|
+
|
|
99
|
+
## 2.14.22
|
|
100
|
+
|
|
101
|
+
### Patch Changes
|
|
102
|
+
|
|
103
|
+
- Updated dependencies [[`069de47`](https://github.com/atlassian-labs/atlaspack/commit/069de478e64fb5889f6f2ce023eb510782767fbd)]:
|
|
104
|
+
- @atlaspack/core@2.20.0
|
|
105
|
+
- @atlaspack/utils@2.17.3
|
|
106
|
+
- @atlaspack/plugin@2.14.21
|
|
107
|
+
|
|
108
|
+
## 2.14.21
|
|
109
|
+
|
|
110
|
+
### Patch Changes
|
|
111
|
+
|
|
112
|
+
- Updated dependencies [[`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa), [`a0b959f`](https://github.com/atlassian-labs/atlaspack/commit/a0b959fbf61fc3f820ff03c7e8988945fe40a91a)]:
|
|
113
|
+
- @atlaspack/plugin@2.14.20
|
|
114
|
+
- @atlaspack/core@2.19.2
|
|
115
|
+
- @atlaspack/utils@2.17.2
|
|
116
|
+
|
|
117
|
+
## 2.14.20
|
|
118
|
+
|
|
119
|
+
### Patch Changes
|
|
120
|
+
|
|
121
|
+
- Updated dependencies []:
|
|
122
|
+
- @atlaspack/core@2.19.1
|
|
123
|
+
- @atlaspack/utils@2.17.1
|
|
124
|
+
- @atlaspack/plugin@2.14.19
|
|
125
|
+
|
|
126
|
+
## 2.14.19
|
|
127
|
+
|
|
128
|
+
### Patch Changes
|
|
129
|
+
|
|
130
|
+
- Updated dependencies [[`dbb4072`](https://github.com/atlassian-labs/atlaspack/commit/dbb40721ebeb45990a14ba04e6b44e7f836fb32d), [`c4415a4`](https://github.com/atlassian-labs/atlaspack/commit/c4415a455543d984ca28452c2cb87a794d22497c), [`f0f7c71`](https://github.com/atlassian-labs/atlaspack/commit/f0f7c7168a1d3d18c6f30d2daed611275692b7c5), [`de23e0c`](https://github.com/atlassian-labs/atlaspack/commit/de23e0ce49d5504fe3947ac26640a3d951087da3), [`18a57cf`](https://github.com/atlassian-labs/atlaspack/commit/18a57cf8a4789b2de5ad8e2676f317a26cc91417), [`a5ed1b4`](https://github.com/atlassian-labs/atlaspack/commit/a5ed1b414498560f393ff491af4da25b6e8dde56), [`3ba1aee`](https://github.com/atlassian-labs/atlaspack/commit/3ba1aee6a794a26b2f0255aaf6d003981532d0ae)]:
|
|
131
|
+
- @atlaspack/utils@2.17.0
|
|
132
|
+
- @atlaspack/core@2.19.0
|
|
133
|
+
- @atlaspack/plugin@2.14.18
|
|
134
|
+
|
|
135
|
+
## 2.14.18
|
|
136
|
+
|
|
137
|
+
### Patch Changes
|
|
138
|
+
|
|
139
|
+
- Updated dependencies []:
|
|
140
|
+
- @atlaspack/core@2.18.8
|
|
141
|
+
- @atlaspack/utils@2.16.1
|
|
142
|
+
- @atlaspack/plugin@2.14.17
|
|
143
|
+
|
|
144
|
+
## 2.14.17
|
|
145
|
+
|
|
146
|
+
### Patch Changes
|
|
147
|
+
|
|
148
|
+
- Updated dependencies [[`1ff31f1`](https://github.com/atlassian-labs/atlaspack/commit/1ff31f10391c48780c9fcfc243b4e828a1b285e0), [`e8a60ff`](https://github.com/atlassian-labs/atlaspack/commit/e8a60ffbea41caef265786bbf73349771760081c), [`30ee2cf`](https://github.com/atlassian-labs/atlaspack/commit/30ee2cfcd34cf2646ded0eda13fdb80a2a5de529)]:
|
|
149
|
+
- @atlaspack/core@2.18.7
|
|
150
|
+
- @atlaspack/utils@2.16.0
|
|
151
|
+
- @atlaspack/plugin@2.14.16
|
|
152
|
+
|
|
153
|
+
## 2.14.16
|
|
154
|
+
|
|
155
|
+
### Patch Changes
|
|
156
|
+
|
|
157
|
+
- Updated dependencies [[`5ded263`](https://github.com/atlassian-labs/atlaspack/commit/5ded263c7f11b866e8885b81c73e20dd060b25be), [`74fd942`](https://github.com/atlassian-labs/atlaspack/commit/74fd94236ac697207082c4b755b079e56f5564fb)]:
|
|
158
|
+
- @atlaspack/core@2.18.6
|
|
159
|
+
- @atlaspack/utils@2.15.3
|
|
160
|
+
- @atlaspack/plugin@2.14.15
|
|
161
|
+
|
|
162
|
+
## 2.14.15
|
|
163
|
+
|
|
164
|
+
### Patch Changes
|
|
165
|
+
|
|
166
|
+
- Updated dependencies [[`644b157`](https://github.com/atlassian-labs/atlaspack/commit/644b157dee72a871acc2d0facf0b87b8eea51956)]:
|
|
167
|
+
- @atlaspack/core@2.18.5
|
|
168
|
+
- @atlaspack/utils@2.15.2
|
|
169
|
+
- @atlaspack/plugin@2.14.14
|
|
170
|
+
|
|
171
|
+
## 2.14.14
|
|
172
|
+
|
|
173
|
+
### Patch Changes
|
|
174
|
+
|
|
175
|
+
- Updated dependencies [[`ef3d622`](https://github.com/atlassian-labs/atlaspack/commit/ef3d6228f4e006702198a19c61e051d194d325cb), [`6b1f5ff`](https://github.com/atlassian-labs/atlaspack/commit/6b1f5fff68d7131fae075e14f4d2c02606dc6058), [`26aa9c5`](https://github.com/atlassian-labs/atlaspack/commit/26aa9c599d2be45ce1438a74c5fa22f39b9b554b), [`c8f7df4`](https://github.com/atlassian-labs/atlaspack/commit/c8f7df4eadfc4718040fceb065dae6e96a4051e7), [`0501255`](https://github.com/atlassian-labs/atlaspack/commit/05012550da35b05ce7d356a8cc29311e7f9afdca)]:
|
|
176
|
+
- @atlaspack/core@2.18.4
|
|
177
|
+
- @atlaspack/utils@2.15.1
|
|
178
|
+
- @atlaspack/plugin@2.14.13
|
|
179
|
+
|
|
180
|
+
## 2.14.13
|
|
181
|
+
|
|
182
|
+
### Patch Changes
|
|
183
|
+
|
|
184
|
+
- Updated dependencies [[`e39c6cf`](https://github.com/atlassian-labs/atlaspack/commit/e39c6cf05f7e95ce5420dbcea66f401b1cbd397c)]:
|
|
185
|
+
- @atlaspack/utils@2.15.0
|
|
186
|
+
- @atlaspack/core@2.18.3
|
|
187
|
+
- @atlaspack/plugin@2.14.12
|
|
188
|
+
|
|
189
|
+
## 2.14.12
|
|
190
|
+
|
|
191
|
+
### Patch Changes
|
|
192
|
+
|
|
193
|
+
- Updated dependencies []:
|
|
194
|
+
- @atlaspack/core@2.18.2
|
|
195
|
+
- @atlaspack/utils@2.14.11
|
|
196
|
+
- @atlaspack/plugin@2.14.11
|
|
197
|
+
|
|
198
|
+
## 2.14.11
|
|
199
|
+
|
|
200
|
+
### Patch Changes
|
|
201
|
+
|
|
202
|
+
- Updated dependencies []:
|
|
203
|
+
- @atlaspack/core@2.18.1
|
|
204
|
+
|
|
205
|
+
## 2.14.10
|
|
206
|
+
|
|
207
|
+
### Patch Changes
|
|
208
|
+
|
|
209
|
+
- Updated dependencies [[`51aba5f`](https://github.com/atlassian-labs/atlaspack/commit/51aba5fc0e49235ee06bbc3c376f48c3e7da5c4b), [`1e32d4e`](https://github.com/atlassian-labs/atlaspack/commit/1e32d4eae6b3af3968e8a0ef97d35b4347fd4196), [`0b2f6f5`](https://github.com/atlassian-labs/atlaspack/commit/0b2f6f55794d3ff6e2f5a41f963e7e5dd8ad9f8d), [`6dd4ccb`](https://github.com/atlassian-labs/atlaspack/commit/6dd4ccb753541de32322d881f973d571dd57e4ca)]:
|
|
210
|
+
- @atlaspack/core@2.18.0
|
|
211
|
+
- @atlaspack/plugin@2.14.10
|
|
212
|
+
- @atlaspack/utils@2.14.10
|
|
213
|
+
|
|
214
|
+
## 2.14.9
|
|
215
|
+
|
|
216
|
+
### Patch Changes
|
|
217
|
+
|
|
218
|
+
- Updated dependencies [[`1940859`](https://github.com/atlassian-labs/atlaspack/commit/194085942f0e86532e9d039fc3f8039badce4594), [`15b6155`](https://github.com/atlassian-labs/atlaspack/commit/15b61556e9114203ebbc9de94b864118ca764598), [`209692f`](https://github.com/atlassian-labs/atlaspack/commit/209692ffb11eae103a0d65c5e1118a5aa1625818), [`d04de26`](https://github.com/atlassian-labs/atlaspack/commit/d04de26af684d7abfba5091fbe3df16a12cd0ebc)]:
|
|
219
|
+
- @atlaspack/core@2.17.4
|
|
220
|
+
- @atlaspack/utils@2.14.9
|
|
221
|
+
- @atlaspack/plugin@2.14.9
|
|
222
|
+
|
|
223
|
+
## 2.14.8
|
|
224
|
+
|
|
225
|
+
### Patch Changes
|
|
226
|
+
|
|
227
|
+
- Updated dependencies [[`30f6017`](https://github.com/atlassian-labs/atlaspack/commit/30f60175ba4d272c5fc193973c63bc298584775b), [`3a3e8e7`](https://github.com/atlassian-labs/atlaspack/commit/3a3e8e7be9e2dffd7304436d792f0f595d59665a), [`15c1e3c`](https://github.com/atlassian-labs/atlaspack/commit/15c1e3c0628bae4c768d76cf3afc53d6d0d7ce7c)]:
|
|
228
|
+
- @atlaspack/core@2.17.3
|
|
229
|
+
- @atlaspack/utils@2.14.8
|
|
230
|
+
- @atlaspack/plugin@2.14.8
|
|
231
|
+
|
|
3
232
|
## 2.14.7
|
|
4
233
|
|
|
5
234
|
### Patch Changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { PackagedBundle, PluginOptions } from '@atlaspack/types';
|
|
2
|
+
import { Reporter } from '@atlaspack/plugin';
|
|
3
|
+
export type AssetStat = {
|
|
4
|
+
size: number;
|
|
5
|
+
name: string;
|
|
6
|
+
bundles: Array<string>;
|
|
7
|
+
};
|
|
8
|
+
export type BundleStat = {
|
|
9
|
+
size: number;
|
|
10
|
+
id: string;
|
|
11
|
+
assets: Array<string>;
|
|
12
|
+
};
|
|
13
|
+
export type BundleStats = {
|
|
14
|
+
bundles: {
|
|
15
|
+
[key: string]: BundleStat;
|
|
16
|
+
};
|
|
17
|
+
assets: {
|
|
18
|
+
[key: string]: AssetStat;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
declare const _default: Reporter;
|
|
22
|
+
export default _default;
|
|
23
|
+
export declare function getBundleStats(bundles: Array<PackagedBundle>, options: PluginOptions): BundleStats;
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/reporter-bundle-stats",
|
|
3
|
-
"version": "2.14.5-canary.
|
|
3
|
+
"version": "2.14.5-canary.200+10ee3fa5b",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"main": "lib/BundleStatsReporter.js",
|
|
8
|
-
"source": "src/BundleStatsReporter.
|
|
7
|
+
"main": "./lib/BundleStatsReporter.js",
|
|
8
|
+
"source": "./src/BundleStatsReporter.ts",
|
|
9
|
+
"types": "./lib/types/BundleStatsReporter.d.ts",
|
|
9
10
|
"bin": {
|
|
10
11
|
"atlaspack-bundle-stats": "bin.js"
|
|
11
12
|
},
|
|
@@ -13,13 +14,17 @@
|
|
|
13
14
|
"node": ">= 16.0.0"
|
|
14
15
|
},
|
|
15
16
|
"dependencies": {
|
|
16
|
-
"@atlaspack/core": "2.16.2-canary.
|
|
17
|
-
"@atlaspack/plugin": "2.14.5-canary.
|
|
18
|
-
"@atlaspack/utils": "2.14.5-canary.
|
|
17
|
+
"@atlaspack/core": "2.16.2-canary.200+10ee3fa5b",
|
|
18
|
+
"@atlaspack/plugin": "2.14.5-canary.200+10ee3fa5b",
|
|
19
|
+
"@atlaspack/utils": "2.14.5-canary.200+10ee3fa5b"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
|
21
|
-
"@atlaspack/types": "2.14.5-canary.
|
|
22
|
+
"@atlaspack/types": "2.14.5-canary.200+10ee3fa5b"
|
|
22
23
|
},
|
|
23
24
|
"type": "commonjs",
|
|
24
|
-
"
|
|
25
|
-
|
|
25
|
+
"scripts": {
|
|
26
|
+
"check-ts": "tsc --emitDeclarationOnly --rootDir src",
|
|
27
|
+
"build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
|
|
28
|
+
},
|
|
29
|
+
"gitHead": "10ee3fa5b75a92acde8973673d9b3c5b6f3958e5"
|
|
30
|
+
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @flow strict-local
|
|
2
|
-
|
|
3
1
|
import type {PackagedBundle, PluginOptions} from '@atlaspack/types';
|
|
4
2
|
|
|
5
3
|
import {Reporter} from '@atlaspack/plugin';
|
|
@@ -8,24 +6,28 @@ import {DefaultMap} from '@atlaspack/utils';
|
|
|
8
6
|
import assert from 'assert';
|
|
9
7
|
import path from 'path';
|
|
10
8
|
|
|
11
|
-
export type AssetStat = {
|
|
12
|
-
size: number
|
|
13
|
-
name: string
|
|
14
|
-
bundles: Array<string
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export type BundleStat = {
|
|
18
|
-
size: number
|
|
19
|
-
id: string
|
|
20
|
-
assets: Array<string
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export type BundleStats = {
|
|
24
|
-
bundles: {
|
|
25
|
-
|
|
26
|
-
|
|
9
|
+
export type AssetStat = {
|
|
10
|
+
size: number;
|
|
11
|
+
name: string;
|
|
12
|
+
bundles: Array<string>;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type BundleStat = {
|
|
16
|
+
size: number;
|
|
17
|
+
id: string;
|
|
18
|
+
assets: Array<string>;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type BundleStats = {
|
|
22
|
+
bundles: {
|
|
23
|
+
[key: string]: BundleStat;
|
|
24
|
+
};
|
|
25
|
+
assets: {
|
|
26
|
+
[key: string]: AssetStat;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
27
29
|
|
|
28
|
-
export default
|
|
30
|
+
export default new Reporter({
|
|
29
31
|
async report({event, options}) {
|
|
30
32
|
if (event.type !== 'buildSuccess') {
|
|
31
33
|
return;
|
|
@@ -33,7 +35,7 @@ export default (new Reporter({
|
|
|
33
35
|
|
|
34
36
|
let bundlesByTarget: DefaultMap<
|
|
35
37
|
string /* target name */,
|
|
36
|
-
Array<PackagedBundle
|
|
38
|
+
Array<PackagedBundle>
|
|
37
39
|
> = new DefaultMap(() => []);
|
|
38
40
|
for (let bundle of event.bundleGraph.getBundles()) {
|
|
39
41
|
bundlesByTarget.get(bundle.target.name).push(bundle);
|
|
@@ -43,7 +45,7 @@ export default (new Reporter({
|
|
|
43
45
|
await options.outputFS.mkdirp(reportsDir);
|
|
44
46
|
|
|
45
47
|
await Promise.all(
|
|
46
|
-
[...bundlesByTarget.entries()].map(([targetName, bundles]) =>
|
|
48
|
+
[...bundlesByTarget.entries()].map(([targetName, bundles]: [any, any]) =>
|
|
47
49
|
options.outputFS.writeFile(
|
|
48
50
|
path.join(reportsDir, `${targetName}-stats.json`),
|
|
49
51
|
JSON.stringify(getBundleStats(bundles, options), null, 2),
|
|
@@ -51,7 +53,7 @@ export default (new Reporter({
|
|
|
51
53
|
),
|
|
52
54
|
);
|
|
53
55
|
},
|
|
54
|
-
})
|
|
56
|
+
}) as Reporter;
|
|
55
57
|
|
|
56
58
|
export function getBundleStats(
|
|
57
59
|
bundles: Array<PackagedBundle>,
|
|
@@ -72,7 +74,7 @@ export function getBundleStats(
|
|
|
72
74
|
continue;
|
|
73
75
|
}
|
|
74
76
|
|
|
75
|
-
let assets = [];
|
|
77
|
+
let assets: Array<string> = [];
|
|
76
78
|
bundle.traverseAssets(({id, filePath, stats: {size}}) => {
|
|
77
79
|
assets.push(id);
|
|
78
80
|
let assetName = path.relative(options.projectRoot, filePath);
|
package/tsconfig.json
ADDED