Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 9 additions & 54 deletions integrations/angular/cli-22/README.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,14 @@
# AngularCli22
# TanStack Angular Query Angular CLI 22 Integration

This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 22.2.5.
Checks that `@tanstack/angular-query` and `@tanstack/angular-query-devtools` build with Angular CLI 22.

## Development server
## What it checks

To start a local development server, run:
- `src/app/app.config.ts` registers the client with `provideTanStackQuery(() => new QueryClient(), withDevtools())`.
- `src/app/app.ts` reads a query with `injectQuery` and renders its pending, error, and success states with `@if` blocks.
- `angular.json` builds `src/main.ts` with the `@angular/build:application` builder, using Angular 22 and TypeScript 6.
- CI runs the `build` script (`ng build`).

```bash
ng serve
```
To run it from the repository root:

Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.

## Code scaffolding

Angular CLI includes powerful code scaffolding tools. To generate a new component, run:

```bash
ng generate component component-name
```

For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:

```bash
ng generate --help
```

## Building

To build the project run:

```bash
ng build
```

This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.

## Running unit tests

To execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:

```bash
ng test
```

## Running end-to-end tests

For end-to-end (e2e) testing, run:

```bash
ng e2e
```

Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.

## Additional Resources

For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
- `pnpm nx run @tanstack/query-integration-angular-cli-22:build`
14 changes: 14 additions & 0 deletions integrations/angular/types-20/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# TanStack Angular Query Angular 20 Types Integration

Checks that `@tanstack/angular-query`, `@tanstack/angular-query-devtools`, and `@tanstack/angular-query-persist-client` type-check with Angular 20's compiler.

## What it checks

- `package.json` installs Angular `~20.1.0` with TypeScript `5.8.3`, and `test:types` runs `ngc --project tsconfig.json`.
- `tsconfig.json` extends `scripts/angular-types/tsconfig.json`, which compiles `scripts/angular-types/consumer.ts` and the three packages' `src/` files (including their `.test-d.ts` files) with `strictTemplates: true`.
- `tsconfig.json` maps `paths` for `@angular/common` and `@angular/core` to this project's `node_modules`, and the three `@tanstack` packages to their source in `packages/`.
- CI runs the `test:types` script.

To run it from the repository root:

- `pnpm nx run @tanstack/query-integration-angular-types-20:test:types`
14 changes: 14 additions & 0 deletions integrations/angular/types-21/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# TanStack Angular Query Angular 21 Types Integration

Checks that `@tanstack/angular-query`, `@tanstack/angular-query-devtools`, and `@tanstack/angular-query-persist-client` type-check with Angular 21's compiler.

## What it checks

- `package.json` installs Angular `^21.0.0` with TypeScript `5.9.3`, and `test:types` runs `ngc --project tsconfig.json`.
- `tsconfig.json` extends `scripts/angular-types/tsconfig.json`, which compiles `scripts/angular-types/consumer.ts` and the three packages' `src/` files (including their `.test-d.ts` files) with `strictTemplates: true`.
- `tsconfig.json` maps `paths` for `@angular/common` and `@angular/core` to this project's `node_modules`, and the three `@tanstack` packages to their source in `packages/`.
- CI runs the `test:types` script.

To run it from the repository root:

- `pnpm nx run @tanstack/query-integration-angular-types-21:test:types`
14 changes: 14 additions & 0 deletions integrations/angular/types-22/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# TanStack Angular Query Angular 22 Types Integration

Checks that `@tanstack/angular-query`, `@tanstack/angular-query-devtools`, and `@tanstack/angular-query-persist-client` type-check with Angular 22's compiler.

## What it checks

- `package.json` installs Angular `^22.0.0` with the catalog TypeScript (`6.0.3`), and `test:types` runs `ngc --project tsconfig.json`.
- `tsconfig.json` extends `scripts/angular-types/tsconfig.json`, which compiles `scripts/angular-types/consumer.ts` and the three packages' `src/` files (including their `.test-d.ts` files) with `strictTemplates: true`.
- `tsconfig.json` maps `paths` for `@angular/common` and `@angular/core` to this project's `node_modules`, and the three `@tanstack` packages to their source in `packages/`.
- CI runs the `test:types` script.

