Skip to content

Conversation

@nikosdouvlis
Copy link
Member

@nikosdouvlis nikosdouvlis commented Jan 30, 2026

The clerkUIVersion prop was typed in @clerk/shared/types but never wired through framework packages, making it effectively dead code. Users could pass the prop without TypeScript errors, but it would be silently ignored.

This mirrors the existing clerkJSVersion functionality for @clerk/ui.

What changed

Added environment variable support for clerkUIVersion across all framework packages:

Framework Env Var
Next.js NEXT_PUBLIC_CLERK_UI_VERSION
Astro PUBLIC_CLERK_UI_VERSION
React Router VITE_CLERK_UI_VERSION
Tanstack Start VITE_CLERK_UI_VERSION
Express CLERK_UI_VERSION
Nuxt NUXT_PUBLIC_CLERK_UI_VERSION

Test plan

  • Verify types compile across all packages
  • Test that clerkUIVersion prop flows through to clerkUIScriptUrl

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added support for configuring Clerk UI version across multiple framework integrations (Astro, Next.js, Express, Nuxt, React Router, TanStack React Start).
    • UI version can now be specified via environment variables and propagated through application configuration.

✏️ Tip: You can customize this high-level summary in your review settings.

Why:
The `clerkUIVersion` prop was typed in `@clerk/shared/types` but never wired through framework packages, making it effectively dead code. Users could pass the prop without TypeScript errors, but it would be silently ignored. This mirrors the existing `clerkJSVersion` functionality for `@clerk/ui`.

What changed:
- Added `NEXT_PUBLIC_CLERK_UI_VERSION` env var support to Next.js
- Added `PUBLIC_CLERK_UI_VERSION` env var support to Astro
- Added `VITE_CLERK_UI_VERSION` env var support to React Router and Tanstack Start
- Added `CLERK_UI_VERSION` env var support to Express
- Added `NUXT_PUBLIC_CLERK_UI_VERSION` env var support to Nuxt
- Wired the prop through SSR state for React Router and Tanstack Start
@changeset-bot
Copy link

changeset-bot bot commented Jan 30, 2026

⚠️ No Changeset found

Latest commit: 87364d1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@vercel
Copy link

vercel bot commented Jan 30, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
clerk-js-sandbox Skipped Skipped Jan 30, 2026 4:24pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 30, 2026

📝 Walkthrough

Walkthrough

This pull request adds support for a new Clerk UI version parameter across multiple framework packages. The changes introduce a new environment variable (CLERK_UI_VERSION or framework-specific variants like NEXT_PUBLIC_CLERK_UI_VERSION) that flows through configuration, environment merging, and provider state in Astro, Express, Next.js, Nuxt, React Router, and TanStack React Start integrations. The clerkUIVersion value is extracted from environment variables, merged with existing parameters, and exposed through provider state and public configurations.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding support for clerkUIVersion across all framework packages by wiring it through the integration layer and environment variables.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/astro/src/internal/merge-env-vars-with-params.ts (1)

28-41: ⚠️ Potential issue | 🔴 Critical

Fix missing clerkUIVersion in AstroClerkIntegrationParams (TS2339 build failure).

CI reports TS2339 on Line 40 because AstroClerkIntegrationParams doesn’t declare clerkUIVersion, so this destructure fails at compile time. Please add the optional field to the params type (and any public-facing params type that extends it).

✅ Suggested fix (type definition)
export interface AstroClerkIntegrationParams {
  // ...
+ clerkUIVersion?: string;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants