Skip to content

Conversation

panteliselef
Copy link
Member

@panteliselef panteliselef commented Sep 1, 2025

Description

Partially fixes BILL-1181

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Summary by CodeRabbit

  • New Features
    • Added experimental billing buttons for Clerk Vue: Checkout, Plan Details, and Subscription Details, plus demo views/routes in the Vue Vite template.
  • Tests
    • Updated pricing-table tests to skip Astro variants temporarily.
  • Chores
    • Prepared a minor release changeset for Clerk Vue.
    • Exposed an experimental export surface for Vue and updated build entries/configuration.

Copy link

changeset-bot bot commented Sep 1, 2025

🦋 Changeset detected

Latest commit: 7e21cd1

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

This PR includes changesets to release 2 packages
Name Type
@clerk/vue Minor
@clerk/nuxt 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

Copy link

vercel bot commented Sep 1, 2025

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

Project Deployment Preview Comments Updated (UTC)
clerk-js-sandbox Ready Ready Preview Comment Sep 2, 2025 11:37am

Copy link
Contributor

coderabbitai bot commented Sep 1, 2025

Walkthrough

Adds experimental billing buttons to Clerk Vue: introduces CheckoutButton, PlanDetailsButton, and SubscriptionDetailsButton components, an experimental export entry, updates build config, extends child-assertion utilities, adds Vue template routes and demo views, adjusts tests to skip Astro, and documents the minor release via a changeset.

Changes

Cohort / File(s) Summary
Release notes (changeset)
./.changeset/cold-parks-push.md
Adds a changeset marking a minor release; notes billing buttons are exposed as experimental.
Vue package exports & build
packages/vue/package.json, packages/vue/src/experimental.ts, packages/vue/tsup.config.ts
Adds "./experimental" export path; introduces experimental barrel re-exporting three buttons and types; includes new entry in tsup build and simplifies plugin typings.
New Vue billing button components
packages/vue/src/components/CheckoutButton.vue, packages/vue/src/components/PlanDetailsButton.vue, packages/vue/src/components/SubscriptionDetailsButton.vue
Adds three Vue SFCs wired to Clerk internals: open checkout, plan details, and subscription details; enforce SignedIn and org context where required; handle single-slot child resolution and click passthrough to Clerk internals.
Children utils update
packages/vue/src/utils/childrenUtils.ts
Extends ButtonName union to include SubscriptionDetailsButton, CheckoutButton, PlanDetailsButton; affects assertSingleChild name parameter and related error messages.
Integration template (routing + demos)
integration/templates/vue-vite/src/router.ts, integration/templates/vue-vite/src/views/billing/CheckoutBtn.vue, .../PlanDetailsBtn.vue, .../SubscriptionDetailsBtn.vue
Adds three demo routes and corresponding views using experimental buttons with fixed planId/labels; routes loaded via dynamic imports.
Tests adjustment
integration/tests/pricing-table.test.ts
Replaces per-test gating with test.skip(app.name.includes('astro'), 'Still working on it') for four tests to skip Astro variants; test logic otherwise unchanged.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant App as Vue App
  participant Btn as Billing Button (Vue)
  participant Clerk as Clerk SDK

  rect rgba(230,245,255,0.5)
    note over App,Btn: Render phase
    App->>Btn: Mount with slot child
    Btn->>Btn: Assert single child, SignedIn/org checks
  end

  alt CheckoutButton click
    User->>Btn: Click
    Btn->>Clerk: __internal_openCheckout(planId, planPeriod, for, callbacks, props)
    Clerk-->>User: Opens checkout UI
  else PlanDetailsButton click
    User->>Btn: Click
    Btn->>Clerk: __internal_openPlanDetails(plan/planId, initialPlanPeriod, props)
    Clerk-->>User: Shows plan details UI
  else SubscriptionDetailsButton click
    User->>Btn: Click
    Btn->>Clerk: __internal_openSubscriptionDetails(for, onCancel, props)
    Clerk-->>User: Shows subscription details UI
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Assessment against linked issues

Objective Addressed Explanation
Expose billing buttons as experimental for Vue (BILL-1181)
Expose billing buttons as experimental for Astro (BILL-1181) No Astro runtime/components or export added; tests skip Astro variants instead of adding Astro implementations.

Poem

I thump my paws—new buttons bloom,
Three shiny hops to billing’s room.
A checkout nibble, plan to see,
Subscriptions sway like carrot trees.
Experimental trails I tread—🥕🐇


📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 64ef49a and 7e21cd1.

📒 Files selected for processing (1)
  • integration/tests/pricing-table.test.ts (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • integration/tests/pricing-table.test.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (25)
  • GitHub Check: Integration Tests (nextjs, chrome, 15)
  • GitHub Check: Integration Tests (nextjs, chrome, 14)
  • GitHub Check: Integration Tests (react-router, chrome)
  • GitHub Check: Integration Tests (tanstack-react-router, chrome)
  • GitHub Check: Integration Tests (machine, chrome)
  • GitHub Check: Integration Tests (billing, chrome)
  • GitHub Check: Integration Tests (nuxt, chrome)
  • GitHub Check: Integration Tests (vue, chrome)
  • GitHub Check: Integration Tests (astro, chrome)
  • GitHub Check: Integration Tests (sessions, chrome)
  • GitHub Check: Integration Tests (quickstart, chrome)
  • GitHub Check: Integration Tests (expo-web, chrome)
  • GitHub Check: Integration Tests (elements, chrome)
  • GitHub Check: Integration Tests (localhost, chrome)
  • GitHub Check: Integration Tests (ap-flows, chrome)
  • GitHub Check: Integration Tests (express, chrome)
  • GitHub Check: Integration Tests (generic, chrome)
  • GitHub Check: Publish with pkg-pr-new
  • GitHub Check: Unit Tests (22, **)
  • GitHub Check: Static analysis
  • GitHub Check: Unit Tests (18, --filter=@clerk/astro --filter=@clerk/backend --filter=@clerk/express --filter=@c...
  • GitHub Check: semgrep/ci
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: semgrep-cloud-platform/scan
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch elef/com-1112-vue-only

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

pkg-pr-new bot commented Sep 1, 2025

Open in StackBlitz

@clerk/agent-toolkit

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

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/elements

npm i https://pkg.pr.new/@clerk/elements@6680

@clerk/clerk-expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/clerk-react

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

@clerk/react-router

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

@clerk/remix

npm i https://pkg.pr.new/@clerk/remix@6680

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/themes

npm i https://pkg.pr.new/@clerk/themes@6680

@clerk/types

npm i https://pkg.pr.new/@clerk/types@6680

@clerk/upgrade

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

@clerk/vue

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

commit: 7e21cd1

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: 7

Caution

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

⚠️ Outside diff range comments (1)
packages/vue/src/utils/childrenUtils.ts (1)

15-28: Prevent runtime when slotContent is an empty array

Accessing slotContent[0].type can throw if the slot returns []. Add an empty-array guard and a safe access.

 export const normalizeWithDefaultValue = (slotContent: VNode[] | undefined, defaultValue: string) => {
   // Render a button with the default value if no slot content is provided
   if (!slotContent) {
     return h('button', defaultValue);
   }

   // Render a button with the slot content if it's a text node
-  if (slotContent[0].type === Text) {
+  if (Array.isArray(slotContent) && slotContent.length === 0) {
+    return h('button', defaultValue);
+  }
+  if (slotContent[0] && slotContent[0].type === Text) {
     return h('button', slotContent);
   }
🧹 Nitpick comments (16)
.changeset/cold-parks-push.md (1)

1-6: Clarify experimental import path and list components in the note

Helps consumers discover how to import and what’s included.

 Expose billing buttons as experimental
+
+- New experimental components: CheckoutButton, PlanDetailsButton, SubscriptionDetailsButton.
+- Import path: `@clerk/vue/experimental`.
+- Note: Experimental APIs are subject to change without semver guarantees.
packages/vue/tsup.config.ts (1)

24-27: Include .vue files in auto-props generation

Ensures SFCs (the new buttons) get runtime props inferred from TS.

-      autoPropsPlugin({
-        include: ['**/*.ts'],
-      }),
+      autoPropsPlugin({
+        include: ['**/*.ts', '**/*.vue'],
+      }),
integration/tests/pricing-table.test.ts (4)

35-36: Reduce duplication: hoist Astro gating to a suite

Wrap Astro-incompatible tests in a test.describe with a single test.skip(...).

Example:

test.describe('astro-incompatible', () => {
  test.skip(app.name.includes('astro'), 'Billing buttons not enabled on Astro yet');

  test('renders pricing details of a specific plan', async (...) => { ... });
  // other astro-incompatible tests...
});

85-86: Same suggestion: prefer describe-level skip for Astro gating


100-101: Same suggestion: consolidate Astro gating to avoid drift


135-136: Same suggestion: group and skip once per block

packages/vue/src/components/PlanDetailsButton.vue (1)

1-12: Add minimal JSDoc for the experimental public component

Documents props and experimental status for consumers.

 <script setup lang="ts">
+/**
+ * PlanDetailsButton (experimental)
+ * Renders a clickable child that opens the Clerk Plan Details drawer.
+ * Import from `@clerk/vue/experimental`.
+ */
integration/templates/vue-vite/src/views/billing/PlanDetailsBtn.vue (2)

1-9: Gate with SignedIn to avoid unauthenticated access errors

Plan and subscription views typically require an authenticated user. Wrap the button with <SignedIn> for consistency with CheckoutBtn.vue.

Apply:

 <template>
   <main>
-    <PlanDetailsButton planId="cplan_2wMjqdlza0hTJc4HLCoBwAiExhF"> Plan details </PlanDetailsButton>
+    <SignedIn>
+      <PlanDetailsButton planId="cplan_2wMjqdlza0hTJc4HLCoBwAiExhF">Plan details</PlanDetailsButton>
+    </SignedIn>
   </main>
 </template>

 <script setup lang="ts">
-import { PlanDetailsButton } from '@clerk/vue/experimental';
+import { SignedIn } from '@clerk/vue';
+import { PlanDetailsButton } from '@clerk/vue/experimental';
 </script>

3-3: Trim incidental whitespace in button label

Minor readability tweak.

-    <PlanDetailsButton planId="cplan_2wMjqdlza0hTJc4HLCoBwAiExhF"> Plan details </PlanDetailsButton>
+    <PlanDetailsButton planId="cplan_2wMjqdlza0hTJc4HLCoBwAiExhF">Plan details</PlanDetailsButton>
integration/templates/vue-vite/src/router.ts (1)

50-65: Protect billing routes with auth metadata

These routes surface user/account-specific actions. Add meta: { requiresAuth: true } so the existing guard can enforce sign-in (or update the guard to respect meta).

   {
     name: 'CheckoutBtn',
     path: '/billing/checkout-btn',
-    component: () => import('./views/billing/CheckoutBtn.vue'),
+    component: () => import('./views/billing/CheckoutBtn.vue'),
+    meta: { requiresAuth: true },
   },
   {
     name: 'PlanDetailsBtn',
     path: '/billing/plan-details-btn',
-    component: () => import('./views/billing/PlanDetailsBtn.vue'),
+    component: () => import('./views/billing/PlanDetailsBtn.vue'),
+    meta: { requiresAuth: true },
   },
   {
     name: 'SubscriptionDetailsBtn',
     path: '/billing/subscription-details-btn',
-    component: () => import('./views/billing/SubscriptionDetailsBtn.vue'),
+    component: () => import('./views/billing/SubscriptionDetailsBtn.vue'),
+    meta: { requiresAuth: true },
   },

To hook the guard (outside this hunk), either:

  • Add these route names to authenticatedPages, or
  • Prefer meta-based check:
// replace the second branch
} else if (!isSignedIn.value && to.meta?.requiresAuth) {
  next('/sign-in');
integration/templates/vue-vite/src/views/billing/SubscriptionDetailsBtn.vue (1)

1-9: Add SignedIn wrapper for consistency and safety

Subscription details typically require an authenticated session. Match CheckoutBtn.vue’s pattern.

 <template>
   <main>
-    <SubscriptionDetailsButton> Subscription details </SubscriptionDetailsButton>
+    <SignedIn>
+      <SubscriptionDetailsButton>Subscription details</SubscriptionDetailsButton>
+    </SignedIn>
   </main>
 </template>

 <script setup lang="ts">
-import { SubscriptionDetailsButton } from '@clerk/vue/experimental';
+import { SignedIn } from '@clerk/vue';
+import { SubscriptionDetailsButton } from '@clerk/vue/experimental';
 </script>
packages/vue/src/components/CheckoutButton.vue (2)

29-42: Click handler: type and error resilience.

Consider explicit return type and minimal guard around the internal call to aid DX and logging.

-function clickHandler() {
+function clickHandler(): void | Promise<unknown> {
   if (!clerk.value) {
     return;
   }
-
-  return clerk.value.__internal_openCheckout({
+  try {
+    return clerk.value.__internal_openCheckout({
       planId: props.planId,
       planPeriod: props.planPeriod,
       for: props.for,
       onSubscriptionComplete: props.onSubscriptionComplete,
       newSubscriptionRedirectUrl: props.newSubscriptionRedirectUrl,
       ...props.checkoutProps,
-  });
+    });
+  } catch (e) {
+    // Optional: surface a concise, actionable log for developers
+    console.error('CheckoutButton: failed to open checkout', e);
+  }
 }

46-52: Accessibility default when no child is passed.

With the proposed native button fallback, ensure type="button" to avoid form submission by default.

-  <component
-    :is="getChildComponent()"
+  <component
+    :is="getChildComponent()"
+    type="button"
packages/vue/src/components/SubscriptionDetailsButton.vue (2)

29-39: Type the handler and add minimal error logging.

Align with CheckoutButton for consistency and DX.

-function clickHandler() {
+function clickHandler(): void | Promise<unknown> {
   if (!clerk.value) {
     return;
   }
-
-  return clerk.value.__internal_openSubscriptionDetails({
-    for: props.for,
-    onSubscriptionCancel: props.onSubscriptionCancel,
-    ...props.subscriptionDetailsProps,
-  });
+  try {
+    return clerk.value.__internal_openSubscriptionDetails({
+      for: props.for,
+      onSubscriptionCancel: props.onSubscriptionCancel,
+      ...props.subscriptionDetailsProps,
+    });
+  } catch (e) {
+    console.error('SubscriptionDetailsButton: failed to open subscription details', e);
+  }
 }

42-50: Accessibility nit: default button type.

Ensure type="button" on the fallback to prevent accidental form submits.

-  <component
-    :is="getChildComponent()"
+  <component
+    :is="getChildComponent()"
+    type="button"
packages/vue/src/experimental.ts (1)

1-21: Reduce repeated JSDoc noise.

You can keep a single top-level experimental notice to cut repetition while preserving clarity.

-/**
- * @experimental
- * These components and their prop types are unstable and may change in future releases.
- * They are part of Clerk's Billing feature which is available under public beta.
- */
 export { default as SubscriptionDetailsButton } from './components/SubscriptionDetailsButton.vue';
 
-/**
- * @experimental
- * These components and their prop types are unstable and may change in future releases.
- * They are part of Clerk's Billing feature which is available under public beta.
- */
 export { default as CheckoutButton } from './components/CheckoutButton.vue';
 
-/**
- * @experimental
- * These components and their prop types are unstable and may change in future releases.
- * They are part of Clerk's Billing feature which is available under public beta.
- */
 export { default as PlanDetailsButton } from './components/PlanDetailsButton.vue';
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a50cfc8 and 64ef49a.

📒 Files selected for processing (13)
  • .changeset/cold-parks-push.md (1 hunks)
  • integration/templates/vue-vite/src/router.ts (1 hunks)
  • integration/templates/vue-vite/src/views/billing/CheckoutBtn.vue (1 hunks)
  • integration/templates/vue-vite/src/views/billing/PlanDetailsBtn.vue (1 hunks)
  • integration/templates/vue-vite/src/views/billing/SubscriptionDetailsBtn.vue (1 hunks)
  • integration/tests/pricing-table.test.ts (4 hunks)
  • packages/vue/package.json (1 hunks)
  • packages/vue/src/components/CheckoutButton.vue (1 hunks)
  • packages/vue/src/components/PlanDetailsButton.vue (1 hunks)
  • packages/vue/src/components/SubscriptionDetailsButton.vue (1 hunks)
  • packages/vue/src/experimental.ts (1 hunks)
  • packages/vue/src/utils/childrenUtils.ts (1 hunks)
  • packages/vue/tsup.config.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (12)
.changeset/**

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

Automated releases must use Changesets.

Files:

  • .changeset/cold-parks-push.md
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

**/*.{js,jsx,ts,tsx}: All code must pass ESLint checks with the project's configuration
Follow established naming conventions (PascalCase for components, camelCase for variables)
Maintain comprehensive JSDoc comments for public APIs
Use dynamic imports for optional features
All public APIs must be documented with JSDoc
Provide meaningful error messages to developers
Include error recovery suggestions where applicable
Log errors appropriately for debugging
Lazy load components and features when possible
Implement proper caching strategies
Use efficient data structures and algorithms
Profile and optimize critical paths
Validate all inputs and sanitize outputs
Implement proper logging with different levels

Files:

  • integration/tests/pricing-table.test.ts
  • packages/vue/src/experimental.ts
  • packages/vue/tsup.config.ts
  • integration/templates/vue-vite/src/router.ts
  • packages/vue/src/utils/childrenUtils.ts
**/*.{js,jsx,ts,tsx,json,css,scss,md,yaml,yml}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use Prettier for consistent code formatting

Files:

  • integration/tests/pricing-table.test.ts
  • packages/vue/src/experimental.ts
  • packages/vue/package.json
  • packages/vue/tsup.config.ts
  • integration/templates/vue-vite/src/router.ts
  • packages/vue/src/utils/childrenUtils.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use proper TypeScript error types

**/*.{ts,tsx}: Always define explicit return types for functions, especially public APIs
Use proper type annotations for variables and parameters where inference isn't clear
Avoid any type - prefer unknown when type is uncertain, then narrow with type guards
Use interface for object shapes that might be extended
Use type for unions, primitives, and computed types
Prefer readonly properties for immutable data structures
Use private for internal implementation details
Use protected for inheritance hierarchies
Use public explicitly for clarity in public APIs
Prefer readonly for properties that shouldn't change after construction
Prefer composition and interfaces over deep inheritance chains
Use mixins for shared behavior across unrelated classes
Implement dependency injection for loose coupling
Let TypeScript infer when types are obvious
Use const assertions for literal types: as const
Use satisfies operator for type checking without widening
Use mapped types for transforming object types
Use conditional types for type-level logic
Leverage template literal types for string manipulation
Use ES6 imports/exports consistently
Use default exports sparingly, prefer named exports
Use type-only imports: import type { ... } from ...
No any types without justification
Proper error handling with typed errors
Consistent use of readonly for immutable data
Proper generic constraints
No unused type parameters
Proper use of utility types instead of manual type construction
Type-only imports where possible
Proper tree-shaking friendly exports
No circular dependencies
Efficient type computations (avoid deep recursion)

Files:

  • integration/tests/pricing-table.test.ts
  • packages/vue/src/experimental.ts
  • packages/vue/tsup.config.ts
  • integration/templates/vue-vite/src/router.ts
  • packages/vue/src/utils/childrenUtils.ts
integration/**

📄 CodeRabbit inference engine (.cursor/rules/global.mdc)

Framework integration templates and E2E tests should be placed under the integration/ directory

Files:

  • integration/tests/pricing-table.test.ts
  • integration/templates/vue-vite/src/views/billing/CheckoutBtn.vue
  • integration/templates/vue-vite/src/views/billing/SubscriptionDetailsBtn.vue
  • integration/templates/vue-vite/src/router.ts
  • integration/templates/vue-vite/src/views/billing/PlanDetailsBtn.vue
integration/**/*

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

End-to-end tests and integration templates must be located in the 'integration/' directory.

Files:

  • integration/tests/pricing-table.test.ts
  • integration/templates/vue-vite/src/views/billing/CheckoutBtn.vue
  • integration/templates/vue-vite/src/views/billing/SubscriptionDetailsBtn.vue
  • integration/templates/vue-vite/src/router.ts
  • integration/templates/vue-vite/src/views/billing/PlanDetailsBtn.vue
integration/**/*.{test,spec}.{js,ts}

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

Integration tests should use Playwright.

Files:

  • integration/tests/pricing-table.test.ts
**/*.{js,ts,tsx,jsx}

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

Support multiple Clerk environment variables (CLERK_, NEXT_PUBLIC_CLERK_, etc.) for configuration.

Files:

  • integration/tests/pricing-table.test.ts
  • packages/vue/src/experimental.ts
  • packages/vue/tsup.config.ts
  • integration/templates/vue-vite/src/router.ts
  • packages/vue/src/utils/childrenUtils.ts
packages/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

TypeScript is required for all packages

Files:

  • packages/vue/src/experimental.ts
  • packages/vue/tsup.config.ts
  • packages/vue/src/utils/childrenUtils.ts
packages/**/*.{ts,tsx,d.ts}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Packages should export TypeScript types alongside runtime code

Files:

  • packages/vue/src/experimental.ts
  • packages/vue/tsup.config.ts
  • packages/vue/src/utils/childrenUtils.ts
packages/*/package.json

📄 CodeRabbit inference engine (.cursor/rules/global.mdc)

All publishable packages should be placed under the packages/ directory

packages/*/package.json: All publishable packages must be located in the 'packages/' directory.
All packages must be published under the @clerk namespace on npm.
Semantic versioning must be used across all packages.

Files:

  • packages/vue/package.json
packages/*/tsup.config.{js,ts}

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

TypeScript compilation and bundling must use tsup.

Files:

  • packages/vue/tsup.config.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (22)
  • GitHub Check: Integration Tests (machine, chrome)
  • GitHub Check: Integration Tests (nextjs, chrome, 15)
  • GitHub Check: Integration Tests (billing, chrome)
  • GitHub Check: Integration Tests (nextjs, chrome, 14)
  • GitHub Check: Integration Tests (sessions, chrome)
  • GitHub Check: Integration Tests (nuxt, chrome)
  • GitHub Check: Integration Tests (expo-web, chrome)
  • GitHub Check: Integration Tests (elements, chrome)
  • GitHub Check: Integration Tests (astro, chrome)
  • GitHub Check: Integration Tests (vue, chrome)
  • GitHub Check: Integration Tests (quickstart, chrome)
  • GitHub Check: Integration Tests (express, chrome)
  • GitHub Check: Integration Tests (ap-flows, chrome)
  • GitHub Check: Publish with pkg-pr-new
  • GitHub Check: Unit Tests (18, --filter=@clerk/astro --filter=@clerk/backend --filter=@clerk/express --filter=@c...
  • GitHub Check: Unit Tests (22, **)
  • GitHub Check: Static analysis
  • GitHub Check: Formatting | Dedupe | Changeset
  • GitHub Check: semgrep/ci
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (8)
packages/vue/tsup.config.ts (2)

20-20: LGTM on esbuild Vue plugin usage


12-12: Build and verify experimental types output
Tsup config for packages/vue disables dts, so after running the package build, confirm that dist/experimental.d.ts is generated and aligns with the "types": "./dist/experimental.d.ts" export in package.json.

packages/vue/src/utils/childrenUtils.ts (1)

6-13: LGTM: extended ButtonName union covers new experimental buttons

packages/vue/package.json (1)

33-36: New ./experimental export — verify build outputs and release semantics

  • Ensure tsup includes ./src/experimental.ts so dist/experimental.js is emitted, and vue-tsc generates dist/experimental.d.ts.
  • Since this widens the public surface, release as a minor and include docs/JSDoc for the new public APIs per guidelines.
  • Run pnpm lint:attw/publint to validate the subpath export.

If helpful, I can add the tsup entry and a changeset bump.

integration/templates/vue-vite/src/views/billing/CheckoutBtn.vue (1)

3-11: LGTM — proper SignedIn gating and clear props

The example is safe and aligned with the new experimental API.

packages/vue/src/components/CheckoutButton.vue (1)

15-23: SSR/hydration caveat: throwing in setup().

Throwing synchronously in setup can break SSR/hydration if auth state is not ready immediately. Consider guarding with a mounted check or a ready flag from useAuth.

Would you like a patch that converts these throws to runtime guards with warnings until auth/org context is ready, then throws only when definitively missing?

packages/vue/src/components/SubscriptionDetailsButton.vue (1)

15-23: SSR readiness check before throwing.

Throwing in setup may break SSR/hydration while auth/org is still resolving.

I can provide a guarded variant (mounted + reactive checks) mirroring Clerk React’s runtime preconditions. Want a patch?

packages/vue/src/experimental.ts (1)

1-41: Exports look correct and tree-shake friendly.

Named exports for components and export type re-exports align with our bundling and typings strategy. No issues.

Copy link
Member

@wobsoriano wobsoriano left a comment

Choose a reason for hiding this comment

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

Looks great here!

@panteliselef panteliselef merged commit ea65f20 into main Sep 2, 2025
63 of 64 checks passed
@panteliselef panteliselef deleted the elef/com-1112-vue-only branch September 2, 2025 17:10
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