Repository: microsoft/griffel
Pull request #395 (2023-07-18 09:13:42)

chore: cleanup bundle size fixtures
This PR cleanups bundle size fixtures to have better naming and provide more meaningful values.

github-actions[bot]: ## 📊 Bundle size report

| Package & Exports                                                                                                    |    Baseline (minified/GZIP) |                          PR |                                                                                                                                                                                                            Change |
| :------------------------------------------------------------------------------------------------------------------- | --------------------------: | --------------------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| <samp>core</samp> <br /> <abbr title='bundle-size/__resetStyles.fixture.js'>\_\_resetStyles (makeResetStyles)</abbr> |            `0 B`<br />`0 B` |        `207 B`<br />`174 B` |                                                                                                                                                                                                      🆕 New entry |
| <samp>core</samp> <br /> <abbr title='bundle-size/makeResetStyles.fixture.js'>makeResetStyles (runtime)</abbr>       |            `0 B`<br />`0 B` | `16.886 kB`<br />`6.442 kB` |                                                                                                                                                                                                      🆕 New entry |
| <samp>core</samp> <br /> <abbr title='bundle-size/makeStyles.fixture.js'>makeStyles</abbr>                           |   `2.19 kB`<br />`1.045 kB` | `21.224 kB`<br />`8.025 kB` |    `19.034 kB` <img aria-hidden="true" src="https://microsoft.github.io/monosize/images/increase.png" /><br />`6.98 kB` <img aria-hidden="true" src="https://microsoft.github.io/monosize/images/increase.png" /> |
| <samp>core</samp> <br /> <abbr title='bundle-size/makeStylesRuntime.fixture.js'>\_\_styles (makeStyles)</abbr>       | `21.835 kB`<br />`8.261 kB` |     `1.608 kB`<br />`772 B` | `-20.227 kB` <img aria-hidden="true" src="https://microsoft.github.io/monosize/images/decrease.png" /><br />`-7.489 kB` <img aria-hidden="true" src="https://microsoft.github.io/monosize/images/decrease.png" /> |
| <samp>core</samp> <br /> <abbr title='bundle-size/mergeClasses.fixture.js'>mergeClasses</abbr>                       |            `0 B`<br />`0 B` |      `1.82 kB`<br />`881 B` |                                                                                                                                                                                                      🆕 New entry |
| <samp>core</samp> <br /> <abbr title='bundle-size/shorthands.padding.fixture.js'>shorthands.padding()</abbr>         |            `0 B`<br />`0 B` |  `4.101 kB`<br />`1.405 kB` |                                                                                                                                                                                                      🆕 New entry |
| <samp>react</samp> <br /> <abbr title='bundle-size/__css.fixture.js'>\_\_css</abbr>                                  |  `2.227 kB`<br />`1.046 kB` |     `1.645 kB`<br />`767 B` |        `-582 B` <img aria-hidden="true" src="https://microsoft.github.io/monosize/images/decrease.png" /><br />`-279 B` <img aria-hidden="true" src="https://microsoft.github.io/monosize/images/decrease.png" /> |
| <samp>react</samp> <br /> <abbr title='bundle-size/__styles.fixture.js'>\_\_styles</abbr>                            |  `4.045 kB`<br />`1.844 kB` |  `3.463 kB`<br />`1.578 kB` |        `-582 B` <img aria-hidden="true" src="https://microsoft.github.io/monosize/images/decrease.png" /><br />`-266 B` <img aria-hidden="true" src="https://microsoft.github.io/monosize/images/decrease.png" /> |
| <samp>react</samp> <br /> <abbr title='bundle-size/makeResetStyles.fixture.js'>makeResetStyles</abbr>                |            `0 B`<br />`0 B` | `18.776 kB`<br />`7.223 kB` |                                                                                                                                                                                                      🆕 New entry |
| <samp>react</samp> <br /> <abbr title='bundle-size/makeStaticStyles.fixture.js'>makeStaticStyles</abbr>              |            `0 B`<br />`0 B` |  `8.753 kB`<br />`3.868 kB` |                                                                                                                                                                                                      🆕 New entry |
| <samp>react</samp> <br /> <abbr title='bundle-size/makeStyles.fixture.js'>makeStyles</abbr>                          |            `0 B`<br />`0 B` | `23.129 kB`<br />`8.791 kB` |                                                                                                                                                                                                      🆕 New entry |

