@depup/hono 4.13.0-depup.0 → 4.13.1-depup.0
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/README.md +2 -2
- package/changes.json +1 -1
- package/dist/cjs/middleware/etag/index.js +4 -1
- package/dist/cjs/router/trie-router/node.js +1 -1
- package/dist/cjs/utils/stream.js +5 -2
- package/dist/middleware/etag/index.js +4 -1
- package/dist/router/trie-router/node.js +1 -1
- package/dist/utils/stream.js +5 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -13,8 +13,8 @@ npm install @depup/hono
|
|
|
13
13
|
|
|
14
14
|
| Field | Value |
|
|
15
15
|
|-------|-------|
|
|
16
|
-
| Original | [hono](https://www.npmjs.com/package/hono) @ 4.13.
|
|
17
|
-
| Processed | 2026-08-
|
|
16
|
+
| Original | [hono](https://www.npmjs.com/package/hono) @ 4.13.1 |
|
|
17
|
+
| Processed | 2026-08-07 |
|
|
18
18
|
| Smoke test | passed |
|
|
19
19
|
| Deps updated | 0 |
|
|
20
20
|
|
package/changes.json
CHANGED
|
@@ -54,6 +54,9 @@ const etag = (options) => {
|
|
|
54
54
|
return async function etag2(c, next) {
|
|
55
55
|
const ifNoneMatch = c.req.header("If-None-Match") ?? null;
|
|
56
56
|
await next();
|
|
57
|
+
if (!(c.req.method === "GET" || c.req.method === "HEAD" || c.req.method === "QUERY") || !c.res.ok) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
57
60
|
const res = c.res;
|
|
58
61
|
let etag3 = res.headers.get("ETag");
|
|
59
62
|
if (!etag3) {
|
|
@@ -70,7 +73,7 @@ const etag = (options) => {
|
|
|
70
73
|
}
|
|
71
74
|
etag3 = weak ? `W/"${hash}"` : `"${hash}"`;
|
|
72
75
|
}
|
|
73
|
-
const matched = ifNoneMatch === "*"
|
|
76
|
+
const matched = ifNoneMatch === "*" || etagMatches(etag3, ifNoneMatch);
|
|
74
77
|
if (matched) {
|
|
75
78
|
c.res = new Response(null, {
|
|
76
79
|
status: 304,
|
|
@@ -166,7 +166,7 @@ class Node {
|
|
|
166
166
|
}
|
|
167
167
|
if (hasChildren(child.#children)) {
|
|
168
168
|
child.#params = params;
|
|
169
|
-
const componentCount = m[0].match(/\//)?.length ?? 0;
|
|
169
|
+
const componentCount = m[0].match(/\//g)?.length ?? 0;
|
|
170
170
|
const targetCurNodes = curNodesQueue[componentCount] ||= [];
|
|
171
171
|
targetCurNodes.push(child);
|
|
172
172
|
}
|
package/dist/cjs/utils/stream.js
CHANGED
|
@@ -80,8 +80,11 @@ class StreamingApi {
|
|
|
80
80
|
}
|
|
81
81
|
async pipe(body) {
|
|
82
82
|
this.writer.releaseLock();
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
try {
|
|
84
|
+
await body.pipeTo(this.writable, { preventClose: true, preventAbort: true });
|
|
85
|
+
} finally {
|
|
86
|
+
this.writer = this.writable.getWriter();
|
|
87
|
+
}
|
|
85
88
|
}
|
|
86
89
|
onAbort(listener) {
|
|
87
90
|
this.abortSubscribers.push(listener);
|
|
@@ -32,6 +32,9 @@ var etag = (options) => {
|
|
|
32
32
|
return async function etag2(c, next) {
|
|
33
33
|
const ifNoneMatch = c.req.header("If-None-Match") ?? null;
|
|
34
34
|
await next();
|
|
35
|
+
if (!(c.req.method === "GET" || c.req.method === "HEAD" || c.req.method === "QUERY") || !c.res.ok) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
35
38
|
const res = c.res;
|
|
36
39
|
let etag3 = res.headers.get("ETag");
|
|
37
40
|
if (!etag3) {
|
|
@@ -48,7 +51,7 @@ var etag = (options) => {
|
|
|
48
51
|
}
|
|
49
52
|
etag3 = weak ? `W/"${hash}"` : `"${hash}"`;
|
|
50
53
|
}
|
|
51
|
-
const matched = ifNoneMatch === "*"
|
|
54
|
+
const matched = ifNoneMatch === "*" || etagMatches(etag3, ifNoneMatch);
|
|
52
55
|
if (matched) {
|
|
53
56
|
c.res = new Response(null, {
|
|
54
57
|
status: 304,
|
|
@@ -145,7 +145,7 @@ var Node = class _Node {
|
|
|
145
145
|
}
|
|
146
146
|
if (hasChildren(child.#children)) {
|
|
147
147
|
child.#params = params;
|
|
148
|
-
const componentCount = m[0].match(/\//)?.length ?? 0;
|
|
148
|
+
const componentCount = m[0].match(/\//g)?.length ?? 0;
|
|
149
149
|
const targetCurNodes = curNodesQueue[componentCount] ||= [];
|
|
150
150
|
targetCurNodes.push(child);
|
|
151
151
|
}
|
package/dist/utils/stream.js
CHANGED
|
@@ -59,8 +59,11 @@ var StreamingApi = class {
|
|
|
59
59
|
}
|
|
60
60
|
async pipe(body) {
|
|
61
61
|
this.writer.releaseLock();
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
try {
|
|
63
|
+
await body.pipeTo(this.writable, { preventClose: true, preventAbort: true });
|
|
64
|
+
} finally {
|
|
65
|
+
this.writer = this.writable.getWriter();
|
|
66
|
+
}
|
|
64
67
|
}
|
|
65
68
|
onAbort(listener) {
|
|
66
69
|
this.abortSubscribers.push(listener);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depup/hono",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.1-depup.0",
|
|
4
4
|
"description": "Web framework built on Web Standards (with updated dependencies)",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -711,8 +711,8 @@
|
|
|
711
711
|
"changes": {},
|
|
712
712
|
"depsUpdated": 0,
|
|
713
713
|
"originalPackage": "hono",
|
|
714
|
-
"originalVersion": "4.13.
|
|
715
|
-
"processedAt": "2026-08-
|
|
714
|
+
"originalVersion": "4.13.1",
|
|
715
|
+
"processedAt": "2026-08-07T08:25:44.880Z",
|
|
716
716
|
"smokeTest": "passed"
|
|
717
717
|
}
|
|
718
718
|
}
|