Skip to content

Commit 41e0a41

Browse files
chore(repo): Hide @experimental from typedoc rendering (#6651)
Co-authored-by: Alexis Aguilar <[email protected]>
1 parent a8ba926 commit 41e0a41

File tree

28 files changed

+224
-889
lines changed

28 files changed

+224
-889
lines changed

.changeset/quiet-signs-peel.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@clerk/clerk-js': patch
3+
'@clerk/backend': patch
4+
'@clerk/shared': patch
5+
'@clerk/clerk-react': patch
6+
'@clerk/types': patch
7+
'@clerk/clerk-expo': patch
8+
---
9+
10+
Update jsdocs mentions of `@experimental` tag.

.typedoc/custom-plugin.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// @ts-check
1+
// @ts-check - Enable TypeScript checks for safer MDX post-processing and link rewriting
22
import { MarkdownPageEvent } from 'typedoc-plugin-markdown';
33

44
/**

.typedoc/custom-theme.mjs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,19 @@ class ClerkMarkdownThemeContext extends MarkdownThemeContext {
218218
const customizedModel = model;
219219
customizedModel.typeParameters = undefined;
220220

221-
// Extract the Accessors group (if any) and prevent default rendering for it
222221
const originalGroups = customizedModel.groups;
223-
const accessorsGroup = originalGroups?.find(g => g.title === 'Accessors');
224-
const groupsWithoutAccessors = originalGroups?.filter(g => g.title !== 'Accessors');
222+
223+
// When an interface extends another interface, typedoc will generate a "Methods" group
224+
// We want to hide this group from being rendered
225+
const groupsWithoutMethods = originalGroups?.filter(g => g.title !== 'Methods');
226+
227+
// Extract the Accessors group (if any) and prevent default rendering for it
228+
const accessorsGroup = groupsWithoutMethods?.find(g => g.title === 'Accessors');
229+
const groupsWithoutAccessors = groupsWithoutMethods?.filter(g => g.title !== 'Accessors');
225230

226231
customizedModel.groups = groupsWithoutAccessors;
227232
const nonAccessorOutput = superPartials.memberWithGroups(customizedModel, options);
233+
228234
customizedModel.groups = originalGroups;
229235

230236
/** @type {string[]} */

packages/backend/src/api/endpoints/BillingApi.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ type ExtendSubscriptionItemFreeTrialParams = {
3333

3434
export class BillingAPI extends AbstractAPI {
3535
/**
36-
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change.
37-
* It is advised to pin the SDK version to avoid breaking changes.
36+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
3837
*/
3938
public async getPlanList(params?: GetOrganizationListParams) {
4039
return this.request<PaginatedResourceResponse<CommercePlan[]>>({
@@ -45,8 +44,7 @@ export class BillingAPI extends AbstractAPI {
4544
}
4645

4746
/**
48-
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change.
49-
* It is advised to pin the SDK version to avoid breaking changes.
47+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
5048
*/
5149
public async cancelSubscriptionItem(subscriptionItemId: string, params?: CancelSubscriptionItemParams) {
5250
this.requireId(subscriptionItemId);
@@ -58,8 +56,7 @@ export class BillingAPI extends AbstractAPI {
5856
}
5957

6058
/**
61-
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change.
62-
* It is advised to pin the SDK version to avoid breaking changes.
59+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
6360
*/
6461
public async extendSubscriptionItemFreeTrial(
6562
subscriptionItemId: string,
@@ -74,8 +71,7 @@ export class BillingAPI extends AbstractAPI {
7471
}
7572

7673
/**
77-
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change.
78-
* It is advised to pin the SDK version to avoid breaking changes.
74+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
7975
*/
8076
public async getOrganizationBillingSubscription(organizationId: string) {
8177
this.requireId(organizationId);
@@ -86,8 +82,7 @@ export class BillingAPI extends AbstractAPI {
8682
}
8783

8884
/**
89-
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change.
90-
* It is advised to pin the SDK version to avoid breaking changes.
85+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
9186
*/
9287
public async getUserBillingSubscription(userId: string) {
9388
this.requireId(userId);

packages/backend/src/api/factory.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ export function createBackendApiClient(options: CreateBackendApiOptions) {
5454
betaFeatures: new BetaFeaturesAPI(request),
5555
blocklistIdentifiers: new BlocklistIdentifierAPI(request),
5656
/**
57-
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change.
58-
* It is advised to pin the SDK version to avoid breaking changes.
57+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
5958
*/
6059
billing: new BillingAPI(request),
6160
clients: new ClientAPI(request),

packages/backend/src/api/resources/CommercePlan.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { Feature } from './Feature';
44
import type { CommercePlanJSON } from './JSON';
55

66
/**
7-
* The `CommercePlan` object is similar to the [`CommercePlanResource`](/docs/references/javascript/types/commerce-plan-resource) object as it holds information about a plan, as well as methods for managing it. However, the `CommercePlan` object is different in that it is used in the [Backend API](https://clerk.com/docs/reference/backend-api/tag/commerce/get/commerce/plans){{ target: '_blank' }} and is not directly accessible from the Frontend API.
7+
* The `CommercePlan` object is similar to the [`CommercePlanResource`](/docs/references/javascript/types/commerce-plan-resource) object as it holds information about a plan, as well as methods for managing it. However, the `CommercePlan` object is different in that it is used in the [Backend API](https://clerk.com/docs/reference/backend-api/tag/commerce/get/commerce/plans) and is not directly accessible from the Frontend API.
88
*
9-
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to pin the SDK version to avoid breaking changes.
9+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
1010
*/
1111
export class CommercePlan {
1212
constructor(

packages/backend/src/api/resources/CommerceSubscription.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { CommerceSubscriptionItem } from './CommerceSubscriptionItem';
44
import type { CommerceSubscriptionJSON } from './JSON';
55

66
/**
7-
* The `CommerceSubscription` object is similar to the [`CommerceSubscriptionResource`](/docs/references/javascript/types/commerce-subscription-resource) object as it holds information about a subscription, as well as methods for managing it. However, the `CommerceSubscription` object is different in that it is used in the [Backend API](https://clerk.com/docs/reference/backend-api/tag/billing/get/organizations/%7Borganization_id%7D/billing/subscription){{ target: '_blank' }} and is not directly accessible from the Frontend API.
7+
* The `CommerceSubscription` object is similar to the [`CommerceSubscriptionResource`](/docs/references/javascript/types/commerce-subscription-resource) object as it holds information about a subscription, as well as methods for managing it. However, the `CommerceSubscription` object is different in that it is used in the [Backend API](https://clerk.com/docs/reference/backend-api/tag/billing/get/organizations/%7Borganization_id%7D/billing/subscription) and is not directly accessible from the Frontend API.
88
*
9-
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to pin the SDK version to avoid breaking changes.
9+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
1010
*/
1111
export class CommerceSubscription {
1212
constructor(

packages/backend/src/api/resources/CommerceSubscriptionItem.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { CommercePlan } from './CommercePlan';
44
import type { CommerceSubscriptionItemJSON } from './JSON';
55

66
/**
7-
* The `CommerceSubscriptionItem` object is similar to the [`CommerceSubscriptionItemResource`](/docs/references/javascript/types/commerce-subscription-item-resource) object as it holds information about a subscription item, as well as methods for managing it. However, the `CommerceSubscriptionItem` object is different in that it is used in the [Backend API](https://clerk.com/docs/reference/backend-api/tag/commerce/get/commerce/subscription_items){{ target: '_blank' }} and is not directly accessible from the Frontend API.
7+
* The `CommerceSubscriptionItem` object is similar to the [`CommerceSubscriptionItemResource`](/docs/references/javascript/types/commerce-subscription-item-resource) object as it holds information about a subscription item, as well as methods for managing it. However, the `CommerceSubscriptionItem` object is different in that it is used in the [Backend API](https://clerk.com/docs/reference/backend-api/tag/commerce/get/commerce/subscription_items) and is not directly accessible from the Frontend API.
88
*
9-
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to pin the SDK version to avoid breaking changes.
9+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
1010
*/
1111
export class CommerceSubscriptionItem {
1212
constructor(

packages/backend/src/api/resources/Feature.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { FeatureJSON } from './JSON';
33
/**
44
* The `Feature` object represents a feature of a subscription plan.
55
*
6-
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to pin the SDK version to avoid breaking changes.
6+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
77
*/
88
export class Feature {
99
constructor(

packages/backend/src/api/resources/JSON.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -828,8 +828,7 @@ export interface FeatureJSON extends ClerkResourceJSON {
828828
}
829829

830830
/**
831-
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change.
832-
* It is advised to pin the SDK version to avoid breaking changes.
831+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
833832
*/
834833
export interface CommercePlanJSON extends ClerkResourceJSON {
835834
object: typeof ObjectType.CommercePlan;
@@ -860,8 +859,7 @@ type CommerceSubscriptionItemStatus =
860859
| 'upcoming';
861860

862861
/**
863-
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change.
864-
* It is advised to pin the SDK version to avoid breaking changes.
862+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
865863
*/
866864
export interface CommerceSubscriptionItemJSON extends ClerkResourceJSON {
867865
object: typeof ObjectType.CommerceSubscriptionItem;

0 commit comments

Comments
 (0)