@tanstack/query-core
Advanced tools
Comparing version 5.0.0-beta.5 to 5.0.0-beta.6
@@ -6,3 +6,3 @@ import "./chunk-WPSKCR32.js"; | ||
import { onlineManager } from "./onlineManager.js"; | ||
import { sleep } from "./utils.js"; | ||
import { isServer, sleep } from "./utils.js"; | ||
function defaultRetryDelay(failureCount) { | ||
@@ -100,3 +100,3 @@ return Math.min(1e3 * 2 ** failureCount, 3e4); | ||
} | ||
const retry = config.retry ?? 3; | ||
const retry = config.retry ?? (isServer ? 0 : 3); | ||
const retryDelay = config.retryDelay ?? defaultRetryDelay; | ||
@@ -103,0 +103,0 @@ const delay = typeof retryDelay === "function" ? retryDelay(failureCount, error) : retryDelay; |
// src/retryer.ts | ||
import { focusManager } from "./focusManager.js"; | ||
import { onlineManager } from "./onlineManager.js"; | ||
import { sleep } from "./utils.js"; | ||
import { isServer, sleep } from "./utils.js"; | ||
function defaultRetryDelay(failureCount) { | ||
@@ -91,3 +91,3 @@ return Math.min(1e3 * 2 ** failureCount, 3e4); | ||
} | ||
const retry = config.retry ?? 3; | ||
const retry = config.retry ?? (isServer ? 0 : 3); | ||
const retryDelay = config.retryDelay ?? defaultRetryDelay; | ||
@@ -94,0 +94,0 @@ const delay = typeof retryDelay === "function" ? retryDelay(failureCount, error) : retryDelay; |
{ | ||
"name": "@tanstack/query-core", | ||
"version": "5.0.0-beta.5", | ||
"version": "5.0.0-beta.6", | ||
"description": "The framework agnostic core that powers TanStack Query", | ||
@@ -5,0 +5,0 @@ "author": "tannerlinsley", |
import { focusManager } from './focusManager' | ||
import { onlineManager } from './onlineManager' | ||
import { sleep } from './utils' | ||
import { isServer, sleep } from './utils' | ||
import type { CancelOptions, DefaultError, NetworkMode } from './types' | ||
@@ -161,3 +161,3 @@ | ||
// Do we need to retry the request? | ||
const retry = config.retry ?? 3 | ||
const retry = config.retry ?? (isServer ? 0 : 3) | ||
const retryDelay = config.retryDelay ?? defaultRetryDelay | ||
@@ -164,0 +164,0 @@ const delay = |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1753906
26783