@appsignal/koa
Advanced tools
Comparing version 1.0.23 to 1.0.24
@@ -11,3 +11,3 @@ "use strict"; | ||
install() { | ||
shimmer_1.default.wrap(mod.prototype, "use", patches_1.getKoaUsePatch(tracer)); | ||
shimmer_1.default.wrap(mod.prototype, "use", (0, patches_1.getKoaUsePatch)(tracer)); | ||
return mod; | ||
@@ -14,0 +14,0 @@ }, |
@@ -13,2 +13,6 @@ "use strict"; | ||
return function use(middlewareFunction) { | ||
if (middlewareFunction.constructor.name == "GeneratorFunction" || | ||
middlewareFunction.constructor.name == "AsyncGeneratorFunction") { | ||
return original.apply(this, [middlewareFunction]); | ||
} | ||
let patchedFunction; | ||
@@ -15,0 +19,0 @@ if (middlewareFunction.router) { |
{ | ||
"name": "@appsignal/koa", | ||
"version": "1.0.23", | ||
"version": "1.0.24", | ||
"main": "dist/index", | ||
@@ -5,0 +5,0 @@ "types": "dist/index", |
@@ -7,2 +7,4 @@ # `@appsignal/koa` | ||
⚠️ This package is no longer required for AppSignal for Node.js [version 3.0](https://docs.appsignal.com/nodejs/3.x.html). If you use version 3.0 or newer in your app, please remove this package from your `package.json` file. | ||
## Installation | ||
@@ -43,2 +45,4 @@ | ||
const app = new Koa(); | ||
// Add error handling | ||
@@ -51,6 +55,10 @@ | ||
}); | ||
const app = new Koa(); | ||
``` | ||
Note that generator-based middleware was deprecated in Koa version 2.x, and the next major Koa version will remove support for them entirely. | ||
Our instrumentation does not instrument generator-based middleware. The [Koa 2.x migration guide][guide] explains how you can use the `koa-convert` library to convert them to new-style async middleware. | ||
[guide]: https://github.com/koajs/koa/blob/v2.x/docs/migration.md#using-v1x-middleware-in-v2x | ||
## Contributing | ||
@@ -57,0 +65,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8746
118
81