@atlaspack/bundle-stats 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,292 @@
1
1
  # @atlaspack/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/utils@2.19.3
12
+ - @atlaspack/query@2.14.32
13
+ - @atlaspack/reporter-bundle-stats@2.14.32
14
+
15
+ ## 2.14.31
16
+
17
+ ### Patch Changes
18
+
19
+ - 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)]:
20
+ - @atlaspack/core@2.24.0
21
+ - @atlaspack/utils@2.19.2
22
+ - @atlaspack/query@2.14.31
23
+ - @atlaspack/reporter-bundle-stats@2.14.31
24
+
25
+ ## 2.14.30
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies []:
30
+ - @atlaspack/core@2.23.5
31
+ - @atlaspack/utils@2.19.1
32
+ - @atlaspack/query@2.14.30
33
+ - @atlaspack/reporter-bundle-stats@2.14.30
34
+
35
+ ## 2.14.29
36
+
37
+ ### Patch Changes
38
+
39
+ - Updated dependencies [[`f0349a6`](https://github.com/atlassian-labs/atlaspack/commit/f0349a6b9b04755088f121095ca6301a2ada3767)]:
40
+ - @atlaspack/utils@2.19.0
41
+ - @atlaspack/core@2.23.4
42
+ - @atlaspack/reporter-bundle-stats@2.14.29
43
+ - @atlaspack/query@2.14.29
44
+
45
+ ## 2.14.28
46
+
47
+ ### Patch Changes
48
+
49
+ - Updated dependencies []:
50
+ - @atlaspack/core@2.23.3
51
+ - @atlaspack/utils@2.18.4
52
+ - @atlaspack/query@2.14.28
53
+ - @atlaspack/reporter-bundle-stats@2.14.28
54
+
55
+ ## 2.14.27
56
+
57
+ ### Patch Changes
58
+
59
+ - [#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
60
+
61
+ - 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)]:
62
+ - @atlaspack/reporter-bundle-stats@2.14.27
63
+ - @atlaspack/utils@2.18.3
64
+ - @atlaspack/core@2.23.2
65
+ - @atlaspack/query@2.14.27
66
+
67
+ ## 2.14.26
68
+
69
+ ### Patch Changes
70
+
71
+ - Updated dependencies []:
72
+ - @atlaspack/core@2.23.1
73
+ - @atlaspack/utils@2.18.2
74
+ - @atlaspack/query@2.14.26
75
+ - @atlaspack/reporter-bundle-stats@2.14.26
76
+
77
+ ## 2.14.25
78
+
79
+ ### Patch Changes
80
+
81
+ - Updated dependencies [[`7f5841c`](https://github.com/atlassian-labs/atlaspack/commit/7f5841c39df049f9546cccbeea2a7337e0337b45)]:
82
+ - @atlaspack/core@2.23.0
83
+ - @atlaspack/utils@2.18.1
84
+ - @atlaspack/query@2.14.25
85
+ - @atlaspack/reporter-bundle-stats@2.14.25
86
+
87
+ ## 2.14.24
88
+
89
+ ### Patch Changes
90
+
91
+ - Updated dependencies [[`23d561e`](https://github.com/atlassian-labs/atlaspack/commit/23d561e51e68b0c38fd1ff4e4fb173e5e7b01cf2)]:
92
+ - @atlaspack/utils@2.18.0
93
+ - @atlaspack/core@2.22.0
94
+ - @atlaspack/reporter-bundle-stats@2.14.24
95
+ - @atlaspack/query@2.14.24
96
+
97
+ ## 2.14.23
98
+
99
+ ### Patch Changes
100
+
101
+ - [#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
102
+
103
+ - 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)]:
104
+ - @atlaspack/reporter-bundle-stats@2.14.23
105
+ - @atlaspack/utils@2.17.4
106
+ - @atlaspack/core@2.21.0
107
+ - @atlaspack/query@2.14.23
108
+
109
+ ## 2.14.22
110
+
111
+ ### Patch Changes
112
+
113
+ - Updated dependencies [[`069de47`](https://github.com/atlassian-labs/atlaspack/commit/069de478e64fb5889f6f2ce023eb510782767fbd)]:
114
+ - @atlaspack/core@2.20.0
115
+ - @atlaspack/utils@2.17.3
116
+ - @atlaspack/query@2.14.22
117
+ - @atlaspack/reporter-bundle-stats@2.14.22
118
+
119
+ ## 2.14.21
120
+
121
+ ### Patch Changes
122
+
123
+ - Updated dependencies [[`a0b959f`](https://github.com/atlassian-labs/atlaspack/commit/a0b959fbf61fc3f820ff03c7e8988945fe40a91a)]:
124
+ - @atlaspack/core@2.19.2
125
+ - @atlaspack/reporter-bundle-stats@2.14.21
126
+ - @atlaspack/utils@2.17.2
127
+ - @atlaspack/query@2.14.21
128
+
129
+ ## 2.14.20
130
+
131
+ ### Patch Changes
132
+
133
+ - Updated dependencies []:
134
+ - @atlaspack/core@2.19.1
135
+ - @atlaspack/utils@2.17.1
136
+ - @atlaspack/query@2.14.20
137
+ - @atlaspack/reporter-bundle-stats@2.14.20
138
+
139
+ ## 2.14.19
140
+
141
+ ### Patch Changes
142
+
143
+ - [#645](https://github.com/atlassian-labs/atlaspack/pull/645) [`de23e0c`](https://github.com/atlassian-labs/atlaspack/commit/de23e0ce49d5504fe3947ac26640a3d951087da3) Thanks [@alshdavid](https://github.com/alshdavid)! - Updated build system and added some extra test-specific code
144
+
145
+ - 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)]:
146
+ - @atlaspack/utils@2.17.0
147
+ - @atlaspack/core@2.19.0
148
+ - @atlaspack/reporter-bundle-stats@2.14.19
149
+ - @atlaspack/query@2.14.19
150
+
151
+ ## 2.14.18
152
+
153
+ ### Patch Changes
154
+
155
+ - Updated dependencies []:
156
+ - @atlaspack/core@2.18.8
157
+ - @atlaspack/utils@2.16.1
158
+ - @atlaspack/query@2.14.18
159
+ - @atlaspack/reporter-bundle-stats@2.14.18
160
+
161
+ ## 2.14.17
162
+
163
+ ### Patch Changes
164
+
165
+ - 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)]:
166
+ - @atlaspack/core@2.18.7
167
+ - @atlaspack/utils@2.16.0
168
+ - @atlaspack/query@2.14.17
169
+ - @atlaspack/reporter-bundle-stats@2.14.17
170
+
171
+ ## 2.14.16
172
+
173
+ ### Patch Changes
174
+
175
+ - Updated dependencies [[`5ded263`](https://github.com/atlassian-labs/atlaspack/commit/5ded263c7f11b866e8885b81c73e20dd060b25be), [`74fd942`](https://github.com/atlassian-labs/atlaspack/commit/74fd94236ac697207082c4b755b079e56f5564fb)]:
176
+ - @atlaspack/core@2.18.6
177
+ - @atlaspack/utils@2.15.3
178
+ - @atlaspack/query@2.14.16
179
+ - @atlaspack/reporter-bundle-stats@2.14.16
180
+
181
+ ## 2.14.15
182
+
183
+ ### Patch Changes
184
+
185
+ - Updated dependencies [[`644b157`](https://github.com/atlassian-labs/atlaspack/commit/644b157dee72a871acc2d0facf0b87b8eea51956)]:
186
+ - @atlaspack/core@2.18.5
187
+ - @atlaspack/utils@2.15.2
188
+ - @atlaspack/query@2.14.15
189
+ - @atlaspack/reporter-bundle-stats@2.14.15
190
+
191
+ ## 2.14.14
192
+
193
+ ### Patch Changes
194
+
195
+ - 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)]:
196
+ - @atlaspack/core@2.18.4
197
+ - @atlaspack/utils@2.15.1
198
+ - @atlaspack/query@2.14.14
199
+ - @atlaspack/reporter-bundle-stats@2.14.14
200
+
201
+ ## 2.14.13
202
+
203
+ ### Patch Changes
204
+
205
+ - Updated dependencies [[`e39c6cf`](https://github.com/atlassian-labs/atlaspack/commit/e39c6cf05f7e95ce5420dbcea66f401b1cbd397c)]:
206
+ - @atlaspack/utils@2.15.0
207
+ - @atlaspack/core@2.18.3
208
+ - @atlaspack/reporter-bundle-stats@2.14.13
209
+ - @atlaspack/query@2.14.13
210
+
211
+ ## 2.14.12
212
+
213
+ ### Patch Changes
214
+
215
+ - Updated dependencies []:
216
+ - @atlaspack/core@2.18.2
217
+ - @atlaspack/utils@2.14.11
218
+ - @atlaspack/query@2.14.12
219
+ - @atlaspack/reporter-bundle-stats@2.14.12
220
+
221
+ ## 2.14.11
222
+
223
+ ### Patch Changes
224
+
225
+ - Updated dependencies []:
226
+ - @atlaspack/core@2.18.1
227
+ - @atlaspack/query@2.14.11
228
+ - @atlaspack/reporter-bundle-stats@2.14.11
229
+
230
+ ## 2.14.10
231
+
232
+ ### Patch Changes
233
+
234
+ - 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)]:
235
+ - @atlaspack/core@2.18.0
236
+ - @atlaspack/reporter-bundle-stats@2.14.10
237
+ - @atlaspack/query@2.14.10
238
+ - @atlaspack/utils@2.14.10
239
+
240
+ ## 2.14.9
241
+
242
+ ### Patch Changes
243
+
244
+ - 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)]:
245
+ - @atlaspack/core@2.17.4
246
+ - @atlaspack/query@2.14.9
247
+ - @atlaspack/reporter-bundle-stats@2.14.9
248
+ - @atlaspack/utils@2.14.9
249
+
250
+ ## 2.14.8
251
+
252
+ ### Patch Changes
253
+
254
+ - 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)]:
255
+ - @atlaspack/core@2.17.3
256
+ - @atlaspack/query@2.14.8
257
+ - @atlaspack/reporter-bundle-stats@2.14.8
258
+ - @atlaspack/utils@2.14.8
259
+
260
+ ## 2.14.7
261
+
262
+ ### Patch Changes
263
+
264
+ - Updated dependencies []:
265
+ - @atlaspack/core@2.17.2
266
+ - @atlaspack/utils@2.14.7
267
+ - @atlaspack/query@2.14.7
268
+ - @atlaspack/reporter-bundle-stats@2.14.7
269
+
270
+ ## 2.14.6
271
+
272
+ ### Patch Changes
273
+
274
+ - Updated dependencies []:
275
+ - @atlaspack/core@2.17.1
276
+ - @atlaspack/utils@2.14.6
277
+ - @atlaspack/query@2.14.6
278
+ - @atlaspack/reporter-bundle-stats@2.14.6
279
+
280
+ ## 2.14.5
281
+
282
+ ### Patch Changes
283
+
284
+ - Updated dependencies [[`2e90c9b`](https://github.com/atlassian-labs/atlaspack/commit/2e90c9bd07d7eb52645f9d84ccbb7f82685cbc8c), [`11d6f16`](https://github.com/atlassian-labs/atlaspack/commit/11d6f16b6397dee2f217167e5c98b39edb63f7a7), [`e2ba0f6`](https://github.com/atlassian-labs/atlaspack/commit/e2ba0f69702656f3d1ce95ab1454e35062b13b39)]:
285
+ - @atlaspack/core@2.17.0
286
+ - @atlaspack/query@2.14.5
287
+ - @atlaspack/reporter-bundle-stats@2.14.5
288
+ - @atlaspack/utils@2.14.5
289
+
3
290
  ## 2.14.4
4
291
 
5
292
  ### Patch Changes
package/lib/bin.js CHANGED
@@ -1,5 +1,8 @@
1
1
  #! /usr/bin/env node
2
2
  'use strict';
3
3
 
4
+ if (process.env.ATLASPACK_SOURCES === 'true' || process.env.ATLASPACK_BUILD_ENV === 'test' || process.env.ATLASPACK_SELF_BUILD) {
5
+ require('@atlaspack/babel-register');
6
+ }
4
7
  const cli = require('./cli');
5
8
  cli.command.parse();
package/lib/cli.js CHANGED
@@ -34,12 +34,17 @@ function _utils() {
34
34
  return data;
35
35
  }
36
36
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
37
- /* eslint-disable no-console, monorepo/no-internal-import */ // $FlowFixMe[untyped-import]
37
+ /* eslint-disable no-console, monorepo/no-internal-import */
38
+
39
+ // @ts-expect-error invalid export
40
+
38
41
  const {
39
42
  loadGraphs,
40
43
  getBundleStats,
41
44
  PackagedBundleClass
42
45
  } = require('./deep-imports.js');
46
+
47
+ // @ts-expect-error no types
43
48
  async function run({
44
49
  cacheDir,
45
50
  outDir
@@ -65,8 +70,6 @@ async function run({
65
70
  recursive: true
66
71
  });
67
72
  let projectRoot = process.cwd();
68
-
69
- // $FlowFixMe[unclear-type]
70
73
  let parcelOptions = {
71
74
  projectRoot
72
75
  };
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
2
 
3
3
  /* eslint-disable monorepo/no-internal-import */
4
- module.exports = {
4
+
5
+ module.exports = process.env.ATLASPACK_BUILD_ENV === 'production' || process.env.ATLASPACK_REGISTER_USE_SRC !== 'true' ? {
5
6
  // Split up require specifier to outsmart packages/dev/babel-register/babel-plugin-module-translate.js
6
- // $FlowFixMe(unsupported-syntax)
7
7
  loadGraphs: require('@atlaspack/query' + '/lib/index.js').loadGraphs,
8
- // $FlowFixMe(unsupported-syntax)
9
8
  getBundleStats: require('@atlaspack/reporter-bundle-stats' + '/lib/BundleStatsReporter.js').getBundleStats,
10
- // $FlowFixMe(unsupported-syntax)
11
9
  PackagedBundleClass: require('@atlaspack/core' + '/lib/public/Bundle.js').PackagedBundle
10
+ } : {
11
+ loadGraphs: require('@atlaspack/query/src/index.js').loadGraphs,
12
+ getBundleStats: require('@atlaspack/reporter-bundle-stats/src/BundleStatsReporter.js').getBundleStats,
13
+ PackagedBundleClass: require('@atlaspack/core/src/public/Bundle.js').PackagedBundle
12
14
  };
@@ -0,0 +1,2 @@
1
+ import commander from 'commander';
2
+ export declare const command: commander.Command;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/bundle-stats",
3
- "version": "2.14.5-canary.2+88fcaf47c",
3
+ "version": "2.14.5-canary.200+10ee3fa5b",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -9,30 +9,32 @@
9
9
  "type": "git",
10
10
  "url": "https://github.com/atlassian-labs/atlaspack.git"
11
11
  },
12
- "main": "lib/cli.js",
13
- "source": "src/cli.js",
12
+ "main": "./lib/cli.js",
13
+ "source": "./src/cli.ts",
14
+ "types": "./lib/types/cli.d.ts",
14
15
  "bin": {
15
16
  "atlaspack-bundle-stats": "bin/bundle-stats.js"
16
17
  },
17
18
  "scripts": {
18
- "prepack": "./ensure-no-dev-lib.sh",
19
- "dev:prepare": "rimraf ./lib/ && mkdir -p lib && cp ./bin/dev-bin.js ./lib/bin.js"
19
+ "dev:prepare": "rimraf ./lib/ && mkdir -p lib && cp ./bin/dev-bin.js ./lib/bin.js",
20
+ "check-ts": "tsc --emitDeclarationOnly --rootDir src",
21
+ "build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
20
22
  },
21
23
  "engines": {
22
24
  "node": ">= 16.0.0"
23
25
  },
24
26
  "dependencies": {
25
- "@atlaspack/core": "2.16.2-canary.2+88fcaf47c",
26
- "@atlaspack/query": "2.14.5-canary.2+88fcaf47c",
27
- "@atlaspack/reporter-bundle-stats": "2.14.5-canary.2+88fcaf47c",
28
- "@atlaspack/utils": "2.14.5-canary.2+88fcaf47c",
27
+ "@atlaspack/core": "2.16.2-canary.200+10ee3fa5b",
28
+ "@atlaspack/query": "2.14.5-canary.200+10ee3fa5b",
29
+ "@atlaspack/reporter-bundle-stats": "2.14.5-canary.200+10ee3fa5b",
30
+ "@atlaspack/utils": "2.14.5-canary.200+10ee3fa5b",
29
31
  "commander": "^7.0.0"
30
32
  },
31
33
  "devDependencies": {
32
- "@atlaspack/babel-register": "2.14.1",
33
- "@atlaspack/types": "2.14.5-canary.2+88fcaf47c",
34
+ "@atlaspack/babel-register": "2.14.4",
35
+ "@atlaspack/types": "2.14.5-canary.200+10ee3fa5b",
34
36
  "rimraf": "^5.0.5"
35
37
  },
36
38
  "type": "commonjs",
37
- "gitHead": "88fcaf47c77a6b7a16003028dd65a4b7a1f19dd7"
38
- }
39
+ "gitHead": "10ee3fa5b75a92acde8973673d9b3c5b6f3958e5"
40
+ }
package/src/bin.js CHANGED
@@ -3,7 +3,8 @@
3
3
  'use strict';
4
4
 
5
5
  if (
6
- process.env.ATLASPACK_BUILD_ENV !== 'production' ||
6
+ process.env.ATLASPACK_SOURCES === 'true' ||
7
+ process.env.ATLASPACK_BUILD_ENV === 'test' ||
7
8
  process.env.ATLASPACK_SELF_BUILD
8
9
  ) {
9
10
  require('@atlaspack/babel-register');
@@ -1,10 +1,9 @@
1
1
  /* eslint-disable no-console, monorepo/no-internal-import */
2
- // @flow strict-local
3
2
  import type {PackagedBundle} from '@atlaspack/types';
4
3
  import type {ParcelOptions} from '@atlaspack/core/src/types';
4
+ // @ts-expect-error invalid export
5
5
  import type {commander$Command} from 'commander';
6
6
 
7
- // $FlowFixMe[untyped-import]
8
7
  import {version} from '../package.json';
9
8
 
10
9
  import commander from 'commander';
@@ -18,6 +17,7 @@ const {
18
17
  PackagedBundleClass,
19
18
  } = require('./deep-imports.js');
20
19
 
20
+ // @ts-expect-error no types
21
21
  async function run({cacheDir, outDir}) {
22
22
  // 1. load bundle graph and info via parcel~query
23
23
  let {bundleGraph, bundleInfo} = await loadGraphs(cacheDir);
@@ -39,12 +39,11 @@ async function run({cacheDir, outDir}) {
39
39
 
40
40
  let projectRoot = process.cwd();
41
41
 
42
- // $FlowFixMe[unclear-type]
43
- let parcelOptions: ParcelOptions = ({projectRoot}: any);
42
+ let parcelOptions: ParcelOptions = {projectRoot} as any;
44
43
 
45
44
  let bundlesByTarget: DefaultMap<
46
45
  string /* target name */,
47
- Array<PackagedBundle>,
46
+ Array<PackagedBundle>
48
47
  > = new DefaultMap(() => []);
49
48
  for (let bundle of bundleGraph.getBundles()) {
50
49
  bundlesByTarget
@@ -67,7 +66,7 @@ async function run({cacheDir, outDir}) {
67
66
  }
68
67
  }
69
68
 
70
- export const command: commander$Command = new commander.Command()
69
+ export const command: commander.Command = new commander.Command()
71
70
  .version(version, '-V, --version')
72
71
  .description('Generate a stats report for a Parcel build')
73
72
  .option('-v, --verbose', 'Print verbose output')
@@ -0,0 +1,33 @@
1
+ /* eslint-disable monorepo/no-internal-import */
2
+ import {loadGraphs} from '@atlaspack/query/src/index';
3
+ import {getBundleStats} from '@atlaspack/reporter-bundle-stats/src/BundleStatsReporter';
4
+ import {PackagedBundle as PackagedBundleClass} from '@atlaspack/core/src/public/Bundle';
5
+
6
+ module.exports = (
7
+ process.env.ATLASPACK_BUILD_ENV === 'production' ||
8
+ process.env.ATLASPACK_REGISTER_USE_SRC !== 'true'
9
+ ? {
10
+ // Split up require specifier to outsmart packages/dev/babel-register/babel-plugin-module-translate.js
11
+ loadGraphs: require('@atlaspack/query' + '/lib/index.js').loadGraphs,
12
+ getBundleStats: require(
13
+ '@atlaspack/reporter-bundle-stats' + '/lib/BundleStatsReporter.js',
14
+ ).getBundleStats,
15
+ PackagedBundleClass: require(
16
+ '@atlaspack/core' + '/lib/public/Bundle.js',
17
+ ).PackagedBundle,
18
+ }
19
+ : {
20
+ loadGraphs: require('@atlaspack/query/src/index.js').loadGraphs,
21
+ getBundleStats:
22
+ require('@atlaspack/reporter-bundle-stats/src/BundleStatsReporter.js')
23
+ .getBundleStats,
24
+ PackagedBundleClass: require('@atlaspack/core/src/public/Bundle.js')
25
+ .PackagedBundle,
26
+ }
27
+ ) as {
28
+ // @ts-expect-error TS2749
29
+ loadGraphs: loadGraphs;
30
+ // @ts-expect-error TS2749
31
+ getBundleStats: getBundleStats;
32
+ PackagedBundleClass: PackagedBundleClass;
33
+ };
package/tsconfig.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "../../../tsconfig.json",
3
+ "include": ["src"]
4
+ }
@@ -1,30 +0,0 @@
1
- // @flow
2
- /* eslint-disable monorepo/no-internal-import */
3
- import typeof {loadGraphs} from '@atlaspack/query/src/index';
4
- import typeof {getBundleStats} from '@atlaspack/reporter-bundle-stats/src/BundleStatsReporter';
5
- import typeof {PackagedBundle as PackagedBundleClass} from '@atlaspack/core/src/public/Bundle';
6
-
7
- module.exports = ((process.env.ATLASPACK_BUILD_ENV === 'production'
8
- ? {
9
- // Split up require specifier to outsmart packages/dev/babel-register/babel-plugin-module-translate.js
10
- // $FlowFixMe(unsupported-syntax)
11
- loadGraphs: require('@atlaspack/query' + '/lib/index.js').loadGraphs,
12
- // $FlowFixMe(unsupported-syntax)
13
- getBundleStats: require('@atlaspack/reporter-bundle-stats' +
14
- '/lib/BundleStatsReporter.js').getBundleStats,
15
- // $FlowFixMe(unsupported-syntax)
16
- PackagedBundleClass: require('@atlaspack/core' + '/lib/public/Bundle.js')
17
- .PackagedBundle,
18
- }
19
- : {
20
- loadGraphs: require('@atlaspack/query/src/index.js').loadGraphs,
21
- getBundleStats:
22
- require('@atlaspack/reporter-bundle-stats/src/BundleStatsReporter.js')
23
- .getBundleStats,
24
- PackagedBundleClass: require('@atlaspack/core/src/public/Bundle.js')
25
- .PackagedBundle,
26
- }): {|
27
- loadGraphs: loadGraphs,
28
- getBundleStats: getBundleStats,
29
- PackagedBundleClass: PackagedBundleClass,
30
- |});