@nxtedition/lib 28.0.9 → 28.0.11

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 (4) hide show
  1. package/app.js +0 -1
  2. package/cache.js +1 -1
  3. package/http.js +2 -0
  4. package/package.json +2 -2
package/app.js CHANGED
@@ -31,7 +31,6 @@ import { makeTemplateCompiler } from '@nxtedition/template'
31
31
  import { makeDeepstream } from './deepstream.js'
32
32
  import * as rxjs from 'rxjs'
33
33
  import rx from 'rxjs/operators'
34
- import { performance } from 'perf_hooks'
35
34
  import hashString from './hash.js'
36
35
  import { makeTrace } from './trace.js'
37
36
  import { compose, createServer } from './http.js'
package/cache.js CHANGED
@@ -291,7 +291,7 @@ export class AsyncCache {
291
291
  throw new TypeError('ttl must be a finite number')
292
292
  }
293
293
 
294
- const stale = now + Math.max(ttl, this.#stale(value, key) ?? 0)
294
+ const stale = ttl + (this.#stale(value, key) ?? 0)
295
295
  if (!Number.isFinite(stale)) {
296
296
  throw new TypeError('stale must be a finite number')
297
297
  }
package/http.js CHANGED
@@ -547,6 +547,8 @@ export class ServerResponse extends http.ServerResponse {
547
547
  }
548
548
  }
549
549
 
550
+ this.#headersSent = true
551
+
550
552
  return super.writeHead(statusCode, headers)
551
553
  }
552
554
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "28.0.9",
3
+ "version": "28.0.11",
4
4
  "license": "UNLICENSED",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",
@@ -92,5 +92,5 @@
92
92
  "pino": ">=7.0.0",
93
93
  "rxjs": "^7.0.0"
94
94
  },
95
- "gitHead": "c387129cb7a362f64690cfef28d51ee98f0ab87c"
95
+ "gitHead": "0337fc7ffd76296e12c4ce91be5941c839e8c90b"
96
96
  }