fix(vue): deprecate SignOutButton signOutOptions prop#8148
fix(vue): deprecate SignOutButton signOutOptions prop#8148jacekradko wants to merge 1 commit intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 043a8f8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
📝 WalkthroughWalkthroughThis change adds deprecation handling for the 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment 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 |
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
.changeset/deprecate-vue-signout-options.mdpackages/vue/src/components/SignOutButton.vue
| if (props.signOutOptions) { | ||
| deprecated('SignOutButton `signOutOptions`', 'Use the `redirectUrl` and `sessionId` props directly instead.'); | ||
| } |
There was a problem hiding this comment.
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.
Summary
signOutOptionsprop on Vue's<SignOutButton />in favor of the existing flatredirectUrlandsessionIdprops@deprecatedJSDoc annotation and runtime deprecation warning viadeprecated()helpersignOutOptionsstill works (backwards compatible) but emits a console warning in developmentCompanion to #8147 (React). Vue already had the flat props — this just adds the deprecation notice.
Test plan
npx turbo build --filter=@clerk/vuepassesnpx turbo test --filter=@clerk/vuepassesSummary by CodeRabbit
signOutOptionsprop on<SignOutButton />. UseredirectUrlandsessionIdprops directly instead. The deprecated prop remains functional with a deprecation warning.