@mui/internal-bundle-size-checker 1.0.9-canary.12 → 1.0.9-canary.13
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/internal-bundle-size-checker",
|
|
3
|
-
"version": "1.0.9-canary.
|
|
3
|
+
"version": "1.0.9-canary.13",
|
|
4
4
|
"description": "Bundle size checker for MUI packages.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@types/webpack-bundle-analyzer": "^4.7.0",
|
|
52
52
|
"@types/yargs": "^17.0.33"
|
|
53
53
|
},
|
|
54
|
-
"gitSha": "
|
|
54
|
+
"gitSha": "f17b92d918a4979325ae9ee8259bb35dd83ca510",
|
|
55
55
|
"scripts": {
|
|
56
56
|
"typescript": "tsc -p tsconfig.json",
|
|
57
57
|
"test": "pnpm -w test --project @mui/internal-bundle-size-checker"
|
|
@@ -97,11 +97,13 @@ function formatMarkdownTable(columns, data) {
|
|
|
97
97
|
const separators = alignments.map((align) => {
|
|
98
98
|
switch (align) {
|
|
99
99
|
case 'center':
|
|
100
|
-
return '
|
|
100
|
+
return ':---------:';
|
|
101
101
|
case 'right':
|
|
102
102
|
return '----------:';
|
|
103
|
+
case 'left':
|
|
104
|
+
return ':----------';
|
|
103
105
|
default:
|
|
104
|
-
return '
|
|
106
|
+
return '-----------';
|
|
105
107
|
}
|
|
106
108
|
});
|
|
107
109
|
table += `|${separators.join('|')}|\n`;
|
|
@@ -141,9 +143,9 @@ export function renderMarkdownReportContent(
|
|
|
141
143
|
|
|
142
144
|
markdownContent += formatMarkdownTable(
|
|
143
145
|
[
|
|
144
|
-
{ field: 'id', header: 'Bundle' },
|
|
145
|
-
{ field: 'parsed', header: 'Parsed
|
|
146
|
-
{ field: 'gzip', header: 'Gzip
|
|
146
|
+
{ field: 'id', header: 'Bundle', align: 'left' },
|
|
147
|
+
{ field: 'parsed', header: 'Parsed size', align: 'right' },
|
|
148
|
+
{ field: 'gzip', header: 'Gzip size', align: 'right' },
|
|
147
149
|
],
|
|
148
150
|
trackedEntries.map(({ id, parsed, gzip }) => ({
|
|
149
151
|
id,
|
|
@@ -353,8 +353,8 @@ describe('renderMarkdownReport', () => {
|
|
|
353
353
|
});
|
|
354
354
|
|
|
355
355
|
expect(result).toMatchInlineSnapshot(`
|
|
356
|
-
"| Bundle | Parsed
|
|
357
|
-
|
|
356
|
+
"| Bundle | Parsed size | Gzip size |
|
|
357
|
+
|:----------|----------:|----------:|
|
|
358
358
|
| @mui/material/Button/index.js | 🔺+400B<sup>(+2.67%)</sup> | 🔺+100B<sup>(+2.22%)</sup> |
|
|
359
359
|
| @mui/material/TextField/index.js | 🔺+200B<sup>(+0.91%)</sup> | 🔺+100B<sup>(+1.54%)</sup> |
|
|
360
360
|
|
|
@@ -388,8 +388,8 @@ describe('renderMarkdownReport', () => {
|
|
|
388
388
|
});
|
|
389
389
|
|
|
390
390
|
expect(result).toMatchInlineSnapshot(`
|
|
391
|
-
"| Bundle | Parsed
|
|
392
|
-
|
|
391
|
+
"| Bundle | Parsed size | Gzip size |
|
|
392
|
+
|:----------|----------:|----------:|
|
|
393
393
|
| @mui/material/Button/index.js | 🔺+500B<sup>(+3.33%)</sup> | 🔺+150B<sup>(+3.33%)</sup> |
|
|
394
394
|
| @mui/material/TextField/index.js | 🔺+300B<sup>(+1.36%)</sup> | 🔺+150B<sup>(+2.31%)</sup> |
|
|
395
395
|
|
|
@@ -423,8 +423,8 @@ describe('renderMarkdownReport', () => {
|
|
|
423
423
|
});
|
|
424
424
|
|
|
425
425
|
expect(result).toMatchInlineSnapshot(`
|
|
426
|
-
"| Bundle | Parsed
|
|
427
|
-
|
|
426
|
+
"| Bundle | Parsed size | Gzip size |
|
|
427
|
+
|:----------|----------:|----------:|
|
|
428
428
|
| @mui/material/Button/index.js | 🔺+400B<sup>(+2.67%)</sup> | 🔺+100B<sup>(+2.22%)</sup> |
|
|
429
429
|
|
|
430
430
|
|
|
@@ -457,8 +457,8 @@ describe('renderMarkdownReport', () => {
|
|
|
457
457
|
});
|
|
458
458
|
|
|
459
459
|
expect(result).toMatchInlineSnapshot(`
|
|
460
|
-
"| Bundle | Parsed
|
|
461
|
-
|
|
460
|
+
"| Bundle | Parsed size | Gzip size |
|
|
461
|
+
|:----------|----------:|----------:|
|
|
462
462
|
| @mui/material/Button/index.js | 0B<sup>(0.00%)</sup> | 0B<sup>(0.00%)</sup> |
|
|
463
463
|
| @mui/material/TextField/index.js | 0B<sup>(0.00%)</sup> | 0B<sup>(0.00%)</sup> |
|
|
464
464
|
|
|
@@ -490,8 +490,8 @@ describe('renderMarkdownReport', () => {
|
|
|
490
490
|
});
|
|
491
491
|
|
|
492
492
|
expect(result).toMatchInlineSnapshot(`
|
|
493
|
-
"| Bundle | Parsed
|
|
494
|
-
|
|
493
|
+
"| Bundle | Parsed size | Gzip size |
|
|
494
|
+
|:----------|----------:|----------:|
|
|
495
495
|
| @mui/material/Button/index.js | 🔺+400B<sup>(+2.67%)</sup> | 🔺+100B<sup>(+2.22%)</sup> |
|
|
496
496
|
|
|
497
497
|
|