@feathersjs/koa
Advanced tools
Comparing version 5.0.6 to 5.0.7
@@ -6,2 +6,13 @@ # Change Log | ||
## [5.0.7](https://github.com/feathersjs/feathers/compare/v5.0.6...v5.0.7) (2023-07-14) | ||
### Bug Fixes | ||
* **koa:** Ensure .teardown works without a server ([#3234](https://github.com/feathersjs/feathers/issues/3234)) ([818572d](https://github.com/feathersjs/feathers/commit/818572df98456bc3e1a300e879329aa8f849be64)) | ||
## [5.0.6](https://github.com/feathersjs/feathers/compare/v5.0.5...v5.0.6) (2023-06-15) | ||
@@ -8,0 +19,0 @@ |
@@ -62,5 +62,10 @@ "use strict"; | ||
async teardown(server) { | ||
return feathersTeardown | ||
.call(this, server) | ||
.then(() => new Promise((resolve, reject) => this.server.close((e) => (e ? reject(e) : resolve(this))))); | ||
return feathersTeardown.call(this, server).then(() => new Promise((resolve, reject) => { | ||
if (this.server) { | ||
this.server.close((e) => (e ? reject(e) : resolve(this))); | ||
} | ||
else { | ||
resolve(this); | ||
} | ||
})); | ||
} | ||
@@ -67,0 +72,0 @@ }); |
{ | ||
"name": "@feathersjs/koa", | ||
"description": "Feathers KoaJS framework bindings and REST provider", | ||
"version": "5.0.6", | ||
"version": "5.0.7", | ||
"homepage": "https://feathersjs.com", | ||
@@ -52,7 +52,7 @@ "main": "lib/", | ||
"dependencies": { | ||
"@feathersjs/authentication": "^5.0.6", | ||
"@feathersjs/commons": "^5.0.6", | ||
"@feathersjs/errors": "^5.0.6", | ||
"@feathersjs/feathers": "^5.0.6", | ||
"@feathersjs/transport-commons": "^5.0.6", | ||
"@feathersjs/authentication": "^5.0.7", | ||
"@feathersjs/commons": "^5.0.7", | ||
"@feathersjs/errors": "^5.0.7", | ||
"@feathersjs/feathers": "^5.0.7", | ||
"@feathersjs/transport-commons": "^5.0.7", | ||
"@koa/cors": "^4.0.0", | ||
@@ -70,8 +70,8 @@ "@types/koa": "^2.13.6", | ||
"devDependencies": { | ||
"@feathersjs/authentication-local": "^5.0.6", | ||
"@feathersjs/memory": "^5.0.6", | ||
"@feathersjs/tests": "^5.0.6", | ||
"@feathersjs/authentication-local": "^5.0.7", | ||
"@feathersjs/memory": "^5.0.7", | ||
"@feathersjs/tests": "^5.0.7", | ||
"@types/koa-compose": "^3.2.5", | ||
"@types/mocha": "^10.0.1", | ||
"@types/node": "^20.3.1", | ||
"@types/node": "^20.4.2", | ||
"axios": "^1.4.0", | ||
@@ -81,5 +81,5 @@ "mocha": "^10.2.0", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^5.1.3" | ||
"typescript": "^5.1.6" | ||
}, | ||
"gitHead": "71ac655d260fbc9aa65cd5b9a6c088f0187ace4e" | ||
"gitHead": "1ab855487d2dfacb114339c634621357bce3a56a" | ||
} |
@@ -56,7 +56,12 @@ import Koa from 'koa' | ||
async teardown(server?: any) { | ||
return feathersTeardown | ||
.call(this, server) | ||
.then( | ||
() => new Promise((resolve, reject) => this.server.close((e) => (e ? reject(e) : resolve(this)))) | ||
) | ||
return feathersTeardown.call(this, server).then( | ||
() => | ||
new Promise((resolve, reject) => { | ||
if (this.server) { | ||
this.server.close((e) => (e ? reject(e) : resolve(this))) | ||
} else { | ||
resolve(this) | ||
} | ||
}) | ||
) | ||
} | ||
@@ -63,0 +68,0 @@ } as Application) |
Sorry, the diff of this file is not supported yet
47456
553