@specship/specship-win32-arm64 0.13.0 → 0.13.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 (183) hide show
  1. package/lib/dist/server/cli.js +1 -1
  2. package/lib/dist/server/routes/sse.js +1 -1
  3. package/lib/dist/server/server.js +1 -1
  4. package/lib/node_modules/.package-lock.json +11 -20
  5. package/lib/node_modules/ajv/node_modules/fast-uri/index.js +1 -1
  6. package/lib/node_modules/ajv/node_modules/fast-uri/package.json +1 -1
  7. package/lib/node_modules/ajv/node_modules/fast-uri/test/security.test.js +28 -0
  8. package/lib/node_modules/toad-cache/README.md +10 -9
  9. package/lib/node_modules/toad-cache/dist/toad-cache.cjs +139 -139
  10. package/lib/node_modules/toad-cache/dist/toad-cache.mjs +136 -140
  11. package/lib/node_modules/toad-cache/package.json +8 -8
  12. package/lib/node_modules/toad-cache/toad-cache.d.cts +20 -14
  13. package/lib/node_modules/toad-cache/toad-cache.d.ts +18 -14
  14. package/lib/node_modules/yaml/README.md +14 -31
  15. package/lib/node_modules/yaml/browser/dist/compose/compose-collection.js +3 -3
  16. package/lib/node_modules/yaml/browser/dist/compose/compose-doc.js +0 -1
  17. package/lib/node_modules/yaml/browser/dist/compose/compose-node.js +4 -21
  18. package/lib/node_modules/yaml/browser/dist/compose/compose-scalar.js +8 -14
  19. package/lib/node_modules/yaml/browser/dist/compose/composer.js +2 -4
  20. package/lib/node_modules/yaml/browser/dist/compose/resolve-block-map.js +0 -2
  21. package/lib/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +1 -3
  22. package/lib/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +2 -8
  23. package/lib/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +4 -6
  24. package/lib/node_modules/yaml/browser/dist/compose/resolve-props.js +5 -3
  25. package/lib/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +2 -1
  26. package/lib/node_modules/yaml/browser/dist/compose/util-map-includes.js +5 -1
  27. package/lib/node_modules/yaml/browser/dist/doc/Document.js +2 -3
  28. package/lib/node_modules/yaml/browser/dist/doc/anchors.js +2 -1
  29. package/lib/node_modules/yaml/browser/dist/doc/applyReviver.js +0 -1
  30. package/lib/node_modules/yaml/browser/dist/doc/createNode.js +2 -1
  31. package/lib/node_modules/yaml/browser/dist/errors.js +1 -1
  32. package/lib/node_modules/yaml/browser/dist/log.js +6 -1
  33. package/lib/node_modules/yaml/browser/dist/node_modules/tslib/tslib.es6.js +21 -0
  34. package/lib/node_modules/yaml/browser/dist/nodes/Alias.js +12 -27
  35. package/lib/node_modules/yaml/browser/dist/nodes/YAMLMap.js +1 -1
  36. package/lib/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +49 -8
  37. package/lib/node_modules/yaml/browser/dist/parse/lexer.js +24 -28
  38. package/lib/node_modules/yaml/browser/dist/parse/parser.js +8 -31
  39. package/lib/node_modules/yaml/browser/dist/public-api.js +0 -3
  40. package/lib/node_modules/yaml/browser/dist/schema/Schema.js +2 -1
  41. package/lib/node_modules/yaml/browser/dist/schema/json/schema.js +1 -1
  42. package/lib/node_modules/yaml/browser/dist/schema/tags.js +16 -29
  43. package/lib/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +13 -5
  44. package/lib/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +1 -1
  45. package/lib/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +0 -2
  46. package/lib/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +1 -1
  47. package/lib/node_modules/yaml/browser/dist/stringify/stringify.js +5 -10
  48. package/lib/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +3 -13
  49. package/lib/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +2 -3
  50. package/lib/node_modules/yaml/browser/dist/stringify/stringifyPair.js +1 -1
  51. package/lib/node_modules/yaml/browser/dist/stringify/stringifyString.js +16 -24
  52. package/lib/node_modules/yaml/browser/dist/util.js +1 -1
  53. package/lib/node_modules/yaml/dist/cli.d.ts +1 -1
  54. package/lib/node_modules/yaml/dist/cli.mjs +3 -5
  55. package/lib/node_modules/yaml/dist/compose/compose-collection.d.ts +4 -4
  56. package/lib/node_modules/yaml/dist/compose/compose-collection.js +3 -3
  57. package/lib/node_modules/yaml/dist/compose/compose-doc.d.ts +6 -6
  58. package/lib/node_modules/yaml/dist/compose/compose-doc.js +0 -1
  59. package/lib/node_modules/yaml/dist/compose/compose-node.d.ts +7 -8
  60. package/lib/node_modules/yaml/dist/compose/compose-node.js +4 -21
  61. package/lib/node_modules/yaml/dist/compose/compose-scalar.d.ts +4 -4
  62. package/lib/node_modules/yaml/dist/compose/compose-scalar.js +7 -13
  63. package/lib/node_modules/yaml/dist/compose/composer.d.ts +6 -7
  64. package/lib/node_modules/yaml/dist/compose/composer.js +3 -6
  65. package/lib/node_modules/yaml/dist/compose/resolve-block-map.d.ts +5 -5
  66. package/lib/node_modules/yaml/dist/compose/resolve-block-map.js +0 -2
  67. package/lib/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +5 -5
  68. package/lib/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +5 -5
  69. package/lib/node_modules/yaml/dist/compose/resolve-block-seq.js +1 -3
  70. package/lib/node_modules/yaml/dist/compose/resolve-end.d.ts +2 -2
  71. package/lib/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -7
  72. package/lib/node_modules/yaml/dist/compose/resolve-flow-collection.js +2 -8
  73. package/lib/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +4 -4
  74. package/lib/node_modules/yaml/dist/compose/resolve-flow-scalar.js +4 -6
  75. package/lib/node_modules/yaml/dist/compose/resolve-props.d.ts +2 -2
  76. package/lib/node_modules/yaml/dist/compose/resolve-props.js +5 -3
  77. package/lib/node_modules/yaml/dist/compose/util-contains-newline.d.ts +1 -1
  78. package/lib/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +1 -1
  79. package/lib/node_modules/yaml/dist/compose/util-empty-scalar-position.js +2 -1
  80. package/lib/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +2 -2
  81. package/lib/node_modules/yaml/dist/compose/util-map-includes.d.ts +3 -3
  82. package/lib/node_modules/yaml/dist/compose/util-map-includes.js +5 -1
  83. package/lib/node_modules/yaml/dist/doc/Document.d.ts +11 -11
  84. package/lib/node_modules/yaml/dist/doc/Document.js +2 -3
  85. package/lib/node_modules/yaml/dist/doc/anchors.d.ts +2 -2
  86. package/lib/node_modules/yaml/dist/doc/anchors.js +2 -1
  87. package/lib/node_modules/yaml/dist/doc/applyReviver.js +0 -1
  88. package/lib/node_modules/yaml/dist/doc/createNode.d.ts +4 -4
  89. package/lib/node_modules/yaml/dist/doc/createNode.js +2 -1
  90. package/lib/node_modules/yaml/dist/doc/directives.d.ts +1 -1
  91. package/lib/node_modules/yaml/dist/errors.d.ts +1 -1
  92. package/lib/node_modules/yaml/dist/errors.js +1 -1
  93. package/lib/node_modules/yaml/dist/index.d.ts +18 -21
  94. package/lib/node_modules/yaml/dist/log.js +4 -4
  95. package/lib/node_modules/yaml/dist/nodes/Alias.d.ts +9 -10
  96. package/lib/node_modules/yaml/dist/nodes/Alias.js +11 -26
  97. package/lib/node_modules/yaml/dist/nodes/Collection.d.ts +4 -4
  98. package/lib/node_modules/yaml/dist/nodes/Node.d.ts +9 -16
  99. package/lib/node_modules/yaml/dist/nodes/Pair.d.ts +8 -9
  100. package/lib/node_modules/yaml/dist/nodes/Scalar.d.ts +4 -9
  101. package/lib/node_modules/yaml/dist/nodes/YAMLMap.d.ts +10 -10
  102. package/lib/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +10 -10
  103. package/lib/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +3 -3
  104. package/lib/node_modules/yaml/dist/nodes/addPairToJSMap.js +48 -7
  105. package/lib/node_modules/yaml/dist/nodes/identity.d.ts +7 -7
  106. package/lib/node_modules/yaml/dist/nodes/toJS.d.ts +2 -4
  107. package/lib/node_modules/yaml/dist/options.d.ts +10 -22
  108. package/lib/node_modules/yaml/dist/parse/cst-scalar.d.ts +4 -4
  109. package/lib/node_modules/yaml/dist/parse/cst-stringify.d.ts +1 -1
  110. package/lib/node_modules/yaml/dist/parse/cst-visit.d.ts +2 -2
  111. package/lib/node_modules/yaml/dist/parse/cst.d.ts +3 -4
  112. package/lib/node_modules/yaml/dist/parse/lexer.d.ts +1 -1
  113. package/lib/node_modules/yaml/dist/parse/lexer.js +24 -28
  114. package/lib/node_modules/yaml/dist/parse/parser.d.ts +4 -4
  115. package/lib/node_modules/yaml/dist/parse/parser.js +9 -33
  116. package/lib/node_modules/yaml/dist/public-api.d.ts +5 -6
  117. package/lib/node_modules/yaml/dist/public-api.js +0 -3
  118. package/lib/node_modules/yaml/dist/schema/Schema.d.ts +5 -4
  119. package/lib/node_modules/yaml/dist/schema/Schema.js +2 -1
  120. package/lib/node_modules/yaml/dist/schema/common/map.d.ts +1 -1
  121. package/lib/node_modules/yaml/dist/schema/common/null.d.ts +1 -1
  122. package/lib/node_modules/yaml/dist/schema/common/seq.d.ts +1 -1
  123. package/lib/node_modules/yaml/dist/schema/common/string.d.ts +1 -1
  124. package/lib/node_modules/yaml/dist/schema/core/bool.d.ts +1 -1
  125. package/lib/node_modules/yaml/dist/schema/core/float.d.ts +1 -1
  126. package/lib/node_modules/yaml/dist/schema/core/int.d.ts +1 -1
  127. package/lib/node_modules/yaml/dist/schema/core/schema.d.ts +1 -1
  128. package/lib/node_modules/yaml/dist/schema/json/schema.d.ts +1 -1
  129. package/lib/node_modules/yaml/dist/schema/json/schema.js +1 -1
  130. package/lib/node_modules/yaml/dist/schema/tags.d.ts +3 -11
  131. package/lib/node_modules/yaml/dist/schema/tags.js +13 -26
  132. package/lib/node_modules/yaml/dist/schema/types.d.ts +12 -14
  133. package/lib/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +1 -1
  134. package/lib/node_modules/yaml/dist/schema/yaml-1.1/binary.js +7 -9
  135. package/lib/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +1 -1
  136. package/lib/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +1 -1
  137. package/lib/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +1 -1
  138. package/lib/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +17 -11
  139. package/lib/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +7 -7
  140. package/lib/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -1
  141. package/lib/node_modules/yaml/dist/schema/yaml-1.1/schema.js +0 -2
  142. package/lib/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +9 -9
  143. package/lib/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +1 -1
  144. package/lib/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +1 -1
  145. package/lib/node_modules/yaml/dist/stringify/stringify.d.ts +3 -3
  146. package/lib/node_modules/yaml/dist/stringify/stringify.js +5 -10
  147. package/lib/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +2 -2
  148. package/lib/node_modules/yaml/dist/stringify/stringifyCollection.js +3 -13
  149. package/lib/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +3 -3
  150. package/lib/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +1 -1
  151. package/lib/node_modules/yaml/dist/stringify/stringifyNumber.js +2 -3
  152. package/lib/node_modules/yaml/dist/stringify/stringifyPair.d.ts +2 -2
  153. package/lib/node_modules/yaml/dist/stringify/stringifyPair.js +1 -1
  154. package/lib/node_modules/yaml/dist/stringify/stringifyString.d.ts +2 -2
  155. package/lib/node_modules/yaml/dist/stringify/stringifyString.js +15 -23
  156. package/lib/node_modules/yaml/dist/util.d.ts +12 -16
  157. package/lib/node_modules/yaml/dist/util.js +2 -2
  158. package/lib/node_modules/yaml/dist/visit.d.ts +7 -7
  159. package/lib/node_modules/yaml/package.json +14 -13
  160. package/lib/package.json +5 -6
  161. package/package.json +1 -1
  162. package/lib/node_modules/jsonc-parser/CHANGELOG.md +0 -76
  163. package/lib/node_modules/jsonc-parser/LICENSE.md +0 -21
  164. package/lib/node_modules/jsonc-parser/README.md +0 -364
  165. package/lib/node_modules/jsonc-parser/SECURITY.md +0 -41
  166. package/lib/node_modules/jsonc-parser/lib/esm/impl/edit.js +0 -185
  167. package/lib/node_modules/jsonc-parser/lib/esm/impl/format.js +0 -261
  168. package/lib/node_modules/jsonc-parser/lib/esm/impl/parser.js +0 -659
  169. package/lib/node_modules/jsonc-parser/lib/esm/impl/scanner.js +0 -443
  170. package/lib/node_modules/jsonc-parser/lib/esm/impl/string-intern.js +0 -29
  171. package/lib/node_modules/jsonc-parser/lib/esm/main.d.ts +0 -351
  172. package/lib/node_modules/jsonc-parser/lib/esm/main.js +0 -178
  173. package/lib/node_modules/jsonc-parser/lib/umd/impl/edit.js +0 -201
  174. package/lib/node_modules/jsonc-parser/lib/umd/impl/format.js +0 -275
  175. package/lib/node_modules/jsonc-parser/lib/umd/impl/parser.js +0 -682
  176. package/lib/node_modules/jsonc-parser/lib/umd/impl/scanner.js +0 -456
  177. package/lib/node_modules/jsonc-parser/lib/umd/impl/string-intern.js +0 -42
  178. package/lib/node_modules/jsonc-parser/lib/umd/main.d.ts +0 -351
  179. package/lib/node_modules/jsonc-parser/lib/umd/main.js +0 -194
  180. package/lib/node_modules/jsonc-parser/package.json +0 -37
  181. package/lib/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +0 -67
  182. package/lib/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +0 -9
  183. package/lib/node_modules/yaml/dist/schema/yaml-1.1/merge.js +0 -71
