@@ -28,11 +28,11 @@ No assets were added
2828
2929Asset | Type | File Size | % Changed
3030----- | ---- | --------- | ---------
31- 296.chunk.js | bundled<br />gzip | 124.57 KB -> 0 Bytes (-124.57 KB)<br />35.05 KB -> 0 Bytes | -100%
32- 288.chunk.js | bundled<br />gzip | 57.24 KB -> 0 Bytes (-57.24 KB)<br />16.33 KB -> 0 Bytes | -100%
33- 920.chunk.js | bundled<br />gzip | 54.98 KB -> 0 Bytes (-54.98 KB)<br />17.08 KB -> 0 Bytes | -100%
34- 912.chunk.js | bundled<br />gzip | 44.37 KB -> 0 Bytes (-44.37 KB)<br />14.31 KB -> 0 Bytes | -100%
35- 699.chunk.js | bundled<br />gzip | 26.39 KB -> 0 Bytes (-26.39 KB)<br />6.14 KB -> 0 Bytes | -100%
31+ 296.chunk.js | bundled<br />gzip | 124.57 KB -> 0 B (-124.57 KB)<br />35.05 KB -> 0 B | -100%
32+ 288.chunk.js | bundled<br />gzip | 57.24 KB -> 0 B (-57.24 KB)<br />16.33 KB -> 0 B | -100%
33+ 920.chunk.js | bundled<br />gzip | 54.98 KB -> 0 B (-54.98 KB)<br />17.08 KB -> 0 B | -100%
34+ 912.chunk.js | bundled<br />gzip | 44.37 KB -> 0 B (-44.37 KB)<br />14.31 KB -> 0 B | -100%
35+ 699.chunk.js | bundled<br />gzip | 26.39 KB -> 0 B (-26.39 KB)<br />6.14 KB -> 0 B | -100%
3636
3737**Bigger**
3838
@@ -44,7 +44,7 @@ app.bundle.js | bundled<br />gzip | 1.04 MB -> 1.29 MB (+254.35 KB)<br />297.38
4444
4545Asset | Type | File Size | % Changed
4646----- | ---- | --------- | ---------
47- manifest.json | bundled<br />gzip | 551 Bytes -> 91 Bytes (-460 Bytes )<br />151 Bytes -> N/A | -83.48%
47+ manifest.json | bundled<br />gzip | 551 B -> 91 B (-460 B )<br />151 B -> N/A | -83.48%
4848
4949**Unchanged**
5050
@@ -66,11 +66,11 @@ Files count | Type | Total bundle size | % Changed
6666
6767Asset | Type | File Size | % Changed
6868----- | ---- | --------- | ---------
69- 296.chunk.js | bundled<br />gzip | 0 Bytes -> 124.57 KB (+124.57 KB)<br />0 Bytes -> 35.05 KB | -
70- 288.chunk.js | bundled<br />gzip | 0 Bytes -> 57.24 KB (+57.24 KB)<br />0 Bytes -> 16.33 KB | -
71- 920.chunk.js | bundled<br />gzip | 0 Bytes -> 54.98 KB (+54.98 KB)<br />0 Bytes -> 17.08 KB | -
72- 912.chunk.js | bundled<br />gzip | 0 Bytes -> 44.37 KB (+44.37 KB)<br />0 Bytes -> 14.31 KB | -
73- 699.chunk.js | bundled<br />gzip | 0 Bytes -> 26.39 KB (+26.39 KB)<br />0 Bytes -> 6.14 KB | -
69+ 296.chunk.js | bundled<br />gzip | 0 B -> 124.57 KB (+124.57 KB)<br />0 B -> 35.05 KB | -
70+ 288.chunk.js | bundled<br />gzip | 0 B -> 57.24 KB (+57.24 KB)<br />0 B -> 16.33 KB | -
71+ 920.chunk.js | bundled<br />gzip | 0 B -> 54.98 KB (+54.98 KB)<br />0 B -> 17.08 KB | -
72+ 912.chunk.js | bundled<br />gzip | 0 B -> 44.37 KB (+44.37 KB)<br />0 B -> 14.31 KB | -
73+ 699.chunk.js | bundled<br />gzip | 0 B -> 26.39 KB (+26.39 KB)<br />0 B -> 6.14 KB | -
7474
7575**Removed**
7676
@@ -80,7 +80,7 @@ No assets were removed
8080
8181Asset | Type | File Size | % Changed
8282----- | ---- | --------- | ---------
83- manifest.json | bundled<br />gzip | 91 Bytes -> 551 Bytes (+460 Bytes )<br />N/A -> 151 Bytes | +505.49%
83+ manifest.json | bundled<br />gzip | 91 B -> 551 B (+460 B )<br />N/A -> 151 B | +505.49%
8484
8585**Smaller**
8686
@@ -130,7 +130,7 @@ app.bundle.js | bundled<br />gzip | 1.04 MB<br />297.38 KB | 0%
130130920.chunk.js | bundled<br />gzip | 54.98 KB<br />17.08 KB | 0%
131131912.chunk.js | bundled<br />gzip | 44.37 KB<br />14.31 KB | 0%
132132699.chunk.js | bundled<br />gzip | 26.39 KB<br />6.14 KB | 0%
133- manifest.json | bundled<br />gzip | 551 Bytes <br />151 Bytes | 0%` )
133+ manifest.json | bundled<br />gzip | 551 B <br />151 B | 0%` )
134134} )
135135
136136test ( 'computes the correct module diff information' , ( ) => {
@@ -139,42 +139,34 @@ test('computes the correct module diff information', () => {
139139 require ( './__mocks__/new-stats-with-chunks.json' )
140140 )
141141
142- expect ( statsDiff ?. added ) . toEqual ( [
143- {
144- name : './src/client/this-file-was-added.ts' ,
145- diff : 1496 ,
146- diffPercentage : Infinity ,
147- new : { size : 1496 , gzipSize : NaN } ,
148- old : { size : 0 , gzipSize : 0 }
149- }
150- ] as AssetDiff [ ] )
151- expect ( statsDiff ?. bigger ) . toEqual ( [
152- {
153- name : './src/client/this-file-grew-larger.tsx' ,
154- diff : 200 ,
155- diffPercentage : 35.58719 ,
156- new : { size : 762 , gzipSize : NaN } ,
157- old : { size : 562 , gzipSize : NaN }
158- }
159- ] as AssetDiff [ ] )
160- expect ( statsDiff ?. smaller ) . toEqual ( [
161- {
162- name : './src/client/helpers/this-file-grew-smaller.ts' ,
163- diff : - 200 ,
164- diffPercentage : - 7.94281 ,
165- new : { size : 2318 , gzipSize : NaN } ,
166- old : { size : 2518 , gzipSize : NaN }
167- }
168- ] as AssetDiff [ ] )
169- expect ( statsDiff ?. removed ) . toEqual ( [
170- {
171- name : './src/client/this-file-will-be-deleted.ts' ,
172- diff : - 1496 ,
173- diffPercentage : - 100 ,
174- new : { size : 0 , gzipSize : 0 } ,
175- old : { size : 1496 , gzipSize : NaN }
176- }
177- ] as AssetDiff [ ] )
142+ expect ( statsDiff ?. added ) . toContainEqual ( {
143+ name : './src/client/this-file-was-added.ts' ,
144+ diff : 1496 ,
145+ diffPercentage : Infinity ,
146+ new : { size : 1496 , gzipSize : NaN } ,
147+ old : { size : 0 , gzipSize : 0 }
148+ } as AssetDiff )
149+ expect ( statsDiff ?. bigger ) . toContainEqual ( {
150+ name : './src/client/this-file-grew-larger.tsx' ,
151+ diff : 200 ,
152+ diffPercentage : 35.58719 ,
153+ new : { size : 762 , gzipSize : NaN } ,
154+ old : { size : 562 , gzipSize : NaN }
155+ } as AssetDiff )
156+ expect ( statsDiff ?. smaller ) . toContainEqual ( {
157+ name : './src/client/helpers/this-file-grew-smaller.ts' ,
158+ diff : - 200 ,
159+ diffPercentage : - 7.94281 ,
160+ new : { size : 2318 , gzipSize : NaN } ,
161+ old : { size : 2518 , gzipSize : NaN }
162+ } as AssetDiff )
163+ expect ( statsDiff ?. removed ) . toContainEqual ( {
164+ name : './src/client/this-file-will-be-deleted.ts' ,
165+ diff : - 1496 ,
166+ diffPercentage : - 100 ,
167+ new : { size : 0 , gzipSize : 0 } ,
168+ old : { size : 1496 , gzipSize : NaN }
169+ } as AssetDiff )
178170 expect ( statsDiff ?. total . new ) . toEqual ( statsDiff ?. total . old )
179171 expect ( statsDiff ?. total . diff ) . toEqual ( 0 )
180172 expect ( statsDiff ?. total . diffPercentage ) . toEqual ( 0 )
@@ -186,15 +178,42 @@ test('displays module information when files are added/removed/changed', () => {
186178 require ( './__mocks__/new-stats-with-chunks.json' )
187179 )
188180
181+ console . log ( printChunkModulesTable ( statsDiff ) )
182+
189183 expect ( printChunkModulesTable ( statsDiff ) ) . toEqual ( `
190184**Changeset**
191185
192- File | Size | % Changed
193- ---- | ---- | ---------
194- ./src/client/this-file-was-added.ts | 0 Bytes -> 1.46 KB (+1.46 KB) | -
195- ./src/client/this-file-grew-larger.tsx | 562 Bytes -> 762 Bytes (+200 Bytes) | +35.59%
196- ./src/client/helpers/this-file-grew-smaller.ts | 2.46 KB -> 2.26 KB (-200 Bytes) | -7.94%
197- ./src/client/this-file-will-be-deleted.ts | 1.46 KB -> 0 Bytes (-1.46 KB) | -100%` )
186+ File | Δ
187+ ---- | -
188+ \`src/client/this/file/has/a/long/name/so-that-it-will-hopefully-wrap.tsx\` | 🆕 +2.72 KB
189+ \`src/client/this-file-was-added.ts\` | 🆕 +1.46 KB
190+ \`src/client/this-is-another-file-with-a-long-name-to-test-the-table-sizing.tsx\` | 🆕 +1.04 KB
191+ \`src/client/helpers/this-file-is-much-larger.ts\` | 📈 +11.66 KB (+865.77%)
192+ \`src/client/this-file-grew-larger.tsx\` | 📈 +200 B (+35.59%)
193+ \`src/client/helpers/this-file-grew-smaller.ts\` | 📉 -200 B (-7.94%)
194+ \`src/client/this-file-is-much-smaller.tsx\` | 📉 -11.66 KB (-99.92%)
195+ \`src/client/routes.tsx\` | 🔥 -2.72 KB (-100%)
196+ \`src/client/this-file-will-be-deleted.ts\` | 🔥 -1.46 KB (-100%)
197+ \`src/client/render-memex.tsx\` | 🔥 -1.04 KB (-100%)
198+
199+ <details>
200+ <summary>View detailed changes</summary>
201+
202+ File | Old | New | Δ
203+ ---- | --- | --- | -
204+ \`src/client/this/file/has/a/long/name/so-that-it-will-hopefully-wrap.tsx\` | 0 B | 2.72 KB | 🆕 +2.72 KB
205+ \`src/client/this-file-was-added.ts\` | 0 B | 1.46 KB | 🆕 +1.46 KB
206+ \`src/client/this-is-another-file-with-a-long-name-to-test-the-table-sizing.tsx\` | 0 B | 1.04 KB | 🆕 +1.04 KB
207+ \`src/client/helpers/this-file-is-much-larger.ts\` | 1.35 KB | 13.01 KB | 📈 +11.66 KB (+865.77%)
208+ \`src/client/this-file-grew-larger.tsx\` | 562 B | 762 B | 📈 +200 B (+35.59%)
209+ \`src/client/helpers/this-file-grew-smaller.ts\` | 2.46 KB | 2.26 KB | 📉 -200 B (-7.94%)
210+ \`src/client/this-file-is-much-smaller.tsx\` | 11.67 KB | 10 B | 📉 -11.66 KB (-99.92%)
211+ \`src/client/routes.tsx\` | 2.72 KB | 0 B | 🔥 -2.72 KB (-100%)
212+ \`src/client/this-file-will-be-deleted.ts\` | 1.46 KB | 0 B | 🔥 -1.46 KB (-100%)
213+ \`src/client/render-memex.tsx\` | 1.04 KB | 0 B | 🔥 -1.04 KB (-100%)
214+
215+ </details>
216+ ` )
198217} )
199218
200219test ( 'displays no module information when unchanged' , ( ) => {
0 commit comments