Skip to content

Conversation

dstaley
Copy link
Member

@dstaley dstaley commented Sep 4, 2025

Description

@clerk/elements references types from the type-fest package in its generated output, but it only specifies type-fest as a devDependency. This results in the package not being installed when @clerk/elements is installed, resulting in broken types.

CleanShot 2025-09-04 at 15 02 38@2x

This PR fixes the issue by moving type-fest to dependencies.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Summary by CodeRabbit

  • Bug Fixes

    • Corrected dependency configuration in Elements to include a required runtime package, preventing potential install/build errors for consumers.
  • Chores

    • Added release metadata to publish a patch update for Elements.

Copy link

changeset-bot bot commented Sep 4, 2025

🦋 Changeset detected

Latest commit: 3e8c706

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clerk/elements Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

coderabbitai bot commented Sep 4, 2025

Walkthrough

Introduces a new changeset file for a patch release and updates dependency management by moving type-fest from devDependencies to dependencies in packages/elements/package.json. No source code or public API changes.

Changes

Cohort / File(s) Summary
Changeset metadata
\.changeset/silent-women-dance.md
Adds a changeset describing a patch release for @clerk/elements, noting proper inclusion of type-fest as a dependency.
Dependencies update
packages/elements/package.json
Moves "type-fest": "^4.41.0" from devDependencies to dependencies; no other dependency changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

Patch notes hop on parchment bright,
A tidy tweak in moonlit night—
type-fest moved to where it runs,
carrots counted, jobs well done.
I twitch my ears, dependencies align,
shipping smooth on release-time line.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ds.fix/elements-type-fest

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

vercel bot commented Sep 4, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
clerk-js-sandbox Ready Ready Preview Comment Sep 4, 2025 8:02pm

Copy link

pkg-pr-new bot commented Sep 4, 2025

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@6711

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@6711

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@6711

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@6711

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@6711

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@6711

@clerk/elements

npm i https://pkg.pr.new/@clerk/elements@6711

@clerk/clerk-expo

npm i https://pkg.pr.new/@clerk/clerk-expo@6711

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@6711

@clerk/express

npm i https://pkg.pr.new/@clerk/express@6711

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@6711

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@6711

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@6711

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@6711

@clerk/clerk-react

npm i https://pkg.pr.new/@clerk/clerk-react@6711

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@6711

@clerk/remix

npm i https://pkg.pr.new/@clerk/remix@6711

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@6711

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@6711

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@6711

@clerk/themes

npm i https://pkg.pr.new/@clerk/themes@6711

@clerk/types

npm i https://pkg.pr.new/@clerk/types@6711

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@6711

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@6711

commit: 3e8c706

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
.changeset/silent-women-dance.md (1)

5-5: Polish the wording.

Consider “Correctly specify dependency on the type-fest package.” (add “the”) and briefly note the reason: moved from devDependencies to dependencies to fix downstream type resolution.

packages/elements/package.json (1)

74-86: Optionally align with repo-wide version management.

If you standardize deps via a “catalog” (e.g., catalog:repo like tslib), consider adding type-fest there to keep versions consistent across packages.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b2f8c22 and 3e8c706.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • .changeset/silent-women-dance.md (1 hunks)
  • packages/elements/package.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
.changeset/**

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

Automated releases must use Changesets.

Files:

  • .changeset/silent-women-dance.md
**/*.{js,jsx,ts,tsx,json,css,scss,md,yaml,yml}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use Prettier for consistent code formatting

Files:

  • packages/elements/package.json
packages/*/package.json

📄 CodeRabbit inference engine (.cursor/rules/global.mdc)

All publishable packages should be placed under the packages/ directory

packages/*/package.json: All publishable packages must be located in the 'packages/' directory.
All packages must be published under the @clerk namespace on npm.
Semantic versioning must be used across all packages.

Files:

  • packages/elements/package.json
🪛 LanguageTool
.changeset/silent-women-dance.md

[grammar] ~5-~5: There might be a mistake here.
Context: ...ecify dependency on type-fest package.

(QB_NEW_EN)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Formatting | Dedupe | Changeset
  • GitHub Check: Build Packages
  • GitHub Check: semgrep/ci
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (3)
.changeset/silent-women-dance.md (1)

1-3: Changeset scope and bump look correct.

Patch release targeted at @clerk/elements is appropriate for a dependency classification fix.

packages/elements/package.json (2)

84-86: Good fix: make type-fest a runtime dependency.

This ensures consumers install the types referenced by published d.ts files. No other runtime surface changes—LGTM.


74-86: Confirm published declarations import type-fest. Versions are aligned across the workspace (both @clerk/elements and @clerk/chrome-extension use ^4.41.0) and all TS imports are import type. I couldn’t build the .d.ts locally—please verify that packages/elements/dist/*.d.ts contains import type {…} from 'type-fest' to justify keeping it in dependencies, otherwise move it to devDependencies.

@dstaley dstaley merged commit e586dff into main Sep 4, 2025
43 checks passed
@dstaley dstaley deleted the ds.fix/elements-type-fest branch September 4, 2025 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants