Skip to content

Conversation

@panteliselef
Copy link
Contributor

@panteliselef panteliselef commented Aug 20, 2025

Description

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

    • Billing (Beta): checkout.finalize now accepts an optional navigate callback for post-checkout navigation, enabling programmatic routing instead of URL redirects. If not provided, no automatic navigation occurs.
    • Related hooks and public types updated to expose the new navigate option.
  • Chores

    • Minor version bumps for @clerk/clerk-js, @clerk/shared, and @clerk/types.

@changeset-bot
Copy link

changeset-bot bot commented Aug 20, 2025

🦋 Changeset detected

Latest commit: b5757de

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

This PR includes changesets to release 22 packages
Name Type
@clerk/clerk-js Minor
@clerk/shared Minor
@clerk/types Minor
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch
@clerk/agent-toolkit Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/elements Patch
@clerk/expo-passkeys Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/clerk-react Patch
@clerk/remix Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/vue Patch
@clerk/localizations Patch
@clerk/themes 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 Aug 20, 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 Aug 20, 2025 4:27pm

@panteliselef panteliselef changed the title chore(clerk-js,types): Replace redirectUrl with navigate in checkout.finalize() [WIP] chore(clerk-js,types): Replace redirectUrl with navigate in checkout.finalize() Aug 20, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Aug 20, 2025

Open in StackBlitz

@clerk/agent-toolkit

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

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/elements

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

@clerk/clerk-expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/clerk-react

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

@clerk/react-router

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

@clerk/remix

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/themes

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

@clerk/types

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

@clerk/upgrade

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

@clerk/vue

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

commit: b5757de

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 20, 2025

📝 Walkthrough

Walkthrough

The Billing Beta checkout finalization API was changed from a redirectUrl-based parameter to a programmatic navigate callback. The __experimental_CheckoutInstance.finalize signature now accepts params?: { navigate?: SetActiveNavigate } instead of { redirectUrl: string }. Implementation and hook/type definitions were updated to pass and expose the new navigate callback (SetActiveNavigate) across packages (clerk-js, shared, types). Tests and imports were adjusted accordingly. A changeset records minor package version bumps for @clerk/clerk-js, @clerk/shared, and @clerk/types.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Heterogeneous change affecting public API types and runtime pass-through across multiple packages
  • Requires verifying type updates, imports, and one implementation change plus corresponding tests
  • Low logic density but cross-package public API impact warrants moderate review time

🪧 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 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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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

Caution

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

⚠️ Outside diff range comments (1)
packages/shared/src/react/hooks/useCheckout.ts (1)

55-66: Finalize return type should be Promise (align with __experimental_CheckoutInstance).

Typing finalize as returning void prevents consumers from awaiting it, while the implementation returns a Promise. Align with the public type to avoid breaking DX.

-      finalize: (params?: { navigate?: SetActiveNavigate }) => void;
+      finalize: __experimental_CheckoutInstance['finalize'];

If you apply this change, the SetActiveNavigate import will no longer be needed in this file.

🧹 Nitpick comments (5)
.changeset/tall-dryers-hide.md (1)

7-7: Add a brief migration note with example.

Clarify the API change with a short “Before/After” so consumers can migrate quickly.

 [Billing Beta] Replace `redirectUrl` with `navigate` in `checkout.finalize()`
+
+Migration (Beta):
+- Before:
+  ```ts
+  await checkout.finalize({ redirectUrl: '/dashboard' });
+  ```
+- After:
+  ```ts
+  await checkout.finalize({
+    navigate: async ({ session }) => {
+      // Optional: use session to decide where to go
+      await router.push('/dashboard');
+    },
+  });
+  ```
packages/clerk-js/src/core/modules/checkout/instance.ts (1)

66-69: Annotate finalize with the public interface type for consistency and explicit return type.

Matches the style used for start/confirm and satisfies our guideline for explicit return types on public APIs.

-  const finalize = (params?: { navigate?: SetActiveNavigate }) => {
-    const { navigate } = params || {};
-    return clerk.setActive({ session: clerk.session?.id, navigate });
-  };
+  const finalize: __experimental_CheckoutInstance['finalize'] = params => {
+    const { navigate } = params || {};
+    return clerk.setActive({ session: clerk.session?.id, navigate });
+  };
packages/shared/src/react/hooks/useCheckout.ts (1)

1-6: Remove unused SetActiveNavigate import if you adopt the finalize type alias.

After switching finalize’s type to __experimental_CheckoutInstance['finalize'], SetActiveNavigate is unused in this module.

 import type {
   __experimental_CheckoutCacheState,
   __experimental_CheckoutInstance,
   CommerceCheckoutResource,
-  SetActiveNavigate,
 } from '@clerk/types';
packages/types/src/clerk.ts (2)

