You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v6: Remove the cn re-export from @graphiql/react (#4423)
## Summary
`@graphiql/react` had a `cn` helper that was just a re-export of `clsx`,
left over from before the Button/IconButton restyle. It didn't add any
behavior of its own, so this removes it and has every internal usage
import `clsx` directly instead: all the component files in
`graphiql-react` that used `cn(...)`, plus `@graphiql/plugin-history`
and the `graphiql` package, which both imported `cn` from
`@graphiql/react` rather than depending on `clsx` themselves. Both
packages now list `clsx` as a direct dependency.
Since `cn` was exported from `@graphiql/react`'s public entry point,
dropping it is a breaking change for 6.0.0. Added a changeset with a
major bump and a short note in the v6 migration guide pointing anyone
using `cn` at `clsx`.
Refs: #4228
Copy file name to clipboardExpand all lines: docs/migration/graphiql-6.0.0.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -530,3 +530,4 @@ Nothing below is happening in v6. These are informal signals about where the pro
530
530
531
531
-**Browserslist.** v6 drops the project's custom `.browserslistrc` in favor of the single `defaults` browserslist preset (`> 0.5%, last 2 versions, Firefox ESR, not dead`). That range covers the modern browsers that support the OKLCH color functions the new token system relies on. If your previous bespoke config deliberately targeted very old browsers, they may fall outside the new range — check `defaults` against your support matrix if that matters to you.
532
532
-**Monaco editor theme registration.** The built-in Monaco themes (`graphiql-DARK` and `graphiql-LIGHT`) were rewritten to use the v6 accent palette — every GraphQL token type (keywords, type names, field identifiers, variables, annotations, strings, numbers, comments) and the surrounding editor chrome (suggest widget, hover widget, quick input) now pull from the same tokens as the rest of the UI. The `editorTheme` prop on `<GraphiQL>` still takes the same `{ dark, light }` pair of Monaco theme names or definitions it always did, so a custom theme registered through that prop should continue to work unchanged. If you were depending on the specific color values baked into the previous built-in `graphiql-DARK` / `graphiql-LIGHT` themes (for a screenshot test, for example), expect those values to have shifted.
533
+
-**`cn` removed from `@graphiql/react`.** The `cn` helper was just a re-export of `clsx`. It's gone now, so import `clsx` directly from the `clsx` package instead.
0 commit comments