@atlaspack/reporter-bundle-analyzer 2.14.5-canary.2 → 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,231 @@
|
|
|
1
1
|
# @atlaspack/reporter-bundle-analyzer
|
|
2
2
|
|
|
3
|
+
## 2.14.31
|
|
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)]:
|
|
10
|
+
- @atlaspack/plugin@2.14.31
|
|
11
|
+
- @atlaspack/utils@2.19.3
|
|
12
|
+
|
|
13
|
+
## 2.14.30
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies []:
|
|
18
|
+
- @atlaspack/utils@2.19.2
|
|
19
|
+
- @atlaspack/plugin@2.14.30
|
|
20
|
+
|
|
21
|
+
## 2.14.29
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies []:
|
|
26
|
+
- @atlaspack/utils@2.19.1
|
|
27
|
+
- @atlaspack/plugin@2.14.29
|
|
28
|
+
|
|
29
|
+
## 2.14.28
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- [#760](https://github.com/atlassian-labs/atlaspack/pull/760) [`f930003`](https://github.com/atlassian-labs/atlaspack/commit/f930003364fdc31e5487520ebe256f1a9389f579) Thanks [@marcins](https://github.com/marcins)! - Fix TypeScript errors in various packages
|
|
34
|
+
|
|
35
|
+
- [#760](https://github.com/atlassian-labs/atlaspack/pull/760) [`f930003`](https://github.com/atlassian-labs/atlaspack/commit/f930003364fdc31e5487520ebe256f1a9389f579) Thanks [@marcins](https://github.com/marcins)! - Fix typescript errors
|
|
36
|
+
|
|
37
|
+
- Updated dependencies [[`f0349a6`](https://github.com/atlassian-labs/atlaspack/commit/f0349a6b9b04755088f121095ca6301a2ada3767)]:
|
|
38
|
+
- @atlaspack/utils@2.19.0
|
|
39
|
+
- @atlaspack/plugin@2.14.28
|
|
40
|
+
|
|
41
|
+
## 2.14.27
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- Updated dependencies []:
|
|
46
|
+
- @atlaspack/utils@2.18.4
|
|
47
|
+
- @atlaspack/plugin@2.14.27
|
|
48
|
+
|
|
49
|
+
## 2.14.26
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- [#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
|
|
54
|
+
|
|
55
|
+
- Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd), [`889c65c`](https://github.com/atlassian-labs/atlaspack/commit/889c65cd25b811045e26a117e7404f694dde77a2)]:
|
|
56
|
+
- @atlaspack/plugin@2.14.26
|
|
57
|
+
- @atlaspack/utils@2.18.3
|
|
58
|
+
|
|
59
|
+
## 2.14.25
|
|
60
|
+
|
|
61
|
+
### Patch Changes
|
|
62
|
+
|
|
63
|
+
- Updated dependencies []:
|
|
64
|
+
- @atlaspack/utils@2.18.2
|
|
65
|
+
- @atlaspack/plugin@2.14.25
|
|
66
|
+
|
|
67
|
+
## 2.14.24
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- Updated dependencies []:
|
|
72
|
+
- @atlaspack/utils@2.18.1
|
|
73
|
+
- @atlaspack/plugin@2.14.24
|
|
74
|
+
|
|
75
|
+
## 2.14.23
|
|
76
|
+
|
|
77
|
+
### Patch Changes
|
|
78
|
+
|
|
79
|
+
- Updated dependencies [[`23d561e`](https://github.com/atlassian-labs/atlaspack/commit/23d561e51e68b0c38fd1ff4e4fb173e5e7b01cf2)]:
|
|
80
|
+
- @atlaspack/utils@2.18.0
|
|
81
|
+
- @atlaspack/plugin@2.14.23
|
|
82
|
+
|
|
83
|
+
## 2.14.22
|
|
84
|
+
|
|
85
|
+
### Patch Changes
|
|
86
|
+
|
|
87
|
+
- [#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
|
|
88
|
+
|
|
89
|
+
- Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94)]:
|
|
90
|
+
- @atlaspack/plugin@2.14.22
|
|
91
|
+
- @atlaspack/utils@2.17.4
|
|
92
|
+
|
|
93
|
+
## 2.14.21
|
|
94
|
+
|
|
95
|
+
### Patch Changes
|
|
96
|
+
|
|
97
|
+
- Updated dependencies []:
|
|
98
|
+
- @atlaspack/utils@2.17.3
|
|
99
|
+
- @atlaspack/plugin@2.14.21
|
|
100
|
+
|
|
101
|
+
## 2.14.20
|
|
102
|
+
|
|
103
|
+
### Patch Changes
|
|
104
|
+
|
|
105
|
+
- Updated dependencies [[`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa)]:
|
|
106
|
+
- @atlaspack/plugin@2.14.20
|
|
107
|
+
- @atlaspack/utils@2.17.2
|
|
108
|
+
|
|
109
|
+
## 2.14.19
|
|
110
|
+
|
|
111
|
+
### Patch Changes
|
|
112
|
+
|
|
113
|
+
- Updated dependencies []:
|
|
114
|
+
- @atlaspack/utils@2.17.1
|
|
115
|
+
- @atlaspack/plugin@2.14.19
|
|
116
|
+
|
|
117
|
+
## 2.14.18
|
|
118
|
+
|
|
119
|
+
### Patch Changes
|
|
120
|
+
|
|
121
|
+
- Updated dependencies [[`dbb4072`](https://github.com/atlassian-labs/atlaspack/commit/dbb40721ebeb45990a14ba04e6b44e7f836fb32d), [`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)]:
|
|
122
|
+
- @atlaspack/utils@2.17.0
|
|
123
|
+
- @atlaspack/plugin@2.14.18
|
|
124
|
+
|
|
125
|
+
## 2.14.17
|
|
126
|
+
|
|
127
|
+
### Patch Changes
|
|
128
|
+
|
|
129
|
+
- Updated dependencies []:
|
|
130
|
+
- @atlaspack/utils@2.16.1
|
|
131
|
+
- @atlaspack/plugin@2.14.17
|
|
132
|
+
|
|
133
|
+
## 2.14.16
|
|
134
|
+
|
|
135
|
+
### Patch Changes
|
|
136
|
+
|
|
137
|
+
- Updated dependencies [[`30ee2cf`](https://github.com/atlassian-labs/atlaspack/commit/30ee2cfcd34cf2646ded0eda13fdb80a2a5de529)]:
|
|
138
|
+
- @atlaspack/utils@2.16.0
|
|
139
|
+
- @atlaspack/plugin@2.14.16
|
|
140
|
+
|
|
141
|
+
## 2.14.15
|
|
142
|
+
|
|
143
|
+
### Patch Changes
|
|
144
|
+
|
|
145
|
+
- Updated dependencies []:
|
|
146
|
+
- @atlaspack/utils@2.15.3
|
|
147
|
+
- @atlaspack/plugin@2.14.15
|
|
148
|
+
|
|
149
|
+
## 2.14.14
|
|
150
|
+
|
|
151
|
+
### Patch Changes
|
|
152
|
+
|
|
153
|
+
- Updated dependencies []:
|
|
154
|
+
- @atlaspack/utils@2.15.2
|
|
155
|
+
- @atlaspack/plugin@2.14.14
|
|
156
|
+
|
|
157
|
+
## 2.14.13
|
|
158
|
+
|
|
159
|
+
### Patch Changes
|
|
160
|
+
|
|
161
|
+
- Updated dependencies []:
|
|
162
|
+
- @atlaspack/utils@2.15.1
|
|
163
|
+
- @atlaspack/plugin@2.14.13
|
|
164
|
+
|
|
165
|
+
## 2.14.12
|
|
166
|
+
|
|
167
|
+
### Patch Changes
|
|
168
|
+
|
|
169
|
+
- Updated dependencies [[`e39c6cf`](https://github.com/atlassian-labs/atlaspack/commit/e39c6cf05f7e95ce5420dbcea66f401b1cbd397c)]:
|
|
170
|
+
- @atlaspack/utils@2.15.0
|
|
171
|
+
- @atlaspack/plugin@2.14.12
|
|
172
|
+
|
|
173
|
+
## 2.14.11
|
|
174
|
+
|
|
175
|
+
### Patch Changes
|
|
176
|
+
|
|
177
|
+
- Updated dependencies []:
|
|
178
|
+
- @atlaspack/utils@2.14.11
|
|
179
|
+
- @atlaspack/plugin@2.14.11
|
|
180
|
+
|
|
181
|
+
## 2.14.10
|
|
182
|
+
|
|
183
|
+
### Patch Changes
|
|
184
|
+
|
|
185
|
+
- Updated dependencies []:
|
|
186
|
+
- @atlaspack/plugin@2.14.10
|
|
187
|
+
- @atlaspack/utils@2.14.10
|
|
188
|
+
|
|
189
|
+
## 2.14.9
|
|
190
|
+
|
|
191
|
+
### Patch Changes
|
|
192
|
+
|
|
193
|
+
- Updated dependencies []:
|
|
194
|
+
- @atlaspack/utils@2.14.9
|
|
195
|
+
- @atlaspack/plugin@2.14.9
|
|
196
|
+
|
|
197
|
+
## 2.14.8
|
|
198
|
+
|
|
199
|
+
### Patch Changes
|
|
200
|
+
|
|
201
|
+
- Updated dependencies []:
|
|
202
|
+
- @atlaspack/utils@2.14.8
|
|
203
|
+
- @atlaspack/plugin@2.14.8
|
|
204
|
+
|
|
205
|
+
## 2.14.7
|
|
206
|
+
|
|
207
|
+
### Patch Changes
|
|
208
|
+
|
|
209
|
+
- Updated dependencies []:
|
|
210
|
+
- @atlaspack/utils@2.14.7
|
|
211
|
+
- @atlaspack/plugin@2.14.7
|
|
212
|
+
|
|
213
|
+
## 2.14.6
|
|
214
|
+
|
|
215
|
+
### Patch Changes
|
|
216
|
+
|
|
217
|
+
- Updated dependencies []:
|
|
218
|
+
- @atlaspack/utils@2.14.6
|
|
219
|
+
- @atlaspack/plugin@2.14.6
|
|
220
|
+
|
|
221
|
+
## 2.14.5
|
|
222
|
+
|
|
223
|
+
### Patch Changes
|
|
224
|
+
|
|
225
|
+
- Updated dependencies []:
|
|
226
|
+
- @atlaspack/utils@2.14.5
|
|
227
|
+
- @atlaspack/plugin@2.14.5
|
|
228
|
+
|
|
3
229
|
## 2.14.4
|
|
4
230
|
|
|
5
231
|
### Patch Changes
|
package/{index.js → index.ts}
RENAMED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/reporter-bundle-analyzer",
|
|
3
|
-
"version": "2.14.5-canary.
|
|
3
|
+
"version": "2.14.5-canary.200+10ee3fa5b",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -9,19 +9,24 @@
|
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "https://github.com/atlassian-labs/atlaspack.git"
|
|
11
11
|
},
|
|
12
|
-
"main": "lib/BundleAnalyzerReporter.js",
|
|
13
|
-
"source": "src/BundleAnalyzerReporter.
|
|
12
|
+
"main": "./lib/BundleAnalyzerReporter.js",
|
|
13
|
+
"source": "./src/BundleAnalyzerReporter.ts",
|
|
14
|
+
"types": "./lib/types/BundleAnalyzerReporter.d.ts",
|
|
14
15
|
"engines": {
|
|
15
16
|
"node": ">= 16.0.0"
|
|
16
17
|
},
|
|
17
18
|
"dependencies": {
|
|
18
|
-
"@atlaspack/plugin": "2.14.5-canary.
|
|
19
|
-
"@atlaspack/utils": "2.14.5-canary.
|
|
19
|
+
"@atlaspack/plugin": "2.14.5-canary.200+10ee3fa5b",
|
|
20
|
+
"@atlaspack/utils": "2.14.5-canary.200+10ee3fa5b",
|
|
20
21
|
"nullthrows": "^1.1.1"
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
23
|
-
"@atlaspack/types": "2.14.5-canary.
|
|
24
|
+
"@atlaspack/types": "2.14.5-canary.200+10ee3fa5b"
|
|
24
25
|
},
|
|
25
26
|
"type": "commonjs",
|
|
26
|
-
"
|
|
27
|
-
|
|
27
|
+
"scripts": {
|
|
28
|
+
"check-ts": "tsc --emitDeclarationOnly --rootDir src",
|
|
29
|
+
"build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
|
|
30
|
+
},
|
|
31
|
+
"gitHead": "10ee3fa5b75a92acde8973673d9b3c5b6f3958e5"
|
|
32
|
+
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @flow strict-local
|
|
2
|
-
|
|
3
1
|
import type {FilePath, PackagedBundle, PluginOptions} from '@atlaspack/types';
|
|
4
2
|
|
|
5
3
|
import invariant from 'assert';
|
|
@@ -8,7 +6,7 @@ import {DefaultMap, generateBuildMetrics} from '@atlaspack/utils';
|
|
|
8
6
|
import path from 'path';
|
|
9
7
|
import nullthrows from 'nullthrows';
|
|
10
8
|
|
|
11
|
-
export default
|
|
9
|
+
export default new Reporter({
|
|
12
10
|
async report({event, options}) {
|
|
13
11
|
if (event.type !== 'buildSuccess') {
|
|
14
12
|
return;
|
|
@@ -16,7 +14,7 @@ export default (new Reporter({
|
|
|
16
14
|
|
|
17
15
|
let bundlesByTarget: DefaultMap<
|
|
18
16
|
string /* target name */,
|
|
19
|
-
Array<PackagedBundle
|
|
17
|
+
Array<PackagedBundle>
|
|
20
18
|
> = new DefaultMap(() => []);
|
|
21
19
|
for (let bundle of event.bundleGraph.getBundles()) {
|
|
22
20
|
bundlesByTarget.get(bundle.target.name).push(bundle);
|
|
@@ -26,10 +24,11 @@ export default (new Reporter({
|
|
|
26
24
|
await options.outputFS.mkdirp(reportsDir);
|
|
27
25
|
|
|
28
26
|
await Promise.all(
|
|
29
|
-
[...bundlesByTarget.entries()].map(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
[...bundlesByTarget.entries()].map(
|
|
28
|
+
async ([targetName, bundles]: [any, any]) => {
|
|
29
|
+
return options.outputFS.writeFile(
|
|
30
|
+
path.join(reportsDir, `${targetName}.html`),
|
|
31
|
+
`
|
|
33
32
|
<html>
|
|
34
33
|
<head>
|
|
35
34
|
<meta charset="utf-8">
|
|
@@ -84,15 +83,16 @@ export default (new Reporter({
|
|
|
84
83
|
</body>
|
|
85
84
|
</html>
|
|
86
85
|
`,
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
);
|
|
87
|
+
},
|
|
88
|
+
),
|
|
89
89
|
);
|
|
90
90
|
},
|
|
91
|
-
})
|
|
91
|
+
}) as Reporter;
|
|
92
92
|
|
|
93
|
-
type BundleData = {
|
|
94
|
-
groups: Array<Group
|
|
95
|
-
|
|
93
|
+
type BundleData = {
|
|
94
|
+
groups: Array<Group>;
|
|
95
|
+
};
|
|
96
96
|
|
|
97
97
|
async function getBundleData(
|
|
98
98
|
bundles: Array<PackagedBundle>,
|
|
@@ -106,10 +106,10 @@ async function getBundleData(
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
type File = {
|
|
110
|
-
basename: string
|
|
111
|
-
size: number
|
|
112
|
-
|
|
109
|
+
type File = {
|
|
110
|
+
basename: string;
|
|
111
|
+
size: number;
|
|
112
|
+
};
|
|
113
113
|
type DirMapValue = File | DirMap;
|
|
114
114
|
type DirMap = DefaultMap<FilePath, DirMapValue>;
|
|
115
115
|
let createMap: () => DirMap = () => new DefaultMap(() => createMap());
|
|
@@ -128,7 +128,7 @@ async function getBundleNode(bundle: PackagedBundle, options: PluginOptions) {
|
|
|
128
128
|
let dirs = parts.slice(0, parts.length - 1);
|
|
129
129
|
let basename = path.basename(asset.filePath);
|
|
130
130
|
|
|
131
|
-
let map = dirMap;
|
|
131
|
+
let map: File | DirMap = dirMap;
|
|
132
132
|
for (let dir of dirs) {
|
|
133
133
|
invariant(map instanceof DefaultMap);
|
|
134
134
|
map = map.get(dir);
|
|
@@ -148,14 +148,14 @@ async function getBundleNode(bundle: PackagedBundle, options: PluginOptions) {
|
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
type Group = {
|
|
152
|
-
label: string
|
|
153
|
-
weight: number
|
|
154
|
-
groups?: Array<Group
|
|
155
|
-
|
|
151
|
+
type Group = {
|
|
152
|
+
label: string;
|
|
153
|
+
weight: number;
|
|
154
|
+
groups?: Array<Group>;
|
|
155
|
+
};
|
|
156
156
|
|
|
157
157
|
function generateGroups(dirMap: DirMap): Array<Group> {
|
|
158
|
-
let groups = [];
|
|
158
|
+
let groups: Array<Group> = [];
|
|
159
159
|
|
|
160
160
|
for (let [directoryName, contents] of dirMap) {
|
|
161
161
|
if (contents instanceof DefaultMap) {
|
package/tsconfig.json
ADDED