To run it from the repository root:

- `pnpm nx run @tanstack/query-integration-angular-types-22:test:types`
15 changes: 15 additions & 0 deletions integrations/lit/vite/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# TanStack Lit Query Vite Integration

Checks that `@tanstack/lit-query` builds and type-checks with Vite and Lit 3.

## What it checks

- `src/main.ts` extends `QueryClientProvider` as `lit-query-provider` and sets its `client` to a `QueryClient` with `retry: false`.
- `src/main.ts` defines `lit-query-app`, which reads a query with `createQueryController` and renders its pending, error, and success states. Both elements render into light DOM (`createRenderRoot` returns `this`).
- `tsconfig.json` sets `useDefineForClassFields: false`.
- CI runs the `build` (`vite build`) and `test:types` (`tsc --noEmit`) scripts.

To run it from the repository root:

- `pnpm nx run @tanstack/query-integration-lit-vite:build`
- `pnpm nx run @tanstack/query-integration-lit-vite:test:types`
15 changes: 15 additions & 0 deletions integrations/preact/vite/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# TanStack Preact Query Vite Integration

Checks that `@tanstack/preact-query` and `@tanstack/preact-query-devtools` build and type-check with Vite and Preact.

## What it checks

- `src/main.tsx` renders the app inside `QueryClientProvider` together with `PreactQueryDevtools`.
- `src/App.tsx` reads a query with `useQuery` and renders its pending, error, and success states.
- `vite.config.ts` uses `@preact/preset-vite`, and `tsconfig.json` sets `jsxImportSource: "preact"`.
- CI runs the `build` (`vite build`) and `test:types` (`tsc --noEmit`) scripts.

To run it from the repository root:

- `pnpm nx run @tanstack/query-integration-preact-vite:build`
- `pnpm nx run @tanstack/query-integration-preact-vite:test:types`
38 changes: 9 additions & 29 deletions integrations/react/next-14/README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,14 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
# TanStack React Query Next.js 14 Integration

## Getting Started
Checks that `@tanstack/react-query` and `@tanstack/react-query-devtools` build with Next.js 14 and React 18 using the App Router.

First, run the development server:
## What it checks

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
```
- `app/providers.tsx` creates a `QueryClient` with `React.useState` and renders `QueryClientProvider` with `ReactQueryDevtools` in a client component.
- `app/page.tsx` is a server component that builds options with `queryOptions` and renders `app/client-component.tsx`, which reads a query with `useQuery`.
- `next.config.js` sets `eslint.ignoreDuringBuilds` and `typescript.ignoreBuildErrors`, so the build does not type-check.
- CI runs the `build` script (`next build`).

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
To run it from the repository root:

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
- `pnpm nx run @tanstack/query-integration-react-next-14:build`
40 changes: 11 additions & 29 deletions integrations/react/next-15/README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,16 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
# TanStack React Query Next.js 15 Integration

## Getting Started
Checks that `@tanstack/react-query` and `@tanstack/react-query-devtools` build with Next.js 15 and React 19 using the App Router.

First, run the development server:
## What it checks

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
```
- `app/make-query-client.ts` creates a `QueryClient` that serializes `Temporal.PlainDate` with `tupleson` through `serializeData` and `deserializeData`, dehydrates pending queries, and sets `shouldRedactErrors` to return `false`.
- `app/page.tsx` starts `queryClient.query` on the server without awaiting it, passes `dehydrate(queryClient)` to `HydrationBoundary`, and renders `app/client-component.tsx`, which reads the same query with `useQuery`.
- `app/_action.ts` is a server action that calls `revalidatePath`, and `app/count/route.ts` is a route handler that both query functions fetch.
- `app/providers.tsx` uses `environmentManager.isServer()` to create a new client on the server and reuse one in the browser.
- `next.config.ts` sets `eslint.ignoreDuringBuilds` and `typescript.ignoreBuildErrors`, so the build does not type-check.
- CI runs the `build` script (`next build`).

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
To run it from the repository root:

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
- `pnpm nx run @tanstack/query-integration-react-next-15:build`
40 changes: 11 additions & 29 deletions integrations/react/next-16/README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,16 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
# TanStack React Query Next.js 16 Integration

