Skip to content

feat!: require Nuxt 4.6 and run the server code on nuxt/server - #92

Merged
slavarazum merged 11 commits into
mainfrom
feat/nuxt-server
Oct 23, 2026
Merged

slavarazum merged 11 commits into
mainfrom
feat/nuxt-server

Conversation

@slavarazum

Copy link
Copy Markdown
Contributor

Part of 0.12.0. Stacked on #87: review after it, and I'll rebase onto main once #87 is squash-merged.

What changes

The module's server code now uses Nuxt 4.6's portable nuxt/server. One implementation runs on nitropack 2, on Nitro 3 (Nuxt 5) and on other server builders, and h3 is no longer a dependency. @nuxt/kit moves to ^4.6.2.

Part Before After
Better Auth proxy h3 assertMethod, toWebRequest, raw-path vs normalised-path compare nuxt/server handler. Method allow-list kept. The traversal guard refuses any ./.. segment (encoded or not) in the routed ** match, because nuxt/server only exposes the normalised URL
convexAuth(event) H3Event + h3 getRequestHeaders / toWebRequest Accepts the nuxt/server event (req) or the h3 event Nuxt 4 routes and useRequestEvent() pass (headers). The new public type is ConvexAuthEvent. handler() needs the former and throws a documented error otherwise
SSR Cache-Control h3 setResponseHeader useResponseHeader from #app, captured before the first await
nuxt-security CSP plugin addServerPlugin (deprecated in kit 4.6) addNitroPlugin({ nitro2, nitro3 }): the same file, which imports only nuxt/server
DevTools panel h3 serveStatic pushed into devServerHandlers addDevServerHandler({ nuxt }), serving files as Request → Response

Still on #imports: src/runtime/nuxt/config.ts reads runtime config through #imports. App and server code share it, and Nuxt forbids nuxt/server in app code. It works on every Nuxt 4 build; it's noted as the one item to check on Nuxt 5.

Breaking

  • Nuxt >=4.6.0 (was >=4.1.0). Moving within Nuxt 4.x needs no code changes; apps that can't move stay on 0.11.
  • convexAuth's parameter type is ConvexAuthEvent instead of h3's H3Event. Existing calls keep working.

Verification

  • pnpm dev:prepare, lint, test:types, test (1232 passed), test:quality, test:security.
  • pnpm test:e2e: 13 passed. A new case sends raw ../ and %2e%2e paths to the built Better Auth fixture and expects 400 with nothing forwarded. It fails when the guard is removed (checked).
  • Website production build on Nuxt 4.6.2, served: / and a docs page return 200.
  • DevTools panel in nuxt dev against the built package:
    • page, icon and assets return 200 with the right content types and no-store;
    • a missing file returns 404, and POST returns 405;
    • a climb out of the folder (..%2f) returns 404.

🤖 Generated with Claude Code

slavarazum and others added 8 commits October 19, 2026 15:43
Parity: convex 1.46.0 → 1.47.0. Nothing to port. No commits touch the
mapped entry points, src/browser/sync, src/browser/http_client.ts or
src/common, and the published dist for react, nextjs, react-clerk,
react-auth0 and browser is byte-identical. The exports map and the
peer dependencies are unchanged. @convex-dev/better-auth and
@convex-dev/polar have no new releases.

Nuxt: the repository and the website move from 4.5 to 4.6.2 (catalog,
@nuxt/schema, docus 5.15, @nuxt/content 3.16.2, @nuxt/fonts 1, devtools
3.4.4, test-utils 4.3.4). cssnano 9.9.0 passes the trust policy, so no
exclusions are needed. The Dependabot holds on nuxt, @nuxt/kit and
@nuxt/schema are gone. The module's floor and its @nuxt/kit dependency
range stay where they were. addServerPlugin stays too, because
addNitroPlugin only exists from kit 4.6. The website now lists
@nuxt/ui, which it imports through #ui.

Description: README and the site's SEO default take the wording the
nuxt.com registry entry uses.

Process:
- pnpm parity:diff <tier> [to] [from] diffs an upstream release over
  the mapped and re-implemented paths. Those paths now include
  src/common and http_client for convex, and the plugin clients for
  better-auth.
- The ported upstreams get their own Dependabot group.
- Scheduled CI failures go to the weekly drift issue.
- The skill gains a Job 4 for Nuxt minors and drops its stale gate
  copies, commit type and SHAs.
- Links follow Convex's org rename (get-convex → convex).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nuxt.com parses a README into a tree, so the opening <div align="center">
became an empty element and nothing was centred. Each top block now
carries align="center" itself, and the hero sits in a link so it centres
too. The separator images rendered as blocks there, one per line; they
are gone. nuxt.com trims whitespace at text edges inside HTML blocks, so
the link-row dots live inside the links.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Listing @nuxt/ui in website/package.json makes docus 5.15's own OgImage
component fail `nuxt typecheck` (TS2731), which turned CI's website job
red. fallow flags the `#ui` alias imports as an unlisted dependency on
Nuxt 4.6, so it is ignored there with the reason instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nuxt.com is dark by default, but a <picture> picks its source by the OS
theme, so most visitors saw the dark-ink wordmark on a dark page; npm
keeps the <picture> too and is always white. hero.svg uses one slate
grey with the same contrast on white and on near-black (4.3:1), so it
needs no theme switch.