@@ -50,7 +50,7 @@ function parseArgs() {
50
50
  console.log(`Usage: specship-desktop [options]
51
51
 
52
52
  Options:
53
- --project-root, -p <path> Project root (default: $SPECSHIP_PROJECT_ROOT, $SPECSHIP_PROJECT_ROOT, or cwd)
53
+ --project-root, -p <path> Project root (default: $SPECSHIP_PROJECT_ROOT or cwd)
54
54
  --port <n> HTTP port (default: 4242)
55
55
  --host <h> Bind host (default: 127.0.0.1)
56
56
  --no-ingest Skip the in-process Claude JSONL transcript watcher
@@ -7,7 +7,7 @@
7
7
  * `origin: true`) never gets to add the CORS header. Without this, a
8
8
  * cross-origin `EventSource` is blocked: e.g. the dashboard opened at
9
9
  * `127.0.0.1:<port>` calling the API host `localhost` (different origins to the
10
- * browser), or the Angular dev server on `:4200`. Echoing the request origin
10
+ * browser), or the Vite dev server on `:5173`. Echoing the request origin
11
11
  * mirrors what `origin: true` does for the non-raw routes.
12
12
  */
13
13
  export function writeSseHead(req, reply) {
@@ -292,7 +292,7 @@ export async function createServer(options) {
292
292
  // 1. Try the requested URL as a real file under webDir → serve it
293
293
  // with the right content-type. Covers the SPA's chunk-*.js,
294
294
  // styles.css, favicons, fonts, etc.
295
- // 2. Fall through to index.html for any other GET so Angular's
295
+ // 2. Fall through to index.html for any other GET so the SPA's
296
296
  // client-side router can take over (`/memory`, `/graph`, …).
297
297
  // Non-GET methods and `/api/*` paths still 404 cleanly so the UI
298
298
  // can surface them. A MISSING asset path (e.g. a stale build's old
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@specship/specship",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
@@ -123,9 +123,9 @@
123
123
  }
124
124
  },
125
125
  "node_modules/ajv/node_modules/fast-uri": {
126
- "version": "3.1.2",
127
- "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz",
128
- "integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==",
126
+ "version": "3.1.3",
127
+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.3.tgz",
128
+ "integrity": "sha512-i70LwGWUduXqzicKXWshooq+sWL1K3WUU5rKZNG/0i3a1OSoX3HqhH5WbWwTmqWfor4urUakGPiRQcleRZTwOg==",
129
129
  "funding": [
130
130
  {
131
131
  "type": "github",
@@ -594,12 +594,6 @@
594
594
  "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
595
595
  "license": "MIT"
596
596
  },
597
- "node_modules/jsonc-parser": {
598
- "version": "3.3.1",
599
- "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz",
600
- "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==",
601
- "license": "MIT"
602
- },
603
597
  "node_modules/light-my-request": {
604
598
  "version": "5.14.0",
605
599
  "resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-5.14.0.tgz",
@@ -1122,9 +1116,9 @@
1122
1116
  }
1123
1117
  },
1124
1118
  "node_modules/toad-cache": {
1125
- "version": "3.7.1",
1126
- "resolved": "https://registry.npmjs.org/toad-cache/-/toad-cache-3.7.1.tgz",
1127
- "integrity": "sha512-5DXWzE4Vz7xNHsv+xQ+MGfJYyC78Aok3tEr0MNwHoRf7vZnga1mQXZ4/Nsodld4VR6Wd+VhfmqnNrsRJyYPfrQ==",
1119
+ "version": "3.7.4",
1120
+ "resolved": "https://registry.npmjs.org/toad-cache/-/toad-cache-3.7.4.tgz",
1121
+ "integrity": "sha512-m1TdR/rvT7kgGJZhspNtXdsdYk0fddFpJJFlG5s+UkPFo6lkLoZ3YLOaovPYjq1R75NP5JfeTlSHaOsE09peCg==",
1128
1122
  "license": "MIT",
1129
1123
  "engines": {
1130
1124
  "node": ">=20"
@@ -1196,18 +1190,15 @@
1196
1190
  "optional": true
1197
1191
  },
1198
1192
  "node_modules/yaml": {
1199
- "version": "2.9.0",
1200
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz",
1201
- "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==",
1193
+ "version": "2.5.0",
1194
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.0.tgz",
1195
+ "integrity": "sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==",
1202
1196
  "license": "ISC",
1203
1197
  "bin": {
1204
1198
  "yaml": "bin.mjs"
1205
1199
  },
1206
1200
  "engines": {
1207
- "node": ">= 14.6"
1208
- },
1209
- "funding": {
1210
- "url": "https://github.com/sponsors/eemeli"
1201
+ "node": ">= 14"
1211
1202
  }
1212
1203
  }
1213
1204
  }
@@ -305,7 +305,7 @@ function parseWithStatus (uri, opts) {
305
305
  if (parsed.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost)) && isIP === false && nonSimpleDomain(parsed.host)) {
306
306
  // convert Unicode IDN -> ASCII IDN
307
307
  try {
308
- parsed.host = URL.domainToASCII(parsed.host.toLowerCase())
308
+ parsed.host = new URL('http://' + parsed.host).hostname
309
309
  } catch (e) {
310
310
  parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e
311
311
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fast-uri",
3
3
  "description": "Dependency-free RFC 3986 URI toolbox",
4
- "version": "3.1.2",
4
+ "version": "3.1.3",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
7
7
  "types": "types/index.d.ts",
@@ -131,3 +131,31 @@ test('normalize does not double-decode %2540 into a live @', (t) => {
131
131
  t.plan(1)
132
132
  t.notEqual(parsed.host, 'trusted.com@evil.com', 'http://trusted.com%2540evil.com/')
133
133
  })
134
+
135
+ test('parse canonicalises IDN / Unicode hosts to their ASCII form', (t) => {
136
+ const cases = [
137
+ {
138
+ input: 'http://127。0。0。1/',
139
+ expectedHost: '127.0.0.1',
140
+ description: 'full-width ideographic stops as octet separators'
141
+ },
142
+ {
143
+ input: 'http://example.com/',
144
+ expectedHost: 'example.com',
145
+ description: 'fullwidth e as first letter'
146
+ },
147
+ {
148
+ input: 'http://納豆.example.org/',
149
+ expectedHost: 'xn--99zt52a.example.org',
150
+ description: 'CJK label requiring punycode'
151
+ }
152
+ ]
153
+
154
+ t.plan(cases.length * 2)
155
+
156
+ cases.forEach(({ input, expectedHost, description }) => {
157
+ const parsed = fastURI.parse(input)
158
+ t.notOk(parsed.error, `parse should not set error: ${description}`)
159
+ t.equal(parsed.host, expectedHost, `host canonicalised to ASCII: ${description}`)
160
+ })
161
+ })
@@ -144,7 +144,7 @@ console.log(cache.keys())
144
144
 
145
145
  ### Property
146
146
 
147
- Max items to hold in cache (1000)
147
+ Max items to hold in cache (1000). Must be a non-negative integer; `0` means no size limit.
148
148
 
149
149
  **Example**
150
150
 
@@ -201,7 +201,7 @@ cache.size // 0 - it's a new cache!
201
201
 
202
202
  ### Property
203
203
 
204
- Milliseconds an item will remain in cache; lazy expiration upon next `get()` of an item
204
+ Milliseconds an item will remain in cache; lazy expiration upon next `get()` of an item. Must be a non-negative integer; `0` disables expiration.
205
205
 
206
206
  **Example**
207
207
 
@@ -211,6 +211,8 @@ const cache = new Lru()
211
211
  cache.ttl = 3e4
212
212
  ```
213
213
 
214
+ Note: entries stored while `ttl` was `0` have no expiry timestamp, so enabling a TTL at runtime immediately expires them on their next `get()`. Prefer setting the TTL via the constructor.
215
+
214
216
  ## Hit/miss/expiration tracking
215
217
 
216
218
  In case you want to gather information on cache hit/miss/expiration ratio, as well as cache size and eviction statistics, you can use LruHitStatistics class:
@@ -218,13 +220,12 @@ In case you want to gather information on cache hit/miss/expiration ratio, as we
218
220
  ```js
219
221
  const sharedRecord = new HitStatisticsRecord() // if you want to use single record object for all of caches, create it manually and pass to each cache
220
222
 
221
- const cache = new LruHitStatistics({
222
- cacheId: 'some-cache-id',
223
- globalStatisticsRecord: sharedRecord,
224
- statisticTtlInHours: 24, // how often to reset statistics. On every rotation previously accumulated data is removed
225
- max: 1000,
226
- ttlInMsecs: 0,
227
- })
223
+ const max = 1000
224
+ const ttlInMsecs = 0
225
+ const cacheId = 'some-cache-id'
226
+ const statisticTtlInHours = 24 // how often to reset statistics. On every rotation previously accumulated data is removed
227
+
228
+ const cache = new LruHitStatistics(max, ttlInMsecs, cacheId, sharedRecord, statisticTtlInHours)
228
229
  ```
229
230
 
230
231
  You can retrieve accumulated statistics from the cache, or from the record directly: