Skip to content

Commit

Permalink
Merge branch 'main' into query-core/fix/shorten-listeners-code
Browse files Browse the repository at this point in the history
  • Loading branch information
manudeli authored Aug 19, 2024
2 parents c8c7fee + ab1a353 commit 32b815a
Show file tree
Hide file tree
Showing 40 changed files with 532 additions and 164 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Hooks for fetching, caching and updating asynchronous data in React, Solid, Svel
<img alt="#TanStack" src="https://img.shields.io/twitter/url?color=%2308a0e9&label=%23TanStack&style=social&url=https%3A%2F%2Ftwitter.com%2Fintent%2Ftweet%3Fbutton_hashtag%3DTanStack">
</a><a href="https://discord.com/invite/WrRKjPJ" target="\_parent">
<img alt="" src="https://img.shields.io/badge/Discord-TanStack-%235865F2" />
</a><a href="https://github.com/TanStack/query/actions?query=workflow%3A%22react-query+tests%22">
<img src="https://github.com/TanStack/query/workflows/react-query%20tests/badge.svg" />
</a><a href="https://www.npmjs.com/package/@tanstack/query-core" target="\_parent">
<img alt="" src="https://img.shields.io/npm/dm/@tanstack/query-core.svg" />
</a><a href="https://bundlejs.com/?q=%40tanstack%2Freact-query&config=%7B%22esbuild%22%3A%7B%22external%22%3A%5B%22react%22%2C%22react-dom%22%5D%7D%7D&badge=" target="\_parent">
Expand Down
18 changes: 15 additions & 3 deletions docs/eslint/eslint-plugin-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,23 @@ The plugin is a separate package that you need to install:

```bash
$ npm i -D @tanstack/eslint-plugin-query
# or
```

or

```bash
$ pnpm add -D @tanstack/eslint-plugin-query
# or
```

or

```bash
$ yarn add -D @tanstack/eslint-plugin-query
# or
```

or

```bash
$ bun add -D @tanstack/eslint-plugin-query
```

Expand Down
18 changes: 15 additions & 3 deletions docs/framework/angular/devtools.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,23 @@ The devtools are a separate package that you need to install:

```bash
$ npm i @tanstack/angular-query-devtools-experimental
# or
```

or

```bash
$ pnpm add @tanstack/angular-query-devtools-experimental
# or
```

or

```bash
$ yarn add @tanstack/angular-query-devtools-experimental
# or
```

or

```bash
$ bun add @tanstack/angular-query-devtools-experimental
```

Expand Down
18 changes: 15 additions & 3 deletions docs/framework/angular/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,23 @@ _Angular Query is compatible with Angular v16 and higher_

```bash
npm i @tanstack/angular-query-experimental
# or
```

or

```bash
pnpm add @tanstack/angular-query-experimental
# or
```

or

```bash
yarn add @tanstack/angular-query-experimental
# or
```

or

```bash
bun add @tanstack/angular-query-experimental
```

Expand Down
18 changes: 15 additions & 3 deletions docs/framework/react/devtools.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,23 @@ The devtools are a separate package that you need to install:

```bash
$ npm i @tanstack/react-query-devtools
# or
```

or

```bash
$ pnpm add @tanstack/react-query-devtools
# or
```

or

```bash
$ yarn add @tanstack/react-query-devtools
# or
```

or

```bash
$ bun add @tanstack/react-query-devtools
```

