@atlaspack/reporter-json 2.14.5-canary.19 → 2.14.5-canary.190
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 +202 -0
- package/lib/types/JSONReporter.d.ts +3 -0
- package/package.json +13 -8
- package/src/{JSONReporter.js → JSONReporter.ts} +35 -28
- package/tsconfig.json +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,207 @@
|
|
|
1
1
|
# @atlaspack/reporter-json
|
|
2
2
|
|
|
3
|
+
## 2.14.29
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies []:
|
|
8
|
+
- @atlaspack/utils@2.19.1
|
|
9
|
+
- @atlaspack/plugin@2.14.29
|
|
10
|
+
- @atlaspack/types@2.15.19
|
|
11
|
+
|
|
12
|
+
## 2.14.28
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [[`f0349a6`](https://github.com/atlassian-labs/atlaspack/commit/f0349a6b9b04755088f121095ca6301a2ada3767)]:
|
|
17
|
+
- @atlaspack/utils@2.19.0
|
|
18
|
+
- @atlaspack/plugin@2.14.28
|
|
19
|
+
- @atlaspack/types@2.15.18
|
|
20
|
+
|
|
21
|
+
## 2.14.27
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies []:
|
|
26
|
+
- @atlaspack/utils@2.18.4
|
|
27
|
+
- @atlaspack/plugin@2.14.27
|
|
28
|
+
- @atlaspack/types@2.15.17
|
|
29
|
+
|
|
30
|
+
## 2.14.26
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- [#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
|
|
35
|
+
|
|
36
|
+
- Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd), [`889c65c`](https://github.com/atlassian-labs/atlaspack/commit/889c65cd25b811045e26a117e7404f694dde77a2)]:
|
|
37
|
+
- @atlaspack/plugin@2.14.26
|
|
38
|
+
- @atlaspack/types@2.15.16
|
|
39
|
+
- @atlaspack/utils@2.18.3
|
|
40
|
+
|
|
41
|
+
## 2.14.25
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- Updated dependencies []:
|
|
46
|
+
- @atlaspack/utils@2.18.2
|
|
47
|
+
- @atlaspack/plugin@2.14.25
|
|
48
|
+
- @atlaspack/types@2.15.15
|
|
49
|
+
|
|
50
|
+
## 2.14.24
|
|
51
|
+
|
|
52
|
+
### Patch Changes
|
|
53
|
+
|
|
54
|
+
- Updated dependencies []:
|
|
55
|
+
- @atlaspack/utils@2.18.1
|
|
56
|
+
- @atlaspack/plugin@2.14.24
|
|
57
|
+
- @atlaspack/types@2.15.14
|
|
58
|
+
|
|
59
|
+
## 2.14.23
|
|
60
|
+
|
|
61
|
+
### Patch Changes
|
|
62
|
+
|
|
63
|
+
- Updated dependencies [[`23d561e`](https://github.com/atlassian-labs/atlaspack/commit/23d561e51e68b0c38fd1ff4e4fb173e5e7b01cf2)]:
|
|
64
|
+
- @atlaspack/utils@2.18.0
|
|
65
|
+
- @atlaspack/types@2.15.13
|
|
66
|
+
- @atlaspack/plugin@2.14.23
|
|
67
|
+
|
|
68
|
+
## 2.14.22
|
|
69
|
+
|
|
70
|
+
### Patch Changes
|
|
71
|
+
|
|
72
|
+
- [#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
|
|
73
|
+
|
|
74
|
+
- Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94)]:
|
|
75
|
+
- @atlaspack/plugin@2.14.22
|
|
76
|
+
- @atlaspack/types@2.15.12
|
|
77
|
+
- @atlaspack/utils@2.17.4
|
|
78
|
+
|
|
79
|
+
## 2.14.21
|
|
80
|
+
|
|
81
|
+
### Patch Changes
|
|
82
|
+
|
|
83
|
+
- Updated dependencies []:
|
|
84
|
+
- @atlaspack/types@2.15.11
|
|
85
|
+
- @atlaspack/utils@2.17.3
|
|
86
|
+
- @atlaspack/plugin@2.14.21
|
|
87
|
+
|
|
88
|
+
## 2.14.20
|
|
89
|
+
|
|
90
|
+
### Patch Changes
|
|
91
|
+
|
|
92
|
+
- Updated dependencies [[`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa)]:
|
|
93
|
+
- @atlaspack/plugin@2.14.20
|
|
94
|
+
- @atlaspack/utils@2.17.2
|
|
95
|
+
- @atlaspack/types@2.15.10
|
|
96
|
+
|
|
97
|
+
## 2.14.19
|
|
98
|
+
|
|
99
|
+
### Patch Changes
|
|
100
|
+
|
|
101
|
+
- Updated dependencies []:
|
|
102
|
+
- @atlaspack/utils@2.17.1
|
|
103
|
+
- @atlaspack/types@2.15.9
|
|
104
|
+
- @atlaspack/plugin@2.14.19
|
|
105
|
+
|
|
106
|
+
## 2.14.18
|
|
107
|
+
|
|
108
|
+
### Patch Changes
|
|
109
|
+
|
|
110
|
+
- 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)]:
|
|
111
|
+
- @atlaspack/utils@2.17.0
|
|
112
|
+
- @atlaspack/types@2.15.8
|
|
113
|
+
- @atlaspack/plugin@2.14.18
|
|
114
|
+
|
|
115
|
+
## 2.14.17
|
|
116
|
+
|
|
117
|
+
### Patch Changes
|
|
118
|
+
|
|
119
|
+
- Updated dependencies []:
|
|
120
|
+
- @atlaspack/utils@2.16.1
|
|
121
|
+
- @atlaspack/types@2.15.7
|
|
122
|
+
- @atlaspack/plugin@2.14.17
|
|
123
|
+
|
|
124
|
+
## 2.14.16
|
|
125
|
+
|
|
126
|
+
### Patch Changes
|
|
127
|
+
|
|
128
|
+
- Updated dependencies [[`30ee2cf`](https://github.com/atlassian-labs/atlaspack/commit/30ee2cfcd34cf2646ded0eda13fdb80a2a5de529)]:
|
|
129
|
+
- @atlaspack/utils@2.16.0
|
|
130
|
+
- @atlaspack/types@2.15.6
|
|
131
|
+
- @atlaspack/plugin@2.14.16
|
|
132
|
+
|
|
133
|
+
## 2.14.15
|
|
134
|
+
|
|
135
|
+
### Patch Changes
|
|
136
|
+
|
|
137
|
+
- Updated dependencies []:
|
|
138
|
+
- @atlaspack/utils@2.15.3
|
|
139
|
+
- @atlaspack/types@2.15.5
|
|
140
|
+
- @atlaspack/plugin@2.14.15
|
|
141
|
+
|
|
142
|
+
## 2.14.14
|
|
143
|
+
|
|
144
|
+
### Patch Changes
|
|
145
|
+
|
|
146
|
+
- Updated dependencies []:
|
|
147
|
+
- @atlaspack/utils@2.15.2
|
|
148
|
+
- @atlaspack/types@2.15.4
|
|
149
|
+
- @atlaspack/plugin@2.14.14
|
|
150
|
+
|
|
151
|
+
## 2.14.13
|
|
152
|
+
|
|
153
|
+
### Patch Changes
|
|
154
|
+
|
|
155
|
+
- Updated dependencies []:
|
|
156
|
+
- @atlaspack/types@2.15.3
|
|
157
|
+
- @atlaspack/utils@2.15.1
|
|
158
|
+
- @atlaspack/plugin@2.14.13
|
|
159
|
+
|
|
160
|
+
## 2.14.12
|
|
161
|
+
|
|
162
|
+
### Patch Changes
|
|
163
|
+
|
|
164
|
+
- Updated dependencies [[`e39c6cf`](https://github.com/atlassian-labs/atlaspack/commit/e39c6cf05f7e95ce5420dbcea66f401b1cbd397c)]:
|
|
165
|
+
- @atlaspack/utils@2.15.0
|
|
166
|
+
- @atlaspack/types@2.15.2
|
|
167
|
+
- @atlaspack/plugin@2.14.12
|
|
168
|
+
|
|
169
|
+
## 2.14.11
|
|
170
|
+
|
|
171
|
+
### Patch Changes
|
|
172
|
+
|
|
173
|
+
- Updated dependencies []:
|
|
174
|
+
- @atlaspack/utils@2.14.11
|
|
175
|
+
- @atlaspack/types@2.15.1
|
|
176
|
+
- @atlaspack/plugin@2.14.11
|
|
177
|
+
|
|
178
|
+
## 2.14.10
|
|
179
|
+
|
|
180
|
+
### Patch Changes
|
|
181
|
+
|
|
182
|
+
- Updated dependencies [[`51aba5f`](https://github.com/atlassian-labs/atlaspack/commit/51aba5fc0e49235ee06bbc3c376f48c3e7da5c4b), [`1e32d4e`](https://github.com/atlassian-labs/atlaspack/commit/1e32d4eae6b3af3968e8a0ef97d35b4347fd4196)]:
|
|
183
|
+
- @atlaspack/types@2.15.0
|
|
184
|
+
- @atlaspack/plugin@2.14.10
|
|
185
|
+
- @atlaspack/utils@2.14.10
|
|
186
|
+
|
|
187
|
+
## 2.14.9
|
|
188
|
+
|
|
189
|
+
### Patch Changes
|
|
190
|
+
|
|
191
|
+
- Updated dependencies []:
|
|
192
|
+
- @atlaspack/utils@2.14.9
|
|
193
|
+
- @atlaspack/types@2.14.9
|
|
194
|
+
- @atlaspack/plugin@2.14.9
|
|
195
|
+
|
|
196
|
+
## 2.14.8
|
|
197
|
+
|
|
198
|
+
### Patch Changes
|
|
199
|
+
|
|
200
|
+
- Updated dependencies []:
|
|
201
|
+
- @atlaspack/utils@2.14.8
|
|
202
|
+
- @atlaspack/types@2.14.8
|
|
203
|
+
- @atlaspack/plugin@2.14.8
|
|
204
|
+
|
|
3
205
|
## 2.14.7
|
|
4
206
|
|
|
5
207
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/reporter-json",
|
|
3
|
-
"version": "2.14.5-canary.
|
|
3
|
+
"version": "2.14.5-canary.190+7a52bab62",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -9,17 +9,22 @@
|
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "https://github.com/atlassian-labs/atlaspack.git"
|
|
11
11
|
},
|
|
12
|
-
"main": "lib/JSONReporter.js",
|
|
13
|
-
"source": "src/JSONReporter.
|
|
12
|
+
"main": "./lib/JSONReporter.js",
|
|
13
|
+
"source": "./src/JSONReporter.ts",
|
|
14
|
+
"types": "./lib/JSONReporter.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/types": "2.14.5-canary.
|
|
20
|
-
"@atlaspack/utils": "2.14.5-canary.
|
|
19
|
+
"@atlaspack/plugin": "2.14.5-canary.190+7a52bab62",
|
|
20
|
+
"@atlaspack/types": "2.14.5-canary.190+7a52bab62",
|
|
21
|
+
"@atlaspack/utils": "2.14.5-canary.190+7a52bab62",
|
|
21
22
|
"nullthrows": "^1.1.1"
|
|
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": "7a52bab6281e8edbfa66af248eb6f872c6b4b7bd"
|
|
30
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// @flow strict-local
|
|
2
1
|
import type {BuildProgressEvent, LogEvent} from '@atlaspack/types';
|
|
3
2
|
import type {BuildMetrics} from '@atlaspack/utils';
|
|
4
3
|
|
|
@@ -18,9 +17,9 @@ const LOG_LEVELS = {
|
|
|
18
17
|
progress: 3,
|
|
19
18
|
success: 3,
|
|
20
19
|
verbose: 4,
|
|
21
|
-
};
|
|
20
|
+
} as const;
|
|
22
21
|
|
|
23
|
-
export default
|
|
22
|
+
export default new Reporter({
|
|
24
23
|
async report({event, options}) {
|
|
25
24
|
let logLevelFilter = options.logLevel || 'info';
|
|
26
25
|
|
|
@@ -68,19 +67,19 @@ export default (new Reporter({
|
|
|
68
67
|
writeLogEvent(event, logLevelFilter);
|
|
69
68
|
}
|
|
70
69
|
},
|
|
71
|
-
})
|
|
70
|
+
}) as Reporter;
|
|
72
71
|
|
|
73
72
|
function makeWriter(
|
|
74
|
-
write: (string) =>
|
|
75
|
-
): (JSONReportEvent,
|
|
73
|
+
write: (arg1: string) => unknown,
|
|
74
|
+
): (arg1: JSONReportEvent, arg2: keyof typeof LOG_LEVELS) => void {
|
|
76
75
|
return (
|
|
77
76
|
event: JSONReportEvent,
|
|
78
|
-
logLevelFilter:
|
|
77
|
+
logLevelFilter: keyof typeof LOG_LEVELS,
|
|
79
78
|
): void => {
|
|
80
79
|
let stringified;
|
|
81
80
|
try {
|
|
82
81
|
stringified = JSON.stringify(event);
|
|
83
|
-
} catch (err) {
|
|
82
|
+
} catch (err: any) {
|
|
84
83
|
// This should never happen so long as JSONReportEvent is easily serializable
|
|
85
84
|
if (LOG_LEVELS[logLevelFilter] >= LOG_LEVELS.error) {
|
|
86
85
|
writeToStderr(
|
|
@@ -107,7 +106,7 @@ function makeWriter(
|
|
|
107
106
|
|
|
108
107
|
function writeLogEvent(
|
|
109
108
|
event: LogEvent,
|
|
110
|
-
logLevelFilter:
|
|
109
|
+
logLevelFilter: keyof typeof LOG_LEVELS,
|
|
111
110
|
): void {
|
|
112
111
|
if (LOG_LEVELS[logLevelFilter] < LOG_LEVELS[event.level]) {
|
|
113
112
|
return;
|
|
@@ -128,7 +127,7 @@ function writeLogEvent(
|
|
|
128
127
|
|
|
129
128
|
function progressEventToJSONEvent(
|
|
130
129
|
progressEvent: BuildProgressEvent,
|
|
131
|
-
):
|
|
130
|
+
): JSONProgressEvent | null | undefined {
|
|
132
131
|
switch (progressEvent.phase) {
|
|
133
132
|
case 'transforming':
|
|
134
133
|
return {
|
|
@@ -153,24 +152,32 @@ function progressEventToJSONEvent(
|
|
|
153
152
|
|
|
154
153
|
type JSONReportEvent =
|
|
155
154
|
| LogEvent
|
|
156
|
-
| {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
155
|
+
| {
|
|
156
|
+
readonly type: 'buildStart';
|
|
157
|
+
}
|
|
158
|
+
| {
|
|
159
|
+
readonly type: 'buildFailure';
|
|
160
|
+
message: string;
|
|
161
|
+
}
|
|
162
|
+
| {
|
|
163
|
+
readonly type: 'buildSuccess';
|
|
164
|
+
buildTime: number;
|
|
165
|
+
bundles?: BuildMetrics['bundles'];
|
|
166
|
+
}
|
|
163
167
|
| JSONProgressEvent;
|
|
164
168
|
|
|
165
169
|
type JSONProgressEvent =
|
|
166
|
-
| {
|
|
167
|
-
|
|
168
|
-
phase: 'transforming'
|
|
169
|
-
filePath: string
|
|
170
|
-
|
|
171
|
-
| {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
170
|
+
| {
|
|
171
|
+
readonly type: 'buildProgress';
|
|
172
|
+
phase: 'transforming';
|
|
173
|
+
filePath: string;
|
|
174
|
+
}
|
|
175
|
+
| {
|
|
176
|
+
readonly type: 'buildProgress';
|
|
177
|
+
phase: 'bundling';
|
|
178
|
+
}
|
|
179
|
+
| {
|
|
180
|
+
readonly type: 'buildProgress';
|
|
181
|
+
readonly phase: 'packaging' | 'optimizing';
|
|
182
|
+
bundleName?: string;
|
|
183
|
+
};
|
package/tsconfig.json
ADDED