Skip to content

Commit

Permalink
deps(example): bump the dependencies group in /examples/nextjs-permit…
Browse files Browse the repository at this point in the history
… with 3 updates (#2065)

Bumps the dependencies group in /examples/nextjs-permit with 3 updates: [@clerk/nextjs](https://github.com/clerk/javascript/tree/HEAD/packages/nextjs), [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) and [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next).

Updates `@clerk/nextjs` from 5.7.5 to 6.0.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/clerk/javascript/releases"><code>@​clerk/nextjs</code>'s releases</a>.</em></p>
<blockquote>
<h2><code>@​clerk/nextjs</code><a href="https://github.com/6"><code>@​6</code></a>.0.0</h2>
<h3>Major Changes</h3>
<ul>
<li>
<p>Stop <code>&lt;ClerkProvider&gt;</code> from opting applications into dynamic rendering. A new prop, <code>&lt;ClerkProvider dynamic&gt;</code> can be used to opt-in to dynamic rendering and make auth data available during server-side rendering. The RSC <code>auth()</code> helper should be preferred for accessing auth data during dynamic rendering. (<a href="https://redirect.github.com/clerk/javascript/pull/4366">#4366</a>) by <a href="https://github.com/jacekradko"><code>@​jacekradko</code></a></p>
</li>
<li>
<p><code>@​clerk/nextjs</code>: Converting auth() and clerkClient() interfaces to be async (<a href="https://redirect.github.com/clerk/javascript/pull/4366">#4366</a>) by <a href="https://github.com/jacekradko"><code>@​jacekradko</code></a></p>
<p><code>@​clerk/upgrade</code>: Adding required codemod for <code>@​clerk/nextjs</code> breaking changes</p>
<h1>Migration guide</h1>
<h2><code>auth()</code> is now async</h2>
<p>Previously the <code>auth()</code> method from <code>@clerk/nextjs/server</code> was synchronous.</p>
<pre lang="typescript"><code>import { auth } from &quot;@clerk/nextjs/server&quot;;
<p>export function GET() {<br />
const { userId } = auth();<br />
return new Response(JSON.stringify({ userId }));<br />
}<br />
</code></pre></p>
<p>The <code>auth</code> method now becomes asynchronous. You will need to make the following changes to the snippet above to make it compatible.</p>
<pre lang="diff"><code>- export function GET() {
+ export async function GET() {
-   const { userId } = auth();
+   const { userId } = await auth();
  return new Response(JSON.stringify({ userId }));
}
</code></pre>
<h2>Clerk middleware auth is now async</h2>
<pre lang="typescript"><code>import { clerkClient, clerkMiddleware } from '@clerk/nextjs/server';
import { NextResponse } from 'next/server';
<p>export default clerkMiddleware(async (auth, request) =&gt; {<br />
const resolvedAuth = await auth();</p>
<p>const count = await resolvedAuth.users.getCount();</p>
<p>if (count) {<br />
return NextResponse.redirect(new URL('/new-url', request.url));<br />
}<br />
});<br />
</code></pre></p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/clerk/javascript/blob/main/packages/nextjs/CHANGELOG.md"><code>@​clerk/nextjs</code>'s changelog</a>.</em></p>
<blockquote>
<h2>6.0.0</h2>
<h3>Major Changes</h3>
<ul>
<li>
<p>Stop <code>&lt;ClerkProvider&gt;</code> from opting applications into dynamic rendering. A new prop, <code>&lt;ClerkProvider dynamic&gt;</code> can be used to opt-in to dynamic rendering and make auth data available during server-side rendering. The RSC <code>auth()</code> helper should be preferred for accessing auth data during dynamic rendering. (<a href="https://redirect.github.com/clerk/javascript/pull/4366">#4366</a>) by <a href="https://github.com/jacekradko"><code>@​jacekradko</code></a></p>
</li>
<li>
<p><code>@​clerk/nextjs</code>: Converting auth() and clerkClient() interfaces to be async (<a href="https://redirect.github.com/clerk/javascript/pull/4366">#4366</a>) by <a href="https://github.com/jacekradko"><code>@​jacekradko</code></a></p>
<p><code>@​clerk/upgrade</code>: Adding required codemod for <code>@​clerk/nextjs</code> breaking changes</p>
<h1>Migration guide</h1>
<h2><code>auth()</code> is now async</h2>
<p>Previously the <code>auth()</code> method from <code>@clerk/nextjs/server</code> was synchronous.</p>
<pre lang="typescript"><code>import { auth } from &quot;@clerk/nextjs/server&quot;;
<p>export function GET() {<br />
const { userId } = auth();<br />
return new Response(JSON.stringify({ userId }));<br />
}<br />
</code></pre></p>
<p>The <code>auth</code> method now becomes asynchronous. You will need to make the following changes to the snippet above to make it compatible.</p>
<pre lang="diff"><code>- export function GET() {
+ export async function GET() {
-   const { userId } = auth();
+   const { userId } = await auth();
  return new Response(JSON.stringify({ userId }));
}
</code></pre>
<h2>Clerk middleware auth is now async</h2>
<pre lang="typescript"><code>import { clerkClient, clerkMiddleware } from '@clerk/nextjs/server';
import { NextResponse } from 'next/server';
<p>export default clerkMiddleware(async (auth, request) =&gt; {<br />
const resolvedAuth = await auth();</p>
<p>const count = await resolvedAuth.users.getCount();</p>
<p>if (count) {<br />
return NextResponse.redirect(new URL('/new-url', request.url));<br />
}<br />
</code></pre></p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/clerk/javascript/commit/180f5a50fe09774585c9164d679b8f2ecfab64df"><code>180f5a5</code></a> ci(repo): Version packages (<a href="https://github.com/clerk/javascript/tree/HEAD/packages/nextjs/issues/4358">#4358</a>)</li>
<li><a href="https://github.com/clerk/javascript/commit/58c99a50b1302bfb37dc5a6df9e8fbd54cc0c07d"><code>58c99a5</code></a> fix(nextjs): Improve page detection for Next 15 (<a href="https://github.com/clerk/javascript/tree/HEAD/packages/nextjs/issues/4383">#4383</a>)</li>
<li><a href="https://github.com/clerk/javascript/commit/8d8c564bac6c34c47403af453db45cb1f7d8c235"><code>8d8c564</code></a> fix(nextjs): Fix pages router check (<a href="https://github.com/clerk/javascript/tree/HEAD/packages/nextjs/issues/4381">#4381</a>)</li>
<li><a href="https://github.com/clerk/javascript/commit/ee453d88ed1bd338b800f8f4601d588125a6a4d9"><code>ee453d8</code></a> fix(nextjs): Convert middleware auth to async (<a href="https://github.com/clerk/javascript/tree/HEAD/packages/nextjs/issues/4378">#4378</a>)</li>
<li><a href="https://github.com/clerk/javascript/commit/a0204a8e8742b63aea92d67e7d66fe0bc86a166f"><code>a0204a8</code></a> feat(nextjs): Next.js@15 compatibility (<a href="https://github.com/clerk/javascript/tree/HEAD/packages/nextjs/issues/4366">#4366</a>)</li>
<li><a href="https://github.com/clerk/javascript/commit/3b50b67bd40da33c9e36773aa05462717e9f44cc"><code>3b50b67</code></a> feat(clerk-js): Render <code>@clerk/ui</code> (<a href="https://github.com/clerk/javascript/tree/HEAD/packages/nextjs/issues/4114">#4114</a>)</li>
<li>See full diff in <a href="https://github.com/clerk/javascript/commits/@clerk/[email protected]/packages/nextjs">compare view</a></li>
</ul>
</details>
<br />

Updates `@types/react` from 18.3.11 to 18.3.12
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react">compare view</a></li>
</ul>
</details>
<br />

Updates `eslint-config-next` from 15.0.0 to 15.0.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/vercel/next.js/releases">eslint-config-next's releases</a>.</em></p>
<blockquote>
<h2>v15.0.1</h2>
<h3>Core Changes</h3>
<ul>
<li>Reland &quot;[dynamicIO] warn for disallowed dynamic in dev&quot;: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71567">#71567</a></li>
<li>next-upgrade: prompt (un)install only when there's a change: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71308">#71308</a></li>
<li>chore(next-codemod): remove <code>@next/font</code> from optional Next.js packages to install: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71563">#71563</a></li>
<li>[dynamicIO] Avoid triggering memory leak false positive with makeHangingPromise: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71576">#71576</a></li>
<li>Avoid triggering memory leak false positive with makeHangingPromise: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71579">#71579</a></li>
<li>Upgrade React from <code>65a56d0e-20241020</code> to <code>69d4b800-20241021</code>: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71568">#71568</a></li>
<li>avoid logging stacks for internal errors: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71575">#71575</a></li>
<li>Avoid server action <code>endpoint</code> function indirection: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71572">#71572</a></li>
<li>fix: handle terminal color in chrome console: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71581">#71581</a></li>
<li>[dynamicIO] Update prerender to use Fizz prerender: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71580">#71580</a></li>
<li>misc(next-upgrade): reuse process.cwd() value: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71558">#71558</a></li>
<li>[dynamicIO]: dev navigations should show disallowed dynamic errors: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71595">#71595</a></li>
<li>next-lint: Use ESLint v9 by default: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71371">#71371</a></li>
<li>fix: prevent router errors from being logged on the client: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71583">#71583</a></li>
<li>fix: next package resolving in dev overlay: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71632">#71632</a></li>
<li>Improve type coverage of setup-dev-bundler: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71443">#71443</a></li>
<li>fix(turbo-tasks): Implement ValueDebugFormat for ResolvedVc: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71173">#71173</a></li>
<li>Add --turbopack CLI flag: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71657">#71657</a></li>
<li>[dynamicIO] detect metadata boundaries in dev using server component stacks: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71666">#71666</a></li>
</ul>
<h3>Example Changes</h3>
<ul>
<li>chore: Update <code>with-supabase</code> to be compatible with Nextjs 15: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71631">#71631</a></li>
<li>Update Sanity example to next v15: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71640">#71640</a></li>
</ul>
<h3>Misc Changes</h3>
<ul>
<li>docs(ppr): remove v14 mention for ppr: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71498">#71498</a></li>
<li>docs: fix upgrade codemod command: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71578">#71578</a></li>
<li>Turbopack: Always use blob: URLs for assets in middleware: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71471">#71471</a></li>
<li>fix: metadata image route Windows path escaping: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71615">#71615</a></li>
<li>fix: third-parties package peer dependency: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71620">#71620</a></li>
<li>Fix <code>module_resolution: &quot;nodenext&quot;</code> with <code>mjs</code> or <code>cjs</code>: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71635">#71635</a></li>
<li>react-sync: Automatically update peer dependencies in libraries: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71636">#71636</a></li>
<li>chore(docs): fix typo in image.mdx docs: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71647">#71647</a></li>
<li>docs: remove the canary note on instrumentation: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71649">#71649</a></li>
<li>test: fix async api tests: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71652">#71652</a></li>
<li>Enable source maps for <code>pnpm debug</code>: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71653">#71653</a></li>
<li>codemod(turbopack): Rewrite more Vc fields in structs as ResolvedVc: <a href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/71172">#71172</a></li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a href="https://github.com/gnoff"><code>@​gnoff</code></a>, <a href="https://github.com/devjiwonchoi"><code>@​devjiwonchoi</code></a>, <a href="https://github.com/samcx"><code>@​samcx</code></a>, <a href="https://github.com/ztanner"><code>@​ztanner</code></a>, <a href="https://github.com/unstubbable"><code>@​unstubbable</code></a>, <a href="https://github.com/huozhi"><code>@​huozhi</code></a>, <a href="https://github.com/mischnic"><code>@​mischnic</code></a>, <a href="https://github.com/lubieowoce"><code>@​lubieowoce</code></a>, <a href="https://github.com/eps1lon"><code>@​eps1lon</code></a>, <a href="https://github.com/ivasilov"><code>@​ivasilov</code></a>, <a href="https://github.com/styfle"><code>@​styfle</code></a>, <a href="https://github.com/bgw"><code>@​bgw</code></a>, <a href="https://github.com/stipsan"><code>@​stipsan</code></a>, and <a href="https://github.com/timneutkens"><code>@​timneutkens</code></a> for helping!</p>
<h2>v15.0.1-canary.3</h2>
<h3>Core Changes</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/vercel/next.js/commit/914d0f3c4a66153bef916939df3c516567544df6"><code>914d0f3</code></a> v15.0.1</li>
<li><a href="https://github.com/vercel/next.js/commit/b075951c68192239a98e05f225bff042fe22e43d"><code>b075951</code></a> v15.0.1-canary.3</li>
<li><a href="https://github.com/vercel/next.js/commit/4ee184b86b298fb60bb0acb381efb6cbb33626d8"><code>4ee184b</code></a> v15.0.1-canary.2</li>
<li><a href="https://github.com/vercel/next.js/commit/2b860fdfaf8a8d70574165ff0293e5b3ce4d016a"><code>2b860fd</code></a> v15.0.1-canary.1</li>
<li><a href="https://github.com/vercel/next.js/commit/db301b0e9daf92802bf491dfc7a8c4fc8c17af3e"><code>db301b0</code></a> v15.0.1-canary.0</li>
<li>See full diff in <a href="https://github.com/vercel/next.js/commits/v15.0.1/packages/eslint-config-next">compare view</a></li>
</ul>
</details>
<br />


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 show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions


</details>
  • Loading branch information
dependabot[bot] authored Oct 23, 2024
1 parent 9abe502 commit a6bdb2b
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 86 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/reusable-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,9 @@ jobs:
- name: Build
working-directory: examples/nextjs-permit
run: npm run build
env:
# This is the smallest dummy token that passes the Clerk validation
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: pk_test_JA==

nextjs-sensitive-info:
name: Next.js + Sensitive Info
Expand Down
164 changes: 81 additions & 83 deletions examples/nextjs-permit/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions examples/nextjs-permit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"dependencies": {
"@arcjet/ip": "file:../../ip",
"@arcjet/next": "file:../../arcjet-next",
"@clerk/nextjs": "^5.7.5",
"next": "15.0.0",
"@clerk/nextjs": "^6.0.0",
"next": "15.0.1",
"permitio": "^2.6.1",
"react": "^18",
"react-dom": "^18"
Expand All @@ -22,7 +22,7 @@
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "15.0.0",
"eslint-config-next": "15.0.1",
"typescript": "^5"
}
}

0 comments on commit a6bdb2b

Please sign in to comment.