<details>
<summary>Unchanged fixtures</summary>

| Package & Exports                                                                                                          |       Size (minified/GZIP) |
| -------------------------------------------------------------------------------------------------------------------------- | -------------------------: |
| <samp>shadow-dom</samp> <br /> <abbr title='bundle-size/createShadowDOMRenderer.fixture.js'>createShadowDOMRenderer</abbr> | `3.232 kB`<br />`1.405 kB` |

</details>
<sub>🤖 This report was generated against <a href='https://github.com/microsoft/griffel/commit/c779de1c4b73340a4d9279deecb95753c9dd3b74'>c779de1c4b73340a4d9279deecb95753c9dd3b74</a></sub>

<!-- Sticky Pull Request Comment -->

Patch:
diff --git a/change/@griffel-core-b37cbae0-bb5e-4f22-873b-803b2c226e8c.json b/change/@griffel-core-b37cbae0-bb5e-4f22-873b-803b2c226e8c.json
new file mode 100644
index 0000000..bfdd237
--- /dev/null
+++ b/change/@griffel-core-b37cbae0-bb5e-4f22-873b-803b2c226e8c.json
@@ -0,0 +1,7 @@
+{
+  "type": "none",
+  "comment": "chore: cleanup bundle size fixtures",
+  "packageName": "@griffel/core",
+  "email": "olfedias@microsoft.com",
+  "dependentChangeType": "none"
+}
diff --git a/packages/core/bundle-size/__resetStyles.fixture.js b/packages/core/bundle-size/__resetStyles.fixture.js
new file mode 100644
index 0000000..beb8d88
--- /dev/null
+++ b/packages/core/bundle-size/__resetStyles.fixture.js
@@ -0,0 +1,7 @@
+import { __resetStyles } from '@griffel/core';
+
+console.log(__resetStyles);
+
+export default {
+  name: '__resetStyles (makeResetStyles)',
+};
diff --git a/packages/core/bundle-size/__styles.fixture.js b/packages/core/bundle-size/__styles.fixture.js
new file mode 100644
index 0000000..15eaefc
--- /dev/null
+++ b/packages/core/bundle-size/__styles.fixture.js
@@ -0,0 +1,7 @@
+import { __styles } from '@griffel/core';
+
+console.log(__styles);
+
+export default {
+  name: '__styles (makeStyles)',
+};
diff --git a/packages/core/bundle-size/makeResetStyles-runtime.fixture.js b/packages/core/bundle-size/makeResetStyles.fixture.js
similarity index 100%
rename from packages/core/bundle-size/makeResetStyles-runtime.fixture.js
rename to packages/core/bundle-size/makeResetStyles.fixture.js
diff --git a/packages/core/bundle-size/makeStyles.fixture.js b/packages/core/bundle-size/makeStyles.fixture.js
index 28c3c53..bf71063 100644
--- a/packages/core/bundle-size/makeStyles.fixture.js
+++ b/packages/core/bundle-size/makeStyles.fixture.js
@@ -1,7 +1,7 @@
-import { __styles, mergeClasses } from '@griffel/core';
+import { makeStyles } from '@griffel/core';
 
-console.log(__styles, mergeClasses);
+console.log(makeStyles);
 
 export default {
-  name: 'makeStyles + mergeClasses (build time)',
+  name: 'makeStyles (runtime)',
 };