91-98: Document navigate on finalize for the experimental API.

Add concise JSDoc to set expectations (no navigation by default) and show the intended usage.

 export type __experimental_CheckoutInstance = {
   confirm: (params: ConfirmCheckoutParams) => Promise<CheckoutResult>;
   start: () => Promise<CheckoutResult>;
   clear: () => void;
+  /**
+   * Finalizes checkout by setting the active session.
+   * If `navigate` is provided, it will be invoked just before switching the active session
+   * to let the host app perform navigation. If omitted, no navigation is performed by default.
+   */
   finalize: (params?: { navigate?: SetActiveNavigate }) => Promise<void>;
   subscribe: (listener: (state: __experimental_CheckoutCacheState) => void) => () => void;
   getState: () => __experimental_CheckoutCacheState;
 };

120-125: Add a brief description for SetActiveNavigate.

Clarifies when and how this callback is used.

 export type BeforeEmitCallback = (session?: SignedInSessionResource | null) => void | Promise<any>;
-export type SetActiveNavigate = ({ session }: { session: SessionResource }) => Promise<unknown>;
+/**
+ * Function invoked right before Clerk switches the active session.
+ * Use it to commit app navigation based on the (soon-to-be) active session.
+ */
+export type SetActiveNavigate = ({ session }: { session: SessionResource }) => Promise<unknown>;
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled
  • 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 edd0f21 and 1ee4af0.

📒 Files selected for processing (4)
  • .changeset/tall-dryers-hide.md (1 hunks)
  • packages/clerk-js/src/core/modules/checkout/instance.ts (2 hunks)
  • packages/shared/src/react/hooks/useCheckout.ts (2 hunks)
  • packages/types/src/clerk.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (8)
**/*.{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:

  • packages/types/src/clerk.ts
  • packages/clerk-js/src/core/modules/checkout/instance.ts
  • packages/shared/src/react/hooks/useCheckout.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:

  • packages/types/src/clerk.ts
  • packages/clerk-js/src/core/modules/checkout/instance.ts
  • packages/shared/src/react/hooks/useCheckout.ts
packages/**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/development.mdc)

TypeScript is required for all packages

Files:

  • packages/types/src/clerk.ts
  • packages/clerk-js/src/core/modules/checkout/instance.ts
  • packages/shared/src/react/hooks/useCheckout.ts
packages/**/*.{ts,tsx,d.ts}

📄 CodeRabbit Inference Engine (.cursor/rules/development.mdc)

Packages should export TypeScript types alongside runtime code

Files:

  • packages/types/src/clerk.ts
  • packages/clerk-js/src/core/modules/checkout/instance.ts
  • packages/shared/src/react/hooks/useCheckout.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:

  • packages/types/src/clerk.ts
  • packages/clerk-js/src/core/modules/checkout/instance.ts
  • packages/shared/src/react/hooks/useCheckout.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:

  • packages/types/src/clerk.ts
  • packages/clerk-js/src/core/modules/checkout/instance.ts
  • packages/shared/src/react/hooks/useCheckout.ts
