Skip to content

Commit 7edaa7a

Browse files
authored
chore(repo): Migrate Nuxt E2E template to v4 (#6942)
1 parent fe873dc commit 7edaa7a

File tree

10 files changed

+6
-4
lines changed

10 files changed

+6
-4
lines changed

.changeset/long-wolves-vanish.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

integration/templates/nuxt-node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"preview": "nuxt preview --port $PORT"
1111
},
1212
"dependencies": {
13-
"nuxt": "^3.15.0",
13+
"nuxt": "4.1.2",
1414
"vue": "^3.5.13",
1515
"vue-router": "^4.4.5"
1616
}

integration/tests/nuxt/middleware.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ test.describe('custom middleware @nuxt', () => {
2424
)
2525
.addFile(
2626
'server/middleware/clerk.js',
27-
() => `import { clerkMiddleware, createRouteMatcher, getAuth } from '@clerk/nuxt/server';
27+
() => `import { clerkMiddleware, createRouteMatcher } from '@clerk/nuxt/server';
2828
2929
export default clerkMiddleware((event) => {
30-
const { userId } = getAuth(event);
30+
const { userId } = event.context.auth();
3131
const isProtectedRoute = createRouteMatcher(['/api/me']);
3232
3333
if (!userId && isProtectedRoute(event)) {
@@ -40,7 +40,7 @@ test.describe('custom middleware @nuxt', () => {
4040
`,
4141
)
4242
.addFile(
43-
'pages/me.vue',
43+
'app/pages/me.vue',
4444
() => `<script setup>
4545
const { data, error } = await useFetch('/api/me');
4646
</script>

0 commit comments

Comments
 (0)