Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/ten-poets-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/nuxt": minor
---

Remove added `nextTick()` calls when invoking Clerk routing functions.
Comment on lines +1 to +5
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

Changeset summary contradicts the revert.

This PR restores the nextTick wrapper, yet the changeset still advertises removing it. Shipping this note would mislead downstream consumers and trigger an incorrect minor release. Please delete this changeset or replace it with one that accurately states the revert (likely a patch note explaining that the previous change was rolled back).

🤖 Prompt for AI Agents
.changeset/ten-poets-agree.md lines 1-5: the changeset message advertises
removing nextTick and marks a minor bump but this PR actually reverts that
change; either delete this changeset or update it to accurately describe the
revert and use a patch release. Replace the body summary to state that the
previous removal of nextTick was reverted (restored behavior), change the
release type from "minor" to "patch" (or remove the file if you prefer no
release note), and ensure the changelog text clearly explains the rollback.

15 changes: 2 additions & 13 deletions packages/nuxt/src/runtime/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import { clerkPlugin } from '@clerk/vue';
import { setErrorThrowerOptions } from '@clerk/vue/internal';
import { defineNuxtPlugin, navigateTo, useRuntimeConfig, useState } from 'nuxt/app';

// @ts-expect-error: Handled by Nuxt.
import { nextTick } from '#imports';

setErrorThrowerOptions({ packageName: PACKAGE_NAME });
setClerkJsLoadingErrorPackageName(PACKAGE_NAME);

Expand All @@ -28,16 +25,8 @@ export default defineNuxtPlugin(nuxtApp => {
version: PACKAGE_VERSION,
environment: process.env.NODE_ENV,
},
routerPush: (to: string) => {
return nextTick(() => {
void navigateTo(to);
});
},
routerReplace: (to: string) => {
return nextTick(() => {
void navigateTo(to, { replace: true });
});
},
routerPush: (to: string) => navigateTo(to),
routerReplace: (to: string) => navigateTo(to, { replace: true }),
initialState: initialState.value,
});
});