Skip to content

test(svelte-query/{queryOptions,infiniteQueryOptions}): flatten test directories that don't require '.svelte' component files#10245

Open
sukvvon wants to merge 1 commit intoTanStack:mainfrom
sukvvon:test/svelte-query-flatten-options-test-dirs
Open

test(svelte-query/{queryOptions,infiniteQueryOptions}): flatten test directories that don't require '.svelte' component files#10245
sukvvon wants to merge 1 commit intoTanStack:mainfrom
sukvvon:test/svelte-query-flatten-options-test-dirs

Conversation

@sukvvon
Copy link
Contributor

@sukvvon sukvvon commented Mar 5, 2026

🎯 Changes

Move queryOptions and infiniteQueryOptions test files from subdirectories to tests/ root, since they don't require .svelte component files.

Other test directories (e.g., createMutation/, useMutationState/, useIsFetching/) need .svelte component files because they use setContext/getContext for sharing QueryClient across multiple hooks. These two directories only contain pure unit tests and type tests, so the subdirectory structure is unnecessary.

✅ 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
    • Updated internal test file module resolution paths to align with project structure.

…directories that don't require '.svelte' component files
@changeset-bot
Copy link

changeset-bot bot commented Mar 5, 2026

⚠️ No Changeset found

Latest commit: 5e13282

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@nx-cloud
Copy link

nx-cloud bot commented Mar 5, 2026

View your CI Pipeline Execution ↗ for commit 5e13282

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

☁️ Nx Cloud last updated this comment at 2026-03-05 10:38:38 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 5, 2026

More templates

@tanstack/angular-query-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@10245

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@10245

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: 313d644

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 5, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 812c1c60-62ec-48b9-a47e-662b30194d89

📥 Commits

Reviewing files that changed from the base of the PR and between fe25edc and 5e13282.

📒 Files selected for processing (4)
  • packages/svelte-query/tests/infiniteQueryOptions.svelte.test.ts
  • packages/svelte-query/tests/infiniteQueryOptions.test-d.ts
  • packages/svelte-query/tests/queryOptions.svelte.test.ts
  • packages/svelte-query/tests/queryOptions.test-d.ts

📝 Walkthrough

Walkthrough

Test files in the svelte-query package have their relative import paths updated from a two-level up path to a one-level up path. No functional or logic changes are introduced; this adjustment modifies only module resolution within test files.

Changes

Cohort / File(s) Summary
Test Import Path Updates
packages/svelte-query/tests/infiniteQueryOptions.svelte.test.ts, packages/svelte-query/tests/infiniteQueryOptions.test-d.ts, packages/svelte-query/tests/queryOptions.svelte.test.ts, packages/svelte-query/tests/queryOptions.test-d.ts
Updated relative import paths from ../../src/index.js to ../src/index.js, adjusting module resolution context without affecting test functionality.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Imports aligned with cleaner paths,
One hop less through the module graphs,
Tests now find their way so true,
From deep to shallow, fresh and new,
A nimble fix for our query crew! 🌿

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: flattening test directories for queryOptions and infiniteQueryOptions that don't require .svelte component files.
Description check ✅ Passed The description follows the template structure with all required sections filled: Changes section explains what was moved and why, Checklist items are marked, and Release Impact section indicates this is dev-only.
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.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

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.

1 participant