Skip to content

docs(types): align database types path examples with module default#608

Merged
larbish merged 3 commits into
nuxt-modules:mainfrom
noracoderwitch:docs/types-path-srcdir
May 12, 2026
Merged

docs(types): align database types path examples with module default#608
larbish merged 3 commits into
nuxt-modules:mainfrom
noracoderwitch:docs/types-path-srcdir

Conversation

@noracoderwitch
Copy link
Copy Markdown
Contributor

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update (non-breaking change, improves clarity)

Description

The types option default path documented in docs/content/1.getting-started/1.introduction.md and the related Typescript example in docs/content/2.composables/useSupabaseClient.md were inconsistent with the module's actual default declared in src/module.ts (~/types/database.types.ts).

The intro page advertised ./app/types/database.types.ts (a hardcoded path that drifts when srcDir is customized — for example with the NuxtHub starter). The composable page advertised ./types/database.types.ts (root-relative, which doesn't match the module default). Both are now aligned to ~/types/database.types.ts.

The shell examples that previously redirected to > types/database.types.ts would land outside srcDir in a default Nuxt 4 setup, so the generated types wouldn't be picked up by the module. Updated to > app/types/database.types.ts. A short note in the intro section links to the upstream Nuxt srcDir docs and mentions Nuxt 3 / legacy behavior for completeness.

Resolves: #477

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes (not applicable – docs-only change).

@vercel
Copy link
Copy Markdown

vercel Bot commented May 7, 2026

@noracoderwitch is attempting to deploy a commit to the NuxtLabs Team on Vercel.

A member of the Team first needs to authorize it.

@noracoderwitch noracoderwitch force-pushed the docs/types-path-srcdir branch from ff124f5 to e5d7c6c Compare May 7, 2026 16:21
Copy link
Copy Markdown
Member

@larbish larbish left a comment

Choose a reason for hiding this comment

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

👍

@larbish larbish merged commit 8145941 into nuxt-modules:main May 12, 2026
1 of 3 checks passed
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.

Incorrect default value for type definitions file path listed in docs

2 participants