Skip to content

feat(*): Wire clerkUIVersion through all framework packages#7740

Open
nikosdouvlis wants to merge 4 commits intomainfrom
nk/wire-clerk-ui-version
Open

feat(*): Wire clerkUIVersion through all framework packages#7740
nikosdouvlis wants to merge 4 commits intomainfrom
nk/wire-clerk-ui-version

Conversation

@nikosdouvlis
Copy link
Member

@nikosdouvlis nikosdouvlis commented Feb 3, 2026

Summary

Wire clerkUIVersion option through all framework packages to allow specifying a custom @clerk/ui version.

  • Add clerkUIVersion to Astro's AstroClerkIntegrationParams type
  • Pass through environment variables for all framework packages

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Add support for specifying a Clerk UI version (and propagate UI URL/version) across Astro, Express, Next.js, Nuxt, React Router, and TanStack integrations via a new option and corresponding public environment variable.
  • Chores
    • Published patch-level changeset to wire the new UI version option through affected packages.

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
@vercel
Copy link

vercel bot commented Feb 3, 2026

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

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Feb 3, 2026 6:09pm

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Feb 3, 2026

🦋 Changeset detected

Latest commit: 8685399

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@clerk/astro Patch
@clerk/express Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/tanstack-react-start Patch

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

This PR adds a new clerkUIVersion property and corresponding environment variables across multiple integrations (Astro, Express, Next.js, Nuxt, React Router, TanStack React Start). Environment variable names include PUBLIC_CLERK_UI_VERSION, NEXT_PUBLIC_CLERK_UI_VERSION, and CLERK_UI_VERSION. The value is threaded through params, env merging, runtime constants, and emitted clerk state without changing function signatures or control flow.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.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 pull request title accurately summarizes the main change: wiring clerkUIVersion through all framework packages, which is reflected in all modified files across multiple frameworks.

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

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Failure to add the new IP will result in interrupted reviews.


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 (2)
packages/react-router/src/server/utils.ts (1)

80-103: ⚠️ Potential issue | 🟠 Major

Add tests for clerkUIVersion propagation before merge.

This PR introduces a new runtime configuration path (__clerkUIVersion in the SSR clerk state), but no tests were added/updated to cover it. Please add a unit or integration test to validate that the env var is correctly read and serialized into the response state.

packages/react-router/src/client/types.ts (1)

6-28: ⚠️ Potential issue | 🟠 Major

Add tests for clerkUIVersion env/config propagation.

No tests were added or updated for this multi-framework change (env parsing, runtime config, script URL generation). Please add coverage to ensure the new clerkUIVersion wiring is respected end‑to‑end before merge.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 3, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@7740

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@7740

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@7740

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@7740

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@7740

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@7740

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@7740

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@7740

@clerk/express

npm i https://pkg.pr.new/@clerk/express@7740

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@7740

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@7740

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@7740

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@7740

@clerk/react

npm i https://pkg.pr.new/@clerk/react@7740

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@7740

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@7740

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@7740

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@7740

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@7740

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@7740

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@7740

commit: 8685399

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.

3 participants