Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/wild-animals-call.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
Comment on lines +1 to +2
Copy link
Contributor

@coderabbitai coderabbitai bot Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Incomplete changeset: missing required metadata and description.

Changeset files require package metadata and a description to support automated releases. The current file contains only YAML separators with no content between them.

A valid changeset should follow this structure:

 ---
+"@clerk/shared": minor
+"@clerk/types": minor
 ---
+
+Update Cursor rules to use @clerk/shared/types and add guidance for resolving type errors.

Reference the Changesets documentation for required format.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
---
---
---
@clerk/shared: minor
@clerk/types: minor
---
Update Cursor rules to use @clerk/shared/types and add guidance for resolving type errors.
🧰 Tools
🪛 LanguageTool

[grammar] ~1-~1: Hier könnte ein Fehler sein.
Context: --- ---

(QB_NEW_DE)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty changesets like this are a specific action. They do not need to be called out as incomplete.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dstaley, thank you for the clarification! I understand now that empty changesets with only YAML separators serve a specific purpose in your workflow. I'll make note of this to avoid flagging them as incomplete in future reviews.

(\__/)
(•ㅅ•)
/ >📝  *Taking notes!*

✏️ Learnings added
Learnt from: dstaley
Repo: clerk/javascript PR: 7196
File: .changeset/wild-animals-call.md:1-2
Timestamp: 2025-11-10T17:43:09.237Z
Learning: In the clerk/javascript repository, empty changeset files (containing only "---\n---" with no content) are intentional and serve a specific action. These should not be flagged as incomplete or requiring metadata and description.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

22 changes: 18 additions & 4 deletions .cursor/rules/monorepo.mdc
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
---
description:
globs:
description:
globs:
alwaysApply: true
---

Monorepo Architecture and Structure

Repository Overview

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

Core Package Categories

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

Directory Structure

- `packages/` - All publishable packages
- `integration/` - End-to-end tests and integration templates
- `playground/` - Development and testing applications
Expand All @@ -31,6 +35,7 @@ Directory Structure
- `tools/` - Internal development tools

Development Workflow

- Use `pnpm dev` to start development mode for all packages
- Use `pnpm build` to build all packages
- Use `pnpm test` to run unit tests across all packages
Expand All @@ -39,6 +44,7 @@ Development Workflow
- Changesets for version management and release automation

Framework-Specific Packages

- `@clerk/nextjs` - Next.js App Router and Pages Router support
- `@clerk/clerk-react` - React hooks and components
- `@clerk/vue` - Vue.js composables and components
Expand All @@ -50,6 +56,7 @@ Framework-Specific Packages
- `@clerk/expo` - React Native/Expo SDK

Testing Architecture

- Unit tests with Jest and Vitest
- Integration tests with Playwright
- Component testing with React Testing Library
Expand All @@ -58,6 +65,7 @@ Testing Architecture
- Separate test configurations per framework

Build System

- Turbo for monorepo orchestration and caching
- tsup for TypeScript compilation and bundling
- ESLint with custom configurations for different package types
Expand All @@ -66,26 +74,32 @@ Build System
- Type checking with TypeScript and publint

Environment Configuration
- Supports multiple Clerk environment variables (CLERK_*, NEXT_PUBLIC_CLERK_*, etc.)

- Supports multiple Clerk environment variables (CLERK*\*, NEXT_PUBLIC_CLERK*\*, etc.)
- Development, staging, and production configurations
- Verdaccio for local npm registry testing
- Docker support for integration testing
- CI/CD with GitHub Actions

Localization Support

- `packages/localizations/` contains translations for 30+ languages
- Modular localization system allowing partial imports
- Support for RTL languages
- Framework-agnostic translation utilities

Package Interdependency Rules

- `@clerk/shared` is a common dependency for most packages
- `@clerk/types` provides TypeScript definitions used across packages
- `@clerk/shared/types` provides TypeScript definitions used across packages
- `@clerk/types` is an alias for `@clerk/shared/types`, but its usage is deprecated. Prefer using `@clerk/shared/types`.
- 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.
- `@clerk/backend` is independent and used for server-side operations
- Framework packages depend on `@clerk/clerk-js` for core functionality
- Integration packages build upon framework-specific packages

Release Management

- Automated releases with Changesets
- Semantic versioning across all packages
- Canary and snapshot releases for testing
Expand Down
Loading