@depup/hono 4.12.32-depup.0 → 4.12.33-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 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.12.32 |
17
- | Processed | 2026-07-24 |
16
+ | Original | [hono](https://www.npmjs.com/package/hono) @ 4.12.33 |
17
+ | Processed | 2026-07-31 |
18
18
  | Smoke test | passed |
19
19
  | Deps updated | 0 |
20
20
 
package/changes.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "bumped": {},
3
- "timestamp": "2026-07-24T16:34:46.993Z",
3
+ "timestamp": "2026-07-31T16:36:08.929Z",
4
4
  "totalUpdated": 0
5
5
  }
@@ -330,19 +330,22 @@ const useSyncExternalStore = (subscribe, getSnapshot, getServerSnapshot) => {
330
330
  }
331
331
  return getServerSnapshot();
332
332
  }
333
- const [serverSnapshotIsUsed] = useState(!!(buildData[0][4] && getServerSnapshot));
334
- const [state, setState] = useState(
335
- () => serverSnapshotIsUsed ? getServerSnapshot() : getSnapshot()
336
- );
333
+ const snapshot = buildData[0][4] && getServerSnapshot ? getServerSnapshot() : getSnapshot();
334
+ const [, setVersion] = useState(0);
335
+ const latestSnapshot = useRef([snapshot, getSnapshot]);
336
+ latestSnapshot.current = [snapshot, getSnapshot];
337
+ const unsubscribeRef = useRef(null);
337
338
  useEffect(() => {
338
- if (serverSnapshotIsUsed) {
339
- setState(getSnapshot());
339
+ const update2 = () => setVersion((version) => version + 1);
340
+ unsubscribeRef.current?.();
341
+ unsubscribeRef.current = subscribe(update2);
342
+ const [snapshot2, getSnapshot2] = latestSnapshot.current;
343
+ if (!Object.is(snapshot2, getSnapshot2())) {
344
+ update2();
340
345
  }
341
- return subscribe(() => {
342
- setState(getSnapshot());
343
- });
344
- }, []);
345
- return state;
346
+ }, [subscribe]);
347
+ useEffect(() => () => unsubscribeRef.current?.(), []);
348
+ return snapshot;
346
349
  };
347
350
  // Annotate the CommonJS export names for ESM import in node:
348
351
  0 && (module.exports = {
@@ -47,6 +47,7 @@ const verifySignature = async (base64Signature, value, secret) => {
47
47
  }
48
48
  };
49
49
  const validCookieNameRegEx = /^[\w!#$%&'*.^`|~+-]+$/;
50
+ const relaxedCookieNameRegEx = /^[!#-:<>-[\]-~]+$/;
50
51
  const validCookieValueRegEx = /^[ !#-:<-[\]-~]*$/;
51
52
  const trimCookieWhitespace = (value) => {
52
53
  let start = 0;
@@ -79,7 +80,7 @@ const parse = (cookie, name) => {
79
80
  continue;
80
81
  }
81
82
  const cookieName = trimCookieWhitespace(pairStr.substring(0, valueStartPos));
82
- if (name && name !== cookieName || !validCookieNameRegEx.test(cookieName) || cookieName in parsedCookie) {
83
+ if (name && name !== cookieName || !relaxedCookieNameRegEx.test(cookieName) || cookieName in parsedCookie) {
83
84
  continue;
84
85
  }
85
86
  let cookieValue = trimCookieWhitespace(pairStr.substring(valueStartPos + 1));
@@ -289,19 +289,22 @@ var useSyncExternalStore = (subscribe, getSnapshot, getServerSnapshot) => {
289
289
  }
290
290
  return getServerSnapshot();
291
291
  }
292
- const [serverSnapshotIsUsed] = useState(!!(buildData[0][4] && getServerSnapshot));
293
- const [state, setState] = useState(
294
- () => serverSnapshotIsUsed ? getServerSnapshot() : getSnapshot()
295
- );
292
+ const snapshot = buildData[0][4] && getServerSnapshot ? getServerSnapshot() : getSnapshot();
293
+ const [, setVersion] = useState(0);
294
+ const latestSnapshot = useRef([snapshot, getSnapshot]);
295
+ latestSnapshot.current = [snapshot, getSnapshot];
296
+ const unsubscribeRef = useRef(null);
296
297
  useEffect(() => {
297
- if (serverSnapshotIsUsed) {
298
- setState(getSnapshot());
298
+ const update2 = () => setVersion((version) => version + 1);
299
+ unsubscribeRef.current?.();
300
+ unsubscribeRef.current = subscribe(update2);
301
+ const [snapshot2, getSnapshot2] = latestSnapshot.current;
302
+ if (!Object.is(snapshot2, getSnapshot2())) {
303
+ update2();
299
304
  }
300
- return subscribe(() => {
301
- setState(getSnapshot());
302
- });
303
- }, []);
304
- return state;
305
+ }, [subscribe]);
306
+ useEffect(() => () => unsubscribeRef.current?.(), []);
307
+ return snapshot;
305
308
  };
306
309
  export {
307
310
  STASH_EFFECT,
@@ -23,6 +23,7 @@ var verifySignature = async (base64Signature, value, secret) => {
23
23
  }
24
24
  };
25
25
  var validCookieNameRegEx = /^[\w!#$%&'*.^`|~+-]+$/;
26
+ var relaxedCookieNameRegEx = /^[!#-:<>-[\]-~]+$/;
26
27
  var validCookieValueRegEx = /^[ !#-:<-[\]-~]*$/;
27
28
  var trimCookieWhitespace = (value) => {
28
29
  let start = 0;
@@ -55,7 +56,7 @@ var parse = (cookie, name) => {
55
56
  continue;
56
57
  }
57
58
  const cookieName = trimCookieWhitespace(pairStr.substring(0, valueStartPos));
58
- if (name && name !== cookieName || !validCookieNameRegEx.test(cookieName) || cookieName in parsedCookie) {
59
+ if (name && name !== cookieName || !relaxedCookieNameRegEx.test(cookieName) || cookieName in parsedCookie) {
59
60
  continue;
60
61
  }
61
62
  let cookieValue = trimCookieWhitespace(pairStr.substring(valueStartPos + 1));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depup/hono",
3
- "version": "4.12.32-depup.0",
3
+ "version": "4.12.33-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",
@@ -671,7 +671,7 @@
671
671
  ],
672
672
  "devDependencies": {
673
673
  "@hono/eslint-config": "^2.1.1",
674
- "@hono/node-server": "^2.0.2",
674
+ "@hono/node-server": "^2.0.12",
675
675
  "@types/jsdom": "^21.1.7",
676
676
  "@types/node": "^24.3.0",
677
677
  "@types/ws": "^8.18.1",
@@ -689,7 +689,6 @@
689
689
  "prettier": "3.7.4",
690
690
  "publint": "0.3.15",
691
691
  "typescript": "^6.0.3",
692
- "undici": "^6.27.0",
693
692
  "vite-plugin-fastly-js-compute": "^0.4.2",
694
693
  "vitest": "^4.1.9",
695
694
  "wrangler": "4.107.0",
@@ -704,8 +703,8 @@
704
703
  "changes": {},
705
704
  "depsUpdated": 0,
706
705
  "originalPackage": "hono",
707
- "originalVersion": "4.12.32",
708
- "processedAt": "2026-07-24T16:35:10.593Z",
706
+ "originalVersion": "4.12.33",
707
+ "processedAt": "2026-07-31T16:36:28.431Z",
709
708
  "smokeTest": "passed"
710
709
  }
711
710
  }