Skip to content

fix(vue): deprecate SignOutButton signOutOptions prop#8148

Open
jacekradko wants to merge 1 commit intomainfrom
jacek/deprecate-vue-signout-options
Open

fix(vue): deprecate SignOutButton signOutOptions prop#8148
jacekradko wants to merge 1 commit intomainfrom
jacek/deprecate-vue-signout-options

Conversation

@jacekradko
Copy link
Member

@jacekradko jacekradko commented Mar 21, 2026

Summary

  • Deprecates the signOutOptions prop on Vue's <SignOutButton /> in favor of the existing flat redirectUrl and sessionId props
  • Adds @deprecated JSDoc annotation and runtime deprecation warning via deprecated() helper
  • signOutOptions still works (backwards compatible) but emits a console warning in development

Companion to #8147 (React). Vue already had the flat props — this just adds the deprecation notice.

Test plan

  • Existing tests pass unchanged (52 tests)
  • npx turbo build --filter=@clerk/vue passes
  • npx turbo test --filter=@clerk/vue passes

Summary by CodeRabbit

  • Deprecations
    • Deprecated signOutOptions prop on <SignOutButton />. Use redirectUrl and sessionId props directly instead. The deprecated prop remains functional with a deprecation warning.

@changeset-bot
Copy link

changeset-bot bot commented Mar 21, 2026

🦋 Changeset detected

Latest commit: 043a8f8

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 Patch
@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

@vercel
Copy link

vercel bot commented Mar 21, 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 Mar 21, 2026 3:30am

Request Review

@github-actions github-actions bot added the vue label Mar 21, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 21, 2026

Open in StackBlitz

@clerk/agent-toolkit

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

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@8148

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 043a8f8

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 21, 2026

📝 Walkthrough

Walkthrough

This change adds deprecation handling for the signOutOptions prop on the <SignOutButton /> component in the @clerk/vue package. A changeset entry documents the deprecation as a patch release. The component now imports and invokes deprecation reporting when the signOutOptions prop is provided, with a @deprecated JSDoc annotation added to the prop declaration. The prop remains functional while directing users to use redirectUrl and sessionId as top-level props instead.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: deprecating the signOutOptions prop on the Vue SignOutButton component.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

Tip

CodeRabbit can use your project's `biome` configuration to improve the quality of JS/TS/CSS/JSON code reviews.

Add a configuration file to your project to customize how CodeRabbit runs biome.

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/vue/src/components/SignOutButton.vue`:
- Around line 29-31: Add tests for the new deprecation runtime path in
SignOutButton.vue: write unit tests that mount the SignOutButton component with
props.signOutOptions provided and assert that the deprecated('SignOutButton
`signOutOptions`'...) function is called (or that the expected warning/log is
emitted), and also add a backward-compatibility test that passing signOutOptions
still results in the same redirectUrl/sessionId behavior. Use the existing test
utilities (mount/shallowMount) and spy/mocking for the deprecated helper to
observe calls, and include both the warning emission assertion and a functional
assertion that behavior is unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: b0669ab7-995c-4afe-b981-24a95bf982a3

📥 Commits

Reviewing files that changed from the base of the PR and between 35d45be and 043a8f8.

📒 Files selected for processing (2)
  • .changeset/deprecate-vue-signout-options.md
  • packages/vue/src/components/SignOutButton.vue

Comment on lines +29 to +31
if (props.signOutOptions) {
deprecated('SignOutButton `signOutOptions`', 'Use the `redirectUrl` and `sessionId` props directly instead.');
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add test coverage for the new deprecation runtime path before merge.

This PR adds new behavior (warning emission when signOutOptions is passed), but no tests were added/updated to verify that path and backward compatibility behavior.

As per coding guidelines, "If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/vue/src/components/SignOutButton.vue` around lines 29 - 31, Add
tests for the new deprecation runtime path in SignOutButton.vue: write unit
tests that mount the SignOutButton component with props.signOutOptions provided
and assert that the deprecated('SignOutButton `signOutOptions`'...) function is
called (or that the expected warning/log is emitted), and also add a
backward-compatibility test that passing signOutOptions still results in the
same redirectUrl/sessionId behavior. Use the existing test utilities
(mount/shallowMount) and spy/mocking for the deprecated helper to observe calls,
and include both the warning emission assertion and a functional assertion that
behavior is unchanged.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant