Skip to content

Conversation

@wobsoriano
Copy link
Member

@wobsoriano wobsoriano commented Mar 7, 2025

Description

Previously event.context.auth inside eventHandlers was typed as 'any'. This is now fixed with
Nuxt 3.16's improved addTypeTemplate support for Nitro types.

Before:

Screenshot 2025-03-07 at 9 09 07 AM

After:

Screenshot 2025-03-07 at 8 35 05 AM

Resolves ECO-437

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@changeset-bot
Copy link

changeset-bot bot commented Mar 7, 2025

🦋 Changeset detected

Latest commit: 4a664e9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clerk/nuxt Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Mar 7, 2025

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

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2025 4:42pm

@wobsoriano
Copy link
Member Author

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @wobsoriano - the snapshot version command generated the following package versions:

Package Version
@clerk/agent-toolkit 0.0.7-snapshot.v20250307163221
@clerk/astro 2.3.3-snapshot.v20250307163221
@clerk/backend 1.25.2-snapshot.v20250307163221
@clerk/chrome-extension 2.2.16-snapshot.v20250307163221
@clerk/clerk-js 5.55.2-snapshot.v20250307163221
@clerk/elements 0.23.2-snapshot.v20250307163221
@clerk/clerk-expo 2.8.5-snapshot.v20250307163221
@clerk/expo-passkeys 0.1.23-snapshot.v20250307163221
@clerk/express 1.3.53-snapshot.v20250307163221
@clerk/fastify 2.1.26-snapshot.v20250307163221
@clerk/localizations 3.11.2-snapshot.v20250307163221
@clerk/nextjs 6.12.5-snapshot.v20250307163221
@clerk/nuxt 1.4.0-snapshot.v20250307163221
@clerk/clerk-react 5.24.2-snapshot.v20250307163221
@clerk/react-router 1.1.5-snapshot.v20250307163221
@clerk/remix 4.5.5-snapshot.v20250307163221
@clerk/shared 3.0.1-snapshot.v20250307163221
@clerk/tanstack-start 0.11.4-snapshot.v20250307163221
@clerk/testing 1.4.27-snapshot.v20250307163221
@clerk/themes 2.2.21-snapshot.v20250307163221
@clerk/types 4.47.1-snapshot.v20250307163221
@clerk/vue 1.3.1-snapshot.v20250307163221

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/agent-toolkit

npm i @clerk/agent-toolkit@0.0.7-snapshot.v20250307163221 --save-exact

@clerk/astro

npm i @clerk/astro@2.3.3-snapshot.v20250307163221 --save-exact

@clerk/backend

npm i @clerk/backend@1.25.2-snapshot.v20250307163221 --save-exact

@clerk/chrome-extension

npm i @clerk/chrome-extension@2.2.16-snapshot.v20250307163221 --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@5.55.2-snapshot.v20250307163221 --save-exact

@clerk/elements

npm i @clerk/elements@0.23.2-snapshot.v20250307163221 --save-exact

@clerk/clerk-expo

npm i @clerk/clerk-expo@2.8.5-snapshot.v20250307163221 --save-exact

@clerk/expo-passkeys

npm i @clerk/expo-passkeys@0.1.23-snapshot.v20250307163221 --save-exact

@clerk/express

npm i @clerk/express@1.3.53-snapshot.v20250307163221 --save-exact

@clerk/fastify

npm i @clerk/fastify@2.1.26-snapshot.v20250307163221 --save-exact

@clerk/localizations

npm i @clerk/localizations@3.11.2-snapshot.v20250307163221 --save-exact

@clerk/nextjs

npm i @clerk/nextjs@6.12.5-snapshot.v20250307163221 --save-exact

@clerk/nuxt

npm i @clerk/nuxt@1.4.0-snapshot.v20250307163221 --save-exact

@clerk/clerk-react

npm i @clerk/clerk-react@5.24.2-snapshot.v20250307163221 --save-exact

@clerk/react-router

npm i @clerk/react-router@1.1.5-snapshot.v20250307163221 --save-exact

@clerk/remix

npm i @clerk/remix@4.5.5-snapshot.v20250307163221 --save-exact

@clerk/shared

npm i @clerk/shared@3.0.1-snapshot.v20250307163221 --save-exact

@clerk/tanstack-start

npm i @clerk/tanstack-start@0.11.4-snapshot.v20250307163221 --save-exact

@clerk/testing

npm i @clerk/testing@1.4.27-snapshot.v20250307163221 --save-exact

@clerk/themes

npm i @clerk/themes@2.2.21-snapshot.v20250307163221 --save-exact

@clerk/types

npm i @clerk/types@4.47.1-snapshot.v20250307163221 --save-exact

@clerk/vue

npm i @clerk/vue@1.3.1-snapshot.v20250307163221 --save-exact

Comment on lines +70 to +71
"@nuxt/kit": "^3.16.0",
"@nuxt/schema": "^3.16.0",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to update @nuxt/kit to 3.16.0 to support proper type augmentation for event.context.auth in Nitro.

This is a non-breaking change as it only requires the updated @nuxt/kit package and works with any Nuxt version.

@wobsoriano wobsoriano marked this pull request as ready for review March 7, 2025 17:17
@wobsoriano wobsoriano requested review from LekoArts and tmilewski March 7, 2025 17:17
Copy link
Member

@tmilewski tmilewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 🌔

@wobsoriano wobsoriano merged commit 2400ca6 into main Mar 7, 2025
34 checks passed
@wobsoriano wobsoriano deleted the rob/eco-437-h3-auth-context-fix branch March 7, 2025 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants