From bbda699bf7ca4eea7b3ff127cb314f3774d8b993 Mon Sep 17 00:00:00 2001 From: Sarah Soutoul Date: Mon, 20 Jul 2026 19:06:40 +0200 Subject: [PATCH 1/5] docs(*): Add trailing comma after e.g. and i.e. in JSDoc (DOCS-11950) Standardize JSDoc punctuation across the Typedoc-source packages (@clerk/backend, @clerk/nextjs, @clerk/react, @clerk/shared) so that e.g. and i.e. are always followed by a comma, matching the clerk-docs style guide and keeping the generated clerk-typedoc output consistent. Comment-only change; no runtime behavior is affected. Co-Authored-By: Claude Opus 4.8 (1M context) --- .changeset/eg-ie-trailing-comma-jsdoc.md | 8 +++++++ .../backend/src/api/endpoints/AgentTaskApi.ts | 2 +- .../api/endpoints/AllowlistIdentifierApi.ts | 2 +- .../src/api/endpoints/BetaFeaturesApi.ts | 4 ++-- .../backend/src/api/endpoints/DomainApi.ts | 2 +- .../backend/src/api/endpoints/EmailApi.ts | 4 ++-- .../backend/src/api/endpoints/InstanceApi.ts | 2 +- .../src/api/endpoints/InvitationApi.ts | 2 +- packages/backend/src/api/endpoints/UserApi.ts | 18 +++++++------- .../src/api/resources/ExternalAccount.ts | 2 +- .../backend/src/api/resources/RedirectUrl.ts | 2 +- packages/backend/src/runtime.ts | 2 +- packages/backend/src/tokens/authStatus.ts | 2 +- packages/backend/src/tokens/handshake.ts | 2 +- packages/backend/src/tokens/machine.ts | 4 ++-- packages/backend/src/tokens/types.ts | 2 +- packages/backend/src/tokens/verify.ts | 2 +- packages/nextjs/src/server/clerkMiddleware.ts | 2 +- packages/shared/src/errors/helpers.ts | 6 ++--- .../src/internal/clerk-js/protectCheck.ts | 2 +- .../internal/clerk-js/thirdPartyDomains.ts | 2 +- .../src/internal/clerk-js/windowNavigate.ts | 4 ++-- packages/shared/src/keys.ts | 4 ++-- packages/shared/src/pathMatcher.ts | 6 ++--- .../src/react/billing/payment-element.tsx | 2 +- packages/shared/src/react/contexts.tsx | 2 +- ...ganizationEnterpriseConnectionTestRuns.tsx | 2 +- .../shared/src/telemetry/events/flow-step.ts | 6 ++--- packages/shared/src/telemetry/notice.ts | 4 ++-- packages/shared/src/telemetry/types.ts | 2 +- packages/shared/src/types/clerk.ts | 24 +++++++++---------- .../shared/src/types/enterpriseConnection.ts | 2 +- packages/shared/src/types/localization.ts | 2 +- packages/shared/src/types/oauthTransport.ts | 4 ++-- packages/shared/src/types/redirects.ts | 2 +- packages/shared/src/types/session.ts | 4 ++-- 36 files changed, 76 insertions(+), 68 deletions(-) create mode 100644 .changeset/eg-ie-trailing-comma-jsdoc.md diff --git a/.changeset/eg-ie-trailing-comma-jsdoc.md b/.changeset/eg-ie-trailing-comma-jsdoc.md new file mode 100644 index 00000000000..6669fd3395a --- /dev/null +++ b/.changeset/eg-ie-trailing-comma-jsdoc.md @@ -0,0 +1,8 @@ +--- +'@clerk/backend': patch +'@clerk/nextjs': patch +'@clerk/react': patch +'@clerk/shared': patch +--- + +Standardize JSDoc punctuation to always follow `e.g.` and `i.e.` with a comma (`e.g.,` / `i.e.,`), matching the docs style guide. Comment-only change; no runtime behavior is affected. This keeps the generated Typedoc reference output consistent. diff --git a/packages/backend/src/api/endpoints/AgentTaskApi.ts b/packages/backend/src/api/endpoints/AgentTaskApi.ts index 2df65bf5b1a..ccdc51ab18e 100644 --- a/packages/backend/src/api/endpoints/AgentTaskApi.ts +++ b/packages/backend/src/api/endpoints/AgentTaskApi.ts @@ -4,7 +4,7 @@ import { AbstractAPI } from './AbstractApi'; /** @generateWithEmptyComment */ export type CreateAgentTaskParams = { - /** The user to create an Agent Task for. Provide either a `userId` or an `identifier` (e.g. an email address, phone number, or username). */ + /** The user to create an Agent Task for. Provide either a `userId` or an `identifier` (e.g., an email address, phone number, or username). */ onBehalfOf: | { /** The identifier of the user to create an Agent Task for. */ diff --git a/packages/backend/src/api/endpoints/AllowlistIdentifierApi.ts b/packages/backend/src/api/endpoints/AllowlistIdentifierApi.ts index a3bca9c28d9..b9477fa2a60 100644 --- a/packages/backend/src/api/endpoints/AllowlistIdentifierApi.ts +++ b/packages/backend/src/api/endpoints/AllowlistIdentifierApi.ts @@ -10,7 +10,7 @@ const basePath = '/allowlist_identifiers'; /** @generateWithEmptyComment */ export type AllowlistIdentifierCreateParams = { - /** The identifier to add to the allowlist. Can be an email address, a domain in wildcard email format (e.g. `*@example.com`), a phone number in international E.164 format (e.g. `+15555555555`), or a Web3 wallet address. */ + /** The identifier to add to the allowlist. Can be an email address, a domain in wildcard email format (e.g., `*@example.com`), a phone number in international E.164 format (e.g., `+15555555555`), or a Web3 wallet address. */ identifier: string; /** Whether to notify the user that their identifier has been added to the allowlist. Notifies the user if the `identifier` is an email address or phone number. */ notify: boolean; diff --git a/packages/backend/src/api/endpoints/BetaFeaturesApi.ts b/packages/backend/src/api/endpoints/BetaFeaturesApi.ts index abee538c33d..e2dbd7a820d 100644 --- a/packages/backend/src/api/endpoints/BetaFeaturesApi.ts +++ b/packages/backend/src/api/endpoints/BetaFeaturesApi.ts @@ -5,7 +5,7 @@ const basePath = '/beta_features'; type ChangeDomainParams = { /** - * The new home URL of the production instance e.g. https://www.example.com + * The new home URL of the production instance e.g., https://www.example.com */ homeUrl?: string; /** @@ -25,7 +25,7 @@ export class BetaFeaturesAPI extends AbstractAPI { * updating your Social Connection's redirect URLs and setting the new keys in your code. * * @remarks - * WARNING: Changing your domain will invalidate all current user sessions (i.e. users will be logged out). + * WARNING: Changing your domain will invalidate all current user sessions (i.e., users will be logged out). * Also, while your application is being deployed, a small downtime is expected to occur. */ public async changeDomain(params: ChangeDomainParams) { diff --git a/packages/backend/src/api/endpoints/DomainApi.ts b/packages/backend/src/api/endpoints/DomainApi.ts index 865b881ba07..4e66223048b 100644 --- a/packages/backend/src/api/endpoints/DomainApi.ts +++ b/packages/backend/src/api/endpoints/DomainApi.ts @@ -9,7 +9,7 @@ const basePath = '/domains'; /** @generateWithEmptyComment */ export type AddDomainParams = { /** - * The new domain name. For development instances, can contain the port, e.g. `myhostname:3000`. For production instances, must be a valid FQDN, e.g. `mysite.com`. Cannot contain protocol scheme. + * The new domain name. For development instances, can contain the port, e.g., `myhostname:3000`. For production instances, must be a valid FQDN, e.g., `mysite.com`. Cannot contain protocol scheme. */ name: string; /** Whether the new domain is a satellite domain. Only `true` is accepted at the moment. */ diff --git a/packages/backend/src/api/endpoints/EmailApi.ts b/packages/backend/src/api/endpoints/EmailApi.ts index 16a7960effb..8f02e5976b4 100644 --- a/packages/backend/src/api/endpoints/EmailApi.ts +++ b/packages/backend/src/api/endpoints/EmailApi.ts @@ -18,7 +18,7 @@ type Mailbox = { name?: string; /** - * The `addr-spec` of the mailbox, i.e. the email address itself. + * The `addr-spec` of the mailbox, i.e., the email address itself. */ address: string; }; @@ -34,7 +34,7 @@ type Mailbox = { type EmailRecipient = | { /** - * The `addr-spec` of the recipient mailbox, i.e. the email address itself. + * The `addr-spec` of the recipient mailbox, i.e., the email address itself. */ address: string; /** diff --git a/packages/backend/src/api/endpoints/InstanceApi.ts b/packages/backend/src/api/endpoints/InstanceApi.ts index d725f98883d..c304ddf0c5c 100644 --- a/packages/backend/src/api/endpoints/InstanceApi.ts +++ b/packages/backend/src/api/endpoints/InstanceApi.ts @@ -22,7 +22,7 @@ export type UpdateParams = { developmentOrigin?: string | null | undefined; /** For browser-like stacks such as browser extensions, Electron, or Capacitor.js, the instance allowed origins need to be updated with the request origin value. For Chrome extensions popup, background, or service worker pages the origin is `chrome-extension://extension_uiid`. For Electron apps the default origin is `http://localhost:3000`. For Capacitor.js, the origin is `capacitor://localhost`. */ allowedOrigins?: Array | undefined; - /** Whether the instance should use URL-based session syncing in development mode (i.e. without third-party cookies). */ + /** Whether the instance should use URL-based session syncing in development mode (i.e., without third-party cookies). */ urlBasedSessionSyncing?: boolean | null | undefined; /** Overrides the sign-in strategy that is preferred when a password is required. The value is only consulted when a password is required, and is dormant otherwise. Pass an empty string to clear the override. Passing `null` or `undefined` leaves the current value unchanged. */ preferredSignInStrategyWhenPasswordRequired?: 'password' | 'otp' | '' | null | undefined; diff --git a/packages/backend/src/api/endpoints/InvitationApi.ts b/packages/backend/src/api/endpoints/InvitationApi.ts index 64f2f6221fc..45b4e2c9976 100644 --- a/packages/backend/src/api/endpoints/InvitationApi.ts +++ b/packages/backend/src/api/endpoints/InvitationApi.ts @@ -121,7 +121,7 @@ export class InvitationAPI extends AbstractAPI { * * Revoking an invitation makes the invitation email link unusable. However, it doesn't prevent the user from signing up if they follow the sign up flow. * - * Only active (i.e. non-revoked) invitations can be revoked. + * Only active (i.e., non-revoked) invitations can be revoked. * @param invitationId - The ID of the invitation to revoke. * @returns The revoked [`Invitation`](https://clerk.com/docs/reference/backend/types/backend-invitation). */ diff --git a/packages/backend/src/api/endpoints/UserApi.ts b/packages/backend/src/api/endpoints/UserApi.ts index d3053261556..e4f9f485678 100644 --- a/packages/backend/src/api/endpoints/UserApi.ts +++ b/packages/backend/src/api/endpoints/UserApi.ts @@ -245,7 +245,7 @@ export type CreateUserParams = { firstName?: string; /** The last name to assign to the user. */ lastName?: string; - /** The locale of the user in BCP-47 format (e.g. `'en-US'`, `'fr-FR'`). */ + /** The locale of the user in BCP-47 format (e.g., `'en-US'`, `'fr-FR'`). */ locale?: string; /** When set to `true`, all password checks are skipped. It is recommended to use this method only when migrating plaintext passwords to Clerk. Upon migration the user base should be prompted to pick stronger password. */ skipPasswordChecks?: boolean; @@ -253,7 +253,7 @@ export type CreateUserParams = { skipPasswordRequirement?: boolean; /** When set to `true`, all legal checks are skipped. It is not recommended to skip legal checks unless you are migrating a user to Clerk. */ skipLegalChecks?: boolean; - /** A custom timestamp denoting when the user accepted legal requirements, specified in RFC3339 format (e.g. `'2012-10-20T07:15:20.902Z'`). */ + /** A custom timestamp denoting when the user accepted legal requirements, specified in RFC3339 format (e.g., `'2012-10-20T07:15:20.902Z'`). */ legalAcceptedAt?: Date; /** * If TOTP is enabled on the instance, you can provide the secret to enable it on the newly created user without the need to reset it. Currently, the supported options are: @@ -266,7 +266,7 @@ export type CreateUserParams = { totpSecret?: string; /** If backup codes are enabled on the instance, you can provide them to enable it on the newly created user without the need to reset them. You must provide the backup codes in plain format or the corresponding bcrypt digest. */ backupCodes?: string[]; - /** A custom timestamp denoting when the user signed up to the application, specified in RFC3339 format (e.g. `'2012-10-20T07:15:20.902Z'`). */ + /** A custom timestamp denoting when the user signed up to the application, specified in RFC3339 format (e.g., `'2012-10-20T07:15:20.902Z'`). */ createdAt?: Date; /** When set to `true`, the user is created already banned and cannot sign in. */ banned?: boolean; @@ -312,13 +312,13 @@ export type UpdateUserParams = { backupCodes?: string[]; /** The ID of the user as used in your external systems or your previous authentication solution. Must be unique across your entire instance. */ externalId?: string; - /** A custom timestamp denoting when the user signed up to the application, specified in RFC3339 format (e.g. `'2012-10-20T07:15:20.902Z'`). */ + /** A custom timestamp denoting when the user signed up to the application, specified in RFC3339 format (e.g., `'2012-10-20T07:15:20.902Z'`). */ createdAt?: Date; /** When set to `true`, all legal checks are skipped. It is not recommended to skip legal checks unless you are migrating a user to Clerk. */ skipLegalChecks?: boolean; - /** A custom timestamp denoting when the user accepted legal requirements, specified in RFC3339 format (e.g. `'2012-10-20T07:15:20.902Z'`). */ + /** A custom timestamp denoting when the user accepted legal requirements, specified in RFC3339 format (e.g., `'2012-10-20T07:15:20.902Z'`). */ legalAcceptedAt?: Date; - /** The locale of the user in BCP-47 format (e.g. `'en-US'`). */ + /** The locale of the user in BCP-47 format (e.g., `'en-US'`). */ locale?: string; /** If `true`, the user can delete themselves with the Frontend API. */ deleteSelfEnabled?: boolean; @@ -620,7 +620,7 @@ export class UserAPI extends AbstractAPI { /** * Gets the corresponding [OAuth access token](!oauth-access-token) for a user that has previously authenticated with the given OAuth provider. * @param userId - The ID of the user to get the OAuth access tokens for. - * @param provider - The OAuth provider to get the access tokens for. If using a custom OAuth provider, prefix the provider name with `custom_` (e.g. `oauth_custom_google`). + * @param provider - The OAuth provider to get the access tokens for. If using a custom OAuth provider, prefix the provider name with `custom_` (e.g., `oauth_custom_google`). * @returns A [`PaginatedResourceResponse`](https://clerk.com/docs/reference/backend/types/paginated-resource-response) object with a `data` property that contains an array of [`OauthAccessToken`](https://clerk.com/docs/reference/backend/types/backend-oauth-access-token) objects, and a `totalCount` property that indicates the total number of OAuth access tokens for the specified user and provider. */ public async getUserOauthAccessToken( @@ -652,7 +652,7 @@ export class UserAPI extends AbstractAPI { } /** - * Disable all of a user's MFA methods (e.g. [OTP](!otp) sent via SMS, TOTP on their authenticator app) at once. + * Disable all of a user's MFA methods (e.g., [OTP](!otp) sent via SMS, TOTP on their authenticator app) at once. * @param userId - The ID of the user to disable MFA for. */ public async disableUserMFA(userId: string) { @@ -705,7 +705,7 @@ export class UserAPI extends AbstractAPI { }); } - /** Verify that the provided TOTP or backup code is valid for the user. Verifying a backup code will result it in being consumed (i.e. it will become invalid). Useful for custom auth flows and re-verification. */ + /** Verify that the provided TOTP or backup code is valid for the user. Verifying a backup code will result it in being consumed (i.e., it will become invalid). Useful for custom auth flows and re-verification. */ public async verifyTOTP(params: VerifyTOTPParams) { const { userId, code } = params; this.requireId(userId); diff --git a/packages/backend/src/api/resources/ExternalAccount.ts b/packages/backend/src/api/resources/ExternalAccount.ts index 8c745da1590..53928bfd9ca 100644 --- a/packages/backend/src/api/resources/ExternalAccount.ts +++ b/packages/backend/src/api/resources/ExternalAccount.ts @@ -2,7 +2,7 @@ import type { ExternalAccountJSON } from './JSON'; import { Verification } from './Verification'; /** - * The Backend `ExternalAccount` object is a model around an identification obtained by an external provider (e.g. a social provider such as Google). + * The Backend `ExternalAccount` object is a model around an identification obtained by an external provider (e.g., a social provider such as Google). * * External account must be verified, so that you can make sure they can be assigned to their rightful owners. The `ExternalAccount` object holds all necessary state around the verification process. */ diff --git a/packages/backend/src/api/resources/RedirectUrl.ts b/packages/backend/src/api/resources/RedirectUrl.ts index 4cabc07bb8e..c528ff670e8 100644 --- a/packages/backend/src/api/resources/RedirectUrl.ts +++ b/packages/backend/src/api/resources/RedirectUrl.ts @@ -1,7 +1,7 @@ import type { RedirectUrlJSON } from './JSON'; /** - * Redirect URLs are whitelisted URLs that facilitate secure authentication flows in native applications (e.g. React Native, Expo). In these contexts, Clerk ensures that security-critical nonces are passed only to the whitelisted URLs. + * Redirect URLs are whitelisted URLs that facilitate secure authentication flows in native applications (e.g., React Native, Expo). In these contexts, Clerk ensures that security-critical nonces are passed only to the whitelisted URLs. The Backend `RedirectUrl` object represents a redirect URL in your application. This object is used in the Backend API. */ diff --git a/packages/backend/src/runtime.ts b/packages/backend/src/runtime.ts index 5f5895ca994..b743994099d 100644 --- a/packages/backend/src/runtime.ts +++ b/packages/backend/src/runtime.ts @@ -1,5 +1,5 @@ /** - * This file exports APIs that vary across runtimes (i.e. Node & Browser - V8 isolates) + * This file exports APIs that vary across runtimes (i.e., Node & Browser - V8 isolates) * as a singleton object. * * Runtime polyfills are written in VanillaJS for now to avoid TS complication. Moreover, diff --git a/packages/backend/src/tokens/authStatus.ts b/packages/backend/src/tokens/authStatus.ts index 421c7bd61f4..bdcf1648641 100644 --- a/packages/backend/src/tokens/authStatus.ts +++ b/packages/backend/src/tokens/authStatus.ts @@ -283,7 +283,7 @@ type BootstrapSignedOutParams = { * Returns a synthetic `UnauthenticatedState` without requiring a publishable key or an * `AuthenticateContext`. Intended for framework integrations that need to run * authorization logic for a request that arrived before real Clerk keys are available - * (e.g. the Next.js keyless bootstrap window). The returned state has + * (e.g., the Next.js keyless bootstrap window). The returned state has * `status: 'signed-out'` and `toAuth()` returns a standard signed-out session auth object. * * `signInUrl` / `signUpUrl` are carried through so that `redirectToSignIn` / diff --git a/packages/backend/src/tokens/handshake.ts b/packages/backend/src/tokens/handshake.ts index affeb3b5b0a..0d72bfe5f01 100644 --- a/packages/backend/src/tokens/handshake.ts +++ b/packages/backend/src/tokens/handshake.ts @@ -129,7 +129,7 @@ export class HandshakeService { /** * Builds the redirect headers for a handshake request - * @param reason - The reason for the handshake (e.g. 'session-token-expired') + * @param reason - The reason for the handshake (e.g., 'session-token-expired') * @returns Headers object containing the Location header for redirect * @throws Error if clerkUrl is missing in authenticateContext */ diff --git a/packages/backend/src/tokens/machine.ts b/packages/backend/src/tokens/machine.ts index cf878783095..3d78d17464b 100644 --- a/packages/backend/src/tokens/machine.ts +++ b/packages/backend/src/tokens/machine.ts @@ -86,7 +86,7 @@ export function isMachineJwt(token: string): boolean { * * @remarks * In the future, this will support custom prefixes that can be prepended to the base prefixes - * (e.g. "org_a_m2m_", "org_a_oauth_access_", "org_a_api_key_") + * (e.g., "org_a_m2m_", "org_a_oauth_access_", "org_a_api_key_") * * @param token - The token string to check * @returns true if the token starts with a recognized machine token prefix @@ -110,7 +110,7 @@ export function isMachineToken(token: string): boolean { * * @remarks * In the future, this will support custom prefixes that can be prepended to the base prefixes - * (e.g. "org_a_m2m_", "org_a_oauth_access_", "org_a_api_key_") + * (e.g., "org_a_m2m_", "org_a_oauth_access_", "org_a_api_key_") * * @param token - The token string to check * @returns The specific MachineTokenType diff --git a/packages/backend/src/tokens/types.ts b/packages/backend/src/tokens/types.ts index c927d3c5ba7..34f7b101c06 100644 --- a/packages/backend/src/tokens/types.ts +++ b/packages/backend/src/tokens/types.ts @@ -163,7 +163,7 @@ export type OrganizationSyncTargetMatchers = { }; /** - * Represents an Organization or a Personal Account - e.g. an + * Represents an Organization or a Personal Account - e.g., an * entity that can be activated by the handshake API. */ export type OrganizationSyncTarget = diff --git a/packages/backend/src/tokens/verify.ts b/packages/backend/src/tokens/verify.ts index 93c27df42ac..3b9b16f89ad 100644 --- a/packages/backend/src/tokens/verify.ts +++ b/packages/backend/src/tokens/verify.ts @@ -236,7 +236,7 @@ async function verifyAPIKey( * Verifies any type of machine token by detecting its type from the prefix or JWT claims. * For JWTs, decodes once and routes based on claims to avoid redundant decoding. * - * @param token - The token to verify (e.g. starts with "mt_", "oat_", "ak_", or a JWT) + * @param token - The token to verify (e.g., starts with "mt_", "oat_", "ak_", or a JWT) * @param options - Options including secretKey for BAPI authorization */ export async function verifyMachineAuthToken(token: string, options: VerifyTokenOptions) { diff --git a/packages/nextjs/src/server/clerkMiddleware.ts b/packages/nextjs/src/server/clerkMiddleware.ts index 19709e6e369..2522766a81c 100644 --- a/packages/nextjs/src/server/clerkMiddleware.ts +++ b/packages/nextjs/src/server/clerkMiddleware.ts @@ -362,7 +362,7 @@ type RunHandlerWithRequestStateArgs = { * Drives the post-authentication pipeline: handler invocation, CSP, redirects, header propagation, * and response decoration. Accepts a pre-computed `requestState` so callers can supply either a * real authentication result from `authenticateRequest()` or a synthetic signed-out state - * (e.g. during keyless bootstrap when no publishable key is available yet). + * (e.g., during keyless bootstrap when no publishable key is available yet). */ async function runHandlerWithRequestState({ clerkRequest, diff --git a/packages/shared/src/errors/helpers.ts b/packages/shared/src/errors/helpers.ts index 1aeb4c698d7..f588928e486 100644 --- a/packages/shared/src/errors/helpers.ts +++ b/packages/shared/src/errors/helpers.ts @@ -50,12 +50,12 @@ const unauthenticated403ErrorCodes = new Set(['user_banned', 'user_deactivated'] /** * Checks if the provided error indicates the user's session is no longer valid - * and should trigger the unauthenticated flow (e.g. sign-out / redirect to sign-in). + * and should trigger the unauthenticated flow (e.g., sign-out / redirect to sign-in). * * Only matches explicit authentication failure status codes: * - 401: session is invalid or expired - * - 422: invalid session state (e.g. missing_expired_token) - * - 403: terminal user state (e.g. user_banned, user_deactivated) + * - 422: invalid session state (e.g., missing_expired_token) + * - 403: terminal user state (e.g., user_banned, user_deactivated) * * 404 is intentionally excluded despite being returned for "session not found", * because it's also returned for unrelated resources (org not found, JWT template diff --git a/packages/shared/src/internal/clerk-js/protectCheck.ts b/packages/shared/src/internal/clerk-js/protectCheck.ts index bcdcec43007..993e816934c 100644 --- a/packages/shared/src/internal/clerk-js/protectCheck.ts +++ b/packages/shared/src/internal/clerk-js/protectCheck.ts @@ -6,7 +6,7 @@ export interface ExecuteProtectCheckOptions { * Host-provided visibility handshake, forwarded to the script verbatim as * `setWidgetVisible` in the init payload. The script calls it right before revealing UI in * the container (and with `false` once its widget is done); the returned promise resolves - * only after the host has applied the change to the DOM (e.g. removed its own loading + * only after the host has applied the change to the DOM (e.g., removed its own loading * spinner), so the script can sequence its reveal without a frame of overlap. A script that * knows its widget is imminent may call it immediately to avoid a spinner flash. Scripts * must treat the field as optional — older hosts don't provide it. diff --git a/packages/shared/src/internal/clerk-js/thirdPartyDomains.ts b/packages/shared/src/internal/clerk-js/thirdPartyDomains.ts index b61aa143641..88e92d0cd36 100644 --- a/packages/shared/src/internal/clerk-js/thirdPartyDomains.ts +++ b/packages/shared/src/internal/clerk-js/thirdPartyDomains.ts @@ -1,5 +1,5 @@ /** - * Domains of third-party embedding platforms (e.g. online IDEs, preview environments) + * Domains of third-party embedding platforms (e.g., online IDEs, preview environments) * that require special handling for cookies and OAuth flows. * * These domains need: diff --git a/packages/shared/src/internal/clerk-js/windowNavigate.ts b/packages/shared/src/internal/clerk-js/windowNavigate.ts index c319b33dd43..54b500455a2 100644 --- a/packages/shared/src/internal/clerk-js/windowNavigate.ts +++ b/packages/shared/src/internal/clerk-js/windowNavigate.ts @@ -14,7 +14,7 @@ export const ALLOWED_PROTOCOLS = [ export type WindowNavigateOptions = { /** * Protocol allowlist applied to the resolved URL. Defaults to `ALLOWED_PROTOCOLS`. Pass an - * extended list (e.g. `Clerk`'s `#allowedRedirectProtocols`) to honor the customer-supplied + * extended list (e.g., `Clerk`'s `#allowedRedirectProtocols`) to honor the customer-supplied * `allowedRedirectProtocols` option. */ allowedProtocols?: ReadonlyArray; @@ -46,7 +46,7 @@ function stripUrlParserIgnoredChars(to: string): string { /** * Helper utility to navigate via window.location.href. Also dispatches a clerk:beforeunload custom event. * - * Navigations whose protocol is not in the allowlist (e.g. `javascript:`, `data:`) are aborted. + * Navigations whose protocol is not in the allowlist (e.g., `javascript:`, `data:`) are aborted. * Scheme-relative inputs (`//host`, `\\host`) are also rejected: they adopt the base URL's scheme, * which is always in the allowlist, so they would otherwise pass the protocol check while * redirecting cross-origin. diff --git a/packages/shared/src/keys.ts b/packages/shared/src/keys.ts index 389614332d9..bf2616b90cf 100644 --- a/packages/shared/src/keys.ts +++ b/packages/shared/src/keys.ts @@ -45,12 +45,12 @@ export function buildPublishableKey(frontendApi: string): string { /** * Derives a publishable key from the current hostname. Intended for multi-domain - * setups (e.g. custom domains on top of a default domain) where the correct key + * setups (e.g., custom domains on top of a default domain) where the correct key * must be resolved per request. * * Pass the configured publishable key as `fallbackKey` so that development * instances (pk_test_) are returned as-is instead of being incorrectly derived - * from the host (e.g. localhost). + * from the host (e.g., localhost). * * @example * // React (use window.location.hostname, not window.location.host, to avoid including the port) diff --git a/packages/shared/src/pathMatcher.ts b/packages/shared/src/pathMatcher.ts index e237b06c305..ba837d9ac38 100644 --- a/packages/shared/src/pathMatcher.ts +++ b/packages/shared/src/pathMatcher.ts @@ -3,7 +3,7 @@ import type { Autocomplete } from './types'; /** * @deprecated Prefer {@link WithPathSegmentWildcard}; `(.*)` also matches sibling routes - * (e.g. `/dashboard(.*)` matches `/dashboardxyz`). + * (e.g., `/dashboard(.*)` matches `/dashboardxyz`). */ export type WithPathPatternWildcard = `${T & string}(.*)`; @@ -14,7 +14,7 @@ type StripTrailingSlash = T extends '/' : T; /** - * Suggests the `:path*` subtree form (e.g. `/dashboard/:path*`), which matches on + * Suggests the `:path*` subtree form (e.g., `/dashboard/:path*`), which matches on * path-segment boundaries. `/` is special-cased to `/:path*` to avoid a malformed `//:path*`. * * @deprecated Will be removed in the next major version together with {@link createPathMatcher}. @@ -59,7 +59,7 @@ const precomputePathRegex = (patterns: Array) => { * 1. Decodes percent-encoded unreserved characters using decodeURI (not * decodeURIComponent) so path-reserved delimiters like %2F, %3F, %23 * are preserved — matching how framework routers interpret paths. - * 2. Collapses consecutive slashes (e.g. //api/admin → /api/admin) to + * 2. Collapses consecutive slashes (e.g., //api/admin → /api/admin) to * prevent bypass via extra slashes. * * @throws {MalformedURLError} if the path contains invalid percent-encoding diff --git a/packages/shared/src/react/billing/payment-element.tsx b/packages/shared/src/react/billing/payment-element.tsx index ea63015df5c..b63cb161614 100644 --- a/packages/shared/src/react/billing/payment-element.tsx +++ b/packages/shared/src/react/billing/payment-element.tsx @@ -307,7 +307,7 @@ export type UsePaymentElementReturn = { name: 'stripe'; }; /** - * Indicates whether the underlying payment provider (e.g. Stripe) has been fully initialized. + * Indicates whether the underlying payment provider (e.g., Stripe) has been fully initialized. */ isProviderReady: true; } diff --git a/packages/shared/src/react/contexts.tsx b/packages/shared/src/react/contexts.tsx index 0b35abc54e2..57ae37ad4ae 100644 --- a/packages/shared/src/react/contexts.tsx +++ b/packages/shared/src/react/contexts.tsx @@ -70,7 +70,7 @@ export type UseCheckoutOptions = { */ planPeriod: BillingSubscriptionPlanPeriod; /** - * The ID of the Subscription Plan to check out (e.g. `cplan_xxx`). + * The ID of the Subscription Plan to check out (e.g., `cplan_xxx`). */ planId: string; /** diff --git a/packages/shared/src/react/hooks/useOrganizationEnterpriseConnectionTestRuns.tsx b/packages/shared/src/react/hooks/useOrganizationEnterpriseConnectionTestRuns.tsx index 88c65b31629..f82095a76ae 100644 --- a/packages/shared/src/react/hooks/useOrganizationEnterpriseConnectionTestRuns.tsx +++ b/packages/shared/src/react/hooks/useOrganizationEnterpriseConnectionTestRuns.tsx @@ -93,7 +93,7 @@ export type RevalidateTestRunsOptions = { * Invalidate only this query's exact `queryKey` instead of the broad * org+connection `invalidationKey`. The default broad invalidation * prefix-matches every test-runs query for the connection, so a sibling query - * (e.g. a success probe sharing the org+connection key with the visible list) + * (e.g., a success probe sharing the org+connection key with the visible list) * refetches too. Pass `true` to refetch ONLY this query and leave the siblings * — and their loading indicators — untouched. * diff --git a/packages/shared/src/telemetry/events/flow-step.ts b/packages/shared/src/telemetry/events/flow-step.ts index f6cc5f936bc..6cb77ea9e82 100644 --- a/packages/shared/src/telemetry/events/flow-step.ts +++ b/packages/shared/src/telemetry/events/flow-step.ts @@ -4,11 +4,11 @@ const EVENT_FLOW_STEP_MOUNTED = 'FLOW_STEP_MOUNTED'; const EVENT_SAMPLING_RATE = 1; type EventFlowStepMounted = { - /** The flow the step belongs to, e.g. `configureSSO` (mirrors `Flow.Root`'s `flow`). */ + /** The flow the step belongs to, e.g., `configureSSO` (mirrors `Flow.Root`'s `flow`). */ flow: string; - /** The step/part that mounted, e.g. `verify-domain` */ + /** The step/part that mounted, e.g., `verify-domain` */ step: string; - /** Free-form, flow-specific metadata supplied by the caller (e.g. `timestamp`, `connectionStatus`). */ + /** Free-form, flow-specific metadata supplied by the caller (e.g., `timestamp`, `connectionStatus`). */ metadata: TelemetryEventRaw['payload']; } & TelemetryEventRaw['payload']; diff --git a/packages/shared/src/telemetry/notice.ts b/packages/shared/src/telemetry/notice.ts index 17d9492758a..2adc142d6ce 100644 --- a/packages/shared/src/telemetry/notice.ts +++ b/packages/shared/src/telemetry/notice.ts @@ -7,7 +7,7 @@ * frequently observed by non-developers (QA, screenshots, demos), and adding another * console warning is a common source of customer complaints. * - * Known gap: pure browser-only setups with no server-side Clerk runtime (e.g. a Vite + * Known gap: pure browser-only setups with no server-side Clerk runtime (e.g., a Vite * SPA using `@clerk/clerk-react` or `@clerk/clerk-js` directly, without any Node/Edge * backend that imports `@clerk/shared`) will never hit this code path and therefore * see no in-band disclosure. This is an accepted trade-off: the original postinstall @@ -82,7 +82,7 @@ function printNotice(): void { export type MaybeShowTelemetryNoticeOptions = { /** * Skip the notice entirely. Used when the caller has already determined that no - * telemetry will be sent (e.g. opt-out, non-development instance), in which case + * telemetry will be sent (e.g., opt-out, non-development instance), in which case * there is nothing to disclose. */ skip?: boolean; diff --git a/packages/shared/src/telemetry/types.ts b/packages/shared/src/telemetry/types.ts index 1fb6ade01da..632a9a1bd61 100644 --- a/packages/shared/src/telemetry/types.ts +++ b/packages/shared/src/telemetry/types.ts @@ -34,7 +34,7 @@ export type TelemetryCollectorOptions = { */ clerkVersion?: string; /** - * The SDK being used, e.g. `@clerk/nextjs` or `@clerk/remix`. + * The SDK being used, e.g., `@clerk/nextjs` or `@clerk/remix`. */ sdk?: string; /** diff --git a/packages/shared/src/types/clerk.ts b/packages/shared/src/types/clerk.ts index 19be83620d6..be489c5fe85 100644 --- a/packages/shared/src/types/clerk.ts +++ b/packages/shared/src/types/clerk.ts @@ -1044,7 +1044,7 @@ export interface Clerk { /** * Redirects to the configured URL where [session tasks](https://clerk.com/docs/reference/objects/session) are mounted. * - * @param opts - Options to control the redirect (e.g. redirect URL after tasks are complete). + * @param opts - Options to control the redirect (e.g., redirect URL after tasks are complete). */ redirectToTasks(opts?: TasksRedirectOptions): Promise; @@ -1062,7 +1062,7 @@ export interface Clerk { ) => Promise; /** - * Whether an OAuth transport (e.g. for Electron) has been registered. + * Whether an OAuth transport (e.g., for Electron) has been registered. * * @internal */ @@ -1201,7 +1201,7 @@ export interface Clerk { apiKeys: APIKeysNamespace; /** - * OAuth application helpers (e.g. consent metadata for custom consent UIs). + * OAuth application helpers (e.g., consent metadata for custom consent UIs). */ oauthApplication: OAuthApplicationNamespace; @@ -1337,7 +1337,7 @@ type ClerkUnsafeOptions = { /** * Disables the `Clerk has been loaded with development keys` console warning that is logged when Clerk is * initialized with development keys. The warning is emitted by `clerk-js` to the browser console; in dev servers - * that mirror browser logs to the terminal (e.g. Next.js with `experimental.browserDebugInfoInTerminal`), setting + * that mirror browser logs to the terminal (e.g., Next.js with `experimental.browserDebugInfoInTerminal`), setting * this option also stops it from showing up there. * * Each framework integration also exposes an env-var shortcut so you don't need to thread the option through @@ -1389,7 +1389,7 @@ export type ClerkOptions = ClerkOptionsNavigation & */ polling?: boolean; /** - * By default, the last signed-in session is used during client initialization. This option allows you to override that behavior, e.g. by selecting a specific session. + * By default, the last signed-in session is used during client initialization. This option allows you to override that behavior, e.g., by selecting a specific session. */ selectInitialSession?: (client: ClientResource) => SignedInSessionResource | null; /** @@ -1509,7 +1509,7 @@ export type ClerkOptions = ClerkOptionsNavigation & /** * Provide a transport for OAuth/SSO flows in environments where a same-document - * redirect or popup cannot be used (e.g. Electron, Tauri). When set, Clerk uses the + * redirect or popup cannot be used (e.g., Electron, Tauri). When set, Clerk uses the * transport's `getRedirectUrl` as the FAPI `redirectUrl` and calls `open` instead of * navigating the document. Intended for native desktop SDK wrappers. * @@ -1948,7 +1948,7 @@ export type UserProfileProps = RoutingOptions & { appearance?: ClerkAppearanceTheme; /* * Specify additional scopes per OAuth provider that your users would like to provide if not already approved. - * e.g. + * e.g., */ additionalOAuthScopes?: Partial>; /* @@ -1965,7 +1965,7 @@ export type UserProfileProps = RoutingOptions & { __experimental_startPath?: string; /** * Specify options for the underlying component. - * e.g. + * e.g., * * @experimental */ @@ -2014,7 +2014,7 @@ export type OrganizationProfileProps = RoutingOptions & { __experimental_startPath?: string; /** * Specify options for the underlying component. - * e.g. + * e.g., * * @experimental */ @@ -2121,7 +2121,7 @@ export type UserButtonProps = UserButtonProfileMode & { /** * Specify options for the underlying component. - * e.g. + * e.g., */ userProfileProps?: Pick; @@ -2223,7 +2223,7 @@ export type OrganizationSwitcherProps = CreateOrganizationMode & appearance?: ClerkAppearanceTheme; /* * Specify options for the underlying component. - * e.g. + * e.g., */ organizationProfileProps?: Pick; }; @@ -2343,7 +2343,7 @@ type PricingTableBaseProps = { appearance?: ClerkAppearanceTheme; /* * Specify options for the underlying component. - * e.g. + * e.g., */ checkoutProps?: Pick<__internal_CheckoutProps, 'appearance'>; }; diff --git a/packages/shared/src/types/enterpriseConnection.ts b/packages/shared/src/types/enterpriseConnection.ts index 35a3f8a336f..f3e17fc9367 100644 --- a/packages/shared/src/types/enterpriseConnection.ts +++ b/packages/shared/src/types/enterpriseConnection.ts @@ -28,7 +28,7 @@ export interface EnterpriseConnectionResource extends ClerkResource { name: string; /** Whether the enterprise connection is active. */ active: boolean; - /** The identity provider the connection uses (e.g. `saml_okta`, `oidc_custom`). */ + /** The identity provider the connection uses (e.g., `saml_okta`, `oidc_custom`). */ provider: string; /** The public URL of the identity provider's logo, or `null` when none is set. */ logoPublicUrl: string | null; diff --git a/packages/shared/src/types/localization.ts b/packages/shared/src/types/localization.ts index 9ca7ecee35e..19074bdbae5 100644 --- a/packages/shared/src/types/localization.ts +++ b/packages/shared/src/types/localization.ts @@ -70,7 +70,7 @@ export type __internal_LocalizationResource = { locale: string; maintenanceMode: LocalizationValue; /** - * Add Role keys and their localized values, e.g. `roles: { 'org:teacher': 'Teacher'}`. + * Add Role keys and their localized values, e.g., `roles: { 'org:teacher': 'Teacher'}`. * * @experimental */ diff --git a/packages/shared/src/types/oauthTransport.ts b/packages/shared/src/types/oauthTransport.ts index 4b29d943ea5..94398edaa0c 100644 --- a/packages/shared/src/types/oauthTransport.ts +++ b/packages/shared/src/types/oauthTransport.ts @@ -2,7 +2,7 @@ type Awaitable = T | Promise; /** * Transport for OAuth/SSO flows in environments where a same-document redirect or popup - * cannot be used (e.g. Electron, Tauri). Injected via `__internal_oauthTransport` in + * cannot be used (e.g., Electron, Tauri). Injected via `__internal_oauthTransport` in * `ClerkOptions`. Generic by design: "open a URL externally and wait for the callback * URL" - it knows nothing about any specific runtime. * @@ -11,7 +11,7 @@ type Awaitable = T | Promise; export type OAuthTransport = { /** * The callback/redirect URL FAPI should send the provider back to. For native runtimes - * this is an OS-registered deep link, e.g. `myapp://sso-callback`. + * this is an OS-registered deep link, e.g., `myapp://sso-callback`. */ getRedirectUrl: () => Awaitable; /** diff --git a/packages/shared/src/types/redirects.ts b/packages/shared/src/types/redirects.ts index 1223d21ffc7..2fb281c9b90 100644 --- a/packages/shared/src/types/redirects.ts +++ b/packages/shared/src/types/redirects.ts @@ -42,7 +42,7 @@ export type AuthenticateWithRedirectParams = { redirectUrlComplete: string; /** - * Whether to continue (i.e. PATCH) an existing SignUp (if present) or create a new SignUp. + * Whether to continue (i.e., PATCH) an existing SignUp (if present) or create a new SignUp. */ continueSignUp?: boolean; diff --git a/packages/shared/src/types/session.ts b/packages/shared/src/types/session.ts index 5e148977474..c0d70f9ea6a 100644 --- a/packages/shared/src/types/session.ts +++ b/packages/shared/src/types/session.ts @@ -282,7 +282,7 @@ export interface SessionResource extends ClerkResource { /** * Gets the current user's [session token](https://clerk.com/docs/guides/sessions/session-tokens) or a [custom JWT template](https://clerk.com/docs/guides/sessions/jwt-templates). * - * This method uses a cache so a network request will only be made if the token in memory has expired. The TTL for a Clerk token is one minute. It retries on transient failures (e.g. network errors); when the browser is offline and retries are exhausted, it throws `ClerkOfflineError`. + * This method uses a cache so a network request will only be made if the token in memory has expired. The TTL for a Clerk token is one minute. It retries on transient failures (e.g., network errors); when the browser is offline and retries are exhausted, it throws `ClerkOfflineError`. * * Tokens can only be generated if the user is signed in. */ @@ -500,7 +500,7 @@ export type GetTokenOptions = { */ organizationId?: string; /** - * Whether to skip the cache lookup and force a call to the server instead, even within the TTL. Useful if the token claims are time-sensitive or depend on data that can be updated (e.g. user fields). Defaults to `false`. + * Whether to skip the cache lookup and force a call to the server instead, even within the TTL. Useful if the token claims are time-sensitive or depend on data that can be updated (e.g., user fields). Defaults to `false`. */ skipCache?: boolean; /** From 180b0504add418259d007f7641b8507fc298ffd1 Mon Sep 17 00:00:00 2001 From: Sarah Soutoul Date: Mon, 20 Jul 2026 23:30:03 +0200 Subject: [PATCH 2/5] More refinements --- .../shared/src/react/hooks/useOAuthConsent.tsx | 2 +- .../shared/src/react/hooks/useOrganization.tsx | 2 +- .../src/react/hooks/useOrganizationList.tsx | 2 +- packages/shared/src/types/billing.ts | 18 +++++++++--------- packages/shared/src/types/hooks.ts | 12 ++++++------ packages/shared/src/types/json.ts | 10 +++++----- .../shared/src/types/organizationDomain.ts | 2 +- packages/shared/src/types/session.ts | 2 +- 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/packages/shared/src/react/hooks/useOAuthConsent.tsx b/packages/shared/src/react/hooks/useOAuthConsent.tsx index c7a7513f494..bd4bcd4f04e 100644 --- a/packages/shared/src/react/hooks/useOAuthConsent.tsx +++ b/packages/shared/src/react/hooks/useOAuthConsent.tsx @@ -12,7 +12,7 @@ const HOOK_NAME = 'useOAuthConsent'; /** * The `useOAuthConsent()` hook loads OAuth application consent metadata for the **signed-in** user * (`GET /me/oauth/consent/{oauthClientId}`). Ensure the user is authenticated before relying on this hook - * (for example, redirect to sign-in on your custom consent route). + * (e.g., redirect to sign-in on your custom consent route). * * @example * ```tsx diff --git a/packages/shared/src/react/hooks/useOrganization.tsx b/packages/shared/src/react/hooks/useOrganization.tsx index 127c622cc54..619230df9b2 100644 --- a/packages/shared/src/react/hooks/useOrganization.tsx +++ b/packages/shared/src/react/hooks/useOrganization.tsx @@ -69,7 +69,7 @@ export type UseOrganizationParams = { export type UseOrganizationReturn = | { /** - * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (for example, when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). + * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). */ isLoaded: false; /** diff --git a/packages/shared/src/react/hooks/useOrganizationList.tsx b/packages/shared/src/react/hooks/useOrganizationList.tsx index 38eb4176b86..e50fab1e88e 100644 --- a/packages/shared/src/react/hooks/useOrganizationList.tsx +++ b/packages/shared/src/react/hooks/useOrganizationList.tsx @@ -77,7 +77,7 @@ const undefinedPaginatedResource = { export type UseOrganizationListReturn = | { /** - * Indicates whether Clerk has loaded the current authentication state and there is an authenticated user. Initially `false`, becomes `true` once Clerk loads with a user, and can revert to `false` while auth state is updating (for example, when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). + * Indicates whether Clerk has loaded the current authentication state and there is an authenticated user. Initially `false`, becomes `true` once Clerk loads with a user, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). */ isLoaded: false; /** diff --git a/packages/shared/src/types/billing.ts b/packages/shared/src/types/billing.ts index 1db27d37140..73de14061d9 100644 --- a/packages/shared/src/types/billing.ts +++ b/packages/shared/src/types/billing.ts @@ -249,7 +249,7 @@ export interface BillingPlanResource extends ClerkResource { */ features: FeatureResource[]; /** - * Per-unit pricing tiers for this Plan (for example, seats). + * Per-unit pricing tiers for this Plan (e.g., seats). */ unitPrices?: BillingPlanUnitPrice[]; /** @@ -308,7 +308,7 @@ export interface BillingPlanUnitPriceTier { } /** - * The `BillingPlanUnitPrice` type represents unit pricing for a specific unit type (for example, seats) on a plan. + * The `BillingPlanUnitPrice` type represents unit pricing for a specific unit type (e.g., seats) on a plan. * * @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. */ @@ -556,7 +556,7 @@ export type BillingPaymentStatus = 'pending' | 'paid' | 'failed'; /** * The `BillingPaymentTotals` type represents the per-payment cost breakdown, including any base fee - * and per-unit (for example, seats) subtotals. + * and per-unit (e.g., seats) subtotals. * * @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. */ @@ -578,7 +578,7 @@ export interface BillingPaymentTotals { */ baseFee?: BillingMoneyAmount | null; /** - * Per-unit cost breakdown for this payment (for example, seats). + * Per-unit cost breakdown for this payment (e.g., seats). */ perUnitTotals?: BillingPerUnitTotal[]; /** @@ -630,7 +630,7 @@ export interface BillingPaymentResource extends ClerkResource { */ status: BillingPaymentStatus; /** - * Per-payment breakdown with optional base fee and per-unit (for example, seats) subtotals. + * Per-payment breakdown with optional base fee and per-unit (e.g., seats) subtotals. * Absent on older responses. */ totals?: BillingPaymentTotals | null; @@ -748,7 +748,7 @@ export interface BillingSubscriptionNextPayment { */ date: Date; /** - * Per-unit cost breakdown for the next payment (for example, seats). + * Per-unit cost breakdown for the next payment (e.g., seats). */ perUnitTotals?: BillingPerUnitTotal[]; /** @@ -772,7 +772,7 @@ export interface BillingSubscriptionItemNextPayment { */ date: Date; /** - * Per-unit cost breakdown for the next payment (for example, seats). + * Per-unit cost breakdown for the next payment (e.g., seats). */ perUnitTotals?: BillingPerUnitTotal[]; /** @@ -1122,7 +1122,7 @@ export interface BillingTotals { */ totalDueNow?: BillingMoneyAmount; /** - * Per-unit total breakdown (for example, seats) + * Per-unit total breakdown (e.g., seats) */ perUnitTotals?: BillingPerUnitTotal[]; /** @@ -1160,7 +1160,7 @@ export interface BillingCheckoutTotals { */ taxTotal: BillingMoneyAmount; /** - * Per-unit cost breakdown for items actively being purchased in this checkout (for example, seats being added). + * Per-unit cost breakdown for items actively being purchased in this checkout (e.g., seats being added). * When only adding seats mid-cycle, this only covers the seats being added, not seats already paid for. */ perUnitTotals?: BillingPerUnitTotal[]; diff --git a/packages/shared/src/types/hooks.ts b/packages/shared/src/types/hooks.ts index 9e377663e44..68026706d28 100644 --- a/packages/shared/src/types/hooks.ts +++ b/packages/shared/src/types/hooks.ts @@ -26,7 +26,7 @@ type CheckAuthorizationSignedOut = CheckAuthorizationWithoutOrgOrUser; export type UseAuthReturn = | { /** - * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (for example, when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). + * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). */ isLoaded: false; /** @@ -123,7 +123,7 @@ export type UseAuthReturn = export type UseSignInReturn = | { /** - * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (for example, when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). + * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). */ isLoaded: false; /** @@ -147,7 +147,7 @@ export type UseSignInReturn = export type UseSignUpReturn = | { /** - * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (for example, when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). + * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). */ isLoaded: false; /** @@ -171,7 +171,7 @@ export type UseSignUpReturn = export type UseSessionReturn = | { /** - * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (for example, when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). + * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). */ isLoaded: false; /** @@ -200,7 +200,7 @@ export type UseSessionReturn = export type UseSessionListReturn = | { /** - * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (for example, when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). + * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). */ isLoaded: false; /** @@ -224,7 +224,7 @@ export type UseSessionListReturn = export type UseUserReturn = | { /** - * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (for example, when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). + * Indicates whether Clerk has loaded the current authentication state. Initially `false`, becomes `true` once Clerk loads, and can revert to `false` while auth state is updating (e.g., when switching organizations via [`setActive()`](https://clerk.com/docs/reference/objects/clerk#set-active)). */ isLoaded: false; /** diff --git a/packages/shared/src/types/json.ts b/packages/shared/src/types/json.ts index ff99b123d39..a7282b05df9 100644 --- a/packages/shared/src/types/json.ts +++ b/packages/shared/src/types/json.ts @@ -702,7 +702,7 @@ export interface BillingPlanUnitPriceTierJSON extends ClerkResourceJSON { /** * @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. * - * Represents unit pricing for a specific unit type (for example, seats) on a plan. + * Represents unit pricing for a specific unit type (e.g., seats) on a plan. */ export interface BillingPlanUnitPriceJSON { name: string; @@ -765,7 +765,7 @@ export interface BillingPlanJSON extends ClerkResourceJSON { free_trial_days?: number | null; free_trial_enabled?: boolean; /** - * Per-unit pricing tiers for this plan (for example, seats). + * Per-unit pricing tiers for this plan (e.g., seats). */ unit_prices?: BillingPlanUnitPriceJSON[]; available_prices?: BillingPriceJSON[]; @@ -824,7 +824,7 @@ export interface BillingStatementGroupJSON extends ClerkResourceJSON { /** * @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. * - * Per-payment cost breakdown including optional base fee and per-unit (for example, seats) subtotals. + * Per-payment cost breakdown including optional base fee and per-unit (e.g., seats) subtotals. */ export interface BillingPaymentTotalsJSON { subtotal: BillingMoneyAmountJSON; @@ -853,7 +853,7 @@ export interface BillingPaymentJSON extends ClerkResourceJSON { charge_type: BillingPaymentChargeType; status: BillingPaymentStatus; /** - * Per-payment breakdown with optional base fee and per-unit (for example, seats) + * Per-payment breakdown with optional base fee and per-unit (e.g., seats) * subtotals. Absent on older responses. */ totals?: BillingPaymentTotalsJSON | null; @@ -1065,7 +1065,7 @@ export interface BillingCheckoutTotalsJSON { base_fee: BillingMoneyAmountJSON; tax_total: BillingMoneyAmountJSON; /** - * Per-unit cost breakdown for items actively being purchased in this checkout (for example, seats being added). + * Per-unit cost breakdown for items actively being purchased in this checkout (e.g., seats being added). * When only adding seats mid-cycle, this only covers the seats being added, not seats already paid for. * Omitted when the checkout is not seat-based. */ diff --git a/packages/shared/src/types/organizationDomain.ts b/packages/shared/src/types/organizationDomain.ts index e5a48634084..109bb193c7f 100644 --- a/packages/shared/src/types/organizationDomain.ts +++ b/packages/shared/src/types/organizationDomain.ts @@ -81,7 +81,7 @@ export interface OrganizationDomainOwnershipVerification { */ strategy: OrganizationDomainOwnershipVerificationStrategy; /** - * The number of verification attempts that have been made for the current ownership verification, or `null` when ownership was not established through a per-attempt flow (for example, the `legacy` strategy). + * The number of verification attempts that have been made for the current ownership verification, or `null` when ownership was not established through a per-attempt flow (e.g., the `legacy` strategy). */ attempts: number | null; /** diff --git a/packages/shared/src/types/session.ts b/packages/shared/src/types/session.ts index c0d70f9ea6a..4db4e97bb34 100644 --- a/packages/shared/src/types/session.ts +++ b/packages/shared/src/types/session.ts @@ -504,7 +504,7 @@ export type GetTokenOptions = { */ skipCache?: boolean; /** - * The name of the JWT template from the [Clerk Dashboard](https://dashboard.clerk.com/~/jwt-templates) to generate a new token from. E.g. 'firebase', 'grafbase', or your custom template's name. + * The name of the JWT template from the [Clerk Dashboard](https://dashboard.clerk.com/~/jwt-templates) to generate a new token from. E.g., 'firebase', 'grafbase', or your custom template's name. */ template?: string; }; From 68ce5e27901a94c9e44f7fe235857395276998b4 Mon Sep 17 00:00:00 2001 From: Sarah Soutoul Date: Mon, 20 Jul 2026 23:48:18 +0200 Subject: [PATCH 3/5] Remove unnecessary edits --- packages/backend/src/api/endpoints/BetaFeaturesApi.ts | 4 ++-- packages/backend/src/api/endpoints/EmailApi.ts | 4 ++-- packages/backend/src/runtime.ts | 2 +- packages/backend/src/tokens/authStatus.ts | 2 +- packages/backend/src/tokens/handshake.ts | 2 +- packages/backend/src/tokens/machine.ts | 4 ++-- packages/nextjs/src/server/clerkMiddleware.ts | 2 +- packages/shared/src/errors/helpers.ts | 6 +++--- packages/shared/src/internal/clerk-js/protectCheck.ts | 2 +- packages/shared/src/internal/clerk-js/thirdPartyDomains.ts | 2 +- packages/shared/src/internal/clerk-js/windowNavigate.ts | 4 ++-- packages/shared/src/keys.ts | 4 ++-- packages/shared/src/pathMatcher.ts | 6 +++--- .../hooks/useOrganizationEnterpriseConnectionTestRuns.tsx | 2 +- packages/shared/src/telemetry/events/flow-step.ts | 6 +++--- packages/shared/src/telemetry/notice.ts | 4 ++-- packages/shared/src/telemetry/types.ts | 2 +- packages/shared/src/types/clerk.ts | 6 +++--- packages/shared/src/types/oauthTransport.ts | 4 ++-- 19 files changed, 34 insertions(+), 34 deletions(-) diff --git a/packages/backend/src/api/endpoints/BetaFeaturesApi.ts b/packages/backend/src/api/endpoints/BetaFeaturesApi.ts index e2dbd7a820d..abee538c33d 100644 --- a/packages/backend/src/api/endpoints/BetaFeaturesApi.ts +++ b/packages/backend/src/api/endpoints/BetaFeaturesApi.ts @@ -5,7 +5,7 @@ const basePath = '/beta_features'; type ChangeDomainParams = { /** - * The new home URL of the production instance e.g., https://www.example.com + * The new home URL of the production instance e.g. https://www.example.com */ homeUrl?: string; /** @@ -25,7 +25,7 @@ export class BetaFeaturesAPI extends AbstractAPI { * updating your Social Connection's redirect URLs and setting the new keys in your code. * * @remarks - * WARNING: Changing your domain will invalidate all current user sessions (i.e., users will be logged out). + * WARNING: Changing your domain will invalidate all current user sessions (i.e. users will be logged out). * Also, while your application is being deployed, a small downtime is expected to occur. */ public async changeDomain(params: ChangeDomainParams) { diff --git a/packages/backend/src/api/endpoints/EmailApi.ts b/packages/backend/src/api/endpoints/EmailApi.ts index 8f02e5976b4..16a7960effb 100644 --- a/packages/backend/src/api/endpoints/EmailApi.ts +++ b/packages/backend/src/api/endpoints/EmailApi.ts @@ -18,7 +18,7 @@ type Mailbox = { name?: string; /** - * The `addr-spec` of the mailbox, i.e., the email address itself. + * The `addr-spec` of the mailbox, i.e. the email address itself. */ address: string; }; @@ -34,7 +34,7 @@ type Mailbox = { type EmailRecipient = | { /** - * The `addr-spec` of the recipient mailbox, i.e., the email address itself. + * The `addr-spec` of the recipient mailbox, i.e. the email address itself. */ address: string; /** diff --git a/packages/backend/src/runtime.ts b/packages/backend/src/runtime.ts index b743994099d..5f5895ca994 100644 --- a/packages/backend/src/runtime.ts +++ b/packages/backend/src/runtime.ts @@ -1,5 +1,5 @@ /** - * This file exports APIs that vary across runtimes (i.e., Node & Browser - V8 isolates) + * This file exports APIs that vary across runtimes (i.e. Node & Browser - V8 isolates) * as a singleton object. * * Runtime polyfills are written in VanillaJS for now to avoid TS complication. Moreover, diff --git a/packages/backend/src/tokens/authStatus.ts b/packages/backend/src/tokens/authStatus.ts index bdcf1648641..421c7bd61f4 100644 --- a/packages/backend/src/tokens/authStatus.ts +++ b/packages/backend/src/tokens/authStatus.ts @@ -283,7 +283,7 @@ type BootstrapSignedOutParams = { * Returns a synthetic `UnauthenticatedState` without requiring a publishable key or an * `AuthenticateContext`. Intended for framework integrations that need to run * authorization logic for a request that arrived before real Clerk keys are available - * (e.g., the Next.js keyless bootstrap window). The returned state has + * (e.g. the Next.js keyless bootstrap window). The returned state has * `status: 'signed-out'` and `toAuth()` returns a standard signed-out session auth object. * * `signInUrl` / `signUpUrl` are carried through so that `redirectToSignIn` / diff --git a/packages/backend/src/tokens/handshake.ts b/packages/backend/src/tokens/handshake.ts index 0d72bfe5f01..affeb3b5b0a 100644 --- a/packages/backend/src/tokens/handshake.ts +++ b/packages/backend/src/tokens/handshake.ts @@ -129,7 +129,7 @@ export class HandshakeService { /** * Builds the redirect headers for a handshake request - * @param reason - The reason for the handshake (e.g., 'session-token-expired') + * @param reason - The reason for the handshake (e.g. 'session-token-expired') * @returns Headers object containing the Location header for redirect * @throws Error if clerkUrl is missing in authenticateContext */ diff --git a/packages/backend/src/tokens/machine.ts b/packages/backend/src/tokens/machine.ts index 3d78d17464b..cf878783095 100644 --- a/packages/backend/src/tokens/machine.ts +++ b/packages/backend/src/tokens/machine.ts @@ -86,7 +86,7 @@ export function isMachineJwt(token: string): boolean { * * @remarks * In the future, this will support custom prefixes that can be prepended to the base prefixes - * (e.g., "org_a_m2m_", "org_a_oauth_access_", "org_a_api_key_") + * (e.g. "org_a_m2m_", "org_a_oauth_access_", "org_a_api_key_") * * @param token - The token string to check * @returns true if the token starts with a recognized machine token prefix @@ -110,7 +110,7 @@ export function isMachineToken(token: string): boolean { * * @remarks * In the future, this will support custom prefixes that can be prepended to the base prefixes - * (e.g., "org_a_m2m_", "org_a_oauth_access_", "org_a_api_key_") + * (e.g. "org_a_m2m_", "org_a_oauth_access_", "org_a_api_key_") * * @param token - The token string to check * @returns The specific MachineTokenType diff --git a/packages/nextjs/src/server/clerkMiddleware.ts b/packages/nextjs/src/server/clerkMiddleware.ts index 0584db134c7..9e6699de60d 100644 --- a/packages/nextjs/src/server/clerkMiddleware.ts +++ b/packages/nextjs/src/server/clerkMiddleware.ts @@ -367,7 +367,7 @@ type RunHandlerWithRequestStateArgs = { * Drives the post-authentication pipeline: handler invocation, CSP, redirects, header propagation, * and response decoration. Accepts a pre-computed `requestState` so callers can supply either a * real authentication result from `authenticateRequest()` or a synthetic signed-out state - * (e.g., during keyless bootstrap when no publishable key is available yet). + * (e.g. during keyless bootstrap when no publishable key is available yet). */ async function runHandlerWithRequestState({ clerkRequest, diff --git a/packages/shared/src/errors/helpers.ts b/packages/shared/src/errors/helpers.ts index f588928e486..1aeb4c698d7 100644 --- a/packages/shared/src/errors/helpers.ts +++ b/packages/shared/src/errors/helpers.ts @@ -50,12 +50,12 @@ const unauthenticated403ErrorCodes = new Set(['user_banned', 'user_deactivated'] /** * Checks if the provided error indicates the user's session is no longer valid - * and should trigger the unauthenticated flow (e.g., sign-out / redirect to sign-in). + * and should trigger the unauthenticated flow (e.g. sign-out / redirect to sign-in). * * Only matches explicit authentication failure status codes: * - 401: session is invalid or expired - * - 422: invalid session state (e.g., missing_expired_token) - * - 403: terminal user state (e.g., user_banned, user_deactivated) + * - 422: invalid session state (e.g. missing_expired_token) + * - 403: terminal user state (e.g. user_banned, user_deactivated) * * 404 is intentionally excluded despite being returned for "session not found", * because it's also returned for unrelated resources (org not found, JWT template diff --git a/packages/shared/src/internal/clerk-js/protectCheck.ts b/packages/shared/src/internal/clerk-js/protectCheck.ts index 993e816934c..bcdcec43007 100644 --- a/packages/shared/src/internal/clerk-js/protectCheck.ts +++ b/packages/shared/src/internal/clerk-js/protectCheck.ts @@ -6,7 +6,7 @@ export interface ExecuteProtectCheckOptions { * Host-provided visibility handshake, forwarded to the script verbatim as * `setWidgetVisible` in the init payload. The script calls it right before revealing UI in * the container (and with `false` once its widget is done); the returned promise resolves - * only after the host has applied the change to the DOM (e.g., removed its own loading + * only after the host has applied the change to the DOM (e.g. removed its own loading * spinner), so the script can sequence its reveal without a frame of overlap. A script that * knows its widget is imminent may call it immediately to avoid a spinner flash. Scripts * must treat the field as optional — older hosts don't provide it. diff --git a/packages/shared/src/internal/clerk-js/thirdPartyDomains.ts b/packages/shared/src/internal/clerk-js/thirdPartyDomains.ts index 88e92d0cd36..b61aa143641 100644 --- a/packages/shared/src/internal/clerk-js/thirdPartyDomains.ts +++ b/packages/shared/src/internal/clerk-js/thirdPartyDomains.ts @@ -1,5 +1,5 @@ /** - * Domains of third-party embedding platforms (e.g., online IDEs, preview environments) + * Domains of third-party embedding platforms (e.g. online IDEs, preview environments) * that require special handling for cookies and OAuth flows. * * These domains need: diff --git a/packages/shared/src/internal/clerk-js/windowNavigate.ts b/packages/shared/src/internal/clerk-js/windowNavigate.ts index 54b500455a2..c319b33dd43 100644 --- a/packages/shared/src/internal/clerk-js/windowNavigate.ts +++ b/packages/shared/src/internal/clerk-js/windowNavigate.ts @@ -14,7 +14,7 @@ export const ALLOWED_PROTOCOLS = [ export type WindowNavigateOptions = { /** * Protocol allowlist applied to the resolved URL. Defaults to `ALLOWED_PROTOCOLS`. Pass an - * extended list (e.g., `Clerk`'s `#allowedRedirectProtocols`) to honor the customer-supplied + * extended list (e.g. `Clerk`'s `#allowedRedirectProtocols`) to honor the customer-supplied * `allowedRedirectProtocols` option. */ allowedProtocols?: ReadonlyArray; @@ -46,7 +46,7 @@ function stripUrlParserIgnoredChars(to: string): string { /** * Helper utility to navigate via window.location.href. Also dispatches a clerk:beforeunload custom event. * - * Navigations whose protocol is not in the allowlist (e.g., `javascript:`, `data:`) are aborted. + * Navigations whose protocol is not in the allowlist (e.g. `javascript:`, `data:`) are aborted. * Scheme-relative inputs (`//host`, `\\host`) are also rejected: they adopt the base URL's scheme, * which is always in the allowlist, so they would otherwise pass the protocol check while * redirecting cross-origin. diff --git a/packages/shared/src/keys.ts b/packages/shared/src/keys.ts index bf2616b90cf..389614332d9 100644 --- a/packages/shared/src/keys.ts +++ b/packages/shared/src/keys.ts @@ -45,12 +45,12 @@ export function buildPublishableKey(frontendApi: string): string { /** * Derives a publishable key from the current hostname. Intended for multi-domain - * setups (e.g., custom domains on top of a default domain) where the correct key + * setups (e.g. custom domains on top of a default domain) where the correct key * must be resolved per request. * * Pass the configured publishable key as `fallbackKey` so that development * instances (pk_test_) are returned as-is instead of being incorrectly derived - * from the host (e.g., localhost). + * from the host (e.g. localhost). * * @example * // React (use window.location.hostname, not window.location.host, to avoid including the port) diff --git a/packages/shared/src/pathMatcher.ts b/packages/shared/src/pathMatcher.ts index ba837d9ac38..e237b06c305 100644 --- a/packages/shared/src/pathMatcher.ts +++ b/packages/shared/src/pathMatcher.ts @@ -3,7 +3,7 @@ import type { Autocomplete } from './types'; /** * @deprecated Prefer {@link WithPathSegmentWildcard}; `(.*)` also matches sibling routes - * (e.g., `/dashboard(.*)` matches `/dashboardxyz`). + * (e.g. `/dashboard(.*)` matches `/dashboardxyz`). */ export type WithPathPatternWildcard = `${T & string}(.*)`; @@ -14,7 +14,7 @@ type StripTrailingSlash = T extends '/' : T; /** - * Suggests the `:path*` subtree form (e.g., `/dashboard/:path*`), which matches on + * Suggests the `:path*` subtree form (e.g. `/dashboard/:path*`), which matches on * path-segment boundaries. `/` is special-cased to `/:path*` to avoid a malformed `//:path*`. * * @deprecated Will be removed in the next major version together with {@link createPathMatcher}. @@ -59,7 +59,7 @@ const precomputePathRegex = (patterns: Array) => { * 1. Decodes percent-encoded unreserved characters using decodeURI (not * decodeURIComponent) so path-reserved delimiters like %2F, %3F, %23 * are preserved — matching how framework routers interpret paths. - * 2. Collapses consecutive slashes (e.g., //api/admin → /api/admin) to + * 2. Collapses consecutive slashes (e.g. //api/admin → /api/admin) to * prevent bypass via extra slashes. * * @throws {MalformedURLError} if the path contains invalid percent-encoding diff --git a/packages/shared/src/react/hooks/useOrganizationEnterpriseConnectionTestRuns.tsx b/packages/shared/src/react/hooks/useOrganizationEnterpriseConnectionTestRuns.tsx index f82095a76ae..88c65b31629 100644 --- a/packages/shared/src/react/hooks/useOrganizationEnterpriseConnectionTestRuns.tsx +++ b/packages/shared/src/react/hooks/useOrganizationEnterpriseConnectionTestRuns.tsx @@ -93,7 +93,7 @@ export type RevalidateTestRunsOptions = { * Invalidate only this query's exact `queryKey` instead of the broad * org+connection `invalidationKey`. The default broad invalidation * prefix-matches every test-runs query for the connection, so a sibling query - * (e.g., a success probe sharing the org+connection key with the visible list) + * (e.g. a success probe sharing the org+connection key with the visible list) * refetches too. Pass `true` to refetch ONLY this query and leave the siblings * — and their loading indicators — untouched. * diff --git a/packages/shared/src/telemetry/events/flow-step.ts b/packages/shared/src/telemetry/events/flow-step.ts index 6cb77ea9e82..f6cc5f936bc 100644 --- a/packages/shared/src/telemetry/events/flow-step.ts +++ b/packages/shared/src/telemetry/events/flow-step.ts @@ -4,11 +4,11 @@ const EVENT_FLOW_STEP_MOUNTED = 'FLOW_STEP_MOUNTED'; const EVENT_SAMPLING_RATE = 1; type EventFlowStepMounted = { - /** The flow the step belongs to, e.g., `configureSSO` (mirrors `Flow.Root`'s `flow`). */ + /** The flow the step belongs to, e.g. `configureSSO` (mirrors `Flow.Root`'s `flow`). */ flow: string; - /** The step/part that mounted, e.g., `verify-domain` */ + /** The step/part that mounted, e.g. `verify-domain` */ step: string; - /** Free-form, flow-specific metadata supplied by the caller (e.g., `timestamp`, `connectionStatus`). */ + /** Free-form, flow-specific metadata supplied by the caller (e.g. `timestamp`, `connectionStatus`). */ metadata: TelemetryEventRaw['payload']; } & TelemetryEventRaw['payload']; diff --git a/packages/shared/src/telemetry/notice.ts b/packages/shared/src/telemetry/notice.ts index 2adc142d6ce..17d9492758a 100644 --- a/packages/shared/src/telemetry/notice.ts +++ b/packages/shared/src/telemetry/notice.ts @@ -7,7 +7,7 @@ * frequently observed by non-developers (QA, screenshots, demos), and adding another * console warning is a common source of customer complaints. * - * Known gap: pure browser-only setups with no server-side Clerk runtime (e.g., a Vite + * Known gap: pure browser-only setups with no server-side Clerk runtime (e.g. a Vite * SPA using `@clerk/clerk-react` or `@clerk/clerk-js` directly, without any Node/Edge * backend that imports `@clerk/shared`) will never hit this code path and therefore * see no in-band disclosure. This is an accepted trade-off: the original postinstall @@ -82,7 +82,7 @@ function printNotice(): void { export type MaybeShowTelemetryNoticeOptions = { /** * Skip the notice entirely. Used when the caller has already determined that no - * telemetry will be sent (e.g., opt-out, non-development instance), in which case + * telemetry will be sent (e.g. opt-out, non-development instance), in which case * there is nothing to disclose. */ skip?: boolean; diff --git a/packages/shared/src/telemetry/types.ts b/packages/shared/src/telemetry/types.ts index 632a9a1bd61..1fb6ade01da 100644 --- a/packages/shared/src/telemetry/types.ts +++ b/packages/shared/src/telemetry/types.ts @@ -34,7 +34,7 @@ export type TelemetryCollectorOptions = { */ clerkVersion?: string; /** - * The SDK being used, e.g., `@clerk/nextjs` or `@clerk/remix`. + * The SDK being used, e.g. `@clerk/nextjs` or `@clerk/remix`. */ sdk?: string; /** diff --git a/packages/shared/src/types/clerk.ts b/packages/shared/src/types/clerk.ts index 43f4a74e38e..d27b3210b05 100644 --- a/packages/shared/src/types/clerk.ts +++ b/packages/shared/src/types/clerk.ts @@ -1062,7 +1062,7 @@ export interface Clerk { ) => Promise; /** - * Whether an OAuth transport (e.g., for Electron) has been registered. + * Whether an OAuth transport (e.g. for Electron) has been registered. * * @internal */ @@ -1337,7 +1337,7 @@ type ClerkUnsafeOptions = { /** * Disables the `Clerk has been loaded with development keys` console warning that is logged when Clerk is * initialized with development keys. The warning is emitted by `clerk-js` to the browser console; in dev servers - * that mirror browser logs to the terminal (e.g., Next.js with `experimental.browserDebugInfoInTerminal`), setting + * that mirror browser logs to the terminal (e.g. Next.js with `experimental.browserDebugInfoInTerminal`), setting * this option also stops it from showing up there. * * Each framework integration also exposes an env-var shortcut so you don't need to thread the option through @@ -1513,7 +1513,7 @@ export type ClerkOptions = ClerkOptionsNavigation & /** * Provide a transport for OAuth/SSO flows in environments where a same-document - * redirect or popup cannot be used (e.g., Electron, Tauri). When set, Clerk uses the + * redirect or popup cannot be used (e.g. Electron, Tauri). When set, Clerk uses the * transport's `getRedirectUrl` as the FAPI `redirectUrl` and calls `open` instead of * navigating the document. Intended for native desktop SDK wrappers. * diff --git a/packages/shared/src/types/oauthTransport.ts b/packages/shared/src/types/oauthTransport.ts index 94398edaa0c..4b29d943ea5 100644 --- a/packages/shared/src/types/oauthTransport.ts +++ b/packages/shared/src/types/oauthTransport.ts @@ -2,7 +2,7 @@ type Awaitable = T | Promise; /** * Transport for OAuth/SSO flows in environments where a same-document redirect or popup - * cannot be used (e.g., Electron, Tauri). Injected via `__internal_oauthTransport` in + * cannot be used (e.g. Electron, Tauri). Injected via `__internal_oauthTransport` in * `ClerkOptions`. Generic by design: "open a URL externally and wait for the callback * URL" - it knows nothing about any specific runtime. * @@ -11,7 +11,7 @@ type Awaitable = T | Promise; export type OAuthTransport = { /** * The callback/redirect URL FAPI should send the provider back to. For native runtimes - * this is an OS-registered deep link, e.g., `myapp://sso-callback`. + * this is an OS-registered deep link, e.g. `myapp://sso-callback`. */ getRedirectUrl: () => Awaitable; /** From 0333c3177bd3b1508b2a619b8a88b50f6958551e Mon Sep 17 00:00:00 2001 From: Michael Novotny Date: Mon, 20 Jul 2026 23:01:43 -0500 Subject: [PATCH 4/5] Drop unchanged packages from changeset, fix e.g. that should be i.e. Co-Authored-By: Claude Fable 5 --- .changeset/eg-ie-trailing-comma-jsdoc.md | 2 -- packages/backend/src/tokens/types.ts | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.changeset/eg-ie-trailing-comma-jsdoc.md b/.changeset/eg-ie-trailing-comma-jsdoc.md index 6669fd3395a..cd376d0bef0 100644 --- a/.changeset/eg-ie-trailing-comma-jsdoc.md +++ b/.changeset/eg-ie-trailing-comma-jsdoc.md @@ -1,7 +1,5 @@ --- '@clerk/backend': patch -'@clerk/nextjs': patch -'@clerk/react': patch '@clerk/shared': patch --- diff --git a/packages/backend/src/tokens/types.ts b/packages/backend/src/tokens/types.ts index 34f7b101c06..823503a4aba 100644 --- a/packages/backend/src/tokens/types.ts +++ b/packages/backend/src/tokens/types.ts @@ -163,7 +163,7 @@ export type OrganizationSyncTargetMatchers = { }; /** - * Represents an Organization or a Personal Account - e.g., an + * Represents an Organization or a Personal Account - i.e., an * entity that can be activated by the handshake API. */ export type OrganizationSyncTarget = From edf75506025b6f4b5049ed649304762df17cec05 Mon Sep 17 00:00:00 2001 From: Sarah Soutoul Date: Tue, 21 Jul 2026 10:19:59 +0200 Subject: [PATCH 5/5] Fix failing test --- .typedoc/__tests__/__snapshots__/clerk-properties.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.typedoc/__tests__/__snapshots__/clerk-properties.mdx b/.typedoc/__tests__/__snapshots__/clerk-properties.mdx index 571d450cf7a..2a9ba670c16 100644 --- a/.typedoc/__tests__/__snapshots__/clerk-properties.mdx +++ b/.typedoc/__tests__/__snapshots__/clerk-properties.mdx @@ -9,7 +9,7 @@ | `isSignedIn` | `boolean` | Indicates whether the current user has a valid signed-in client session. | | `isStandardBrowser` | undefined \| boolean | Indicates whether the instance is being loaded in a standard browser environment. Set to `false` on native platforms where cookies cannot be set. When `undefined`, Clerk assumes a standard browser. | | `loaded` | `boolean` | Indicates whether the `Clerk` object is ready for use. Set to `false` when the `status` is `"loading"`. Set to `true` when the `status` is `"ready"` or `"degraded"`. | -| `oauthApplication` | [`OAuthApplicationNamespace`](/docs/reference/types/oauth-application) | OAuth application helpers (e.g. consent metadata for custom consent UIs). | +| `oauthApplication` | [`OAuthApplicationNamespace`](/docs/reference/types/oauth-application) | OAuth application helpers (e.g., consent metadata for custom consent UIs). | | `organization` | undefined \| null \| [OrganizationResource](/docs/reference/objects/organization) | A shortcut to the last active `Session.user.organizationMemberships` which holds an instance of a `Organization` object. If the session is `null` or `undefined`, the user field will match. | | `proxyUrl` | undefined \| string | **Required for applications that run behind a reverse proxy**. Your Clerk app's proxy URL. Can be either a relative path (`/__clerk`) or a full URL (`https:///__clerk`). | | `publishableKey` | `string` | Your Clerk [Publishable Key](!publishable-key). |