Skip to content

Conversation

@nikosdouvlis
Copy link
Member

@nikosdouvlis nikosdouvlis commented Dec 24, 2025

Why: CJS cookie package causing module compatibility problems in Astro and TanStack Start
What: Move cookie to devDependencies and bundle with tsup noExternal config

Description

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

  • Chores
    • Adjusted backend dependency handling: moved a cookie dependency to dev-dependencies and updated the build to treat it as external during bundling.
    • Added a changeset to record the patch and improve module compatibility with downstream apps.

✏️ Tip: You can customize this high-level summary in your review settings.

Why: CJS cookie package causing module compatibility problems in Astro and TanStack Start
What: Move cookie to devDependencies and bundle with tsup noExternal config
@changeset-bot
Copy link

changeset-bot bot commented Dec 24, 2025

🦋 Changeset detected

Latest commit: 00dda79

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

This PR includes changesets to release 10 packages
Name Type
@clerk/backend Patch
@clerk/agent-toolkit Patch
@clerk/astro Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/tanstack-react-start Patch
@clerk/testing 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

@vercel
Copy link

vercel bot commented Dec 24, 2025

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

Project Deployment Review Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Dec 24, 2025 2:56pm

@nikosdouvlis
Copy link
Member Author

!snapshot

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 24, 2025

📝 Walkthrough

Walkthrough

This pull request moves the cookie package from dependencies to devDependencies in packages/backend/package.json. It also expands the noExternal array in packages/backend/tsup.config.ts from ['snakecase-keys'] to ['snakecase-keys', 'cookie'], causing the cookie package to be treated as external during bundling and inherited by downstream ESM/CJS builds.

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: bundling the cookie package to resolve CommonJS/ESM compatibility issues in the backend.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • 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 290d2f7 and 00dda79.

📒 Files selected for processing (1)
  • .changeset/rotten-months-repair.md
⏰ 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). (26)
  • GitHub Check: Integration Tests (machine, chrome)
  • GitHub Check: Integration Tests (billing, chrome, RQ)
  • GitHub Check: Integration Tests (quickstart, chrome, 15)
  • GitHub Check: Integration Tests (quickstart, chrome, 16)
  • GitHub Check: Integration Tests (machine, chrome, RQ)
  • GitHub Check: Integration Tests (nextjs, chrome, 16, RQ)
  • GitHub Check: Integration Tests (nextjs, chrome, 16)
  • GitHub Check: Integration Tests (react-router, chrome)
  • GitHub Check: Integration Tests (custom, chrome)
  • GitHub Check: Integration Tests (vue, chrome)
  • GitHub Check: Integration Tests (nextjs, chrome, 15)
  • GitHub Check: Integration Tests (billing, chrome)
  • GitHub Check: Integration Tests (astro, chrome)
  • GitHub Check: Integration Tests (handshake:staging, chrome)
  • GitHub Check: Integration Tests (tanstack-react-start, chrome)
  • GitHub Check: Integration Tests (nuxt, chrome)
  • GitHub Check: Integration Tests (handshake, chrome)
  • GitHub Check: Integration Tests (ap-flows, chrome)
  • GitHub Check: Integration Tests (express, chrome)
  • GitHub Check: Integration Tests (sessions, chrome)
  • GitHub Check: Integration Tests (sessions:staging, chrome)
  • GitHub Check: Integration Tests (generic, chrome)
  • GitHub Check: Integration Tests (localhost, chrome)
  • GitHub Check: Build Packages
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (1)
.changeset/rotten-months-repair.md (1)

1-5: Changeset structure and description look correct.

The changeset correctly declares a patch-level version bump and provides a clear description of the change rationale (fixing module compatibility with TanStack Start by bundling the cookie package).

However, this review only covers the changeset documentation file. Please verify that the actual implementation changes align with this description:

  • packages/backend/package.json: cookie moved from dependencies to devDependencies
  • packages/backend/tsup.config.ts: cookie added to the noExternal array

Since those files are not provided in this review, I cannot confirm the implementation is complete. Can you share the diffs for those files or confirm they've been updated accordingly?


Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 24, 2025

Open in StackBlitz

@clerk/agent-toolkit

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

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@7524

@clerk/upgrade

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

@clerk/vue

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

commit: 00dda79

@clerk-cookie
Copy link
Collaborator

