Skip to content

Commit 66ac3c8

Browse files
authored
Merge pull request #431 from j-f1/pedant
Correct a few minor typographical errors in the message
2 parents 2772a80 + 0f1e4fe commit 66ac3c8

File tree

7 files changed

+44
-44
lines changed

7 files changed

+44
-44
lines changed

__tests__/__snapshots__/main.test.ts.snap

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ exports[`Shows stats when files are added 1`] = `
55
66
Files count | Total bundle size | % Changed
77
----------- | ----------------- | ---------
8-
2 -> 7 | 1.29 MB -> 1.34 MB (+53.65 KB)<br />N/A -> 386.44 KB (gzip) | +4.07%"
8+
2 7 | 1.29 MB 1.34 MB (+53.65 kB)<br />N/A 386.44 kB (gzip) | +4.07%"
99
`;
1010

1111
exports[`Shows stats when files are added 2`] = `
1212
"**Added**
1313
1414
Asset | File Size | % Changed
1515
----- | --------- | ---------
16-
296.chunk.js | 0 B -> 124.57 KB (+124.57 KB)<br />0 B -> 35.05 KB (gzip) | -
17-
288.chunk.js | 0 B -> 57.24 KB (+57.24 KB)<br />0 B -> 16.33 KB (gzip) | -
18-
920.chunk.js | 0 B -> 54.98 KB (+54.98 KB)<br />0 B -> 17.08 KB (gzip) | -
19-
912.chunk.js | 0 B -> 44.37 KB (+44.37 KB)<br />0 B -> 14.31 KB (gzip) | -
20-
699.chunk.js | 0 B -> 26.39 KB (+26.39 KB)<br />0 B -> 6.14 KB (gzip) | -
16+
296.chunk.js | 0 B 124.57 kB (+124.57 kB)<br />0 B 35.05 kB (gzip) | -
17+
288.chunk.js | 0 B 57.24 kB (+57.24 kB)<br />0 B 16.33 kB (gzip) | -
18+
920.chunk.js | 0 B 54.98 kB (+54.98 kB)<br />0 B 17.08 kB (gzip) | -
19+
912.chunk.js | 0 B 44.37 kB (+44.37 kB)<br />0 B 14.31 kB (gzip) | -
20+
699.chunk.js | 0 B 26.39 kB (+26.39 kB)<br />0 B 6.14 kB (gzip) | -
2121
2222
**Removed**
2323
@@ -27,13 +27,13 @@ No assets were removed
2727
2828
Asset | File Size | % Changed
2929
----- | --------- | ---------
30-
manifest.json | 91 B -> 551 B (+460 B)<br />N/A -> 151 B (gzip) | +505.49%
30+
manifest.json | 91 B 551 B (+460 B)<br />N/A 151 B (gzip) | +505.49%
3131
3232
**Smaller**
3333
3434
Asset | File Size | % Changed
3535
----- | --------- | ---------
36-
app.bundle.js | 1.29 MB -> 1.04 MB (-254.35 KB)<br />N/A -> 297.38 KB (gzip) | -19.29%
36+
app.bundle.js | 1.29 MB 1.04 MB (-254.35 kB)<br />N/A 297.38 kB (gzip) | -19.29%
3737
3838
**Unchanged**
3939
@@ -75,7 +75,7 @@ exports[`Shows stats when files are removed 1`] = `
7575
7676
Files count | Total bundle size | % Changed
7777
----------- | ----------------- | ---------
78-
7 -> 2 | 1.34 MB -> 1.29 MB (-53.65 KB)<br />386.44 KB -> N/A (gzip) | -3.91%"
78+
7 2 | 1.34 MB 1.29 MB (-53.65 kB)<br />386.44 kB → N/A (gzip) | -3.91%"
7979
`;
8080

8181
exports[`Shows stats when files are removed 2`] = `
@@ -87,23 +87,23 @@ No assets were added
8787
8888
Asset | File Size | % Changed
8989
----- | --------- | ---------
90-
296.chunk.js | 124.57 KB -> 0 B (-124.57 KB)<br />35.05 KB -> 0 B (gzip) | -100%
91-
288.chunk.js | 57.24 KB -> 0 B (-57.24 KB)<br />16.33 KB -> 0 B (gzip) | -100%
92-
920.chunk.js | 54.98 KB -> 0 B (-54.98 KB)<br />17.08 KB -> 0 B (gzip) | -100%
93-
912.chunk.js | 44.37 KB -> 0 B (-44.37 KB)<br />14.31 KB -> 0 B (gzip) | -100%
94-
699.chunk.js | 26.39 KB -> 0 B (-26.39 KB)<br />6.14 KB -> 0 B (gzip) | -100%
90+
296.chunk.js | 124.57 kB → 0 B (-124.57 kB)<br />35.05 kB → 0 B (gzip) | -100%
91+
288.chunk.js | 57.24 kB → 0 B (-57.24 kB)<br />16.33 kB → 0 B (gzip) | -100%
92+
920.chunk.js | 54.98 kB → 0 B (-54.98 kB)<br />17.08 kB → 0 B (gzip) | -100%
93+
912.chunk.js | 44.37 kB → 0 B (-44.37 kB)<br />14.31 kB → 0 B (gzip) | -100%
94+
699.chunk.js | 26.39 kB → 0 B (-26.39 kB)<br />6.14 kB → 0 B (gzip) | -100%
9595
9696
**Bigger**
9797
9898
Asset | File Size | % Changed
9999
----- | --------- | ---------
100-
app.bundle.js | 1.04 MB -> 1.29 MB (+254.35 KB)<br />297.38 KB -> N/A (gzip) | +23.91%
100+
app.bundle.js | 1.04 MB 1.29 MB (+254.35 kB)<br />297.38 kB → N/A (gzip) | +23.91%
101101
102102
**Smaller**
103103
104104
Asset | File Size | % Changed
105105
----- | --------- | ---------
106-
manifest.json | 551 B -> 91 B (-460 B)<br />151 B -> N/A (gzip) | -83.48%
106+
manifest.json | 551 B 91 B (-460 B)<br />151 B N/A (gzip) | -83.48%
107107
108108
**Unchanged**
109109
@@ -115,7 +115,7 @@ exports[`Shows stats when files are unchanged 1`] = `
115115
116116
Files count | Total bundle size | % Changed
117117
----------- | ----------------- | ---------
118-
7 | 1.34 MB<br />386.44 KB | 0%"
118+
7 | 1.34 MB<br />386.44 kB | 0%"
119119
`;
120120