nuxt.com now renders READMEs with comark 0.8.1, which keeps spaces
inside a line but drops line breaks. Every header row is one line, the
badge groups are split by a raised bullet that centres on the badges on
GitHub and nuxt.com, and a test keeps prose paragraphs on one line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Better Auth component's docs moved from convex-better-auth.netlify.app
to labs.convex.dev/better-auth, which failed the weekly link check. OSV's
remaining finding, node-forge GHSA-86w9-cpqp-85rv, has no patched release
and only reaches the dev server's certificate generation, so it is ignored
until 2027-01-31 with the reason. The braces advisory was withdrawn, and
the simple-git ones go with @nuxt/devtools 3.4.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The module's server code now uses Nuxt 4.6's portable `nuxt/server`
API, so one implementation runs on nitropack 2, on Nitro 3 (Nuxt 5) and
on other server builders, and `h3` is no longer a dependency.

- Better Auth proxy: a `nuxt/server` handler. The method allow-list and
  the traversal guard stay; the guard now refuses any `.`/`..` segment
  (encoded or not) in the part of the path the route matched, since
  `nuxt/server` exposes only the normalised URL. A new e2e test sends
  raw traversal paths to a real build.
- `convexAuth(event)` accepts the `nuxt/server` event (`req`) or the h3
  event Nuxt 4 routes and `useRequestEvent()` still pass (`headers`),
  typed as the new public `ConvexAuthEvent`. `handler()` needs the
  former and says so.
- The SSR plugin sets `Cache-Control` through `useResponseHeader`.
- The nuxt-security CSP plugin reads runtime config from `nuxt/server`
  and is registered for both Nitro majors with `addNitroPlugin`.
- The DevTools panel is served by a portable dev handler instead of h3's
  `serveStatic`; checked in `nuxt dev` against the built package.
- `@nuxt/kit` ^4.6.2; the h3 Dependabot hold goes with the dependency.

BREAKING CHANGE: Nuxt >= 4.6.0 is required (was >= 4.1.0). Apps on
4.1-4.5 can update Nuxt within 4.x, which needs no code changes, or stay
on 0.11. `convexAuth`'s parameter type is `ConvexAuthEvent` instead of
h3's `H3Event`; existing calls keep working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 47 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 6702731 and 78fbb53.

⛔ Files ignored due to path filters: 2
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !pnpm-lock.yaml
  • website/content/4.api-reference/9.reference/better-auth/server.md is excluded by !website/content/4.api-reference/9.reference/**
📒 Files selected for processing: 33
  • .fallowrc.jsonc
  • .github/dependabot.yml
  • PARITY.md
  • STABILITY.md
  • examples/playground/package.json
  • package.json
  • src/devtools/index.ts
  • src/module.ts
  • src/runtime/better-auth/nuxt/proxy.ts
  • src/runtime/better-auth/nuxt/server-guard.ts
  • src/runtime/better-auth/nuxt/server.ts
  • src/runtime/better-auth/vue/plugin.server.ts
  • src/runtime/nuxt/security.ts
  • templates/starter/package.json
  • test/e2e/better-auth-proxy.test.ts
  • test/helpers/nuxt-server.ts
  • test/nuxt/auth/vue/plugin-server-cache.test.ts
  • test/nuxt/public-surface.test.ts
  • test/unit-server/prerender-auth-prefetch.test.ts
  • test/unit/auth/nuxt/proxy.test.ts
  • test/unit/auth/nuxt/server.test.ts
  • test/unit/auth/vue/plugin-server.test.ts
  • test/unit/devtools-setup.test.ts
  • vitest.config.ts
  • website/app/components/content/LandingVersionChip.vue
  • website/content/1.getting-started/1.introduction.md
  • website/content/1.getting-started/2.installation.md
  • website/content/1.getting-started/6.security.md
  • website/content/1.getting-started/7.troubleshooting.md
  • website/content/index.md
  • website/server/plugins/og-image-page-description.ts
  • website/shared/og-image.d.ts
  • website/skills/nuxt-convex-module/references/install.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

slavarazum and others added 2 commits October 23, 2026 19:22
…check

From CodeRabbit's review: `* item`, `+ item` and numbered items read as
prose and could fail valid formatting, and a continuation line that
starts with inline code was skipped. One pattern now names the lines
that are blocks of their own; everything else is paragraph text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base automatically changed from chore/parity-convex-1.47-nuxt-4.6 to main October 23, 2026 17:34
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
nuxt-convex-module Skipped Skipped Oct 23, 2026 5:36pm UTC

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Oct 23, 2026

Copy link
Copy Markdown

commit: 78fbb53

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.29412% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.66%. Comparing base (6702731) to head (78fbb53).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/devtools/index.ts 69.23% 1 Missing and 3 partials ⚠️
src/runtime/better-auth/nuxt/proxy.ts 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #92      +/-   ##
==========================================
- Coverage   90.09%   89.66%   -0.43%     
==========================================
  Files          52       52              
  Lines        1757     1771      +14     
  Branches      438      448      +10     
==========================================
+ Hits         1583     1588       +5     
- Misses         79       82       +3     
- Partials       95      101       +6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@slavarazum
slavarazum merged commit 8f9d55f into main Oct 23, 2026
21 checks passed
@slavarazum
slavarazum deleted the feat/nuxt-server branch October 23, 2026 18:07
slavarazum added a commit that referenced this pull request Oct 23, 2026
#88's integrations app now matches this branch: its declared ranges are
the narrowed peer ranges, Nuxt ^4.6.2, and <CheckoutLink> gets the
polarApi it now requires (a placeholder reference; nothing calls it
during SSR).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot mentioned this pull request Oct 24, 2026

This branch was previously deployed

1 inactive deployment
Preview — 78fbb537 Deployed Oct 23, 2026 by vercel[bot]
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.

2 participants