@jsenv/fetch 1.1.72 → 1.1.74

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/fetch",
3
- "version": "1.1.72",
3
+ "version": "1.1.74",
4
4
  "description": "Unified url fetcher (http, http, file, data)",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -31,12 +31,9 @@
31
31
  "files": [
32
32
  "/src/"
33
33
  ],
34
- "scripts": {
35
- "test": "node --conditions=development ./scripts/test.mjs"
36
- },
37
34
  "dependencies": {
38
35
  "@jsenv/urls": "2.5.2",
39
- "@jsenv/server": "15.2.19",
36
+ "@jsenv/server": "15.3.1",
40
37
  "node-fetch": "3.3.2"
41
38
  }
42
39
  }
@@ -178,7 +178,7 @@ const canUseBlob = () => {
178
178
  // eslint-disable-next-line no-new
179
179
  new Blob();
180
180
  return true;
181
- } catch (e) {
181
+ } catch {
182
182
  return false;
183
183
  }
184
184
  };
@@ -1,14 +1,13 @@
1
1
  // https://github.com/node-fetch/node-fetch/blob/8c197f8982a238b3c345c64b17bfa92e16b4f7c4/src/response.js#L1
2
2
 
3
- import nodeFetch, { Response } from "node-fetch";
4
- import { Agent } from "node:https";
5
-
6
3
  import { fetchFileSystem } from "@jsenv/server";
7
4
  import {
8
5
  fileHandleToReadableStream,
9
6
  isFileHandle,
10
7
  } from "@jsenv/server/src/interfacing_with_node/body.js";
11
8
  import { DATA_URL } from "@jsenv/urls";
9
+ import nodeFetch, { Response } from "node-fetch";
10
+ import { Agent } from "node:https";
12
11
 
13
12
  export const fetchUrl = async (
14
13
  url,
@@ -25,7 +24,7 @@ export const fetchUrl = async (
25
24
  ) => {
26
25
  try {
27
26
  url = String(new URL(url));
28
- } catch (e) {
27
+ } catch {
29
28
  throw new Error(
30
29
  `fetchUrl first argument must be an absolute url, received ${url}`,
31
30
  );