121121
exports[`Shows stats when files are unchanged 2`] = `
@@ -139,12 +139,12 @@ No assets were smaller
139139
140140
Asset | File Size | % Changed
141141
----- | --------- | ---------
142-
app.bundle.js | 1.04 MB<br />297.38 KB | 0%
143-
296.chunk.js | 124.57 KB<br />35.05 KB | 0%
144-
288.chunk.js | 57.24 KB<br />16.33 KB | 0%
145-
920.chunk.js | 54.98 KB<br />17.08 KB | 0%
146-
912.chunk.js | 44.37 KB<br />14.31 KB | 0%
147-
699.chunk.js | 26.39 KB<br />6.14 KB | 0%
142+
app.bundle.js | 1.04 MB<br />297.38 kB | 0%
143+
296.chunk.js | 124.57 kB<br />35.05 kB | 0%
144+
288.chunk.js | 57.24 kB<br />16.33 kB | 0%
145+
920.chunk.js | 54.98 kB<br />17.08 kB | 0%
146+
912.chunk.js | 44.37 kB<br />14.31 kB | 0%
147+
699.chunk.js | 26.39 kB<br />6.14 kB | 0%
148148
manifest.json | 551 B<br />151 B | 0%"
149149
`;
150150

@@ -155,16 +155,16 @@ exports[`displays module information when files are added/removed/changed 1`] =
155155
156156
File | Δ | Size
157157
---- | - | ----
158-
\`src/client/this/file/has/a/long/name/so-that-it-will-hopefully-wrap.tsx\` | 🆕 +2.72 KB | 0 B -> 2.72 KB
159-
\`src/client/this-file-was-added.ts\` | 🆕 +1.46 KB | 0 B -> 1.46 KB
160-
\`src/client/this-is-another-file-with-a-long-name-to-test-the-table-sizing.tsx\` | 🆕 +1.04 KB | 0 B -> 1.04 KB
161-
\`src/client/helpers/this-file-is-much-larger.ts\` | 📈 +11.66 KB (+865.77%) | 1.35 KB -> 13.01 KB
162-
\`src/client/this-file-grew-larger.tsx\` | 📈 +200 B (+35.59%) | 562 B -> 762 B
163-
\`src/client/helpers/this-file-grew-smaller.ts\` | 📉 -200 B (-7.94%) | 2.46 KB -> 2.26 KB
164-
\`src/client/this-file-is-much-smaller.tsx\` | 📉 -11.66 KB (-99.92%) | 11.67 KB -> 10 B
165-
\`src/client/routes.tsx\` | 🔥 -2.72 KB (-100%) | 2.72 KB -> 0 B
166-
\`src/client/this-file-will-be-deleted.ts\` | 🔥 -1.46 KB (-100%) | 1.46 KB -> 0 B
167-
\`src/client/render-memex.tsx\` | 🔥 -1.04 KB (-100%) | 1.04 KB -> 0 B
158+
\`src/client/this/file/has/a/long/name/so-that-it-will-hopefully-wrap.tsx\` | 🆕 +2.72 kB | 0 B 2.72 kB
159+
\`src/client/this-file-was-added.ts\` | 🆕 +1.46 kB | 0 B 1.46 kB
160+
\`src/client/this-is-another-file-with-a-long-name-to-test-the-table-sizing.tsx\` | 🆕 +1.04 kB | 0 B 1.04 kB
161+
\`src/client/helpers/this-file-is-much-larger.ts\` | 📈 +11.66 kB (+865.77%) | 1.35 kB → 13.01 kB
162+
\`src/client/this-file-grew-larger.tsx\` | 📈 +200 B (+35.59%) | 562 B 762 B
163+
\`src/client/helpers/this-file-grew-smaller.ts\` | 📉 -200 B (-7.94%) | 2.46 kB → 2.26 kB
164+
\`src/client/this-file-is-much-smaller.tsx\` | 📉 -11.66 kB (-99.92%) | 11.67 kB → 10 B
165+
\`src/client/routes.tsx\` | 🔥 -2.72 kB (-100%) | 2.72 kB → 0 B
166+
\`src/client/this-file-will-be-deleted.ts\` | 🔥 -1.46 kB (-100%) | 1.46 kB → 0 B
167+
\`src/client/render-memex.tsx\` | 🔥 -1.04 kB (-100%) | 1.04 kB → 0 B
168168
169169
</details>
170170
"

dist/index.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/file-sizes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const BYTES_PER_KILOBYTE = 1024
22
const denominations = [
33
'B', // 1 Byte
4-
'KB', // 1 Kilobyte
4+
'kB', // 1 Kilobyte
55
'MB', // 1 Megabyte
66
'GB', // 1 Gigabyte
77
'TB', // 1 Terabyte

src/print-markdown.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function toFileSizeDiff(
5050
diff?: number | undefined
5151
): string {
5252
const diffLine = [
53-
`${formatFileSizeIEC(oldSize)} -> ${formatFileSizeIEC(newSize)}`
53+
`${formatFileSizeIEC(oldSize)} ${formatFileSizeIEC(newSize)}`
5454
]
5555
if (typeof diff !== 'undefined') {
5656
diffLine.push(`(${signFor(diff)}${formatFileSizeIEC(diff)})`)
@@ -152,7 +152,7 @@ function printChunkModuleRow(chunkModule: AssetDiff): string {
152152
? ` (${conditionalPercentage(chunkModule.diffPercentage)})`
153153
: ''
154154
}`,
155-
`${formatFileSizeIEC(chunkModule.old.size)} -> ${formatFileSizeIEC(
155+
`${formatFileSizeIEC(chunkModule.old.size)} ${formatFileSizeIEC(
156156
chunkModule.new.size
157157
)}`
158158
].join(' | ')

src/to-comment-body.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function getCommentBody(
1515
title: string
1616
): string {
1717
return `
18-
### Bundle Stats${title ? ` - ${title}` : ''}
18+
### Bundle Stats${title ? ` ${title}` : ''}
1919
2020
Hey there, this message comes from a [GitHub action](https://github.com/github/webpack-bundlesize-compare-action) that helps you and reviewers to understand how these changes affect the size of this project's bundle.
2121

src/webpack-stats-diff.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export function webpackStatsDiff(
5656
total: getAssetDiff(
5757
oldFilesCount === newFilesCount
5858
? `${newFilesCount}`
59-
: `${oldFilesCount} -> ${newFilesCount}`,
59+
: `${oldFilesCount} ${newFilesCount}`,
6060
{size: oldSizeTotal, gzipSize: oldGzipSizeTotal},
6161
{size: newSizeTotal, gzipSize: newGzipSizeTotal}
6262
)

0 commit comments

Comments
 (0)