Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4 release #3842

Merged
merged 134 commits into from
Jul 18, 2022
Merged
Changes from 1 commit
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
b84681f
v4 alpha (#3060)
TkDodo Dec 7, 2021
66c9711
Merge remote-tracking branch 'react-query/master' into alpha
TkDodo Dec 10, 2021
14da2c8
Merge remote-tracking branch 'react-query/master' into alpha
TkDodo Dec 10, 2021
1247d7b
refactor(core): refactor internals from classes to a functions (#3066)
TkDodo Dec 10, 2021
942805f
feat(useQueries): v4 api to take an object as input (#3071)
babycourageous Dec 10, 2021
95922e7
refactor(tests): adapt useInfiniteQuery test
TkDodo Dec 10, 2021
e200bf7
refactor(tests): adapt useInfiniteQuery test
TkDodo Dec 10, 2021
3722b6b
refactor: use a set for tracked props (#3085)
TkDodo Dec 11, 2021
5e2f2c2
chore: update tooling (#3086)
TkDodo Dec 11, 2021
c50b630
fix(queryObserver): defer tracking of error prop when useErrorBoundar…
TkDodo Dec 11, 2021
8cf612e
Merge remote-tracking branch 'react-query/master' into alpha
TkDodo Dec 14, 2021
84b06ec
docs: Update migrating-to-react-query-4.md (#3096)
afertil Dec 15, 2021
c53e5ed
Merge remote-tracking branch 'react-query/master' into alpha
TkDodo Dec 16, 2021
9a20452
refactor: remove logging in prod mode (#3103)
TkDodo Dec 16, 2021
250c654
Merge remote-tracking branch 'react-query/master' into alpha
TkDodo Dec 28, 2021
e21ef6c
refactor: remove cancel method as it no longer exists (#3142)
TkDodo Dec 28, 2021
047d6cf
refactor: remove unused query.setDefaultOptions
TkDodo Dec 31, 2021
1abb371
feat(persistQueryClient): improve persist controls (#3141)
jonathanstanley Jan 14, 2022
47bf076
Merge remote-tracking branch 'react-query/master' into alpha
TkDodo Jan 21, 2022
4afd0c3
docs: clarify caching behavior (#3221)
aryzing Jan 22, 2022
d4b6afc
Merge remote-tracking branch 'react-query/master' into alpha
TkDodo Jan 23, 2022
c0fc916
fix(core): do not refetch disabled queries (#3223)
TkDodo Jan 23, 2022
52ad9cc
refactor(mutation): remove mutation.cancel (#3225)
TkDodo Feb 6, 2022
e90e7f8
refactor(queryClient): add dev warning with queryDefaults (#3249)
GLabat Feb 6, 2022
239d66c
Merge remote-tracking branch 'react-query/master' into alpha
TkDodo Feb 6, 2022
2b5c337
chore: fix silent merge conflicts
TkDodo Feb 6, 2022
7ee784f
feat: Bail out if query data undefined (#3271)
phatmann Feb 9, 2022
6ec6811
chore: add a test to ensure that callback on .mutate are only called …
TkDodo Feb 9, 2022
7064c69
docs: Document compression use case for `createWebStoragePersister` (…
hverlin Feb 10, 2022
00d0c52
refactor: inline / remove some functions for size improvements (#3289)
TkDodo Feb 12, 2022
0981378
Merge remote-tracking branch 'react-query/master' into alpha
TkDodo Feb 12, 2022
293e5e9
refactor: do not log undefined query data warning to the console
TkDodo Feb 14, 2022
ada0e34
feat: Version 4 codemods (#3195)
balazsmatepetro Feb 18, 2022
aa853d8
Merge remote-tracking branch 'react-query/master' into alpha
TkDodo Feb 20, 2022
fe98d53
feat: remove idle state (#3302)
TkDodo Feb 24, 2022
315f0cf
feat(*): add optional logger prop to QueryClient config (#3246)
anilanar Feb 26, 2022
4253ff3
refactor: turn off error logging in tests
TkDodo Feb 26, 2022
61fd539
docs(examples): fix optimistic-updates-typescript example
TkDodo Feb 26, 2022
ead3d69
chore(bundling): bundle for modern browsers (#3342)
TkDodo Feb 26, 2022
f53d8b1
chore: eslint no-unnecessary-condition (#3344)
TkDodo Feb 26, 2022
f426899
fix(mutations): avoid infinite loading states if callbacks return an …
TkDodo Feb 26, 2022
02fd793
fix(react-native): bring back check for window.addEventListener (#3345)
TkDodo Feb 27, 2022
9d260e7
refactor(queryObserver): get rid of double-defaulting of options in g…
TkDodo Feb 28, 2022
338da80
fix(createAsyncStoragePersister): persistClient respects throttleTime…
huanguolin Mar 1, 2022
154b5c1
docs: update persistQueryClient.md with Persister docs (#3356)
jonathanstanley Mar 3, 2022
d07e0f8
Merge remote-tracking branch 'react-query/master' into alpha
TkDodo Mar 3, 2022
49f2923
docs: add Offline React Query post (#3320)
MostafaNawara Mar 3, 2022
bc7263d
docs: multi-line code snippet for layout on mobile
TkDodo Mar 5, 2022
fee4a14
fix(mutations): allow passing a function to useErrorBoundary (#3390)
TkDodo Mar 13, 2022
1b91f3f
Merge remote-tracking branch 'react-query/master' into alpha
TkDodo Mar 13, 2022
cba4503
docs: idle state is removed
TkDodo Mar 23, 2022
f31e1ed
feat: Support the ability to provide a context (#2548)
blackarctic Mar 23, 2022
ba78256
feat(persistQueryClient): PersistQueryClientProvider (#3248)
TkDodo Mar 24, 2022
21dd633
Merge remote-tracking branch 'tannerlinsley/master' into alpha
TkDodo Mar 24, 2022
3ed5e48
feat(cacheTime): default cacheTime to Infinity for SSR (#3377)
JacobLey Mar 24, 2022
6e4ebec
docs(examples): fix offline example (#3463)
TkDodo Apr 2, 2022
49704c7
Merge remote-tracking branch 'tannerlinsley/master' into alpha
TkDodo Apr 2, 2022
39a213e
fix(persistQueryClient): subscribe to both QueryCache and MutationCache
TkDodo Apr 2, 2022
4d753c0
feat: add support for react 18
TkDodo Apr 2, 2022
f58eaf9
chore: release beta docs
TkDodo Apr 2, 2022
231b543
docs: fix suspense example (#3458)
nikasepiskveradze Apr 2, 2022
aa723a0
docs(examples): update examples to use react18 (#3466)
TkDodo Apr 3, 2022
de0f9d8
docs(examples): make offline example a bit better
TkDodo Apr 8, 2022
13dbb27
docs(QueryClient): fix indentation
TkDodo Apr 8, 2022
58a9fe9
fix(types): use react 18 types (#3482)
TkDodo Apr 8, 2022
5562cfa
fix(types): fix promise inference in useQueries (#3493)
artysidorenko Apr 11, 2022
7bba5a9
docs(v4): update context example in v4 migration guide
TkDodo Apr 16, 2022
35dfe5f
merge branch master into beta
TkDodo Apr 21, 2022
af850e5
test: stabilize new test
TkDodo Apr 21, 2022
a8ddd9b
test: stabilize some more tests
TkDodo Apr 21, 2022
9e23e7a
fix(persistQueryClient): rename isHydrating to isRestoring (#3512)
TkDodo Apr 21, 2022
1af25c6
docs: fix offline example
TkDodo Apr 24, 2022
3fabd41
fix: ESM compliant bundling (#3521)
sachinraja Apr 26, 2022
fdbc002
fix: Use fully-specified path to import use-sync-external-store/shim …
latin-1 Apr 26, 2022
6379654
fix: move usage of React Context out of core package (#3578)
TkDodo May 7, 2022
5f80b09
fix: type issue when void or undefined is returned from query functio…
yss14 May 8, 2022
e01a7bb
fix: uSES import for react-native / esm (#3601)
hirbod May 12, 2022
7d3f7a2
fix(query): updating with setQueryData should not affect fetchStatus …
TkDodo May 14, 2022
0085137
chore: bump uSES to 1.1.0 (#3614)
hirbod May 14, 2022
35a40ec
fix(queryClient): make sure that setQueryData can return undefined fr…
TkDodo May 14, 2022
1909cb9
docs: point offline example to /beta
TkDodo May 21, 2022
34afdde
feat(persistQueryClient): persist error handling (#3556)
TkDodo May 21, 2022
892fc08
docs: update typescript.md
TkDodo May 24, 2022
40b921a
Merge remote-tracking branch 'tannerlinsley/master' into beta
TkDodo May 25, 2022
270efe6
fix: make sure isDataEqual option is respected everywhere where we us…
TkDodo May 25, 2022
068b974
fix(infiniteQuery): do not consume AbortSignal unless user has consum…
TkDodo May 29, 2022
2a02eb6
fix: useSyncExternalStore re-export (#3656)
TkDodo May 29, 2022
6c0107f
test: try to stabilize tests
TkDodo May 30, 2022
4a43068
test: try to stabilize tests
TkDodo May 30, 2022
0c04e7d
fix(types): make sure queryClient.setQueriesData can return undefined…
TkDodo May 30, 2022
8095859
fix(persist): remove environment check (#3658)
TkDodo May 30, 2022
f77f6f4
fix(types): remove non-void constraint from queryFn result (#3666)
artysidorenko Jun 3, 2022
97484dc
feat: make InfiniteQueryObserver's type more robust (#3571)
liaoliao666 Jun 5, 2022
a46ba65
fix: `replaceDeepEqual` special case for non-plain arrays (#3669)
jxom Jun 6, 2022
ce53f11
docs: restructure migration guide by importance of breaking changes
TkDodo Jun 6, 2022
ad82ee8
fix(persist): introduce in-house synchronous Storage interface (#3673)
todorone Jun 6, 2022
7ccf36a
docs: migrate to tanstack.com
tannerlinsley Jun 6, 2022
7e06a11
examples: vendor to platform directories
tannerlinsley Jun 6, 2022
ba2c83b
Update index.js
tannerlinsley Jun 6, 2022
935d143
Update config.json
tannerlinsley Jun 6, 2022
314bb40
update readme
tannerlinsley Jun 6, 2022
cca1bbf
Update README.md
tannerlinsley Jun 6, 2022
916a3c5
docs: fix link typo in README.md (#3679)
littlehaker Jun 7, 2022
819390e
docs: Update graphql.md to fix link (#3683)
skvale Jun 7, 2022
9852028
tests: stabilize
TkDodo Jun 7, 2022
2eec65e
docs: rewrite typescript docs
TkDodo Jun 7, 2022
0658f3f
docs: adapter teasers
tannerlinsley Jun 8, 2022
19d755c
Merge branch 'beta' of https://github.com/TanStack/query into beta
tannerlinsley Jun 8, 2022
a9706a0
Update config.json
tannerlinsley Jun 16, 2022
e61a623
Fix Best of JS badge in README (#3695)
michaelrambeau Jun 24, 2022
295f553
docs: fix the broken links in network-mode.md (#3765)
bradzickafoose Jun 29, 2022
2d2de44
docs: fix the typo in persistQueryClient.md (#3768)
zhuanghongji Jul 1, 2022
e0aad73
yarn -> npm
tannerlinsley Jul 8, 2022
c5c4417
Monorepo, Rebrand to TanStack (#3708)
tannerlinsley Jul 8, 2022
f7cfe5f
chore: small beta fixes (#3800)
TkDodo Jul 13, 2022
5ed190b
feat(codemod): add codemod that replaces the react-query import speci…
TkDodo Jul 13, 2022
dc867b4
docs: Update installation.md (#3799)
tristanmarsh Jul 13, 2022
3802a85
docs(mutations): fix typos (#3779)
morleytatro Jul 13, 2022
8a7f8d9
docs: Update for typescript (#3789)
zereight Jul 13, 2022
74d895c
docs: fix typo in ssr.md (#3748)
eltociear Jul 13, 2022
c6716ea
docs: Update useQueries hook example (#3710)
webbalea Jul 13, 2022
36e98bb
chore: remove yarn.lock
TkDodo Jul 13, 2022
69ba565
chore: fix the build
TkDodo Jul 13, 2022
b57e154
fix: add react-dom as peer dependency (#3786)
duarten Jul 13, 2022
3ceb5ff
rebranded imports (#3803)
TkDodo Jul 13, 2022
78e827d
Merge remote-tracking branch 'tannerlinsley/main' into beta
TkDodo Jul 14, 2022
fb20ada
docs: Update installation.md (#3830)
EkoSetiyo13 Jul 15, 2022
1a7628a
Merge remote-tracking branch 'tannerlinsley/main' into beta
TkDodo Jul 15, 2022
3a02dbb
Merge remote-tracking branch 'tannerlinsley/main' into beta
TkDodo Jul 15, 2022
d6cb962
feat(types): better type narrowing for useQuery when initialData is s…
mattpocock Jul 16, 2022
b25e964
docs(useQuery): add an explanation of isDataEqual option (#3838)
airman5573 Jul 17, 2022
b0ca15b
fix(devtools): make sure that sort function is properly read from loc…
zorzysty Jul 17, 2022
1d63564
chore: make broadcast-client experimental again (#3816)
TkDodo Jul 18, 2022
53f6c95
chore: beta release (#3815)
TkDodo Jul 18, 2022
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
Prev Previous commit
Next Next commit
yarn -> npm
tannerlinsley committed Jul 8, 2022
commit e0aad7340dd4efabab5a9d1d71173200a6697e1a
18 changes: 0 additions & 18 deletions .gitpod.yml

This file was deleted.

19 changes: 3 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -17,27 +17,14 @@ If you are here to suggest a feature, first create an issue if it does not alrea
If you have been assigned to fix an issue or develop a new feature, please follow these steps to get started:

- Fork this repository
- Install dependencies by running `$ yarn`
- Link `react-query` locally by running `$ yarn link`
- Auto-build files as you edit by running `$ yarn start`
- Install dependencies by running `$ npm i`
- Auto-build files as you edit by running `$ npm run dev`
- Implement your changes and tests to files in the `src/` directory and corresponding test files
- To run examples, follow their individual directions. Usually this is just `$ yarn && yarn start`.
- To run examples using your local build, link to the local `react-query` by running `$ yarn link react-query` from the example's directory
- To run examples, follow their individual directions. Usually this is just `$ npm i && npm run dev`.
- Document your changes in the appropriate doc page
- Git stage your required changes and commit (see below commit guidelines)
- Submit PR for review

## Online one-click setup

You can use Gitpod (An Online Open Source VS Code like IDE which is free for Open Source) for developing online. With a single click it will start a workspace and automatically:

- clone the `react-query` repo.
- install all the dependencies in `/` and `/docs`.
- run `yarn start` in the root(`/`) to Auto-build files.
- run `yarn dev` in `/docs`.

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/tannerlinsley/react-query)

## Commit message conventions

`react-query` is using [Angular Commit Message Conventions](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines).
4 changes: 2 additions & 2 deletions examples/react/auto-refetching/README.md
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

To run this example:

- `npm install` or `yarn`
- `npm run dev` or `yarn dev`
- `npm install`
- `npm run dev`
4 changes: 2 additions & 2 deletions examples/react/basic-graphql-request/README.md
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

To run this example:

- `npm install` or `yarn`
- `npm run start` or `yarn start`
- `npm install`
- `npm run start`
4 changes: 2 additions & 2 deletions examples/react/basic-typescript/README.md
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

To run this example:

- `npm install` or `yarn`
- `npm run start` or `yarn start`
- `npm install`
- `npm run start`
4 changes: 2 additions & 2 deletions examples/react/basic/README.md
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

To run this example:

- `npm install` or `yarn`
- `npm run start` or `yarn start`
- `npm install`
- `npm run start`
2 changes: 1 addition & 1 deletion examples/react/custom-hooks/README.md
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

To run this example:

- `npm install` or `yarn`
- `npm install`
- `npm start` or `yarn start`
4 changes: 2 additions & 2 deletions examples/react/default-query-function/README.md
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

To run this example:

- `npm install` or `yarn`
- `npm run start` or `yarn start`
- `npm install`
- `npm run start`
4 changes: 2 additions & 2 deletions examples/react/focus-refetching/README.md
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

To run this example:

- `npm install` or `yarn`
- `npm run dev` or `yarn dev`
- `npm install`
- `npm run dev`
4 changes: 2 additions & 2 deletions examples/react/load-more-infinite-scroll/README.md
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

To run this example:

- `npm install` or `yarn`
- `npm run dev` or `yarn dev`
- `npm install`
- `npm run dev`
4 changes: 2 additions & 2 deletions examples/react/nextjs/README.md
Original file line number Diff line number Diff line change
@@ -6,5 +6,5 @@ In addition to fetching and mutating data, React-Query analyzes your queries and

To run this example:

- `npm install` or `yarn`
- `npm run dev` or `yarn dev`
- `npm install`
- `npm run dev`
4 changes: 2 additions & 2 deletions examples/react/offline/README.md
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

To run this example:

- `npm install` or `yarn`
- `npm run start` or `yarn start`
- `npm install`
- `npm run start`
4 changes: 2 additions & 2 deletions examples/react/optimistic-updates-typescript/README.md
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

To run this example:

- `npm install` or `yarn`
- `npm run dev` or `yarn dev`
- `npm install`
- `npm run dev`
4 changes: 2 additions & 2 deletions examples/react/optimistic-updates/README.md
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

To run this example:

- `npm install` or `yarn`
- `npm run dev` or `yarn dev`
- `npm install`
- `npm run dev`
4 changes: 2 additions & 2 deletions examples/react/pagination/README.md
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

To run this example:

- `npm install` or `yarn`
- `npm run dev` or `yarn dev`
- `npm install`
- `npm run dev`
4 changes: 2 additions & 2 deletions examples/react/playground/README.md
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

To run this example:

- `npm install` or `yarn`
- `npm run start` or `yarn start`
- `npm install`
- `npm run start`
4 changes: 2 additions & 2 deletions examples/react/prefetching/README.md
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

To run this example:

- `npm install` or `yarn`
- `npm run dev` or `yarn dev`
- `npm install`
- `npm run dev`
4 changes: 2 additions & 2 deletions examples/react/rick-morty/README.md
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

To run this example:

- `npm install` or `yarn`
- `npm run start` or `yarn start`
- `npm install`
- `npm run start`
4 changes: 2 additions & 2 deletions examples/react/simple/README.md
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

To run this example:

- `npm install` or `yarn`
- `npm run start` or `yarn start`
- `npm install`
- `npm run start`
4 changes: 2 additions & 2 deletions examples/react/star-wars/README.md
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

To run this example:

- `npm install` or `yarn`
- `npm run start` or `yarn start`
- `npm install`
- `npm run start`
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -70,26 +70,27 @@
"test:dev": "npm run test:types && npm run test:format && npm run test:eslint && npm run test:codemod && jest --watch",
"test:dev:17": "npm run test:types && npm run test:format && npm run test:eslint && npm run test:codemod && REACTJS_VERSION=17 jest --watch",
"test:ci": "npm run test:types && npm run test:format && npm run test:eslint && npm run test:codemod && jest",
"test:coverage": "yarn test:ci; open coverage/lcov-report/index.html",
"test:format": "yarn prettier --check",
"test:coverage": "npm run test:ci; open coverage/lcov-report/index.html",
"test:format": "npm run prettier --check",
"test:types": "tsc",
"test:eslint": "eslint --ext .ts,.tsx ./src",
"test:size": "yarn build:umd && bundlewatch",
"test:size": "npm run build:umd && bundlewatch",
"test:codemod": "jest --config codemods/jest.config.js",
"build": "yarn build:commonjs && yarn build:es && yarn build:umd && yarn build:types",
"build": "npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:types",
"build:commonjs": "rimraf './lib/**/*.js' && cross-env BABEL_ENV=commonjs babel --extensions .ts,.tsx --ignore ./src/**/tests/**/* ./src --out-dir lib",
"build:es": "rimraf './lib/**/*.mjs' && cross-env BABEL_ENV=es babel --extensions .ts,.tsx --ignore ./src/**/tests/**/* ./src --out-dir lib --out-file-extension .mjs",
"build:umd": "rimraf ./dist && cross-env NODE_ENV=production rollup -c && rollup-plugin-visualizer stats-react.json",
"build:types": "rimraf './lib/**/*.d.ts' && tsc --project ./tsconfig.types.json",
"watch": "yarn watch:commonjs && watch:es & yarn watch:umd & yarn watch:types",
"watch": "npm run watch:commonjs && watch:es & npm run watch:umd & npm run watch:types",
"watch:commonjs": "rimraf './lib/**/*.js' && cross-env BABEL_ENV=commonjs babel --watch --extensions .ts,.tsx --ignore ./src/**/tests/**/* ./src --out-dir lib",
"watch:es": "rimraf './lib/**/*.mjs' && cross-env BABEL_ENV=es babel --watch --extensions .ts,.tsx --ignore ./src/**/tests/**/* ./src --out-dir lib --out-file-extension .mjs",
"watch:umd": "rimraf ./dist && cross-env NODE_ENV=production rollup -w -c && rollup-plugin-visualizer stats-react.json",
"watch:types": "rimraf './lib/**/*.d.ts' && tsc --watch --project ./tsconfig.types.json",
"now-build": "yarn && cd www && yarn && yarn build",
"now-build": "npm i && cd www && npm i && npm run build",
"prettier": "prettier \"{.,src,src/**,example/src,example/src/**,types}/*.{md,js,jsx,ts,tsx,json}\"",
"start": "yarn watch",
"format": "yarn prettier --write",
"start": "npm run dev",
"dev": "npm run watch",
"format": "npm run prettier --write",
"stats": "open ./stats.html"
},
"files": [