Expand Down
4 changes: 2 additions & 2 deletions docs/framework/react/guides/request-waterfalls.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ const [usersQuery, teamsQuery, projectsQuery] = useSuspenseQueries({
{ queryKey: ['users'], queryFn: fetchUsers },
{ queryKey: ['teams'], queryFn: fetchTeams },
{ queryKey: ['projects'], queryFn: fetchProjects },
]
}
],
})
```

### Nested Component Waterfalls
Expand Down
36 changes: 30 additions & 6 deletions docs/framework/react/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,23 @@ or a good ol' `<script>` via

```bash
npm i @tanstack/react-query
# or
```

or

```bash
pnpm add @tanstack/react-query
# or
```

or

```bash
yarn add @tanstack/react-query
# or
```

or

```bash
bun add @tanstack/react-query
```

Expand Down Expand Up @@ -58,10 +70,22 @@ It is recommended to also use our [ESLint Plugin Query](../../../eslint/eslint-p

```bash
npm i -D @tanstack/eslint-plugin-query
# or
```

or

```bash
pnpm add -D @tanstack/eslint-plugin-query
# or
```

or

```bash
yarn add -D @tanstack/eslint-plugin-query
# or
```

or

```bash
bun add -D @tanstack/eslint-plugin-query
```
18 changes: 15 additions & 3 deletions docs/framework/solid/devtools.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,23 @@ The devtools are a separate package that you need to install:

```bash
$ npm i @tanstack/solid-query-devtools
# or
```

or

```bash
$ pnpm add @tanstack/solid-query-devtools
# or
```

or

```bash
$ yarn add @tanstack/solid-query-devtools
# or
```

or

```bash
$ bun add @tanstack/solid-query-devtools
```

Expand Down
18 changes: 15 additions & 3 deletions docs/framework/solid/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,23 @@ or a good ol' `<script>` via

```bash
npm i @tanstack/solid-query
# or
```

or

```bash
pnpm add @tanstack/solid-query
# or
```

or

```bash
yarn add @tanstack/solid-query
# or
```

or

```bash
bun add @tanstack/solid-query
```

Expand Down
18 changes: 15 additions & 3 deletions docs/framework/svelte/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,23 @@ You can install Svelte Query via [NPM](https://npmjs.com).

```bash
npm i @tanstack/svelte-query
# or
```

or

```bash
pnpm add @tanstack/svelte-query
# or
```

or

```bash
yarn add @tanstack/svelte-query
# or
```

or

```bash
bun add @tanstack/svelte-query
```

Expand Down
18 changes: 15 additions & 3 deletions docs/framework/vue/devtools.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,23 @@ The devtools component is a separate package that you need to install:

```bash
$ npm i @tanstack/vue-query-devtools
# or
```

or

```bash
$ pnpm add @tanstack/vue-query-devtools
# or
```

or

```bash
$ yarn add @tanstack/vue-query-devtools
# or
```

or

```bash
$ bun add @tanstack/vue-query-devtools
```

Expand Down
18 changes: 15 additions & 3 deletions docs/framework/vue/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,23 @@ You can install Vue Query via [NPM](https://npmjs.com).

```bash
npm i @tanstack/vue-query
# or
```

or

```bash
pnpm add @tanstack/vue-query
# or
```

or

```bash
yarn add @tanstack/vue-query
# or
```

or

```bash
bun add @tanstack/vue-query
```

Expand Down
10 changes: 10 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// @ts-ignore Needed due to moduleResolution Node vs Bundler
import { tanstackConfig } from '@tanstack/config/eslint'
import pluginCspell from '@cspell/eslint-plugin'
import vitest from '@vitest/eslint-plugin'

export default [
...tanstackConfig,
Expand Down Expand Up @@ -40,4 +41,13 @@ export default [
'no-case-declarations': 'off',
},
},
{
files: ['**/*.spec.ts*', '**/*.test.ts*', '**/*.test-d.ts*'],
plugins: { vitest },
rules: {
...vitest.configs.recommended.rules,
'vitest/expect-expect': 'warn',
},
settings: { vitest: { typecheck: true } },
},
]
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc",
"@vitest/coverage-istanbul": "^2.0.4",
"@vitest/eslint-plugin": "^1.0.2",
"cpy-cli": "^5.0.0",
"esbuild-plugin-file-path-extensions": "^2.1.2",
"eslint": "^8.57.0",
Expand Down
18 changes: 15 additions & 3 deletions packages/angular-query-experimental/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,23 @@ Visit https://tanstack.com/query/latest/docs/framework/angular/overview

```bash
$ npm i @tanstack/angular-query-experimental
# or
```

or

```bash
$ pnpm add @tanstack/angular-query-experimental
# or
```

or

```bash
$ yarn add @tanstack/angular-query-experimental
# or
```

or

```bash
$ bun add @tanstack/angular-query-experimental
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('injectMutationState', () => {
})

describe('injectMutationState', () => {
test('should return variables after calling mutate', async () => {
test('should return variables after calling mutate 1', async () => {
const mutationKey = ['mutation']
const variables = 'foo123'

Expand Down Expand Up @@ -91,7 +91,7 @@ describe('injectMutationState', () => {
expect(mutationState()).toEqual([variables2])
})

test('should return variables after calling mutate', async () => {
test('should return variables after calling mutate 2', async () => {
queryClient.clear()
const mutationKey = ['mutation']
const variables = 'bar234'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
import { TestBed } from '@angular/core/testing'
import { assertInjector } from './assert-injector'

describe(assertInjector.name, () => {
describe('assertInjector', () => {
const token = new InjectionToken('token', {
factory: () => 1,
})
Expand Down
Loading

0 comments on commit 32b815a

Please sign in to comment.