@atlaspack/reporter-build-metrics 2.14.5-canary.17 → 2.14.5-canary.171

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,177 @@
1
1
  # @atlaspack/reporter-build-metrics
2
2
 
3
+ ## 2.14.27
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @atlaspack/utils@2.18.4
9
+ - @atlaspack/plugin@2.14.27
10
+
11
+ ## 2.14.26
12
+
13
+ ### Patch Changes
14
+
15
+ - [#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
16
+
17
+ - Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd), [`889c65c`](https://github.com/atlassian-labs/atlaspack/commit/889c65cd25b811045e26a117e7404f694dde77a2)]:
18
+ - @atlaspack/plugin@2.14.26
19
+ - @atlaspack/utils@2.18.3
20
+
21
+ ## 2.14.25
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies []:
26
+ - @atlaspack/utils@2.18.2
27
+ - @atlaspack/plugin@2.14.25
28
+
29
+ ## 2.14.24
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies []:
34
+ - @atlaspack/utils@2.18.1
35
+ - @atlaspack/plugin@2.14.24
36
+
37
+ ## 2.14.23
38
+
39
+ ### Patch Changes
40
+
41
+ - Updated dependencies [[`23d561e`](https://github.com/atlassian-labs/atlaspack/commit/23d561e51e68b0c38fd1ff4e4fb173e5e7b01cf2)]:
42
+ - @atlaspack/utils@2.18.0
43
+ - @atlaspack/plugin@2.14.23
44
+
45
+ ## 2.14.22
46
+
47
+ ### Patch Changes
48
+
49
+ - [#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
50
+
51
+ - Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94)]:
52
+ - @atlaspack/plugin@2.14.22
53
+ - @atlaspack/utils@2.17.4
54
+
55
+ ## 2.14.21
56
+
57
+ ### Patch Changes
58
+
59
+ - Updated dependencies []:
60
+ - @atlaspack/utils@2.17.3
61
+ - @atlaspack/plugin@2.14.21
62
+
63
+ ## 2.14.20
64
+
65
+ ### Patch Changes
66
+
67
+ - Updated dependencies [[`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa)]:
68
+ - @atlaspack/plugin@2.14.20
69
+ - @atlaspack/utils@2.17.2
70
+
71
+ ## 2.14.19
72
+
73
+ ### Patch Changes
74
+
75
+ - Updated dependencies []:
76
+ - @atlaspack/utils@2.17.1
77
+ - @atlaspack/plugin@2.14.19
78
+
79
+ ## 2.14.18
80
+
81
+ ### Patch Changes
82
+
83
+ - 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)]:
84
+ - @atlaspack/utils@2.17.0
85
+ - @atlaspack/plugin@2.14.18
86
+
87
+ ## 2.14.17
88
+
89
+ ### Patch Changes
90
+
91
+ - Updated dependencies []:
92
+ - @atlaspack/utils@2.16.1
93
+ - @atlaspack/plugin@2.14.17
94
+
95
+ ## 2.14.16
96
+
97
+ ### Patch Changes
98
+
99
+ - Updated dependencies [[`30ee2cf`](https://github.com/atlassian-labs/atlaspack/commit/30ee2cfcd34cf2646ded0eda13fdb80a2a5de529)]:
100
+ - @atlaspack/utils@2.16.0
101
+ - @atlaspack/plugin@2.14.16
102
+
103
+ ## 2.14.15
104
+
105
+ ### Patch Changes
106
+
107
+ - Updated dependencies []:
108
+ - @atlaspack/utils@2.15.3
109
+ - @atlaspack/plugin@2.14.15
110
+
111
+ ## 2.14.14
112
+
113
+ ### Patch Changes
114
+
115
+ - Updated dependencies []:
116
+ - @atlaspack/utils@2.15.2
117
+ - @atlaspack/plugin@2.14.14
118
+
119
+ ## 2.14.13
120
+
121
+ ### Patch Changes
122
+
123
+ - Updated dependencies []:
124
+ - @atlaspack/utils@2.15.1
125
+ - @atlaspack/plugin@2.14.13
126
+
127
+ ## 2.14.12
128
+
129
+ ### Patch Changes
130
+
131
+ - Updated dependencies [[`e39c6cf`](https://github.com/atlassian-labs/atlaspack/commit/e39c6cf05f7e95ce5420dbcea66f401b1cbd397c)]:
132
+ - @atlaspack/utils@2.15.0
133
+ - @atlaspack/plugin@2.14.12
134
+
135
+ ## 2.14.11
136
+
137
+ ### Patch Changes
138
+
139
+ - Updated dependencies []:
140
+ - @atlaspack/utils@2.14.11
141
+ - @atlaspack/plugin@2.14.11
142
+
143
+ ## 2.14.10
144
+
145
+ ### Patch Changes
146
+
147
+ - Updated dependencies []:
148
+ - @atlaspack/plugin@2.14.10
149
+ - @atlaspack/utils@2.14.10
150
+
151
+ ## 2.14.9
152
+
153
+ ### Patch Changes
154
+
155
+ - Updated dependencies []:
156
+ - @atlaspack/utils@2.14.9
157
+ - @atlaspack/plugin@2.14.9
158
+
159
+ ## 2.14.8
160
+
161
+ ### Patch Changes
162
+
163
+ - Updated dependencies []:
164
+ - @atlaspack/utils@2.14.8
165
+ - @atlaspack/plugin@2.14.8
166
+
167
+ ## 2.14.7
168
+
169
+ ### Patch Changes
170
+
171
+ - Updated dependencies []:
172
+ - @atlaspack/utils@2.14.7
173
+ - @atlaspack/plugin@2.14.7
174
+
3
175
  ## 2.14.6
4
176
 
5
177
  ### Patch Changes
@@ -34,8 +34,6 @@ const getValue = instanceId => {
34
34
  lastPhase: 'resolving'
35
35
  });
36
36
  }
37
-
38
- // $FlowFixMe
39
37
  return timingsMap.get(instanceId);
40
38
  };
41
39
  var _default = exports.default = new (_plugin().Reporter)({
@@ -70,6 +68,7 @@ var _default = exports.default = new (_plugin().Reporter)({
70
68
  };
71
69
  })
72
70
  };
71
+ await options.outputFS.mkdirp(_path().default.dirname(metricsFilePath));
73
72
  await options.outputFS.writeFile(metricsFilePath, JSON.stringify(metrics));
74
73
  }
75
74
  }
@@ -0,0 +1,3 @@
1
+ import { Reporter } from '@atlaspack/plugin';
2
+ declare const _default: Reporter;
3
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/reporter-build-metrics",
3
- "version": "2.14.5-canary.17+a1773d2a6",
3
+ "version": "2.14.5-canary.171+f0349a6b9",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -9,15 +9,20 @@
9
9
  "type": "git",
10
10
  "url": "https://github.com/atlassian-labs/atlaspack.git"
11
11
  },
12
- "main": "lib/BuildMetricsReporter.js",
13
- "source": "src/BuildMetricsReporter.js",
12
+ "main": "./lib/BuildMetricsReporter.js",
13
+ "source": "./src/BuildMetricsReporter.ts",
14
+ "types": "./lib/types/BuildMetricsReporter.d.ts",
14
15
  "engines": {
15
16
  "node": ">= 16.0.0"
16
17
  },
17
18
  "dependencies": {
18
- "@atlaspack/plugin": "2.14.5-canary.17+a1773d2a6",
19
- "@atlaspack/utils": "2.14.5-canary.17+a1773d2a6"
19
+ "@atlaspack/plugin": "2.14.5-canary.171+f0349a6b9",
20
+ "@atlaspack/utils": "2.14.5-canary.171+f0349a6b9"
20
21
  },
21
22
  "type": "commonjs",
22
- "gitHead": "a1773d2a62d0ef7805ac7524621dcabcc1afe929"
23
+ "scripts": {
24
+ "check-ts": "tsc --emitDeclarationOnly --rootDir src",
25
+ "build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
26
+ },
27
+ "gitHead": "f0349a6b9b04755088f121095ca6301a2ada3767"
23
28
  }
@@ -1,13 +1,14 @@
1
- // @flow strict-local
2
1
  import path from 'path';
3
2
 
4
3
  import {Reporter} from '@atlaspack/plugin';
5
4
  import {generateBuildMetrics} from '@atlaspack/utils';
6
5
 
7
- type TimingValue = {|
8
- timings: {[key: string]: number, ...},
9
- lastPhase: string,
10
- |};
6
+ type TimingValue = {
7
+ timings: {
8
+ [key: string]: number;
9
+ };
10
+ lastPhase: string;
11
+ };
11
12
 
12
13
  let timingsMap = new Map();
13
14
  const getValue = (instanceId: string): TimingValue => {
@@ -18,11 +19,10 @@ const getValue = (instanceId: string): TimingValue => {
18
19
  });
19
20
  }
20
21
 
21
- // $FlowFixMe
22
22
  return timingsMap.get(instanceId);
23
23
  };
24
24
 
25
- export default (new Reporter({
25
+ export default new Reporter({
26
26
  async report({event, options}) {
27
27
  if (event.type === 'buildProgress') {
28
28
  let value = getValue(options.instanceId);
@@ -63,10 +63,11 @@ export default (new Reporter({
63
63
  }),
64
64
  };
65
65
 
66
+ await options.outputFS.mkdirp(path.dirname(metricsFilePath));
66
67
  await options.outputFS.writeFile(
67
68
  metricsFilePath,
68
69
  JSON.stringify(metrics),
69
70
  );
70
71
  }
71
72
  },
72
- }): Reporter);
73
+ }) as Reporter;
package/tsconfig.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "../../../tsconfig.json",
3
+ "include": ["src"]
4
+ }