Skip to content

Commit c4ef279

Browse files
Merge branch 'main' into alexcarpenter/social-buttons-layout-mobile
2 parents 0103127 + 892d5b4 commit c4ef279

File tree

110 files changed

+1790
-496
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+1790
-496
lines changed

.changeset/great-cobras-give.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

.cursor/rules/monorepo.mdc

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description:
3-
globs:
2+
description:
3+
globs:
44
alwaysApply: true
55
---
6+
67
Monorepo Architecture and Structure
78

89
Repository Overview
10+
911
- This is the official Clerk JavaScript SDK monorepo containing all Clerk authentication packages
1012
- Clerk provides streamlined user experiences for sign up, sign in, and profile management
1113
- All packages are published under the @clerk namespace on npm
1214
- Uses pnpm as the package manager with Turbo for build orchestration
1315
- Supports multiple JavaScript frameworks and environments
1416

1517
Core Package Categories
18+
1619
- **Core SDK**: `@clerk/clerk-js` - Core browser SDK with UI components
1720
- **Framework Integrations**: Next.js, React, Vue, Astro, Nuxt, Remix, Express, Fastify
1821
- **Platform Support**: Expo (React Native), Chrome Extension
@@ -23,6 +26,7 @@ Core Package Categories
2326
- **Specialized**: `@clerk/agent-toolkit` - AI agent integration tools
2427

2528
Directory Structure
29+
2630
- `packages/` - All publishable packages
2731
- `integration/` - End-to-end tests and integration templates
2832
- `playground/` - Development and testing applications
@@ -31,6 +35,7 @@ Directory Structure
3135
- `tools/` - Internal development tools
3236

3337
Development Workflow
38+
3439
- Use `pnpm dev` to start development mode for all packages
3540
- Use `pnpm build` to build all packages
3641
- Use `pnpm test` to run unit tests across all packages
@@ -39,6 +44,7 @@ Development Workflow
3944
- Changesets for version management and release automation
4045

4146
Framework-Specific Packages
47+
4248
- `@clerk/nextjs` - Next.js App Router and Pages Router support
4349
- `@clerk/clerk-react` - React hooks and components
4450
- `@clerk/vue` - Vue.js composables and components
@@ -50,6 +56,7 @@ Framework-Specific Packages
5056
- `@clerk/expo` - React Native/Expo SDK
5157

5258
Testing Architecture
59+
5360
- Unit tests with Jest and Vitest
5461
- Integration tests with Playwright
5562
- Component testing with React Testing Library
@@ -58,6 +65,7 @@ Testing Architecture
5865
- Separate test configurations per framework
5966

6067
Build System
68+
6169
- Turbo for monorepo orchestration and caching
6270
- tsup for TypeScript compilation and bundling
6371
- ESLint with custom configurations for different package types
@@ -66,26 +74,32 @@ Build System
6674
- Type checking with TypeScript and publint
6775

6876
Environment Configuration
69-
- Supports multiple Clerk environment variables (CLERK_*, NEXT_PUBLIC_CLERK_*, etc.)
77+
78+
- Supports multiple Clerk environment variables (CLERK*\*, NEXT_PUBLIC_CLERK*\*, etc.)
7079
- Development, staging, and production configurations
7180
- Verdaccio for local npm registry testing
7281
- Docker support for integration testing
7382
- CI/CD with GitHub Actions
7483

7584
Localization Support
85+
7686
- `packages/localizations/` contains translations for 30+ languages
7787
- Modular localization system allowing partial imports
7888
- Support for RTL languages
7989
- Framework-agnostic translation utilities
8090

8191
Package Interdependency Rules
92+
8293
- `@clerk/shared` is a common dependency for most packages
83-
- `@clerk/types` provides TypeScript definitions used across packages
94+
- `@clerk/shared/types` provides TypeScript definitions used across packages
95+
- `@clerk/types` is an alias for `@clerk/shared/types`, but its usage is deprecated. Prefer using `@clerk/shared/types`.
96+
- If a TypeScript error comes from a type imported from `@clerk/shared/types`, run `turbo build --filter=@clerk/shared --filter=@clerk/types` to make sure the latest version of the packages are being used.
8497
- `@clerk/backend` is independent and used for server-side operations
8598
- Framework packages depend on `@clerk/clerk-js` for core functionality
8699
- Integration packages build upon framework-specific packages
87100

