Skip to content

fix({preact,solid,svelte,angular-query-experimental}): switch to 'export type *' for type-only re-exports - #11251

Open
sukvvon wants to merge 2 commits into
mainfrom
fix/export-type-star-preact-solid-svelte
Open

fix({preact,solid,svelte,angular-query-experimental}): switch to 'export type *' for type-only re-exports#11251
sukvvon wants to merge 2 commits into
mainfrom
fix/export-type-star-preact-solid-svelte

Conversation

@sukvvon

@sukvvon sukvvon commented Aug 22, 2026

Copy link
Copy Markdown
Member

🎯 Changes

Port #11228 (react-query) to the other adapters whose types.ts is pure type-only: change export * from './types' to export type * from './types' in preact-query, solid-query, svelte-query (types.js only — context.js still re-exports runtime functions, left unchanged), and angular-query-experimental.

Under this repo's isolatedModules: true, export * from a type-only module cannot be safely elided by the compiler and is preserved as a real runtime import. export type * is erased entirely. Verified locally:

  • preact-query and svelte-query: build output drops a real import "./types.js" / export * from './types.js' before vs. after this change.
  • solid-query and angular-query-experimental: their bundlers (single-file tsdown bundle, vite/rollup) already tree-shook this away, so build output is unchanged — this is a source-level correctness fix for those two, not a measured bundle-size win.
  • .d.ts output for preact-query is unchanged in the set of exported identifiers (each gains a type prefix only); a minimal consumer repro confirms this has no effect on how types are imported/used downstream.

✅ 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

  • Bug Fixes

    • Updated type exports across the Preact, Solid, Svelte, and Angular experimental query packages.
    • Prevented type-only declarations from being included as runtime exports, improving compatibility without changing the public API.
  • Chores

    • Added patch release notes for the affected packages.

@nx-cloud

nx-cloud Bot commented Aug 22, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit f25263f

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

☁️ Nx Cloud last updated this comment at 2026-08-22 03:57:45 UTC

@sukvvon sukvvon self-assigned this Aug 22, 2026
@sukvvon
sukvvon requested a review from TkDodo August 22, 2026 03:52
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

10 package(s) bumped directly, 15 bumped as dependents.

🟨 Minor bumps

Package Version Reason
@tanstack/angular-query-experimental 5.101.4 → 5.102.0 Changeset
@tanstack/eslint-plugin-query 5.101.4 → 5.102.0 Changeset
@tanstack/preact-query 5.101.4 → 5.102.0 Changeset
@tanstack/query-broadcast-client-experimental 5.101.4 → 5.102.0 Changeset
@tanstack/query-core 5.101.4 → 5.102.0 Changeset
@tanstack/react-query 5.101.4 → 5.102.0 Changeset
@tanstack/solid-query 5.101.4 → 5.102.0 Changeset
@tanstack/vue-query 5.101.4 → 5.102.0 Changeset
@tanstack/angular-query-persist-client 5.101.4 → 5.102.0 Dependent
@tanstack/preact-query-devtools 5.101.4 → 5.102.0 Dependent
@tanstack/preact-query-persist-client 5.101.4 → 5.102.0 Dependent
@tanstack/query-async-storage-persister 5.101.4 → 5.102.0 Dependent
@tanstack/query-devtools 5.101.4 → 5.102.0 Dependent
@tanstack/query-persist-client-core 5.101.4 → 5.102.0 Dependent
@tanstack/query-sync-storage-persister 5.101.4 → 5.102.0 Dependent
@tanstack/react-query-devtools 5.101.4 → 5.102.0 Dependent
@tanstack/react-query-next-experimental 5.101.4 → 5.102.0 Dependent
@tanstack/react-query-persist-client 5.101.4 → 5.102.0 Dependent
@tanstack/solid-query-devtools 5.101.4 → 5.102.0 Dependent
@tanstack/solid-query-persist-client 5.101.4 → 5.102.0 Dependent

🟩 Patch bumps

Package Version Reason
@tanstack/lit-query 0.2.11 → 0.2.12 Changeset
@tanstack/svelte-query 6.1.38 → 6.1.39 Changeset
@tanstack/svelte-query-devtools 6.1.38 → 6.1.39 Dependent
@tanstack/svelte-query-persist-client 6.1.38 → 6.1.39 Dependent
@tanstack/vue-query-devtools 6.1.38 → 6.1.39 Dependent

@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1839d1b2-9676-404b-884a-5ffd2131b18b

📥 Commits

Reviewing files that changed from the base of the PR and between 9fa03e6 and c98eea0.

📒 Files selected for processing (5)
  • .changeset/export-type-star-adapters.md
  • packages/angular-query-experimental/src/index.ts
  • packages/preact-query/src/index.ts
  • packages/solid-query/src/index.ts
  • packages/svelte-query/src/index.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The adapter package entry points now use export type * for their types modules. A changeset records patch releases for the Angular, Preact, Solid, and Svelte query packages.

Changes

Adapter type exports

Layer / File(s) Summary
Switch adapter entry points to type-only exports
packages/angular-query-experimental/src/index.ts, packages/preact-query/src/index.ts, packages/solid-query/src/index.ts, packages/svelte-query/src/index.ts, .changeset/export-type-star-adapters.md
The four adapter packages now re-export only type declarations from their types modules. The changeset records patch releases for these packages.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to c98ee

This change removes unnecessary runtime re-exports while preserving the published type surface; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: tkdodo

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the type-only re-export changes across the four query adapters.
Description check ✅ Passed The description explains the changes and motivation, completes the checklist, and documents the release impact and changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4 files. (1 skipped: 1 unsupported.)
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/export-type-star-preact-solid-svelte

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.

@pkg-pr-new

pkg-pr-new Bot commented Aug 22, 2026

Copy link
Copy Markdown
More templates

@tanstack/angular-query-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/lit-query

npm i https://pkg.pr.new/@tanstack/lit-query@11251

@tanstack/preact-query

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

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: c98eea0

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 11.98 KB (0%)
react minimal 8.92 KB (0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant