diff --git a/.changeset/tender-cameras-yawn.md b/.changeset/tender-cameras-yawn.md new file mode 100644 index 00000000000..9b1de659377 --- /dev/null +++ b/.changeset/tender-cameras-yawn.md @@ -0,0 +1,7 @@ +--- +'@clerk/clerk-js': patch +--- + +Apply deprecation warnings for `@clerk/clerk-js`: + +- `Clerk.setSession` diff --git a/packages/clerk-js/src/core/clerk.ts b/packages/clerk-js/src/core/clerk.ts index dc63bebdb43..79cc54dd11f 100644 --- a/packages/clerk-js/src/core/clerk.ts +++ b/packages/clerk-js/src/core/clerk.ts @@ -631,10 +631,14 @@ export default class Clerk implements ClerkInterface { this.#resetComponentsState(); }; + /** + * @deprecated Use `setActive` instead. + */ public setSession = async ( session: ActiveSessionResource | string | null, beforeEmit?: BeforeEmitCallback, ): Promise => { + deprecated('setSession', 'Use `setActive` instead.', 'clerk:setSession'); return this.setActive({ session, beforeEmit }); };