## Getting Started
Checks that `@tanstack/react-query` and `@tanstack/react-query-devtools` build with Next.js 16 and React 19 using the App Router.

First, run the development server:
## What it checks

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
```
- `app/make-query-client.ts` creates a `QueryClient` that serializes `Temporal.PlainDate` with `tupleson` through `serializeData` and `deserializeData`, dehydrates pending queries, and sets `shouldRedactErrors` to return `false`.
- `app/page.tsx` starts `queryClient.query` on the server without awaiting it, passes `dehydrate(queryClient)` to `HydrationBoundary`, and renders `app/client-component.tsx`, which reads the same query with `useQuery`.
- `app/_action.ts` is a server action that calls `revalidatePath`, and `app/count/route.ts` is a route handler that both query functions fetch.
- `app/providers.tsx` uses `environmentManager.isServer()` to create a new client on the server and reuse one in the browser.
- `next.config.ts` sets `typescript.ignoreBuildErrors`, so the build does not type-check.
- CI runs the `build` script (`next build`).

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
To run it from the repository root:

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
- `pnpm nx run @tanstack/query-integration-react-next-16:build`
14 changes: 14 additions & 0 deletions integrations/react/nodenext/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# TanStack React Query NodeNext Integration

Checks that `@tanstack/react-query` resolves and emits declarations under `moduleResolution: "nodenext"` from both ESM and CommonJS files.

## What it checks

- `src/hooks.ts` (ESM, since `package.json` sets `"type": "module"`) and `src/hooks.cts` (CommonJS) both export a hook that calls `useQuery`.
- `tsconfig.json` sets `module` and `moduleResolution` to `nodenext` with `declaration` and `emitDeclarationOnly`, so the declarations for both files are emitted to `dist/`.
- The check runs with TypeScript 6, TypeScript 7.0, and TypeScript 7.1 (dev build) from the root `node_modules`.
- CI runs the `test:types` script, which runs `test:types:ts6`, `test:types:ts7`, and `test:types:ts71`.

To run it from the repository root:

- `pnpm nx run @tanstack/query-integration-react-nodenext:test:types`
15 changes: 15 additions & 0 deletions integrations/react/vite/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# TanStack React Query Vite Integration

Checks that `@tanstack/react-query` and `@tanstack/react-query-devtools` build and type-check with Vite and React 19.

## What it checks

- `src/main.tsx` renders the app inside `React.StrictMode` and `QueryClientProvider` together with `ReactQueryDevtools`.
- `src/App.tsx` reads a query with `useQuery` and renders its pending, error, and success states.
- `vite.config.ts` uses `@vitejs/plugin-react`.
- CI runs the `build` (`vite build`) and `test:types` (`tsc --noEmit`) scripts.

To run it from the repository root:

- `pnpm nx run @tanstack/query-integration-react-vite:build`
- `pnpm nx run @tanstack/query-integration-react-vite:test:types`
16 changes: 16 additions & 0 deletions integrations/react/webpack-4/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# TanStack React Query Webpack 4 Integration

Checks that `@tanstack/react-query` and `@tanstack/react-query-devtools` build and type-check with webpack 4.

## What it checks

- `src/index.tsx` renders the app inside `React.StrictMode` and `QueryClientProvider` together with `ReactQueryDevtools`, and `src/App.tsx` reads a query with `useQuery`.
- `webpack.config.js` compiles `src/index.tsx` with `babel-loader` 8 and the `@babel/preset-env`, `@babel/preset-react`, and `@babel/preset-typescript` presets, and generates `index.html` with `html-webpack-plugin` 4.
- The `build` script sets `NODE_OPTIONS=--openssl-legacy-provider` for webpack 4.
- `tsconfig.json` sets `moduleResolution: "Node10"` with `ignoreDeprecations: "6.0"`.
- CI runs the `build` (`webpack --mode production`) and `test:types` (`tsc --noEmit`) scripts.

To run it from the repository root:

- `pnpm nx run @tanstack/query-integration-react-webpack-4:build`
- `pnpm nx run @tanstack/query-integration-react-webpack-4:test:types`
15 changes: 15 additions & 0 deletions integrations/react/webpack-5/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# TanStack React Query Webpack 5 Integration

Checks that `@tanstack/react-query` and `@tanstack/react-query-devtools` build and type-check with webpack 5.

## What it checks

- `src/index.tsx` renders the app inside `React.StrictMode` and `QueryClientProvider` together with `ReactQueryDevtools`, and `src/App.tsx` reads a query with `useQuery`.
- `webpack.config.js` compiles `src/index.tsx` with `babel-loader` 9 and the `@babel/preset-env`, `@babel/preset-react`, and `@babel/preset-typescript` presets, and generates `index.html` with `html-webpack-plugin` 5.
- `tsconfig.json` sets `moduleResolution: "Bundler"`.
- CI runs the `build` (`webpack --mode production`) and `test:types` (`tsc --noEmit`) scripts.

To run it from the repository root:

- `pnpm nx run @tanstack/query-integration-react-webpack-5:build`
- `pnpm nx run @tanstack/query-integration-react-webpack-5:test:types`
15 changes: 15 additions & 0 deletions integrations/solid/astro-7/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# TanStack Solid Query Astro 7 Integration

Checks that `@tanstack/solid-query` and `@tanstack/solid-query-devtools` build and type-check with Astro 7 and `@astrojs/solid-js`.

## What it checks

- `src/pages/index.astro` renders the Solid `App` component with `client:load`.
- `src/components/App.tsx` renders `QueryClientProvider` with `SolidQueryDevtools`, and reads a query with `useQuery` inside `ErrorBoundary` and `Suspense`.
- `astro.config.ts` adds the `solidJs()` integration, and `tsconfig.json` extends `astro/tsconfigs/strict` with `jsxImportSource: "solid-js"`.
- CI runs the `build` (`astro build`) and `test:types` (`astro check`) scripts.

To run it from the repository root:

- `pnpm nx run @tanstack/query-integration-solid-astro-7:build`
- `pnpm nx run @tanstack/query-integration-solid-astro-7:test:types`
15 changes: 15 additions & 0 deletions integrations/solid/solid-start-2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# TanStack Solid Query SolidStart 2 Integration

Checks that `@tanstack/solid-query` and `@tanstack/solid-query-devtools` build and type-check with SolidStart 2.

## What it checks

- `src/app.tsx` renders `QueryClientProvider` with `SolidQueryDevtools`, and reads a query with `useQuery` and renders its states with `Switch` and `Match`.
- `src/entry-client.tsx` mounts `StartClient`, and `src/entry-server.tsx` renders the document with `StartServer` and `createHandler`.
- `vite.config.ts` uses the `solidStart()` and `nitro()` Vite plugins.
- CI runs the `build` (`vite build`) and `test:types` (`tsc --noEmit`) scripts.

To run it from the repository root:

- `pnpm nx run @tanstack/query-integration-solid-solid-start-2:build`
- `pnpm nx run @tanstack/query-integration-solid-solid-start-2:test:types`
15 changes: 15 additions & 0 deletions integrations/solid/vite/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# TanStack Solid Query Vite Integration

Checks that `@tanstack/solid-query` and `@tanstack/solid-query-devtools` build and type-check with Vite and `vite-plugin-solid`.

## What it checks

- `src/index.tsx` renders the app inside `QueryClientProvider` together with `SolidQueryDevtools`.
- `src/App.tsx` reads a query with `useQuery` and renders its pending, error, and success states with `Switch` and `Match`.
- `vite.config.ts` uses `vite-plugin-solid`, and `tsconfig.json` sets `jsxImportSource: "solid-js"`.
- CI runs the `build` (`vite build`) and `test:types` (`tsc --noEmit`) scripts.

To run it from the repository root:

- `pnpm nx run @tanstack/query-integration-solid-vite:build`
- `pnpm nx run @tanstack/query-integration-solid-vite:test:types`
Loading
Loading