diff --git a/packages/core/bundle-size/makeStylesRuntime.fixture.js b/packages/core/bundle-size/makeStylesRuntime.fixture.js
deleted file mode 100644
index 4cf0104..0000000
--- a/packages/core/bundle-size/makeStylesRuntime.fixture.js
+++ /dev/null
@@ -1,7 +0,0 @@
-import { makeStyles, mergeClasses } from '@griffel/core';
-
-console.log(makeStyles, mergeClasses);
-
-export default {
-  name: 'makeStyles + mergeClasses (runtime)',
-};
diff --git a/packages/core/bundle-size/mergeClasses.fixture.js b/packages/core/bundle-size/mergeClasses.fixture.js
new file mode 100644
index 0000000..5974006
--- /dev/null
+++ b/packages/core/bundle-size/mergeClasses.fixture.js
@@ -0,0 +1,7 @@
+import { mergeClasses } from '@griffel/core';
+
+console.log(mergeClasses);
+
+export default {
+  name: 'mergeClasses',
+};
diff --git a/packages/core/bundle-size/shorthands.padding.fixture.js b/packages/core/bundle-size/shorthands.padding.fixture.js
new file mode 100644
index 0000000..5360a55
--- /dev/null
+++ b/packages/core/bundle-size/shorthands.padding.fixture.js
@@ -0,0 +1,7 @@
+import { shorthands } from '@griffel/core';
+
+console.log(shorthands);
+
+export default {
+  name: 'shorthands.padding()',
+};
diff --git a/packages/react/bundle-size/__css.fixture.js b/packages/react/bundle-size/__css.fixture.js
index 9a03c76..e83e953 100644
--- a/packages/react/bundle-size/__css.fixture.js
+++ b/packages/react/bundle-size/__css.fixture.js
@@ -1,7 +1,7 @@
-import { __css, mergeClasses } from '@griffel/react';
+import { __css } from '@griffel/react';
 
-console.log(__css, mergeClasses);
+console.log(__css);
 
 export default {
-  name: '__css + mergeClasses (build time)',
+  name: '__css',
 };
diff --git a/packages/react/bundle-size/__styles.fixture.js b/packages/react/bundle-size/__styles.fixture.js
index ca7a2a8..f908729 100644
--- a/packages/react/bundle-size/__styles.fixture.js
+++ b/packages/react/bundle-size/__styles.fixture.js
@@ -1,7 +1,7 @@
-import { __styles, mergeClasses } from '@griffel/react';
+import { __styles } from '@griffel/react';
 
-console.log(__styles, mergeClasses);
+console.log(__styles);
 
 export default {
-  name: '__styles + mergeClasses (build time)',
+  name: '__styles',
 };
diff --git a/packages/react/bundle-size/makeResetStyles-runtime.fixture.js b/packages/react/bundle-size/makeResetStyles.fixture.js
similarity index 100%
rename from packages/react/bundle-size/makeResetStyles-runtime.fixture.js
rename to packages/react/bundle-size/makeResetStyles.fixture.js
diff --git a/packages/react/bundle-size/makeStaticStyles-runtime.fixture.js b/packages/react/bundle-size/makeStaticStyles.fixture.js
similarity index 100%
rename from packages/react/bundle-size/makeStaticStyles-runtime.fixture.js
rename to packages/react/bundle-size/makeStaticStyles.fixture.js
diff --git a/packages/react/bundle-size/makeStyles-runtime.fixture.js b/packages/react/bundle-size/makeStyles-runtime.fixture.js
deleted file mode 100644
index 88b448d..0000000
--- a/packages/react/bundle-size/makeStyles-runtime.fixture.js
+++ /dev/null
@@ -1,7 +0,0 @@
-import { makeStyles, mergeClasses } from '@griffel/react';
-
-console.log(makeStyles, mergeClasses);
-
-export default {
-  name: 'makeStyles + mergeClasses (runtime)',
-};
diff --git a/packages/react/bundle-size/makeStyles.fixture.js b/packages/react/bundle-size/makeStyles.fixture.js
new file mode 100644
index 0000000..5bd5e84
--- /dev/null
+++ b/packages/react/bundle-size/makeStyles.fixture.js
@@ -0,0 +1,7 @@
+import { makeStyles } from '@griffel/react';
+
+console.log(makeStyles);
+
+export default {
+  name: 'makeStyles (runtime)',
+};


Test patch:
diff --git a/change/@griffel-react-9e7321c9-ae2e-4597-9da5-841a58a991f7.json b/change/@griffel-react-9e7321c9-ae2e-4597-9da5-841a58a991f7.json
new file mode 100644
index 0000000..f33b625
--- /dev/null
+++ b/change/@griffel-react-9e7321c9-ae2e-4597-9da5-841a58a991f7.json
@@ -0,0 +1,7 @@
+{
+  "type": "none",
+  "comment": "chore: cleanup bundle size fixtures",
+  "packageName": "@griffel/react",
+  "email": "olfedias@microsoft.com",
+  "dependentChangeType": "none"
+}