88101
Release Management
102+
89103
- Automated releases with Changesets
90104
- Semantic versioning across all packages
91105
- Canary and snapshot releases for testing

.typedoc/custom-plugin.mjs

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,50 @@ function getRelativeLinkReplacements() {
9898
function getCatchAllReplacements() {
9999
return [
100100
{
101-
pattern: /\(setActiveParams\)/g,
102-
replace: '([setActiveParams](/docs/reference/javascript/types/set-active-params))',
101+
pattern: /(?<![\[\w`])`Appearance`\\<`Theme`\\>/g,
102+
replace: '[`Appearance<Theme>`](/docs/guides/customizing-clerk/appearance-prop/overview)',
103+
},
104+
{
105+
pattern: /\(CreateOrganizationParams\)/g,
106+
replace: '([CreateOrganizationParams](#create-organization-params))',
103107
},
104108
{
105109
pattern: /`LoadedClerk`/g,
106110
replace: '[Clerk](/docs/reference/javascript/clerk)',
107111
},
108112
{
109-
pattern: /\(CreateOrganizationParams\)/g,
110-
replace: '([CreateOrganizationParams](#create-organization-params))',
113+
pattern: /(?<![\[\w`])`?LocalizationResource`?(?![\]\w`])/g,
114+
replace: '[`LocalizationResource`](/docs/guides/customizing-clerk/localization)',
115+
},
116+
{
117+
// SessionResource appears in plain text, with an array next to it, with backticks, etc.
118+
// e.g. `SessionResource[]`
119+
pattern: /(?<![`[\]])\bSessionResource(\[\])?\b(?![\]\)`])/g,
120+
replace: '[`SessionResource`](/docs/reference/javascript/session)$1',
121+
},
122+
{
123+
pattern: /(?<![\[\w`])`?SessionStatusClaim`?(?![\]\w`])/g,
124+
replace: '[`SessionStatusClaim`](/docs/reference/javascript/types/session-status)',
111125
},
112126
{
113-
pattern: /\| `SignInResource` \|/,
114-
replace: '| [SignInResource](/docs/reference/javascript/sign-in) |',
127+
pattern: /(?<![`[\]])\bSetActiveParams\b(?![\]\(])/g,
128+
replace: '[SetActiveParams](/docs/reference/javascript/types/set-active-params)',
129+
},
130+
{
131+
pattern: /(?<![\[\w`])`?SignInResource`?(?![\]\w`])/g,
132+
replace: '[`SignInResource`](/docs/reference/javascript/sign-in)',
133+
},
134+
{
135+
pattern: /(?<![\[\w`])`?SignedInSessionResource`?(?![\]\w`])/g,
136+
replace: '[`SignedInSessionResource`](/docs/reference/javascript/session)',
137+
},
138+
{
139+
pattern: /(?<![\[\w`])`?SignUpResource`?(?![\]\w`])/g,
140+
replace: '[`SignUpResource`](/docs/reference/javascript/sign-up)',
141+
},
142+
{
143+
pattern: /(?<![\[\w`])`?OrganizationResource`?(?![\]\w`])/g,
144+
replace: '[`OrganizationResource`](/docs/reference/javascript/organization)',
115145
},
116146
{
117147
pattern: /`OrganizationPrivateMetadata`/g,
@@ -142,6 +172,10 @@ function getCatchAllReplacements() {
142172
replace:
143173
'[`OrganizationMembershipPublicMetadata`](/docs/reference/javascript/types/metadata#organization-membership-public-metadata)',
144174
},
175+
{
176+
pattern: /(?<![\[\w`])`?UserResource`?(?![\]\w`])/g,
177+
replace: '[`UserResource`](/docs/reference/javascript/user)',
178+
},
145179
{
146180
/**
147181
* By default, `@deprecated` is output with `**Deprecated**`. We want to add a full stop to it.

integration/testUtils/usersService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ export const createUserService = (clerkClient: ClerkClient) => {
200200

201201
const apiKey = await clerkClient.apiKeys.create({
202202
subject: userId,
203-
name: `Integration Test - ${userId}`,
203+
name: `Integration Test - ${faker.string.uuid()}`,
204204
secondsUntilExpiration: TWENTY_MINUTES,
205205
});
206206

0 commit comments

Comments
 (0)