**/*

⚙️ CodeRabbit Configuration File

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

Files:

  • packages/types/src/clerk.ts
  • packages/clerk-js/src/core/modules/checkout/instance.ts
  • packages/shared/src/react/hooks/useCheckout.ts
.changeset/**

📄 CodeRabbit Inference Engine (.cursor/rules/monorepo.mdc)

Automated releases must use Changesets.

Files:

  • .changeset/tall-dryers-hide.md
🧬 Code Graph Analysis (2)
packages/clerk-js/src/core/modules/checkout/instance.ts (1)
packages/types/src/clerk.ts (1)
  • SetActiveNavigate (123-123)
packages/shared/src/react/hooks/useCheckout.ts (1)
packages/types/src/clerk.ts (1)
  • SetActiveNavigate (123-123)
⏰ 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). (5)
  • GitHub Check: Integration Tests (nextjs, chrome, 14)
  • GitHub Check: Integration Tests (billing, chrome)
  • GitHub Check: Integration Tests (nextjs, chrome, 15)
  • GitHub Check: Integration Tests (react-router, chrome)
  • GitHub Check: Integration Tests (generic, chrome)
🔇 Additional comments (3)
packages/clerk-js/src/core/modules/checkout/instance.ts (1)

66-69: LGTM: redirectUrl → navigate behavior is correctly wired to setActive.

The optional navigate callback is passed through to setActive and defaults to no navigation when omitted.

packages/shared/src/react/hooks/useCheckout.ts (2)

127-139: Async finalize is correctly exposed and no lingering sync usages found

The hook now returns manager.finalize (an async function returning a Promise), so consumers can await checkout.finalize(). Verification shows:

• No calls passing a now-removed redirectUrl parameter
• No remaining call sites assuming a synchronous finalize
• Hook return already exposes the async signature via manager.finalize

Looks good to merge.


133-136: Ensure finalize remains passthrough to manager.finalize (awaitable).

Returning the awaitable function preserves sequencing for consumers that depend on it.

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

🧹 Nitpick comments (1)
packages/shared/src/react/hooks/__tests__/useCheckout.type.spec.ts (1)

93-94: Finalize params type assertion is correct; add return-type assertion and a couple of negative cases.

You already assert the parameter shape. Add a return-type check and lightweight negative cases to guard against regressions (legacy redirectUrl and wrong navigate type).

Apply this minimal diff to assert the return type:

-        expectTypeOf<FinalizeMethod>().parameter(0).toEqualTypeOf<{ navigate?: SetActiveNavigate } | undefined>();
+        expectTypeOf<FinalizeMethod>().parameter(0).toEqualTypeOf<{ navigate?: SetActiveNavigate } | undefined>();
+        expectTypeOf<FinalizeMethod>().returns.toBeVoid();

Optionally, add these additional type assertions to make the intent explicit:

// Add near the same "has correct method signatures" test block
type FinalizeParam = Parameters<FinalizeMethod>[0];
// legacy prop should not be accepted
expectTypeOf<FinalizeParam>().not.toEqualTypeOf<{ redirectUrl: string }>();
// wrong type for navigate should not be accepted
expectTypeOf<FinalizeParam>().not.toEqualTypeOf<{ navigate: string }>();
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled
  • 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 1ee4af0 and b5757de.

📒 Files selected for processing (1)
  • packages/shared/src/react/hooks/__tests__/useCheckout.type.spec.ts (3 hunks)
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{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:

  • packages/shared/src/react/hooks/__tests__/useCheckout.type.spec.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:

  • packages/shared/src/react/hooks/__tests__/useCheckout.type.spec.ts
packages/**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/development.mdc)

TypeScript is required for all packages

Files:

  • packages/shared/src/react/hooks/__tests__/useCheckout.type.spec.ts
packages/**/*.{ts,tsx,d.ts}

📄 CodeRabbit Inference Engine (.cursor/rules/development.mdc)

Packages should export TypeScript types alongside runtime code

Files:

  • packages/shared/src/react/hooks/__tests__/useCheckout.type.spec.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:

  • packages/shared/src/react/hooks/__tests__/useCheckout.type.spec.ts
packages/**/*.{test,spec}.{js,jsx,ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/monorepo.mdc)

Unit tests should use Jest or Vitest as the test runner.

Files:

  • packages/shared/src/react/hooks/__tests__/useCheckout.type.spec.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:

  • packages/shared/src/react/hooks/__tests__/useCheckout.type.spec.ts
**/__tests__/**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/typescript.mdc)

**/__tests__/**/*.{ts,tsx}: Create type-safe test builders/factories
Use branded types for test isolation
Implement proper mock types that match interfaces

Files:

  • packages/shared/src/react/hooks/__tests__/useCheckout.type.spec.ts
**/*

⚙️ CodeRabbit Configuration File

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

Files:

  • packages/shared/src/react/hooks/__tests__/useCheckout.type.spec.ts
🧬 Code Graph Analysis (1)
packages/shared/src/react/hooks/__tests__/useCheckout.type.spec.ts (1)
packages/types/src/clerk.ts (1)
  • SetActiveNavigate (123-123)
⏰ 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). (6)
  • GitHub Check: Formatting | Dedupe | Changeset
  • GitHub Check: Build Packages
  • GitHub Check: semgrep/ci
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (2)
packages/shared/src/react/hooks/__tests__/useCheckout.type.spec.ts (2)

8-9: Type-only import of SetActiveNavigate is correct and aligns with the new public API.

Importing as a type keeps bundles clean and matches the updated type in @clerk/types.


249-251: No lingering redirectUrl in finalize API
The expectTypeOf<CheckoutObject['finalize']>() assertion correctly reflects the new signature (params?: { navigate?: SetActiveNavigate }) => void. A grep over the codebase confirms no remaining redirectUrl references in calls, types/interfaces, or docs for finalize.

@panteliselef panteliselef changed the title [WIP] chore(clerk-js,types): Replace redirectUrl with navigate in checkout.finalize() chore(clerk-js,types): Replace redirectUrl with navigate in checkout.finalize() Aug 20, 2025
@panteliselef panteliselef requested a review from a team August 20, 2025 16:46
@panteliselef panteliselef merged commit 172e054 into main Aug 21, 2025
64 of 66 checks passed
@panteliselef panteliselef deleted the elef/bill-1183-ga-add-navigate-to-finalize-from-usecheckout branch August 21, 2025 10:38
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.

4 participants