Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add 'use client' to output code #253

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

BlankParticle
Copy link
Contributor

@BlankParticle BlankParticle commented Feb 10, 2024

Adds a "use client" banner to the output code to avoid re-exporting it as a client module.
It simplifies the process on not having the Step 2 as described at https://ui.shadcn.com/docs/dark-mode/next.

Also it doesn't break older version because it is just a string which would be ignored anyways

Copy link

vercel bot commented Feb 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-themes-basic ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 10, 2024 6:44am
next-themes-tailwind ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 10, 2024 6:44am
next-themes-with-app-dir ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 10, 2024 6:44am

@dzhng
Copy link

dzhng commented Feb 24, 2024

this is much needed, can we get this merged somehow?

@pacocoursey pacocoursey merged commit 40e57a9 into pacocoursey:main Mar 12, 2024
4 checks passed
@BlankParticle BlankParticle deleted the fix/add-use-client branch March 12, 2024 23:18
Brooooooklyn added a commit to toeverything/AFFiNE that referenced this pull request Mar 13, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@storybook/test-runner](https://togithub.com/storybookjs/test-runner) | [`^0.16.0` -> `^0.17.0`](https://renovatebot.com/diffs/npm/@storybook%2ftest-runner/0.16.0/0.17.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@storybook%2ftest-runner/0.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@storybook%2ftest-runner/0.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@storybook%2ftest-runner/0.16.0/0.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@storybook%2ftest-runner/0.16.0/0.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [next-themes](https://togithub.com/pacocoursey/next-themes) | [`^0.2.1` -> `^0.3.0`](https://renovatebot.com/diffs/npm/next-themes/0.2.1/0.3.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/next-themes/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/next-themes/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/next-themes/0.2.1/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/next-themes/0.2.1/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>storybookjs/test-runner (@&#8203;storybook/test-runner)</summary>

### [`v0.17.0`](https://togithub.com/storybookjs/test-runner/releases/tag/v0.17.0)

[Compare Source](https://togithub.com/storybookjs/test-runner/compare/v0.16.0...v0.17.0)

##### 🚀 Enhancement

-   Release 0.17.0 [#&#8203;438](https://togithub.com/storybookjs/test-runner/pull/438) ([@&#8203;JReinhold](https://togithub.com/JReinhold) [@&#8203;shilman](https://togithub.com/shilman) [@&#8203;valentinpalkovic](https://togithub.com/valentinpalkovic) [@&#8203;yannbf](https://togithub.com/yannbf) [@&#8203;ndelangen](https://togithub.com/ndelangen))
-   Support Storybook 8 [#&#8203;429](https://togithub.com/storybookjs/test-runner/pull/429) ([@&#8203;yannbf](https://togithub.com/yannbf))
-   Support unhandled rendering errors [#&#8203;421](https://togithub.com/storybookjs/test-runner/pull/421) ([@&#8203;yannbf](https://togithub.com/yannbf))

##### 🐛 Bug Fix

-   Prebundle dependencies [#&#8203;431](https://togithub.com/storybookjs/test-runner/pull/431) ([@&#8203;yannbf](https://togithub.com/yannbf))
-   Update internal example to Storybook 8 [#&#8203;430](https://togithub.com/storybookjs/test-runner/pull/430) ([@&#8203;yannbf](https://togithub.com/yannbf))
-   swap storybook/jest to storybook/test [#&#8203;427](https://togithub.com/storybookjs/test-runner/pull/427) ([@&#8203;ndelangen](https://togithub.com/ndelangen))
-   Add PR template [#&#8203;428](https://togithub.com/storybookjs/test-runner/pull/428) ([@&#8203;yannbf](https://togithub.com/yannbf))
-   Fix build step [#&#8203;425](https://togithub.com/storybookjs/test-runner/pull/425) ([@&#8203;valentinpalkovic](https://togithub.com/valentinpalkovic))
-   Remove --prerelease from sb upgrade CI [#&#8203;423](https://togithub.com/storybookjs/test-runner/pull/423) ([@&#8203;JReinhold](https://togithub.com/JReinhold))
-   Support stories with meta id for permalinking [#&#8203;419](https://togithub.com/storybookjs/test-runner/pull/419) ([@&#8203;yannbf](https://togithub.com/yannbf))

##### 📝 Documentation

-   Docs: Add remark regarding pnp support [#&#8203;432](https://togithub.com/storybookjs/test-runner/pull/432) ([@&#8203;yannbf](https://togithub.com/yannbf))
-   docs: replace postRender(deprecated) with postVisit [#&#8203;418](https://togithub.com/storybookjs/test-runner/pull/418) ([@&#8203;junkisai](https://togithub.com/junkisai))

##### Authors: 6

-   Jeppe Reinhold ([@&#8203;JReinhold](https://togithub.com/JReinhold))
-   Junki Saito ([@&#8203;junkisai](https://togithub.com/junkisai))
-   Michael Shilman ([@&#8203;shilman](https://togithub.com/shilman))
-   Norbert de Langen ([@&#8203;ndelangen](https://togithub.com/ndelangen))
-   Valentin Palkovic ([@&#8203;valentinpalkovic](https://togithub.com/valentinpalkovic))
-   Yann Braga ([@&#8203;yannbf](https://togithub.com/yannbf))

</details>

<details>
<summary>pacocoursey/next-themes (next-themes)</summary>

### [`v0.3.0`](https://togithub.com/pacocoursey/next-themes/releases/tag/v0.3.0)

#### What's

-   `"use client"` was added to the library output so that you can use it as a React Client component without creating a wrapper.

#### New Contributors

-   [@&#8203;MaxLeiter](https://togithub.com/MaxLeiter) made their first contribution in [pacocoursey/next-themes#120
-   [@&#8203;gnoff](https://togithub.com/gnoff) made their first contribution in [pacocoursey/next-themes#135
-   [@&#8203;WITS](https://togithub.com/WITS) made their first contribution in [pacocoursey/next-themes#168
-   [@&#8203;dimaMachina](https://togithub.com/dimaMachina) made their first contribution in [pacocoursey/next-themes#186
-   [@&#8203;amrhassab](https://togithub.com/amrhassab) made their first contribution in [pacocoursey/next-themes#192
-   [@&#8203;BekzodIsakov](https://togithub.com/BekzodIsakov) made their first contribution in [pacocoursey/next-themes#241
-   [@&#8203;BlankParticle](https://togithub.com/BlankParticle) made their first contribution in [pacocoursey/next-themes#253

**Full Changelog**: pacocoursey/next-themes@v0.2.0...v0.3.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/toeverything/AFFiNE).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIzOC4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
renovate bot added a commit to inabagumi/shinju-date that referenced this pull request Mar 13, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [next-themes](https://togithub.com/pacocoursey/next-themes) |
[`^0.2.1` ->
`^0.3.0`](https://renovatebot.com/diffs/npm/next-themes/0.2.1/0.3.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/next-themes/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/next-themes/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/next-themes/0.2.1/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/next-themes/0.2.1/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>pacocoursey/next-themes (next-themes)</summary>

###
[`v0.3.0`](https://togithub.com/pacocoursey/next-themes/releases/tag/v0.3.0)

#### What's

- `"use client"` was added to the library output so that you can use it
as a React Client component without creating a wrapper.

#### New Contributors

- [@&#8203;MaxLeiter](https://togithub.com/MaxLeiter) made their first
contribution in
[pacocoursey/next-themes#120
- [@&#8203;gnoff](https://togithub.com/gnoff) made their first
contribution in
[pacocoursey/next-themes#135
- [@&#8203;WITS](https://togithub.com/WITS) made their first
contribution in
[pacocoursey/next-themes#168
- [@&#8203;dimaMachina](https://togithub.com/dimaMachina) made their
first contribution in
[pacocoursey/next-themes#186
- [@&#8203;amrhassab](https://togithub.com/amrhassab) made their first
contribution in
[pacocoursey/next-themes#192
- [@&#8203;BekzodIsakov](https://togithub.com/BekzodIsakov) made their
first contribution in
[pacocoursey/next-themes#241
- [@&#8203;BlankParticle](https://togithub.com/BlankParticle) made their
first contribution in
[pacocoursey/next-themes#253

**Full Changelog**:
pacocoursey/next-themes@v0.2.0...v0.3.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/inabagumi/shinju-date).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzguMSIsInVwZGF0ZWRJblZlciI6IjM3LjIzOC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Adriel-M pushed a commit to Adriel-M/adriel.dev that referenced this pull request Mar 13, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [next-themes](https://togithub.com/pacocoursey/next-themes) |
[`^0.2.1` ->
`^0.3.0`](https://renovatebot.com/diffs/npm/next-themes/0.2.1/0.3.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/next-themes/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/next-themes/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/next-themes/0.2.1/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/next-themes/0.2.1/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>pacocoursey/next-themes (next-themes)</summary>

###
[`v0.3.0`](https://togithub.com/pacocoursey/next-themes/releases/tag/v0.3.0)

#### What's

- `"use client"` was added to the library output so that you can use it
as a React Client component without creating a wrapper.

#### New Contributors

- [@&#8203;MaxLeiter](https://togithub.com/MaxLeiter) made their first
contribution in
[pacocoursey/next-themes#120
- [@&#8203;gnoff](https://togithub.com/gnoff) made their first
contribution in
[pacocoursey/next-themes#135
- [@&#8203;WITS](https://togithub.com/WITS) made their first
contribution in
[pacocoursey/next-themes#168
- [@&#8203;dimaMachina](https://togithub.com/dimaMachina) made their
first contribution in
[pacocoursey/next-themes#186
- [@&#8203;amrhassab](https://togithub.com/amrhassab) made their first
contribution in
[pacocoursey/next-themes#192
- [@&#8203;BekzodIsakov](https://togithub.com/BekzodIsakov) made their
first contribution in
[pacocoursey/next-themes#241
- [@&#8203;BlankParticle](https://togithub.com/BlankParticle) made their
first contribution in
[pacocoursey/next-themes#253

**Full Changelog**:
pacocoursey/next-themes@v0.2.0...v0.3.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/Adriel-M/adriel.dev).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzguMSIsInVwZGF0ZWRJblZlciI6IjM3LjIzOC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
tisnamuliarta added a commit to tisnamuliarta/laravel-shadcn that referenced this pull request Mar 14, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [next-themes](https://togithub.com/pacocoursey/next-themes) |
[`^0.2.1` ->
`^0.3.0`](https://renovatebot.com/diffs/npm/next-themes/0.2.1/0.3.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/next-themes/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/next-themes/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/next-themes/0.2.1/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/next-themes/0.2.1/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>pacocoursey/next-themes (next-themes)</summary>

###
[`v0.3.0`](https://togithub.com/pacocoursey/next-themes/releases/tag/v0.3.0)

#### What's

- `"use client"` was added to the library output so that you can use it
as a React Client component without creating a wrapper.

#### New Contributors

- [@&#8203;MaxLeiter](https://togithub.com/MaxLeiter) made their first
contribution in
[pacocoursey/next-themes#120
- [@&#8203;gnoff](https://togithub.com/gnoff) made their first
contribution in
[pacocoursey/next-themes#135
- [@&#8203;WITS](https://togithub.com/WITS) made their first
contribution in
[pacocoursey/next-themes#168
- [@&#8203;dimaMachina](https://togithub.com/dimaMachina) made their
first contribution in
[pacocoursey/next-themes#186
- [@&#8203;amrhassab](https://togithub.com/amrhassab) made their first
contribution in
[pacocoursey/next-themes#192
- [@&#8203;BekzodIsakov](https://togithub.com/BekzodIsakov) made their
first contribution in
[pacocoursey/next-themes#241
- [@&#8203;BlankParticle](https://togithub.com/BlankParticle) made their
first contribution in
[pacocoursey/next-themes#253

**Full Changelog**:
pacocoursey/next-themes@v0.2.0...v0.3.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/tisnamuliarta/laravel-shadcn).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzguMSIsInVwZGF0ZWRJblZlciI6IjM3LjIzOC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
github-merge-queue bot pushed a commit to dotkom/monoweb that referenced this pull request Aug 20, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [next-themes](https://togithub.com/pacocoursey/next-themes) |
[`^0.2.1` ->
`^0.3.0`](https://renovatebot.com/diffs/npm/next-themes/0.2.1/0.3.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/next-themes/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/next-themes/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/next-themes/0.2.1/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/next-themes/0.2.1/0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>pacocoursey/next-themes (next-themes)</summary>

###
[`v0.3.0`](https://togithub.com/pacocoursey/next-themes/releases/tag/v0.3.0)

#### What's

- `"use client"` was added to the library output so that you can use it
as a React Client component without creating a wrapper.

#### New Contributors

- [@&#8203;MaxLeiter](https://togithub.com/MaxLeiter) made their first
contribution in
[pacocoursey/next-themes#120
- [@&#8203;gnoff](https://togithub.com/gnoff) made their first
contribution in
[pacocoursey/next-themes#135
- [@&#8203;WITS](https://togithub.com/WITS) made their first
contribution in
[pacocoursey/next-themes#168
- [@&#8203;dimaMachina](https://togithub.com/dimaMachina) made their
first contribution in
[pacocoursey/next-themes#186
- [@&#8203;amrhassab](https://togithub.com/amrhassab) made their first
contribution in
[pacocoursey/next-themes#192
- [@&#8203;BekzodIsakov](https://togithub.com/BekzodIsakov) made their
first contribution in
[pacocoursey/next-themes#241
- [@&#8203;BlankParticle](https://togithub.com/BlankParticle) made their
first contribution in
[pacocoursey/next-themes#253

**Full Changelog**:
pacocoursey/next-themes@v0.2.0...v0.3.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job log](https://developer.mend.io/github/dotkom/monoweb).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants