Skip to content

fix(shared,clerk-js): loosen @tanstack/query-core pin to caret range#8417

Merged
jacekradko merged 2 commits intomainfrom
jacek/loosen-query-core-pin
Apr 29, 2026
Merged

fix(shared,clerk-js): loosen @tanstack/query-core pin to caret range#8417
jacekradko merged 2 commits intomainfrom
jacek/loosen-query-core-pin

Conversation

@jacekradko
Copy link
Copy Markdown
Member

Summary

  • Bumps @tanstack/query-core from an exact pin (5.90.16) to ^5.90.16 in @clerk/shared and @clerk/clerk-js
  • Lets the dependency dedupe with consumer-installed @tanstack/react-query versions, which pin query-core to their exact same patch version

Motivation

Vite's resolve.dedupe resolves modules from the project root's node_modules/ only. Under Bun's content-addressable layout, transitive deps are hoisted to root only when they can be deduped to a single version across the dep graph. With our exact pin, any consumer whose react-query resolved to a different query-core patch (e.g. 5.100.x) ended up with two nested copies, neither hoisted to root, so Vite's dedupe failed to resolve @tanstack/query-core and the app crashed.

This was reproducing intermittently in Lovable apps (TanStack Start + Bun, no lockfile). Each fresh install pulled the latest react-query@5.x, which pulled a query-core that didn't satisfy our exact 5.90.16. The caret allows dedupe to land on whichever 5.x the consumer's react-query brings.

Test plan

  • CI green
  • Reproduction in a Lovable-style app (TanStack Start + Bun, saveTextLockfile = false) resolves @tanstack/query-core cleanly under Vite resolve.dedupe

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 29, 2026

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

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Apr 29, 2026 6:40am

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 29, 2026

🦋 Changeset detected

Latest commit: 9a09c53

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

This PR includes changesets to release 20 packages
Name Type
@clerk/shared Patch
@clerk/clerk-js Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/chrome-extension Patch
@clerk/expo-passkeys Patch
@clerk/expo Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/hono Patch
@clerk/localizations Patch
@clerk/msw Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/react Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/ui Patch
@clerk/vue 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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 29, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 50248a5b-0ccb-449a-87f1-44003b6a3f55

📥 Commits

Reviewing files that changed from the base of the PR and between e0a63f9 and a2fe92a.

📒 Files selected for processing (3)
  • .changeset/loosen-query-core-pin.md
  • packages/clerk-js/package.json
  • packages/shared/package.json

📝 Walkthrough

Walkthrough

This pull request updates the dependency constraint for @tanstack/query-core from exact pinned versions to caret ranges across two packages. Changes include modifying packages/clerk-js/package.json and packages/shared/package.json to use ^5.90.16 instead of 5.90.16, and adding a corresponding Changesets metadata entry documenting the patch-level release for both packages.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: loosening the @tanstack/query-core dependency from an exact pin to a caret range in shared and clerk-js packages.
Description check ✅ Passed The description is directly related to the changeset, clearly explaining the motivation behind loosening the dependency pin and how it resolves Bun/Vite deduplication issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Review rate limit: 4/5 reviews remaining, refill in 12 minutes.

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

Copy link
Copy Markdown
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.

Thank you!

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 29, 2026

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@8417

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 9a09c53

@jacekradko jacekradko merged commit a9f9b29 into main Apr 29, 2026
62 of 74 checks passed
@jacekradko jacekradko deleted the jacek/loosen-query-core-pin branch April 29, 2026 07:14
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.

2 participants