Hey @nikosdouvlis - the snapshot version command generated the following package versions:

Package Version
@clerk/agent-toolkit 0.2.9-snapshot.v20251224145055
@clerk/astro 3.0.0-snapshot.v20251224145055
@clerk/backend 3.0.0-snapshot.v20251224145055
@clerk/chrome-extension 3.0.0-snapshot.v20251224145055
@clerk/clerk-js 6.0.0-snapshot.v20251224145055
@clerk/dev-cli 1.0.0-snapshot.v20251224145055
@clerk/expo 3.0.0-snapshot.v20251224145055
@clerk/expo-passkeys 1.0.0-snapshot.v20251224145055
@clerk/express 2.0.0-snapshot.v20251224145055
@clerk/fastify 2.6.9-snapshot.v20251224145055
@clerk/localizations 4.0.0-snapshot.v20251224145055
@clerk/nextjs 7.0.0-snapshot.v20251224145055
@clerk/nuxt 2.0.0-snapshot.v20251224145055
@clerk/react 6.0.0-snapshot.v20251224145055
@clerk/react-router 3.0.0-snapshot.v20251224145055
@clerk/shared 4.0.0-snapshot.v20251224145055
@clerk/tanstack-react-start 1.0.0-snapshot.v20251224145055
@clerk/testing 2.0.0-snapshot.v20251224145055
@clerk/ui 1.0.0-snapshot.v20251224145055
@clerk/upgrade 2.0.0-snapshot.v20251224145055
@clerk/vue 2.0.0-snapshot.v20251224145055

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/agent-toolkit

npm i @clerk/agent-toolkit@0.2.9-snapshot.v20251224145055 --save-exact

@clerk/astro

npm i @clerk/astro@3.0.0-snapshot.v20251224145055 --save-exact

@clerk/backend

npm i @clerk/backend@3.0.0-snapshot.v20251224145055 --save-exact

@clerk/chrome-extension

npm i @clerk/chrome-extension@3.0.0-snapshot.v20251224145055 --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@6.0.0-snapshot.v20251224145055 --save-exact

@clerk/dev-cli

npm i @clerk/dev-cli@1.0.0-snapshot.v20251224145055 --save-exact

@clerk/expo

npm i @clerk/expo@3.0.0-snapshot.v20251224145055 --save-exact

@clerk/expo-passkeys

npm i @clerk/expo-passkeys@1.0.0-snapshot.v20251224145055 --save-exact

@clerk/express

npm i @clerk/express@2.0.0-snapshot.v20251224145055 --save-exact

@clerk/fastify

npm i @clerk/fastify@2.6.9-snapshot.v20251224145055 --save-exact

@clerk/localizations

npm i @clerk/localizations@4.0.0-snapshot.v20251224145055 --save-exact

@clerk/nextjs

npm i @clerk/nextjs@7.0.0-snapshot.v20251224145055 --save-exact

@clerk/nuxt

npm i @clerk/nuxt@2.0.0-snapshot.v20251224145055 --save-exact

@clerk/react

npm i @clerk/react@6.0.0-snapshot.v20251224145055 --save-exact

@clerk/react-router

npm i @clerk/react-router@3.0.0-snapshot.v20251224145055 --save-exact

@clerk/shared

npm i @clerk/shared@4.0.0-snapshot.v20251224145055 --save-exact

@clerk/tanstack-react-start

npm i @clerk/tanstack-react-start@1.0.0-snapshot.v20251224145055 --save-exact

@clerk/testing

npm i @clerk/testing@2.0.0-snapshot.v20251224145055 --save-exact

@clerk/ui

npm i @clerk/ui@1.0.0-snapshot.v20251224145055 --save-exact

@clerk/upgrade

npm i @clerk/upgrade@2.0.0-snapshot.v20251224145055 --save-exact

@clerk/vue

npm i @clerk/vue@2.0.0-snapshot.v20251224145055 --save-exact

Copy link
Member

@wobsoriano wobsoriano left a comment

Choose a reason for hiding this comment

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

Thanks!!

@nikosdouvlis nikosdouvlis merged commit 063ab4d into main Dec 25, 2025
44 checks passed
@nikosdouvlis nikosdouvlis deleted the nikos/bundle-cookie-pkg branch December 25, 2025 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants