Skip to content

fix(nuxthub): handle nuxthub version correctly#3680

Merged
farnabaz merged 2 commits intonuxt:mainfrom
matveyson:main
Jan 13, 2026
Merged

fix(nuxthub): handle nuxthub version correctly#3680
farnabaz merged 2 commits intonuxt:mainfrom
matveyson:main

Conversation

@matveyson
Copy link
Copy Markdown
Contributor

@matveyson matveyson commented Jan 9, 2026

🔗 Linked issue

resolves #3679

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Resolves #3679. The numeric check

const nuxthubVersion = nuxt.options.hub?.database === true ? 0.9 : 0.10
// NuxtHub <= 0.9
if (nuxthubVersion <= 0.9) {
if (nitroConfig.runtimeConfig?.content?.database?.type === 'sqlite') {
logger.warn('Deploying with NuxtHub < 1 requires using D1 database, switching to D1 database with binding `DB`.')
nitroConfig.runtimeConfig!.content!.database = { type: 'd1', bindingName: 'DB' }
}
}
else if (nuxthubVersion >= 0.10) {
is replaced by a structural check similar to the one used above.
// NuxtHub <= 0.9
if (nuxtOptions.hub?.database === true) {
options.database ||= { type: 'd1', bindingName: 'DB' }
}
else if (typeof nuxtOptions.hub?.db === 'string' && typeof hubDb === 'object') {

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 9, 2026

@matveyson is attempting to deploy a commit to the Nuxt Team on Vercel.

A member of the Team first needs to authorize it.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Jan 9, 2026

npm i https://pkg.pr.new/@nuxt/content@3680

commit: 0efad90

Copy link
Copy Markdown
Member

@farnabaz farnabaz left a comment

Choose a reason for hiding this comment

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

Nice Catch
Thanks

@farnabaz farnabaz merged commit 695bd2e into nuxt:main Jan 13, 2026
4 of 5 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 NuxtHub version handling

2 participants