@hono/node-server 1.11.1 → 1.11.2

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/dist/index.js CHANGED
@@ -423,8 +423,8 @@ var getRequestListener = (fetchCallback, options = {}) => {
423
423
  try {
424
424
  req = newRequest(incoming, options.hostname);
425
425
  outgoing.on("close", () => {
426
- if (incoming.destroyed) {
427
- req[getAbortController]().abort();
426
+ if (incoming.errored) {
427
+ req[getAbortController]().abort(incoming.errored.toString());
428
428
  }
429
429
  });
430
430
  res = fetchCallback(req, { incoming, outgoing });
package/dist/index.mjs CHANGED
@@ -384,8 +384,8 @@ var getRequestListener = (fetchCallback, options = {}) => {
384
384
  try {
385
385
  req = newRequest(incoming, options.hostname);
386
386
  outgoing.on("close", () => {
387
- if (incoming.destroyed) {
388
- req[getAbortController]().abort();
387
+ if (incoming.errored) {
388
+ req[getAbortController]().abort(incoming.errored.toString());
389
389
  }
390
390
  });
391
391
  res = fetchCallback(req, { incoming, outgoing });
package/dist/listener.js CHANGED
@@ -417,8 +417,8 @@ var getRequestListener = (fetchCallback, options = {}) => {
417
417
  try {
418
418
  req = newRequest(incoming, options.hostname);
419
419
  outgoing.on("close", () => {
420
- if (incoming.destroyed) {
421
- req[getAbortController]().abort();
420
+ if (incoming.errored) {
421
+ req[getAbortController]().abort(incoming.errored.toString());
422
422
  }
423
423
  });
424
424
  res = fetchCallback(req, { incoming, outgoing });
package/dist/listener.mjs CHANGED
@@ -381,8 +381,8 @@ var getRequestListener = (fetchCallback, options = {}) => {
381
381
  try {
382
382
  req = newRequest(incoming, options.hostname);
383
383
  outgoing.on("close", () => {
384
- if (incoming.destroyed) {
385
- req[getAbortController]().abort();
384
+ if (incoming.errored) {
385
+ req[getAbortController]().abort(incoming.errored.toString());
386
386
  }
387
387
  });
388
388
  res = fetchCallback(req, { incoming, outgoing });
package/dist/server.js CHANGED
@@ -419,8 +419,8 @@ var getRequestListener = (fetchCallback, options = {}) => {
419
419
  try {
420
420
  req = newRequest(incoming, options.hostname);
421
421
  outgoing.on("close", () => {
422
- if (incoming.destroyed) {
423
- req[getAbortController]().abort();
422
+ if (incoming.errored) {
423
+ req[getAbortController]().abort(incoming.errored.toString());
424
424
  }
425
425
  });
426
426
  res = fetchCallback(req, { incoming, outgoing });
package/dist/server.mjs CHANGED
@@ -384,8 +384,8 @@ var getRequestListener = (fetchCallback, options = {}) => {
384
384
  try {
385
385
  req = newRequest(incoming, options.hostname);
386
386
  outgoing.on("close", () => {
387
- if (incoming.destroyed) {
388
- req[getAbortController]().abort();
387
+ if (incoming.errored) {
388
+ req[getAbortController]().abort(incoming.errored.toString());
389
389
  }
390
390
  });
391
391
  res = fetchCallback(req, { incoming, outgoing });
package/dist/vercel.js CHANGED
@@ -417,8 +417,8 @@ var getRequestListener = (fetchCallback, options = {}) => {
417
417
  try {
418
418
  req = newRequest(incoming, options.hostname);
419
419
  outgoing.on("close", () => {
420
- if (incoming.destroyed) {
421
- req[getAbortController]().abort();
420
+ if (incoming.errored) {
421
+ req[getAbortController]().abort(incoming.errored.toString());
422
422
  }
423
423
  });
424
424
  res = fetchCallback(req, { incoming, outgoing });
package/dist/vercel.mjs CHANGED
@@ -381,8 +381,8 @@ var getRequestListener = (fetchCallback, options = {}) => {
381
381
  try {
382
382
  req = newRequest(incoming, options.hostname);
383
383
  outgoing.on("close", () => {
384
- if (incoming.destroyed) {
385
- req[getAbortController]().abort();
384
+ if (incoming.errored) {
385
+ req[getAbortController]().abort(incoming.errored.toString());
386
386
  }
387
387
  });
388
388
  res = fetchCallback(req, { incoming, outgoing });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hono/node-server",
3
- "version": "1.11.1",
3
+ "version": "1.11.2",
4
4
  "description": "Node.js Adapter for Hono",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -46,7 +46,7 @@
46
46
  }
47
47
  },
48
48
  "scripts": {
49
- "test": "jest",
49
+ "test": "node --expose-gc ./node_modules/.bin/jest",
50
50
  "build": "tsup",
51
51
  "watch": "tsup --watch",
52
52
  "postbuild": "publint",