sidebase / nuxt-auth

Authentication built for Nuxt 3! Easily add authentication via OAuth providers, credentials or Email Magic URLs!
https://auth.sidebase.io
MIT License
1.31k stars 164 forks source link

fix: update to latest `@nuxt/module-builder` #888

Closed danielroe closed 2 months ago

danielroe commented 2 months ago

πŸ”— Linked issue

❓ Type of change

πŸ“š Description

Previous versions of @nuxt/module-builder produced incorrect types for files in the runtime/ directory. Specifically, a .d.ts declaration paired with a .mjs file. This isn't correct - it should be either .d.mts and .mjs or .d.ts and .js.

For maximum compatibility, @nuxt/module-builder v0.8 switched to .js extension for files in runtime/ directory.

With the latest Nuxt, this is now an error that removes correct plugin injection types.

Related PRs: https://github.com/nuxt/nuxt/pull/28480, https://github.com/nuxt/nuxt/pull/28593 See also https://github.com/nuxt/nuxt/issues/28672.

πŸ“ Checklist

pkg-pr-new[bot] commented 2 months ago

Open in Stackblitz

pnpm add https://pkg.pr.new/@sidebase/nuxt-auth@888

commit: 404c98a

edimitchel commented 2 months ago

I tried this PR using pkg pr new and it removes the issue I had using version 0.9.1. Can this PR be merged to solve typescript issue it creates on NuxtAppInjections ambiant type?