Repository: microsoft/griffel
Pull request #201 (2022-08-30 20:50:42)

chore(deps-dev): bump next from 12.2.3 to 12.2.4
Bumps [next](https://github.com/vercel/next.js) from 12.2.3 to 12.2.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/vercel/next.js/releases">next's releases</a>.</em></p>
<blockquote>
<h2>v12.2.4</h2>
<h3>Core Changes</h3>
<ul>
<li>Fix error message typos: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38894">#38894</a></li>
<li>Update to latest version of <code>@​vercel/nft</code>: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38878">#38878</a></li>
<li>fix(<a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38090">#38090</a>): add missing <code>analyticsId</code> to config schema: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38911">#38911</a></li>
<li>Ensure hash on initial request is preserved in new router: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38913">#38913</a></li>
<li>Remove unnecessary assertions: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38899">#38899</a></li>
<li>Clear unnecessary code: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38900">#38900</a></li>
<li>fix: Impl <code>attachRequestMeta</code> in base server to handle meta differently in edge and node servers: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38932">#38932</a></li>
<li>feat: enhance warning messages about unanalyzable <code>config</code> field: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38907">#38907</a></li>
<li>fix: fix generateEtags type inside schema: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38936">#38936</a></li>
<li>Refactor router reducer: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38983">#38983</a></li>
<li>Add state comparison to router: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38422">#38422</a></li>
<li>update webpack: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38988">#38988</a></li>
<li>Update config schema for empty basePath: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38998">#38998</a></li>
<li>Add handling for prefetching onTouchStart and initial mobile testing : <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38805">#38805</a></li>
<li>Add additional comments to new router: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38986">#38986</a></li>
<li>Update config-schema for relay field to be less strict: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39010">#39010</a></li>
<li>Add config for opting out of optimistic client cache behavior: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38774">#38774</a></li>
<li>Fix tracing edge-runtime dependencies: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39009">#39009</a></li>
<li>Ensure dangerouslyAllowSVG is passed correctly: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39031">#39031</a></li>
<li>Handle getStaticPaths error inside worker to avoid serializing: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39032">#39032</a></li>
<li>chore: enable swc externalHelpers when pre-compile: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38182">#38182</a></li>
<li>Update to use HEAD request for On-Demand ISR: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39038">#39038</a></li>
<li>chore: Clean up imports and unused code: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39044">#39044</a></li>
<li>Replace node-sass test dependency with sass: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39053">#39053</a></li>
<li>Add comments in new router reducer: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39025">#39025</a></li>
<li>Add additional comments for reducer/cachenode: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39065">#39065</a></li>
<li>fix: print Request &amp; Response properties: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38903">#38903</a></li>
<li>fix: show <code>asPath</code> on large page data warning: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39071">#39071</a></li>
<li>Remove RSC rendering from render: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39045">#39045</a></li>
<li>Ensure query is updated correctly with shallow and middleware: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39086">#39086</a></li>
<li>Update pre-compiled to fix check: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39089">#39089</a></li>
<li>Fix unhandled rejections with edge runtime: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39091">#39091</a></li>
<li>feat(next-swc): Update swc: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39055">#39055</a></li>
<li>Collect telemetry for next/future/image: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39046">#39046</a></li>
<li>[Script] Adds <code>onReady</code> prop to <code>next/script</code>: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38849">#38849</a></li>
<li>Ensure we hard navigate for failed _next/data with middleware: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39148">#39148</a></li>
<li>Refactor Flight plugins to use types.: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39136">#39136</a></li>
<li>Fix middleware + afterFiles SSG rewrite case: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39153">#39153</a></li>
<li>Update swc minifier: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39158">#39158</a></li>
<li>Fix incorrect component cache for middleware cases: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39159">#39159</a></li>
<li>Add shared dynamic api: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39163">#39163</a></li>
<li>Add exportPathMap config type/schema field: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39171">#39171</a></li>
<li>Fix default error style overrides: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39169">#39169</a></li>
<li>refactor: return single middleware from getMiddleware in dev server: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39177">#39177</a></li>
<li>fix(<a href="https://github-redirect.dependabot.com/vercel/next.js/issues/11930">#11930</a>): rewritten api routes can correctly handle cors in dev mode: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38937">#38937</a></li>
<li>refactor: simplify middleware execution: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39192">#39192</a></li>
<li>Add missing <code>@​napi-rs/cli</code> devDependency to next-swc: <a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39164">#39164</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/vercel/next.js/commit/d6cb795fc6842337e4ba836a399c8d97a8b3aea0"><code>d6cb795</code></a> v12.2.4</li>
<li><a href="https://github.com/vercel/next.js/commit/dbc38d607ee8748c36f50709c676ce1c60cd1501"><code>dbc38d6</code></a> v12.2.4-canary.12</li>
<li><a href="https://github.com/vercel/next.js/commit/0febcc3799c5a13529158fc311fb00be7488c217"><code>0febcc3</code></a> Add TypeScript to ant design example (<a href="https://github-redirect.dependabot.com/vercel/next.js/issues/38470">#38470</a>)</li>
<li><a href="https://github.com/vercel/next.js/commit/147a24e320b64991c415a955ccc1429d9e313f98"><code>147a24e</code></a> fix: buffer is not usable on edge runtime (<a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39227">#39227</a>)</li>
<li><a href="https://github.com/vercel/next.js/commit/d315ee1786fddbef728e2c6a26596e79cc916c48"><code>d315ee1</code></a> Ensure On-Demand revalidate does not consider preview cookie (<a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39313">#39313</a>)</li>
<li><a href="https://github.com/vercel/next.js/commit/6b49d4744c204d9d572ef2540f092c6195a56bb2"><code>6b49d47</code></a> docs: add missing dot (<a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39314">#39314</a>)</li>
<li><a href="https://github.com/vercel/next.js/commit/58b920d5baaf328656e0ed7023ff7633c201f31b"><code>58b920d</code></a> feat(next-swc/wasm): export async interfaces (<a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39231">#39231</a>)</li>
<li><a href="https://github.com/vercel/next.js/commit/de41597bc8306d700a024d1bf04a66633ad54ec2"><code>de41597</code></a> Fix next/server being required during build (<a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39310">#39310</a>)</li>
<li><a href="https://github.com/vercel/next.js/commit/11c9d42643680561f9b6b4fe89d7fe34c1ba4906"><code>11c9d42</code></a> chore(trace): fix typo in trace-to-event-format.mjs (<a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39279">#39279</a>)</li>
<li><a href="https://github.com/vercel/next.js/commit/1039dd460218deab1087fdd1ca80c9f78b2eebe7"><code>1039dd4</code></a> Enable concurrent mode by default in app-render (<a href="https://github-redirect.dependabot.com/vercel/next.js/issues/39307">#39307</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/vercel/next.js/compare/v12.2.3...v12.2.4">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=next&package-manager=npm_and_yarn&previous-version=12.2.3&new-version=12.2.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/microsoft/griffel/network/alerts).

</details>


Patch:
diff --git a/change/@griffel-core-7e21a596-c13f-4428-a875-d535f075b2c3.json b/change/@griffel-core-7e21a596-c13f-4428-a875-d535f075b2c3.json
new file mode 100644
index 0000000..eb870c1
--- /dev/null
+++ b/change/@griffel-core-7e21a596-c13f-4428-a875-d535f075b2c3.json
@@ -0,0 +1,7 @@
+{
+  "type": "patch",
+  "comment": "fix: do not emit sequence hashes for empty sets",
+  "packageName": "@griffel/core",
+  "email": "olfedias@microsoft.com",
+  "dependentChangeType": "patch"
+}
diff --git a/change/@griffel-devtools-32883921-647e-4e71-8659-54152995e3e5.json b/change/@griffel-devtools-32883921-647e-4e71-8659-54152995e3e5.json
new file mode 100644
index 0000000..5bdb7af
--- /dev/null
+++ b/change/@griffel-devtools-32883921-647e-4e71-8659-54152995e3e5.json
@@ -0,0 +1,7 @@
+{
+  "type": "patch",
+  "comment": "fix devtools to resolve relative source url",
+  "packageName": "@griffel/devtools",
+  "email": "yuanboxue@microsoft.com",
+  "dependentChangeType": "patch"
+}
diff --git a/package.json b/package.json
index 970ce6a..9a6d2d9 100644
--- a/package.json
+++ b/package.json
@@ -93,7 +93,7 @@
     "monosize": "0.0.3",
     "monosize-storage-upstash": "0.0.2",
     "nano-staged": "0.5.0",
-    "next": "^12.0.5",
+    "next": "12.2.4",
     "prettier": "2.3.1",
     "prism-react-renderer": "1.2.1",
     "react": "17.0.2",
diff --git a/packages/core/src/runtime/reduceToClassNameForSlots.ts b/packages/core/src/runtime/reduceToClassNameForSlots.ts
index 270e7c8..d05b12e 100644
--- a/packages/core/src/runtime/reduceToClassNameForSlots.ts
+++ b/packages/core/src/runtime/reduceToClassNameForSlots.ts
@@ -42,10 +42,16 @@ export function reduceToClassNameForSlots<Slots extends string | number>(
 
   // eslint-disable-next-line guard-for-in
   for (const slotName in classesMapBySlot) {
-    const classnamesForSlot = reduceToClassName(classesMapBySlot[slotName], dir);
+    const slotClasses = reduceToClassName(classesMapBySlot[slotName], dir);
 
-    const sequenceHash = hashSequence(classnamesForSlot, dir);
-    const resultSlotClasses = sequenceHash + ' ' + classnamesForSlot;
+    // Handles a case when there are no classes in a set i.e. "makeStyles({ root: {} })"
+    if (slotClasses === '') {
+      classNamesForSlots[slotName] = '';
+      continue;
+    }
+
+    const sequenceHash = hashSequence(slotClasses, dir);
+    const resultSlotClasses = sequenceHash + ' ' + slotClasses;
 
     DEFINITION_LOOKUP_TABLE[sequenceHash] = [classesMapBySlot[slotName], dir];
     classNamesForSlots[slotName] = resultSlotClasses;
diff --git a/packages/devtools/src/sourceMap/loadOriginalSourceLoc.ts b/packages/devtools/src/sourceMap/loadOriginalSourceLoc.ts
index e4e8095..2d08f47 100644
--- a/packages/devtools/src/sourceMap/loadOriginalSourceLoc.ts
+++ b/packages/devtools/src/sourceMap/loadOriginalSourceLoc.ts
@@ -33,7 +33,19 @@ function parseSourceUrl(sourceUrlWithLoc: string): MappedPosition | null {
   const paths = sourceUrlWithLoc.split(':');
   const column = Number(paths.pop());
   const line = Number(paths.pop());
-  const source = paths.join(':');
+
+  let source = paths.join(':');
+  try {
+    // url can contain relative path when webpack is used; normalize it
+    const { protocol, pathname } = new URL(source);
+    if (!protocol.startsWith('http')) {
+      const absPathname = new URL(`http://${pathname}`).pathname; // URL only normalizes pathname for http/https
+      source = `${protocol}//${absPathname}`;
+    }
+  } catch (error) {
+    console.warn(error);
+  }
+
   if (Number.isNaN(line) || Number.isNaN(column)) {
     return null;
   }
diff --git a/yarn.lock b/yarn.lock
index 63e7a4d..dc3a131 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3451,100 +3451,100 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@next/env@npm:12.2.3":
-  version: 12.2.3
-  resolution: "@next/env@npm:12.2.3"
-  checksum: e96dcbea3fbb3d6b6a0799fe2e41c4929ded383659709f5bd00b6479b0711b89891b72fb28753b428933871d5fd91792fa54bc64a74a038c704b5862d40821ec
+"@next/env@npm:12.2.4":
+  version: 12.2.4
+  resolution: "@next/env@npm:12.2.4"
+  checksum: f09ae1ddebaa2b081e13b55d3d533b281f335e8ec7d70743d935b3a1295f2f8f0510a39d5991afaeb728949d5c518dd34a0cf3003016d62042b6d0f2e6489cb8
   languageName: node
   linkType: hard
 
-"@next/swc-android-arm-eabi@npm:12.2.3":
-  version: 12.2.3
-  resolution: "@next/swc-android-arm-eabi@npm:12.2.3"
+"@next/swc-android-arm-eabi@npm:12.2.4":
+  version: 12.2.4
+  resolution: "@next/swc-android-arm-eabi@npm:12.2.4"
   conditions: os=android & cpu=arm
   languageName: node
   linkType: hard
 
-"@next/swc-android-arm64@npm:12.2.3":
-  version: 12.2.3
-  resolution: "@next/swc-android-arm64@npm:12.2.3"
+"@next/swc-android-arm64@npm:12.2.4":
+  version: 12.2.4
+  resolution: "@next/swc-android-arm64@npm:12.2.4"
   conditions: os=android & cpu=arm64
   languageName: node
   linkType: hard
 
-"@next/swc-darwin-arm64@npm:12.2.3":
-  version: 12.2.3
-  resolution: "@next/swc-darwin-arm64@npm:12.2.3"
+"@next/swc-darwin-arm64@npm:12.2.4":
+  version: 12.2.4
+  resolution: "@next/swc-darwin-arm64@npm:12.2.4"
   conditions: os=darwin & cpu=arm64
   languageName: node
   linkType: hard
 
-"@next/swc-darwin-x64@npm:12.2.3":
-  version: 12.2.3
-  resolution: "@next/swc-darwin-x64@npm:12.2.3"
+"@next/swc-darwin-x64@npm:12.2.4":
+  version: 12.2.4
+  resolution: "@next/swc-darwin-x64@npm:12.2.4"
   conditions: os=darwin & cpu=x64
   languageName: node
   linkType: hard
 
-"@next/swc-freebsd-x64@npm:12.2.3":
-  version: 12.2.3
-  resolution: "@next/swc-freebsd-x64@npm:12.2.3"
+"@next/swc-freebsd-x64@npm:12.2.4":
+  version: 12.2.4
+  resolution: "@next/swc-freebsd-x64@npm:12.2.4"
   conditions: os=freebsd & cpu=x64
   languageName: node
   linkType: hard
 
-"@next/swc-linux-arm-gnueabihf@npm:12.2.3":
-  version: 12.2.3
-  resolution: "@next/swc-linux-arm-gnueabihf@npm:12.2.3"
+"@next/swc-linux-arm-gnueabihf@npm:12.2.4":
+  version: 12.2.4
+  resolution: "@next/swc-linux-arm-gnueabihf@npm:12.2.4"
   conditions: os=linux & cpu=arm
   languageName: node
   linkType: hard
 
-"@next/swc-linux-arm64-gnu@npm:12.2.3":
-  version: 12.2.3
-  resolution: "@next/swc-linux-arm64-gnu@npm:12.2.3"
+"@next/swc-linux-arm64-gnu@npm:12.2.4":
+  version: 12.2.4
+  resolution: "@next/swc-linux-arm64-gnu@npm:12.2.4"
   conditions: os=linux & cpu=arm64 & libc=glibc
   languageName: node
   linkType: hard
 
-"@next/swc-linux-arm64-musl@npm:12.2.3":
-  version: 12.2.3
-  resolution: "@next/swc-linux-arm64-musl@npm:12.2.3"
+"@next/swc-linux-arm64-musl@npm:12.2.4":
+  version: 12.2.4
+  resolution: "@next/swc-linux-arm64-musl@npm:12.2.4"
   conditions: os=linux & cpu=arm64 & libc=musl
   languageName: node
   linkType: hard
 
-"@next/swc-linux-x64-gnu@npm:12.2.3":
-  version: 12.2.3
-  resolution: "@next/swc-linux-x64-gnu@npm:12.2.3"
+"@next/swc-linux-x64-gnu@npm:12.2.4":
+  version: 12.2.4
+  resolution: "@next/swc-linux-x64-gnu@npm:12.2.4"
   conditions: os=linux & cpu=x64 & libc=glibc
   languageName: node
   linkType: hard
 
-"@next/swc-linux-x64-musl@npm:12.2.3":
-  version: 12.2.3
-  resolution: "@next/swc-linux-x64-musl@npm:12.2.3"
+"@next/swc-linux-x64-musl@npm:12.2.4":
+  version: 12.2.4
+  resolution: "@next/swc-linux-x64-musl@npm:12.2.4"
   conditions: os=linux & cpu=x64 & libc=musl
   languageName: node
   linkType: hard
 
-"@next/swc-win32-arm64-msvc@npm:12.2.3":
-  version: 12.2.3
-  resolution: "@next/swc-win32-arm64-msvc@npm:12.2.3"
+"@next/swc-win32-arm64-msvc@npm:12.2.4":
+  version: 12.2.4
+  resolution: "@next/swc-win32-arm64-msvc@npm:12.2.4"
   conditions: os=win32 & cpu=arm64
   languageName: node
   linkType: hard
 
-"@next/swc-win32-ia32-msvc@npm:12.2.3":
-  version: 12.2.3
-  resolution: "@next/swc-win32-ia32-msvc@npm:12.2.3"
+"@next/swc-win32-ia32-msvc@npm:12.2.4":
+  version: 12.2.4
+  resolution: "@next/swc-win32-ia32-msvc@npm:12.2.4"
   conditions: os=win32 & cpu=ia32
   languageName: node
   linkType: hard
 
-"@next/swc-win32-x64-msvc@npm:12.2.3":
-  version: 12.2.3
-  resolution: "@next/swc-win32-x64-msvc@npm:12.2.3"
+"@next/swc-win32-x64-msvc@npm:12.2.4":
+  version: 12.2.4
+  resolution: "@next/swc-win32-x64-msvc@npm:12.2.4"
   conditions: os=win32 & cpu=x64
   languageName: node
   linkType: hard
@@ -13833,7 +13833,7 @@ __metadata:
     monosize: 0.0.3
     monosize-storage-upstash: 0.0.2
     nano-staged: 0.5.0
-    next: ^12.0.5
+    next: 12.2.4
     prettier: 2.3.1
     prism-react-renderer: 1.2.1
     react: 17.0.2
@@ -17858,24 +17858,24 @@ __metadata:
   languageName: node
   linkType: hard
 
-"next@npm:^12.0.5":
-  version: 12.2.3
-  resolution: "next@npm:12.2.3"
-  dependencies:
-    "@next/env": 12.2.3
-    "@next/swc-android-arm-eabi": 12.2.3
-    "@next/swc-android-arm64": 12.2.3
-    "@next/swc-darwin-arm64": 12.2.3
-    "@next/swc-darwin-x64": 12.2.3
-    "@next/swc-freebsd-x64": 12.2.3
-    "@next/swc-linux-arm-gnueabihf": 12.2.3
-    "@next/swc-linux-arm64-gnu": 12.2.3
-    "@next/swc-linux-arm64-musl": 12.2.3
-    "@next/swc-linux-x64-gnu": 12.2.3
-    "@next/swc-linux-x64-musl": 12.2.3
-    "@next/swc-win32-arm64-msvc": 12.2.3
-    "@next/swc-win32-ia32-msvc": 12.2.3
-    "@next/swc-win32-x64-msvc": 12.2.3
+"next@npm:12.2.4":
+  version: 12.2.4
+  resolution: "next@npm:12.2.4"
+  dependencies:
+    "@next/env": 12.2.4
+    "@next/swc-android-arm-eabi": 12.2.4
+    "@next/swc-android-arm64": 12.2.4
+    "@next/swc-darwin-arm64": 12.2.4
+    "@next/swc-darwin-x64": 12.2.4
+    "@next/swc-freebsd-x64": 12.2.4
+    "@next/swc-linux-arm-gnueabihf": 12.2.4
+    "@next/swc-linux-arm64-gnu": 12.2.4
+    "@next/swc-linux-arm64-musl": 12.2.4
+    "@next/swc-linux-x64-gnu": 12.2.4
+    "@next/swc-linux-x64-musl": 12.2.4
+    "@next/swc-win32-arm64-msvc": 12.2.4
+    "@next/swc-win32-ia32-msvc": 12.2.4
+    "@next/swc-win32-x64-msvc": 12.2.4
     "@swc/helpers": 0.4.3
     caniuse-lite: ^1.0.30001332
     postcss: 8.4.14
@@ -17923,7 +17923,7 @@ __metadata:
       optional: true
   bin:
     next: dist/bin/next
-  checksum: b13b42fbb327adca51abeef68aca4b31c82297f07eb3a12d31a3bf2c1aa9ca34cf1ab41bc2b9f4d3162623e70a1ddf230da39fd3ce241b1eea113a4a010a11fd
+  checksum: 31da1485d3499b2d43b452378931cc04d3593dcdecb7629263d5f5dae375ae956d68963a7398b613a283d0c42c50a7ab9f5ef911d8df50f740e8438721e06457
   languageName: node
   linkType: hard
 


Test patch:
diff --git a/packages/core/src/makeStyles.test.ts b/packages/core/src/makeStyles.test.ts
index 4064348..db274d0 100644
--- a/packages/core/src/makeStyles.test.ts
+++ b/packages/core/src/makeStyles.test.ts
@@ -17,6 +17,13 @@ describe('makeStyles', () => {
     document.head.innerHTML = '';
   });
 
+  it('returns an empty classname for an empty style set', () => {
+    const computeClasses = makeStyles({
+      root: {},
+    });
+    expect(computeClasses({ dir: 'ltr', renderer }).root).toEqual('');
+  });
+
   it('returns a single classname for a single style', () => {
     const computeClasses = makeStyles({
       root: {