h3 1.8.1 → 1.8.2

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/dist/index.cjs CHANGED
@@ -321,7 +321,7 @@ function getRequestProtocol(event, opts = {}) {
321
321
  if (opts.xForwardedProto !== false && event.node.req.headers["x-forwarded-proto"] === "https") {
322
322
  return "https";
323
323
  }
324
- return event.node.req.connection.encrypted ? "https" : "http";
324
+ return event.node.req.connection?.encrypted ? "https" : "http";
325
325
  }
326
326
  const DOUBLE_SLASH_RE = /[/\\]{2,}/g;
327
327
  function getRequestPath(event) {
package/dist/index.mjs CHANGED
@@ -314,7 +314,7 @@ function getRequestProtocol(event, opts = {}) {
314
314
  if (opts.xForwardedProto !== false && event.node.req.headers["x-forwarded-proto"] === "https") {
315
315
  return "https";
316
316
  }
317
- return event.node.req.connection.encrypted ? "https" : "http";
317
+ return event.node.req.connection?.encrypted ? "https" : "http";
318
318
  }
319
319
  const DOUBLE_SLASH_RE = /[/\\]{2,}/g;
320
320
  function getRequestPath(event) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "h3",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "description": "Minimal H(TTP) framework built for high performance and portability.",
5
5
  "repository": "unjs/h3",
6
6
  "license": "MIT",
@@ -23,38 +23,38 @@
23
23
  "cookie-es": "^1.0.0",
24
24
  "defu": "^6.1.2",
25
25
  "destr": "^2.0.1",
26
- "iron-webcrypto": "^0.8.0",
26
+ "iron-webcrypto": "^0.10.1",
27
27
  "radix3": "^1.1.0",
28
28
  "ufo": "^1.3.0",
29
29
  "uncrypto": "^0.1.3",
30
30
  "unenv": "^1.7.4"
31
31
  },
32
32
  "devDependencies": {
33
- "0x": "^5.6.0",
34
- "@types/express": "^4.17.17",
35
- "@types/node": "^20.5.6",
36
- "@types/supertest": "^2.0.12",
37
- "@vitest/coverage-v8": "^0.34.3",
33
+ "0x": "^5.7.0",
34
+ "@types/express": "^4.17.18",
35
+ "@types/node": "^20.7.0",
36
+ "@types/supertest": "^2.0.13",
37
+ "@vitest/coverage-v8": "^0.34.5",
38
38
  "autocannon": "^7.12.0",
39
39
  "changelogen": "^0.5.5",
40
40
  "connect": "^3.7.0",
41
- "eslint": "^8.48.0",
41
+ "eslint": "^8.50.0",
42
42
  "eslint-config-unjs": "^0.2.1",
43
43
  "express": "^4.18.2",
44
44
  "get-port": "^7.0.0",
45
- "jiti": "^1.19.3",
46
- "listhen": "^1.4.1",
45
+ "jiti": "^1.20.0",
46
+ "listhen": "^1.5.5",
47
47
  "node-fetch-native": "^1.4.0",
48
- "prettier": "^3.0.2",
48
+ "prettier": "^3.0.3",
49
49
  "react": "^18.2.0",
50
50
  "react-dom": "^18.2.0",
51
51
  "supertest": "^6.3.3",
52
52
  "typescript": "^5.2.2",
53
53
  "unbuild": "^2.0.0",
54
- "vitest": "^0.34.3",
54
+ "vitest": "^0.34.5",
55
55
  "zod": "^3.22.2"
56
56
  },
57
- "packageManager": "pnpm@8.7.0",
57
+ "packageManager": "pnpm@8.8.0",
58
58
  "scripts": {
59
59
  "build": "unbuild",
60
60
  "dev": "vitest",