Skip to content

Conversation

panteliselef
Copy link
Member

@panteliselef panteliselef commented Oct 17, 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

  • Chores
    • Removed paymentMethodId field from billing subscription items as part of Billing Beta updates. Type definitions and test fixtures updated accordingly.

@panteliselef panteliselef requested review from a team, mzhong9723 and paddycarver October 17, 2025 11:39
@panteliselef panteliselef self-assigned this Oct 17, 2025
Copy link

changeset-bot bot commented Oct 17, 2025

🦋 Changeset detected

Latest commit: ace9b39

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/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/localizations Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/clerk-react Patch
@clerk/remix Patch
@clerk/shared Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/themes Patch
@clerk/vue 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

Copy link

vercel bot commented Oct 17, 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 Oct 17, 2025 11:39am

Copy link
Contributor

coderabbitai bot commented Oct 17, 2025

Walkthrough

Removes the paymentMethodId field from billing subscription types and implementation across @clerk/clerk-js and @clerk/types packages. Updates test fixtures to match the field removal. Includes changelog entry documenting the changes.

Changes

Cohort / File(s) Summary
Type Definitions
packages/types/src/billing.ts, packages/types/src/json.ts
Removed paymentMethodId (TypeScript) and payment_method_id (JSON) fields from BillingSubscriptionItemResource and BillingSubscriptionItemJSON interfaces respectively.
Implementation
packages/clerk-js/src/core/resources/BillingSubscription.ts
Removed public paymentMethodId property from BillingSubscriptionItem class and eliminated assignment from fromJSON deserialization path.
Test Fixtures
packages/clerk-js/src/ui/components/PricingTable/__tests__/PricingTable.test.tsx, packages/clerk-js/src/ui/components/PricingTable/utils/pricing-footer-state.spec.ts, packages/clerk-js/src/ui/components/SubscriptionDetails/__tests__/SubscriptionDetails.test.tsx, packages/clerk-js/src/ui/components/Subscriptions/__tests__/SubscriptionsList.test.tsx
Removed paymentMethodId property from subscriptionItems mock fixtures across multiple test cases.
Changelog
.changeset/good-buckets-cry.md
Added changelog entry documenting minor version bumps for @clerk/clerk-js and @clerk/types with billing beta note on paymentMethodId removal.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

The changes are homogeneous and mechanical—consistent field removal across type definitions, implementation, and test fixtures with no complex logic alterations.

Poem

🐰 A payment method fades away,
The billing subscription's simpler today,
With paymentMethodId removed with grace,
Our types find a cleaner space! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "chore(clerk-js,types): Remove paymentMethodId from subscription item" directly and accurately reflects the primary change across the entire changeset. The raw summary consistently documents that the paymentMethodId property is being removed from BillingSubscriptionItem classes, type definitions, and related test fixtures across both the clerk-js and types packages. The title uses the conventional commit format appropriately, specifies the affected packages, and clearly conveys the main objective without vague language or unnecessary noise. A teammate scanning the pull request history would immediately understand that this change removes a payment method identifier field from subscription items.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch elef/bill-1354-remove-subscriptionitempaymentmethodid-from-clerk-js

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • 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 f4a444c and ace9b39.

📒 Files selected for processing (8)
  • .changeset/good-buckets-cry.md (1 hunks)
  • packages/clerk-js/src/core/resources/BillingSubscription.ts (0 hunks)
  • packages/clerk-js/src/ui/components/PricingTable/__tests__/PricingTable.test.tsx (0 hunks)
  • packages/clerk-js/src/ui/components/PricingTable/utils/pricing-footer-state.spec.ts (0 hunks)
  • packages/clerk-js/src/ui/components/SubscriptionDetails/__tests__/SubscriptionDetails.test.tsx (0 hunks)
  • packages/clerk-js/src/ui/components/Subscriptions/__tests__/SubscriptionsList.test.tsx (0 hunks)
  • packages/types/src/billing.ts (0 hunks)
  • packages/types/src/json.ts (0 hunks)
💤 Files with no reviewable changes (7)
  • packages/clerk-js/src/ui/components/PricingTable/tests/PricingTable.test.tsx
  • packages/types/src/billing.ts
  • packages/clerk-js/src/ui/components/Subscriptions/tests/SubscriptionsList.test.tsx
  • packages/clerk-js/src/ui/components/SubscriptionDetails/tests/SubscriptionDetails.test.tsx
  • packages/types/src/json.ts
  • packages/clerk-js/src/ui/components/PricingTable/utils/pricing-footer-state.spec.ts
  • packages/clerk-js/src/core/resources/BillingSubscription.ts
🧰 Additional context used
📓 Path-based instructions (1)
.changeset/**

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

Automated releases must use Changesets.

Files:

  • .changeset/good-buckets-cry.md
⏰ 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). (4)
  • GitHub Check: Build Packages
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (1)
.changeset/good-buckets-cry.md (1)

1-6: Changeset format and content look correct.

The changeset properly declares version bumps for both affected packages (@clerk/clerk-js and @clerk/types) and clearly documents the removal of paymentMethodId from the subscription item. The minor version bump is appropriate for field removal in a Beta API.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

pkg-pr-new bot commented Oct 17, 2025

Open in StackBlitz

@clerk/agent-toolkit

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

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/elements

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

@clerk/clerk-expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/clerk-react

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

@clerk/react-router

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

@clerk/remix

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/themes

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

@clerk/types

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

@clerk/upgrade

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

@clerk/vue

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

commit: ace9b39

@panteliselef panteliselef merged commit a172d51 into main Oct 17, 2025
42 checks passed
@panteliselef panteliselef deleted the elef/bill-1354-remove-subscriptionitempaymentmethodid-from-clerk-js branch October 17, 2025 12:24
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.

3 participants