Skip to content

Conversation

@976520
Copy link
Contributor

@976520 976520 commented Dec 31, 2025

🎯 Changes

declared typescript as an optional peer dependency to prevent warnings in strict package managers when typescript is not installed.

(resloved #9846)

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Chores
    • Declares TypeScript (>=5.0.0 <6.0.0) as a peer dependency for the eslint-plugin-query package.
    • Marks the TypeScript peer dependency as optional in package metadata so projects without TypeScript remain unaffected.
    • Adds a patch-level changeset recording the peer dependency update.

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

@changeset-bot
Copy link

changeset-bot bot commented Dec 31, 2025

🦋 Changeset detected

Latest commit: c239d03

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

This PR includes changesets to release 1 package
Name Type
@tanstack/eslint-plugin-query 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
Contributor

coderabbitai bot commented Dec 31, 2025

📝 Walkthrough

Walkthrough

Adds typescript as an optional peer dependency to packages/eslint-plugin-query/package.json (^5.0.0) and adds a peerDependenciesMeta entry marking it optional; no other dependencies or exported/public declarations changed.

Changes

Cohort / File(s) Summary
Peer dependency declarations
packages/eslint-plugin-query/package.json
Add typescript: "^5.0.0" to peerDependencies and add peerDependenciesMeta with { "typescript": { "optional": true } }
Changeset
.changeset/soft-cherries-hide.md
Add patch changeset noting TypeScript declared as an optional peer dependency for @tanstack/eslint-plugin-query

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

  • lachlancollins

Poem

🐰 In package fields I nibbled a line,
TypeScript optional—keeps things fine,
A tiny hop, a careful tweak,
Gentle change, no havoc to wreak,
🥕🐇

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: declaring TypeScript as an optional peer dependency in the eslint-plugin-query package.
Description check ✅ Passed The description follows the template structure with all required sections completed: Changes section explains the fix, both checklist items are marked, and Release Impact indicates it's docs/CI/dev-only with no changeset needed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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: 1

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 14c0ec8 and ef7ff82.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • packages/eslint-plugin-query/package.json
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: TkDodo
Repo: TanStack/query PR: 9612
File: packages/query-async-storage-persister/src/asyncThrottle.ts:0-0
Timestamp: 2025-09-02T17:57:33.184Z
Learning: When importing from tanstack/query-core in other TanStack Query packages like query-async-storage-persister, a workspace dependency "tanstack/query-core": "workspace:*" needs to be added to the package.json.
Learnt from: oscartbeaumont
Repo: TanStack/query PR: 9564
File: packages/solid-query-devtools/src/production.tsx:2-3
Timestamp: 2025-08-19T03:18:18.303Z
Learning: In the solid-query-devtools package, the codebase uses a pattern of type-only default imports combined with typeof for component type annotations (e.g., `import type SolidQueryDevtoolsComp from './devtools'` followed by `typeof SolidQueryDevtoolsComp`). This pattern is consistently used across index.tsx and production.tsx files, and the maintainers prefer consistency over changing this approach.
📚 Learning: 2025-09-02T17:57:33.184Z
Learnt from: TkDodo
Repo: TanStack/query PR: 9612
File: packages/query-async-storage-persister/src/asyncThrottle.ts:0-0
Timestamp: 2025-09-02T17:57:33.184Z
Learning: When importing from tanstack/query-core in other TanStack Query packages like query-async-storage-persister, a workspace dependency "tanstack/query-core": "workspace:*" needs to be added to the package.json.

Applied to files:

  • packages/eslint-plugin-query/package.json
📚 Learning: 2025-08-19T03:18:18.303Z
Learnt from: oscartbeaumont
Repo: TanStack/query PR: 9564
File: packages/solid-query-devtools/src/production.tsx:2-3
Timestamp: 2025-08-19T03:18:18.303Z
Learning: In the solid-query-devtools package, the codebase uses a pattern of type-only default imports combined with typeof for component type annotations (e.g., `import type SolidQueryDevtoolsComp from './devtools'` followed by `typeof SolidQueryDevtoolsComp`). This pattern is consistently used across index.tsx and production.tsx files, and the maintainers prefer consistency over changing this approach.

Applied to files:

  • packages/eslint-plugin-query/package.json

@nx-cloud
Copy link

nx-cloud bot commented Dec 31, 2025

View your CI Pipeline Execution ↗ for commit c239d03

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 4m 51s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-01-24 09:17:37 UTC

@TkDodo
Copy link
Collaborator

TkDodo commented Dec 31, 2025

you need to update the lockfile!

@976520
Copy link
Contributor Author

976520 commented Dec 31, 2025

@TkDodo

good catch, thanks — and happy new year!

c1a8e4d

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 24, 2026

More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@10007

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@10007

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@10007

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@10007

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@10007

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@10007

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@10007

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@10007

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@10007

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@10007

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@10007

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@10007

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@10007

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@10007

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@10007

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@10007

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@10007

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@10007

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@10007

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@10007

commit: c239d03

@sentry
Copy link

sentry bot commented Jan 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 36.87%. Comparing base (7ac4e20) to head (c239d03).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #10007   +/-   ##
=======================================
  Coverage   36.87%   36.87%           
=======================================
  Files         245      245           
  Lines       11103    11103           
  Branches     2081     2088    +7     
=======================================
  Hits         4094     4094           
  Misses       6484     6484           
  Partials      525      525           
Components Coverage Δ
@tanstack/angular-query-experimental 46.35% <ø> (ø)
@tanstack/eslint-plugin-query 88.92% <ø> (ø)
@tanstack/query-async-storage-persister 43.85% <ø> (ø)
@tanstack/query-broadcast-client-experimental 24.39% <ø> (ø)
@tanstack/query-codemods 0.00% <ø> (ø)
@tanstack/query-core 75.55% <ø> (ø)
@tanstack/query-devtools 3.38% <ø> (ø)
@tanstack/query-persist-client-core 80.12% <ø> (ø)
@tanstack/query-sync-storage-persister 84.61% <ø> (ø)
@tanstack/query-test-utils 77.77% <ø> (ø)
@tanstack/react-query 29.00% <ø> (ø)
@tanstack/react-query-devtools 9.25% <ø> (ø)
@tanstack/react-query-next-experimental ∅ <ø> (∅)
@tanstack/react-query-persist-client 100.00% <ø> (ø)
@tanstack/solid-query 53.52% <ø> (ø)
@tanstack/solid-query-devtools 64.17% <ø> (ø)
@tanstack/solid-query-persist-client 100.00% <ø> (ø)
@tanstack/svelte-query ∅ <ø> (∅)
@tanstack/svelte-query-devtools ∅ <ø> (∅)
@tanstack/svelte-query-persist-client ∅ <ø> (∅)
@tanstack/vue-query 35.67% <ø> (ø)
@tanstack/vue-query-devtools ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@TkDodo TkDodo merged commit ed5e5fc into TanStack:main Jan 24, 2026
9 checks passed
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.

Missing peer dependency declaration for TypeScript (YN0086 warnings under Yarn 4)

2 participants