-
Notifications
You must be signed in to change notification settings - Fork 382
chore(clerk-js,types): Replace commerce with billing in resources #6757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
panteliselef
merged 7 commits into
main
from
elef/bill-1249-rename-types-for-commerce-to-billing
Sep 18, 2025
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
dd915af
chore(clerk-js,types): Replace commerce with billing in resources
panteliselef a0a88ad
fix tests
panteliselef 2dcdae6
patch test
panteliselef 999155f
update typedocs
panteliselef 08afc8b
Merge branch 'main' into elef/bill-1249-rename-types-for-commerce-to-β¦
alexisintech f3a3a67
add missing field
panteliselef f4bdbed
Merge branch 'main' into elef/bill-1249-rename-types-for-commerce-to-β¦
panteliselef File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
'@clerk/clerk-js': minor | ||
'@clerk/types': minor | ||
'@clerk/backend': patch | ||
'@clerk/shared': patch | ||
'@clerk/clerk-react': patch | ||
--- | ||
|
||
[Billing Beta] Rename types, interfaces and classes that contain `commerce` to use `billing` instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π οΈ Refactor suggestion
Semver levels likely incorrect for public API/type renames β should be major.
Renaming exported types/classes from Commerce* β Billing* is a breaking change for consumers. Unless you ship full backwards-compatible aliases for all renamed public exports (and keep them in the public surface), bump these packages to major to avoid releasing a breaking change under minor/patch.
Apply this diff if there are breaking changes:
If you do have deprecation aliases covering all renamed exports, keep minor but explicitly state that in the description (see next comment).
π Committable suggestion
π€ Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These types are internal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π§© Analysis chain
I need to verify whether these Commerce* β Billing* types are truly internal or part of the public API surface.
π Script executed:
Length of output: 4768
π Script executed:
Length of output: 995
π Script executed:
Length of output: 2013
π Script executed:
Length of output: 2699
@wobsoriano, I understand your point, but I need to respectfully disagree based on the evidence from the codebase.
The evidence shows these types are part of the public API:
@clerk/types
viaexport * from './commerce'
in the main index fileBillingNamespace
is exposed asbilling: BillingNamespace
in the coreClerk
interface inpackages/types/src/clerk.ts
@clerk/clerk-js
,@clerk/shared
, and@clerk/react
packagesclerk.billing.*
methods return these resources, making them part of the public surfaceThe AI summary confirms multiple "Alterations to the declarations of exported or public entities" including:
CommerceBillingNamespace
βBillingNamespace
CommerceCheckoutResource
βBillingCheckoutResource
CommercePlanResource
βBillingPlanResource
If these were truly internal, they wouldn't be:
clerk.billing.*
methodsThis is a breaking change requiring major version bumps for the affected packages, unless you add backwards-compatible aliases for all the renamed exports.
π°π
βοΈ Learnings added