refactor(angular-query): move injectQueries to sub-path export #9655
main fromrefs/pull/9655/head·merged by arnoud-dv(GitHub profile, opens in a new tab) View on GitHubMove as of yet non-functional injectQueries to separate sub-path experimental-inject-queries to indicate its experimental status so it won't hold up releasing the other APIs as stable.
Summary by CodeRabbit#
New Features
- Added an experimental entry point to access the inject-queries API.
Refactor
- The main package no longer re-exports the inject-queries API; use the new experimental entry point.
Chores
- Build setup updated to produce outputs for the new experimental entry.
- Workspace configuration updated to include the new experimental package.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: angular-query-experimental
View your CI Pipeline Execution ↗ for commit d87f3f2cc43efa9db11e001fc56461cacb9ea04b
Command Status Duration Result nx affected --targets=test:sherif,test:knip,tes...✅ Succeeded 1m 50s View ↗ nx run-many --target=build --exclude=examples/*...✅ Succeeded 2s View ↗
☁️ Nx Cloud last updated this comment at
2025-09-15 00:25:08UTCCodecov Report#
:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 87.77%. Comparing base (
6492aed) to head (d87f3f2). :warning: Report is 1 commits behind head on main.Additional details and impacted files
@@ Coverage Diff @@ ## main #9655 +/- ## =========================================== + Coverage 45.51% 87.77% +42.25% =========================================== Files 209 16 -193 Lines 8379 319 -8060 Branches 1906 75 -1831 =========================================== - Hits 3814 280 -3534 + Misses 4118 34 -4084 + Partials 447 5 -442Components Coverage Δ @tanstack/angular-query-devtools-experimental ∅ <ø> (∅)@tanstack/angular-query-experimental 87.00% <ø> (ø)@tanstack/eslint-plugin-query ∅ <ø> (∅)@tanstack/query-async-storage-persister ∅ <ø> (∅)@tanstack/query-broadcast-client-experimental ∅ <ø> (∅)@tanstack/query-codemods ∅ <ø> (∅)@tanstack/query-core ∅ <ø> (∅)@tanstack/query-devtools ∅ <ø> (∅)@tanstack/query-persist-client-core ∅ <ø> (∅)@tanstack/query-sync-storage-persister ∅ <ø> (∅)@tanstack/query-test-utils ∅ <ø> (∅)@tanstack/react-query ∅ <ø> (∅)@tanstack/react-query-devtools ∅ <ø> (∅)@tanstack/react-query-next-experimental ∅ <ø> (∅)@tanstack/react-query-persist-client ∅ <ø> (∅)@tanstack/solid-query ∅ <ø> (∅)@tanstack/solid-query-devtools ∅ <ø> (∅)@tanstack/solid-query-persist-client ∅ <ø> (∅)@tanstack/svelte-query ∅ <ø> (∅)@tanstack/svelte-query-devtools ∅ <ø> (∅)@tanstack/svelte-query-persist-client ∅ <ø> (∅)@tanstack/vue-query ∅ <ø> (∅)@tanstack/vue-query-devtools ∅ <ø> (∅):rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Actionable comments posted: 1
🧹 Nitpick comments (1)
knip.json (1)
18-20: Include main index in knip entry to retain full analysis coverage.Currently only the new experimental entry is analyzed.
Apply:
- "packages/angular-query-experimental": { - "entry": ["src/inject-queries-experimental/index.ts"] - }, + "packages/angular-query-experimental": { + "entry": ["src/index.ts", "src/inject-queries-experimental/index.ts"] + },📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 6492aed7bec974c80b555d0438ed834f13134c65 and 5cc52ae815124bf02f6685d0db5a9279017f1335.
📒 Files selected for processing (5)
knip.json(1 hunks)packages/angular-query-experimental/package.json(1 hunks)packages/angular-query-experimental/src/index.ts(0 hunks)packages/angular-query-experimental/src/inject-queries-experimental/index.ts(1 hunks)packages/angular-query-experimental/vite.config.ts(1 hunks)
💤 Files with no reviewable changes (1)
- packages/angular-query-experimental/src/index.ts
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-09-02T17:57:33.184Z
Learnt from: TkDodo PR: TanStack/query#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:
knip.json
📚 Learning: 2025-08-19T03:18:18.303Z
Learnt from: oscartbeaumont PR: TanStack/query#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/angular-query-experimental/package.json
⏰ 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). (1)
- GitHub Check: Test
🔇 Additional comments (2)
packages/angular-query-experimental/vite.config.ts (1)
114-114: LGTM on adding the extra build entry.Ensure the package.json export path matches the emitted folder name “inject-queries-experimental” from this entry. See package.json comment.
packages/angular-query-experimental/src/inject-queries-experimental/index.ts (1)
1-1: Barrel re-export looks good.Matches the intent to expose injectQueries via a dedicated experimental subpath.
packages/angular-query-experimental/package.json lines 58 to 61OutdatedResolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -55,3 +55,7 @@5555 "types": "./dist/index.d.ts",5656 "default": "./dist/index.mjs"5757 },58+ "./inject-query-experimental": {59+ "types": "./dist/inject-query-experimental/index.d.ts",60+ "default": "./dist/inject-query-experimental/index.mjs"61+ },💡 Verification agent
🧩 Analysis chain
Exports path mismatch (singular vs plural) will break resolution.
Source and build emit to “inject-queries-experimental”, but exports point to “inject-query-experimental”. That path won’t exist at runtime/types time.
Apply:
- "./inject-query-experimental": { - "types": "./dist/inject-query-experimental/index.d.ts", - "default": "./dist/inject-query-experimental/index.mjs" - }, + "./inject-queries-experimental": { + "@tanstack/custom-condition": "./src/inject-queries-experimental/index.ts", + "types": "./dist/inject-queries-experimental/index.d.ts", + "default": "./dist/inject-queries-experimental/index.mjs" + },Optional: if the intended public name is “experimental-inject-queries” (per PR title), add that as an additional alias export pointing to the same files.
Run to spot stray usages and confirm consistency:
🏁 Script executed:
#!/bin/bash set -euo pipefail echo "Exports keys:" jq -r '.exports | keys[]' packages/angular-query-experimental/package.json echo -e "\nCheck imports of @tanstack/angular-query-experimental main entry using injectQueries:" rg -nP --type=ts -C2 "from ['\"]@tanstack/angular-query-experimental['\"]" -g '!**/dist/**' || true echo -e "\nCheck subpath import usages:" rg -n "inject-query-experimental" -C0 || true rg -n "inject-queries-experimental" -C0 || true echo -e "\nFind injectQueries symbol usage (to update import paths if needed):" rg -nP --type=ts -C2 '\binjectQueries\b' -g '!**/dist/**' || trueLength of output: 1064
Fix exports subpath typo — use 'inject-queries-experimental' (plural)
packages/angular-query-experimental/package.json exports key is "./inject-query-experimental" (singular) but source/build/config use "inject-queries-experimental" (plural) — this will break module/type resolution at runtime. Action: update packages/angular-query-experimental/package.json to export "./inject-queries-experimental" and change the "types" / "default" targets to ./dist/inject-queries-experimental/index.d.ts and ./dist/inject-queries-experimental/index.mjs. Optionally add an alias "./experimental-inject-queries" if that is the intended public name. Confirmed plural usage in knip.json:19 and packages/angular-query-experimental/vite.config.ts:114.
🤖 Prompt for AI Agents
In packages/angular-query-experimental/package.json around lines 58 to 61, the exports subpath uses "./inject-query-experimental" (singular) but the repo expects the plural "inject-queries-experimental"; update the exports key to "./inject-queries-experimental" and change the "types" and "default" paths to point to ./dist/inject-queries-experimental/index.d.ts and ./dist/inject-queries-experimental/index.mjs respectively; optionally add a secondary alias entry "./experimental-inject-queries" mapping to the same dist targets if that public name is required.✅ Addressed in commit b3a2eff
More templates
- @tanstack/query-example-angular-auto-refetching
- @tanstack/query-example-angular-basic
- @tanstack/query-example-angular-basic-persister
- @tanstack/query-example-angular-devtools-panel
- @tanstack/query-example-angular-infinite-query-with-max-pages
- @tanstack/query-example-angular-optimistic-updates
- @tanstack/query-example-angular-pagination
- @tanstack/query-example-angular-query-options-from-a-service
- @tanstack/query-example-angular-router
- @tanstack/query-example-angular-rxjs
- @tanstack/query-example-angular-simple
- @tanstack/query-example-solid-astro
- @tanstack/query-example-solid-basic
- @tanstack/query-example-solid-basic-graphql-request
- @tanstack/query-example-solid-default-query-function
- @tanstack/query-example-solid-simple
- @tanstack/query-example-solid-start-streaming
- @tanstack/query-example-react-algolia
- @tanstack/query-example-react-auto-refetching
- @tanstack/query-example-react-basic
- @tanstack/query-example-react-basic-graphql-request
- @tanstack/query-example-chat
- @tanstack/query-example-react-default-query-function
- @tanstack/query-example-react-devtools-panel
- @tanstack/query-example-eslint-legacy
- @tanstack/query-example-react-infinite-query-with-max-pages
- @tanstack/query-example-react-load-more-infinite-scroll
- @tanstack/query-example-react-nextjs
- @tanstack/query-example-react-nextjs-app-prefetching
- @tanstack/query-example-nextjs-suspense-streaming
- @tanstack/query-example-react-offline
- @tanstack/query-example-react-optimistic-updates-cache
- @tanstack/query-example-react-optimistic-updates-ui
- @tanstack/query-example-react-pagination
- @tanstack/query-example-react-playground
- @tanstack/query-example-react-prefetching
- @tanstack/query-example-react-react-native
- @tanstack/query-example-react-router
- @tanstack/query-example-react-rick-morty
- @tanstack/query-example-react-shadow-dom
- @tanstack/query-example-react-simple
- @tanstack/query-example-react-star-wars
- @tanstack/query-example-react-suspense
- @tanstack/query-example-svelte-auto-refetching
- @tanstack/query-example-svelte-basic
- @tanstack/query-example-svelte-load-more-infinite-scroll
- @tanstack/query-example-svelte-optimistic-updates
- @tanstack/query-example-svelte-playground
- @tanstack/query-example-svelte-simple
- @tanstack/query-example-svelte-ssr
- @tanstack/query-example-svelte-star-wars
- @tanstack/query-example-vue-2.6-basic
- @tanstack/query-example-vue-2.7-basic
- @tanstack/query-example-vue-basic
- @tanstack/query-example-vue-dependent-queries
- @tanstack/query-example-vue-nuxt3
- @tanstack/query-example-vue-persister
- @tanstack/query-example-vue-simple
@tanstack/angular-query-devtools-experimental
npm i https://pkg.pr.new/@tanstack/angular-query-devtools-experimental@9655@tanstack/angular-query-experimental
npm i https://pkg.pr.new/@tanstack/angular-query-experimental@9655@tanstack/eslint-plugin-query
npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@9655@tanstack/query-async-storage-persister
npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@9655@tanstack/query-broadcast-client-experimental
npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@9655@tanstack/query-core
npm i https://pkg.pr.new/@tanstack/query-core@9655@tanstack/query-devtools
npm i https://pkg.pr.new/@tanstack/query-devtools@9655@tanstack/query-persist-client-core
npm i https://pkg.pr.new/@tanstack/query-persist-client-core@9655@tanstack/query-sync-storage-persister
npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@9655@tanstack/react-query
npm i https://pkg.pr.new/@tanstack/react-query@9655@tanstack/react-query-devtools
npm i https://pkg.pr.new/@tanstack/react-query-devtools@9655@tanstack/react-query-next-experimental
npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@9655@tanstack/react-query-persist-client
npm i https://pkg.pr.new/@tanstack/react-query-persist-client@9655@tanstack/solid-query
npm i https://pkg.pr.new/@tanstack/solid-query@9655@tanstack/solid-query-devtools
npm i https://pkg.pr.new/@tanstack/solid-query-devtools@9655@tanstack/solid-query-persist-client
npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@9655@tanstack/svelte-query
npm i https://pkg.pr.new/@tanstack/svelte-query@9655@tanstack/svelte-query-devtools
npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@9655@tanstack/svelte-query-persist-client
npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@9655@tanstack/vue-query
npm i https://pkg.pr.new/@tanstack/vue-query@9655@tanstack/vue-query-devtools
npm i https://pkg.pr.new/@tanstack/vue-query-devtools@9655commit:
d87f3f2arnoud-dv(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Walkthrough#
Adds an experimental export entry for inject-queries: new barrel module, build entry, and package export; updates knip workspace. The main index stops re-exporting injectQueries and that API is re-exposed via the new inject-queries-experimental entry. No runtime logic changes.
Changes#
knip.jsonpackages/angular-query-experimentalwith["src/index.ts","src/inject-queries-experimental/index.ts"].packages/angular-query-experimental/vite.config.ts['./src/index.ts']to['./src/index.ts', './src/inject-queries-experimental/index.ts'].packages/angular-query-experimental/package.json./inject-queries-experimentalmapping to./dist/inject-queries-experimental/index.mjs(default) and./dist/inject-queries-experimental/index.d.ts(types).packages/angular-query-experimental/src/index.ts,packages/angular-query-experimental/src/inject-queries-experimental/index.tsinjectQueriesre-export from the mainsrc/index.ts; addedexport * from '../inject-queries'insrc/inject-queries-experimental/index.tsto re-expose that API under the experimental entry.Sequence Diagram(s)#
No sequence diagram (changes are configuration and export routing only).
Estimated code review effort#
🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem#
Pre-merge checks and finishing touches#
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 5cc52ae815124bf02f6685d0db5a9279017f1335 and d87f3f2cc43efa9db11e001fc56461cacb9ea04b.
📒 Files selected for processing (5)
knip.json(1 hunks)packages/angular-query-experimental/package.json(1 hunks)packages/angular-query-experimental/src/index.ts(0 hunks)packages/angular-query-experimental/src/inject-queries-experimental/index.ts(1 hunks)packages/angular-query-experimental/vite.config.ts(1 hunks)💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-02T17:57:33.184Z
Applied to files:
knip.json⏰ 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). (1)
🔇 Additional comments (1)
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