Skip to content

Commit 4dca773

Browse files
ryands17Clayton MarshallClayton MarshalltannerlinsleyEphem
authored
Update fork (#1)
* docs: added more detailed explanation of what the cache timeout does in the detailed walkthough of useQuery (TanStack#928) Co-authored-by: Clayton Marshall <[email protected]> * Update index.js * Add queryCache de/rehydration (TanStack#728) * chore(hydration): set up separate hydration entry point * feat(hydration): add support for de/rehydrating queryCaches - Add dehydrate(queryCache, config) - Add hydrate(queryCache, dehydratedQueries, config) - Add useHydrate(dehydratedQueries, config) * test(hydration): fix broken type in test * rename scheduleTimeoutsManually to activateTimeoutsManually * docs(hydration): add API-docs for hydration and update comparison * docs(ssr): update ssr-docs with new approach based on de/rehydration * remove activateTimeoutsManually * add default shouldDehydrate * add hydration/ReactQueryCacheProvider * use unknown for initialData in dehydration * rename initialQueries and dehydratedQueries to dehydratedState * include queryKey instead of queryHash in dehydration * update initialQueries to dehydratedState in ssr guide docs * remove shouldHydrate-option * feat: determine staleness locally instead of globally (TanStack#933) * fix: add hydration.js to npm files * fix: add hydration.js to npm files * fix: make sure initial data is used when switching queries (TanStack#944) * feat: change ReactQueryCacheProvider from hydration to Hydrate (TanStack#943) * tests: fix setTimeout for ci tests * fix: always use config from last query execution (TanStack#942) * fix: make sure queries with only inactive observers are also invalidated (TanStack#949) * feat: add notifyOnStatusChange flag (TanStack#840) * docs: update comparison Closes TanStack#920 * docs: update supporters and comparison * docs: fix sponsors rendering * fix: ignore errors from background fetches (TanStack#953) * feat: add forceFetchOnMount flag (TanStack#954) * feat: add isPreviousData and isFetchedAfterMount flags (TanStack#961) * docs(react-native): add solution for fullscreen error (TanStack#958) * docs: update sponsors * fix: use hook config on refocus or reconnect (TanStack#964) * docs: typo in useQuery.test (TanStack#965) * fix: make sure setQueryData is not considered as initial data (TanStack#966) * refactor: cleanup to reduce file size and add tests (TanStack#969) * Update devtools.md (TanStack#973) Separate the sentences based on contex * fix: export hydration types (TanStack#974) * docs: update sponsors * fix(hydration): overwrite the existing data in the cache if hydrated data is newer (TanStack#976) * refactor: optimize render path and improve type safety (TanStack#984) * feat: add reset error boundary component (TanStack#980) * refactor: remove unused deepEqual function (TanStack#999) * fix: cancel current fetch when fetching more (TanStack#1000) * fix: notify query cache on stale (TanStack#1001) * test: add previous data test (TanStack#1003) * feat: add support for tree shaking (TanStack#994) * fix: useInfinityQuery fetchMore should not throw (TanStack#1004) * docs: update api docs (TanStack#1005) * refactor: remove query status bools (TanStack#1009) * fix: make sure initial data always uses initial stale (TanStack#1010) * feat: add always option to refetch options (TanStack#1011) * feat: export QueryCache and remove global query cache from docs and examples (TanStack#1017) * docs: remove shared config (TanStack#1021) * feat: add remove method and deprecate clear (TanStack#1022) * fix: should be able to invalidate queries (TanStack#1006) * fix: should throw error when using useErrorBoundary (TanStack#1016) * docs: Add graphql docs * docs: add graphql-request example * docs: update graphql docs * docs: add graphql example * feat: implement batch rendering (TanStack#989) * docs: Update comparison.md * docs: Update essentials banner * docs: reorder homepage * fix: accept any promise in useMutation callbacks (TanStack#1033) * docs: prefer default config of QueryCache (TanStack#1034) * fix: include config callbacks in batch render (TanStack#1036) * docs: update example deps * docs: fix comparison 3rd party website links (TanStack#1040) * Remove storing the return value of queryCache.removeQueries (TanStack#1038) Removed storing the return value of `queryCache.removeQueries` as it doesn't return anything. * feat: add QueryCache.fetchQuery method (TanStack#1041) * docs: add refetch documentation (TanStack#1043) * docs: fix graphql example link Closes TanStack#1044 * docs: remove trailing quotes from supporters links (TanStack#1045) The quotes were breaking the links. * docs: fix typo in queries page (TanStack#1046) * fix: prevent bundlers from removing side effects (TanStack#1048) * test: add invalidate query tests (TanStack#1052) * fix: query should try and throw again after error boundary reset (TanStack#1054) * docs: fix `user.id` access in case user is null (TanStack#1056) * docs: update comparison * docs: update sponsors * feat: add QueryCache.watchQuery (TanStack#1058) * docs: Update invalidations-from-mutations.md (TanStack#1057) Remove unnecessary parenthesis Co-authored-by: Clayton Marshall <[email protected]> Co-authored-by: Clayton Marshall <[email protected]> Co-authored-by: Tanner Linsley <[email protected]> Co-authored-by: Fredrik Höglund <[email protected]> Co-authored-by: Niek Bosch <[email protected]> Co-authored-by: Dragoș Străinu <[email protected]> Co-authored-by: Alex Marshall <[email protected]> Co-authored-by: Rudzainy Rahman <[email protected]> Co-authored-by: Corentin Leruth <[email protected]> Co-authored-by: Evgeniy Boreyko <[email protected]> Co-authored-by: Pierre Mdawar <[email protected]> Co-authored-by: Juliano Farias <[email protected]> Co-authored-by: Twinkle <[email protected]> Co-authored-by: Julius-Rapp <[email protected]> Co-authored-by: cheddar <[email protected]>
1 parent 8f6bdf3 commit 4dca773

File tree

144 files changed

+6972
-122807
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+6972
-122807
lines changed

.babelrc

Lines changed: 0 additions & 30 deletions
This file was deleted.

.babelrc.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
const { NODE_ENV, BABEL_ENV } = process.env
2+
const cjs = NODE_ENV === 'test' || BABEL_ENV === 'commonjs'
3+
const loose = true
4+
5+
module.exports = {
6+
presets: [
7+
[
8+
'@babel/env',
9+
{
10+
loose,
11+
modules: false,
12+
exclude: ['@babel/plugin-transform-regenerator'],
13+
},
14+
],
15+
'@babel/preset-typescript',
16+
'@babel/react',
17+
],
18+
plugins: [
19+
[
20+
'const-enum',
21+
{
22+
transform: 'constObject',
23+
},
24+
],
25+
'babel-plugin-transform-async-to-promises',
26+
cjs && ['@babel/transform-modules-commonjs', { loose }],
27+
[
28+
'@babel/transform-runtime',
29+
{
30+
useESModules: !cjs,
31+
version: require('./package.json').dependencies[
32+
'@babel/runtime'
33+
].replace(/^[^0-9]*/, ''),
34+
},
35+
],
36+
].filter(Boolean),
37+
}

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
{
2626
"ignoreParameters": true
2727
}
28-
]
28+
],
29+
"no-shadow": "error"
2930
}
3031
}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ node_modules
77
# builds
88
build
99
dist
10+
lib
11+
es
1012
artifacts
1113
.rpt2_cache
1214
coverage
@@ -25,6 +27,8 @@ yarn-debug.log*
2527
yarn-error.log*
2628
.history
2729
size-plugin.json
30+
stats-hydration.json
31+
stats-react.json
2832
stats.html
2933
.vscode/settings.json
3034

docs/src/manifests/manifest.json

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,21 @@
4242
"title": "TypeScript",
4343
"path": "/docs/typescript",
4444
"editUrl": "/docs/typescript.md"
45+
},
46+
{
47+
"title": "GraphQL",
48+
"path": "/docs/graphql",
49+
"editUrl": "/docs/graphql.md"
50+
},
51+
{
52+
"title": "React Native",
53+
"path": "/docs/react-native",
54+
"editUrl": "/docs/react-native.md"
4555
}
4656
]
4757
},
4858
{
49-
"title": "Concepts",
59+
"title": "Guides & Concepts",
5060
"open": true,
5161
"routes": [
5262
{
@@ -151,6 +161,12 @@
151161
}
152162
]
153163
},
164+
{
165+
"title": "API Reference",
166+
"heading": true,
167+
"path": "/docs/api",
168+
"editUrl": "/docs/api.md"
169+
},
154170
{
155171
"title": "Examples",
156172
"open": true,
@@ -165,6 +181,11 @@
165181
"path": "/docs/examples/basic",
166182
"editUrl": "/docs/examples/basic.mdx"
167183
},
184+
{
185+
"title": "Basic w/ GraphQL-Request",
186+
"path": "/docs/examples/basic-graphql-request",
187+
"editUrl": "/docs/examples/basic-graphql-request.mdx"
188+
},
168189
{
169190
"title": "Custom Hooks",
170191
"path": "/docs/examples/custom-hooks",
@@ -228,12 +249,6 @@
228249
]
229250
}
230251
]
231-
},
232-
{
233-
"title": "API Reference",
234-
"heading": true,
235-
"path": "/docs/api",
236-
"editUrl": "/docs/api.md"
237252
}
238253
]
239254
}

0 commit comments

Comments
 (0)