@nxtedition/lib 26.3.8 → 26.4.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.
Files changed (3) hide show
  1. package/cache.js +15 -0
  2. package/http.js +1 -0
  3. package/package.json +1 -1
package/cache.js CHANGED
@@ -170,6 +170,21 @@ export class AsyncCache {
170
170
  return this.#refresh(args)
171
171
  }
172
172
 
173
+ /**
174
+ * @param {string} key
175
+ */
176
+ delete(key) {
177
+ this.#delete(key)
178
+ }
179
+
180
+ /**
181
+ * @param {string} key
182
+ * @param {V} value
183
+ */
184
+ set(key, value) {
185
+ this.#set(key, value)
186
+ }
187
+
173
188
  purgeStale() {
174
189
  try {
175
190
  this.#lru?.purgeStale()
package/http.js CHANGED
@@ -360,6 +360,7 @@ export async function requestMiddleware(ctx, next) {
360
360
  if (res.writableEnded || res.destroyed || res.stream?.destroyed) {
361
361
  // Do nothing..
362
362
  } else {
363
+ res.on('error', noop)
363
364
  res.destroy()
364
365
  ctx.logger?.warn('request destroyed')
365
366
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "26.3.8",
3
+ "version": "26.4.0",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",