xsfetch 0.4.0-beta.9 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +2 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -20,7 +20,8 @@ const createFetch = (userOptions = {}) => {
20
20
  const res = await fetch(input, init);
21
21
  if (res.ok || retriesLeft === 0 || !options.retryStatusCodes.includes(res.status))
22
22
  return res;
23
- options.debug && console.warn("[xsfetch] Failed, retrying... Times left:", retriesLeft);
23
+ if (options.debug)
24
+ console.warn("[xsfetch] Failed, retrying... Times left:", retriesLeft);
24
25
  await sleep(options.retryDelay);
25
26
  return async () => xsfetch(retriesLeft - 1, input, init);
26
27
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "xsfetch",
3
3
  "type": "module",
4
- "version": "0.4.0-beta.9",
4
+ "version": "0.4.1",
5
5
  "description": "extra-small Fetch API with auto retry.",
6
6
  "author": "Moeru AI",
7
7
  "license": "MIT",
@@ -28,7 +28,7 @@
28
28
  "dist"
29
29
  ],
30
30
  "devDependencies": {
31
- "@moeru/std": "^0.1.0-beta.7"
31
+ "@moeru/std": "^0.1.0-beta.14"
32
32
  },
33
33
  "scripts": {
34
34
  "build": "pkgroll"